@turbo/types 2.8.20 → 2.8.21-canary.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turbo/types",
3
- "version": "2.8.20",
3
+ "version": "2.8.21-canary.3",
4
4
  "description": "Turborepo types",
5
5
  "homepage": "https://turborepo.dev",
6
6
  "bugs": {
@@ -103,6 +103,17 @@
103
103
  }
104
104
  ]
105
105
  },
106
+ "global": {
107
+ "description": "Global configuration block.\n\nWhen `futureFlags.globalConfiguration` is enabled, global settings like `inputs`, `env`, `ui`, etc. are placed here instead of at the top level.",
108
+ "anyOf": [
109
+ {
110
+ "$ref": "#/definitions/GlobalConfig"
111
+ },
112
+ {
113
+ "type": "null"
114
+ }
115
+ ]
116
+ },
106
117
  "globalDependencies": {
107
118
  "description": "A list of globs to include in the set of implicit global hash dependencies.\n\nThe contents of these files will be included in the global hashing algorithm and affect the hashes of all tasks.\n\nThis is useful for busting the cache based on: - `.env` files (not in Git) - Any root level file that impacts package tasks that are not represented in the traditional dependency graph (e.g. a root `tsconfig.json`, `jest.config.ts`, `.eslintrc`, etc.)\n\nDocumentation: https://turborepo.dev/docs/reference/configuration#globaldependencies",
108
119
  "type": ["array", "null"],
@@ -277,6 +288,11 @@
277
288
  "default": false,
278
289
  "type": "boolean"
279
290
  },
291
+ "globalConfiguration": {
292
+ "description": "Move global configuration keys (like `globalDependencies`, `ui`, `envMode`, etc.) under a top-level `global` key for clarity.\n\nWhen enabled, keys are renamed: `globalDependencies` becomes `global.inputs`, `globalEnv` becomes `global.env`, and `globalPassThroughEnv` becomes `global.passThroughEnv`.",
293
+ "default": false,
294
+ "type": "boolean"
295
+ },
280
296
  "longerSignatureKey": {
281
297
  "description": "Enforce a minimum length of 32 bytes for `TURBO_REMOTE_CACHE_SIGNATURE_KEY` when `remoteCache.signature` is enabled. Short keys weaken the HMAC-SHA256 signature, making brute-force tag collision feasible.",
282
298
  "default": false,
@@ -294,6 +310,121 @@
294
310
  }
295
311
  }
296
312
  },
