@turbo/types 2.0.13 → 2.0.15-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/types/config.ts +60 -22
package/package.json
CHANGED
package/src/types/config.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type LegacySchema = LegacyRootSchema | LegacyWorkspaceSchema;
|
|
|
7
7
|
export type SchemaV1 = RootSchemaV1 | WorkspaceSchemaV1;
|
|
8
8
|
|
|
9
9
|
export interface BaseSchema {
|
|
10
|
-
/** @defaultValue https://turbo.build/schema.json */
|
|
10
|
+
/** @defaultValue `https://turbo.build/schema.json` */
|
|
11
11
|
$schema?: string;
|
|
12
12
|
/**
|
|
13
13
|
* An object representing the task dependency graph of your project. turbo interprets
|
|
@@ -49,7 +49,7 @@ export interface WorkspaceSchema extends BaseSchema {
|
|
|
49
49
|
*
|
|
50
50
|
* Currently, only the "//" value is allowed.
|
|
51
51
|
*
|
|
52
|
-
* @defaultValue ["//"]
|
|
52
|
+
* @defaultValue `["//"]`
|
|
53
53
|
*/
|
|
54
54
|
extends: Array<string>;
|
|
55
55
|
}
|
|
@@ -79,7 +79,7 @@ export interface RootSchema extends BaseSchema {
|
|
|
79
79
|
*
|
|
80
80
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#globaldependencies
|
|
81
81
|
*
|
|
82
|
-
* @defaultValue []
|
|
82
|
+
* @defaultValue `[]`
|
|
83
83
|
*/
|
|
84
84
|
globalDependencies?: Array<string>;
|
|
85
85
|
|
|
@@ -90,7 +90,7 @@ export interface RootSchema extends BaseSchema {
|
|
|
90
90
|
*
|
|
91
91
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#globalenv
|
|
92
92
|
*
|
|
93
|
-
* @defaultValue []
|
|
93
|
+
* @defaultValue `[]`
|
|
94
94
|
*/
|
|
95
95
|
globalEnv?: Array<EnvWildcard>;
|
|
96
96
|
|
|
@@ -100,17 +100,17 @@ export interface RootSchema extends BaseSchema {
|
|
|
100
100
|
*
|
|
101
101
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#globalpassthroughenv
|
|
102
102
|
*
|
|
103
|
-
* @defaultValue null
|
|
103
|
+
* @defaultValue `null`
|
|
104
104
|
*/
|
|
105
105
|
globalPassThroughEnv?: null | Array<EnvWildcard>;
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
|
+
* @deprecated as of Turborepo 2.0.0. Consider using {@link RootSchema.globalDependencies} instead.
|
|
109
|
+
*
|
|
108
110
|
* A priority-ordered (most-significant to least-significant) array of project-anchored
|
|
109
111
|
* Unix-style paths to `.env` files to include in the global hash.
|
|
110
112
|
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* @defaultValue null
|
|
113
|
+
* @defaultValue `null`
|
|
114
114
|
*/
|
|
115
115
|
globalDotEnv?: null | Array<AnchoredUnixPath>;
|
|
116
116
|
|
|
@@ -139,8 +139,40 @@ export interface RootSchema extends BaseSchema {
|
|
|
139
139
|
* configuration to infer the correct package manager.
|
|
140
140
|
*
|
|
141
141
|
* Some turbo features are disabled if this is set to true.
|
|
142
|
+
*
|
|
143
|
+
* @defaultValue `false`
|
|
142
144
|
*/
|
|
143
145
|
dangerouslyDisablePackageManagerCheck?: boolean;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Specify the filesystem cache directory.
|
|
149
|
+
*
|
|
150
|
+
* Documentation: https://turbo.build/repo/docs/reference/configuration#tasks
|
|
151
|
+
*
|
|
152
|
+
* @defaultValue `"".turbo/cache"`
|
|
153
|
+
*/
|
|
154
|
+
cacheDir?: RelativeUnixPath;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Turbo can run a background process to pre-calculate values used for determining work that needs to be done. This standalone process (daemon) is an optimization, and not required for proper functioning of turbo.
|
|
158
|
+
*
|
|
159
|
+
* Documentation: https://turbo.build/repo/docs/reference/configuration#daemon
|
|
160
|
+
*
|
|
161
|
+
* @defaultValue `false`
|
|
162
|
+
*/
|
|
163
|
+
daemon?: boolean;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime:
|
|
167
|
+
*
|
|
168
|
+
* - **Strict Mode**: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`.
|
|
169
|
+
* - **Loose Mode**: Allow all environment variables for the process to be available.
|
|
170
|
+
*
|
|
171
|
+
* Documentation: https://turbo.build/repo/docs/crafting-your-repository/using-environment-variables#environment-modes
|
|
172
|
+
*
|
|
173
|
+
* @defaultValue `"strict"`
|
|
174
|
+
*/
|
|
175
|
+
envMode?: EnvMode;
|
|
144
176
|
}
|
|
145
177
|
|
|
146
178
|
export type LegacyRootSchema = RootSchema & LegacyBaseSchema;
|
|
@@ -162,7 +194,7 @@ export interface Pipeline {
|
|
|
162
194
|
*
|
|
163
195
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#dependson
|
|
164
196
|
*
|
|
165
|
-
* @defaultValue []
|
|
197
|
+
* @defaultValue `[]`
|
|
166
198
|
*/
|
|
167
199
|
dependsOn?: Array<string>;
|
|
168
200
|
|
|
@@ -176,7 +208,7 @@ export interface Pipeline {
|
|
|
176
208
|
*
|
|
177
209
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#env
|
|
178
210
|
*
|
|
179
|
-
* @defaultValue []
|
|
211
|
+
* @defaultValue `[]`
|
|
180
212
|
*/
|
|
181
213
|
env?: Array<EnvWildcard>;
|
|
182
214
|
|
|
@@ -187,17 +219,17 @@ export interface Pipeline {
|
|
|
187
219
|
*
|
|
188
220
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#passthroughenv
|
|
189
221
|
*
|
|
190
|
-
* @defaultValue null
|
|
222
|
+
* @defaultValue `null`
|
|
191
223
|
*/
|
|
192
224
|
passThroughEnv?: null | Array<EnvWildcard>;
|
|
193
225
|
|
|
194
226
|
/**
|
|
227
|
+
* @deprecated as of Turborepo 2.0.0. Consider using {@link Pipeline.inputs} instead.
|
|
228
|
+
*
|
|
195
229
|
* A priority-ordered (most-significant to least-significant) array of workspace-anchored
|
|
196
230
|
* Unix-style paths to `.env` files to include in the task hash.
|
|
197
231
|
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* @defaultValue null
|
|
232
|
+
* @defaultValue `null`
|
|
201
233
|
*/
|
|
202
234
|
dotEnv?: null | Array<AnchoredUnixPath>;
|
|
203
235
|
|
|
@@ -210,7 +242,7 @@ export interface Pipeline {
|
|
|
210
242
|
*
|
|
211
243
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#outputs
|
|
212
244
|
*
|
|
213
|
-
* @defaultValue []
|
|
245
|
+
* @defaultValue `[]`
|
|
214
246
|
*/
|
|
215
247
|
outputs?: Array<string>;
|
|
216
248
|
|
|
@@ -221,7 +253,7 @@ export interface Pipeline {
|
|
|
221
253
|
*
|
|
222
254
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#cache
|
|
223
255
|
*
|
|
224
|
-
* @defaultValue true
|
|
256
|
+
* @defaultValue `true`
|
|
225
257
|
*/
|
|
226
258
|
cache?: boolean;
|
|
227
259
|
|
|
@@ -238,7 +270,7 @@ export interface Pipeline {
|
|
|
238
270
|
*
|
|
239
271
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#inputs
|
|
240
272
|
*
|
|
241
|
-
* @defaultValue []
|
|
273
|
+
* @defaultValue `[]`
|
|
242
274
|
*/
|
|
243
275
|
inputs?: Array<string>;
|
|
244
276
|
|
|
@@ -257,7 +289,7 @@ export interface Pipeline {
|
|
|
257
289
|
*
|
|
258
290
|
* Documentation: https://turbo.build/repo/docs/reference/run#--output-logs-option
|
|
259
291
|
*
|
|
260
|
-
* @defaultValue full
|
|
292
|
+
* @defaultValue `"full"`
|
|
261
293
|
*/
|
|
262
294
|
outputLogs?: OutputMode;
|
|
263
295
|
|
|
@@ -268,7 +300,7 @@ export interface Pipeline {
|
|
|
268
300
|
*
|
|
269
301
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#persistent
|
|
270
302
|
*
|
|
271
|
-
* @defaultValue false
|
|
303
|
+
* @defaultValue `false`
|
|
272
304
|
*/
|
|
273
305
|
persistent?: boolean;
|
|
274
306
|
|
|
@@ -278,6 +310,8 @@ export interface Pipeline {
|
|
|
278
310
|
* they receive from stdin can change the outcome of the task.
|
|
279
311
|
*
|
|
280
312
|
* Documentation: https://turbo.build/repo/docs/reference/configuration#interactive
|
|
313
|
+
*
|
|
314
|
+
* @defaultValue `false`
|
|
281
315
|
*/
|
|
282
316
|
interactive?: boolean;
|
|
283
317
|
}
|
|
@@ -289,7 +323,7 @@ export interface RemoteCache {
|
|
|
289
323
|
* variable `TURBO_REMOTE_CACHE_SIGNATURE_KEY`. Turborepo will reject any downloaded artifacts
|
|
290
324
|
* that have an invalid signature or are missing a signature.
|
|
291
325
|
*
|
|
292
|
-
* @defaultValue false
|
|
326
|
+
* @defaultValue `false`
|
|
293
327
|
*/
|
|
294
328
|
signature?: boolean;
|
|
295
329
|
|
|
@@ -299,7 +333,7 @@ export interface RemoteCache {
|
|
|
299
333
|
* is enabled, but still requires the user to login and link their repo to a remote cache.
|
|
300
334
|
* Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching
|
|
301
335
|
*
|
|
302
|
-
* @defaultValue true
|
|
336
|
+
* @defaultValue `true`
|
|
303
337
|
*/
|
|
304
338
|
enabled?: boolean;
|
|
305
339
|
}
|
|
@@ -310,8 +344,12 @@ export type OutputMode =
|
|
|
310
344
|
| "new-only"
|
|
311
345
|
| "errors-only"
|
|
312
346
|
| "none";
|
|
313
|
-
|
|
347
|
+
export type EnvMode = "strict" | "loose";
|
|
314
348
|
export type UI = "tui" | "stream";
|
|
315
349
|
|
|
350
|
+
/**
|
|
351
|
+
* This is a relative Unix-style path (e.g. `./src/index.ts` or `src/index.ts`). Absolute paths (e.g. `/tmp/foo`) are not valid.
|
|
352
|
+
*/
|
|
353
|
+
export type RelativeUnixPath = string;
|
|
316
354
|
export type AnchoredUnixPath = string;
|
|
317
355
|
export type EnvWildcard = string;
|