diff --git a/packages/turbo-types/package.json b/packages/turbo-types/package.json index 722626da7b877..331fd5c39900c 100644 --- a/packages/turbo-types/package.json +++ b/packages/turbo-types/package.json @@ -18,12 +18,14 @@ "build": "tsc && pnpm generate-schema", "lint": "eslint src/", "lint:prettier": "prettier -c . --cache", - "generate-schema": "node scripts/generate-schema.mjs" + "generate-schema": "tsx scripts/generate-schema.ts" }, "devDependencies": { "@turbo/eslint-config": "workspace:*", "@turbo/tsconfig": "workspace:*", - "ts-json-schema-generator": "2.3.0" + "@types/node": "^20", + "ts-json-schema-generator": "2.3.0", + "tsx": "^4.19.0" }, "files": [ "src", diff --git a/packages/turbo-types/schemas/schema.json b/packages/turbo-types/schemas/schema.json index 1ecea772ae15b..a9cb513e7a1c1 100644 --- a/packages/turbo-types/schemas/schema.json +++ b/packages/turbo-types/schemas/schema.json @@ -16,7 +16,8 @@ "type": "object", "properties": { "$schema": { - "type": "string" + "type": "string", + "default": "https://turbo.build/schema.v2.json" }, "tasks": { "type": "object", @@ -24,21 +25,24 @@ "$ref": "#/definitions/Pipeline", "description": "The name of a task that can be executed by turbo. If turbo finds a workspace package with a package.json scripts object with a matching key, it will apply the pipeline task configuration to that npm script during execution." }, - "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks" + "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks", + "default": {} }, "globalDependencies": { "type": "array", "items": { "type": "string" }, - "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:\n\n- .env files (not in Git)\n\n- 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.js, .eslintrc, etc.)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globaldependencies" + "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:\n\n- .env files (not in Git)\n\n- 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.js, .eslintrc, etc.)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globaldependencies", + "default": [] }, "globalEnv": { "type": "array", "items": { "$ref": "#/definitions/EnvWildcard" }, - "description": "A list of environment variables for implicit global hash dependencies.\n\nThe variables included in this list will affect all task hashes.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalenv" + "description": "A list of environment variables for implicit global hash dependencies.\n\nThe variables included in this list will affect all task hashes.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalenv", + "default": [] }, "globalPassThroughEnv": { "anyOf": [ @@ -52,31 +56,38 @@ } } ], - "description": "An allowlist of environment variables that should be made to all tasks, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalpassthroughenv" + "description": "An allowlist of environment variables that should be made to all tasks, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalpassthroughenv", + "default": null }, "remoteCache": { "$ref": "#/definitions/RemoteCache", - "description": "Configuration options that control how turbo interfaces with the remote cache.\n\nDocumentation: https://turbo.build/repo/docs/core-concepts/remote-caching" + "description": "Configuration options that control how turbo interfaces with the remote cache.\n\nDocumentation: https://turbo.build/repo/docs/core-concepts/remote-caching", + "default": {} }, "ui": { "$ref": "#/definitions/UI", - "description": "Enable use of the UI for `turbo`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#ui" + "description": "Enable use of the UI for `turbo`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#ui", + "default": "stream" }, "dangerouslyDisablePackageManagerCheck": { "type": "boolean", - "description": "Disable check for `packageManager` in root `package.json`\n\nThis is highly discouraged as it leaves `turbo` dependent on system configuration to infer the correct package manager.\n\nSome turbo features are disabled if this is set to true." + "description": "Disable check for `packageManager` in root `package.json`\n\nThis is highly discouraged as it leaves `turbo` dependent on system configuration to infer the correct package manager.\n\nSome turbo features are disabled if this is set to true.", + "default": false }, "cacheDir": { "$ref": "#/definitions/RelativeUnixPath", - "description": "Specify the filesystem cache directory.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cachedir" + "description": "Specify the filesystem cache directory.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cachedir", + "default": ".turbo/cache" }, "daemon": { "type": "boolean", - "description": "Turborepo runs a background process to pre-calculate some expensive operations. This standalone process (daemon) is a performance optimization, and not required for proper functioning of `turbo`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#daemon" + "description": "Turborepo runs a background process to pre-calculate some expensive operations. This standalone process (daemon) is a performance optimization, and not required for proper functioning of `turbo`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#daemon", + "default": false }, "envMode": { "$ref": "#/definitions/EnvMode", - "description": "Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime:\n\n- `\"strict\"`: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`.\n- `\"loose\"`: Allow all environment variables for the process to be available.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#envmode" + "description": "Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime:\n\n- `\"strict\"`: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`.\n- `\"loose\"`: Allow all environment variables for the process to be available.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#envmode", + "default": "strict" } }, "additionalProperties": false, @@ -92,14 +103,16 @@ "items": { "type": "string" }, - "description": "The list of tasks that this task depends on.\n\nPrefixing an item in dependsOn with a ^ prefix tells turbo that this task depends on the package's topological dependencies completing the task first. (e.g. \"A package's build tasks should only run once all of its workspace dependencies have completed their own build commands.\")\n\nItems in dependsOn without a ^ prefix express the relationships between tasks within the same package (e.g. \"A package's test and lint commands depend on its own build being completed first.\")\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#dependson" + "description": "The list of tasks that this task depends on.\n\nPrefixing an item in dependsOn with a ^ prefix tells turbo that this task depends on the package's topological dependencies completing the task first. (e.g. \"A package's build tasks should only run once all of its workspace dependencies have completed their own build commands.\")\n\nItems in dependsOn without a ^ prefix express the relationships between tasks within the same package (e.g. \"A package's test and lint commands depend on its own build being completed first.\")\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#dependson", + "default": [] }, "env": { "type": "array", "items": { "$ref": "#/definitions/EnvWildcard" }, - "description": "A list of environment variables that this task depends on.\n\nNote: If you are migrating from a turbo version 1.5 or below, you may be used to prefixing your variables with a $. You no longer need to use the $ prefix. (e.g. $GITHUB_TOKEN → GITHUB_TOKEN)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#env" + "description": "A list of environment variables that this task depends on.\n\nNote: If you are migrating from a turbo version 1.5 or below, you may be used to prefixing your variables with a $. You no longer need to use the $ prefix. (e.g. $GITHUB_TOKEN → GITHUB_TOKEN)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#env", + "default": [] }, "passThroughEnv": { "anyOf": [ @@ -113,37 +126,44 @@ } } ], - "description": "An allowlist of environment variables that should be made available in this task's environment, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#passthroughenv" + "description": "An allowlist of environment variables that should be made available in this task's environment, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#passthroughenv", + "default": null }, "outputs": { "type": "array", "items": { "type": "string" }, - "description": "The set of glob patterns indicating a task's cacheable filesystem outputs.\n\nTurborepo captures task logs for all tasks. This enables us to cache tasks whose runs produce no artifacts other than logs (such as linters). Logs are always treated as a cacheable artifact and never need to be specified.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#outputs" + "description": "The set of glob patterns indicating a task's cacheable filesystem outputs.\n\nTurborepo captures task logs for all tasks. This enables us to cache tasks whose runs produce no artifacts other than logs (such as linters). Logs are always treated as a cacheable artifact and never need to be specified.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#outputs", + "default": [] }, "cache": { "type": "boolean", - "description": "Whether or not to cache the outputs of the task.\n\nSetting cache to false is useful for long-running \"watch\" or development mode tasks.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cache" + "description": "Whether or not to cache the outputs of the task.\n\nSetting cache to false is useful for long-running \"watch\" or development mode tasks.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cache", + "default": true }, "inputs": { "type": "array", "items": { "type": "string" }, - "description": "The set of glob patterns to consider as inputs to this task.\n\nChanges to files covered by these globs will cause a cache miss and the task will be rerun.\n\nIf a file has been changed that is **not** included in the set of globs, it will not cause a cache miss.\n\nIf omitted or empty, all files in the package are considered as inputs.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#inputs" + "description": "The set of glob patterns to consider as inputs to this task.\n\nChanges to files covered by these globs will cause a cache miss and the task will be rerun.\n\nIf a file has been changed that is **not** included in the set of globs, it will not cause a cache miss.\n\nIf omitted or empty, all files in the package are considered as inputs.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#inputs", + "default": [] }, "outputLogs": { "$ref": "#/definitions/OutputLogs", - "description": "Output mode for the task.\n\n\"full\": Displays all output\n\n\"hash-only\": Show only the hashes of the tasks\n\n\"new-only\": Only show output from cache misses\n\n\"errors-only\": Only show output from task failures\n\n\"none\": Hides all task output\n\nDocumentation: https://turbo.build/repo/docs/reference/run#--output-logs-option" + "description": "Output mode for the task.\n\n\"full\": Displays all output\n\n\"hash-only\": Show only the hashes of the tasks\n\n\"new-only\": Only show output from cache misses\n\n\"errors-only\": Only show output from task failures\n\n\"none\": Hides all task output\n\nDocumentation: https://turbo.build/repo/docs/reference/run#--output-logs-option", + "default": "full" }, "persistent": { "type": "boolean", - "description": "Indicates whether the task exits or not. Setting `persistent` to `true` tells turbo that this is a long-running task and will ensure that other tasks cannot depend on it.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#persistent" + "description": "Indicates whether the task exits or not. Setting `persistent` to `true` tells turbo that this is a long-running task and will ensure that other tasks cannot depend on it.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#persistent", + "default": false }, "interactive": { "type": "boolean", - "description": "Mark a task as interactive allowing it to receive input from stdin. Interactive tasks must be marked with \"cache\": false as the input they receive from stdin can change the outcome of the task.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#interactive" + "description": "Mark a task as interactive allowing it to receive input from stdin. Interactive tasks must be marked with \"cache\": false as the input they receive from stdin can change the outcome of the task.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#interactive", + "default": false } }, "additionalProperties": false @@ -166,27 +186,33 @@ "properties": { "signature": { "type": "boolean", - "description": "Indicates if signature verification is enabled for requests to the remote cache. When `true`, Turborepo will sign every uploaded artifact using the value of the environment variable `TURBO_REMOTE_CACHE_SIGNATURE_KEY`. Turborepo will reject any downloaded artifacts that have an invalid signature or are missing a signature." + "description": "Indicates if signature verification is enabled for requests to the remote cache. When `true`, Turborepo will sign every uploaded artifact using the value of the environment variable `TURBO_REMOTE_CACHE_SIGNATURE_KEY`. Turborepo will reject any downloaded artifacts that have an invalid signature or are missing a signature.", + "default": false }, "enabled": { "type": "boolean", - "description": "Indicates if the remote cache is enabled. When `false`, Turborepo will disable all remote cache operations, even if the repo has a valid token. If true, remote caching is enabled, but still requires the user to login and link their repo to a remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching" + "description": "Indicates if the remote cache is enabled. When `false`, Turborepo will disable all remote cache operations, even if the repo has a valid token. If true, remote caching is enabled, but still requires the user to login and link their repo to a remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching", + "default": true }, "preflight": { "type": "boolean", - "description": "When enabled, any HTTP request will be preceded by an OPTIONS request to determine if the request is supported by the endpoint.\n\nDocumentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests" + "description": "When enabled, any HTTP request will be preceded by an OPTIONS request to determine if the request is supported by the endpoint.\n\nDocumentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests", + "default": false }, "apiUrl": { "type": "string", - "description": "Set endpoint for API calls to the remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting" + "description": "Set endpoint for API calls to the remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting", + "default": "https://vercel.com/api" }, "loginUrl": { "type": "string", - "description": "Set endpoint for requesting tokens during `turbo login`. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting" + "description": "Set endpoint for requesting tokens during `turbo login`. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting", + "default": "https://vercel.com" }, "timeout": { "type": "number", - "description": "Sets a timeout for remote cache operations. Value is given in seconds and only whole values are accepted. If `0` is passed, then there is no timeout for any cache operations." + "description": "Sets a timeout for remote cache operations. Value is given in seconds and only whole values are accepted. If `0` is passed, then there is no timeout for any cache operations.", + "default": 30 } }, "additionalProperties": false @@ -213,7 +239,8 @@ "type": "object", "properties": { "$schema": { - "type": "string" + "type": "string", + "default": "https://turbo.build/schema.v2.json" }, "tasks": { "type": "object", @@ -221,14 +248,18 @@ "$ref": "#/definitions/Pipeline", "description": "The name of a task that can be executed by turbo. If turbo finds a workspace package with a package.json scripts object with a matching key, it will apply the pipeline task configuration to that npm script during execution." }, - "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks" + "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks", + "default": {} }, "extends": { "type": "array", "items": { "type": "string" }, - "description": "This key is only available in Workspace Configs and cannot be used in your root turbo.json.\n\nTells turbo to extend your root `turbo.json` and overrides with the keys provided in your Workspace Configs.\n\nCurrently, only the \"//\" value is allowed." + "description": "This key is only available in Workspace Configs and cannot be used in your root turbo.json.\n\nTells turbo to extend your root `turbo.json` and overrides with the keys provided in your Workspace Configs.\n\nCurrently, only the \"//\" value is allowed.", + "default": [ + "//" + ] } }, "required": [ diff --git a/packages/turbo-types/schemas/schema.v1.json b/packages/turbo-types/schemas/schema.v1.json index ae3f1e5e83d56..eba389b8be596 100644 --- a/packages/turbo-types/schemas/schema.v1.json +++ b/packages/turbo-types/schemas/schema.v1.json @@ -16,7 +16,8 @@ "type": "object", "properties": { "$schema": { - "type": "string" + "type": "string", + "default": "https://turbo.build/schema.v1.json" }, "pipeline": { "type": "object", @@ -24,14 +25,18 @@ "$ref": "#/definitions/PipelineV1", "description": "The name of a task that can be executed by turbo. If turbo finds a workspace package with a package.json scripts object with a matching key, it will apply the pipeline task configuration to that npm script during execution." }, - "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks" + "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks", + "default": {} }, "extends": { "type": "array", "items": { "type": "string" }, - "description": "This key is only available in Workspace Configs and cannot be used in your root turbo.json.\n\nTells turbo to extend your root `turbo.json` and overrides with the keys provided in your Workspace Configs.\n\nCurrently, only the \"//\" value is allowed." + "description": "This key is only available in Workspace Configs and cannot be used in your root turbo.json.\n\nTells turbo to extend your root `turbo.json` and overrides with the keys provided in your Workspace Configs.\n\nCurrently, only the \"//\" value is allowed.", + "default": [ + "//" + ] } }, "required": [ @@ -48,14 +53,16 @@ "items": { "type": "string" }, - "description": "The list of tasks that this task depends on.\n\nPrefixing an item in dependsOn with a ^ prefix tells turbo that this task depends on the package's topological dependencies completing the task first. (e.g. \"A package's build tasks should only run once all of its workspace dependencies have completed their own build commands.\")\n\nItems in dependsOn without a ^ prefix express the relationships between tasks within the same package (e.g. \"A package's test and lint commands depend on its own build being completed first.\")\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#dependson" + "description": "The list of tasks that this task depends on.\n\nPrefixing an item in dependsOn with a ^ prefix tells turbo that this task depends on the package's topological dependencies completing the task first. (e.g. \"A package's build tasks should only run once all of its workspace dependencies have completed their own build commands.\")\n\nItems in dependsOn without a ^ prefix express the relationships between tasks within the same package (e.g. \"A package's test and lint commands depend on its own build being completed first.\")\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#dependson", + "default": [] }, "env": { "type": "array", "items": { "$ref": "#/definitions/EnvWildcardV1" }, - "description": "A list of environment variables that this task depends on.\n\nNote: If you are migrating from a turbo version 1.5 or below, you may be used to prefixing your variables with a $. You no longer need to use the $ prefix. (e.g. $GITHUB_TOKEN → GITHUB_TOKEN)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#env" + "description": "A list of environment variables that this task depends on.\n\nNote: If you are migrating from a turbo version 1.5 or below, you may be used to prefixing your variables with a $. You no longer need to use the $ prefix. (e.g. $GITHUB_TOKEN → GITHUB_TOKEN)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#env", + "default": [] }, "passThroughEnv": { "anyOf": [ @@ -69,7 +76,8 @@ } } ], - "description": "An allowlist of environment variables that should be made available in this task's environment, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#passthroughenv" + "description": "An allowlist of environment variables that should be made available in this task's environment, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#passthroughenv", + "default": null }, "dotEnv": { "anyOf": [ @@ -83,37 +91,44 @@ } } ], - "description": "A priority-ordered (most-significant to least-significant) array of workspace-anchored Unix-style paths to `.env` files to include in the task hash." + "description": "A priority-ordered (most-significant to least-significant) array of workspace-anchored Unix-style paths to `.env` files to include in the task hash.", + "default": null }, "outputs": { "type": "array", "items": { "type": "string" }, - "description": "The set of glob patterns indicating a task's cacheable filesystem outputs.\n\nTurborepo captures task logs for all tasks. This enables us to cache tasks whose runs produce no artifacts other than logs (such as linters). Logs are always treated as a cacheable artifact and never need to be specified.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#outputs" + "description": "The set of glob patterns indicating a task's cacheable filesystem outputs.\n\nTurborepo captures task logs for all tasks. This enables us to cache tasks whose runs produce no artifacts other than logs (such as linters). Logs are always treated as a cacheable artifact and never need to be specified.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#outputs", + "default": [] }, "cache": { "type": "boolean", - "description": "Whether or not to cache the outputs of the task.\n\nSetting cache to false is useful for long-running \"watch\" or development mode tasks.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cache" + "description": "Whether or not to cache the outputs of the task.\n\nSetting cache to false is useful for long-running \"watch\" or development mode tasks.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cache", + "default": true }, "inputs": { "type": "array", "items": { "type": "string" }, - "description": "The set of glob patterns to consider as inputs to this task.\n\nChanges to files covered by these globs will cause a cache miss and the task will be rerun.\n\nIf a file has been changed that is **not** included in the set of globs, it will not cause a cache miss.\n\nIf omitted or empty, all files in the package are considered as inputs.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#inputs" + "description": "The set of glob patterns to consider as inputs to this task.\n\nChanges to files covered by these globs will cause a cache miss and the task will be rerun.\n\nIf a file has been changed that is **not** included in the set of globs, it will not cause a cache miss.\n\nIf omitted or empty, all files in the package are considered as inputs.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#inputs", + "default": [] }, "outputMode": { "$ref": "#/definitions/OutputModeV1", - "description": "Output mode for the task.\n\n\"full\": Displays all output\n\n\"hash-only\": Show only the hashes of the tasks\n\n\"new-only\": Only show output from cache misses\n\n\"errors-only\": Only show output from task failures\n\n\"none\": Hides all task output\n\nDocumentation: https://turbo.build/repo/docs/reference/run#--output-logs-option" + "description": "Output mode for the task.\n\n\"full\": Displays all output\n\n\"hash-only\": Show only the hashes of the tasks\n\n\"new-only\": Only show output from cache misses\n\n\"errors-only\": Only show output from task failures\n\n\"none\": Hides all task output\n\nDocumentation: https://turbo.build/repo/docs/reference/run#--output-logs-option", + "default": "full" }, "persistent": { "type": "boolean", - "description": "Indicates whether the task exits or not. Setting `persistent` to `true` tells turbo that this is a long-running task and will ensure that other tasks cannot depend on it.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#persistent" + "description": "Indicates whether the task exits or not. Setting `persistent` to `true` tells turbo that this is a long-running task and will ensure that other tasks cannot depend on it.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#persistent", + "default": false }, "interactive": { "type": "boolean", - "description": "Mark a task as interactive allowing it to receive input from stdin. Interactive tasks must be marked with \"cache\": false as the input they receive from stdin can change the outcome of the task.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#interactive" + "description": "Mark a task as interactive allowing it to receive input from stdin. Interactive tasks must be marked with \"cache\": false as the input they receive from stdin can change the outcome of the task.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#interactive", + "default": false } }, "additionalProperties": false @@ -138,7 +153,8 @@ "type": "object", "properties": { "$schema": { - "type": "string" + "type": "string", + "default": "https://turbo.build/schema.v1.json" }, "pipeline": { "type": "object", @@ -146,21 +162,24 @@ "$ref": "#/definitions/PipelineV1", "description": "The name of a task that can be executed by turbo. If turbo finds a workspace package with a package.json scripts object with a matching key, it will apply the pipeline task configuration to that npm script during execution." }, - "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks" + "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks", + "default": {} }, "globalDependencies": { "type": "array", "items": { "type": "string" }, - "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:\n\n- .env files (not in Git)\n\n- 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.js, .eslintrc, etc.)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globaldependencies" + "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:\n\n- .env files (not in Git)\n\n- 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.js, .eslintrc, etc.)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globaldependencies", + "default": [] }, "globalEnv": { "type": "array", "items": { "$ref": "#/definitions/EnvWildcardV1" }, - "description": "A list of environment variables for implicit global hash dependencies.\n\nThe variables included in this list will affect all task hashes.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalenv" + "description": "A list of environment variables for implicit global hash dependencies.\n\nThe variables included in this list will affect all task hashes.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalenv", + "default": [] }, "globalPassThroughEnv": { "anyOf": [ @@ -174,7 +193,8 @@ } } ], - "description": "An allowlist of environment variables that should be made to all tasks, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalpassthroughenv" + "description": "An allowlist of environment variables that should be made to all tasks, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalpassthroughenv", + "default": null }, "globalDotEnv": { "anyOf": [ @@ -188,15 +208,18 @@ } } ], - "description": "A priority-ordered (most-significant to least-significant) array of project-anchored Unix-style paths to `.env` files to include in the global hash." + "description": "A priority-ordered (most-significant to least-significant) array of project-anchored Unix-style paths to `.env` files to include in the global hash.", + "default": null }, "remoteCache": { "$ref": "#/definitions/RemoteCacheV1", - "description": "Configuration options that control how turbo interfaces with the remote cache.\n\nDocumentation: https://turbo.build/repo/docs/core-concepts/remote-caching" + "description": "Configuration options that control how turbo interfaces with the remote cache.\n\nDocumentation: https://turbo.build/repo/docs/core-concepts/remote-caching", + "default": {} }, "experimentalUI": { "type": "boolean", - "description": "Enable use of the new UI for `turbo`\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#ui" + "description": "Enable use of the new UI for `turbo`\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#ui", + "default": false } }, "additionalProperties": false, @@ -209,11 +232,13 @@ "properties": { "signature": { "type": "boolean", - "description": "Indicates if signature verification is enabled for requests to the remote cache. When `true`, Turborepo will sign every uploaded artifact using the value of the environment variable `TURBO_REMOTE_CACHE_SIGNATURE_KEY`. Turborepo will reject any downloaded artifacts that have an invalid signature or are missing a signature." + "description": "Indicates if signature verification is enabled for requests to the remote cache. When `true`, Turborepo will sign every uploaded artifact using the value of the environment variable `TURBO_REMOTE_CACHE_SIGNATURE_KEY`. Turborepo will reject any downloaded artifacts that have an invalid signature or are missing a signature.", + "default": false }, "enabled": { "type": "boolean", - "description": "Indicates if the remote cache is enabled. When `false`, Turborepo will disable all remote cache operations, even if the repo has a valid token. If true, remote caching is enabled, but still requires the user to login and link their repo to a remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching" + "description": "Indicates if the remote cache is enabled. When `false`, Turborepo will disable all remote cache operations, even if the repo has a valid token. If true, remote caching is enabled, but still requires the user to login and link their repo to a remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching", + "default": true } }, "additionalProperties": false diff --git a/packages/turbo-types/schemas/schema.v2.json b/packages/turbo-types/schemas/schema.v2.json index 1ecea772ae15b..a9cb513e7a1c1 100644 --- a/packages/turbo-types/schemas/schema.v2.json +++ b/packages/turbo-types/schemas/schema.v2.json @@ -16,7 +16,8 @@ "type": "object", "properties": { "$schema": { - "type": "string" + "type": "string", + "default": "https://turbo.build/schema.v2.json" }, "tasks": { "type": "object", @@ -24,21 +25,24 @@ "$ref": "#/definitions/Pipeline", "description": "The name of a task that can be executed by turbo. If turbo finds a workspace package with a package.json scripts object with a matching key, it will apply the pipeline task configuration to that npm script during execution." }, - "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks" + "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks", + "default": {} }, "globalDependencies": { "type": "array", "items": { "type": "string" }, - "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:\n\n- .env files (not in Git)\n\n- 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.js, .eslintrc, etc.)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globaldependencies" + "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:\n\n- .env files (not in Git)\n\n- 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.js, .eslintrc, etc.)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globaldependencies", + "default": [] }, "globalEnv": { "type": "array", "items": { "$ref": "#/definitions/EnvWildcard" }, - "description": "A list of environment variables for implicit global hash dependencies.\n\nThe variables included in this list will affect all task hashes.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalenv" + "description": "A list of environment variables for implicit global hash dependencies.\n\nThe variables included in this list will affect all task hashes.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalenv", + "default": [] }, "globalPassThroughEnv": { "anyOf": [ @@ -52,31 +56,38 @@ } } ], - "description": "An allowlist of environment variables that should be made to all tasks, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalpassthroughenv" + "description": "An allowlist of environment variables that should be made to all tasks, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#globalpassthroughenv", + "default": null }, "remoteCache": { "$ref": "#/definitions/RemoteCache", - "description": "Configuration options that control how turbo interfaces with the remote cache.\n\nDocumentation: https://turbo.build/repo/docs/core-concepts/remote-caching" + "description": "Configuration options that control how turbo interfaces with the remote cache.\n\nDocumentation: https://turbo.build/repo/docs/core-concepts/remote-caching", + "default": {} }, "ui": { "$ref": "#/definitions/UI", - "description": "Enable use of the UI for `turbo`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#ui" + "description": "Enable use of the UI for `turbo`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#ui", + "default": "stream" }, "dangerouslyDisablePackageManagerCheck": { "type": "boolean", - "description": "Disable check for `packageManager` in root `package.json`\n\nThis is highly discouraged as it leaves `turbo` dependent on system configuration to infer the correct package manager.\n\nSome turbo features are disabled if this is set to true." + "description": "Disable check for `packageManager` in root `package.json`\n\nThis is highly discouraged as it leaves `turbo` dependent on system configuration to infer the correct package manager.\n\nSome turbo features are disabled if this is set to true.", + "default": false }, "cacheDir": { "$ref": "#/definitions/RelativeUnixPath", - "description": "Specify the filesystem cache directory.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cachedir" + "description": "Specify the filesystem cache directory.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cachedir", + "default": ".turbo/cache" }, "daemon": { "type": "boolean", - "description": "Turborepo runs a background process to pre-calculate some expensive operations. This standalone process (daemon) is a performance optimization, and not required for proper functioning of `turbo`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#daemon" + "description": "Turborepo runs a background process to pre-calculate some expensive operations. This standalone process (daemon) is a performance optimization, and not required for proper functioning of `turbo`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#daemon", + "default": false }, "envMode": { "$ref": "#/definitions/EnvMode", - "description": "Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime:\n\n- `\"strict\"`: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`.\n- `\"loose\"`: Allow all environment variables for the process to be available.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#envmode" + "description": "Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime:\n\n- `\"strict\"`: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`.\n- `\"loose\"`: Allow all environment variables for the process to be available.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#envmode", + "default": "strict" } }, "additionalProperties": false, @@ -92,14 +103,16 @@ "items": { "type": "string" }, - "description": "The list of tasks that this task depends on.\n\nPrefixing an item in dependsOn with a ^ prefix tells turbo that this task depends on the package's topological dependencies completing the task first. (e.g. \"A package's build tasks should only run once all of its workspace dependencies have completed their own build commands.\")\n\nItems in dependsOn without a ^ prefix express the relationships between tasks within the same package (e.g. \"A package's test and lint commands depend on its own build being completed first.\")\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#dependson" + "description": "The list of tasks that this task depends on.\n\nPrefixing an item in dependsOn with a ^ prefix tells turbo that this task depends on the package's topological dependencies completing the task first. (e.g. \"A package's build tasks should only run once all of its workspace dependencies have completed their own build commands.\")\n\nItems in dependsOn without a ^ prefix express the relationships between tasks within the same package (e.g. \"A package's test and lint commands depend on its own build being completed first.\")\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#dependson", + "default": [] }, "env": { "type": "array", "items": { "$ref": "#/definitions/EnvWildcard" }, - "description": "A list of environment variables that this task depends on.\n\nNote: If you are migrating from a turbo version 1.5 or below, you may be used to prefixing your variables with a $. You no longer need to use the $ prefix. (e.g. $GITHUB_TOKEN → GITHUB_TOKEN)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#env" + "description": "A list of environment variables that this task depends on.\n\nNote: If you are migrating from a turbo version 1.5 or below, you may be used to prefixing your variables with a $. You no longer need to use the $ prefix. (e.g. $GITHUB_TOKEN → GITHUB_TOKEN)\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#env", + "default": [] }, "passThroughEnv": { "anyOf": [ @@ -113,37 +126,44 @@ } } ], - "description": "An allowlist of environment variables that should be made available in this task's environment, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#passthroughenv" + "description": "An allowlist of environment variables that should be made available in this task's environment, but should not contribute to the task's cache key, e.g. `AWS_SECRET_KEY`.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#passthroughenv", + "default": null }, "outputs": { "type": "array", "items": { "type": "string" }, - "description": "The set of glob patterns indicating a task's cacheable filesystem outputs.\n\nTurborepo captures task logs for all tasks. This enables us to cache tasks whose runs produce no artifacts other than logs (such as linters). Logs are always treated as a cacheable artifact and never need to be specified.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#outputs" + "description": "The set of glob patterns indicating a task's cacheable filesystem outputs.\n\nTurborepo captures task logs for all tasks. This enables us to cache tasks whose runs produce no artifacts other than logs (such as linters). Logs are always treated as a cacheable artifact and never need to be specified.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#outputs", + "default": [] }, "cache": { "type": "boolean", - "description": "Whether or not to cache the outputs of the task.\n\nSetting cache to false is useful for long-running \"watch\" or development mode tasks.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cache" + "description": "Whether or not to cache the outputs of the task.\n\nSetting cache to false is useful for long-running \"watch\" or development mode tasks.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#cache", + "default": true }, "inputs": { "type": "array", "items": { "type": "string" }, - "description": "The set of glob patterns to consider as inputs to this task.\n\nChanges to files covered by these globs will cause a cache miss and the task will be rerun.\n\nIf a file has been changed that is **not** included in the set of globs, it will not cause a cache miss.\n\nIf omitted or empty, all files in the package are considered as inputs.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#inputs" + "description": "The set of glob patterns to consider as inputs to this task.\n\nChanges to files covered by these globs will cause a cache miss and the task will be rerun.\n\nIf a file has been changed that is **not** included in the set of globs, it will not cause a cache miss.\n\nIf omitted or empty, all files in the package are considered as inputs.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#inputs", + "default": [] }, "outputLogs": { "$ref": "#/definitions/OutputLogs", - "description": "Output mode for the task.\n\n\"full\": Displays all output\n\n\"hash-only\": Show only the hashes of the tasks\n\n\"new-only\": Only show output from cache misses\n\n\"errors-only\": Only show output from task failures\n\n\"none\": Hides all task output\n\nDocumentation: https://turbo.build/repo/docs/reference/run#--output-logs-option" + "description": "Output mode for the task.\n\n\"full\": Displays all output\n\n\"hash-only\": Show only the hashes of the tasks\n\n\"new-only\": Only show output from cache misses\n\n\"errors-only\": Only show output from task failures\n\n\"none\": Hides all task output\n\nDocumentation: https://turbo.build/repo/docs/reference/run#--output-logs-option", + "default": "full" }, "persistent": { "type": "boolean", - "description": "Indicates whether the task exits or not. Setting `persistent` to `true` tells turbo that this is a long-running task and will ensure that other tasks cannot depend on it.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#persistent" + "description": "Indicates whether the task exits or not. Setting `persistent` to `true` tells turbo that this is a long-running task and will ensure that other tasks cannot depend on it.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#persistent", + "default": false }, "interactive": { "type": "boolean", - "description": "Mark a task as interactive allowing it to receive input from stdin. Interactive tasks must be marked with \"cache\": false as the input they receive from stdin can change the outcome of the task.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#interactive" + "description": "Mark a task as interactive allowing it to receive input from stdin. Interactive tasks must be marked with \"cache\": false as the input they receive from stdin can change the outcome of the task.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#interactive", + "default": false } }, "additionalProperties": false @@ -166,27 +186,33 @@ "properties": { "signature": { "type": "boolean", - "description": "Indicates if signature verification is enabled for requests to the remote cache. When `true`, Turborepo will sign every uploaded artifact using the value of the environment variable `TURBO_REMOTE_CACHE_SIGNATURE_KEY`. Turborepo will reject any downloaded artifacts that have an invalid signature or are missing a signature." + "description": "Indicates if signature verification is enabled for requests to the remote cache. When `true`, Turborepo will sign every uploaded artifact using the value of the environment variable `TURBO_REMOTE_CACHE_SIGNATURE_KEY`. Turborepo will reject any downloaded artifacts that have an invalid signature or are missing a signature.", + "default": false }, "enabled": { "type": "boolean", - "description": "Indicates if the remote cache is enabled. When `false`, Turborepo will disable all remote cache operations, even if the repo has a valid token. If true, remote caching is enabled, but still requires the user to login and link their repo to a remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching" + "description": "Indicates if the remote cache is enabled. When `false`, Turborepo will disable all remote cache operations, even if the repo has a valid token. If true, remote caching is enabled, but still requires the user to login and link their repo to a remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching", + "default": true }, "preflight": { "type": "boolean", - "description": "When enabled, any HTTP request will be preceded by an OPTIONS request to determine if the request is supported by the endpoint.\n\nDocumentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests" + "description": "When enabled, any HTTP request will be preceded by an OPTIONS request to determine if the request is supported by the endpoint.\n\nDocumentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests", + "default": false }, "apiUrl": { "type": "string", - "description": "Set endpoint for API calls to the remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting" + "description": "Set endpoint for API calls to the remote cache. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting", + "default": "https://vercel.com/api" }, "loginUrl": { "type": "string", - "description": "Set endpoint for requesting tokens during `turbo login`. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting" + "description": "Set endpoint for requesting tokens during `turbo login`. Documentation: https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting", + "default": "https://vercel.com" }, "timeout": { "type": "number", - "description": "Sets a timeout for remote cache operations. Value is given in seconds and only whole values are accepted. If `0` is passed, then there is no timeout for any cache operations." + "description": "Sets a timeout for remote cache operations. Value is given in seconds and only whole values are accepted. If `0` is passed, then there is no timeout for any cache operations.", + "default": 30 } }, "additionalProperties": false @@ -213,7 +239,8 @@ "type": "object", "properties": { "$schema": { - "type": "string" + "type": "string", + "default": "https://turbo.build/schema.v2.json" }, "tasks": { "type": "object", @@ -221,14 +248,18 @@ "$ref": "#/definitions/Pipeline", "description": "The name of a task that can be executed by turbo. If turbo finds a workspace package with a package.json scripts object with a matching key, it will apply the pipeline task configuration to that npm script during execution." }, - "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks" + "description": "An object representing the task dependency graph of your project. turbo interprets these conventions to schedule, execute, and cache the outputs of tasks in your project.\n\nDocumentation: https://turbo.build/repo/docs/reference/configuration#tasks", + "default": {} }, "extends": { "type": "array", "items": { "type": "string" }, - "description": "This key is only available in Workspace Configs and cannot be used in your root turbo.json.\n\nTells turbo to extend your root `turbo.json` and overrides with the keys provided in your Workspace Configs.\n\nCurrently, only the \"//\" value is allowed." + "description": "This key is only available in Workspace Configs and cannot be used in your root turbo.json.\n\nTells turbo to extend your root `turbo.json` and overrides with the keys provided in your Workspace Configs.\n\nCurrently, only the \"//\" value is allowed.", + "default": [ + "//" + ] } }, "required": [ diff --git a/packages/turbo-types/scripts/generate-schema.mjs b/packages/turbo-types/scripts/generate-schema.mjs deleted file mode 100755 index 20a787b629532..0000000000000 --- a/packages/turbo-types/scripts/generate-schema.mjs +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -import { writeFileSync } from "node:fs"; -import { join } from "node:path"; -import { createGenerator } from "ts-json-schema-generator"; - -const __dirname = new URL(".", import.meta.url).pathname; - -const generator = createGenerator({ - path: join(__dirname, "../src/index.ts"), - tsconfig: join(__dirname, "../tsconfig.json"), - type: "Schema", -}); - -const schemaV1 = JSON.stringify(generator.createSchema("SchemaV1"), null, 2); -writeFileSync("schemas/schema.v1.json", schemaV1); - -const schemaV2 = JSON.stringify(generator.createSchema("Schema"), null, 2); -writeFileSync("schemas/schema.v2.json", schemaV2); -writeFileSync("schemas/schema.json", schemaV2); diff --git a/packages/turbo-types/scripts/generate-schema.ts b/packages/turbo-types/scripts/generate-schema.ts new file mode 100755 index 0000000000000..4d679ec5b43d3 --- /dev/null +++ b/packages/turbo-types/scripts/generate-schema.ts @@ -0,0 +1,52 @@ +#!/usr/bin/env node + +import { writeFileSync } from "node:fs"; +import { join } from "node:path"; +import { createGenerator } from "ts-json-schema-generator"; + +const __dirname = new URL(".", import.meta.url).pathname; +const packageRoot = join(__dirname, "..", "src"); + +/** + * post-process the schema recursively to: + * 1. replace any key named `defaultValue` with `default` + * 1. remove any backticks from the value + * 1. attempt to parsing the value as JSON (falling back, if not) + */ +const postProcess = (item: T): T => { + if (typeof item !== "object" || item === null) { + return item; + } + if (Array.isArray(item)) { + return item.map(postProcess) as unknown as T; + } + return Object.fromEntries( + Object.entries(item).map(([key, value]) => { + if (key === "defaultValue" && typeof value === "string") { + const replaced = value.replaceAll(/`/g, ""); + try { + return ["default", JSON.parse(replaced)]; + } catch (e) { + return ["default", replaced]; + } + } + return [key, postProcess(value)]; + }) + ) as T; +}; + +const create = (fileName: string, typeName: string) => { + const generator = createGenerator({ + path: join(packageRoot, "index.ts"), + tsconfig: join(__dirname, "../tsconfig.json"), + type: "Schema", + extraTags: ["defaultValue"], + }); + const schema = postProcess(generator.createSchema(typeName)); + const filePath = join(__dirname, "..", "schemas", fileName); + writeFileSync(filePath, JSON.stringify(schema, null, 2)); +}; + +create("schema.v1.json", "SchemaV1"); +create("schema.v2.json", "Schema"); +create("schema.json", "Schema"); diff --git a/packages/turbo-types/tsconfig.json b/packages/turbo-types/tsconfig.json index 0620a3c25ef39..5c3b5901a2db9 100644 --- a/packages/turbo-types/tsconfig.json +++ b/packages/turbo-types/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "@turbo/tsconfig/library.json", "compilerOptions": { - "rootDir": "." + "rootDir": ".", + "module": "ESNext", + "lib": ["ESNext"], } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f4098df1322e9..7b6da58cc1d1e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -668,9 +668,15 @@ importers: '@turbo/tsconfig': specifier: workspace:* version: link:../tsconfig + '@types/node': + specifier: ^20 + version: 20.11.30 ts-json-schema-generator: specifier: 2.3.0 version: 2.3.0 + tsx: + specifier: ^4.19.0 + version: 4.19.0 packages/turbo-utils: devDependencies: @@ -1440,7 +1446,7 @@ packages: resolution: {integrity: sha512-Txumi3td7J4A/xTTwlssKieHKTGl3j4A1tglBx72auZ49YK7ePY6XZricgIg9mnZT4xPfA+UPCUdnhRuEFDL+w==} requiresBuild: true dependencies: - tslib: 2.6.1 + tslib: 2.6.3 dev: false optional: true @@ -1453,6 +1459,15 @@ packages: dev: true optional: true + /@esbuild/aix-ppc64@0.23.1: + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.17.18: resolution: {integrity: sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==} engines: {node: '>=12'} @@ -1471,6 +1486,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.23.1: + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.17.18: resolution: {integrity: sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==} engines: {node: '>=12'} @@ -1489,6 +1513,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.23.1: + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.17.18: resolution: {integrity: sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==} engines: {node: '>=12'} @@ -1507,6 +1540,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.23.1: + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.17.18: resolution: {integrity: sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==} engines: {node: '>=12'} @@ -1525,6 +1567,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.23.1: + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.17.18: resolution: {integrity: sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==} engines: {node: '>=12'} @@ -1543,6 +1594,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.23.1: + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.17.18: resolution: {integrity: sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==} engines: {node: '>=12'} @@ -1561,6 +1621,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.23.1: + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.17.18: resolution: {integrity: sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==} engines: {node: '>=12'} @@ -1579,6 +1648,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.23.1: + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.17.18: resolution: {integrity: sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==} engines: {node: '>=12'} @@ -1597,6 +1675,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.23.1: + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.17.18: resolution: {integrity: sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==} engines: {node: '>=12'} @@ -1615,6 +1702,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.23.1: + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.17.18: resolution: {integrity: sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==} engines: {node: '>=12'} @@ -1633,6 +1729,15 @@ packages: dev: true optional: true + /@esbuild/linux-ia32@0.23.1: + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.15.6: resolution: {integrity: sha512-hqmVU2mUjH6J2ZivHphJ/Pdse2ZD+uGCHK0uvsiLDk/JnSedEVj77CiVUnbMKuU4tih1TZZL8tG9DExQg/GZsw==} engines: {node: '>=12'} @@ -1659,6 +1764,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64@0.23.1: + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.17.18: resolution: {integrity: sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==} engines: {node: '>=12'} @@ -1677,6 +1791,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.23.1: + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.17.18: resolution: {integrity: sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==} engines: {node: '>=12'} @@ -1695,6 +1818,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.23.1: + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.17.18: resolution: {integrity: sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==} engines: {node: '>=12'} @@ -1713,6 +1845,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.23.1: + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.17.18: resolution: {integrity: sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==} engines: {node: '>=12'} @@ -1731,6 +1872,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.23.1: + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.17.18: resolution: {integrity: sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==} engines: {node: '>=12'} @@ -1749,6 +1899,15 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.23.1: + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.17.18: resolution: {integrity: sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==} engines: {node: '>=12'} @@ -1767,6 +1926,24 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.23.1: + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-arm64@0.23.1: + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.17.18: resolution: {integrity: sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==} engines: {node: '>=12'} @@ -1785,6 +1962,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.23.1: + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.17.18: resolution: {integrity: sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==} engines: {node: '>=12'} @@ -1803,6 +1989,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.23.1: + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.17.18: resolution: {integrity: sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==} engines: {node: '>=12'} @@ -1821,6 +2016,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.23.1: + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.17.18: resolution: {integrity: sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==} engines: {node: '>=12'} @@ -1839,6 +2043,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.23.1: + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.17.18: resolution: {integrity: sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==} engines: {node: '>=12'} @@ -1857,6 +2070,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.23.1: + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.47.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5354,6 +5576,38 @@ packages: '@esbuild/win32-x64': 0.19.12 dev: true + /esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + dev: true + /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} @@ -6279,6 +6533,12 @@ packages: resolve-pkg-maps: 1.0.0 dev: true + /get-tsconfig@4.7.6: + resolution: {integrity: sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + /get-uri@6.0.1: resolution: {integrity: sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==} engines: {node: '>= 14'} @@ -10718,7 +10978,6 @@ packages: /tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} - dev: true /tsup@5.12.9(typescript@5.3.3): resolution: {integrity: sha512-dUpuouWZYe40lLufo64qEhDpIDsWhRbr2expv5dHEMjwqeKJS2aXA/FPqs1dxO4T6mBojo7rvo3jP9NNzaKyDg==} @@ -10837,6 +11096,17 @@ packages: typescript: 5.3.3 dev: true + /tsx@4.19.0: + resolution: {integrity: sha512-bV30kM7bsLZKZIOCHeMNVMJ32/LuJzLVajkQI/qf92J2Qr08ueLQvW00PUZGiuLPP760UINwupgUj8qrSCPUKg==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + esbuild: 0.23.1 + get-tsconfig: 4.7.6 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /tsx@4.7.2: resolution: {integrity: sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==} engines: {node: '>=18.0.0'}