Repository navigation
Expand file tree
/
Copy pathturbo.jsonc
More file actions
204 lines (204 loc) · 7.23 KB
/
Copy pathturbo.jsonc
File metadata and controls
204 lines (204 loc) · 7.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
{
"$schema": "https://turborepo.dev/schema.json",
"globalDependencies": [
"tsconfig.base.json",
"tooling/oxc/base.oxlintrc.json",
"tooling/oxc/packages.oxlintrc.json",
"tooling/oxc/apps.oxlintrc.json",
"tooling/oxc/.oxfmtrc.json",
"tools/oxlint/anti-slop/**",
".oxfmtignore",
"scripts/tsdown.config.ts",
"vitest.config.ts",
],
"globalEnv": ["NODE_ENV"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", ".output/**", "*.tsbuildinfo"],
},
"@code-zero/dashboard#build": {
"dependsOn": ["^build"],
// NITRO_PRESET and VITEHUB_HOSTING select the deployment target (config/env.ts), which
// fixes both the Nitro preset the build emits and the KV driver it resolves. Strict env mode
// hides VITEHUB_HOSTING from `nuxt build` unless it is declared here, and declaring both
// keeps the target in the cache key, so a self-hosted `node-server` build can never be
// restored into a hosted one.
"env": [
"AUTH_ENABLE_SIGNUP",
"GITHUB_CLIENT_ID",
"GITHUB_CLIENT_SECRET",
"AUTH_ENABLE_ORGANIZATIONS",
"NUXT_PUBLIC_SITE_URL",
"NITRO_PRESET",
"VITEHUB_HOSTING",
// Read by packages/build-env to resolve what the build is (version, commit, branch,
// deploy channel). Declared so strict env mode does not hide them from `nuxt build`, and
// so the resolved metadata is part of the cache key: a bundle that reports the wrong
// commit is worse than one that is rebuilt. Whatever a target leaves unset is completed
// at boot by the module's server pass instead.
"VERCEL",
"VERCEL_ENV",
"VERCEL_GIT_*",
"VERCEL_URL",
"VERCEL_PROJECT_PRODUCTION_URL",
"NUXT_ENV_VERCEL_*",
"NETLIFY",
"CONTEXT",
"BRANCH",
"HEAD",
"COMMIT_REF",
"REVIEW_ID",
"DEPLOY_PRIME_URL",
"DEPLOY_URL",
"URL",
"CF_PAGES*",
"GITHUB_ACTIONS",
"GITHUB_REF",
"GITHUB_REF_NAME",
// Only set for a `pull_request` trigger, where `GITHUB_REF_NAME` is `<pr>/merge` rather
// than a branch; packages/build-env prefers this one when both are present.
"GITHUB_HEAD_REF",
"GITHUB_SHA",
"CODE_ZERO_BUILD_*",
],
// `.git/HEAD` and the ref it points at, so a build with no platform variables in scope —
// where packages/build-env falls back to reading the checkout directly — still busts the
// cache when the branch or commit changes; without them, switching branches onto an
// identical tree could restore a cached bundle that reports the previous revision.
"inputs": [
"$TURBO_DEFAULT$",
".env*",
"$TURBO_ROOT$/.git/HEAD",
"$TURBO_ROOT$/.git/refs/heads/**",
],
// `.vercel/output/**` is where the `vercel` preset writes instead of `.output/`; both are
// listed so a cache hit restores whichever bundle the resolved target produced.
"outputs": [".output/**", ".vercel/output/**"],
},
"@code-zero/marketing#build": {
"dependsOn": ["^build"],
// Declared because Turborepo's strict env mode would otherwise hide these from `nuxt build`,
// leaving @nuxtjs/seo with no site origin and the dashboard link pointing at localhost.
// NITRO_PRESET is declared so the deployment target is explicit and part of the cache key.
// Nitro does auto-detect a host from the platform variables Turborepo passes through, but
// those are not hashed, so a cached self-hosted build could otherwise be restored into one.
"env": [
"MARKETING_SITE_URL",
"MARKETING_DASHBOARD_URL",
"NITRO_PRESET",
// Read by packages/build-env to resolve what the build is (version, commit, branch,
// deploy channel). Declared so strict env mode does not hide them from `nuxt build`, and
// so the resolved metadata is part of the cache key: a bundle that reports the wrong
// commit is worse than one that is rebuilt. Whatever a target leaves unset is completed
// at boot by the module's server pass instead.
"VERCEL",
"VERCEL_ENV",
"VERCEL_GIT_*",
"VERCEL_URL",
"VERCEL_PROJECT_PRODUCTION_URL",
"NUXT_ENV_VERCEL_*",
"NETLIFY",
"CONTEXT",
"BRANCH",
"HEAD",
"COMMIT_REF",
"REVIEW_ID",
"DEPLOY_PRIME_URL",
"DEPLOY_URL",
"URL",
"CF_PAGES*",
"GITHUB_ACTIONS",
"GITHUB_REF",
"GITHUB_REF_NAME",
// Only set for a `pull_request` trigger, where `GITHUB_REF_NAME` is `<pr>/merge` rather
// than a branch; packages/build-env prefers this one when both are present.
"GITHUB_HEAD_REF",
"GITHUB_SHA",
"CODE_ZERO_BUILD_*",
],
// `.git/HEAD` and the ref it points at, so a build with no platform variables in scope —
// where packages/build-env falls back to reading the checkout directly — still busts the
// cache when the branch or commit changes; without them, switching branches onto an
// identical tree could restore a cached bundle that reports the previous revision.
"inputs": [
"$TURBO_DEFAULT$",
".env*",
"$TURBO_ROOT$/.git/HEAD",
"$TURBO_ROOT$/.git/refs/heads/**",
],
"outputs": [".output/**", ".vercel/output/**"],
},
"@code-zero/docs#build": {
"dependsOn": ["^build"],
// The canonical architecture and provider references are pulled in from the
// repository-root docs/ directory by the @include hook in nuxt.config.ts.
"env": ["NUXT_APP_BASE_URL"],
"inputs": ["$TURBO_DEFAULT$", ".env*", "../../docs/*.md"],
"outputs": [".output/**"],
},
"typecheck": {
"dependsOn": ["^build"],
"outputs": ["*.tsbuildinfo"],
},
"lint": {
"dependsOn": ["^build"],
"outputs": [],
},
"lint:fix": {
"dependsOn": ["^build"],
"cache": false,
"outputs": [],
},
"test": {
"dependsOn": ["^build"],
"outputs": [],
},
"test:browser": {
"dependsOn": ["build"],
"cache": false,
"outputs": [],
},
"db:generate": {
"cache": false,
"outputs": [],
},
"db:migrate": {
"cache": false,
// Declared because Turborepo's strict env mode would otherwise hide the connection string
// from drizzle-kit and silently migrate the local default instead.
"env": ["DATABASE_URL", "AUTH_DATABASE_URL"],
"outputs": [],
},
// Rewrites the checked-in render of every mail template (packages/mail). Uncached: it is run
// deliberately after editing a template, and its output is a source file, not a build artifact.
"mail:compile": {
"cache": false,
"outputs": [],
},
"i18n:check": {
"cache": false,
"outputs": [],
},
"i18n:report": {
"cache": false,
"outputs": [],
},
"i18n:schema": {
"cache": false,
"outputs": [],
},
"i18n:status": {
"cache": false,
"outputs": [],
},
"dev": {
"dependsOn": ["^build"],
"cache": false,
"persistent": true,
},
"clean": {
"cache": false,
},
},
}