313
+ "GlobalConfig": {
314
+ "description": "Global configuration that applies to all tasks in the monorepo.\n\nWhen `futureFlags.globalConfiguration` is enabled, these fields live under the top-level `\"global\"` key instead of being scattered across the root of turbo.json.\n\nWhen adding a new field, also update: 1. The corresponding top-level field on `RawTurboJson` 2. `resolve_global_config()` on `RawTurboJson` 3. `validate_no_top_level_global_keys()` in this file 4. `WithMetadata` impl in `parser.rs` 5. `GlobalConfig` in `config-v2.ts` and `generate_global_config_interface()` in schema-gen",
315
+ "type": "object",
316
+ "properties": {
317
+ "cacheDir": {
318
+ "description": "Specify the filesystem cache directory.",
319
+ "anyOf": [
320
+ {
321
+ "$ref": "#/definitions/String"
322
+ },
323
+ {
324
+ "type": "null"
325
+ }
326
+ ]
327
+ },
328
+ "concurrency": {
329
+ "description": "Set/limit the maximum concurrency for task execution.",
330
+ "anyOf": [
331
+ {
332
+ "$ref": "#/definitions/String"
333
+ },
334
+ {
335
+ "type": "null"
336
+ }
337
+ ]
338
+ },
339
+ "daemon": {
340
+ "description": "Deprecated: The daemon is no longer used for `turbo run`.",
341
+ "anyOf": [
342
+ {
343
+ "$ref": "#/definitions/Boolean"
344
+ },
345
+ {
346
+ "type": "null"
347
+ }
348
+ ]
349
+ },
350
+ "dangerouslyDisablePackageManagerCheck": {
351
+ "description": "Disable check for `packageManager` in root `package.json`.",
352
+ "anyOf": [
353
+ {
354
+ "$ref": "#/definitions/Boolean"
355
+ },
356
+ {
357
+ "type": "null"
358
+ }
359
+ ]
360
+ },
361
+ "env": {
362
+ "description": "A list of environment variables for implicit global hash dependencies.\n\nUnlike `inputs` (which become per-task inputs), these variables are included in the global hash and affect all task hashes uniformly.",
363
+ "type": ["array", "null"],
364
+ "items": {
365
+ "$ref": "#/definitions/String"
366
+ }
367
+ },
368
+ "envMode": {
369
+ "description": "Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime.",
370
+ "anyOf": [
371
+ {
372
+ "$ref": "#/definitions/EnvMode"
373
+ },
374
+ {
375
+ "type": "null"
376
+ }
377
+ ]
378
+ },
379
+ "inputs": {
380
+ "description": "A list of globs for files that implicitly affect all tasks.\n\nThese files are prepended to every task's `inputs` during engine construction rather than being folded into the global hash. This allows individual tasks to exclude specific global files via negation globs.",
381
+ "type": ["array", "null"],
382
+ "items": {
383
+ "$ref": "#/definitions/String"
384
+ }
385
+ },
386
+ "noUpdateNotifier": {
387
+ "description": "When set to `true`, disables the update notification that appears when a new version of `turbo` is available.",
388
+ "anyOf": [
389
+ {
390
+ "$ref": "#/definitions/Boolean"
391
+ },
392
+ {
393
+ "type": "null"
394
+ }
395
+ ]
396
+ },
397
+ "passThroughEnv": {
398
+ "description": "An allowlist of environment variables that should be made to all tasks, but should not contribute to the task's cache key.",
399
+ "type": ["array", "null"],
400
+ "items": {
401
+ "$ref": "#/definitions/String"
402
+ }
403
+ },
404
+ "remoteCache": {
405
+ "description": "Configuration options when interfacing with the remote cache.",
406
+ "anyOf": [
407
+ {
408
+ "$ref": "#/definitions/RemoteCache"
409
+ },
410
+ {
411
+ "type": "null"
412
+ }
413
+ ]
414
+ },
415
+ "ui": {
416
+ "description": "Enable use of the UI for `turbo`.",
417
+ "anyOf": [
418
+ {
419
+ "$ref": "#/definitions/UI"
420
+ },
421
+ {
422
+ "type": "null"
423
+ }
424
+ ]
425
+ }
426
+ }
427
+ },
297
428
  "Map_of_TagRules": {
298
429
  "type": "object",
299
430
  "additionalProperties": {
@@ -0,0 +1,668 @@
1
+ export type OutputLogs =
2
+ | "full"
3
+ | "none"
4
+ | "hash-only"
5
+ | "new-only"
6
+ | "errors-only";
7
+ export type EnvMode = "loose" | "strict";
8
+ export type UI = "tui" | "stream" | "stream-with-experimental-timestamps";
9
+ /**
10
+ * 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.
11
+ */
12
+ export type RelativeUnixPath = string;
13
+ export type EnvWildcard = string;
14
+
15
+ export interface BaseSchema {
16
+ /** @defaultValue `https://turborepo.dev/schema.v2.json` */
17
+ $schema?: string;
18
+ /**
19
+ * An object representing the task dependency graph of your project. turbo interprets
20
+ * these conventions to schedule, execute, and cache the outputs of tasks in
21
+ * your project.
22
+ *
23
+ * Documentation: https://turborepo.dev/docs/reference/configuration#tasks
24
+ *
25
+ * @defaultValue `{}`
26
+ */
27
+
28
+ // eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style -- it's more readable to specify a name for the key
29
+ tasks: {
30
+ /**
31
+ * The name of a task that can be executed by turbo. If turbo finds a workspace
32
+ * package with a package.json scripts object with a matching key, it will apply the
33
+ * pipeline task configuration to that npm script during execution.
34
+ */
35
+ [script: string]: Pipeline;
36
+ };
37
+ }
38
+
39
+ /** A `turbo.json` file in a package in the monorepo (not the root) */
40
+ export interface WorkspaceSchema extends BaseSchema {
41
+ /**
42
+ * This key is only available in Workspace Configs
43
+ * and cannot be used in your root turbo.json.
44
+ *
45
+ * Tells turbo to extend your root `turbo.json`
46
+ * and overrides with the keys provided
47
+ * in your Workspace Configs.
48
+ *
49
+ * Currently, only the "//" value is allowed.
50
+ *
51
+ * @defaultValue `["//"]`
52
+ */
53
+ extends: Array<string>;
54
+ /**
55
+ * Used to tag a package for boundaries rules. Boundaries rules can restrict
56
+ * which packages a tag group can import or be imported by.
57
+ */
58
+ tags?: Array<string>;
59
+ /**
60
+ * Configuration for `turbo boundaries` that is specific to this package
61
+ */
62
+ boundaries?: BoundariesConfig;
63
+ }
64
+
65
+ export interface RootSchema extends BaseSchema {
66
+ /**
67
+ * A list of globs to include in the set of implicit global hash dependencies.
68
+ *
69
+ * The contents of these files will be included in the global hashing
70
+ * algorithm and affect the hashes of all tasks.
71
+ *
72
+ * This is useful for busting the cache based on:
73
+ *
74
+ * - .env files (not in Git)
75
+ *
76
+ * - any root level file that impacts package tasks
77
+ * that are not represented in the traditional dependency graph
78
+ * (e.g. a root tsconfig.json, jest.config.ts, .eslintrc, etc.)
79
+ *
80
+ * Documentation: https://turborepo.dev/docs/reference/configuration#globaldependencies
81
+ *
82
+ * @defaultValue `[]`
83
+ */
84
+ globalDependencies?: Array<string>;
85
+
86
+ /**
87
+ * A list of environment variables for implicit global hash dependencies.
88
+ *
89
+ * The variables included in this list will affect all task hashes.
90
+ *
91
+ * Documentation: https://turborepo.dev/docs/reference/configuration#globalenv
92
+ *
93
+ * @defaultValue `[]`
94
+ */
95
+ globalEnv?: Array<EnvWildcard>;
96
+
97
+ /**
98
+ * An allowlist of environment variables that should be made to all tasks, but
99
+ * should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.
100
+ *
101
+ * Documentation: https://turborepo.dev/docs/reference/configuration#globalpassthroughenv
102
+ *
103
+ * @defaultValue `null`
104
+ */
105
+ globalPassThroughEnv?: null | Array<EnvWildcard>;
106
+
107
+ /**
108
+ * Configuration options that control how turbo interfaces with the remote cache.
109
+ *
110
+ * Documentation: https://turborepo.dev/docs/core-concepts/remote-caching
111
+ *
112
+ * @defaultValue `{}`
113
+ */
114
+ remoteCache?: RemoteCache;
115
+
116
+ /**
117
+ * Enable use of the UI for `turbo`.
118
+ *
119
+ * Documentation: https://turborepo.dev/docs/reference/configuration#ui
120
+ *
121
+ * @defaultValue `"stream"`
122
+ */
123
+ ui?: UI;
124
+
125
+ /**
126
+ * Set/limit the maximum concurrency for task execution. Must be an integer greater than or equal to `1` or a percentage value like `50%`.
127
+ *
128
+ * - Use `1` to force serial execution (one task at a time).
129
+ * - Use `100%` to use all available logical processors.
130
+ *
131
+ * Documentation: https://turborepo.dev/docs/reference/configuration#concurrency
132
+ *
133
+ * @defaultValue `"10"`
134
+ */
135
+ concurrency?: string;
136
+
137
+ /**
138
+ * Disable check for `packageManager` in root `package.json`
139
+ *
140
+ * This is highly discouraged as it leaves `turbo` dependent on system
141
+ * configuration to infer the correct package manager.
142
+ *
143
+ * Some turbo features are disabled if this is set to true.
144
+ *
145
+ * @defaultValue `false`
146
+ */
147
+ dangerouslyDisablePackageManagerCheck?: boolean;
148
+
149
+ /**
150
+ * Specify the filesystem cache directory.
151
+ *
152
+ * Documentation: https://turborepo.dev/docs/reference/configuration#cachedir
153
+ *
154
+ * @defaultValue `".turbo/cache"`
155
+ */
156
+ cacheDir?: RelativeUnixPath;
157
+
158
+ /**
159
+ * Deprecated: The daemon is no longer used for `turbo run` and this option will be removed in version 3.0.
160
+ *
161
+ * Documentation: https://turborepo.dev/docs/reference/configuration#daemon
162
+ *
163
+ * @defaultValue `false`
164
+ */
165
+ daemon?: boolean;
166
+
167
+ /**
168
+ * Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime:
169
+ *
170
+ * - `"strict"`: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`.
171
+ * - `"loose"`: Allow all environment variables for the process to be available.
172
+ *
173
+ * Documentation: https://turborepo.dev/docs/reference/configuration#envmode
174
+ *
175
+ * @defaultValue `"strict"`
176
+ */
177
+ envMode?: EnvMode;
178
+
179
+ /**
180
+ * Configuration for `turbo boundaries`. Allows users to restrict a package's dependencies and dependents
181
+ */
182
+ boundaries?: RootBoundariesConfig;
183
+
184
+ /**
185
+ * When set to `true`, disables the update notification that appears when a new version of `turbo` is available.
186
+ *
187
+ * Documentation: https://turborepo.dev/docs/reference/configuration#noupdatenotifier
188
+ *
189
+ * @defaultValue `false`
190
+ */
191
+ noUpdateNotifier?: boolean;
192
+
193
+ /**
194
+ * Global configuration block.
195
+ *
196
+ * When `futureFlags.globalConfiguration` is enabled, global settings
197
+ * like `inputs`, `env`, `ui`, etc. are placed here instead of at the
198
+ * top level.
199
+ */
200
+ global?: GlobalConfig;
201
+
202
+ /**
203
+ * Opt into breaking changes prior to major releases, experimental features, and beta features.
204
+ *
205
+ * @defaultValue `{}`
206
+ */
207
+ futureFlags?: FutureFlags;
208
+ }
209
+
210
+ export interface FutureFlags {
211
+ /**
212
+ * When using `outputLogs: "errors-only"`, show task hashes when tasks
213
+ * complete successfully. This provides visibility into which tasks are
214
+ * running without showing full output logs.
215
+ *
216
+ * @defaultValue `false`
217
+ */
218
+ errorsOnlyShowHash?: boolean;
219
+ /**
220
+ * Enable experimental OpenTelemetry exporter support.
221
+ *
222
+ * When enabled, Turborepo will honor the `experimentalObservability`
223
+ * configuration block (if present) to send run summaries to an
224
+ * observability backend.
225
+ *
226
+ * @defaultValue `false`
227
+ */
228
+ experimentalObservability?: boolean;
229
+ /**
230
+ * Enforce a minimum length of 32 bytes for
231
+ * `TURBO_REMOTE_CACHE_SIGNATURE_KEY` when `remoteCache.signature` is
232
+ * enabled. Short keys weaken the HMAC-SHA256 signature, making brute-force
233
+ * tag collision feasible.
234
+ *
235
+ * @defaultValue `false`
236
+ */
237
+ longerSignatureKey?: boolean;
238
+ /**
239
+ * Use task-level `inputs` globs to determine which tasks are affected by
240
+ * changed files when running with `--affected`. When enabled, only tasks
241
+ * whose declared inputs match the changed files are selected, rather than
242
+ * selecting all tasks in changed packages.
243
+ *
244
+ * @defaultValue `false`
245
+ */
246
+ affectedUsingTaskInputs?: boolean;
247
+ /**
248
+ * Use task-level `inputs` globs to determine which tasks to re-run when
249
+ * files change in `turbo watch`. When enabled, only tasks whose declared
250
+ * inputs match the changed files are re-executed, rather than re-running
251
+ * all tasks in changed packages.
252
+ *
253
+ * @defaultValue `false`
254
+ */
255
+ watchUsingTaskInputs?: boolean;
256
+ /**
257
+ * Include files matching `globalDependencies` globs in the `turbo prune`
258
+ * output. Without this flag, `globalDependencies` entries are preserved in
259
+ * the pruned `turbo.json` but the actual files are not copied.
260
+ *
261
+ * @defaultValue `false`
262
+ */
263
+ pruneIncludesGlobalFiles?: boolean;
264
+ /**
265
+ * Resolve `--filter` at the task level instead of the package level.
266
+ * Git-range filters (e.g. `--filter=[main]`) will match against task
267
+ * `inputs` globs, and the `...` dependency/dependent syntax will
268
+ * traverse the task graph in addition to the package graph.
269
+ *
270
+ * @defaultValue `false`
271
+ */
272
+ filterUsingTasks?: boolean;
273
+ /**
274
+ * Move global configuration keys under a top-level `global` key.
275
+ *
276
+ * When enabled, keys like `globalDependencies`, `globalEnv`, `ui`,
277
+ * etc. must be placed inside the `global` block with new names:
278
+ * `globalDependencies` becomes `inputs`, `globalEnv` becomes `env`,
279
+ * and `globalPassThroughEnv` becomes `passThroughEnv`.
280
+ *
281
+ * @defaultValue `false`
282
+ */
283
+ globalConfiguration?: boolean;
284
+ }
285
+
286
+ export interface GlobalConfig {
287
+ /**
288
+ * A list of globs for files that implicitly affect all tasks.
289
+ *
290
+ * These files are prepended to every task's `inputs` instead of being
291
+ * included in the global hash. Tasks can exclude specific files via
292
+ * negation globs (e.g. `"inputs": ["$TURBO_DEFAULT$", "!$TURBO_ROOT$/tsconfig.json"]`).
293
+ *
294
+ * Replaces `globalDependencies` when `futureFlags.globalConfiguration` is enabled.
295
+ *
296
+ * @defaultValue `[]`
297
+ */
298
+ inputs?: Array<string>;
299
+
300
+ /**
301
+ * A list of environment variables for implicit global hash dependencies.
302
+ *
303
+ * Replaces `globalEnv` when `futureFlags.globalConfiguration` is enabled.
304
+ *
305
+ * @defaultValue `[]`
306
+ */
307
+ env?: Array<EnvWildcard>;
308
+
309
+ /**
310
+ * An allowlist of environment variables that should be made to all tasks, but
311
+ * should not contribute to the task's cache key.
312
+ *
313
+ * Replaces `globalPassThroughEnv` when `futureFlags.globalConfiguration` is enabled.
314
+ *
315
+ * @defaultValue `null`
316
+ */
317
+ passThroughEnv?: null | Array<EnvWildcard>;
318
+
319
+ /**
320
+ * Configuration options that control how turbo interfaces with the remote cache.
321
+ *
322
+ * Documentation: https://turborepo.dev/docs/core-concepts/remote-caching
323
+ *
324
+ * @defaultValue `{}`
325
+ */
326
+ remoteCache?: RemoteCache;
327
+
328
+ /**
329
+ * Enable use of the UI for `turbo`.
330
+ *
331
+ * Documentation: https://turborepo.dev/docs/reference/configuration#ui
332
+ *
333
+ * @defaultValue `"stream"`
334
+ */
335
+ ui?: UI;
336
+
337
+ /**
338
+ * Set/limit the maximum concurrency for task execution.
339
+ *
340
+ * Documentation: https://turborepo.dev/docs/reference/configuration#concurrency
341
+ *
342
+ * @defaultValue `"10"`
343
+ */
344
+ concurrency?: string;
345
+
346
+ /**
347
+ * Disable check for `packageManager` in root `package.json`.
348
+ *
349
+ * @defaultValue `false`
350
+ */
351
+ dangerouslyDisablePackageManagerCheck?: boolean;
352
+
353
+ /**
354
+ * Specify the filesystem cache directory.
355
+ *
356
+ * Documentation: https://turborepo.dev/docs/reference/configuration#cachedir
357
+ *
358
+ * @defaultValue `".turbo/cache"`
359
+ */
360
+ cacheDir?: RelativeUnixPath;
361
+
362
+ /**
363
+ * Deprecated: The daemon is no longer used for `turbo run`.
364
+ *
365
+ * @defaultValue `false`
366
+ */
367
+ daemon?: boolean;
368
+
369
+ /**
370
+ * Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime.
371
+ *
372
+ * Documentation: https://turborepo.dev/docs/reference/configuration#envmode
373
+ *
374
+ * @defaultValue `"strict"`
375
+ */
376
+ envMode?: EnvMode;
377
+
378
+ /**
379
+ * When set to `true`, disables the update notification.
380
+ *
381
+ * @defaultValue `false`
382
+ */
383
+ noUpdateNotifier?: boolean;
384
+ }
385
+
386
+ export interface Pipeline {
387
+ /**
388
+ * A human-readable description of what this task does.
389
+ *
390
+ * This field is for documentation purposes only and does not affect
391
+ * task execution or caching behavior.
392
+ */
393
+ description?: string;
394
+
395
+ /**
396
+ * The list of tasks that this task depends on.
397
+ *
398
+ * Prefixing an item in dependsOn with a ^ prefix tells turbo that this task depends
399
+ * on the package's topological dependencies completing the task first.
400
+ * (e.g. "A package's build tasks should only run once all of its workspace dependencies
401
+ * have completed their own build commands.")
402
+ *
403
+ * Items in dependsOn without a ^ prefix express the relationships between tasks within the
404
+ * same package (e.g. "A package's test and lint commands depend on its own build being
405
+ * completed first.")
406
+ *
407
+ * Documentation: https://turborepo.dev/docs/reference/configuration#dependson
408
+ *
409
+ * @defaultValue `[]`
410
+ */
411
+ dependsOn?: Array<string>;
412
+
413
+ /**
414
+ * A list of environment variables that this task depends on.
415
+ *
416
+ * Note: If you are migrating from a turbo version 1.5 or below,
417
+ * you may be used to prefixing your variables with a $.
418
+ * You no longer need to use the $ prefix.
419
+ * (e.g. $GITHUB_TOKEN → GITHUB_TOKEN)
420
+ *
421
+ * Documentation: https://turborepo.dev/docs/reference/configuration#env
422
+ *
423
+ * @defaultValue `[]`
424
+ */
425
+ env?: Array<EnvWildcard>;
426
+
427
+ /**
428
+ * An allowlist of environment variables that should be made available in this
429
+ * task's environment, but should not contribute to the task's cache key,
430
+ * e.g. `AWS_SECRET_KEY`.
431
+ *
432
+ * Documentation: https://turborepo.dev/docs/reference/configuration#passthroughenv
433
+ *
434
+ * @defaultValue `null`
435
+ */
436
+ passThroughEnv?: null | Array<EnvWildcard>;
437
+
438
+ /**
439
+ * The set of glob patterns indicating a task's cacheable filesystem outputs.
440
+ *
441
+ * Turborepo captures task logs for all tasks. This enables us to cache tasks whose runs
442
+ * produce no artifacts other than logs (such as linters). Logs are always treated as a
443
+ * cacheable artifact and never need to be specified.
444
+ *
445
+ * Documentation: https://turborepo.dev/docs/reference/configuration#outputs
446
+ *
447
+ * @defaultValue `[]`
448
+ */
449
+ outputs?: Array<string>;
450
+
451
+ /**
452
+ * Whether or not to cache the outputs of the task.
453
+ *
454
+ * Setting cache to false is useful for long-running "watch" or development mode tasks.
455
+ *
456
+ * Documentation: https://turborepo.dev/docs/reference/configuration#cache
457
+ *
458
+ * @defaultValue `true`
459
+ */
460
+ cache?: boolean;
461
+
462
+ /**
463
+ * The set of glob patterns to consider as inputs to this task.
464
+ *
465
+ * Changes to files covered by these globs will cause a cache miss and
466
+ * the task will be rerun.
467
+ *
468
+ * If a file has been changed that is **not** included in the set of globs,
469
+ * it will not cause a cache miss.
470
+ *
471
+ * If omitted or empty, all files in the package are considered as inputs.
472
+ *
473
+ * Documentation: https://turborepo.dev/docs/reference/configuration#inputs
474
+ *
475
+ * @defaultValue `[]`
476
+ */
477
+ inputs?: Array<string>;
478
+
479
+ /**
480
+ * Output mode for the task.
481
+ *
482
+ * "full": Displays all output
483
+ *
484
+ * "hash-only": Show only the hashes of the tasks
485
+ *
486
+ * "new-only": Only show output from cache misses
487
+ *
488
+ * "errors-only": Only show output from task failures
489
+ *
490
+ * "none": Hides all task output
491
+ *
492
+ * Documentation: https://turborepo.dev/docs/reference/run#--output-logs-option
493
+ *
494
+ * @defaultValue `"full"`
495
+ */
496
+ outputLogs?: OutputLogs;
497
+
498
+ /**
499
+ * Indicates whether the task exits or not. Setting `persistent` to `true` tells
500
+ * turbo that this is a long-running task and will ensure that other tasks
501
+ * cannot depend on it.
502
+ *
503
+ * Documentation: https://turborepo.dev/docs/reference/configuration#persistent
504
+ *
505
+ * @defaultValue `false`
506
+ */
507
+ persistent?: boolean;
508
+
509
+ /**
510
+ * Mark a task as interactive allowing it to receive input from stdin.
511
+ * Interactive tasks must be marked with "cache": false as the input
512
+ * they receive from stdin can change the outcome of the task.
513
+ *
514
+ * Documentation: https://turborepo.dev/docs/reference/configuration#interactive
515
+ *
516
+ * @defaultValue `false`
517
+ */
518
+ interactive?: boolean;
519
+
520
+ /**
521
+ * Label a persistent task as interruptible to allow it to be restarted by `turbo watch`.
522
+ * `turbo watch` watches for changes to your packages and automatically
523
+ * restarts tasks that are affected. However, if a task is persistent, it will
524
+ * not be restarted by default. To enable restarting persistent tasks, set
525
+ * `interruptible` to true.
526
+ *
527
+ * Documentation: https://turborepo.dev/docs/reference/configuration#interruptible
528
+ *
529
+ * @defaultValue `false`
530
+ */
531
+ interruptible?: boolean;
532
+
533
+ /**
534
+ * A list of tasks that will run alongside this task.
535
+ *
536
+ * Tasks in this list will not be run until completion before this task starts execution.
537
+ *
538
+ * Documentation: https://turborepo.dev/docs/reference/configuration#with
539
+ *
540
+ * @defaultValue `[]`
541
+ */
542
+ with?: Array<string>;
543
+ }
544
+
545
+ export interface RemoteCache {
546
+ /**
547
+ * Indicates if signature verification is enabled for requests to the remote cache. When
548
+ * `true`, Turborepo will sign every uploaded artifact using the value of the environment
549
+ * variable `TURBO_REMOTE_CACHE_SIGNATURE_KEY`. Turborepo will reject any downloaded artifacts
550
+ * that have an invalid signature or are missing a signature.
551
+ *
552
+ * @defaultValue `false`
553
+ */
554
+ signature?: boolean;
555
+
556
+ /**
557
+ * Indicates if the remote cache is enabled. When `false`, Turborepo will disable
558
+ * all remote cache operations, even if the repo has a valid token. If true, remote caching
559
+ * is enabled, but still requires the user to login and link their repo to a remote cache.
560
+ * Documentation: https://turborepo.dev/docs/core-concepts/remote-caching
561
+ *
562
+ * @defaultValue `true`
563
+ */
564
+ enabled?: boolean;
565
+
566
+ /**
567
+ * When enabled, any HTTP request will be preceded by an OPTIONS request to
568
+ * determine if the request is supported by the endpoint.
569
+ *
570
+ * Documentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests
571
+ *
572
+ * @defaultValue `false`
573
+ */
574
+ preflight?: boolean;
575
+ /**
576
+ * Set endpoint for API calls to the remote cache.
577
+ * Documentation: https://turborepo.dev/docs/core-concepts/remote-caching#self-hosting
578
+ *
579
+ * @defaultValue `"https://vercel.com/api"`
580
+ */
581
+ apiUrl?: string;
582
+ /**
583
+ * Set endpoint for requesting tokens during `turbo login`.
584
+ * Documentation: https://turborepo.dev/docs/core-concepts/remote-caching#self-hosting
585
+ *
586
+ * @defaultValue `"https://vercel.com"`
587
+ */
588
+ loginUrl?: string;
589
+ /**
590
+ * Sets a timeout for remote cache operations. Value is given in seconds and
591
+ * only whole values are accepted. If `0` is passed, then there is no timeout
592
+ * for any cache operations.
593
+ *
594
+ * @defaultValue `30`
595
+ */
596
+ timeout?: number;
597
+ /**
598
+ * Sets a timeout for remote cache uploads. Value is given in seconds and
599
+ * only whole values are accepted. If `0` is passed, then there is no timeout
600
+ * for any remote cache uploads.
601
+ *
602
+ * @defaultValue `60`
603
+ */
604
+ uploadTimeout?: number;
605
+
606
+ /**
607
+ * The ID of the Remote Cache team. Value will be passed as `teamId` in the
608
+ * querystring for all Remote Cache HTTP calls. Must start with `team_` or it will
609
+ * not be used.
610
+ */
611
+ teamId?: string;
612
+
613
+ /**
614
+ * The slug of the Remote Cache team. Value will be passed as `slug` in the
615
+ * querystring for all Remote Cache HTTP calls.
616
+ */
617
+ teamSlug?: string;
618
+ }
619
+
620
+ export interface Permissions {
621
+ /**
622
+ * Lists which tags are allowed. Any tag not included will be banned
623
+ * If omitted, all tags are permitted
624
+ */
625
+ allow?: Array<string>;
626
+ /**
627
+ * Lists which tags are banned.
628
+ */
629
+ deny?: Array<string>;
630
+ }
631
+
632
+ interface TagRules {
633
+ /**
634
+ * Rules for a tag's dependencies. Restricts which packages a tag can import
635
+ */
636
+ dependencies?: Permissions;
637
+ /**
638
+ * Rules for a tag's dependents. Restricts which packages can import this tag.
639
+ */
640
+ dependents?: Permissions;
641
+ }
642
+
643
+ export type BoundariesRulesMap = Record<string, TagRules>;
644
+
645
+ export interface BoundariesConfig {
646
+ /**
647
+ * Declares any implicit dependencies, i.e. any dependency not declared in a package.json.
648
+ * These can include dependencies automatically injected by a framework or a testing library.
649
+ */
650
+ implicitDependencies?: Array<string>;
651
+ }
652
+
653
+ export interface RootBoundariesConfig extends BoundariesConfig {
654
+ /**
655
+ * The boundaries rules for tags. Restricts which packages
656
+ * can import a tag and which packages a tag can import
657
+ */
658
+ tags?: BoundariesRulesMap;
659
+ }
660
+
661
+ export const isRootSchemaV2 = (schema: Schema): schema is RootSchema =>
662
+ !("extends" in schema);
663
+
664
+ export const isWorkspaceSchemaV2 = (
665
+ schema: Schema
666
+ ): schema is WorkspaceSchema => !isRootSchemaV2(schema);
667
+
668
+ export type Schema = RootSchema | WorkspaceSchema;
@@ -190,6 +190,15 @@ export interface RootSchema extends BaseSchema {
190
190
  */
191
191
  noUpdateNotifier?: boolean;
192
192
 
193
+ /**
194
+ * Global configuration block.
195
+ *
196
+ * When `futureFlags.globalConfiguration` is enabled, global settings
197
+ * like `inputs`, `env`, `ui`, etc. are placed here instead of at the
198
+ * top level.
199
+ */
200
+ global?: GlobalConfig;
201
+
193
202
  /**
194
203
  * Opt into breaking changes prior to major releases, experimental features, and beta features.
195
204
  *
@@ -261,6 +270,117 @@ export interface FutureFlags {
261
270
  * @defaultValue `false`
262
271
  */
263
272
  filterUsingTasks?: boolean;
273
+ /**
274
+ * Move global configuration keys under a top-level `global` key.
275
+ *
276
+ * When enabled, keys like `globalDependencies`, `globalEnv`, `ui`,
277
+ * etc. must be placed inside the `global` block with new names:
278
+ * `globalDependencies` becomes `inputs`, `globalEnv` becomes `env`,
279
+ * and `globalPassThroughEnv` becomes `passThroughEnv`.
280
+ *
281
+ * @defaultValue `false`
282
+ */
283
+ globalConfiguration?: boolean;
284
+ }
285
+
286
+ export interface GlobalConfig {
287
+ /**
288
+ * A list of globs for files that implicitly affect all tasks.
289
+ *
290
+ * These files are prepended to every task's `inputs` instead of being
291
+ * included in the global hash. Tasks can exclude specific files via
292
+ * negation globs (e.g. `"inputs": ["$TURBO_DEFAULT$", "!$TURBO_ROOT$/tsconfig.json"]`).
293
+ *
294
+ * Replaces `globalDependencies` when `futureFlags.globalConfiguration` is enabled.
295
+ *
296
+ * @defaultValue `[]`
297
+ */
298
+ inputs?: Array<string>;
299
+
300
+ /**
301
+ * A list of environment variables for implicit global hash dependencies.
302
+ *
303
+ * Replaces `globalEnv` when `futureFlags.globalConfiguration` is enabled.
304
+ *
305
+ * @defaultValue `[]`
306
+ */
307
+ env?: Array<EnvWildcard>;
308
+
309
+ /**
310
+ * An allowlist of environment variables that should be made to all tasks, but
311
+ * should not contribute to the task's cache key.
312
+ *
313
+ * Replaces `globalPassThroughEnv` when `futureFlags.globalConfiguration` is enabled.
314
+ *
315
+ * @defaultValue `null`
316
+ */
317
+ passThroughEnv?: null | Array<EnvWildcard>;
318
+
319
+ /**
320
+ * Configuration options that control how turbo interfaces with the remote cache.
321
+ *
322
+ * Documentation: https://turborepo.dev/docs/core-concepts/remote-caching
323
+ *
324
+ * @defaultValue `{}`
325
+ */
326
+ remoteCache?: RemoteCache;
327
+
328
+ /**
329
+ * Enable use of the UI for `turbo`.
330
+ *
331
+ * Documentation: https://turborepo.dev/docs/reference/configuration#ui
332
+ *
333
+ * @defaultValue `"stream"`
334
+ */
335
+ ui?: UI;
336
+
337
+ /**
338
+ * Set/limit the maximum concurrency for task execution.
339
+ *
340
+ * Documentation: https://turborepo.dev/docs/reference/configuration#concurrency
341
+ *
342
+ * @defaultValue `"10"`
343
+ */
344
+ concurrency?: string;
345
+
346
+ /**
347
+ * Disable check for `packageManager` in root `package.json`.
348
+ *
349
+ * @defaultValue `false`
350
+ */
351
+ dangerouslyDisablePackageManagerCheck?: boolean;
352
+
353
+ /**
354
+ * Specify the filesystem cache directory.
355
+ *
356
+ * Documentation: https://turborepo.dev/docs/reference/configuration#cachedir
357
+ *
358
+ * @defaultValue `".turbo/cache"`
359
+ */
360
+ cacheDir?: RelativeUnixPath;
361
+
362
+ /**
363
+ * Deprecated: The daemon is no longer used for `turbo run`.
364
+ *
365
+ * @defaultValue `false`
366
+ */
367
+ daemon?: boolean;
368
+
369
+ /**
370
+ * Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime.
371
+ *
372
+ * Documentation: https://turborepo.dev/docs/reference/configuration#envmode
373
+ *
374
+ * @defaultValue `"strict"`
375
+ */
376
+ envMode?: EnvMode;
377
+
378
+ /**
379
+ * When set to `true`, disables the update notification.
380
+ *
381
+ * @defaultValue `false`
382
+ */
383
+ noUpdateNotifier?: boolean;
264
384
  }
265
385
 
266
386
  export interface Pipeline {