diff --git a/.github/workflows/tryit-comment.yml b/.github/workflows/tryit-comment.yml index b94778efa7..e75184be02 100644 --- a/.github/workflows/tryit-comment.yml +++ b/.github/workflows/tryit-comment.yml @@ -30,7 +30,7 @@ jobs: `Changes in this PR will be published to the following url to try(check status of TypeSpec Pull Request Try It pipeline for publish status):`, `Playground: https://cadlplayground.z22.web.core.windows.net/prs/${prNumber}/`, "", - `Website: https://tspwebsitepr.z5.web.core.windows.net/prs/${prNumber}/`, + `Website: https://tspwebsitepr.z22.web.core.windows.net/prs/${prNumber}/`, ].join("\n") }) diff --git a/.prettierignore b/.prettierignore index 1c75f48257..824a4a40e4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -34,8 +34,10 @@ spec.emu.html # Auto generated reference docs. docs/**/reference/ docs/standard-library/built-in-decorators.md +docs/standard-library/built-in-data-types.md packages/website/versioned_docs/**/reference/ packages/website/versioned_docs/**/standard-library/built-in-decorators.md +packages/website/versioned_docs/**/standard-library/built-in-data-types.md #.tsp init template eng/feeds/ diff --git a/.vscode/settings.json b/.vscode/settings.json index 4bd4872b1d..7068a32abc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,7 +10,8 @@ "docs/spec.html": true, "common/config/rush/pnpm-lock.yaml": true, "**/node_modules/**": true, - "packages/website/versioned_docs/**": true + "packages/website/versioned_docs/**": true, + "packages/samples/scratch/**": false // Those files are in gitignore but we still want to search for them }, "files.exclude": { "**/common/temp/**": true, @@ -87,6 +88,7 @@ "rush.json": "jsonc", "common-versions.json": "jsonc", "command-line.json": "jsonc", + "pnpm-config.json": "jsonc", "version-policies.json": "jsonc" }, "typescript.tsdk": "./packages/compiler/node_modules/typescript/lib", diff --git a/common/changes/@typespec/bundler/prepare-playground-release_2023-09-25-17-57.json b/common/changes/@typespec/bundler/prepare-playground-release_2023-09-25-17-57.json new file mode 100644 index 0000000000..aa408d584a --- /dev/null +++ b/common/changes/@typespec/bundler/prepare-playground-release_2023-09-25-17-57.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/bundler", + "comment": "", + "type": "none" + } + ], + "packageName": "@typespec/bundler" +} \ No newline at end of file diff --git a/common/changes/@typespec/compiler/2390-param-hyphen_2023-09-10-15-37.json b/common/changes/@typespec/compiler/2390-param-hyphen_2023-09-10-15-37.json new file mode 100644 index 0000000000..b885fb0fd0 --- /dev/null +++ b/common/changes/@typespec/compiler/2390-param-hyphen_2023-09-10-15-37.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "Handle hyphen in @param doc comment", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} \ No newline at end of file diff --git a/common/changes/@typespec/compiler/constraint-allow-null_2023-09-12-15-51.json b/common/changes/@typespec/compiler/constraint-allow-null_2023-09-12-15-51.json new file mode 100644 index 0000000000..4b4065cb2b --- /dev/null +++ b/common/changes/@typespec/compiler/constraint-allow-null_2023-09-12-15-51.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "Allow nullable types for constraint decorators(min/max value, length, etc)", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} \ No newline at end of file diff --git a/common/changes/@typespec/compiler/feature-op-returns-docs_2023-09-19-16-32.json b/common/changes/@typespec/compiler/feature-op-returns-docs_2023-09-19-16-32.json new file mode 100644 index 0000000000..18268f1f6c --- /dev/null +++ b/common/changes/@typespec/compiler/feature-op-returns-docs_2023-09-19-16-32.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "Add support for `@returns` and `@errors` doc comment tags. `@returns`(or `@returnsDoc` decorator) can be used to describe the success return types of an operation. `@errors`(or `@errorsDoc` decorator) can be used to describe the error return types of an operation.", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} diff --git a/common/changes/@typespec/compiler/fix-comment-tmlanguage_2023-09-25-20-36.json b/common/changes/@typespec/compiler/fix-comment-tmlanguage_2023-09-25-20-36.json new file mode 100644 index 0000000000..1828762628 --- /dev/null +++ b/common/changes/@typespec/compiler/fix-comment-tmlanguage_2023-09-25-20-36.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "Fix: Colorization of line comment was bleeding over to the next line(s).", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} \ No newline at end of file diff --git a/common/changes/@typespec/compiler/fix-format-exit-code_2023-09-20-15-44.json b/common/changes/@typespec/compiler/fix-format-exit-code_2023-09-20-15-44.json new file mode 100644 index 0000000000..93a0a7768e --- /dev/null +++ b/common/changes/@typespec/compiler/fix-format-exit-code_2023-09-20-15-44.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "`tsp format` now returns a non-zero exit code when it fails to format a file", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} \ No newline at end of file diff --git a/common/changes/@typespec/compiler/fix-init-config_2023-09-28-18-02.json b/common/changes/@typespec/compiler/fix-init-config_2023-09-28-18-02.json new file mode 100644 index 0000000000..12f3f241d5 --- /dev/null +++ b/common/changes/@typespec/compiler/fix-init-config_2023-09-28-18-02.json @@ -0,0 +1,15 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "Fix: `tsp init` was not creating the `tspconfig.yaml` file for templates that specified it", + "type": "none" + }, + { + "packageName": "@typespec/compiler", + "comment": "Fix: `tsp init` will create a placeholder `tspconfig.yaml` file for templates that don't specify an explicit one.", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} diff --git a/common/changes/@typespec/compiler/fix-lsp-not-reading-whole-config_2023-10-02-19-28.json b/common/changes/@typespec/compiler/fix-lsp-not-reading-whole-config_2023-10-02-19-28.json new file mode 100644 index 0000000000..d4a3d44188 --- /dev/null +++ b/common/changes/@typespec/compiler/fix-lsp-not-reading-whole-config_2023-10-02-19-28.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "Fix: Language Server wasn't loading the `tspconfig.yaml` correctly resulting in some options being dropped like the linter configuration.", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} diff --git a/common/changes/@typespec/compiler/fix-playground-lsp_2023-10-03-15-56.json b/common/changes/@typespec/compiler/fix-playground-lsp_2023-10-03-15-56.json new file mode 100644 index 0000000000..5945164bd2 --- /dev/null +++ b/common/changes/@typespec/compiler/fix-playground-lsp_2023-10-03-15-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} \ No newline at end of file diff --git a/common/changes/@typespec/compiler/fix-using-typespec-implicit_2023-09-28-21-17.json b/common/changes/@typespec/compiler/fix-using-typespec-implicit_2023-09-28-21-17.json new file mode 100644 index 0000000000..96361b9c7f --- /dev/null +++ b/common/changes/@typespec/compiler/fix-using-typespec-implicit_2023-09-28-21-17.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "Fix: Using `TypeSpec.Xyz` namespace shouldn't require the `TypeSpec Prefix`", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} \ No newline at end of file diff --git a/common/changes/@typespec/compiler/no-double-deprecation_2023-09-25-12-54.json b/common/changes/@typespec/compiler/no-double-deprecation_2023-09-25-12-54.json new file mode 100644 index 0000000000..457d45927b --- /dev/null +++ b/common/changes/@typespec/compiler/no-double-deprecation_2023-09-25-12-54.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "Skip emit of `deprecated` diagnostic for a type reference that is used in a deprecated declaration statement", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} \ No newline at end of file diff --git a/common/changes/@typespec/compiler/website-perf-improvements_2023-09-28-20-21.json b/common/changes/@typespec/compiler/website-perf-improvements_2023-09-28-20-21.json new file mode 100644 index 0000000000..c748686257 --- /dev/null +++ b/common/changes/@typespec/compiler/website-perf-improvements_2023-09-28-20-21.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "Remove `decorators` export, import decorators individually", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} diff --git a/common/changes/@typespec/http/feature-op-returns-docs_2023-09-19-16-32.json b/common/changes/@typespec/http/feature-op-returns-docs_2023-09-19-16-32.json new file mode 100644 index 0000000000..931a1d2bb5 --- /dev/null +++ b/common/changes/@typespec/http/feature-op-returns-docs_2023-09-19-16-32.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/http", + "comment": "Add support for `@returns` and `@errors` doc comment tags.", + "type": "none" + } + ], + "packageName": "@typespec/http" +} \ No newline at end of file diff --git a/common/changes/@typespec/http/openapi3-DuplicateRefs_2023-09-27-19-57.json b/common/changes/@typespec/http/openapi3-DuplicateRefs_2023-09-27-19-57.json new file mode 100644 index 0000000000..b7216caf1f --- /dev/null +++ b/common/changes/@typespec/http/openapi3-DuplicateRefs_2023-09-27-19-57.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/http", + "comment": "Emit error when multiple properties on a response model have the `@statusCode` decorator.", + "type": "none" + } + ], + "packageName": "@typespec/http" +} \ No newline at end of file diff --git a/common/changes/@typespec/internal-build-utils/prepare-playground-release_2023-09-25-17-57.json b/common/changes/@typespec/internal-build-utils/prepare-playground-release_2023-09-25-17-57.json new file mode 100644 index 0000000000..75572fc853 --- /dev/null +++ b/common/changes/@typespec/internal-build-utils/prepare-playground-release_2023-09-25-17-57.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/internal-build-utils", + "comment": "Handle bumping version of prerelease packages", + "type": "none" + } + ], + "packageName": "@typespec/internal-build-utils" +} \ No newline at end of file diff --git a/common/changes/@typespec/json-schema/constraint-allow-null_2023-09-22-22-38.json b/common/changes/@typespec/json-schema/constraint-allow-null_2023-09-22-22-38.json new file mode 100644 index 0000000000..c15d89290f --- /dev/null +++ b/common/changes/@typespec/json-schema/constraint-allow-null_2023-09-22-22-38.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/json-schema", + "comment": "", + "type": "none" + } + ], + "packageName": "@typespec/json-schema" +} \ No newline at end of file diff --git a/common/changes/@typespec/openapi3/constraint-allow-null_2023-09-22-22-38.json b/common/changes/@typespec/openapi3/constraint-allow-null_2023-09-22-22-38.json new file mode 100644 index 0000000000..1ffa52e074 --- /dev/null +++ b/common/changes/@typespec/openapi3/constraint-allow-null_2023-09-22-22-38.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/openapi3", + "comment": "Add support for constraints on unions", + "type": "none" + } + ], + "packageName": "@typespec/openapi3" +} \ No newline at end of file diff --git a/common/changes/@typespec/openapi3/feature-op-returns-docs_2023-09-19-16-32.json b/common/changes/@typespec/openapi3/feature-op-returns-docs_2023-09-19-16-32.json new file mode 100644 index 0000000000..ee001dfd4c --- /dev/null +++ b/common/changes/@typespec/openapi3/feature-op-returns-docs_2023-09-19-16-32.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/openapi3", + "comment": "Add support for `@returns` and `@errors` doc comment tags.", + "type": "none" + } + ], + "packageName": "@typespec/openapi3" +} \ No newline at end of file diff --git a/common/changes/@typespec/openapi3/fix-openapi3-header-format_2023-09-20-17-20.json b/common/changes/@typespec/openapi3/fix-openapi3-header-format_2023-09-20-17-20.json new file mode 100644 index 0000000000..f621cac4e3 --- /dev/null +++ b/common/changes/@typespec/openapi3/fix-openapi3-header-format_2023-09-20-17-20.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/openapi3", + "comment": "Fix: Using format `ssv` or `pipes` in `@header` produced an invalid OpenAPI3 schema. It will now change the type to string and ignore the format as well as logging a warning.", + "type": "none" + } + ], + "packageName": "@typespec/openapi3" +} \ No newline at end of file diff --git a/common/changes/@typespec/openapi3/oneof-model-prop_2023-09-22-20-29.json b/common/changes/@typespec/openapi3/oneof-model-prop_2023-09-22-20-29.json new file mode 100644 index 0000000000..d221e6c84e --- /dev/null +++ b/common/changes/@typespec/openapi3/oneof-model-prop_2023-09-22-20-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/openapi3", + "comment": "Allow use of `@oneOf` on model properties", + "type": "none" + } + ], + "packageName": "@typespec/openapi3" +} \ No newline at end of file diff --git a/common/changes/@typespec/openapi3/openapi3-DuplicateRefs_2023-09-27-19-57.json b/common/changes/@typespec/openapi3/openapi3-DuplicateRefs_2023-09-27-19-57.json new file mode 100644 index 0000000000..d9a70151de --- /dev/null +++ b/common/changes/@typespec/openapi3/openapi3-DuplicateRefs_2023-09-27-19-57.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/openapi3", + "comment": "", + "type": "none" + } + ], + "packageName": "@typespec/openapi3" +} \ No newline at end of file diff --git a/common/changes/@typespec/playground/prepare-playground-release_2023-09-25-17-57.json b/common/changes/@typespec/playground/prepare-playground-release_2023-09-25-17-57.json new file mode 100644 index 0000000000..af8b794e62 --- /dev/null +++ b/common/changes/@typespec/playground/prepare-playground-release_2023-09-25-17-57.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/playground", + "comment": "", + "type": "none" + } + ], + "packageName": "@typespec/playground" +} \ No newline at end of file diff --git a/common/changes/@typespec/playground/upgrade-deps-swagger-ui_2023-09-26-19-19.json b/common/changes/@typespec/playground/upgrade-deps-swagger-ui_2023-09-26-19-19.json new file mode 100644 index 0000000000..e6ace197ff --- /dev/null +++ b/common/changes/@typespec/playground/upgrade-deps-swagger-ui_2023-09-26-19-19.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/playground", + "comment": "Upgrade swagger-ui", + "type": "none" + } + ], + "packageName": "@typespec/playground" +} \ No newline at end of file diff --git a/common/changes/@typespec/protobuf/protobuf-emit-doc-comments_2023-08-10-18-18.json b/common/changes/@typespec/protobuf/protobuf-emit-doc-comments_2023-08-10-18-18.json new file mode 100644 index 0000000000..5874e70e4c --- /dev/null +++ b/common/changes/@typespec/protobuf/protobuf-emit-doc-comments_2023-08-10-18-18.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/protobuf", + "comment": "Added support for emitting documentation comments in protobuf specifications.", + "type": "none" + } + ], + "packageName": "@typespec/protobuf" +} \ No newline at end of file diff --git a/common/changes/@typespec/rest/fixResourceLogic_2023-09-29-18-58.json b/common/changes/@typespec/rest/fixResourceLogic_2023-09-29-18-58.json new file mode 100644 index 0000000000..c64a7e528f --- /dev/null +++ b/common/changes/@typespec/rest/fixResourceLogic_2023-09-29-18-58.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/rest", + "comment": "Fix: `@key` can now appear on the base model of a resource.", + "type": "none" + } + ], + "packageName": "@typespec/rest" +} diff --git a/common/changes/@typespec/versioning/versioning-RenamedFromBug_2023-09-27-22-20.json b/common/changes/@typespec/versioning/versioning-RenamedFromBug_2023-09-27-22-20.json new file mode 100644 index 0000000000..60307d3fef --- /dev/null +++ b/common/changes/@typespec/versioning/versioning-RenamedFromBug_2023-09-27-22-20.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/versioning", + "comment": "Ensure that use of `@renamedFrom` does not result in duplicate properties on a model.", + "type": "none" + } + ], + "packageName": "@typespec/versioning" +} \ No newline at end of file diff --git a/common/config/rush/.pnpmfile.cjs b/common/config/rush/.pnpmfile.cjs new file mode 100644 index 0000000000..01dbf3e03d --- /dev/null +++ b/common/config/rush/.pnpmfile.cjs @@ -0,0 +1,37 @@ +"use strict"; + +/** + * When using the PNPM package manager, you can use pnpmfile.js to workaround + * dependencies that have mistakes in their package.json file. (This feature is + * functionally similar to Yarn's "resolutions".) + * + * For details, see the PNPM documentation: + * https://pnpm.js.org/docs/en/hooks.html + * + * IMPORTANT: SINCE THIS FILE CONTAINS EXECUTABLE CODE, MODIFYING IT IS LIKELY TO INVALIDATE + * ANY CACHED DEPENDENCY ANALYSIS. After any modification to pnpmfile.js, it's recommended to run + * "rush update --full" so that PNPM will recalculate all version selections. + */ +module.exports = { + hooks: { + readPackage, + }, +}; + +/** + * This hook is invoked during installation before a package's dependencies + * are selected. + * The `packageJson` parameter is the deserialized package.json + * contents for the package that is about to be installed. + * The `context` parameter provides a log() function. + * The return value is the updated object. + */ +function readPackage(packageJson, context) { + // // The karma types have a missing dependency on typings from the log4js package. + // if (packageJson.name === '@types/karma') { + // context.log('Fixed up dependencies for @types/karma'); + // packageJson.dependencies['log4js'] = '0.6.38'; + // } + + return packageJson; +} diff --git a/common/config/rush/pnpm-config.json b/common/config/rush/pnpm-config.json new file mode 100644 index 0000000000..25afbfe586 --- /dev/null +++ b/common/config/rush/pnpm-config.json @@ -0,0 +1,207 @@ +/** + * This configuration file provides settings specific to the PNPM package manager. + * More documentation is available on the Rush website: https://rushjs.io + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/pnpm-config.schema.json", + + /** + * If true, then `rush install` and `rush update` will use the PNPM workspaces feature + * to perform the install, instead of the old model where Rush generated the symlinks + * for each projects's node_modules folder. + * + * When using workspaces, Rush will generate a `common/temp/pnpm-workspace.yaml` file referencing + * all local projects to install. Rush will also generate a `.pnpmfile.cjs` shim which implements + * Rush-specific features such as preferred versions. The user's `common/config/rush/.pnpmfile.cjs` + * is invoked by the shim. + * + * This option is strongly recommended. The default value is false. + */ + "useWorkspaces": true, + + /** + * If true, then Rush will add the `--strict-peer-dependencies` command-line parameter when + * invoking PNPM. This causes `rush update` to fail if there are unsatisfied peer dependencies, + * which is an invalid state that can cause build failures or incompatible dependency versions. + * (For historical reasons, JavaScript package managers generally do not treat this invalid + * state as an error.) + * + * PNPM documentation: https://pnpm.io/npmrc#strict-peer-dependencies + * + * The default value is false to avoid legacy compatibility issues. + * It is strongly recommended to set `strictPeerDependencies=true`. + */ + // "strictPeerDependencies": true, + + /** + * Environment variables that will be provided to PNPM. + */ + // "environmentVariables": { + // "NODE_OPTIONS": { + // "value": "--max-old-space-size=4096", + // "override": false + // } + // }, + + /** + * Specifies the location of the PNPM store. There are two possible values: + * + * - `local` - use the `pnpm-store` folder in the current configured temp folder: + * `common/temp/pnpm-store` by default. + * - `global` - use PNPM's global store, which has the benefit of being shared + * across multiple repo folders, but the disadvantage of less isolation for builds + * (for example, bugs or incompatibilities when two repos use different releases of PNPM) + * + * In both cases, the store path can be overridden by the environment variable `RUSH_PNPM_STORE_PATH`. + * + * The default value is `local`. + */ + // "pnpmStore": "global", + + /** + * If true, then `rush install` will report an error if manual modifications + * were made to the PNPM shrinkwrap file without running `rush update` afterwards. + * + * This feature protects against accidental inconsistencies that may be introduced + * if the PNPM shrinkwrap file (`pnpm-lock.yaml`) is manually edited. When this + * feature is enabled, `rush update` will append a hash to the file as a YAML comment, + * and then `rush update` and `rush install` will validate the hash. Note that this + * does not prohibit manual modifications, but merely requires `rush update` be run + * afterwards, ensuring that PNPM can report or repair any potential inconsistencies. + * + * To temporarily disable this validation when invoking `rush install`, use the + * `--bypass-policy` command-line parameter. + * + * The default value is false. + */ + // "preventManualShrinkwrapChanges": true, + + /** + * The "globalOverrides" setting provides a simple mechanism for overriding version selections + * for all dependencies of all projects in the monorepo workspace. The settings are copied + * into the `pnpm.overrides` field of the `common/temp/package.json` file that is generated + * by Rush during installation. + * + * Order of precedence: `.pnpmfile.cjs` has the highest precedence, followed by + * `unsupportedPackageJsonSettings`, `globalPeerDependencyRules`, `globalPackageExtensions`, + * and `globalOverrides` has lowest precedence. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmoverrides + */ + "globalOverrides": { + "trim@0.0.1": "0.0.3", + "update-notifier@^5.1.0": "^6.0.2", + "node-fetch@3.2.8": "^3.3.2" + // "example1": "^1.0.0", + // "example2": "npm:@company/example2@^1.0.0" + }, + + /** + * The `globalPeerDependencyRules` setting provides various settings for suppressing validation errors + * that are reported during installation with `strictPeerDependencies=true`. The settings are copied + * into the `pnpm.peerDependencyRules` field of the `common/temp/package.json` file that is generated + * by Rush during installation. + * + * Order of precedence: `.pnpmfile.cjs` has the highest precedence, followed by + * `unsupportedPackageJsonSettings`, `globalPeerDependencyRules`, `globalPackageExtensions`, + * and `globalOverrides` has lowest precedence. + * + * https://pnpm.io/package_json#pnpmpeerdependencyrules + */ + "globalPeerDependencyRules": { + // "ignoreMissing": ["@eslint/*"], + // "allowedVersions": { "react": "17" }, + // "allowAny": ["@babel/*"] + }, + + /** + * The `globalPackageExtension` setting provides a way to patch arbitrary package.json fields + * for any PNPM dependency of the monorepo. The settings are copied into the `pnpm.packageExtensions` + * field of the `common/temp/package.json` file that is generated by Rush during installation. + * The `globalPackageExtension` setting has similar capabilities as `.pnpmfile.cjs` but without + * the downsides of an executable script (nondeterminism, unreliable caching, performance concerns). + * + * Order of precedence: `.pnpmfile.cjs` has the highest precedence, followed by + * `unsupportedPackageJsonSettings`, `globalPeerDependencyRules`, `globalPackageExtensions`, + * and `globalOverrides` has lowest precedence. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmpackageextensions + */ + "globalPackageExtensions": { + // "fork-ts-checker-webpack-plugin": { + // "dependencies": { + // "@babel/core": "1" + // }, + // "peerDependencies": { + // "eslint": ">= 6" + // }, + // "peerDependenciesMeta": { + // "eslint": { + // "optional": true + // } + // } + // } + }, + + /** + * The `globalNeverBuiltDependencies` setting suppresses the `preinstall`, `install`, and `postinstall` + * lifecycle events for the specified NPM dependencies. This is useful for scripts with poor practices + * such as downloading large binaries without retries or attempting to invoke OS tools such as + * a C++ compiler. (PNPM's terminology refers to these lifecycle events as "building" a package; + * it has nothing to do with build system operations such as `rush build` or `rushx build`.) + * The settings are copied into the `pnpm.neverBuiltDependencies` field of the `common/temp/package.json` + * file that is generated by Rush during installation. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmneverbuiltdependencies + */ + "globalNeverBuiltDependencies": [ + // "fsevents" + ], + + /** + * The `globalAllowedDeprecatedVersions` setting suppresses installation warnings for package + * versions that the NPM registry reports as being deprecated. This is useful if the + * deprecated package is an indirect dependency of an external package that has not released a fix. + * The settings are copied into the `pnpm.allowedDeprecatedVersions` field of the `common/temp/package.json` + * file that is generated by Rush during installation. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmalloweddeprecatedversions + * + * If you are working to eliminate a deprecated version, it's better to specify `allowedDeprecatedVersions` + * in the package.json file for individual Rush projects. + */ + "globalAllowedDeprecatedVersions": { + // "request": "*" + }, + + /** + * (THIS FIELD IS MACHINE GENERATED) The "globalPatchedDependencies" field is updated automatically + * by the `rush-pnpm patch-commit` command. It is a dictionary, where the key is an NPM package name + * and exact version, and the value is a relative path to the associated patch file. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmpatcheddependencies + */ + "globalPatchedDependencies": {}, + + /** + * (USE AT YOUR OWN RISK) This is a free-form property bag that will be copied into + * the `common/temp/package.json` file that is generated by Rush during installation. + * This provides a way to experiment with new PNPM features. These settings will override + * any other Rush configuration associated with a given JSON field except for `.pnpmfile.cjs`. + * + * USAGE OF THIS SETTING IS NOT SUPPORTED BY THE RUSH MAINTAINERS AND MAY CAUSE RUSH + * TO MALFUNCTION. If you encounter a missing PNPM setting that you believe should + * be supported, please create a GitHub issue or PR. Note that Rush does not aim to + * support every possible PNPM setting, but rather to promote a battle-tested installation + * strategy that is known to provide a good experience for large teams with lots of projects. + */ + "unsupportedPackageJsonSettings": { + // "dependencies": { + // "not-a-good-practice": "*" + // }, + // "scripts": { + // "do-something": "echo Also not a good practice" + // }, + // "pnpm": { "futurePnpmFeature": true } + } +} diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a32bc0b70d..5a55b693a8 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4,6 +4,11 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + trim@0.0.1: 0.0.3 + update-notifier@^5.1.0: ^6.0.2 + node-fetch@3.2.8: ^3.3.2 + importers: .: {} @@ -407,6 +412,9 @@ importers: cspell: specifier: ~6.31.1 version: 6.31.1 + semver: + specifier: ^7.5.4 + version: 7.5.4 strip-json-comments: specifier: ~5.0.0 version: 5.0.0 @@ -420,6 +428,9 @@ importers: '@types/node': specifier: ~18.11.9 version: 18.11.9 + '@types/semver': + specifier: ^7.5.2 + version: 7.5.2 '@types/yargs': specifier: ~17.0.24 version: 17.0.24 @@ -822,15 +833,9 @@ importers: react-dom: specifier: ~18.2.0 version: 18.2.0(react@18.2.0) - swagger-client: - specifier: ~3.18.5 - version: 3.18.5 - swagger-ui: - specifier: ~4.15.5 - version: 4.15.5 swagger-ui-react: - specifier: ~4.15.5 - version: 4.15.5(react-dom@18.2.0)(react@18.2.0) + specifier: ~5.7.2 + version: 5.7.2(@types/react-dom@18.2.7)(@types/react@18.2.22)(react-dom@18.2.0)(react@18.2.0) vscode-languageserver: specifier: ~9.0.0 version: 9.0.0 @@ -866,7 +871,7 @@ importers: specifier: ^4.18.0 version: 4.18.0 '@typespec/bundler': - specifier: workspace:~0.1.0 + specifier: workspace:~0.1.0-alpha.0 version: link:../bundler '@typespec/eslint-config-typespec': specifier: workspace:~0.48.0 @@ -929,7 +934,7 @@ importers: specifier: workspace:~0.48.1 version: link:../openapi3 '@typespec/playground': - specifier: workspace:~0.44.0 + specifier: workspace:~0.1.0-alpha.0 version: link:../playground '@typespec/protobuf': specifier: workspace:~0.48.0 @@ -974,9 +979,6 @@ importers: '@types/swagger-ui-react': specifier: ^4.18.0 version: 4.18.0 - '@typespec/bundler': - specifier: workspace:~0.1.0 - version: link:../bundler '@typespec/eslint-config-typespec': specifier: workspace:~0.48.0 version: link:../eslint-config-typespec @@ -1300,8 +1302,8 @@ importers: specifier: ~0.25.1 version: 0.25.1(typescript@5.2.2) typedoc-plugin-markdown: - specifier: ~4.0.0-next.20 - version: 4.0.0-next.20(typedoc@0.25.1) + specifier: ~4.0.0-next.22 + version: 4.0.0-next.22(typedoc@0.25.1) typescript: specifier: ~5.2.2 version: 5.2.2 @@ -1421,16 +1423,16 @@ importers: dependencies: '@docusaurus/core': specifier: ^2.4.3 - version: 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + version: 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@docusaurus/preset-classic': specifier: ^2.4.3 - version: 2.4.3(@algolia/client-search@4.17.2)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.6.0)(typescript@5.2.2) + version: 2.4.3(@algolia/client-search@4.17.2)(@swc/core@1.3.91)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.6.0)(typescript@5.2.2) '@docusaurus/theme-common': specifier: ~2.4.3 - version: 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + version: 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@docusaurus/theme-mermaid': specifier: ^2.4.3 - version: 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + version: 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@fluentui/react-components': specifier: ~9.32.1 version: 9.32.1(@types/react-dom@18.2.7)(@types/react@18.2.22)(react-dom@17.0.2)(react@17.0.2)(scheduler@0.20.2) @@ -1449,10 +1451,13 @@ importers: devDependencies: '@docusaurus/module-type-aliases': specifier: ^2.4.3 - version: 2.4.3(react-dom@17.0.2)(react@17.0.2) + version: 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) '@docusaurus/types': specifier: ^2.4.3 - version: 2.4.3(react-dom@17.0.2)(react@17.0.2) + version: 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@swc/core': + specifier: ^1.3.62 + version: 1.3.91 '@tsconfig/docusaurus': specifier: ^2.0.1 version: 2.0.1 @@ -1513,6 +1518,9 @@ importers: rimraf: specifier: ~5.0.1 version: 5.0.1 + swc-loader: + specifier: ^0.2.3 + version: 0.2.3(@swc/core@1.3.91)(webpack@5.87.0) typescript: specifier: ~5.2.2 version: 5.2.2 @@ -1671,21 +1679,21 @@ packages: /@babel/code-frame@7.12.11: resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} dependencies: - '@babel/highlight': 7.22.5 + '@babel/highlight': 7.22.20 dev: true /@babel/code-frame@7.16.7: resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.5 + '@babel/highlight': 7.22.20 dev: false /@babel/code-frame@7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.5 + '@babel/highlight': 7.22.20 dev: false /@babel/code-frame@7.22.13: @@ -1804,7 +1812,7 @@ packages: '@babel/helper-validator-option': 7.22.5 browserslist: 4.21.9 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 dev: false /@babel/helper-create-class-features-plugin@7.22.5(@babel/core@7.22.20): @@ -1822,7 +1830,7 @@ packages: '@babel/helper-replace-supers': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.5 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: false @@ -1836,7 +1844,7 @@ packages: '@babel/core': 7.22.20 '@babel/helper-annotate-as-pure': 7.22.5 regexpu-core: 5.3.2 - semver: 6.3.0 + semver: 6.3.1 dev: false /@babel/helper-define-polyfill-provider@0.4.0(@babel/core@7.22.20): @@ -1850,7 +1858,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) lodash.debounce: 4.0.8 resolve: 1.22.2 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: false @@ -1918,7 +1926,7 @@ packages: '@babel/helper-module-imports': 7.22.5 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 '@babel/template': 7.22.5 '@babel/traverse': 7.22.5 '@babel/types': 7.22.5 @@ -2007,6 +2015,7 @@ packages: /@babel/helper-validator-identifier@7.22.5: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} + dev: false /@babel/helper-validator-option@7.22.15: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} @@ -2058,14 +2067,6 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.5 - chalk: 2.4.2 - js-tokens: 4.0.0 - /@babel/parser@7.22.16: resolution: {integrity: sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==} engines: {node: '>=6.0.0'} @@ -2620,7 +2621,7 @@ packages: '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-module-transforms': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 transitivePeerDependencies: - supports-color dev: false @@ -2897,7 +2898,7 @@ packages: babel-plugin-polyfill-corejs2: 0.4.3(@babel/core@7.22.20) babel-plugin-polyfill-corejs3: 0.8.1(@babel/core@7.22.20) babel-plugin-polyfill-regenerator: 0.5.0(@babel/core@7.22.20) - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: false @@ -3097,7 +3098,7 @@ packages: babel-plugin-polyfill-corejs3: 0.8.1(@babel/core@7.22.20) babel-plugin-polyfill-regenerator: 0.5.0(@babel/core@7.22.20) core-js-compat: 3.31.0 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: false @@ -3158,6 +3159,14 @@ packages: regenerator-runtime: 0.13.11 dev: false + /@babel/runtime-corejs3@7.23.1: + resolution: {integrity: sha512-OKKfytwoc0tr7cDHwQm0RLVR3y+hDGFz3EPuvLNU/0fOeXJeKNIHj7ffNVFnncWt3sC58uyUCRSzf8nBQbyF6A==} + engines: {node: '>=6.9.0'} + dependencies: + core-js-pure: 3.31.0 + regenerator-runtime: 0.14.0 + dev: false + /@babel/runtime@7.22.5: resolution: {integrity: sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==} engines: {node: '>=6.9.0'} @@ -3228,20 +3237,20 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@braintree/sanitize-url@6.0.0: - resolution: {integrity: sha512-mgmE7XBYY/21erpzhexk4Cj1cyTQ9LzvnTxtzM17BJ7ERMNE6W72mQRo0I1Ud8eFJ+RVVIcBNhLFZ3GX4XFz5w==} - dev: false - /@braintree/sanitize-url@6.0.2: resolution: {integrity: sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg==} + /@braintree/sanitize-url@6.0.4: + resolution: {integrity: sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==} + dev: false + /@cadl-lang/compiler@0.37.0: resolution: {integrity: sha512-jHMqPZmM4evQlu7oY9vj6PEM+f+OhnfPqAdwxALrU2gwsLcwYG1h8rkjX/iK2KfeewCbXuRT/hztOTo3pcbYWA==} engines: {node: '>=16.0.0'} @@ -3254,7 +3263,7 @@ packages: js-yaml: 4.1.0 mkdirp: 1.0.4 mustache: 4.2.0 - node-fetch: 3.2.8 + node-fetch: 3.3.2 node-watch: 0.7.1 picocolors: 1.0.0 prettier: 2.7.1 @@ -3276,7 +3285,7 @@ packages: js-yaml: 4.1.0 mkdirp: 1.0.4 mustache: 4.2.0 - node-fetch: 3.2.8 + node-fetch: 3.3.2 node-watch: 0.7.1 picocolors: 1.0.0 prettier: 2.7.1 @@ -3298,7 +3307,7 @@ packages: js-yaml: 4.1.0 mkdirp: 1.0.4 mustache: 4.2.0 - node-fetch: 3.2.8 + node-fetch: 3.3.2 node-watch: 0.7.1 picocolors: 1.0.0 prettier: 2.8.7 @@ -3619,7 +3628,7 @@ packages: - search-insights dev: false - /@docusaurus/core@2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/core@2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-dWH5P7cgeNSIg9ufReX6gaCl/TmrGKD38Orbwuz05WPhAQtFXHd5B8Qym1TiXfvUNvwoYKkAJOJuGe8ou0Z7PA==} engines: {node: '>=16.14'} hasBin: true @@ -3639,11 +3648,11 @@ packages: '@babel/traverse': 7.22.5 '@docusaurus/cssnano-preset': 2.4.3 '@docusaurus/logger': 2.4.3 - '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) '@docusaurus/react-loadable': 5.5.2(react@17.0.2) - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@slorber/static-site-generator-webpack-plugin': 4.0.7 '@svgr/webpack': 6.5.1 autoprefixer: 10.4.14(postcss@8.4.24) @@ -3690,12 +3699,12 @@ packages: semver: 7.5.4 serve-handler: 6.1.5 shelljs: 0.8.5 - terser-webpack-plugin: 5.3.9(webpack@5.87.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.91)(webpack@5.87.0) tslib: 2.6.1 - update-notifier: 5.1.0 + update-notifier: 6.0.2 url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.87.0) wait-on: 6.0.1 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) webpack-bundle-analyzer: 4.9.0 webpack-dev-server: 4.15.1(webpack@5.87.0) webpack-merge: 5.9.0 @@ -3737,7 +3746,7 @@ packages: tslib: 2.6.1 dev: false - /@docusaurus/mdx-loader@2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2): + /@docusaurus/mdx-loader@2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-b1+fDnWtl3GiqkL0BRjYtc94FZrcDDBV1j8446+4tptB9BAOlePwG2p/pK6vGvfL53lkOsszXMghr2g67M0vCw==} engines: {node: '>=16.14'} peerDependencies: @@ -3747,7 +3756,7 @@ packages: '@babel/parser': 7.22.5 '@babel/traverse': 7.22.5 '@docusaurus/logger': 2.4.3 - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@mdx-js/mdx': 1.6.22 escape-html: 1.0.3 file-loader: 6.2.0(webpack@5.87.0) @@ -3762,7 +3771,7 @@ packages: unified: 9.2.2 unist-util-visit: 2.0.3 url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.87.0) - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) transitivePeerDependencies: - '@docusaurus/types' - '@swc/core' @@ -3772,14 +3781,14 @@ packages: - webpack-cli dev: false - /@docusaurus/module-type-aliases@2.4.3(react-dom@17.0.2)(react@17.0.2): + /@docusaurus/module-type-aliases@2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-cwkBkt1UCiduuvEAo7XZY01dJfRn7UR/75mBgOdb1hKknhrabJZ8YH+7savd/y9kLExPyrhe0QwdS9GuzsRRIA==} peerDependencies: react: '*' react-dom: '*' dependencies: '@docusaurus/react-loadable': 5.5.2(react@17.0.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) '@types/history': 4.7.11 '@types/react': 18.2.22 '@types/react-router-config': 5.0.7 @@ -3794,20 +3803,20 @@ packages: - uglify-js - webpack-cli - /@docusaurus/plugin-content-blog@2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/plugin-content-blog@2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-PVhypqaA0t98zVDpOeTqWUTvRqCEjJubtfFUQ7zJNYdbYTbS/E/ytq6zbLVsN/dImvemtO/5JQgjLxsh8XLo8Q==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@docusaurus/logger': 2.4.3 - '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) cheerio: 1.0.0-rc.12 feed: 4.2.2 fs-extra: 10.1.0 @@ -3818,7 +3827,7 @@ packages: tslib: 2.6.1 unist-util-visit: 2.0.3 utility-types: 3.10.0 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) transitivePeerDependencies: - '@parcel/css' - '@swc/core' @@ -3837,20 +3846,20 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-content-docs@2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/plugin-content-docs@2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-N7Po2LSH6UejQhzTCsvuX5NOzlC+HiXOVvofnEPj0WhMu1etpLEXE6a4aTxrtg95lQ5kf0xUIdjX9sh3d3G76A==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@docusaurus/logger': 2.4.3 - '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/module-type-aliases': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/module-type-aliases': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@types/react-router-config': 5.0.7 combine-promises: 1.1.0 fs-extra: 10.1.0 @@ -3861,7 +3870,7 @@ packages: react-dom: 17.0.2(react@17.0.2) tslib: 2.6.1 utility-types: 3.10.0 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) transitivePeerDependencies: - '@parcel/css' - '@swc/core' @@ -3880,23 +3889,23 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-content-pages@2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/plugin-content-pages@2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-txtDVz7y3zGk67q0HjG0gRttVPodkHqE0bpJ+7dOaTH40CQFLSh7+aBeGnPOTl+oCPG+hxkim4SndqPqXjQ8Bg==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) fs-extra: 10.1.0 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) tslib: 2.6.1 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) transitivePeerDependencies: - '@parcel/css' - '@swc/core' @@ -3915,16 +3924,16 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-debug@2.4.3(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/plugin-debug@2.4.3(@swc/core@1.3.91)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-LkUbuq3zCmINlFb+gAd4ZvYr+bPAzMC0hwND4F7V9bZ852dCX8YoWyovVUBKq4er1XsOwSQaHmNGtObtn8Av8Q==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) fs-extra: 10.1.0 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) @@ -3950,16 +3959,16 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-google-analytics@2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/plugin-google-analytics@2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-KzBV3k8lDkWOhg/oYGxlK5o9bOwX7KpPc/FTWoB+SfKhlHfhq7qcQdMi1elAaVEIop8tgK6gD1E58Q+XC6otSQ==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) react: 17.0.2 react-dom: 17.0.2(react@17.0.2) tslib: 2.6.1 @@ -3981,16 +3990,16 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-google-gtag@2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/plugin-google-gtag@2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-5FMg0rT7sDy4i9AGsvJC71MQrqQZwgLNdDetLEGDHLfSHLvJhQbTCUGbGXknUgWXQJckcV/AILYeJy+HhxeIFA==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) react: 17.0.2 react-dom: 17.0.2(react@17.0.2) tslib: 2.6.1 @@ -4012,16 +4021,16 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-google-tag-manager@2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/plugin-google-tag-manager@2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-1jTzp71yDGuQiX9Bi0pVp3alArV0LSnHXempvQTxwCGAEzUWWaBg4d8pocAlTpbP9aULQQqhgzrs8hgTRPOM0A==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) react: 17.0.2 react-dom: 17.0.2(react@17.0.2) tslib: 2.6.1 @@ -4043,19 +4052,19 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-sitemap@2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/plugin-sitemap@2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-LRQYrK1oH1rNfr4YvWBmRzTL0LN9UAPxBbghgeFRBm5yloF6P+zv1tm2pe2hQTX/QP5bSKdnajCvfnScgKXMZQ==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@docusaurus/logger': 2.4.3 - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) fs-extra: 10.1.0 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) @@ -4079,26 +4088,26 @@ packages: - webpack-cli dev: false - /@docusaurus/preset-classic@2.4.3(@algolia/client-search@4.17.2)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.6.0)(typescript@5.2.2): + /@docusaurus/preset-classic@2.4.3(@algolia/client-search@4.17.2)(@swc/core@1.3.91)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.6.0)(typescript@5.2.2): resolution: {integrity: sha512-tRyMliepY11Ym6hB1rAFSNGwQDpmszvWYJvlK1E+md4SW8i6ylNHtpZjaYFff9Mdk3i/Pg8ItQq9P0daOJAvQw==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-content-blog': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-content-docs': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-content-pages': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-debug': 2.4.3(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-google-analytics': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-google-gtag': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-google-tag-manager': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-sitemap': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/theme-classic': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/theme-search-algolia': 2.4.3(@algolia/client-search@4.17.2)(@docusaurus/types@2.4.3)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.6.0)(typescript@5.2.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-content-blog': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-content-docs': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-content-pages': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-debug': 2.4.3(@swc/core@1.3.91)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-google-analytics': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-google-gtag': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-google-tag-manager': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-sitemap': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/theme-classic': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/theme-search-algolia': 2.4.3(@algolia/client-search@4.17.2)(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.6.0)(typescript@5.2.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) react: 17.0.2 react-dom: 17.0.2(react@17.0.2) transitivePeerDependencies: @@ -4132,25 +4141,25 @@ packages: prop-types: 15.8.1 react: 17.0.2 - /@docusaurus/theme-classic@2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/theme-classic@2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-QKRAJPSGPfDY2yCiPMIVyr+MqwZCIV2lxNzqbyUW0YkrlmdzzP3WuQJPMGLCjWgQp/5c9kpWMvMxjhpZx1R32Q==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/module-type-aliases': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/plugin-content-blog': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-content-docs': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-content-pages': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/module-type-aliases': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/plugin-content-blog': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-content-docs': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-content-pages': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@docusaurus/theme-translations': 2.4.3 - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@mdx-js/react': 1.6.22(react@17.0.2) clsx: 1.2.1 copy-text-to-clipboard: 3.1.0 @@ -4184,19 +4193,19 @@ packages: - webpack-cli dev: false - /@docusaurus/theme-common@2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/theme-common@2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-7KaDJBXKBVGXw5WOVt84FtN8czGWhM0lbyWEZXGp8AFfL6sZQfRTluFp4QriR97qwzSyOfQb+nzcDZZU4tezUw==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/module-type-aliases': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/plugin-content-blog': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-content-docs': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/plugin-content-pages': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/mdx-loader': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/module-type-aliases': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/plugin-content-blog': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-content-docs': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-content-pages': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@docusaurus/utils-common': 2.4.3(@docusaurus/types@2.4.3) '@types/history': 4.7.11 '@types/react': 18.2.22 @@ -4228,18 +4237,18 @@ packages: - webpack-cli dev: false - /@docusaurus/theme-mermaid@2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@docusaurus/theme-mermaid@2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-S1tZ3xpowtFiTrpTKmvVbRHUYGOlEG5CnPzWlO4huJT1sAwLR+pD6f9DYUlPv2+9NezF3EfUrUyW9xLH0UP58w==} engines: {node: '>=16.14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/module-type-aliases': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/module-type-aliases': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) '@mdx-js/react': 1.6.22(react@17.0.2) mermaid: 9.4.3 react: 17.0.2 @@ -4263,7 +4272,7 @@ packages: - webpack-cli dev: false - /@docusaurus/theme-search-algolia@2.4.3(@algolia/client-search@4.17.2)(@docusaurus/types@2.4.3)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.6.0)(typescript@5.2.2): + /@docusaurus/theme-search-algolia@2.4.3(@algolia/client-search@4.17.2)(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(@types/react@18.2.22)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.6.0)(typescript@5.2.2): resolution: {integrity: sha512-jziq4f6YVUB5hZOB85ELATwnxBz/RmSLD3ksGQOLDPKVzat4pmI8tddNWtriPpxR04BNT+ZfpPUMFkNFetSW1Q==} engines: {node: '>=16.14'} peerDependencies: @@ -4271,13 +4280,13 @@ packages: react-dom: ^16.8.4 || ^17.0.0 dependencies: '@docsearch/react': 3.5.1(@algolia/client-search@4.17.2)(@types/react@18.2.22)(react-dom@17.0.2)(react@17.0.2)(search-insights@2.6.0) - '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/core': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@docusaurus/logger': 2.4.3 - '@docusaurus/plugin-content-docs': 2.4.3(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/plugin-content-docs': 2.4.3(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@docusaurus/theme-common': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91)(eslint@8.49.0)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@docusaurus/theme-translations': 2.4.3 - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) - '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) + '@docusaurus/utils-validation': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) algoliasearch: 4.17.2 algoliasearch-helper: 3.13.2(algoliasearch@4.17.2) clsx: 1.2.1 @@ -4318,7 +4327,7 @@ packages: tslib: 2.6.1 dev: false - /@docusaurus/types@2.4.3(react-dom@17.0.2)(react@17.0.2): + /@docusaurus/types@2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-W6zNLGQqfrp/EoPD0bhb9n7OobP+RHpmvVzpA+Z/IuU3Q63njJM24hmT0GYboovWcDtFmnIJC9wcyx4RVPQscw==} peerDependencies: react: ^16.8.4 || ^17.0.0 @@ -4332,7 +4341,7 @@ packages: react-dom: 17.0.2(react@17.0.2) react-helmet-async: 1.3.0(react-dom@17.0.2)(react@17.0.2) utility-types: 3.10.0 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) webpack-merge: 5.9.0 transitivePeerDependencies: - '@swc/core' @@ -4349,16 +4358,16 @@ packages: '@docusaurus/types': optional: true dependencies: - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) tslib: 2.6.1 dev: false - /@docusaurus/utils-validation@2.4.3(@docusaurus/types@2.4.3): + /@docusaurus/utils-validation@2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91): resolution: {integrity: sha512-G2+Vt3WR5E/9drAobP+hhZQMaswRwDlp6qOMi7o7ZypB+VO7N//DZWhZEwhcRGepMDJGQEwtPv7UxtYwPL9PBw==} engines: {node: '>=16.14'} dependencies: '@docusaurus/logger': 2.4.3 - '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3) + '@docusaurus/utils': 2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91) joi: 17.9.2 js-yaml: 4.1.0 tslib: 2.6.1 @@ -4371,7 +4380,7 @@ packages: - webpack-cli dev: false - /@docusaurus/utils@2.4.3(@docusaurus/types@2.4.3): + /@docusaurus/utils@2.4.3(@docusaurus/types@2.4.3)(@swc/core@1.3.91): resolution: {integrity: sha512-fKcXsjrD86Smxv8Pt0TBFqYieZZCPh4cbf9oszUq/AMhZn3ujwpKaVYZACPX8mmjtYx0JOgNx52CREBfiGQB4A==} engines: {node: '>=16.14'} peerDependencies: @@ -4381,7 +4390,7 @@ packages: optional: true dependencies: '@docusaurus/logger': 2.4.3 - '@docusaurus/types': 2.4.3(react-dom@17.0.2)(react@17.0.2) + '@docusaurus/types': 2.4.3(@swc/core@1.3.91)(react-dom@17.0.2)(react@17.0.2) '@svgr/webpack': 6.5.1 escape-string-regexp: 4.0.0 file-loader: 6.2.0(webpack@5.87.0) @@ -4396,7 +4405,7 @@ packages: shelljs: 0.8.5 tslib: 2.6.1 url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.87.0) - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) transitivePeerDependencies: - '@swc/core' - esbuild @@ -4757,6 +4766,11 @@ packages: resolution: {integrity: sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@fastify/busboy@2.0.0: + resolution: {integrity: sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==} + engines: {node: '>=14'} + dev: false + /@floating-ui/core@1.3.1: resolution: {integrity: sha512-Bu+AMaXNjrpjh41znzHqaz3r2Nr8hHuHZT6V2LBKMhyMl0FgKA62PNYbqnfgmzOhoWZj70Zecisbo4H1rotP5g==} dev: false @@ -7358,6 +7372,27 @@ packages: fsevents: 2.3.2 dev: true + /@pnpm/config.env-replace@1.1.0: + resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} + engines: {node: '>=12.22.0'} + dev: false + + /@pnpm/network.ca-file@1.0.2: + resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} + engines: {node: '>=12.22.0'} + dependencies: + graceful-fs: 4.2.10 + dev: false + + /@pnpm/npm-conf@2.2.2: + resolution: {integrity: sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==} + engines: {node: '>=12'} + dependencies: + '@pnpm/config.env-replace': 1.1.0 + '@pnpm/network.ca-file': 1.0.2 + config-chain: 1.1.13 + dev: false + /@polka/url@1.0.0-next.21: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: false @@ -7494,9 +7529,9 @@ packages: resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} dev: false - /@sindresorhus/is@0.14.0: - resolution: {integrity: sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==} - engines: {node: '>=6'} + /@sindresorhus/is@5.6.0: + resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==} + engines: {node: '>=14.16'} dev: false /@sinonjs/commons@2.0.0: @@ -7691,17 +7726,449 @@ packages: - supports-color dev: false + /@swagger-api/apidom-ast@0.77.0: + resolution: {integrity: sha512-BqYc3oZEJ23x9KlamGjNbIymhKId0qxcqykjet7fO3NWm1c68ix/S+VgheTKig8Gl4IJ2lT+Cz3C178ia90ydQ==} + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-error': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + unraw: 3.0.0 + dev: false + + /@swagger-api/apidom-core@0.77.0: + resolution: {integrity: sha512-Yec/Ek6tH8uaHpFsL8/KfOjkunUdQOf42467QfAkG4Df1u9fdrBIuk8y6oFOO5KAE4WXNjoOQW+Z865WCMwmkA==} + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-ast': 0.77.0 + '@swagger-api/apidom-error': 0.77.0 + '@types/ramda': 0.29.5 + minim: 0.23.8 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + short-unique-id: 5.0.3 + stampit: 4.3.2 + dev: false + + /@swagger-api/apidom-error@0.77.0: + resolution: {integrity: sha512-7QQPwUdGAxxvAegJntbzuBD0ApPsdMay6nV3UpxQs/F4q4cTaxeTX8HCp2NefXR4B6VHps0oVvIyXf/LDQUtYw==} + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + + /@swagger-api/apidom-json-pointer@0.77.0: + resolution: {integrity: sha512-VPslp6GbloFDNYTq3QV4z+ByxiqIDQVqqDebVhg70YWriU2+tVJCNV55770AZa8Yqj7QOIafXQoPFg8uAYu0yw==} + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-error': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + + /@swagger-api/apidom-ns-api-design-systems@0.77.0: + resolution: {integrity: sha512-FaadpkDoClkomlOv4yT7Wc+Q+kb0uN7iBoo7j8+vnI2ID13I3FDaeqUcADsGdIgNT3JxaK/esJVIln+65TTdwA==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-error': 0.77.0 + '@swagger-api/apidom-ns-openapi-3-1': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + dev: false + optional: true + + /@swagger-api/apidom-ns-asyncapi-2@0.77.0: + resolution: {integrity: sha512-4IbR49AIihXiegT/NHLCfxp6l+zco/ztUIUoJhnJuRdZ11U1PXaVhYGEdmQX+FoDtEUim17p5FnXSzi0uatbIw==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-json-schema-draft-7': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + dev: false + optional: true + + /@swagger-api/apidom-ns-json-schema-draft-4@0.77.0: + resolution: {integrity: sha512-LLfNNDuoLNgKgN8ddPJxc5QCYgst3G1BnXEU+0lIFyVlFb5xowZiW4utYtfx/eRBy+UxpgTIk04hvvbaYppFZQ==} + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-ast': 0.77.0 + '@swagger-api/apidom-core': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + dev: false + + /@swagger-api/apidom-ns-json-schema-draft-6@0.77.0: + resolution: {integrity: sha512-1tXzvGdc96mHelU9IXp28pLRf/OHqCTOKtUNywwhmICEQHs9PVrPpFq4fuMjLA+QvusdUA0Z4PsYR6d51Qnv3Q==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-error': 0.77.0 + '@swagger-api/apidom-ns-json-schema-draft-4': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + dev: false + optional: true + + /@swagger-api/apidom-ns-json-schema-draft-7@0.77.0: + resolution: {integrity: sha512-UTwogsJ7gnCcXlwIEriezPwi6Q84rgxYrQxbwqEJN6VrYWb0R1MPJ+CnD6XkkciEI8ETfDs/3NKqto98UjRgkw==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-error': 0.77.0 + '@swagger-api/apidom-ns-json-schema-draft-6': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + dev: false + optional: true + + /@swagger-api/apidom-ns-openapi-3-0@0.77.0: + resolution: {integrity: sha512-gqd14CVh+ufC8HSVCMmBfpBU7I/2L2fb9TO3b3mI8K38D+k2dbgBsxOch3efo7x+Diwu8QNdwQFuC2n7WAwO5Q==} + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-json-schema-draft-4': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + dev: false + + /@swagger-api/apidom-ns-openapi-3-1@0.77.0: + resolution: {integrity: sha512-UcGE5xMKRO+T7oFDIqYjr1kOHKe37MuUsd1CmTwu+QqZALk4L4IwOs6UUxDPyDLNeAP9g8VoXPJAPSFV0IEyYA==} + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-ast': 0.77.0 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-openapi-3-0': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + dev: false + + /@swagger-api/apidom-parser-adapter-api-design-systems-json@0.77.0: + resolution: {integrity: sha512-dwotraK1i80r4zKhV2a8p0qaPBn3dA4e167KUoY/ugwmf1lAtKL+K/Ow74wiOxQME2VD6HkM/CUV0nFJUWCS2A==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-api-design-systems': 0.77.0 + '@swagger-api/apidom-parser-adapter-json': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + optional: true + + /@swagger-api/apidom-parser-adapter-api-design-systems-yaml@0.77.0: + resolution: {integrity: sha512-ftHsFBgNdcpMqVkRXwWyatLjaaOFdgecKPA6/1q0F0NRGEDTdWocyI4KkLuAywbpo6XsbwOHZG2cK26cbLlBEA==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-api-design-systems': 0.77.0 + '@swagger-api/apidom-parser-adapter-yaml-1-2': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + optional: true + + /@swagger-api/apidom-parser-adapter-asyncapi-json-2@0.77.0: + resolution: {integrity: sha512-nV2aEmZ1YeXSLbnymBNlhBdwWgQAg3DPO1bIEPJifz6zopBjcW+q+MjGAdyj57dmqygL3QoddroKCF7wGgAlLg==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-asyncapi-2': 0.77.0 + '@swagger-api/apidom-parser-adapter-json': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + optional: true + + /@swagger-api/apidom-parser-adapter-asyncapi-yaml-2@0.77.0: + resolution: {integrity: sha512-fiYfoOttR3zbquaMzZji/+KcbGK092HQjE0HQpGvu/HfJWGfg51A0iFoWE+ebx2tklN3AhV6CD2NJuRa9DlphA==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-asyncapi-2': 0.77.0 + '@swagger-api/apidom-parser-adapter-yaml-1-2': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + optional: true + + /@swagger-api/apidom-parser-adapter-json@0.77.0: + resolution: {integrity: sha512-nx8zqwHIhI0E+vpgQZ2rONdrmmdnSVum3Qct2h6JetYr72UWnFDqVgxOpGbOScMH1kvG7u2n5LpfjJw02uNDKg==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-ast': 0.77.0 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-error': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + tree-sitter: 0.20.4 + tree-sitter-json: 0.20.0 + web-tree-sitter: 0.20.3 + dev: false + optional: true + + /@swagger-api/apidom-parser-adapter-openapi-json-3-0@0.77.0: + resolution: {integrity: sha512-J9hiyVJg19SVgbemK/Ug1l4FjXZ4zCsxTKAlYxVSwjONJI4YdE2SqKG26JagBaTMHeJRZYK4BAC2pXAvAUKISg==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-openapi-3-0': 0.77.0 + '@swagger-api/apidom-parser-adapter-json': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + optional: true + + /@swagger-api/apidom-parser-adapter-openapi-json-3-1@0.77.0: + resolution: {integrity: sha512-iLputU+USOtJNcUpr5mEMtWFIgdzYGAor4gujfhBbhctGDzdtFAumBU5j/hLRBQoHbfZ00o5379ekxHMDi2/7w==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-openapi-3-1': 0.77.0 + '@swagger-api/apidom-parser-adapter-json': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + optional: true + + /@swagger-api/apidom-parser-adapter-openapi-yaml-3-0@0.77.0: + resolution: {integrity: sha512-SDZkiCF5863Q6yfCtL4pZkh0s7J6Q8kZodW8CN9zHQ025BbjfbbddTXbSefx7h/Dc3g4QyGi2XT+Qu4lvrlbkg==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-openapi-3-0': 0.77.0 + '@swagger-api/apidom-parser-adapter-yaml-1-2': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + optional: true + + /@swagger-api/apidom-parser-adapter-openapi-yaml-3-1@0.77.0: + resolution: {integrity: sha512-JxfVLS4xB7UctZPaPUZyr0WbOh7DGchfCGJvMYCgTQ+oxJaKxUvAaJveA5Ch6DkMdwLJDIRBYFJGUXQOfKN1eQ==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-ns-openapi-3-1': 0.77.0 + '@swagger-api/apidom-parser-adapter-yaml-1-2': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + dev: false + optional: true + + /@swagger-api/apidom-parser-adapter-yaml-1-2@0.77.0: + resolution: {integrity: sha512-ID3WXpa+4+/ip+4IlDHOvGevS/4M/OzZvtHhNReY4fSz+kTVIdp0C4tqDHcll+2+U360O4Y+bAChvI5BlrYgcw==} + requiresBuild: true + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-ast': 0.77.0 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-error': 0.77.0 + '@types/ramda': 0.29.5 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + tree-sitter: 0.20.4 + tree-sitter-yaml: 0.5.0 + web-tree-sitter: 0.20.3 + dev: false + optional: true + + /@swagger-api/apidom-reference@0.77.0: + resolution: {integrity: sha512-hwViVP7CORnuMYpxav1LH1YPslJyUAx3YsyMwrg5yeo7d8Fn1PCV7VYyFwvjgfOOdFinDkjZxKA9GXDVk2mR0g==} + dependencies: + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@types/ramda': 0.29.5 + axios: 1.5.1 + minimatch: 7.4.6 + process: 0.11.10 + ramda: 0.29.0 + ramda-adjunct: 4.1.1(ramda@0.29.0) + stampit: 4.3.2 + optionalDependencies: + '@swagger-api/apidom-error': 0.77.0 + '@swagger-api/apidom-json-pointer': 0.77.0 + '@swagger-api/apidom-ns-asyncapi-2': 0.77.0 + '@swagger-api/apidom-ns-openapi-3-0': 0.77.0 + '@swagger-api/apidom-ns-openapi-3-1': 0.77.0 + '@swagger-api/apidom-parser-adapter-api-design-systems-json': 0.77.0 + '@swagger-api/apidom-parser-adapter-api-design-systems-yaml': 0.77.0 + '@swagger-api/apidom-parser-adapter-asyncapi-json-2': 0.77.0 + '@swagger-api/apidom-parser-adapter-asyncapi-yaml-2': 0.77.0 + '@swagger-api/apidom-parser-adapter-json': 0.77.0 + '@swagger-api/apidom-parser-adapter-openapi-json-3-0': 0.77.0 + '@swagger-api/apidom-parser-adapter-openapi-json-3-1': 0.77.0 + '@swagger-api/apidom-parser-adapter-openapi-yaml-3-0': 0.77.0 + '@swagger-api/apidom-parser-adapter-openapi-yaml-3-1': 0.77.0 + '@swagger-api/apidom-parser-adapter-yaml-1-2': 0.77.0 + transitivePeerDependencies: + - debug + dev: false + + /@swc/core-darwin-arm64@1.3.91: + resolution: {integrity: sha512-7kHGiQ1he5khcEeJuHDmLZPM3rRL/ith5OTmV6bOPsoHi46kLeixORW+ts1opC3tC9vu6xbk16xgX0QAJchc1w==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optional: true + + /@swc/core-darwin-x64@1.3.91: + resolution: {integrity: sha512-8SpU18FbFpZDVzsHsAwdI1thF/picQGxq9UFxa8W+T9SDnbsqwFJv/6RqKJeJoDV6qFdl2OLjuO0OL7xrp0qnQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + optional: true + + /@swc/core-linux-arm-gnueabihf@1.3.91: + resolution: {integrity: sha512-fOq4Cy8UbwX1yf0WB0d8hWZaIKCnPtPGguRqdXGLfwvhjZ9SIErT6PnmGTGRbQCNCIkOZWHKyTU0r8t2dN3haQ==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-linux-arm64-gnu@1.3.91: + resolution: {integrity: sha512-fki4ioRP/Esy4vdp8T34RCV+V9dqkRmOt763pf74pdiyFV2dPLXa5lnw/XvR1RTfPGknrYgjEQLCfZlReTryRw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-linux-arm64-musl@1.3.91: + resolution: {integrity: sha512-XrG+DUUqNtfVLcJ20imby7fpBwQNG5VsEQBzQndSonPyUOa2YkTbBb60YDondfQGDABopuHH8gHN8o2H2/VCnQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-linux-x64-gnu@1.3.91: + resolution: {integrity: sha512-d11bYhX+YPBr/Frcjc6eVn3C0LuS/9U1Li9EmQ+6s9EpYtYRl2ygSlC8eueLbaiazBnCVYFnc8bU4o0kc5B9sw==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-linux-x64-musl@1.3.91: + resolution: {integrity: sha512-2SRp5Dke2P4jCQePkDx9trkkTstnRpZJVw5r3jvYdk0zeO6iC4+ZPvvoWXJLigqQv/fZnIiSUfJ6ssOoaEqTzQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-win32-arm64-msvc@1.3.91: + resolution: {integrity: sha512-l9qKXikOxj42UIjbeZpz9xtBmr736jOMqInNP8mVF2/U+ws5sI8zJjcOFFtfis4ru7vWCXhB1wtltdlJYO2vGA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + optional: true + + /@swc/core-win32-ia32-msvc@1.3.91: + resolution: {integrity: sha512-+s+52O0QVPmzOgjEe/rcb0AK6q/J7EHKwAyJCu/FaYO9df5ovE0HJjSKP6HAF0dGPO5hkENrXuNGujofUH9vtQ==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + optional: true + + /@swc/core-win32-x64-msvc@1.3.91: + resolution: {integrity: sha512-7u9HDQhjUC3Gv43EFW84dZtduWCSa4MgltK+Sp9zEGti6WXqDPu/ESjvDsQEVYTBEMEvZs/xVAXPgLVHorV5nQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + requiresBuild: true + optional: true + + /@swc/core@1.3.91: + resolution: {integrity: sha512-r950d0fdlZ8qbSDyvApn3HyCojiZE8xpgJzQvypeMi32dalYwugdJKWyLB55JIGMRGJ8+lmVvY4MPGkSR3kXgA==} + engines: {node: '>=10'} + requiresBuild: true + peerDependencies: + '@swc/helpers': ^0.5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@swc/counter': 0.1.2 + '@swc/types': 0.1.5 + optionalDependencies: + '@swc/core-darwin-arm64': 1.3.91 + '@swc/core-darwin-x64': 1.3.91 + '@swc/core-linux-arm-gnueabihf': 1.3.91 + '@swc/core-linux-arm64-gnu': 1.3.91 + '@swc/core-linux-arm64-musl': 1.3.91 + '@swc/core-linux-x64-gnu': 1.3.91 + '@swc/core-linux-x64-musl': 1.3.91 + '@swc/core-win32-arm64-msvc': 1.3.91 + '@swc/core-win32-ia32-msvc': 1.3.91 + '@swc/core-win32-x64-msvc': 1.3.91 + + /@swc/counter@0.1.2: + resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} + /@swc/helpers@0.5.2: resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} dependencies: tslib: 2.6.1 dev: false - /@szmarczak/http-timer@1.1.2: - resolution: {integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==} - engines: {node: '>=6'} + /@swc/types@0.1.5: + resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} + + /@szmarczak/http-timer@5.0.1: + resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} + engines: {node: '>=14.16'} dependencies: - defer-to-connect: 1.1.3 + defer-to-connect: 2.0.1 dev: false /@tootallnate/once@2.0.0: @@ -7780,6 +8247,7 @@ packages: /@types/debug@4.1.8: resolution: {integrity: sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==} + requiresBuild: true dependencies: '@types/ms': 0.7.31 dev: true @@ -7844,6 +8312,10 @@ packages: resolution: {integrity: sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==} dev: false + /@types/http-cache-semantics@4.0.2: + resolution: {integrity: sha512-FD+nQWA2zJjh4L9+pFXqWOi0Hs1ryBCfI+985NjluQ1p8EYtoLvjLOKidXBtZ4/IcxDX4o8/E8qDS3540tNliw==} + dev: false + /@types/http-proxy@1.17.11: resolution: {integrity: sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA==} dependencies: @@ -7893,6 +8365,7 @@ packages: /@types/ms@0.7.31: resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} + requiresBuild: true dev: true /@types/mustache@4.2.2: @@ -7943,6 +8416,12 @@ packages: resolution: {integrity: sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==} dev: false + /@types/ramda@0.29.5: + resolution: {integrity: sha512-oBBdRfoZoCl/aBIpBbct/uUHAbJ5i7vSOHK83SvH2Qr9ermYITRNKnEYgGJlnkagUY2cu8L2//Jq7o1355Go5A==} + dependencies: + types-ramda: 0.29.5 + dev: false + /@types/range-parser@1.2.4: resolution: {integrity: sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==} dev: false @@ -7952,15 +8431,6 @@ packages: dependencies: '@types/react': 18.2.22 - /@types/react-redux@7.1.25: - resolution: {integrity: sha512-bAGh4e+w5D8dajd6InASVIyCo4pZLJ66oLb80F9OBLO1gKESbZcRCJpTT6uLXX+HAB57zw1WTdwJdAsewuTweg==} - dependencies: - '@types/hoist-non-react-statics': 3.3.1 - '@types/react': 18.2.22 - hoist-non-react-statics: 3.3.2 - redux: 4.2.1 - dev: false - /@types/react-router-config@5.0.7: resolution: {integrity: sha512-pFFVXUIydHlcJP6wJm7sDii5mD/bCmmAY0wQzq+M+uX7bqS95AQqHZWP1iNMKrWVQSuHIzj5qi9BvrtLX2/T4w==} dependencies: @@ -8056,6 +8526,10 @@ packages: /@types/unist@2.0.6: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} + /@types/use-sync-external-store@0.0.3: + resolution: {integrity: sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==} + dev: false + /@types/vscode@1.82.0: resolution: {integrity: sha512-VSHV+VnpF8DEm8LNrn8OJ8VuUNcBzN3tMvKrNpbhhfuVjFm82+6v44AbDhLvVFgCzn6vs94EJNTp7w8S6+Q1Rw==} dev: true @@ -8283,7 +8757,7 @@ packages: js-yaml: 4.1.0 mkdirp: 1.0.4 mustache: 4.2.0 - node-fetch: 3.2.8 + node-fetch: 3.3.2 node-watch: 0.7.1 picocolors: 1.0.0 prettier: 2.8.7 @@ -8305,7 +8779,7 @@ packages: js-yaml: 4.1.0 mkdirp: 1.0.4 mustache: 4.2.0 - node-fetch: 3.2.8 + node-fetch: 3.3.2 node-watch: 0.7.1 picocolors: 1.0.0 prettier: 2.8.7 @@ -8739,7 +9213,6 @@ packages: /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - dev: true /at-least-node@1.0.0: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} @@ -8783,6 +9256,16 @@ packages: - debug dev: false + /axios@1.5.1: + resolution: {integrity: sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==} + dependencies: + follow-redirects: 1.15.2 + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + dev: false + /azure-devops-node-api@11.2.0: resolution: {integrity: sha512-XdiGPhrpaT5J8wdERRKs5g8E0Zy1pvOYTli7z9E8nmOn3YGp4FhtjhrOyFmX/8veWCwdI69mCHKJw6l+4J/bHA==} dependencies: @@ -8802,7 +9285,7 @@ packages: loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /babel-plugin-apply-mdx-type-prop@1.6.22(@babel/core@7.12.9): @@ -8844,7 +9327,7 @@ packages: '@babel/compat-data': 7.22.5 '@babel/core': 7.22.20 '@babel/helper-define-polyfill-provider': 0.4.0(@babel/core@7.22.20) - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: false @@ -8910,7 +9393,6 @@ packages: buffer: 5.7.1 inherits: 2.0.4 readable-stream: 3.6.2 - dev: true optional: true /body-parser@1.20.1: @@ -8943,27 +9425,27 @@ packages: /boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - /boxen@5.1.2: - resolution: {integrity: sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==} - engines: {node: '>=10'} + /boxen@6.2.1: + resolution: {integrity: sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: ansi-align: 3.0.1 camelcase: 6.3.0 chalk: 4.1.2 - cli-boxes: 2.2.1 - string-width: 4.2.3 - type-fest: 0.20.2 - widest-line: 3.1.0 - wrap-ansi: 7.0.0 + cli-boxes: 3.0.0 + string-width: 5.1.2 + type-fest: 2.19.0 + widest-line: 4.0.1 + wrap-ansi: 8.1.0 dev: false - /boxen@6.2.1: - resolution: {integrity: sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + /boxen@7.1.1: + resolution: {integrity: sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==} + engines: {node: '>=14.16'} dependencies: ansi-align: 3.0.1 - camelcase: 6.3.0 - chalk: 4.1.2 + camelcase: 7.0.1 + chalk: 5.3.0 cli-boxes: 3.0.0 string-width: 5.1.2 type-fest: 2.19.0 @@ -9026,7 +9508,6 @@ packages: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 - dev: true optional: true /buffer@6.0.3: @@ -9076,17 +9557,22 @@ packages: yargs-parser: 21.1.1 dev: true - /cacheable-request@6.1.0: - resolution: {integrity: sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==} - engines: {node: '>=8'} + /cacheable-lookup@7.0.0: + resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} + engines: {node: '>=14.16'} + dev: false + + /cacheable-request@10.2.13: + resolution: {integrity: sha512-3SD4rrMu1msNGEtNSt8Od6enwdo//U9s4ykmXfA2TD58kcLkCobtCDiby7kNyj7a/Q7lz/mAesAFI54rTdnvBA==} + engines: {node: '>=14.16'} dependencies: - clone-response: 1.0.3 - get-stream: 5.2.0 + '@types/http-cache-semantics': 4.0.2 + get-stream: 6.0.1 http-cache-semantics: 4.1.1 - keyv: 3.1.0 - lowercase-keys: 2.0.0 - normalize-url: 4.5.1 - responselike: 1.0.2 + keyv: 4.5.3 + mimic-response: 4.0.0 + normalize-url: 8.0.0 + responselike: 3.0.0 dev: false /call-bind@1.0.2: @@ -9115,6 +9601,11 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} + /camelcase@7.0.1: + resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==} + engines: {node: '>=14.16'} + dev: false + /caniuse-api@3.0.0: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: @@ -9160,6 +9651,11 @@ packages: ansi-styles: 4.3.0 supports-color: 7.2.0 + /chalk@5.3.0: + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + dev: false + /change-case@4.1.2: resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} dependencies: @@ -9199,6 +9695,7 @@ packages: /character-entities@2.0.2: resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + requiresBuild: true dev: true /character-reference-invalid@1.1.4: @@ -9254,17 +9751,12 @@ packages: /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} requiresBuild: true - dev: true optional: true /chrome-trace-event@1.0.3: resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} engines: {node: '>=6.0'} - /ci-info@2.0.0: - resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} - dev: false - /ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} @@ -9301,11 +9793,6 @@ packages: resolve-from: 5.0.0 dev: false - /cli-boxes@2.2.1: - resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} - engines: {node: '>=6'} - dev: false - /cli-boxes@3.0.0: resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==} engines: {node: '>=10'} @@ -9343,12 +9830,6 @@ packages: kind-of: 6.0.3 shallow-clone: 3.0.1 - /clone-response@1.0.3: - resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} - dependencies: - mimic-response: 1.0.1 - dev: false - /clsx@1.2.1: resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} engines: {node: '>=6'} @@ -9393,7 +9874,6 @@ packages: engines: {node: '>= 0.8'} dependencies: delayed-stream: 1.0.0 - dev: true /comma-separated-tokens@1.0.8: resolution: {integrity: sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==} @@ -9488,6 +9968,13 @@ packages: /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + /config-chain@1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + dependencies: + ini: 1.3.8 + proto-list: 1.2.4 + dev: false + /configstore@5.0.1: resolution: {integrity: sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==} engines: {node: '>=8'} @@ -9500,6 +9987,17 @@ packages: xdg-basedir: 4.0.0 dev: false + /configstore@6.0.0: + resolution: {integrity: sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==} + engines: {node: '>=12'} + dependencies: + dot-prop: 6.0.1 + graceful-fs: 4.2.11 + unique-string: 3.0.0 + write-file-atomic: 3.0.3 + xdg-basedir: 5.1.0 + dev: false + /connect-history-api-fallback@2.0.0: resolution: {integrity: sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==} engines: {node: '>=0.8'} @@ -9569,7 +10067,7 @@ packages: normalize-path: 3.0.0 schema-utils: 4.2.0 serialize-javascript: 6.0.1 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /core-js-compat@3.31.0: @@ -9670,17 +10168,6 @@ packages: - encoding dev: false - /cross-spawn@6.0.5: - resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} - engines: {node: '>=4.8'} - dependencies: - nice-try: 1.0.5 - path-key: 2.0.1 - semver: 5.7.1 - shebang-command: 1.2.0 - which: 1.3.1 - dev: false - /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -9698,6 +10185,13 @@ packages: engines: {node: '>=8'} dev: false + /crypto-random-string@4.0.0: + resolution: {integrity: sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==} + engines: {node: '>=12'} + dependencies: + type-fest: 1.4.0 + dev: false + /cspell-dictionary@6.31.1: resolution: {integrity: sha512-7+K7aQGarqbpucky26wled7QSCJeg6VkLUWS+hLjyf0Cqc9Zew5xsLa4QjReExWUJx+a97jbiflITZNuWxgMrg==} engines: {node: '>=14'} @@ -9830,7 +10324,7 @@ packages: postcss-modules-values: 4.0.0(postcss@8.4.24) postcss-value-parser: 4.2.0 semver: 7.5.4 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /css-minimizer-webpack-plugin@4.2.2(clean-css@5.3.2)(webpack@5.87.0): @@ -9865,7 +10359,7 @@ packages: schema-utils: 4.2.0 serialize-javascript: 6.0.1 source-map: 0.6.1 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /css-select@4.3.0: @@ -10333,25 +10827,17 @@ packages: /decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} + requiresBuild: true dependencies: character-entities: 2.0.2 dev: true - /decompress-response@3.3.0: - resolution: {integrity: sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==} - engines: {node: '>=4'} - dependencies: - mimic-response: 1.0.1 - dev: false - /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} requiresBuild: true dependencies: mimic-response: 3.1.0 - dev: true - optional: true /dedent-js@1.0.1: resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} @@ -10364,11 +10850,6 @@ packages: /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - /deepmerge@4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} - engines: {node: '>=0.10.0'} - dev: false - /deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -10398,8 +10879,9 @@ packages: execa: 5.1.1 dev: false - /defer-to-connect@1.1.3: - resolution: {integrity: sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==} + /defer-to-connect@2.0.1: + resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} + engines: {node: '>=10'} dev: false /define-lazy-prop@2.0.0: @@ -10441,7 +10923,6 @@ packages: /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - dev: true /depd@1.1.2: resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} @@ -10456,6 +10937,7 @@ packages: /dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} + requiresBuild: true dev: true /destroy@1.2.0: @@ -10473,7 +10955,6 @@ packages: resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==} engines: {node: '>=8'} requiresBuild: true - dev: true optional: true /detect-node@2.1.0: @@ -10589,17 +11070,12 @@ packages: dependencies: domelementtype: 2.3.0 - /dompurify@2.3.10: - resolution: {integrity: sha512-o7Fg/AgC7p/XpKjf/+RC3Ok6k4St5F7Q6q6+Nnm3p2zGWioAY6dh0CbbuwOhH2UcSzKsdniE/YnE2/92JcsA+g==} - dev: false - /dompurify@2.4.3: resolution: {integrity: sha512-q6QaLcakcRjebxjg8/+NP+h0rPfatOgOzc46Fst9VAA3jF2ApfKBNKMzdP4DYTqtUMXSCd5pRS/8Po/OmoCHZQ==} dev: false /dompurify@3.0.5: resolution: {integrity: sha512-F9e6wPGtY+8KNMRAVfxeCOHU0/NPWMSENNq4pQctuXRqqdEPW7q3CrLbR5Nse044WwacyjHGOMlvNsBe1y6z9A==} - dev: true /domutils@2.8.0: resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} @@ -10630,6 +11106,13 @@ packages: is-obj: 2.0.0 dev: false + /dot-prop@6.0.1: + resolution: {integrity: sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==} + engines: {node: '>=10'} + dependencies: + is-obj: 2.0.0 + dev: false + /dotenv@16.3.1: resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} engines: {node: '>=12'} @@ -10640,10 +11123,6 @@ packages: engines: {node: '>=4'} dev: false - /duplexer3@0.1.5: - resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==} - dev: false - /duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: false @@ -10719,6 +11198,7 @@ packages: requiresBuild: true dependencies: once: 1.4.0 + optional: true /enhanced-resolve@5.15.0: resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} @@ -10782,9 +11262,9 @@ packages: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} - /escape-goat@2.1.1: - resolution: {integrity: sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==} - engines: {node: '>=8'} + /escape-goat@4.0.0: + resolution: {integrity: sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==} + engines: {node: '>=12'} dev: false /escape-html@1.0.3: @@ -11120,7 +11600,6 @@ packages: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} requiresBuild: true - dev: true optional: true /express@4.18.2: @@ -11313,7 +11792,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /filesize@8.0.7: @@ -11470,11 +11949,12 @@ packages: semver: 7.5.4 tapable: 1.1.3 typescript: 5.2.2 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false - /form-data-encoder@1.9.0: - resolution: {integrity: sha512-rahaRMkN8P8d/tgK/BLPX+WBVM27NbvdXBxqQujBtkDAIFspaRqN7Od7lfdGQA6KAD+f82fYCLBq1ipvcu8qLw==} + /form-data-encoder@2.1.4: + resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} + engines: {node: '>= 14.17'} dev: false /form-data@4.0.0: @@ -11484,21 +11964,12 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - dev: true /format@0.2.2: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} engines: {node: '>=0.4.x'} dev: false - /formdata-node@4.4.1: - resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} - engines: {node: '>= 12.20'} - dependencies: - node-domexception: 1.0.0 - web-streams-polyfill: 4.0.0-beta.3 - dev: false - /formdata-polyfill@4.0.10: resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} @@ -11523,7 +11994,6 @@ packages: /fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} requiresBuild: true - dev: true optional: true /fs-extra@10.1.0: @@ -11592,18 +12062,14 @@ packages: engines: {node: '>=10'} dev: false - /get-stream@4.1.0: - resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} - engines: {node: '>=6'} - dependencies: - pump: 3.0.0 - dev: false - /get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} + requiresBuild: true dependencies: pump: 3.0.0 + dev: true + optional: true /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} @@ -11613,7 +12079,6 @@ packages: /github-from-package@0.0.0: resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} requiresBuild: true - dev: true optional: true /github-slugger@1.5.0: @@ -11751,21 +12216,25 @@ packages: slash: 4.0.0 dev: false - /got@9.6.0: - resolution: {integrity: sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==} - engines: {node: '>=8.6'} + /got@12.6.1: + resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} + engines: {node: '>=14.16'} dependencies: - '@sindresorhus/is': 0.14.0 - '@szmarczak/http-timer': 1.1.2 - cacheable-request: 6.1.0 - decompress-response: 3.3.0 - duplexer3: 0.1.5 - get-stream: 4.1.0 - lowercase-keys: 1.0.1 - mimic-response: 1.0.1 - p-cancelable: 1.1.0 - to-readable-stream: 1.0.0 - url-parse-lax: 3.0.0 + '@sindresorhus/is': 5.6.0 + '@szmarczak/http-timer': 5.0.1 + cacheable-lookup: 7.0.0 + cacheable-request: 10.2.13 + decompress-response: 6.0.0 + form-data-encoder: 2.1.4 + get-stream: 6.0.1 + http2-wrapper: 2.2.0 + lowercase-keys: 3.0.0 + p-cancelable: 3.0.0 + responselike: 3.0.0 + dev: false + + /graceful-fs@4.2.10: + resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: false /graceful-fs@4.2.11: @@ -11831,9 +12300,9 @@ packages: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - /has-yarn@2.1.0: - resolution: {integrity: sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==} - engines: {node: '>=8'} + /has-yarn@3.0.0: + resolution: {integrity: sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: false /has@1.0.3: @@ -12093,7 +12562,7 @@ packages: lodash: 4.17.21 pretty-error: 4.0.0 tapable: 2.2.1 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /htmlparser2@6.1.0: @@ -12187,6 +12656,14 @@ packages: - debug dev: false + /http2-wrapper@2.2.0: + resolution: {integrity: sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==} + engines: {node: '>=10.19.0'} + dependencies: + quick-lru: 5.1.1 + resolve-alpn: 1.2.1 + dev: false + /https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -12260,9 +12737,9 @@ packages: parent-module: 1.0.1 resolve-from: 4.0.0 - /import-lazy@2.1.0: - resolution: {integrity: sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==} - engines: {node: '>=4'} + /import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} dev: false /import-meta-resolve@2.2.2: @@ -12381,11 +12858,11 @@ packages: dependencies: builtin-modules: 3.3.0 - /is-ci@2.0.0: - resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} + /is-ci@3.0.1: + resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} hasBin: true dependencies: - ci-info: 2.0.0 + ci-info: 3.8.0 dev: false /is-core-module@2.12.1: @@ -12462,9 +12939,9 @@ packages: /is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - /is-npm@5.0.0: - resolution: {integrity: sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==} - engines: {node: '>=10'} + /is-npm@6.0.0: + resolution: {integrity: sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: false /is-number@7.0.0: @@ -12562,8 +13039,9 @@ packages: dependencies: is-docker: 2.2.1 - /is-yarn-global@0.3.0: - resolution: {integrity: sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==} + /is-yarn-global@0.4.1: + resolution: {integrity: sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==} + engines: {node: '>=12'} dev: false /isarray@0.0.1: @@ -12733,8 +13211,8 @@ packages: hasBin: true dev: false - /json-buffer@3.0.0: - resolution: {integrity: sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==} + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: false /json-parse-even-better-errors@2.3.1: @@ -12749,6 +13227,12 @@ packages: /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + /json-stable-stringify@1.0.2: + resolution: {integrity: sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==} + dependencies: + jsonify: 0.0.1 + dev: false + /json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -12766,6 +13250,10 @@ packages: graceful-fs: 4.2.11 dev: false + /jsonify@0.0.1: + resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} + dev: false + /just-extend@4.2.1: resolution: {integrity: sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==} dev: true @@ -12783,10 +13271,10 @@ packages: dev: true optional: true - /keyv@3.1.0: - resolution: {integrity: sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==} + /keyv@4.5.3: + resolution: {integrity: sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==} dependencies: - json-buffer: 3.0.0 + json-buffer: 3.0.1 dev: false /khroma@2.0.0: @@ -12809,13 +13297,14 @@ packages: /kleur@4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + requiresBuild: true dev: true - /latest-version@5.1.0: - resolution: {integrity: sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==} - engines: {node: '>=8'} + /latest-version@7.0.0: + resolution: {integrity: sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==} + engines: {node: '>=14.16'} dependencies: - package-json: 6.5.0 + package-json: 8.1.1 dev: false /launch-editor@2.6.0: @@ -12967,14 +13456,9 @@ packages: tslib: 2.6.1 dev: false - /lowercase-keys@1.0.1: - resolution: {integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==} - engines: {node: '>=0.10.0'} - dev: false - - /lowercase-keys@2.0.0: - resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} - engines: {node: '>=8'} + /lowercase-keys@3.0.0: + resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: false /lowlight@1.20.0: @@ -13020,7 +13504,7 @@ packages: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} dependencies: - semver: 6.3.0 + semver: 6.3.1 dev: false /make-dir@4.0.0: @@ -13204,6 +13688,7 @@ packages: /mdast-util-to-string@3.2.0: resolution: {integrity: sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==} + requiresBuild: true dependencies: '@types/mdast': 3.0.11 dev: true @@ -13319,6 +13804,7 @@ packages: /micromark-core-commonmark@1.1.0: resolution: {integrity: sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==} + requiresBuild: true dependencies: decode-named-character-reference: 1.0.2 micromark-factory-destination: 1.1.0 @@ -13411,6 +13897,7 @@ packages: /micromark-factory-destination@1.1.0: resolution: {integrity: sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==} + requiresBuild: true dependencies: micromark-util-character: 1.2.0 micromark-util-symbol: 1.1.0 @@ -13419,6 +13906,7 @@ packages: /micromark-factory-label@1.1.0: resolution: {integrity: sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==} + requiresBuild: true dependencies: micromark-util-character: 1.2.0 micromark-util-symbol: 1.1.0 @@ -13443,6 +13931,7 @@ packages: /micromark-factory-space@1.1.0: resolution: {integrity: sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==} + requiresBuild: true dependencies: micromark-util-character: 1.2.0 micromark-util-types: 1.1.0 @@ -13450,6 +13939,7 @@ packages: /micromark-factory-title@1.1.0: resolution: {integrity: sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==} + requiresBuild: true dependencies: micromark-factory-space: 1.1.0 micromark-util-character: 1.2.0 @@ -13459,6 +13949,7 @@ packages: /micromark-factory-whitespace@1.1.0: resolution: {integrity: sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==} + requiresBuild: true dependencies: micromark-factory-space: 1.1.0 micromark-util-character: 1.2.0 @@ -13468,6 +13959,7 @@ packages: /micromark-util-character@1.2.0: resolution: {integrity: sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==} + requiresBuild: true dependencies: micromark-util-symbol: 1.1.0 micromark-util-types: 1.1.0 @@ -13475,12 +13967,14 @@ packages: /micromark-util-chunked@1.1.0: resolution: {integrity: sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==} + requiresBuild: true dependencies: micromark-util-symbol: 1.1.0 dev: true /micromark-util-classify-character@1.1.0: resolution: {integrity: sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==} + requiresBuild: true dependencies: micromark-util-character: 1.2.0 micromark-util-symbol: 1.1.0 @@ -13489,6 +13983,7 @@ packages: /micromark-util-combine-extensions@1.1.0: resolution: {integrity: sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==} + requiresBuild: true dependencies: micromark-util-chunked: 1.1.0 micromark-util-types: 1.1.0 @@ -13496,12 +13991,14 @@ packages: /micromark-util-decode-numeric-character-reference@1.1.0: resolution: {integrity: sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==} + requiresBuild: true dependencies: micromark-util-symbol: 1.1.0 dev: true /micromark-util-decode-string@1.1.0: resolution: {integrity: sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==} + requiresBuild: true dependencies: decode-named-character-reference: 1.0.2 micromark-util-character: 1.2.0 @@ -13511,6 +14008,7 @@ packages: /micromark-util-encode@1.1.0: resolution: {integrity: sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==} + requiresBuild: true dev: true /micromark-util-events-to-acorn@1.2.3: @@ -13530,22 +14028,26 @@ packages: /micromark-util-html-tag-name@1.2.0: resolution: {integrity: sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==} + requiresBuild: true dev: true /micromark-util-normalize-identifier@1.1.0: resolution: {integrity: sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==} + requiresBuild: true dependencies: micromark-util-symbol: 1.1.0 dev: true /micromark-util-resolve-all@1.1.0: resolution: {integrity: sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==} + requiresBuild: true dependencies: micromark-util-types: 1.1.0 dev: true /micromark-util-sanitize-uri@1.2.0: resolution: {integrity: sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==} + requiresBuild: true dependencies: micromark-util-character: 1.2.0 micromark-util-encode: 1.1.0 @@ -13554,6 +14056,7 @@ packages: /micromark-util-subtokenize@1.1.0: resolution: {integrity: sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==} + requiresBuild: true dependencies: micromark-util-chunked: 1.1.0 micromark-util-symbol: 1.1.0 @@ -13563,14 +14066,17 @@ packages: /micromark-util-symbol@1.1.0: resolution: {integrity: sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==} + requiresBuild: true dev: true /micromark-util-types@1.1.0: resolution: {integrity: sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==} + requiresBuild: true dev: true /micromark@3.2.0: resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} + requiresBuild: true dependencies: '@types/debug': 4.1.8 debug: 4.3.4(supports-color@8.1.1) @@ -13637,17 +14143,15 @@ packages: engines: {node: '>=12'} dev: false - /mimic-response@1.0.1: - resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} - engines: {node: '>=4'} - dev: false - /mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} requiresBuild: true - dev: true - optional: true + + /mimic-response@4.0.0: + resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: false /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} @@ -13661,7 +14165,14 @@ packages: webpack: ^5.0.0 dependencies: schema-utils: 4.2.0 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) + dev: false + + /minim@0.23.8: + resolution: {integrity: sha512-bjdr2xW1dBCMsMGGsUeqM4eFI60m94+szhxWys+B1ztIt6gWSfeGBdSVCIawezeHYLYn0j6zrsXdQS/JllBzww==} + engines: {node: '>=6'} + dependencies: + lodash: 4.17.21 dev: false /minimalistic-assert@1.0.1: @@ -13686,6 +14197,13 @@ packages: dependencies: brace-expansion: 2.0.1 + /minimatch@7.4.6: + resolution: {integrity: sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: false + /minimatch@9.0.1: resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} engines: {node: '>=16 || 14 >=14.17'} @@ -13711,7 +14229,6 @@ packages: /mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} requiresBuild: true - dev: true optional: true /mkdirp@1.0.4: @@ -13789,6 +14306,7 @@ packages: /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} + requiresBuild: true dev: true /mrmime@1.0.1: @@ -13823,6 +14341,12 @@ packages: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} dev: true + /nan@2.18.0: + resolution: {integrity: sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==} + requiresBuild: true + dev: false + optional: true + /nanoid@3.3.3: resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -13837,7 +14361,6 @@ packages: /napi-build-utils@1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} requiresBuild: true - dev: true optional: true /natural-compare-lite@1.4.0: @@ -13855,10 +14378,6 @@ packages: /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - /nice-try@1.0.5: - resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - dev: false - /nise@5.1.4: resolution: {integrity: sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==} dependencies: @@ -13882,9 +14401,12 @@ packages: requiresBuild: true dependencies: semver: 7.5.4 - dev: true optional: true + /node-abort-controller@3.1.1: + resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==} + dev: false + /node-addon-api@4.3.0: resolution: {integrity: sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==} requiresBuild: true @@ -13902,6 +14424,14 @@ packages: lodash: 4.17.21 dev: false + /node-fetch-commonjs@3.3.2: + resolution: {integrity: sha512-VBlAiynj3VMLrotgwOS3OyECFxas5y7ltLcK4t41lMUZeaK15Ym4QRkqN0EQKAFL42q9i21EPKjzLUPfltR72A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.2.1 + dev: false + /node-fetch@2.6.11: resolution: {integrity: sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==} engines: {node: 4.x || >=6.0.0} @@ -13928,8 +14458,8 @@ packages: dev: true optional: true - /node-fetch@3.2.8: - resolution: {integrity: sha512-KtpD1YhGszhntMpBDyp5lyagk8KIMopC1LEb7cQUAh7zcosaX5uK8HnbNb2i3NTQK3sIawCItS0uFC3QzcLHdg==} + /node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: data-uri-to-buffer: 4.0.1 @@ -13971,16 +14501,16 @@ packages: engines: {node: '>=0.10.0'} dev: false - /normalize-url@4.5.1: - resolution: {integrity: sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==} - engines: {node: '>=8'} - dev: false - /normalize-url@6.1.0: resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} engines: {node: '>=10'} dev: false + /normalize-url@8.0.0: + resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==} + engines: {node: '>=14.16'} + dev: false + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -14130,9 +14660,9 @@ packages: engines: {node: '>=0.10.0'} dev: false - /p-cancelable@1.1.0: - resolution: {integrity: sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==} - engines: {node: '>=6'} + /p-cancelable@3.0.0: + resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} + engines: {node: '>=12.20'} dev: false /p-limit@2.3.0: @@ -14188,14 +14718,14 @@ packages: engines: {node: '>=6'} dev: false - /package-json@6.5.0: - resolution: {integrity: sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==} - engines: {node: '>=8'} + /package-json@8.1.1: + resolution: {integrity: sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==} + engines: {node: '>=14.16'} dependencies: - got: 9.6.0 - registry-auth-token: 4.2.2 - registry-url: 5.1.0 - semver: 6.3.0 + got: 12.6.1 + registry-auth-token: 5.0.2 + registry-url: 6.0.1 + semver: 7.5.4 dev: false /param-case@3.0.4: @@ -14290,25 +14820,26 @@ packages: tslib: 2.6.1 dev: false - /patch-package@6.5.1: - resolution: {integrity: sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==} - engines: {node: '>=10', npm: '>5'} + /patch-package@8.0.0: + resolution: {integrity: sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==} + engines: {node: '>=14', npm: '>5'} hasBin: true dependencies: '@yarnpkg/lockfile': 1.1.0 chalk: 4.1.2 - cross-spawn: 6.0.5 + ci-info: 3.8.0 + cross-spawn: 7.0.3 find-yarn-workspace-root: 2.0.0 fs-extra: 9.1.0 - is-ci: 2.0.0 + json-stable-stringify: 1.0.2 klaw-sync: 6.0.0 minimist: 1.2.8 open: 7.4.2 rimraf: 2.7.1 - semver: 5.7.1 + semver: 7.5.4 slash: 2.0.0 tmp: 0.0.33 - yaml: 1.10.2 + yaml: 2.3.2 dev: false /path-case@3.0.4: @@ -14335,11 +14866,6 @@ packages: resolution: {integrity: sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==} dev: false - /path-key@2.0.1: - resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} - engines: {node: '>=4'} - dev: false - /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -14522,7 +15048,7 @@ packages: jiti: 1.18.2 postcss: 8.4.24 semver: 7.5.4 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /postcss-merge-idents@5.1.1(postcss@8.4.24): @@ -14866,7 +15392,6 @@ packages: simple-get: 4.0.1 tar-fs: 2.1.1 tunnel-agent: 0.6.0 - dev: true optional: true /prelude-ls@1.1.2: @@ -14878,11 +15403,6 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - /prepend-http@2.0.0: - resolution: {integrity: sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==} - engines: {node: '>=4'} - dev: false - /prettier-linter-helpers@1.0.0: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} @@ -15028,6 +15548,10 @@ packages: dev: true optional: true + /proto-list@1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + dev: false + /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -15039,8 +15563,6 @@ packages: /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} requiresBuild: true - dev: true - optional: true /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} @@ -15048,9 +15570,11 @@ packages: /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + requiresBuild: true dependencies: end-of-stream: 1.4.4 once: 1.4.0 + optional: true /punycode@1.4.1: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} @@ -15060,11 +15584,11 @@ packages: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} - /pupa@2.1.1: - resolution: {integrity: sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==} - engines: {node: '>=8'} + /pupa@3.1.0: + resolution: {integrity: sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==} + engines: {node: '>=12.20'} dependencies: - escape-goat: 2.1.1 + escape-goat: 4.0.0 dev: false /puppeteer-core@18.2.1: @@ -15137,10 +15661,28 @@ packages: inherits: 2.0.4 dev: false + /quick-lru@5.1.1: + resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} + engines: {node: '>=10'} + dev: false + /rambda@7.5.0: resolution: {integrity: sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==} dev: false + /ramda-adjunct@4.1.1(ramda@0.29.0): + resolution: {integrity: sha512-BnCGsZybQZMDGram9y7RiryoRHS5uwx8YeGuUeDKuZuvK38XO6JJfmK85BwRWAKFA6pZ5nZBO/HBFtExVaf31w==} + engines: {node: '>=0.10.3'} + peerDependencies: + ramda: '>= 0.29.0' + dependencies: + ramda: 0.29.0 + dev: false + + /ramda@0.29.0: + resolution: {integrity: sha512-BBea6L67bYLtdbOqfp8f58fPMqEwx0doL+pAi8TZyp2YWz8R9G8z9x75CZI8W+ftqhFHCpEX2cRnUUXK130iKA==} + dev: false + /randexp@0.5.3: resolution: {integrity: sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==} engines: {node: '>=4'} @@ -15192,16 +15734,6 @@ packages: pure-color: 1.3.0 dev: false - /react-copy-to-clipboard@5.1.0(react@17.0.2): - resolution: {integrity: sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==} - peerDependencies: - react: ^15.3.0 || 16 || 17 || 18 - dependencies: - copy-to-clipboard: 3.3.3 - prop-types: 15.8.1 - react: 17.0.2 - dev: false - /react-copy-to-clipboard@5.1.0(react@18.2.0): resolution: {integrity: sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==} peerDependencies: @@ -15212,16 +15744,6 @@ packages: react: 18.2.0 dev: false - /react-debounce-input@3.3.0(react@17.0.2): - resolution: {integrity: sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==} - peerDependencies: - react: ^15.3.0 || 16 || 17 || 18 - dependencies: - lodash.debounce: 4.0.8 - prop-types: 15.8.1 - react: 17.0.2 - dev: false - /react-debounce-input@3.3.0(react@18.2.0): resolution: {integrity: sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==} peerDependencies: @@ -15317,18 +15839,6 @@ packages: invariant: 2.2.4 dev: false - /react-immutable-pure-component@2.2.2(immutable@3.8.2)(react-dom@17.0.2)(react@17.0.2): - resolution: {integrity: sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A==} - peerDependencies: - immutable: '>= 2 || >= 4.0.0-rc' - react: '>= 16.6' - react-dom: '>= 16.6' - dependencies: - immutable: 3.8.2 - react: 17.0.2 - react-dom: 17.0.2(react@17.0.2) - dev: false - /react-immutable-pure-component@2.2.2(immutable@3.8.2)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A==} peerDependencies: @@ -15341,14 +15851,6 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /react-inspector@6.0.2(react@17.0.2): - resolution: {integrity: sha512-x+b7LxhmHXjHoU/VrFAzw5iutsILRoYyDq97EDYdFpPLcvqtEzk4ZSZSQjnFPbr5T57tLXnHcqFYoN1pI6u8uQ==} - peerDependencies: - react: ^16.8.4 || ^17.0.0 || ^18.0.0 - dependencies: - react: 17.0.2 - dev: false - /react-inspector@6.0.2(react@18.2.0): resolution: {integrity: sha512-x+b7LxhmHXjHoU/VrFAzw5iutsILRoYyDq97EDYdFpPLcvqtEzk4ZSZSQjnFPbr5T57tLXnHcqFYoN1pI6u8uQ==} peerDependencies: @@ -15360,10 +15862,6 @@ packages: /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - /react-is@17.0.2: - resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - dev: false - /react-is@18.1.0: resolution: {integrity: sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==} dev: false @@ -15398,51 +15896,41 @@ packages: dependencies: '@babel/runtime': 7.22.5 react-loadable: /@docusaurus/react-loadable@5.5.2(react@17.0.2) - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false - /react-redux@7.2.9(react-dom@17.0.2)(react@17.0.2): - resolution: {integrity: sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==} + /react-redux@8.1.3(@types/react-dom@18.2.7)(@types/react@18.2.22)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1): + resolution: {integrity: sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw==} peerDependencies: - react: ^16.8.3 || ^17 || ^18 - react-dom: '*' - react-native: '*' + '@types/react': ^16.8 || ^17.0 || ^18.0 + '@types/react-dom': ^16.8 || ^17.0 || ^18.0 + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + react-native: '>=0.59' + redux: ^4 || ^5.0.0-beta.0 peerDependenciesMeta: - react-dom: + '@types/react': optional: true - react-native: + '@types/react-dom': optional: true - dependencies: - '@babel/runtime': 7.22.5 - '@types/react-redux': 7.1.25 - hoist-non-react-statics: 3.3.2 - loose-envify: 1.4.0 - prop-types: 15.8.1 - react: 17.0.2 - react-dom: 17.0.2(react@17.0.2) - react-is: 17.0.2 - dev: false - - /react-redux@7.2.9(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==} - peerDependencies: - react: ^16.8.3 || ^17 || ^18 - react-dom: '*' - react-native: '*' - peerDependenciesMeta: react-dom: optional: true react-native: optional: true + redux: + optional: true dependencies: '@babel/runtime': 7.22.5 - '@types/react-redux': 7.1.25 + '@types/hoist-non-react-statics': 3.3.1 + '@types/react': 18.2.22 + '@types/react-dom': 18.2.7 + '@types/use-sync-external-store': 0.0.3 hoist-non-react-statics: 3.3.2 - loose-envify: 1.4.0 - prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-is: 17.0.2 + react-is: 18.1.0 + redux: 4.2.1 + use-sync-external-store: 1.2.0(react@18.2.0) dev: false /react-refresh@0.14.0: @@ -15493,19 +15981,6 @@ packages: tiny-warning: 1.0.3 dev: false - /react-syntax-highlighter@15.5.0(react@17.0.2): - resolution: {integrity: sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==} - peerDependencies: - react: '>= 0.14.0' - dependencies: - '@babel/runtime': 7.22.5 - highlight.js: 10.7.3 - lowlight: 1.20.0 - prismjs: 1.29.0 - react: 17.0.2 - refractor: 3.6.0 - dev: false - /react-syntax-highlighter@15.5.0(react@18.2.0): resolution: {integrity: sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==} peerDependencies: @@ -15696,6 +16171,10 @@ packages: /regenerator-runtime@0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + /regenerator-runtime@0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + dev: false + /regenerator-transform@0.15.1: resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} dependencies: @@ -15719,16 +16198,16 @@ packages: unicode-match-property-value-ecmascript: 2.1.0 dev: false - /registry-auth-token@4.2.2: - resolution: {integrity: sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==} - engines: {node: '>=6.0.0'} + /registry-auth-token@5.0.2: + resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==} + engines: {node: '>=14'} dependencies: - rc: 1.2.8 + '@pnpm/npm-conf': 2.2.2 dev: false - /registry-url@5.1.0: - resolution: {integrity: sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==} - engines: {node: '>=8'} + /registry-url@6.0.1: + resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} + engines: {node: '>=12'} dependencies: rc: 1.2.8 dev: false @@ -15792,7 +16271,7 @@ packages: parse-entities: 2.0.0 repeat-string: 1.6.1 state-toggle: 1.0.3 - trim: 0.0.1 + trim: 0.0.3 trim-trailing-lines: 1.1.4 unherit: 1.1.3 unist-util-remove-position: 2.0.1 @@ -15849,6 +16328,10 @@ packages: resolution: {integrity: sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==} dev: false + /resolve-alpn@1.2.1: + resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} + dev: false + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -15877,10 +16360,11 @@ packages: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - /responselike@1.0.2: - resolution: {integrity: sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==} + /responselike@3.0.0: + resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==} + engines: {node: '>=14.16'} dependencies: - lowercase-keys: 1.0.1 + lowercase-keys: 3.0.0 dev: false /ret@0.2.2: @@ -15988,6 +16472,7 @@ packages: /sade@1.8.1: resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} engines: {node: '>=6'} + requiresBuild: true dependencies: mri: 1.2.0 dev: true @@ -16090,22 +16575,17 @@ packages: node-forge: 1.3.1 dev: false - /semver-diff@3.1.1: - resolution: {integrity: sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==} - engines: {node: '>=8'} + /semver-diff@4.0.0: + resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} + engines: {node: '>=12'} dependencies: - semver: 6.3.0 + semver: 7.5.4 dev: false /semver@5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: false - /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -16227,24 +16707,12 @@ packages: /shallowequal@1.1.0: resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} - /shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - dependencies: - shebang-regex: 1.0.0 - dev: false - /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 - /shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - dev: false - /shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} @@ -16272,6 +16740,11 @@ packages: vscode-textmate: 8.0.0 dev: true + /short-unique-id@5.0.3: + resolution: {integrity: sha512-yhniEILouC0s4lpH0h7rJsfylZdca10W9mDJRAFh3EpcSUanCHGb0R7kcFOIUCZYSAPo0PUD5ZxWQdW0T4xaug==} + hasBin: true + dev: false + /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: @@ -16290,7 +16763,6 @@ packages: /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} requiresBuild: true - dev: true optional: true /simple-get@4.0.1: @@ -16300,7 +16772,6 @@ packages: decompress-response: 6.0.0 once: 1.4.0 simple-concat: 1.0.1 - dev: true optional: true /sinon@16.0.0: @@ -16462,6 +16933,10 @@ packages: deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' dev: false + /stampit@4.3.2: + resolution: {integrity: sha512-pE2org1+ZWQBnIxRPrBM2gVupkuDD0TTNIo1H6GdT/vO82NXli2z8lRE8cu/nBIHrcOCXFBAHpb9ZldrB2/qOA==} + dev: false + /state-toggle@1.0.3: resolution: {integrity: sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==} dev: false @@ -16504,6 +16979,7 @@ packages: /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + requiresBuild: true dependencies: safe-buffer: 5.2.1 @@ -16641,45 +17117,47 @@ packages: stable: 0.1.8 dev: false - /swagger-client@3.18.5: - resolution: {integrity: sha512-c0txGDtfQTJnaIBaEKCwtRNcUaaAfj+RXI4QVV9p3WW+AUCQqp4naCjaDNNsOfMkE4ySyhnblbL+jGqAVC7snw==} + /swagger-client@3.23.0: + resolution: {integrity: sha512-n0erqA78BVFiQkb+HDdho4sKxGz+7u3g3BKkoQHy6KArF79TCKpD6GSPJwenknsuA8byjTd+CkgTBtCmJgXRFA==} dependencies: - '@babel/runtime-corejs3': 7.22.5 + '@babel/runtime-corejs3': 7.23.1 + '@swagger-api/apidom-core': 0.77.0 + '@swagger-api/apidom-json-pointer': 0.77.0 + '@swagger-api/apidom-ns-openapi-3-1': 0.77.0 + '@swagger-api/apidom-reference': 0.77.0 cookie: 0.5.0 - cross-fetch: 3.1.6 - deepmerge: 4.2.2 + deepmerge: 4.3.1 fast-json-patch: 3.1.1 - form-data-encoder: 1.9.0 - formdata-node: 4.4.1 is-plain-object: 5.0.0 js-yaml: 4.1.0 - lodash: 4.17.21 + node-abort-controller: 3.1.1 + node-fetch-commonjs: 3.3.2 qs: 6.11.2 traverse: 0.6.7 - url: 0.11.1 + undici: 5.25.4 transitivePeerDependencies: - - encoding + - debug dev: false - /swagger-ui-react@4.15.5(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-jt2g6cDt3wOsc+1YQv4D86V4K659Xs1/pbhjYWlgNfjZB0TSN601MASWxbP+65U0iPpsJTpF7EmRzAunTOVs8Q==} + /swagger-ui-react@5.7.2(@types/react-dom@18.2.7)(@types/react@18.2.22)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Bzf6feEFx7i429kkM2XncsBoMR7WAGyk9lKjenaEsZaLf8ccOq2jspPRyZWBdGT3BmG8sO4x9S98CpKs5POk1w==} peerDependencies: react: '>=17.0.0' react-dom: '>=17.0.0' dependencies: - '@babel/runtime-corejs3': 7.22.5 - '@braintree/sanitize-url': 6.0.0 + '@babel/runtime-corejs3': 7.23.1 + '@braintree/sanitize-url': 6.0.4 base64-js: 1.5.1 classnames: 2.3.2 css.escape: 1.5.1 deep-extend: 0.6.0 - dompurify: 2.3.10 + dompurify: 3.0.5 ieee754: 1.2.1 immutable: 3.8.2 js-file-download: 0.4.12 js-yaml: 4.1.0 lodash: 4.17.21 - patch-package: 6.5.1 + patch-package: 8.0.0 prop-types: 15.8.1 randexp: 0.5.3 randombytes: 2.1.0 @@ -16690,7 +17168,7 @@ packages: react-immutable-proptypes: 2.2.0(immutable@3.8.2) react-immutable-pure-component: 2.2.2(immutable@3.8.2)(react-dom@18.2.0)(react@18.2.0) react-inspector: 6.0.2(react@18.2.0) - react-redux: 7.2.9(react-dom@18.2.0)(react@18.2.0) + react-redux: 8.1.3(@types/react-dom@18.2.7)(@types/react@18.2.22)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) react-syntax-highlighter: 15.5.0(react@18.2.0) redux: 4.2.1 redux-immutable: 4.0.0(immutable@3.8.2) @@ -16698,60 +17176,27 @@ packages: reselect: 4.1.8 serialize-error: 8.1.0 sha.js: 2.4.11 - swagger-client: 3.18.5 + swagger-client: 3.23.0 url-parse: 1.5.10 xml: 1.0.1 xml-but-prettier: 1.0.1 zenscroll: 4.0.2 transitivePeerDependencies: - - encoding + - '@types/react' + - '@types/react-dom' + - debug - react-native dev: false - /swagger-ui@4.15.5: - resolution: {integrity: sha512-fhdzV7EbrlsU+78GrrErdGnUgGodqrCW9qJP8e8fTUpomAkYMzj9C5fZBQqoea4w7Y0JNGUulDXsjKBl/3tVfw==} - requiresBuild: true + /swc-loader@0.2.3(@swc/core@1.3.91)(webpack@5.87.0): + resolution: {integrity: sha512-D1p6XXURfSPleZZA/Lipb3A8pZ17fP4NObZvFCDjK/OKljroqDpPmsBdTraWhVBqUNpcWBQY1imWdoPScRlQ7A==} + peerDependencies: + '@swc/core': ^1.2.147 + webpack: '>=2' dependencies: - '@babel/runtime-corejs3': 7.22.5 - '@braintree/sanitize-url': 6.0.0 - base64-js: 1.5.1 - classnames: 2.3.2 - css.escape: 1.5.1 - deep-extend: 0.6.0 - dompurify: 2.3.10 - ieee754: 1.2.1 - immutable: 3.8.2 - js-file-download: 0.4.12 - js-yaml: 4.1.0 - lodash: 4.17.21 - patch-package: 6.5.1 - prop-types: 15.8.1 - randexp: 0.5.3 - randombytes: 2.1.0 - react: 17.0.2 - react-copy-to-clipboard: 5.1.0(react@17.0.2) - react-debounce-input: 3.3.0(react@17.0.2) - react-dom: 17.0.2(react@17.0.2) - react-immutable-proptypes: 2.2.0(immutable@3.8.2) - react-immutable-pure-component: 2.2.2(immutable@3.8.2)(react-dom@17.0.2)(react@17.0.2) - react-inspector: 6.0.2(react@17.0.2) - react-redux: 7.2.9(react-dom@17.0.2)(react@17.0.2) - react-syntax-highlighter: 15.5.0(react@17.0.2) - redux: 4.2.1 - redux-immutable: 4.0.0(immutable@3.8.2) - remarkable: 2.0.1 - reselect: 4.1.8 - serialize-error: 8.1.0 - sha.js: 2.4.11 - swagger-client: 3.18.5 - url-parse: 1.5.10 - xml: 1.0.1 - xml-but-prettier: 1.0.1 - zenscroll: 4.0.2 - transitivePeerDependencies: - - encoding - - react-native - dev: false + '@swc/core': 1.3.91 + webpack: 5.87.0(@swc/core@1.3.91) + dev: true /symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -16799,7 +17244,6 @@ packages: mkdirp-classic: 0.5.3 pump: 3.0.0 tar-stream: 2.2.0 - dev: true optional: true /tar-stream@2.2.0: @@ -16812,10 +17256,9 @@ packages: fs-constants: 1.0.0 inherits: 2.0.4 readable-stream: 3.6.2 - dev: true optional: true - /terser-webpack-plugin@5.3.9(webpack@5.87.0): + /terser-webpack-plugin@5.3.9(@swc/core@1.3.91)(webpack@5.87.0): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -16832,11 +17275,12 @@ packages: optional: true dependencies: '@jridgewell/trace-mapping': 0.3.18 + '@swc/core': 1.3.91 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.18.1 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) /terser@5.18.1: resolution: {integrity: sha512-j1n0Ao919h/Ai5r43VAnfV/7azUYW43GPxK7qSATzrsERfW7+y2QW9Cp9ufnRF5CQUWbnLSo7UJokSWCqg4tsQ==} @@ -16901,11 +17345,6 @@ packages: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} - /to-readable-stream@1.0.0: - resolution: {integrity: sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==} - engines: {node: '>=6'} - dev: false - /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -16950,12 +17389,37 @@ packages: resolution: {integrity: sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==} dev: false + /tree-sitter-json@0.20.0: + resolution: {integrity: sha512-PteOLH+Tx6Bz4ZA/d40/DbkiSXXRM/gKahhHI8hQ1lWNfFvdknnz9k3Mz84ol5srRyLboJ8wp8GSkhZ6ht9EGQ==} + requiresBuild: true + dependencies: + nan: 2.18.0 + dev: false + optional: true + + /tree-sitter-yaml@0.5.0: + resolution: {integrity: sha512-POJ4ZNXXSWIG/W4Rjuyg36MkUD4d769YRUGKRqN+sVaj/VCo6Dh6Pkssn1Rtewd5kybx+jT1BWMyWN0CijXnMA==} + requiresBuild: true + dependencies: + nan: 2.18.0 + dev: false + optional: true + + /tree-sitter@0.20.4: + resolution: {integrity: sha512-rjfR5dc4knG3jnJNN/giJ9WOoN1zL/kZyrS0ILh+eqq8RNcIbiXA63JsMEgluug0aNvfQvK4BfCErN1vIzvKog==} + requiresBuild: true + dependencies: + nan: 2.18.0 + prebuild-install: 7.1.1 + dev: false + optional: true + /trim-trailing-lines@1.1.4: resolution: {integrity: sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==} dev: false - /trim@0.0.1: - resolution: {integrity: sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==} + /trim@0.0.3: + resolution: {integrity: sha512-h82ywcYhHK7veeelXrCScdH7HkWfbIT1D/CgYO+nmDarz3SGNssVBMws6jU16Ga60AJCRAvPV6w6RLuNerQqjg==} deprecated: Use String.prototype.trim() instead dev: false @@ -16975,6 +17439,10 @@ packages: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} + /ts-toolbelt@9.6.0: + resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==} + dev: false + /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: false @@ -17001,7 +17469,6 @@ packages: requiresBuild: true dependencies: safe-buffer: 5.2.1 - dev: true optional: true /tunnel@0.0.6: @@ -17041,6 +17508,11 @@ packages: engines: {node: '>=8'} dev: false + /type-fest@1.4.0: + resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} + engines: {node: '>=10'} + dev: false + /type-fest@2.19.0: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} @@ -17068,10 +17540,10 @@ packages: is-typedarray: 1.0.0 dev: false - /typedoc-plugin-markdown@4.0.0-next.20(typedoc@0.25.1): - resolution: {integrity: sha512-mQoLUSk6KLPMv1zpcTk43h8+8aD+T65qPh99/umSsczd1yTOyZiA0h0kAlsrZrAM8SWoJEn/fZWgV3JMR3Bb4Q==} + /typedoc-plugin-markdown@4.0.0-next.22(typedoc@0.25.1): + resolution: {integrity: sha512-OguaCi7gW/2kofSF+V2E/XGLfOtYXLEc/tq83g+5Hn6J1i5V0sUsCMs8VFjx9fP4e8TRDvZDpfkiZ55RTOQH/w==} peerDependencies: - typedoc: '>=0.24.0' + typedoc: '>=0.25.0' dependencies: typedoc: 0.25.1(typescript@5.2.2) dev: true @@ -17090,6 +17562,12 @@ packages: typescript: 5.2.2 dev: true + /types-ramda@0.29.5: + resolution: {integrity: sha512-u+bAYXHDPJR+amB0qMrMU/NXRB2PG8QqpO2v6j7yK/0mPZhlaaZj++ynYjnVpkPEpCkZEGxNpWY3X7qyLCGE3w==} + dependencies: + ts-toolbelt: 9.6.0 + dev: false + /typescript@5.2.2: resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} @@ -17126,6 +17604,13 @@ packages: resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} dev: true + /undici@5.25.4: + resolution: {integrity: sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==} + engines: {node: '>=14.0'} + dependencies: + '@fastify/busboy': 2.0.0 + dev: false + /unherit@1.1.3: resolution: {integrity: sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==} dependencies: @@ -17185,6 +17670,13 @@ packages: crypto-random-string: 2.0.0 dev: false + /unique-string@3.0.0: + resolution: {integrity: sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==} + engines: {node: '>=12'} + dependencies: + crypto-random-string: 4.0.0 + dev: false + /unist-builder@2.0.3: resolution: {integrity: sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==} dev: false @@ -17253,6 +17745,7 @@ packages: /unist-util-stringify-position@3.0.3: resolution: {integrity: sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==} + requiresBuild: true dependencies: '@types/unist': 2.0.6 dev: true @@ -17303,6 +17796,10 @@ packages: engines: {node: '>= 0.8'} dev: false + /unraw@3.0.0: + resolution: {integrity: sha512-08/DA66UF65OlpUDIQtbJyrqTR0jTAlJ+jsnkQ4jxR7+K5g5YG1APZKQSMCE1vqqmD+2pv6+IdEjmopFatacvg==} + dev: false + /untildify@4.0.0: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} engines: {node: '>=8'} @@ -17318,24 +17815,24 @@ packages: escalade: 3.1.1 picocolors: 1.0.0 - /update-notifier@5.1.0: - resolution: {integrity: sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==} - engines: {node: '>=10'} + /update-notifier@6.0.2: + resolution: {integrity: sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==} + engines: {node: '>=14.16'} dependencies: - boxen: 5.1.2 - chalk: 4.1.2 - configstore: 5.0.1 - has-yarn: 2.1.0 - import-lazy: 2.1.0 - is-ci: 2.0.0 + boxen: 7.1.1 + chalk: 5.3.0 + configstore: 6.0.0 + has-yarn: 3.0.0 + import-lazy: 4.0.0 + is-ci: 3.0.1 is-installed-globally: 0.4.0 - is-npm: 5.0.0 - is-yarn-global: 0.3.0 - latest-version: 5.1.0 - pupa: 2.1.1 + is-npm: 6.0.0 + is-yarn-global: 0.4.1 + latest-version: 7.0.0 + pupa: 3.1.0 semver: 7.5.4 - semver-diff: 3.1.1 - xdg-basedir: 4.0.0 + semver-diff: 4.0.0 + xdg-basedir: 5.1.0 dev: false /upper-case-first@2.0.2: @@ -17373,14 +17870,7 @@ packages: loader-utils: 2.0.4 mime-types: 2.1.35 schema-utils: 3.3.0 - webpack: 5.87.0 - dev: false - - /url-parse-lax@3.0.0: - resolution: {integrity: sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==} - engines: {node: '>=4'} - dependencies: - prepend-http: 2.0.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /url-parse@1.5.10: @@ -17389,13 +17879,6 @@ packages: querystringify: 2.2.0 requires-port: 1.0.0 - /url@0.11.1: - resolution: {integrity: sha512-rWS3H04/+mzzJkv0eZ7vEDGiQbgquI1fGfOad6zKvgYQi1SzMmhl7c/DdRGxhaWrVH6z0qWITo8rpnxK/RfEhA==} - dependencies: - punycode: 1.4.1 - qs: 6.11.2 - dev: false - /use-composed-ref@1.3.0(react@17.0.2): resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} peerDependencies: @@ -17467,6 +17950,14 @@ packages: react: 17.0.2 dev: false + /use-sync-external-store@1.2.0(react@18.2.0): + resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + react: 18.2.0 + dev: false + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -17496,6 +17987,7 @@ packages: resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} engines: {node: '>=8'} hasBin: true + requiresBuild: true dependencies: dequal: 2.0.3 diff: 5.1.0 @@ -17768,10 +18260,11 @@ packages: engines: {node: '>= 8'} dev: false - /web-streams-polyfill@4.0.0-beta.3: - resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} - engines: {node: '>= 14'} + /web-tree-sitter@0.20.3: + resolution: {integrity: sha512-zKGJW9r23y3BcJusbgvnOH2OYAW40MXAOi9bi3Gcc7T4Gms9WWgXF8m6adsJWpGJEhgOzCrfiz1IzKowJWrtYw==} + requiresBuild: true dev: false + optional: true /web-worker@1.2.0: resolution: {integrity: sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==} @@ -17815,7 +18308,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /webpack-dev-server@4.15.1(webpack@5.87.0): @@ -17859,7 +18352,7 @@ packages: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) webpack-dev-middleware: 5.3.3(webpack@5.87.0) ws: 8.13.0 transitivePeerDependencies: @@ -17880,7 +18373,7 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} - /webpack@5.87.0: + /webpack@5.87.0(@swc/core@1.3.91): resolution: {integrity: sha512-GOu1tNbQ7p1bDEoFRs2YPcfyGs8xq52yyPBZ3m2VGnXGtV9MxjrkABHm4V9Ia280OefsSLzvbVoXcfLxjKY/Iw==} engines: {node: '>=10.13.0'} hasBin: true @@ -17911,7 +18404,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(webpack@5.87.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.91)(webpack@5.87.0) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -17929,7 +18422,7 @@ packages: consola: 2.15.3 pretty-time: 1.1.0 std-env: 3.3.3 - webpack: 5.87.0 + webpack: 5.87.0(@swc/core@1.3.91) dev: false /websocket-driver@0.7.4: @@ -17994,13 +18487,6 @@ packages: dependencies: isexe: 2.0.0 - /widest-line@3.1.0: - resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} - engines: {node: '>=8'} - dependencies: - string-width: 4.2.3 - dev: false - /widest-line@4.0.1: resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} engines: {node: '>=12'} @@ -18101,6 +18587,11 @@ packages: engines: {node: '>=8'} dev: false + /xdg-basedir@5.1.0: + resolution: {integrity: sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==} + engines: {node: '>=12'} + dev: false + /xml-but-prettier@1.0.1: resolution: {integrity: sha512-C2CJaadHrZTqESlH03WOyw0oZTtoy2uEg6dSDF6YRg+9GnYNub53RRemLpnvtbHDFelxMx4LajiFsYeR6XJHgQ==} dependencies: diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index ec4587a877..565562527c 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -12,8 +12,14 @@ { "definitionName": "lockStepVersion", "policyName": "typespec", - "version": "0.48.0", + "version": "0.49.0", "nextBump": "minor" + }, + { + "definitionName": "lockStepVersion", + "policyName": "playground", + "version": "0.1.0-alpha.1", + "nextBump": "prerelease" } // { // /** diff --git a/common/scripts/install-run-rush-pnpm.js b/common/scripts/install-run-rush-pnpm.js index 5c149955de..72a7bfdf08 100644 --- a/common/scripts/install-run-rush-pnpm.js +++ b/common/scripts/install-run-rush-pnpm.js @@ -19,7 +19,7 @@ var __webpack_exports__ = {}; \*****************************************************/ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. +// See LICENSE in the project root for license information. require('./install-run-rush'); //# sourceMappingURL=install-run-rush-pnpm.js.map module.exports = __webpack_exports__; diff --git a/common/scripts/install-run-rush.js b/common/scripts/install-run-rush.js index cada1eded2..fe5101a2ad 100644 --- a/common/scripts/install-run-rush.js +++ b/common/scripts/install-run-rush.js @@ -113,7 +113,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 657147); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. +// See LICENSE in the project root for license information. +/* eslint-disable no-console */ const { installAndRun, findRushJsonFolder, RUSH_JSON_FILENAME, runWithErrorAndStatusCode } = require('./install-run'); diff --git a/common/scripts/install-run-rushx.js b/common/scripts/install-run-rushx.js index b05df262bc..0a0235f29a 100644 --- a/common/scripts/install-run-rushx.js +++ b/common/scripts/install-run-rushx.js @@ -19,7 +19,7 @@ var __webpack_exports__ = {}; \*************************************************/ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. +// See LICENSE in the project root for license information. require('./install-run-rush'); //# sourceMappingURL=install-run-rushx.js.map module.exports = __webpack_exports__; diff --git a/common/scripts/install-run.js b/common/scripts/install-run.js index 68b1b56fc5..bf89cd2311 100644 --- a/common/scripts/install-run.js +++ b/common/scripts/install-run.js @@ -21,6 +21,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "isVariableSetInNpmrcFile": () => (/* binding */ isVariableSetInNpmrcFile), /* harmony export */ "syncNpmrc": () => (/* binding */ syncNpmrc) /* harmony export */ }); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ 657147); @@ -33,22 +34,19 @@ __webpack_require__.r(__webpack_exports__); /** - * As a workaround, copyAndTrimNpmrcFile() copies the .npmrc file to the target folder, and also trims + * This function reads the content for given .npmrc file path, and also trims * unusable lines from the .npmrc file. * - * Why are we trimming the .npmrc lines? NPM allows environment variables to be specified in - * the .npmrc file to provide different authentication tokens for different registry. - * However, if the environment variable is undefined, it expands to an empty string, which - * produces a valid-looking mapping with an invalid URL that causes an error. Instead, - * we'd prefer to skip that line and continue looking in other places such as the user's - * home directory. - * * @returns * The text of the the .npmrc. */ -function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { - logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose - logger.info(` --> "${targetNpmrcPath}"`); +// create a global _combinedNpmrc for cache purpose +const _combinedNpmrcMap = new Map(); +function _trimNpmrcFile(sourceNpmrcPath) { + const combinedNpmrcFromCache = _combinedNpmrcMap.get(sourceNpmrcPath); + if (combinedNpmrcFromCache !== undefined) { + return combinedNpmrcFromCache; + } let npmrcFileLines = fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(sourceNpmrcPath).toString().split('\n'); npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim()); const resultLines = []; @@ -57,8 +55,13 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { // Comment lines start with "#" or ";" const commentRegExp = /^\s*[#;]/; // Trim out lines that reference environment variables that aren't defined - for (const line of npmrcFileLines) { + for (let line of npmrcFileLines) { let lineShouldBeTrimmed = false; + //remove spaces before or after key and value + line = line + .split('=') + .map((lineToTrim) => lineToTrim.trim()) + .join('='); // Ignore comment lines if (!commentRegExp.test(line)) { const environmentVariables = line.match(expansionRegExp); @@ -85,6 +88,28 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { } } const combinedNpmrc = resultLines.join('\n'); + //save the cache + _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); + return combinedNpmrc; +} +/** + * As a workaround, copyAndTrimNpmrcFile() copies the .npmrc file to the target folder, and also trims + * unusable lines from the .npmrc file. + * + * Why are we trimming the .npmrc lines? NPM allows environment variables to be specified in + * the .npmrc file to provide different authentication tokens for different registry. + * However, if the environment variable is undefined, it expands to an empty string, which + * produces a valid-looking mapping with an invalid URL that causes an error. Instead, + * we'd prefer to skip that line and continue looking in other places such as the user's + * home directory. + * + * @returns + * The text of the the .npmrc with lines containing undefined variables commented out. + */ +function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { + logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose + logger.info(` --> "${targetNpmrcPath}"`); + const combinedNpmrc = _trimNpmrcFile(sourceNpmrcPath); fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(targetNpmrcPath, combinedNpmrc); return combinedNpmrc; } @@ -98,7 +123,9 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { * The text of the the synced .npmrc, if one exists. If one does not exist, then undefined is returned. */ function syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = { + // eslint-disable-next-line no-console info: console.log, + // eslint-disable-next-line no-console error: console.error }) { const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish'); @@ -117,6 +144,16 @@ function syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger throw new Error(`Error syncing .npmrc file: ${e}`); } } +function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) { + const sourceNpmrcPath = `${sourceNpmrcFolder}/.npmrc`; + //if .npmrc file does not exist, return false directly + if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { + return false; + } + const trimmedNpmrcFile = _trimNpmrcFile(sourceNpmrcPath); + const variableKeyRegExp = new RegExp(`^${variableKey}=`, 'm'); + return trimmedNpmrcFile.match(variableKeyRegExp) !== null; +} //# sourceMappingURL=npmrcUtilities.js.map /***/ }), @@ -253,7 +290,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utilities/npmrcUtilities */ 679877); // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. +// See LICENSE in the project root for license information. +/* eslint-disable no-console */ @@ -359,6 +397,23 @@ function _getRushTempFolder(rushCommonFolder) { return _ensureAndJoinPath(rushCommonFolder, 'temp'); } } +/** + * Compare version strings according to semantic versioning. + * Returns a positive integer if "a" is a later version than "b", + * a negative integer if "b" is later than "a", + * and 0 otherwise. + */ +function _compareVersionStrings(a, b) { + const aParts = a.split(/[.-]/); + const bParts = b.split(/[.-]/); + const numberOfParts = Math.max(aParts.length, bParts.length); + for (let i = 0; i < numberOfParts; i++) { + if (aParts[i] !== bParts[i]) { + return (Number(aParts[i]) || 0) - (Number(bParts[i]) || 0); + } + } + return 0; +} /** * Resolve a package specifier to a static version */ @@ -379,12 +434,23 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)(sourceNpmrcFolder, rushTempFolder, undefined, logger); const npmPath = getNpmPath(); // This returns something that looks like: - // @microsoft/rush@3.0.0 '3.0.0' - // @microsoft/rush@3.0.1 '3.0.1' - // ... - // @microsoft/rush@3.0.20 '3.0.20' - // - const npmVersionSpawnResult = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(npmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier'], { + // ``` + // [ + // "3.0.0", + // "3.0.1", + // ... + // "3.0.20" + // ] + // ``` + // + // if multiple versions match the selector, or + // + // ``` + // "3.0.0" + // ``` + // + // if only a single version matches. + const npmVersionSpawnResult = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(npmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier', '--json'], { cwd: rushTempFolder, stdio: [] }); @@ -392,16 +458,21 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { throw new Error(`"npm view" returned error code ${npmVersionSpawnResult.status}`); } const npmViewVersionOutput = npmVersionSpawnResult.stdout.toString(); - const versionLines = npmViewVersionOutput.split('\n').filter((line) => !!line); - const latestVersion = versionLines[versionLines.length - 1]; + const parsedVersionOutput = JSON.parse(npmViewVersionOutput); + const versions = Array.isArray(parsedVersionOutput) + ? parsedVersionOutput + : [parsedVersionOutput]; + let latestVersion = versions[0]; + for (let i = 1; i < versions.length; i++) { + const latestVersionCandidate = versions[i]; + if (_compareVersionStrings(latestVersionCandidate, latestVersion) > 0) { + latestVersion = latestVersionCandidate; + } + } if (!latestVersion) { throw new Error('No versions found for the specified version range.'); } - const versionMatches = latestVersion.match(/^.+\s\'(.+)\'$/); - if (!versionMatches) { - throw new Error(`Invalid npm output ${latestVersion}`); - } - return versionMatches[1]; + return latestVersion; } catch (e) { throw new Error(`Unable to resolve version ${version} of package ${name}: ${e}`); diff --git a/docs/extending-typespec/basics.md b/docs/extending-typespec/basics.md index 71e9b91d07..da9bfd2a5b 100644 --- a/docs/extending-typespec/basics.md +++ b/docs/extending-typespec/basics.md @@ -85,17 +85,23 @@ This will create `tsconfig.json`. But we need to make a couple changes to this. ### 4. Create `lib.ts` -Open `./src/lib.ts` and create your library definition that registers your library with the TypeSpec compiler and defines any diagnostics your library will emit. The following shows an example: +Open `./src/lib.ts` and create your library definition that registers your library with the TypeSpec compiler and defines any diagnostics your library will emit. Make sure to export the library definition as `$lib`. + +:::warn +If `$lib` is not accessible from your library package (`import {$lib} from "my-library";`) some functionality will be unavailable like validation of emitter options, linter rules, etc. +::: + +The following shows an example: ```typescript import { createTypeSpecLibrary } from "@typespec/compiler"; -export const myLibrary = createTypeSpecLibrary({ +export const $lib = createTypeSpecLibrary({ name: "myLibrary", diagnostics: {}, -}); +} as const); -// optional but convenient +// Optional but convenient, those are meant to be used locally in your library. export const { reportDiagnostic, createDiagnostic, createStateSymbol } = myLibrary; ``` @@ -105,9 +111,9 @@ Diagnostics are used for linters and decorators which are covered in subsequent Open `./src/index.ts` and import your library definition: - ```typescript -import { myLibrary } from "./lib.js"; +// Re-export $lib to the compiler can get access to it and register your library correctly. +export { $lib } from "./lib.js"; ``` ### 6. Build TypeScript diff --git a/docs/extending-typespec/emitter-metadata-handling.md b/docs/extending-typespec/emitter-metadata-handling.md index 89383ee24e..e06e888323 100644 --- a/docs/extending-typespec/emitter-metadata-handling.md +++ b/docs/extending-typespec/emitter-metadata-handling.md @@ -23,16 +23,16 @@ However, if your emitter does want to split types as OpenAPI does, then it will These are the main API involved in handling these features. See the linked API reference documentation for more details. -- [`getRequestVisibility(HttpVerb): Visibility`](../standard-library/http/reference/js-api/index.md#getrequestvisibility) - Use this to determine the visibility implied for data in the request parameters or body. Also note that [`Visibility.Read`](../standard-library/http/reference/js-api/Enumeration.Visibility.md#item) is always applied for response data and therefore there is no corresponding API for the response. +- [`getRequestVisibility(HttpVerb): Visibility`](../standard-library/http/reference/js-api/index.md#getrequestvisibility) - Use this to determine the visibility implied for data in the request parameters or body. Also note that [`Visibility.Read`](../standard-library/http/reference/js-api/enumerations/Visibility.md#item) is always applied for response data and therefore there is no corresponding API for the response. -- [`MetadataInfo`](../standard-library/http/reference/js-api/Interface.MetadataInfo.md) - Create this once for each program using [`createMetadataInfo(Program, MetadataInfoOptions)`](../standard-library/http/reference/js-api/index.md#createmetadatainfo) then use it to reason about metadata and visibility implications with the API below. +- [`MetadataInfo`](../standard-library/http/reference/js-api/interfaces/MetadataInfo.md) - Create this once for each program using [`createMetadataInfo(Program, MetadataInfoOptions)`](../standard-library/http/reference/js-api/index.md#createmetadatainfo) then use it to reason about metadata and visibility implications with the API below. -- [`MetadataInfo.getEffectivePayloadType(Type, Visibility): Type`](../standard-library/http/reference/js-api/Interface.MetadataInfo.md#geteffectivepayloadtype) - Use this recursively on every type that is referenced. When given an anonymous model sourced entirely from a single named model after metadata is moved elsewhere or invisible properties are removed, it will recover the named model. This handles the commonly discussed case of seeing that `op something(...Thing)` receives a `Thing` in its request body, but also many other cases.. +- [`MetadataInfo.getEffectivePayloadType(Type, Visibility): Type`](../standard-library/http/reference/js-api/interfaces/MetadataInfo.md#geteffectivepayloadtype) - Use this recursively on every type that is referenced. When given an anonymous model sourced entirely from a single named model after metadata is moved elsewhere or invisible properties are removed, it will recover the named model. This handles the commonly discussed case of seeing that `op something(...Thing)` receives a `Thing` in its request body, but also many other cases.. -- [`MetadataInfo.isTransformed(Model, Visibility)`](../standard-library/http/reference/js-api/Interface.MetadataInfo.md#istransformed) - Use this to check if a type undergoes any changes in shape due to visibility or metadata. If not, this can allow for simplifications in emit. +- [`MetadataInfo.isTransformed(Model, Visibility)`](../standard-library/http/reference/js-api/interfaces/MetadataInfo.md#istransformed) - Use this to check if a type undergoes any changes in shape due to visibility or metadata. If not, this can allow for simplifications in emit. -- [`MetadataInfo.isPayloadProperty(ModelProperty, Visibility): boolean`](../standard-library/http/reference/js-api/Interface.MetadataInfo.md#ispayloadproperty) - Use this to check if a property is transmitted as an object property in the payload and is not invisible or metadata sent elsewhere. +- [`MetadataInfo.isPayloadProperty(ModelProperty, Visibility): boolean`](../standard-library/http/reference/js-api/interfaces/MetadataInfo.md#ispayloadproperty) - Use this to check if a property is transmitted as an object property in the payload and is not invisible or metadata sent elsewhere. -- [`MetadataInfo.isOptional(ModelProperty, Visibility): boolean`](../standard-library/http/reference/js-api/Interface.MetadataInfo.md#isoptional) - Use this to determine if a property is optional for the given visibility. This will differ from `ModelProperty.isOptional` when the Visibility is Update in which case the property is always considered optional. +- [`MetadataInfo.isOptional(ModelProperty, Visibility): boolean`](../standard-library/http/reference/js-api/interfaces/MetadataInfo.md#isoptional) - Use this to determine if a property is optional for the given visibility. This will differ from `ModelProperty.isOptional` when the Visibility is Update in which case the property is always considered optional. -- [`Visibility.Item`](../standard-library/http/reference/js-api/Enumeration.Visibility#item) - Add this flag when recursing into an array. This moves all metadata into the payload, which can be useful in scenarios like batching API calls. +- [`Visibility.Item`](../standard-library/http/reference/js-api/enumerations/Visibility.md#item) - Add this flag when recursing into an array. This moves all metadata into the payload, which can be useful in scenarios like batching API calls. diff --git a/docs/extending-typespec/linters.md b/docs/extending-typespec/linters.md index 0b43107349..c60191409b 100644 --- a/docs/extending-typespec/linters.md +++ b/docs/extending-typespec/linters.md @@ -109,14 +109,14 @@ export const $lib = createTypeSpecLibrary({ ruleSets: { recommended: { // (optional) A ruleset takes a map of rules to explicitly enable - enable: { [`@typespec/my-linter:${requiredDocRule.name}`]: true }, + enable: { [`@typespec/my-linter/${requiredDocRule.name}`]: true }, // (optional) A rule set can extend another rule set - extends: ["@typespec/best-practices:recommended"], + extends: ["@typespec/best-practices/recommended"], // (optional) A rule set can disable a rule enabled in a ruleset it extended. disable: { - "`@typespec/best-practices:no-a": "This doesn't apply in this ruleset.", + "`@typespec/best-practices/no-a": "This doesn't apply in this ruleset.", }, }, }, @@ -124,7 +124,7 @@ export const $lib = createTypeSpecLibrary({ }); ``` -When referencing a rule or ruleset(in `enable`, `extends`, `disable`) the rule or rule set id must be used which in this format: `:` +When referencing a rule or ruleset(in `enable`, `extends`, `disable`) the rule or rule set id must be used which in this format: `/` ## Testing a linter @@ -147,7 +147,7 @@ describe("required-doc rule", () => { it("emit diagnostics when using model named foo", async () => { await ruleTester.expect(`model Foo {}`).toEmitDiagnostics({ - code: "@typespec/my-linter:no-foo-model", + code: "@typespec/my-linter/no-foo-model", message: "Cannot name a model with 'Foo'", }); }); diff --git a/docs/getting-started/getting-started-http.md b/docs/getting-started/getting-started-http.md new file mode 100644 index 0000000000..66b5382eb6 --- /dev/null +++ b/docs/getting-started/getting-started-http.md @@ -0,0 +1,257 @@ +# Getting Started with TypeSpec For Http + +Let's create a REST API definition with TypeSpec. TypeSpec has an official HTTP API "binding" called `@typespec/http`. It's a set of TypeSpec declarations and decorators that describe HTTP APIs and can be used by code generators to generate OpenAPI descriptions, implementation code, and the like. +Built on top of the http library there is the rest library `@typespec/rest` which provide some REST concept like resources. + +TypeSpec also has an official OpenAPI emitter called `@typespec/openapi3` that consumes the HTTP API bindings and emits standard [OpenAPI 3.0](https://spec.openapis.org/oas/v3.0.3) descriptions. This can then be fed in to any OpenAPI code generation pipeline. + +References: + +- [Http library](../standard-library/http/reference) +- [Rest library](../standard-library/rest/reference) +- [OpenAPI 3 emitter](../standard-library/openapi3/reference) + +## Setup + +:::note +Make sure to have installed the [editor extension](../introduction/installation.md#install-the-vs-and-vscode-extensions) to get syntax highlighting and intellisense. +::: + +1. Make a new folder somewhere +2. Run `npx --package=@typespec/compiler tsp init` and select the `Generic Rest API` template +3. Run `npm install` to install dependencies +4. Run `npx tsp compile .` to compile the initial file + You can either run `npx tsp compile . --watch` to automatically compile change on save or keep running the command manually after that. + +Resulting file structure: + +``` +main.tsp +tspconfig.yaml +package.json +node_modules/ +tsp-output/ + @typespec/ + openapi3/ + openapi.yaml +``` + +## Service definition and metadata + +A definition for a service is the namespace that contains all the operations for the service and carries top-level metadata like service name and version. TypeSpec offers the following decorators for providing this metadata, and all are optional. + +- `@service` - Mark a namespace as a service namespace. Takes in the following options: + - `title`: Name of the service + - `version`: Version of the service +- `@server` - (In `TypeSpec.Http`) the host of the service. Can accept parameters. + +Here's an example that uses these to define a Pet Store service: + +```typespec +using TypeSpec.Http; +using TypeSpec.Rest; + +/** + * This is a sample server Petstore server. + */ +@service({ + title: "Pet Store Service", + version: "2021-03-25", +}) +@server("https://example.com", "Single server endpoint") +namespace PetStore; +``` + +The `server` keyword can take a third parameter with parameters as necessary: + +```typespec +@server("https://{region}.foo.com", "Regional endpoint", { + /** Region name */ + region?: string = "westus", +}) +``` + +## Resources & routes + +Resource is a general term for anything that can be identified by a URL and manipulated by HTTP methods. +In TypeSpec, the operations for a resource are typically grouped in a namespace. You declare such a namespace by adding the `@route` decorator to provide the path to that resource: + +```typespec +@route("/pets") +namespace Pets { + +} +``` + +Lets add a pet model in the namespace + +```tsp +model Pet { + @minLength(100) + name: string; + + @minValue(0) + @maxValue(100) + age: int32; + + kind: "dog" | "cat" | "fish"; +} +``` + +To define an operation on this resource, you need to provide the HTTP verb for the route using the `@get`, `@head` `@post`, `@put`, `@patch`, or `@delete` decorators. If an HTTP method decorator is not specified then the default is post if there is a body and get otherwise. Lets add an operation to our `Pets` resource: + +```typespec +@route("/pets") +namespace Pets { + op list(): Pet[]; + + // or you could also use + @get op listPets(): Pet[]; +} +``` + +### Automatic route generation + +Instead of manually specifying routes using the `@route` decorator, you automatically generate routes from operation parameters by applying the `@autoRoute` decorator to an operation or interface containing operations. + +For this to work, an operation's path parameters (those marked with `@path`) must also be marked with +the `@segment` decorator to define the preceding path segment. + +This is especially useful when reusing common parameter sets defined as model types. + +For example: + +```typespec +model CommonParameters { + @path + @segment("tenants") + tenantId: string; + + @path + @segment("users") + userName: string; +} + +model User { + name: string; +} +@error +model Error { + message: string; +} + +@autoRoute +interface UserOperations { + @get + getUser(...CommonParameters): User | Error; + + @put + updateUser(...CommonParameters, user: User): User | Error; +} +``` + +This will result in the following route for both operations + +```text +/tenants/{tenantId}/users/{userName} +``` + +## Path and query parameters + +Model properties and parameters which should be passed as path and query parameters use the `@path` and `@query` decorators respectively. Let's modify our list operation to support pagination, and add a read operation to our Pets resource: + +```typespec +@route("/pets") +namespace Pets { + op list(@query skip?: int32, @query top?: int32): Pet[]; + op read(@path petId: int32): Pet; +} +``` + +Path parameters are appended to the URL unless a substitution with that parameter name exists on the resource path. For example, we might define a sub-resource using the following TypeSpec. Note how the path parameter for our sub-resource's list operation corresponds to the substitution in the URL. + +```typespec +@route("/pets/{petId}/toys") +namespace PetToys { + model Toy { + name: string; + } + op list(@path petId: int32): Toy[]; +} +``` + +## Headers + +Model properties and parameters that should be passed in a header use the `@header` decorator. The decorator takes the header name as a parameter. If a header name is not provided, it is inferred from the property or parameter name. Let's add `etag` support to our pet store's read operation. + +```typespec +@route("/pets") +namespace Pets { + op list(@query skip: int32, @query top: int32): Pet[]; + op read(@path petId: int32, @header ifMatch?: string): { + @header eTag: string; + @body pet: Pet; + }; + @post + op create(@body pet: Pet): {}; +} +``` + +## Request & response bodies + +Request and response bodies can be declared explicitly using the `@body` decorator. Let's add an endpoint to create a pet. Let's also use this decorator for the responses, although this doesn't change anything about the API. + +```typespec +@route("/pets") +namespace Pets { + op list(@query skip: int32, @query top: int32): { + @body pets: Pet[]; + }; + op read(@path petId: int32): { + @body pet: Pet; + }; + @post + op create(@body pet: Pet): {}; +} +``` + +Note that in the absence of explicit `@body`: + +1. The set of parameters that are not marked @header, @query, or @path form the request body. +2. The set of properties of the return model that are not marked @header, @query, or @path form the response body. +3. If the return type is not a model, then it defines the response body. + +This is how we were able to return Pet and Pet[] bodies without using @body for list and read. We can actually write +create in the same terse style by spreading the Pet object into the parameter list like this: + +```typespec +@route("/pets") +namespace Pets { + @post + op create(...Pet): {}; +} +``` + +## Status codes + +Use the `@statusCode` decorator on a property to declare a status code for a response. Generally, setting this to just `int32` isn't particularly useful. Instead, use number literal types to create a discriminated union of response types. Let's add status codes to our responses, and add a 404 response to our read endpoint. + +```typespec +@route("/pets") +namespace Pets { + op list(@query skip: int32, @query top: int32): { + @statusCode statusCode: 200; + @body pets: Pet[]; + }; + op read(@path petId: int32, @header ifMatch?: string): { + @statusCode statusCode: 200; + @header eTag: string; + @body pet: Pet; + } | { + @statusCode statusCode: 404; + }; + op create(@body pet: Pet): { + @statusCode statusCode: 204; + }; +} +``` diff --git a/docs/getting-started/getting-started.md b/docs/getting-started/getting-started.md index 4ed298abb4..07c99deaa2 100644 --- a/docs/getting-started/getting-started.md +++ b/docs/getting-started/getting-started.md @@ -5,202 +5,4 @@ title: Getting Started # Getting Started with TypeSpec - - -Let's create a REST API definition with TypeSpec. TypeSpec has an official REST API "binding" called `@typespec/rest`. It's a set of TypeSpec declarations and decorators that describe REST APIs and can be used by code generators to generate OpenAPI descriptions, implementation code, and the like. - -TypeSpec also has an official OpenAPI emitter called `@typespec/openapi3` that consumes the REST API bindings and emits standard OpenAPI descriptions. This can then be fed in to any OpenAPI code generation pipeline. - -The following examples assume you have imported both `@typespec/openapi3` and `@typespec/rest` somewhere in your TypeSpec program (though importing them in `main.tsp` is the standard convention). For detailed library reference, please see rest library's [Readme.md](https://github.com/microsoft/typespec/blob/main/packages/rest/README.md). - -## Service definition and metadata - -A definition for a service is the namespace that contains all the operations for the service and carries top-level metadata like service name and version. TypeSpec offers the following decorators for providing this metadata, and all are optional. - -- @service - Mark a namespace as a service namespace. Takes in the following options: - - `title`: Name of the service - - `version`: Version of the service -- @server - (In `TypeSpec.Http`) the host of the service. Can accept parameters. - -Here's an example that uses these to define a Pet Store service: - -```typespec -@service({ - title: "Pet Store Service", - version: "2021-03-25", -}) -@server("https://example.com", "Single server endpoint") -@doc("This is a sample server Petstore server.") -namespace PetStore; -``` - -The `server` keyword can take a third parameter with parameters as necessary: - -```typespec -@server("https://{region}.foo.com", "Regional endpoint", { - @doc("Region name") - region?: string = "westus", -}) -``` - -## Resources & routes - -Resources are operations that are grouped in a namespace. You declare such a namespace by adding the `@route` decorator to provide the path to that resource: - -```typespec -using TypeSpec.Http; - -@route("/pets") -namespace Pets { - -} -``` - -To define an operation on this resource, you need to provide the HTTP verb for the route using the `@get`, `@head` `@post`, `@put`, `@patch`, or `@delete` decorators. Alternatively, you can name your operation `list`, `create`, `read`, `update`, `delete`, or `deleteAll` and the appropriate verb will be used automatically. Lets add an operation to our `Pets` resource: - -```typespec -@route("/pets") -namespace Pets { - op list(): Pet[]; - - // or you could also use - @get op listPets(): Pet[]; -} -``` - -### Automatic route generation - -Instead of manually specifying routes using the `@route` decorator, you automatically generate routes from operation parameters by applying the `@autoRoute` decorator to an operation or interface containing operations. - -For this to work, an operation's path parameters (those marked with `@path`) must also be marked with -the `@segment` decorator to define the preceding path segment. - -This is especially useful when reusing common parameter sets defined as model types. - -For example: - -```typespec -model CommonParameters { - @path - @segment("tenants") - tenantId: string; - - @path - @segment("users") - userName: string; -} - -@autoRoute -interface UserOperations { - @get - getUser(...CommonParameters): User | Error; - - @put - updateUser(...CommonParameters, user: User): User | Error; -} -``` - -This will result in the following route for both operations - -```text -/tenants/{tenantId}/users/{userName} -``` - -## Path and query parameters - -Model properties and parameters which should be passed as path and query parameters use the `@path` and `@query` parameters respectively. Let's modify our list operation to support pagination, and add a read operation to our Pets resource: - -```typespec -@route("/pets") -namespace Pets { - op list(@query skip: int32, @query top: int32): Pet[]; - op read(@path petId: int32): Pet; -} -``` - -Path parameters are appended to the URL unless a substitution with that parameter name exists on the resource path. For example, we might define a sub-resource using the following TypeSpec. Note how the path parameter for our sub-resource's list operation corresponds to the substitution in the URL. - -```typespec -@route("/pets/{petId}/toys") -namespace PetToys { - op list(@path petId: int32): Toy[]; -} -``` - -## Headers - -Model properties and parameters that should be passed in a header use the `@header` decorator. The decorator takes the header name as a parameter. If a header name is not provided, it is inferred from the property or parameter name. Let's add `etag` support to our pet store's read operation. - -```typespec -@route("/pets") -namespace Pets { - op list(@query skip: int32, @query top: int32): { - @body pets: Pet[]; - }; - op read(@path petId: int32, @header ifMatch?: string): { - @header eTag: string; - @body pet: Pet; - }; - @post - op create(@body pet: Pet): {}; -} -``` - -## Request & response bodies - -Request and response bodies can be declared explicitly using the `@body` decorator. Let's add an endpoint to create a pet. Let's also use this decorator for the responses, although this doesn't change anything about the API. - -```typespec -@route("/pets") -namespace Pets { - op list(@query skip: int32, @query top: int32): { - @body pets: Pet[]; - }; - op read(@path petId: int32): { - @body pet: Pet; - }; - @post - op create(@body pet: Pet): {}; -} -``` - -Note that in the absence of explicit `@body`: - -1. The set of parameters that are not marked @header, @query, or @path form the request body. -2. The set of properties of the return model that are not marked @header, @query, or @path form the response body. -3. If the return type is not a model, then it defines the response body. - -This is how we were able to return Pet and Pet[] bodies without using @body for list and read. We can actually write -create in the same terse style by spreading the Pet object into the parameter list like this: - -```typespec -@route("/pets") -namespace Pets { - @post - op create(...Pet): {}; -} -``` - -## Status codes - -Use the `@header` decorator on a property named `statusCode` to declare a status code for a response. Generally, setting this to just `int32` isn't particularly useful. Instead, use number literal types to create a discriminated union of response types. Let's add status codes to our responses, and add a 404 response to our read endpoint. - -```typespec -@route("/pets") -namespace Pets { - op list(@query skip: int32, @query top: int32): { - @statusCode statusCode: 200; - @body pets: Pet[]; - }; - op read(@path petId: int32, @header ifMatch?: string): { - @statusCode statusCode: 200; - @header eTag: string; - @body pet: Pet; - } | { - @statusCode statusCode: 404; - }; - op create(@body pet: Pet): { - @statusCode statusCode: 204; - }; -} -``` +- [Get started with HTTP in TypeSpec](./getting-started-http.md) diff --git a/docs/introduction/configuration/configuration.md b/docs/introduction/configuration/configuration.md index 0fd01e700f..a06e143a6a 100644 --- a/docs/introduction/configuration/configuration.md +++ b/docs/introduction/configuration/configuration.md @@ -316,13 +316,13 @@ Configure which linter rules should be enabled in this repository. Referencing t ```yaml linter: extends: # Extend `recommended` ruleset from @typespec/best-practices library - - "@typespec/best-practices:recommended" + - "@typespec/best-practices/recommended" enable: # Explicitly enable some rules - "@typespec/best-practices:no-x": true + "@typespec/best-practices/no-x": true disable: # Disable some rules defined in one of the ruleset extended. - "@typespec/best-practices:no-y": "This rule cannot be applied in this project because X" + "@typespec/best-practices/no-y": "This rule cannot be applied in this project because X" ``` ## Emitter control cli flags diff --git a/docs/standard-library/built-in-data-types.md b/docs/standard-library/built-in-data-types.md index 6e0a469f9d..9badf3d43e 100644 --- a/docs/standard-library/built-in-data-types.md +++ b/docs/standard-library/built-in-data-types.md @@ -3,5 +3,413 @@ title: "Built-in Data types" toc_min_heading_level: 2 toc_max_heading_level: 3 --- +# Data types +## TypeSpec +### `Array` {#Array} + + + + +```typespec +model Array +``` + +#### Template Parameters +| Name | Description | +|------|-------------| +| T | The type of the array elements | + + + +### `DefaultKeyVisibility` {#DefaultKeyVisibility} + +Applies a visibility setting to a collection of properties. + +```typespec +model DefaultKeyVisibility +``` + +#### Template Parameters +| Name | Description | +|------|-------------| +| T | An object whose properties are spread. | +| Visibility | The visibility to apply to all properties. | + + + +### `object` {#object} + +Represent a model + +```typespec +model object +``` + + + +### `OmitDefaults` {#OmitDefaults} + +Represents a collection of properties with default values omitted. + +```typespec +model OmitDefaults +``` + +#### Template Parameters +| Name | Description | +|------|-------------| +| T | An object whose spread property defaults are all omitted. | + + + +### `OmitProperties` {#OmitProperties} + +Represents a collection of omitted properties. + +```typespec +model OmitProperties +``` + +#### Template Parameters +| Name | Description | +|------|-------------| +| T | An object whose properties are spread. | +| TKeys | The property keys to omit. | + + + +### `OptionalProperties` {#OptionalProperties} + +Represents a collection of optional properties. + +```typespec +model OptionalProperties +``` + +#### Template Parameters +| Name | Description | +|------|-------------| +| T | An object whose spread properties are all optional. | + + + +### `Record` {#Record} + + + + +```typespec +model Record +``` + +#### Template Parameters +| Name | Description | +|------|-------------| +| T | The type of the properties | + + + +### `ServiceOptions` {#ServiceOptions} + +Service options. + +```typespec +model ServiceOptions +``` + + + +### `UpdateableProperties` {#UpdateableProperties} + +Represents a collection of updateable properties. + +```typespec +model UpdateableProperties +``` + +#### Template Parameters +| Name | Description | +|------|-------------| +| T | An object whose spread properties are all updateable. | + + + +### `BytesKnownEncoding` {#BytesKnownEncoding} + +Known encoding to use on bytes + +```typespec +enum BytesKnownEncoding +``` + + + +### `DateTimeKnownEncoding` {#DateTimeKnownEncoding} + +Known encoding to use on utcDateTime or offsetDateTime + +```typespec +enum DateTimeKnownEncoding +``` + + + +### `DurationKnownEncoding` {#DurationKnownEncoding} + +Known encoding to use on duration + +```typespec +enum DurationKnownEncoding +``` + + + +### `boolean` {#boolean} + +Boolean with `true` and `false` values. + +```typespec +scalar boolean +``` + + + +### `bytes` {#bytes} + +Represent a byte array + +```typespec +scalar bytes +``` + + + +### `decimal` {#decimal} + +A decimal number with any length and precision. + +```typespec +scalar decimal +``` + + + +### `decimal128` {#decimal128} + +A 128-bit decimal number. + +```typespec +scalar decimal128 +``` + + + +### `duration` {#duration} + +A duration/time period. e.g 5s, 10h + +```typespec +scalar duration +``` + + + +### `float` {#float} + +A number with decimal value + +```typespec +scalar float +``` + + + +### `float32` {#float32} + +A 32 bit floating point number. (`±5.0 × 10^−324` to `±1.7 × 10^308`) + +```typespec +scalar float32 +``` + + + +### `float64` {#float64} + +A 32 bit floating point number. (`±1.5 x 10^−45` to `±3.4 x 10^38`) + +```typespec +scalar float64 +``` + + + +### `int16` {#int16} + +A 16-bit integer. (`-32,768` to `32,767`) + +```typespec +scalar int16 +``` + + + +### `int32` {#int32} + +A 32-bit integer. (`-2,147,483,648` to `2,147,483,647`) + +```typespec +scalar int32 +``` + + + +### `int64` {#int64} + +A 64-bit integer. (`-9,223,372,036,854,775,808` to `9,223,372,036,854,775,807`) + +```typespec +scalar int64 +``` + + + +### `int8` {#int8} + +A 8-bit integer. (`-128` to `127`) + +```typespec +scalar int8 +``` + + + +### `integer` {#integer} + +A whole number + +```typespec +scalar integer +``` + + + +### `numeric` {#numeric} + +A numeric type + +```typespec +scalar numeric +``` + + + +### `offsetDateTime` {#offsetDateTime} + +A date and time in a particular time zone, e.g. "April 10th at 3:00am in PST" + +```typespec +scalar offsetDateTime +``` + + + +### `plainDate` {#plainDate} + +A date on a calendar without a time zone, e.g. "April 10th" + +```typespec +scalar plainDate +``` + + + +### `plainTime` {#plainTime} + +A time on a clock without a time zone, e.g. "3:00 am" + +```typespec +scalar plainTime +``` + + + +### `safeint` {#safeint} + +An integer that can be serialized to JSON (`−9007199254740991 (−(2^53 − 1))` to `9007199254740991 (2^53 − 1)` ) + +```typespec +scalar safeint +``` + + + +### `string` {#string} + +A sequence of textual characters. + +```typespec +scalar string +``` + + + +### `uint16` {#uint16} + +A 16-bit unsigned integer (`0` to `65,535`) + +```typespec +scalar uint16 +``` + + + +### `uint32` {#uint32} + +A 32-bit unsigned integer (`0` to `4,294,967,295`) + +```typespec +scalar uint32 +``` + + + +### `uint64` {#uint64} + +A 64-bit unsigned integer (`0` to `18,446,744,073,709,551,615`) + +```typespec +scalar uint64 +``` + + + +### `uint8` {#uint8} + +A 8-bit unsigned integer (`0` to `255`) + +```typespec +scalar uint8 +``` + + + +### `url` {#url} + +Represent a URL string as described by https://url.spec.whatwg.org/ + +```typespec +scalar url +``` + + + +### `utcDateTime` {#utcDateTime} + +An instant in coordinated universal time (UTC)" + +```typespec +scalar utcDateTime +``` + -See [Language Basics: Built-in types](../language-basics/built-in-types) diff --git a/docs/standard-library/built-in-decorators.md b/docs/standard-library/built-in-decorators.md index 7fe661ff2b..a6dcb9ade1 100644 --- a/docs/standard-library/built-in-decorators.md +++ b/docs/standard-library/built-in-decorators.md @@ -158,6 +158,32 @@ message: string; ``` +### `@errorsDoc` {#@errorsDoc} + +Attach a documentation string to describe the error return types of an operation. +If an operation returns a union of success and errors it only describe the errors. See `@errorsDoc` for success documentation. + +```typespec +@errorsDoc(doc: valueof string) +``` + +#### Target + +`Operation` + +#### Parameters +| Name | Type | Description | +|------|------|-------------| +| doc | `valueof scalar string` | Documentation string | + +#### Examples + +```typespec +@errorsDoc("Returns doc") +op get(): Pet | NotFound; +``` + + ### `@format` {#@format} Specify a known data format hint for this string type. For example `uuid`, `uri`, etc. @@ -631,6 +657,32 @@ expireAt: int32; ``` +### `@returnsDoc` {#@returnsDoc} + +Attach a documentation string to describe the successful return types of an operation. +If an operation returns a union of success and errors it only describe the success. See `@errorsDoc` for error documentation. + +```typespec +@returnsDoc(doc: valueof string) +``` + +#### Target + +`Operation` + +#### Parameters +| Name | Type | Description | +|------|------|-------------| +| doc | `valueof scalar string` | Documentation string | + +#### Examples + +```typespec +@returnsDoc("Returns doc") +op get(): Pet | NotFound; +``` + + ### `@returnTypeVisibility` {#@returnTypeVisibility} Sets which visibilities apply to the return type for the given operation. diff --git a/docs/standard-library/openapi3/reference/decorators.md b/docs/standard-library/openapi3/reference/decorators.md index 331c010c7e..eefd6469cc 100644 --- a/docs/standard-library/openapi3/reference/decorators.md +++ b/docs/standard-library/openapi3/reference/decorators.md @@ -18,7 +18,7 @@ Specify that `oneOf` should be used instead of `anyOf` for that union. #### Target -`Union` +`union Union | ModelProperty` #### Parameters diff --git a/docs/standard-library/rest/resource-routing.md b/docs/standard-library/rest/resource-routing.md index 006246cbdd..a76d4b6070 100644 --- a/docs/standard-library/rest/resource-routing.md +++ b/docs/standard-library/rest/resource-routing.md @@ -15,7 +15,7 @@ namespace Pets { } ``` -To define an operation on this resource, you need to provide the HTTP verb for the route using the `@get`, `@head` `@post`, `@put`, `@patch`, or `@delete` decorators. Alternatively, you can name your operation `list`, `create`, `read`, `update`, `delete`, or `deleteAll` and the appropriate verb will be used automatically. Lets add an operation to our `Pets` resource: +To define an operation on this resource, you need to provide the HTTP verb for the route using the `@get`, `@head` `@post`, `@put`, `@patch`, or `@delete` decorators. If an HTTP method decorator is not specified then the default is post if there is a body and get otherwise. Lets add an operation to our `Pets` resource: ```typespec @route("/pets") diff --git a/eng/pipelines/jobs/build-and-test.yml b/eng/pipelines/jobs/build-and-test.yml index e4bc9d4506..d003bbca2a 100644 --- a/eng/pipelines/jobs/build-and-test.yml +++ b/eng/pipelines/jobs/build-and-test.yml @@ -36,9 +36,7 @@ steps: # Unlink node_modules folders to significantly improve performance of subsequent tasks # which need to walk the directory tree (and are hardcoded to follow symlinks). - # Append "|| cd ." to command to ignore errors (works on both Windows and Linux) as a workaround - # for microsoft/rushstack#4334. - - script: node common/scripts/install-run-rush.js purge || cd . + - script: node common/scripts/install-run-rush.js purge displayName: "Purge dependencies" condition: always() diff --git a/eng/pipelines/jobs/publish-artifacts.yml b/eng/pipelines/jobs/publish-artifacts.yml index ef8142e919..812b20c704 100644 --- a/eng/pipelines/jobs/publish-artifacts.yml +++ b/eng/pipelines/jobs/publish-artifacts.yml @@ -27,7 +27,7 @@ jobs: displayName: Regen manifest for compiler workingDirectory: ./packages/compiler - - script: npx @microsoft/rush publish --publish --pack --include-all + - script: node common/scripts/install-run-rush.js publish --publish --pack --include-all displayName: Pack packages - publish: $(Build.SourcesDirectory)/common/temp/artifacts/packages diff --git a/eng/pipelines/jobs/pull-request-consistency.yml b/eng/pipelines/jobs/pull-request-consistency.yml index bf6cae5d3e..6d8dfd335b 100644 --- a/eng/pipelines/jobs/pull-request-consistency.yml +++ b/eng/pipelines/jobs/pull-request-consistency.yml @@ -2,13 +2,7 @@ steps: - checkout: self submodules: true - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: Install Node.js - - - script: node common/scripts/install-run-rush.js install --max-install-attempts 3 - displayName: Install JavaScript Dependencies + - template: ../templates/install.yml - script: node common/scripts/install-run-rush.js change -v condition: and(succeeded(), not(or(startsWith(variables['System.PullRequest.SourceBranch'], 'publish/'), startsWith(variables['System.PullRequest.SourceBranch'], 'backmerge/')))) diff --git a/eng/pipelines/pr-tryit.yml b/eng/pipelines/pr-tryit.yml index 4f92952721..f56414d0be 100644 --- a/eng/pipelines/pr-tryit.yml +++ b/eng/pipelines/pr-tryit.yml @@ -16,13 +16,7 @@ jobs: - checkout: self persistCredentials: true - - task: NodeTool@0 - inputs: - versionSpec: 16.x - displayName: Install Node.js - - - script: node common/scripts/install-run-rush.js install --max-install-attempts 3 - displayName: Install JavaScript Dependencies + - template: ./templates/install.yml - template: ./templates/build.yml @@ -51,7 +45,3 @@ jobs: --destination-path $(TYPESPEC_WEBSITE_BASE_PATH) \ --source "./packages/website/build/" \ --overwrite - - - script: node eng/scripts/create-tryit-comment.js - displayName: Check already commented - continueOnError: true # Setting this in case this starts working again diff --git a/eng/pipelines/templates/install.yml b/eng/pipelines/templates/install.yml index 9dfd5bbc2c..3e158078cb 100644 --- a/eng/pipelines/templates/install.yml +++ b/eng/pipelines/templates/install.yml @@ -9,6 +9,7 @@ steps: inputs: versionSpec: ${{ parameters.nodeVersion }} displayName: Install Node.js + retryCountOnTaskFailure: 3 - task: UseDotNet@2 inputs: @@ -23,8 +24,10 @@ steps: dotnet --version displayName: "Log tool versions used" - - script: node common/scripts/install-run-rush.js install --max-install-attempts 3 + # purge before install to ensure a clean state between retries + - script: node common/scripts/install-run-rush.js install --purge displayName: Install JavaScript Dependencies + retryCountOnTaskFailure: 3 - script: dotnet restore displayName: Restore .NET Dependencies diff --git a/eng/scripts/create-tryit-comment.js b/eng/scripts/create-tryit-comment.js index ad4e87bd1b..641bc94802 100644 --- a/eng/scripts/create-tryit-comment.js +++ b/eng/scripts/create-tryit-comment.js @@ -44,7 +44,7 @@ async function main() { ``, `You can try these changes at https://cadlplayground.z22.web.core.windows.net${folderName}/prs/${prNumber}/`, "", - `Check the website changes at https://tspwebsitepr.z5.web.core.windows.net${folderName}/prs/${prNumber}/`, + `Check the website changes at https://tspwebsitepr.z22.web.core.windows.net${folderName}/prs/${prNumber}/`, ].join("\n"); await writeComment(repo, prNumber, comment, ghAuth); } diff --git a/packages/best-practices/src/lib.ts b/packages/best-practices/src/lib.ts index 6b1f4296bf..679485edca 100644 --- a/packages/best-practices/src/lib.ts +++ b/packages/best-practices/src/lib.ts @@ -8,7 +8,7 @@ export const $lib = createTypeSpecLibrary({ rules: [casingRule], ruleSets: { recommended: { - enable: { [`@typespec/best-practices:${casingRule.name}`]: true }, + enable: { [`@typespec/best-practices/${casingRule.name}`]: true }, }, }, }, diff --git a/packages/bundler/package.json b/packages/bundler/package.json index 3e10d59339..ebd68622a7 100644 --- a/packages/bundler/package.json +++ b/packages/bundler/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/bundler", - "version": "0.1.0", + "version": "0.1.0-alpha.0", "author": "Microsoft Corporation", "description": "Package to bundle a typespec library.", "homepage": "https://microsoft.github.io/typespec", diff --git a/packages/compiler/lib/decorators.tsp b/packages/compiler/lib/decorators.tsp index 9d8a9845e1..231e1531b6 100644 --- a/packages/compiler/lib/decorators.tsp +++ b/packages/compiler/lib/decorators.tsp @@ -29,6 +29,32 @@ extern dec summary(target: unknown, summary: valueof string); */ extern dec doc(target: unknown, doc: valueof string, formatArgs?: {}); +/** + * Attach a documentation string to describe the successful return types of an operation. + * If an operation returns a union of success and errors it only describe the success. See `@errorsDoc` for error documentation. + * @param doc Documentation string + * + * @example + * ```typespec + * @returnsDoc("Returns doc") + * op get(): Pet | NotFound; + * ``` + */ +extern dec returnsDoc(target: Operation, doc: valueof string); + +/** + * Attach a documentation string to describe the error return types of an operation. + * If an operation returns a union of success and errors it only describe the errors. See `@errorsDoc` for success documentation. + * @param doc Documentation string + * + * @example + * ```typespec + * @errorsDoc("Returns doc") + * op get(): Pet | NotFound; + * ``` + */ +extern dec errorsDoc(target: Operation, doc: valueof string); + /** * Mark this type as deprecated. * diff --git a/packages/compiler/src/config/config-to-options.ts b/packages/compiler/src/config/config-to-options.ts index 4996699dc2..5ad6c58c54 100644 --- a/packages/compiler/src/config/config-to-options.ts +++ b/packages/compiler/src/config/config-to-options.ts @@ -6,21 +6,22 @@ import { expandConfigVariables } from "./config-interpolation.js"; import { loadTypeSpecConfigForPath, validateConfigPathsAbsolute } from "./config-loader.js"; import { EmitterOptions, TypeSpecConfig } from "./types.js"; -export interface ResolveCompilerOptionsOptions { +export interface ResolveCompilerOptionsOptions extends ConfigToOptionsOptions { /** Absolute entrypoint path */ entrypoint: string; /** Explicit config path. */ configPath?: string; +} - /** Current working directory. This will be used to interpolate `{cwd}` in the config. - * @default to `process.cwd()` +export interface ConfigToOptionsOptions { + /** + * Current working directory. This will be used to interpolate `{cwd}` in the config. */ - cwd?: string; + cwd: string; /** * Environment variables. - * @default process.env */ env?: Record; @@ -42,7 +43,6 @@ export async function resolveCompilerOptions( host: CompilerHost, options: ResolveCompilerOptionsOptions ): Promise<[CompilerOptions, readonly Diagnostic[]]> { - const cwd = normalizePath(options.cwd ?? process.cwd()); const diagnostics = createDiagnosticCollector(); const entrypointStat = await doIO( @@ -62,6 +62,20 @@ export async function resolveCompilerOptions( ); config.diagnostics.forEach((x) => diagnostics.add(x)); + const compilerOptions = diagnostics.pipe(resolveOptionsFromConfig(config, options)); + return diagnostics.wrap(compilerOptions); +} + +/** + * Resolve the compiler options from the given raw TypeSpec config + * @param config TypeSpec config. + * @param options Options for interpolation in the config. + * @returns + */ +export function resolveOptionsFromConfig(config: TypeSpecConfig, options: ConfigToOptionsOptions) { + const cwd = normalizePath(options.cwd); + const diagnostics = createDiagnosticCollector(); + const configWithOverrides: TypeSpecConfig = { ...config, ...options.overrides, @@ -71,7 +85,7 @@ export async function resolveCompilerOptions( expandConfigVariables(configWithOverrides, { cwd, outputDir: options.overrides?.outputDir, - env: options.env ?? process.env, + env: options.env ?? {}, args: options.args, }) ); diff --git a/packages/compiler/src/core/checker.ts b/packages/compiler/src/core/checker.ts index fffde4aae8..0a36f675b9 100644 --- a/packages/compiler/src/core/checker.ts +++ b/packages/compiler/src/core/checker.ts @@ -285,7 +285,9 @@ export function createChecker(program: Program): Checker { }; const globalNamespaceNode = createGlobalNamespaceNode(); const globalNamespaceType = createGlobalNamespaceType(); - let typespecNamespaceNode: NamespaceStatementNode | undefined; + + // Caches the deprecation test of nodes in the program + const nodeDeprecationMap = new Map(); const errorType: ErrorType = createType({ kind: "Intrinsic", name: "ErrorType" }); const voidType = createType({ kind: "Intrinsic", name: "void" } as const); @@ -325,22 +327,20 @@ export function createChecker(program: Program): Checker { mergeSourceFile(file); } - for (const file of program.sourceFiles.values()) { - setUsingsForFile(file); - } - const typespecNamespaceBinding = globalNamespaceNode.symbol.exports!.get("TypeSpec"); if (typespecNamespaceBinding) { // the typespec namespace binding will be absent if we've passed // the no-std-lib option. // the first declaration here is the JS file for the typespec script. - typespecNamespaceNode = typespecNamespaceBinding.declarations[1] as NamespaceStatementNode; initializeTypeSpecIntrinsics(); for (const file of program.sourceFiles.values()) { addUsingSymbols(typespecNamespaceBinding.exports!, file.locals); } } + for (const file of program.sourceFiles.values()) { + setUsingsForFile(file); + } let evalContext: EvalContext | undefined = undefined; const checker: Checker = { @@ -459,10 +459,6 @@ export function createChecker(program: Program): Checker { usedUsing.add(namespaceSym); addUsingSymbols(sym.exports!, parentNs.locals!); } - - if (typespecNamespaceNode) { - addUsingSymbols(typespecNamespaceBinding!.exports!, file.locals); - } } function applyAugmentDecorators(node: TypeSpecScriptNode | NamespaceStatementNode) { @@ -867,6 +863,48 @@ export function createChecker(program: Program): Checker { } } + function isTypeReferenceContextDeprecated(node: Node): boolean { + function checkDeprecatedNode(node: Node) { + // Perform a simple check if the parent node is deprecated. We do this + // out of band because `checkDirectives` usually gets called on the parent + // type after child types have already been checked (including their + // deprecations). + if (!nodeDeprecationMap.has(node)) { + nodeDeprecationMap.set( + node, + (node.directives ?? []).findIndex((d) => d.target.sv === "deprecated") >= 0 + ); + } + + return nodeDeprecationMap.get(node)!; + } + + // Walk the parent hierarchy up to a node which might have a + // deprecation which would mitigate the deprecation warning of the original + // type reference. This is done to prevent multiple deprecation notices from + // being raised when a parent context is already being deprecated. + switch (node.kind) { + case SyntaxKind.ModelStatement: + return checkDeprecatedNode(node); + case SyntaxKind.OperationStatement: + return ( + checkDeprecatedNode(node) || + (node.parent!.kind === SyntaxKind.InterfaceStatement && + isTypeReferenceContextDeprecated(node.parent!)) + ); + case SyntaxKind.InterfaceStatement: + return checkDeprecatedNode(node); + case SyntaxKind.IntersectionExpression: + case SyntaxKind.UnionExpression: + case SyntaxKind.ModelProperty: + case SyntaxKind.OperationSignatureDeclaration: + case SyntaxKind.OperationSignatureReference: + return isTypeReferenceContextDeprecated(node.parent!); + default: + return false; + } + } + function checkTypeReferenceArgs( node: TypeReferenceNode | MemberExpressionNode | IdentifierNode, mapper: TypeMapper | undefined @@ -1065,10 +1103,14 @@ export function createChecker(program: Program): Checker { } } - // Check for deprecations here, first on symbol, then on type. + // Check for deprecations here, first on symbol, then on type. However, + // don't raise deprecation when the usage site is also a deprecated + // declaration. const declarationNode = sym?.declarations[0]; if (declarationNode && mapper === undefined) { - checkDeprecated(baseType, declarationNode, node); + if (!isTypeReferenceContextDeprecated(node.parent!)) { + checkDeprecated(baseType, declarationNode, node); + } } return baseType; @@ -3130,10 +3172,7 @@ export function createChecker(program: Program): Checker { ) { const doc = extractParamDoc(prop.parent.parent.parent, type.name); if (doc) { - type.decorators.unshift({ - decorator: $docFromComment, - args: [{ value: createLiteralType(doc), jsValue: doc }], - }); + type.decorators.unshift(createDocFromCommentDecorator("self", doc)); } } finishType(type); @@ -3144,6 +3183,16 @@ export function createChecker(program: Program): Checker { return type; } + function createDocFromCommentDecorator(key: "self" | "returns" | "errors", doc: string) { + return { + decorator: $docFromComment, + args: [ + { value: createLiteralType(key), jsValue: key }, + { value: createLiteralType(doc), jsValue: doc }, + ], + }; + } + function isValueType(type: Type): boolean { if (type === nullType) { return true; @@ -3390,10 +3439,16 @@ export function createChecker(program: Program): Checker { // Doc comment should always be the first decorator in case an explicit @doc must override it. const docComment = extractMainDoc(targetType); if (docComment) { - decorators.unshift({ - decorator: $docFromComment, - args: [{ value: createLiteralType(docComment), jsValue: docComment }], - }); + decorators.unshift(createDocFromCommentDecorator("self", docComment)); + } + if (targetType.kind === "Operation") { + const returnTypesDocs = extractReturnsDocs(targetType); + if (returnTypesDocs.returns) { + decorators.unshift(createDocFromCommentDecorator("returns", returnTypesDocs.returns)); + } + if (returnTypesDocs.errors) { + decorators.unshift(createDocFromCommentDecorator("errors", returnTypesDocs.errors)); + } } return decorators; } @@ -5778,6 +5833,30 @@ function extractMainDoc(type: Type): string | undefined { return trimmed === "" ? undefined : trimmed; } +function extractReturnsDocs(type: Type): { + returns: string | undefined; + errors: string | undefined; +} { + const result: { returns: string | undefined; errors: string | undefined } = { + returns: undefined, + errors: undefined, + }; + if (type.node?.docs === undefined) { + return result; + } + for (const doc of type.node.docs) { + for (const tag of doc.tags) { + if (tag.kind === SyntaxKind.DocReturnsTag) { + result.returns = getDocContent(tag.content); + } + if (tag.kind === SyntaxKind.DocErrorsTag) { + result.errors = getDocContent(tag.content); + } + } + } + return result; +} + function extractParamDoc(node: OperationStatementNode, paramName: string): string | undefined { if (node.docs === undefined) { return undefined; diff --git a/packages/compiler/src/core/cli/actions/format.ts b/packages/compiler/src/core/cli/actions/format.ts index d1bc11f327..c2d6dbabd3 100644 --- a/packages/compiler/src/core/cli/actions/format.ts +++ b/packages/compiler/src/core/cli/actions/format.ts @@ -1,4 +1,5 @@ import { findUnformattedTypeSpecFiles, formatTypeSpecFiles } from "../../formatter-fs.js"; +import { logDiagnostics } from "../../index.js"; import { CliCompilerHost } from "../types.js"; export interface FormatArgs { @@ -23,9 +24,13 @@ export async function formatAction(host: CliCompilerHost, args: FormatArgs) { process.exit(1); } } else { - await formatTypeSpecFiles(args["include"], { + const [_, diagnostics] = await formatTypeSpecFiles(args["include"], { exclude: args["exclude"], debug: args.debug, }); + if (diagnostics.length > 0) { + logDiagnostics(diagnostics, host.logSink); + process.exit(1); + } } } diff --git a/packages/compiler/src/core/decorator-utils.ts b/packages/compiler/src/core/decorator-utils.ts index 1edbdaa877..fd4bf48891 100644 --- a/packages/compiler/src/core/decorator-utils.ts +++ b/packages/compiler/src/core/decorator-utils.ts @@ -1,6 +1,6 @@ import { getPropertyType } from "../lib/decorators.js"; +import { compilerAssert, ignoreDiagnostics } from "./diagnostics.js"; import { getTypeName } from "./helpers/type-name-utils.js"; -import { compilerAssert, ignoreDiagnostics, Interface, Model, SyntaxKind } from "./index.js"; import { createDiagnostic, reportDiagnostic } from "./messages.js"; import { Program } from "./program.js"; import { @@ -8,9 +8,12 @@ import { DecoratorFunction, Diagnostic, DiagnosticTarget, + Interface, IntrinsicScalarName, + Model, ModelProperty, Scalar, + SyntaxKind, Type, } from "./types.js"; @@ -75,6 +78,9 @@ export function isIntrinsicType( ); } +/** + * @deprecated this function is deprecated use decorator definition in typespec instead or check assignability directly. + */ export function validateDecoratorTargetIntrinsic( context: DecoratorContext, target: Scalar | ModelProperty, @@ -85,7 +91,7 @@ export function validateDecoratorTargetIntrinsic( const expectedTypes = expectedTypeStrs.map((x) => context.program.checker.getStdType(x)); const type = getPropertyType(target); const isCorrect = expectedTypes.some( - (x) => context.program.checker.isTypeAssignableTo(type.projectionBase ?? type, x, type)[0] + (x) => context.program.checker.isTypeAssignableTo(type, x, type)[0] ); if (!isCorrect) { context.program.reportDiagnostic( diff --git a/packages/compiler/src/core/formatter-fs.ts b/packages/compiler/src/core/formatter-fs.ts index 07c58aa797..30a674f0bb 100644 --- a/packages/compiler/src/core/formatter-fs.ts +++ b/packages/compiler/src/core/formatter-fs.ts @@ -3,6 +3,8 @@ import { globby } from "globby"; import { resolveConfig } from "prettier"; import { PrettierParserError } from "../formatter/parser.js"; import { checkFormatTypeSpec, formatTypeSpec } from "./formatter.js"; +import { Diagnostic, NoTarget } from "./index.js"; +import { createDiagnostic } from "./messages.js"; import { normalizePath } from "./path-utils.js"; export interface TypeSpecFormatOptions { @@ -10,28 +12,46 @@ export interface TypeSpecFormatOptions { debug?: boolean; } +export interface TypeSpecFormatResult { + /** + * The list of files which were formatted successfully, the paths of which are either relative or absolute based on the original file path patterns. + */ + formattedFiles: string[]; +} + /** * Format all the TypeSpec files. * @param patterns List of wildcard pattern searching for TypeSpec files. + * @returns list of files which failed to format. */ export async function formatTypeSpecFiles( patterns: string[], { exclude, debug }: TypeSpecFormatOptions -) { +): Promise<[TypeSpecFormatResult, readonly Diagnostic[]]> { const files = await findFiles(patterns, exclude); + const diagnostics: Diagnostic[] = []; + const formattedFiles: string[] = []; for (const file of files) { try { await formatTypeSpecFile(file); + formattedFiles.push(file); } catch (e) { if (e instanceof PrettierParserError) { const details = debug ? e.message : ""; - // eslint-disable-next-line no-console - console.error(`File '${file}' failed to format. ${details}`); + diagnostics.push( + createDiagnostic({ + code: "format-failed", + format: { file, details }, + target: NoTarget, + }) + ); } else { throw e; } } } + + return [{ formattedFiles }, diagnostics]; } /** diff --git a/packages/compiler/src/core/messages.ts b/packages/compiler/src/core/messages.ts index f4840bf739..1603e7797d 100644 --- a/packages/compiler/src/core/messages.ts +++ b/packages/compiler/src/core/messages.ts @@ -652,6 +652,16 @@ const diagnostics = { }, }, + /** + * Formatter + */ + "format-failed": { + severity: "error", + messages: { + default: paramMessage`File '${"file"}' failed to format. ${"details"}`, + }, + }, + /** * Decorator */ diff --git a/packages/compiler/src/core/parser.ts b/packages/compiler/src/core/parser.ts index 10e9d50a53..d3c66f9c4a 100644 --- a/packages/compiler/src/core/parser.ts +++ b/packages/compiler/src/core/parser.ts @@ -27,6 +27,7 @@ import { DirectiveArgument, DirectiveExpressionNode, DocContent, + DocErrorsTagNode, DocNode, DocParamTagNode, DocReturnsTagNode, @@ -2399,8 +2400,13 @@ function createParser(code: string | SourceFile, options: ParseOptions = {}): Pa } type ParamLikeTag = DocTemplateTagNode | DocParamTagNode; - type SimpleTag = DocReturnsTagNode | DocUnknownTagNode; + type SimpleTag = DocReturnsTagNode | DocErrorsTagNode | DocUnknownTagNode; + /** + * Parses a documentation tag. + * + * @see TypeSpec documentation docs + */ function parseDocTag(): DocTag { const pos = tokenPos(); parseExpected(Token.At); @@ -2413,11 +2419,17 @@ function createParser(code: string | SourceFile, options: ParseOptions = {}): Pa case "return": case "returns": return parseDocSimpleTag(pos, tagName, SyntaxKind.DocReturnsTag); + case "errors": + return parseDocSimpleTag(pos, tagName, SyntaxKind.DocErrorsTag); default: return parseDocSimpleTag(pos, tagName, SyntaxKind.DocUnknownTag); } } + /** + * Handles param-like documentation comment tags. + * For example, `@param` and `@template`. + */ function parseDocParamLikeTag( pos: number, tagName: IdentifierNode, @@ -2425,7 +2437,9 @@ function createParser(code: string | SourceFile, options: ParseOptions = {}): Pa messageId: keyof CompilerDiagnostics["doc-invalid-identifier"] ): ParamLikeTag { const name = parseDocIdentifier(messageId); + parseOptionalHyphenDocParamLikeTag(); const content = parseDocContent(); + return { kind, tagName, @@ -2435,6 +2449,23 @@ function createParser(code: string | SourceFile, options: ParseOptions = {}): Pa }; } + /** + * Handles the optional hyphen in param-like documentation comment tags. + * + * TypeSpec recommends no hyphen, but supports a hyphen to match TSDoc. + * (Original design discussion recorded in [2390].) + * + * [2390]: https://github.com/microsoft/typespec/issues/2390 + */ + function parseOptionalHyphenDocParamLikeTag() { + while (parseOptional(Token.Whitespace)); // Skip whitespace + if (parseOptional(Token.Hyphen)) { + // The doc content started with a hyphen, so skip subsequent whitespace + // (The if statement already advanced past the hyphen itself.) + while (parseOptional(Token.Whitespace)); + } + } + function parseDocSimpleTag( pos: number, tagName: IdentifierNode, @@ -3127,6 +3158,7 @@ export function visitChildren(node: Node, cb: NodeCallback): T | undefined visitNode(cb, node.tagName) || visitNode(cb, node.paramName) || visitEach(cb, node.content) ); case SyntaxKind.DocReturnsTag: + case SyntaxKind.DocErrorsTag: case SyntaxKind.DocUnknownTag: return visitNode(cb, node.tagName) || visitEach(cb, node.content); diff --git a/packages/compiler/src/core/scanner.ts b/packages/compiler/src/core/scanner.ts index 0365576e69..ae52583a76 100644 --- a/packages/compiler/src/core/scanner.ts +++ b/packages/compiler/src/core/scanner.ts @@ -159,6 +159,7 @@ export type DocToken = | Token.At | Token.CloseBrace | Token.Identifier + | Token.Hyphen | Token.DocText | Token.DocCodeSpan | Token.DocCodeFenceDelimiter @@ -617,6 +618,9 @@ export function createScanner( case CharCode.Bar: if (atConflictMarker()) return scanConflictMarker(); return next(Token.DocText); + + case CharCode.Minus: + return next(Token.Hyphen); } if (isAsciiIdentifierStart(ch)) { diff --git a/packages/compiler/src/core/types.ts b/packages/compiler/src/core/types.ts index 110f8121b1..524b7225c7 100644 --- a/packages/compiler/src/core/types.ts +++ b/packages/compiler/src/core/types.ts @@ -752,6 +752,7 @@ export enum SyntaxKind { DocText, DocParamTag, DocReturnsTag, + DocErrorsTag, DocTemplateTag, DocUnknownTag, Projection, @@ -1558,7 +1559,12 @@ export interface DocTagBaseNode extends BaseNode { readonly content: readonly DocContent[]; } -export type DocTag = DocReturnsTagNode | DocParamTagNode | DocTemplateTagNode | DocUnknownTagNode; +export type DocTag = + | DocReturnsTagNode + | DocErrorsTagNode + | DocParamTagNode + | DocTemplateTagNode + | DocUnknownTagNode; export type DocContent = DocTextNode; export interface DocTextNode extends BaseNode { @@ -1570,6 +1576,10 @@ export interface DocReturnsTagNode extends DocTagBaseNode { readonly kind: SyntaxKind.DocReturnsTag; } +export interface DocErrorsTagNode extends DocTagBaseNode { + readonly kind: SyntaxKind.DocErrorsTag; +} + export interface DocParamTagNode extends DocTagBaseNode { readonly kind: SyntaxKind.DocParamTag; readonly paramName: IdentifierNode; diff --git a/packages/compiler/src/formatter/print/printer.ts b/packages/compiler/src/formatter/print/printer.ts index 0f5926d717..6f4cd7b385 100644 --- a/packages/compiler/src/formatter/print/printer.ts +++ b/packages/compiler/src/formatter/print/printer.ts @@ -347,6 +347,7 @@ export function printNode( case SyntaxKind.DocParamTag: case SyntaxKind.DocTemplateTag: case SyntaxKind.DocReturnsTag: + case SyntaxKind.DocErrorsTag: case SyntaxKind.DocUnknownTag: // https://github.com/microsoft/typespec/issues/1319 Tracks pretty-printing doc comments. compilerAssert( diff --git a/packages/compiler/src/index.ts b/packages/compiler/src/index.ts index b3e29aa84c..9e32c7b0b5 100644 --- a/packages/compiler/src/index.ts +++ b/packages/compiler/src/index.ts @@ -1,7 +1,6 @@ export { ResolveCompilerOptionsOptions, resolveCompilerOptions } from "./config/index.js"; export * from "./core/index.js"; export * from "./lib/decorators.js"; -export * as decorators from "./lib/decorators.js"; export * from "./server/index.js"; import * as formatter from "./formatter/index.js"; export const TypeSpecPrettierPlugin = formatter; diff --git a/packages/compiler/src/init/init.ts b/packages/compiler/src/init/init.ts index e8c0cececb..28fb8ed072 100644 --- a/packages/compiler/src/init/init.ts +++ b/packages/compiler/src/init/init.ts @@ -111,6 +111,7 @@ export function makeScaffoldingConfig(config: Partial): Scaff skipCompilerPackage: config.skipCompilerPackage ?? false, folderName: config.folderName ?? "", parameters: config.parameters ?? {}, + config: config.config, normalizeVersion: config.normalizeVersion ?? normalizeVersion, toLowerCase: config.toLowerCase ?? toLowerCase, normalizePackageName: config.normalizePackageName ?? normalizePackageName, @@ -168,6 +169,7 @@ export async function initTypeSpecProject( toLowerCase, normalizePackageName, }); + await scaffoldNewProject(host, scaffoldingConfig); // eslint-disable-next-line no-console @@ -223,7 +225,7 @@ const builtInTemplates: Record = { title: "Generic Rest API", description: "Create a project representing a generic Rest API", compilerVersion: MANIFEST.version, - libraries: ["@typespec/rest", "@typespec/openapi3"], + libraries: ["@typespec/http", "@typespec/rest", "@typespec/openapi3"], config: { emit: ["@typespec/openapi3"], }, @@ -422,14 +424,29 @@ async function writePackageJson(host: CompilerHost, config: ScaffoldingConfig) { ); } +const placeholderConfig = ` +# extends: ../tspconfig.yaml # Extend another config file +# emit: # Emitter name +# - ": +# "": "" +# environment-variables: # Environment variables which can be used to interpolate emitter options +# : +# default: "" +# parameters: # Parameters which can be used to interpolate emitter options +# : +# default: "" +# trace: # Trace areas to enable tracing +# - "" +# warn-as-error: true # Treat warnings as errors +# output-dir: "{project-root}/_generated" # Configure the base output directory for all emitters +`.trim(); async function writeConfig(host: CompilerHost, config: ScaffoldingConfig) { if (isFileSkipGeneration(TypeSpecConfigFilename, config.files ?? [])) { return; } - if (!config.config) { - return; - } - const content = stringify(config.config); + const content = config.config ? stringify(config.config) : placeholderConfig; return host.writeFile(joinPaths(config.directory, TypeSpecConfigFilename), content); } diff --git a/packages/compiler/src/lib/decorators.ts b/packages/compiler/src/lib/decorators.ts index c01aaa816f..fbfa380b8e 100644 --- a/packages/compiler/src/lib/decorators.ts +++ b/packages/compiler/src/lib/decorators.ts @@ -2,7 +2,6 @@ import { isIntrinsicType, validateDecoratorNotOnType, validateDecoratorTarget, - validateDecoratorTargetIntrinsic, } from "../core/decorator-utils.js"; import { getDeprecationDetails, markDeprecated } from "../core/deprecation.js"; import { @@ -78,6 +77,10 @@ export function getSummary(program: Program, type: Type): string | undefined { } const docsKey = createStateSymbol("docs"); +const returnsDocsKey = createStateSymbol("returnsDocs"); +const errorsDocsKey = createStateSymbol("errorDocs"); +type DocTarget = "self" | "returns" | "errors"; + export interface DocData { /** * Doc value. @@ -89,7 +92,7 @@ export interface DocData { * - `@doc` means the `@doc` decorator was used * - `comment` means it was set from a `/** comment * /` */ - source: "@doc" | "comment"; + source: "decorator" | "comment"; } /** * @doc attaches a documentation string. Works great with multi-line string literals. @@ -104,19 +107,50 @@ export function $doc(context: DecoratorContext, target: Type, text: string, sour if (sourceObject) { text = replaceTemplatedStringFromProperties(text, sourceObject); } - setDocData(context.program, target, { value: text, source: "@doc" }); + setDocData(context.program, target, "self", { value: text, source: "decorator" }); } /** * @internal to be used to set the `@doc` from doc comment. */ -export function $docFromComment(context: DecoratorContext, target: Type, text: string) { - setDocData(context.program, target, { value: text, source: "comment" }); +export function $docFromComment( + context: DecoratorContext, + target: Type, + key: DocTarget, + text: string +) { + setDocData(context.program, target, key, { value: text, source: "comment" }); +} + +function getDocKey(target: DocTarget): symbol { + switch (target) { + case "self": + return docsKey; + case "returns": + return returnsDocsKey; + case "errors": + return errorsDocsKey; + } } -function setDocData(program: Program, target: Type, data: DocData) { - program.stateMap(docsKey).set(target, data); +function setDocData(program: Program, target: Type, key: DocTarget, data: DocData) { + program.stateMap(getDocKey(key)).set(target, data); +} + +/** + * Get the documentation information for the given type. In most cases you probably just want to use {@link getDoc} + * @param program Program + * @param target Type + * @returns Doc data with source information. + */ +export function getDocDataInternal( + program: Program, + target: Type, + key: DocTarget +): DocData | undefined { + return program.stateMap(getDocKey(key)).get(target); } + /** * Get the documentation information for the given type. In most cases you probably just want to use {@link getDoc} * @param program Program @@ -124,7 +158,7 @@ function setDocData(program: Program, target: Type, data: DocData) { * @returns Doc data with source information. */ export function getDocData(program: Program, target: Type): DocData | undefined { - return program.stateMap(docsKey).get(target); + return getDocDataInternal(program, target, "self"); } /** @@ -134,7 +168,57 @@ export function getDocData(program: Program, target: Type): DocData | undefined * @returns Documentation value */ export function getDoc(program: Program, target: Type): string | undefined { - return getDocData(program, target)?.value; + return getDocDataInternal(program, target, "self")?.value; +} + +export function $returnsDoc(context: DecoratorContext, target: Operation, text: string) { + validateDecoratorUniqueOnNode(context, target, $doc); + setDocData(context.program, target, "returns", { value: text, source: "decorator" }); +} + +/** + * Get the documentation information for the return success types of an operation. In most cases you probably just want to use {@link getReturnsDoc} + * @param program Program + * @param target Type + * @returns Doc data with source information. + */ +export function getReturnsDocData(program: Program, target: Operation): DocData | undefined { + return getDocDataInternal(program, target, "returns"); +} + +/** + * Get the documentation string for the return success types of an operation. + * @param program Program + * @param target Type + * @returns Documentation value + */ +export function getReturnsDoc(program: Program, target: Operation): string | undefined { + return getDocDataInternal(program, target, "returns")?.value; +} + +export function $errorsDoc(context: DecoratorContext, target: Operation, text: string) { + validateDecoratorUniqueOnNode(context, target, $doc); + setDocData(context.program, target, "errors", { value: text, source: "decorator" }); +} + +/** + * Get the documentation information for the return errors types of an operation. In most cases you probably just want to use {@link getErrorsDoc} + * @param program Program + * @param target Type + * @returns Doc data with source information. + */ +export function getErrorsDocData(program: Program, target: Operation): DocData | undefined { + return getDocDataInternal(program, target, "errors"); +} + +/** + * Get the documentation string for the return errors types of an operation. + * @param program Program + * @param target Type + * @returns Documentation value + */ +export function getErrorsDoc(program: Program, target: Operation): string | undefined { + return getDocDataInternal(program, target, "errors")?.value; } export function $inspectType(program: Program, target: Type, text: string) { @@ -178,7 +262,61 @@ export function isNumericType(program: Program | ProjectedProgram, target: Type) } /** - * Check if a model is an array type. + * Check the given type is matching the given condition or is a union of null and types matching the condition. + * @param type Type to test + * @param condition Condition + * @returns Boolean + */ +function isTypeIn(type: Type, condition: (type: Type) => boolean): boolean { + if (type.kind === "Union") { + return [...type.variants.values()].some((v) => condition(v.type)); + } + + return condition(type); +} + +function validateTargetingANumeric( + context: DecoratorContext, + target: Scalar | ModelProperty, + decoratorName: string +) { + const valid = isTypeIn(getPropertyType(target), (x) => isNumericType(context.program, x)); + if (!valid) { + reportDiagnostic(context.program, { + code: "decorator-wrong-target", + format: { + decorator: decoratorName, + to: `type it is not a numeric`, + }, + target: context.decoratorTarget, + }); + } + return valid; +} + +/** + * Validate the given target is a string type or a union containing at least a string type. + */ +function validateTargetingAString( + context: DecoratorContext, + target: Scalar | ModelProperty, + decoratorName: string +) { + const valid = isTypeIn(getPropertyType(target), (x) => isStringType(context.program, x)); + if (!valid) { + reportDiagnostic(context.program, { + code: "decorator-wrong-target", + format: { + decorator: decoratorName, + to: `type it is not a string`, + }, + target: context.decoratorTarget, + }); + } + return valid; +} + +/** * @param type Model type */ export function isArrayModelType(program: Program, type: Model): type is ArrayModelType { @@ -242,7 +380,7 @@ const formatValuesKey = createStateSymbol("formatValues"); export function $format(context: DecoratorContext, target: Scalar | ModelProperty, format: string) { validateDecoratorUniqueOnNode(context, target, $format); - if (!validateDecoratorTargetIntrinsic(context, target, "@format", ["string", "bytes"])) { + if (!validateTargetingAString(context, target, "@format")) { return; } const targetType = getPropertyType(target); @@ -272,7 +410,7 @@ export function $pattern( ) { validateDecoratorUniqueOnNode(context, target, $pattern); - if (!validateDecoratorTargetIntrinsic(context, target, "@pattern", ["string"])) { + if (!validateTargetingAString(context, target, "@pattern")) { return; } @@ -295,7 +433,7 @@ export function $minLength( validateDecoratorUniqueOnNode(context, target, $minLength); if ( - !validateDecoratorTargetIntrinsic(context, target, "@minLength", ["string"]) || + !validateTargetingAString(context, target, "@minLength") || !validateRange(context, minLength, getMaxLength(context.program, target)) ) { return; @@ -320,7 +458,7 @@ export function $maxLength( validateDecoratorUniqueOnNode(context, target, $maxLength); if ( - !validateDecoratorTargetIntrinsic(context, target, "@maxLength", ["string"]) || + !validateTargetingAString(context, target, "@maxLength") || !validateRange(context, getMinLength(context.program, target), maxLength) ) { return; @@ -411,14 +549,7 @@ export function $minValue( validateDecoratorNotOnType(context, target, $minValueExclusive, $minValue); const { program } = context; - if (!isNumericType(program, getPropertyType(target))) { - program.reportDiagnostic( - createDiagnostic({ - code: "decorator-wrong-target", - format: { decorator: "@minValue", to: "non-numeric type" }, - target, - }) - ); + if (!validateTargetingANumeric(context, target, "@minValue")) { return; } @@ -450,14 +581,7 @@ export function $maxValue( validateDecoratorUniqueOnNode(context, target, $maxValue); validateDecoratorNotOnType(context, target, $maxValueExclusive, $maxValue); const { program } = context; - if (!isNumericType(program, getPropertyType(target))) { - program.reportDiagnostic( - createDiagnostic({ - code: "decorator-wrong-target", - format: { decorator: "@maxValue", to: "non-numeric type" }, - target, - }) - ); + if (!validateTargetingANumeric(context, target, "@maxValue")) { return; } @@ -490,14 +614,7 @@ export function $minValueExclusive( validateDecoratorNotOnType(context, target, $minValue, $minValueExclusive); const { program } = context; - if (!isNumericType(program, getPropertyType(target))) { - program.reportDiagnostic( - createDiagnostic({ - code: "decorator-wrong-target", - format: { decorator: "@minValueExclusive", to: "non-numeric type" }, - target, - }) - ); + if (!validateTargetingANumeric(context, target, "@minValueExclusive")) { return; } @@ -529,14 +646,7 @@ export function $maxValueExclusive( validateDecoratorUniqueOnNode(context, target, $maxValueExclusive); validateDecoratorNotOnType(context, target, $maxValue, $maxValueExclusive); const { program } = context; - if (!isNumericType(program, getPropertyType(target))) { - program.reportDiagnostic( - createDiagnostic({ - code: "decorator-wrong-target", - format: { decorator: "@maxValue", to: "non-numeric type" }, - target, - }) - ); + if (!validateTargetingANumeric(context, target, "@maxValueExclusive")) { return; } @@ -568,7 +678,7 @@ const secretTypesKey = createStateSymbol("secretTypes"); export function $secret(context: DecoratorContext, target: Scalar | ModelProperty) { validateDecoratorUniqueOnNode(context, target, $secret); - if (!validateDecoratorTargetIntrinsic(context, target, "@secret", ["string"])) { + if (!validateTargetingAString(context, target, "@secret")) { return; } context.program.stateMap(secretTypesKey).set(target, true); @@ -899,17 +1009,15 @@ export function $knownValues( target: Scalar | ModelProperty, knownValues: Enum ) { - if ( - !validateDecoratorTargetIntrinsic(context, target, "@knownValues", [ - "string", - "int8", - "int16", - "int32", - "int64", - "float32", - "float64", - ]) - ) { + const type = getPropertyType(target); + if (!isStringType(context.program, type) && !isNumericType(context.program, type)) { + context.program.reportDiagnostic( + createDiagnostic({ + code: "decorator-wrong-target", + format: { decorator: "@knownValues", to: "type, it is not a string or numeric" }, + target, + }) + ); return; } diff --git a/packages/compiler/src/server/serverlib.ts b/packages/compiler/src/server/serverlib.ts index 45a34b99ee..8b25ab671f 100644 --- a/packages/compiler/src/server/serverlib.ts +++ b/packages/compiler/src/server/serverlib.ts @@ -50,6 +50,7 @@ import { findTypeSpecConfigPath, loadTypeSpecConfigFile, } from "../config/config-loader.js"; +import { resolveOptionsFromConfig } from "../config/config-to-options.js"; import { TypeSpecConfig } from "../config/types.js"; import { CharCode, codePointBefore, isIdentifierContinue } from "../core/charcode.js"; import { @@ -390,10 +391,10 @@ export function createServer(host: ServerHost): Server { const mainFile = await getMainFileForDocument(path); const config = await getConfig(mainFile); - const options = { + const [optionsFromConfig, _] = resolveOptionsFromConfig(config, { cwd: path }); + const options: CompilerOptions = { + ...optionsFromConfig, ...serverOptions, - emit: config.emit, - options: config.options, }; if (!upToDate(document)) { diff --git a/packages/compiler/src/server/tmlanguage.ts b/packages/compiler/src/server/tmlanguage.ts index 12b75e94b8..0f5620a7c7 100644 --- a/packages/compiler/src/server/tmlanguage.ts +++ b/packages/compiler/src/server/tmlanguage.ts @@ -205,7 +205,7 @@ const docCommentBlock: IncludeRule = { const docComment: BeginEndRule = { key: "doc-comment", scope: "comment.block.tsp", - begin: "/\\**", + begin: "/\\*\\*", beginCaptures: { "0": { scope: "comment.block.tsp" }, }, diff --git a/packages/compiler/src/server/type-details.ts b/packages/compiler/src/server/type-details.ts index 91315186a8..0d9c43fdde 100644 --- a/packages/compiler/src/server/type-details.ts +++ b/packages/compiler/src/server/type-details.ts @@ -65,7 +65,7 @@ function getSymbolDocumentation(program: Program, symbol: Sym) { const type = symbol.type ?? program.checker.getTypeForNode(symbol.declarations[0]); const apiDocs = getDocData(program, type); // The doc comment is already included above we don't want to duplicate - if (apiDocs && apiDocs.source === "@doc") { + if (apiDocs && apiDocs.source === "comment") { docs.push(apiDocs.value); } diff --git a/packages/compiler/test/checker/deprecation.test.ts b/packages/compiler/test/checker/deprecation.test.ts index 95f6ad9195..fc79527280 100644 --- a/packages/compiler/test/checker/deprecation.test.ts +++ b/packages/compiler/test/checker/deprecation.test.ts @@ -323,6 +323,64 @@ describe("compiler: checker: deprecation", () => { expectDiagnosticEmpty(diagnostics); }); + + describe("skips type deprecation warning when referenced in a deprecated parent context", () => { + it("deprecated model used in deprecated types", async () => { + await expectDeprecations( + ` + #deprecated "OldFoo is deprecated" + model OldFoo { + foo: string; + } + + #deprecated "oldOp is deprecated" + op oldOp(): OldFoo; + + #deprecated "OldBar is deprecated" + model OldBar is OldFoo {} + + #deprecated "OldBlah is deprecated" + model OldBlah extends OldFoo {} + + #deprecated "OldFooReference is deprecated" + model OldFooReference { + foo: OldFoo.foo; + } + + #deprecated "OldFooProperty is deprecated" + model OldFooProperty { + foo: OldFoo; + } + + #deprecated "OldBaz is deprecated" + interface OldBaz { + op oldBaz(): OldFoo; + op oldBazTwo(): string | OldFoo; + op oldBazThree(): OldFoo & { bar: string }; + } + `, + [] + ); + }); + + it("deprecated operation used in deprecated types", async () => { + await expectDeprecations( + ` + #deprecated "oldFoo is deprecated" + op oldFoo(): string; + + #deprecated "oldBar is deprecated" + op oldBar is oldFoo; + + #deprecated "OldBaz is deprecated" + interface OldBaz { + op oldBaz is oldBar; + } + `, + [] + ); + }); + }); }); describe("@deprecated decorator", () => { diff --git a/packages/compiler/test/checker/doc-comment.test.ts b/packages/compiler/test/checker/doc-comment.test.ts index 09914a24ba..e9c389e0ab 100644 --- a/packages/compiler/test/checker/doc-comment.test.ts +++ b/packages/compiler/test/checker/doc-comment.test.ts @@ -1,6 +1,6 @@ import { ok, strictEqual } from "assert"; import { Model, Operation } from "../../src/core/index.js"; -import { getDoc } from "../../src/lib/decorators.js"; +import { getDoc, getErrorsDoc, getReturnsDoc } from "../../src/lib/decorators.js"; import { BasicTestRunner, createTestRunner } from "../../src/testing/index.js"; describe("compiler: checker: doc comments", () => { @@ -29,6 +29,14 @@ describe("compiler: checker: doc comments", () => { @test("target") model Foo {}` ); + testMainDoc( + "templated model", + `${docComment} + @test("target") model Foo {} + + model Bar { foo: Foo }` + ); + testMainDoc( "model property", ` @@ -142,13 +150,102 @@ describe("compiler: checker: doc comments", () => { }); }); + describe("@returns", () => { + it("set the returnsDoc on an operation", async () => { + const { test } = (await runner.compile(` + + /** + * @returns A string + */ + @test op test(): string; + `)) as { test: Operation }; + + strictEqual(getReturnsDoc(runner.program, test), "A string"); + }); + + it("@returnsDoc decorator override the doc comment", async () => { + const { test } = (await runner.compile(` + + /** + * @returns A string + */ + @returnsDoc("Another string") + @test op test(): string; + `)) as { test: Operation }; + + strictEqual(getReturnsDoc(runner.program, test), "Another string"); + }); + + it("doc comment on op is override the base comment", async () => { + const { test } = (await runner.compile(` + + /** + * @returns A string + */ + op base(): string; + + /** + * @returns Another string + */ + @test op test(): string; + `)) as { test: Operation }; + + strictEqual(getReturnsDoc(runner.program, test), "Another string"); + }); + }); + + describe("@errors", () => { + it("set the errorsDoc on an operation", async () => { + const { test } = (await runner.compile(` + + /** + * @errors A string + */ + @test op test(): string; + `)) as { test: Operation }; + + strictEqual(getErrorsDoc(runner.program, test), "A string"); + }); + + it("@errorsDoc decorator override the doc comment", async () => { + const { test } = (await runner.compile(` + + /** + * @errors A string + */ + @errorsDoc("Another string") + @test op test(): string; + `)) as { test: Operation }; + + strictEqual(getErrorsDoc(runner.program, test), "Another string"); + }); + + it("doc comment on op is override the base comment", async () => { + const { test } = (await runner.compile(` + + /** + * @errors A string + */ + op base(): string; + + /** + * @errors Another string + */ + @test op test(): string; + `)) as { test: Operation }; + + strictEqual(getErrorsDoc(runner.program, test), "Another string"); + }); + }); + it("using @param in doc comment of operation applies doc on the parameters", async () => { + // One @param has a hyphen but the other does not (should handle both cases) const { addUser } = (await runner.compile(` /** * This is the operation doc. * @param name This is the name param doc. - * @param age This is the age param doc. + * @param age - This is the age param doc. */ @test op addUser(name: string, age: string): void; `)) as { addUser: Operation }; diff --git a/packages/compiler/test/checker/using.test.ts b/packages/compiler/test/checker/using.test.ts index 336d3040e9..970fd48da0 100644 --- a/packages/compiler/test/checker/using.test.ts +++ b/packages/compiler/test/checker/using.test.ts @@ -105,6 +105,36 @@ describe("compiler: using statements", () => { strictEqual(Y.properties.size, 1); }); + it("TypeSpec.Xyz namespace doesn't need TypeSpec prefix in using", async () => { + testHost.addTypeSpecFile( + "main.tsp", + ` + import "./a.tsp"; + import "./b.tsp"; + ` + ); + testHost.addTypeSpecFile( + "a.tsp", + ` + namespace TypeSpec.Xyz; + model X { x: int32 } + ` + ); + testHost.addTypeSpecFile( + "b.tsp", + ` + using Xyz; + @test model Y { ... X } + ` + ); + + const { Y } = (await testHost.compile("./")) as { + Y: Model; + }; + + strictEqual(Y.properties.size, 1); + }); + it("can use 2 namespace with the same last name", async () => { testHost.addTypeSpecFile( "main.tsp", @@ -303,7 +333,10 @@ describe("compiler: using statements", () => { const diagnostics = await testHost.diagnose("./"); expectDiagnostics(diagnostics, [ - { code: "ambiguous-symbol", message: /Test\.A\.doc, TypeSpec\.doc/ }, + { + code: "ambiguous-symbol", + message: `"doc" is an ambiguous name between TypeSpec.doc, Test.A.doc. Try using fully qualified name instead: TypeSpec.doc, Test.A.doc`, + }, { code: "unknown-decorator" }, ]); }); @@ -327,7 +360,10 @@ describe("compiler: using statements", () => { const diagnostics = await testHost.diagnose("./"); expectDiagnostics(diagnostics, [ - { code: "ambiguous-symbol", message: /Test\.A\.doc, TypeSpec\.doc/ }, + { + code: "ambiguous-symbol", + message: `"doc" is an ambiguous name between TypeSpec.doc, Test.A.doc. Try using fully qualified name instead: TypeSpec.doc, Test.A.doc`, + }, { code: "unknown-decorator" }, { code: "missing-implementation" }, ]); diff --git a/packages/compiler/test/config/resolve-compiler-option.test.ts b/packages/compiler/test/config/resolve-compiler-option.test.ts index b42c133dfd..c05c19e848 100644 --- a/packages/compiler/test/config/resolve-compiler-option.test.ts +++ b/packages/compiler/test/config/resolve-compiler-option.test.ts @@ -3,7 +3,7 @@ import { dirname } from "path"; import { fileURLToPath } from "url"; import { resolveCompilerOptions } from "../../src/config/index.js"; import { NodeHost } from "../../src/core/node-host.js"; -import { resolvePath } from "../../src/index.js"; +import { normalizePath, resolvePath } from "../../src/index.js"; import { expectDiagnosticEmpty, expectDiagnostics } from "../../src/testing/expect.js"; const scenarioRoot = resolvePath( @@ -17,6 +17,7 @@ describe("compiler: resolve compiler options", () => { const resolveOptions = async (path: string) => { const fullPath = resolvePath(scenarioRoot, path); return await resolveCompilerOptions(NodeHost, { + cwd: normalizePath(process.cwd()), entrypoint: fullPath, // not really used here configPath: fullPath, }); diff --git a/packages/compiler/test/decorators/decorators.test.ts b/packages/compiler/test/decorators/decorators.test.ts index c6840c52c3..6ab18c5ae3 100644 --- a/packages/compiler/test/decorators/decorators.test.ts +++ b/packages/compiler/test/decorators/decorators.test.ts @@ -3,11 +3,13 @@ import { Model, Operation, Scalar, getVisibility, isSecret } from "../../src/ind import { getDoc, getEncode, + getErrorsDoc, getFriendlyName, getKeyName, getKnownValues, getOverloadedOperation, getOverloads, + getReturnsDoc, isErrorModel, } from "../../src/lib/decorators.js"; import { BasicTestRunner, createTestRunner, expectDiagnostics } from "../../src/testing/index.js"; @@ -139,6 +141,60 @@ describe("compiler: built-in decorators", () => { }); }); + describe("@returnsDoc", () => { + it("applies @returnsDoc on operation", async () => { + const { test } = (await runner.compile( + ` + @test + @returnsDoc("A string") + op test(): string; + ` + )) as { test: Operation }; + + strictEqual(getReturnsDoc(runner.program, test), "A string"); + }); + + it("emit diagnostic if doc is not a string", async () => { + const diagnostics = await runner.diagnose(` + @test + @returnsDoc(123) + op test(): string; + `); + + expectDiagnostics(diagnostics, { + code: "invalid-argument", + message: `Argument '123' is not assignable to parameter of type 'valueof string'`, + }); + }); + }); + + describe("@errorsDoc", () => { + it("applies @errorsDoc on operation", async () => { + const { test } = (await runner.compile( + ` + @test + @errorsDoc("An error") + op test(): string; + ` + )) as { test: Operation }; + + strictEqual(getErrorsDoc(runner.program, test), "An error"); + }); + + it("emit diagnostic if doc is not a string", async () => { + const diagnostics = await runner.diagnose(` + @test + @errorsDoc(123) + op test(): string; + `); + + expectDiagnostics(diagnostics, { + code: "invalid-argument", + message: `Argument '123' is not assignable to parameter of type 'valueof string'`, + }); + }); + }); + describe("@friendlyName", () => { it("applies @friendlyName on model", async () => { const { A, B, C } = await runner.compile(` @@ -881,7 +937,7 @@ describe("compiler: built-in decorators", () => { expectDiagnostics(diagnostics, { code: "decorator-wrong-target", - message: "Cannot apply @secret decorator to type it is not one of: string", + message: "Cannot apply @secret decorator to type it is not a string", }); }); }); diff --git a/packages/compiler/test/decorators/range-limits.test.ts b/packages/compiler/test/decorators/range-limits.test.ts index e954704716..d027776bd1 100644 --- a/packages/compiler/test/decorators/range-limits.test.ts +++ b/packages/compiler/test/decorators/range-limits.test.ts @@ -60,6 +60,20 @@ describe("compiler: range limiting decorators", () => { strictEqual(getMaxValue(runner.program, percentProp), 32.9); }); + it("applies @minLength and @maxLength decorators on nullable numeric", async () => { + const { Foo } = (await runner.compile(` + @test model Foo { + @minValue(2.5) + @maxValue(32.9) + percent: float64 | null; + } + `)) as { Foo: Model }; + const percentProp = Foo.properties.get("percent")!; + + strictEqual(getMinValue(runner.program, percentProp), 2.5); + strictEqual(getMaxValue(runner.program, percentProp), 32.9); + }); + it("emit diagnostic if @minValue used on non numeric type", async () => { const diagnostics = await runner.diagnose(` @test model Foo { @@ -69,7 +83,7 @@ describe("compiler: range limiting decorators", () => { `); expectDiagnostics(diagnostics, { code: "decorator-wrong-target", - message: "Cannot apply @minValue decorator to non-numeric type", + message: "Cannot apply @minValue decorator to type it is not a numeric", }); }); @@ -82,7 +96,7 @@ describe("compiler: range limiting decorators", () => { `); expectDiagnostics(diagnostics, { code: "decorator-wrong-target", - message: "Cannot apply @maxValue decorator to non-numeric type", + message: "Cannot apply @maxValue decorator to type it is not a numeric", }); }); @@ -116,6 +130,20 @@ describe("compiler: range limiting decorators", () => { strictEqual(getMaxLength(runner.program, nameProp), 10); }); + it("applies @minLength and @maxLength decorators on nullable strings", async () => { + const { Foo } = (await runner.compile(` + @test model Foo { + @minLength(2) + @maxLength(10) + name: string | null; + } + `)) as { Foo: Model }; + const nameProp = Foo.properties.get("name")!; + + strictEqual(getMinLength(runner.program, nameProp), 2); + strictEqual(getMaxLength(runner.program, nameProp), 10); + }); + it("emit diagnostic if @minLength used on non string", async () => { const diagnostics = await runner.diagnose(` @test model Foo { @@ -125,7 +153,7 @@ describe("compiler: range limiting decorators", () => { `); expectDiagnostics(diagnostics, { code: "decorator-wrong-target", - message: "Cannot apply @minLength decorator to type it is not one of: string", + message: "Cannot apply @minLength decorator to type it is not a string", }); }); @@ -138,7 +166,7 @@ describe("compiler: range limiting decorators", () => { `); expectDiagnostics(diagnostics, { code: "decorator-wrong-target", - message: "Cannot apply @maxLength decorator to type it is not one of: string", + message: "Cannot apply @maxLength decorator to type it is not a string", }); }); diff --git a/packages/compiler/test/parser.test.ts b/packages/compiler/test/parser.test.ts index ed9fbb64ed..f35c3768bf 100644 --- a/packages/compiler/test/parser.test.ts +++ b/packages/compiler/test/parser.test.ts @@ -803,37 +803,55 @@ describe("compiler: parser", () => { * * @param x the param * that continues on another line + * @param y - another param * @template T some template + * @template U - another template * @returns something * @pretend this an unknown tag */ - op test(x: string): string; + op test(x: string, y: string): string; `, (script) => { const docs = script.statements[0].docs; strictEqual(docs?.length, 1); strictEqual(docs[0].content.length, 1); + strictEqual( docs[0].content[0].text, "This one has a `code span` and a code fence and it spreads over\nmore than one line.\n\n```\nThis is not a @tag because we're in a code fence.\n```\n\n`This is not a @tag either because we're in a code span`." ); - strictEqual(docs[0].tags.length, 4); - strictEqual(docs[0].tags[0].kind, SyntaxKind.DocParamTag as const); - strictEqual(docs[0].tags[0].tagName.sv, "param"); - strictEqual(docs[0].tags[0].paramName.sv, "x"); - strictEqual( - docs[0].tags[0].content[0].text, - "the param\nthat continues on another line" - ); - strictEqual(docs[0].tags[1].kind, SyntaxKind.DocTemplateTag as const); - strictEqual(docs[0].tags[1].tagName.sv, "template"); - strictEqual(docs[0].tags[1].paramName.sv, "T"); - strictEqual(docs[0].tags[2].kind, SyntaxKind.DocReturnsTag as const); - strictEqual(docs[0].tags[2].tagName.sv, "returns"); - strictEqual(docs[0].tags[2].content[0].text, "something"); - strictEqual(docs[0].tags[3].kind, SyntaxKind.DocUnknownTag as const); - strictEqual(docs[0].tags[3].tagName.sv, "pretend"); - strictEqual(docs[0].tags[3].content[0].text, "this an unknown tag"); + strictEqual(docs[0].tags.length, 6); + const [xParam, yParam, tTemplate, uTemplate, returns, pretend] = docs[0].tags; + + strictEqual(xParam.kind, SyntaxKind.DocParamTag as const); + strictEqual(xParam.tagName.sv, "param"); + strictEqual(xParam.paramName.sv, "x"); + strictEqual(xParam.content[0].text, "the param\nthat continues on another line"); + + // `y` has hyphen in doc string, which should be dropped + strictEqual(yParam.kind, SyntaxKind.DocParamTag as const); + strictEqual(yParam.tagName.sv, "param"); + strictEqual(yParam.paramName.sv, "y"); + strictEqual(yParam.content[0].text, "another param"); + + strictEqual(tTemplate.kind, SyntaxKind.DocTemplateTag as const); + strictEqual(tTemplate.tagName.sv, "template"); + strictEqual(tTemplate.paramName.sv, "T"); + strictEqual(tTemplate.content[0].text, "some template"); + + // `U` has hyphen in doc string, which should be dropped + strictEqual(uTemplate.kind, SyntaxKind.DocTemplateTag as const); + strictEqual(uTemplate.tagName.sv, "template"); + strictEqual(uTemplate.paramName.sv, "U"); + strictEqual(uTemplate.content[0].text, "another template"); + + strictEqual(returns.kind, SyntaxKind.DocReturnsTag as const); + strictEqual(returns.tagName.sv, "returns"); + strictEqual(returns.content[0].text, "something"); + + strictEqual(pretend.kind, SyntaxKind.DocUnknownTag as const); + strictEqual(pretend.tagName.sv, "pretend"); + strictEqual(pretend.content[0].text, "this an unknown tag"); }, ], ], diff --git a/packages/compiler/test/server/colorization.test.ts b/packages/compiler/test/server/colorization.test.ts index 5680914e49..ae991dcce0 100644 --- a/packages/compiler/test/server/colorization.test.ts +++ b/packages/compiler/test/server/colorization.test.ts @@ -821,6 +821,63 @@ function testColorization(description: string, tokenize: Tokenize) { }); }); + if (tokenize === tokenizeTMLanguage) { + describe("comments", () => { + it("tokenize empty line comment", async () => { + const tokens = await tokenize(` + // + `); + deepStrictEqual(tokens, [Token.comment.line("//")]); + }); + it("tokenize line comment", async () => { + const tokens = await tokenize(` + // This is a line comment + `); + deepStrictEqual(tokens, [Token.comment.line("// This is a line comment")]); + }); + it("tokenize line comment before statement", async () => { + const tokens = await tokenize(` + // Comment + model Foo {} + `); + deepStrictEqual(tokens, [ + Token.comment.line("// Comment"), + Token.keywords.model, + Token.identifiers.type("Foo"), + Token.punctuation.openBrace, + Token.punctuation.closeBrace, + ]); + }); + + it("tokenize single line block comment", async () => { + const tokens = await tokenize(` + /* Comment */ + `); + deepStrictEqual(tokens, [ + Token.comment.block("/*"), + Token.comment.block(" Comment "), + Token.comment.block("*/"), + ]); + }); + + it("tokenize multi line block comment", async () => { + const tokens = await tokenize(` + /* + Comment + on multi line + */ + `); + deepStrictEqual(tokens, [ + Token.comment.block("/*"), + Token.comment.block(" Comment"), + Token.comment.block(" on multi line"), + Token.comment.block(" "), + Token.comment.block("*/"), + ]); + }); + }); + } + /** * Doc comment * @param foo Foo desc diff --git a/packages/http/src/lib.ts b/packages/http/src/lib.ts index ac547b4519..93d304c8b0 100644 --- a/packages/http/src/lib.ts +++ b/packages/http/src/lib.ts @@ -62,6 +62,12 @@ export const $lib = createTypeSpecLibrary({ default: paramMessage`Duplicate operation "${"operationName"}" routed at "${"verb"} ${"path"}".`, }, }, + "multiple-status-codes": { + severity: "error", + messages: { + default: "Multiple `@statusCode` decorators defined for this operation response.", + }, + }, "status-code-invalid": { severity: "error", messages: { diff --git a/packages/http/src/responses.ts b/packages/http/src/responses.ts index c78e901fae..368d9d3bac 100644 --- a/packages/http/src/responses.ts +++ b/packages/http/src/responses.ts @@ -3,6 +3,8 @@ import { Diagnostic, DiagnosticCollector, getDoc, + getErrorsDoc, + getReturnsDoc, isArrayModelType, isErrorModel, isNullType, @@ -23,7 +25,7 @@ import { isHeader, isStatusCode, } from "./decorators.js"; -import { createDiagnostic } from "./lib.js"; +import { createDiagnostic, reportDiagnostic } from "./lib.js"; import { gatherMetadata, isApplicableMetadata, Visibility } from "./metadata.js"; import { HttpOperationResponse } from "./types.js"; @@ -43,10 +45,10 @@ export function getResponsesForOperation( // TODO how should we treat this? https://github.com/microsoft/typespec/issues/356 continue; } - processResponseType(program, diagnostics, responses, option.type); + processResponseType(program, diagnostics, operation, responses, option.type); } } else { - processResponseType(program, diagnostics, responses, responseType); + processResponseType(program, diagnostics, operation, responses, responseType); } return diagnostics.wrap(Object.values(responses)); @@ -55,6 +57,7 @@ export function getResponsesForOperation( function processResponseType( program: Program, diagnostics: DiagnosticCollector, + operation: Operation, responses: Record, responseType: Type ) { @@ -96,7 +99,7 @@ function processResponseType( const response: HttpOperationResponse = responses[statusCode] ?? { statusCode, type: responseType, - description: getResponseDescription(program, responseType, statusCode, bodyType), + description: getResponseDescription(program, operation, responseType, statusCode, bodyType), responses: [], }; @@ -128,9 +131,18 @@ function getResponseStatusCodes( ): string[] { const codes: string[] = []; + let statusFound = false; for (const prop of metadata) { if (isStatusCode(program, prop)) { - codes.push(...getStatusCodes(program, prop)); + if (statusFound) { + reportDiagnostic(program, { + code: "multiple-status-codes", + target: responseType, + }); + } + statusFound = true; + const propCodes = getStatusCodes(program, prop); + codes.push(...propCodes); } } @@ -223,6 +235,7 @@ function getResponseBody( function getResponseDescription( program: Program, + operation: Operation, responseType: Type, statusCode: string, bodyType: Type | undefined @@ -241,5 +254,12 @@ function getResponseDescription( } } + const desc = isErrorModel(program, responseType) + ? getErrorsDoc(program, operation) + : getReturnsDoc(program, operation); + if (desc) { + return desc; + } + return getStatusCodeDescription(statusCode); } diff --git a/packages/http/test/http-decorators.test.ts b/packages/http/test/http-decorators.test.ts index 04bd210de6..84aecccc86 100644 --- a/packages/http/test/http-decorators.test.ts +++ b/packages/http/test/http-decorators.test.ts @@ -424,6 +424,48 @@ describe("http: decorators", () => { ]); }); + it("emits error if multiple properties are decorated with `@statusCode` in return type", async () => { + const diagnostics = await runner.diagnose( + ` + model CreatedOrUpdatedResponse { + @statusCode ok: "200"; + @statusCode created: "201"; + } + model DateHeader { + @header date: utcDateTime; + } + model Key { + key: string; + } + @put op create(): CreatedOrUpdatedResponse & DateHeader & Key; + ` + ); + expectDiagnostics(diagnostics, [{ code: "@typespec/http/multiple-status-codes" }]); + }); + + it("emits error if multiple `@statusCode` decorators are composed together", async () => { + const diagnostics = await runner.diagnose( + ` + model CustomUnauthorizedResponse { + @statusCode _: 401; + @body body: UnauthorizedResponse; + } + + model Pet { + name: string; + } + + model PetList { + @statusCode _: 200; + @body body: Pet[]; + } + + op list(): PetList | CustomUnauthorizedResponse; + ` + ); + expectDiagnostics(diagnostics, [{ code: "@typespec/http/multiple-status-codes" }]); + }); + it("set the statusCode with @statusCode", async () => { const { code } = await runner.compile(` op test(): { diff --git a/packages/http/test/response-descriptions.test.ts b/packages/http/test/response-descriptions.test.ts new file mode 100644 index 0000000000..cd88321115 --- /dev/null +++ b/packages/http/test/response-descriptions.test.ts @@ -0,0 +1,68 @@ +import { expectDiagnosticEmpty } from "@typespec/compiler/testing"; +import { strictEqual } from "assert"; +import { getOperationsWithServiceNamespace } from "./test-host.js"; + +describe("http: response descriptions", () => { + async function getHttpOp(code: string) { + const [ops, diagnostics] = await getOperationsWithServiceNamespace(code); + expectDiagnosticEmpty(diagnostics); + strictEqual(ops.length, 1); + return ops[0]; + } + + it("use a default message by status code if not specified", async () => { + const op = await getHttpOp( + ` + op read(): {@statusCode _: 200, content: string}; + ` + ); + strictEqual(op.responses[0].description, "The request has succeeded."); + }); + + it("@returns set doc for all success responses", async () => { + const op = await getHttpOp( + ` + @error model Error {} + @returnsDoc("A string") + op read(): { @statusCode _: 200, content: string } | { @statusCode _: 201, content: string } | Error; + ` + ); + strictEqual(op.responses[0].description, "A string"); + strictEqual(op.responses[1].description, "A string"); + strictEqual(op.responses[2].description, undefined); + }); + + it("@errors set doc for all success responses", async () => { + const op = await getHttpOp( + ` + @error model Error {} + @errorsDoc("Generic error") + op read(): { @statusCode _: 200, content: string } | { @statusCode _: 201, content: string } | Error; + ` + ); + strictEqual(op.responses[0].description, "The request has succeeded."); + strictEqual( + op.responses[1].description, + "The request has succeeded and a new resource has been created as a result." + ); + strictEqual(op.responses[2].description, "Generic error"); + }); + + it("@doc explicitly on a response override the operation returns doc", async () => { + const op = await getHttpOp( + ` + @error model Error {} + @error @doc("Not found model") model NotFound {@statusCode _: 404} + @errorsDoc("Generic error") + op read(): { @statusCode _: 200, content: string } | { @statusCode _: 201, content: string } | Error | NotFound; + ` + ); + strictEqual(op.responses[0].description, "The request has succeeded."); + strictEqual( + op.responses[1].description, + "The request has succeeded and a new resource has been created as a result." + ); + strictEqual(op.responses[2].description, "Not found model"); + strictEqual(op.responses[3].description, "Generic error"); + }); +}); diff --git a/packages/internal-build-utils/package.json b/packages/internal-build-utils/package.json index 13d390557b..ae77cab172 100644 --- a/packages/internal-build-utils/package.json +++ b/packages/internal-build-utils/package.json @@ -41,13 +41,15 @@ "dependencies": { "yargs": "~17.7.2", "strip-json-comments": "~5.0.0", - "cspell": "~6.31.1" + "cspell": "~6.31.1", + "semver": "^7.5.4" }, "devDependencies": { "@types/mocha": "~10.0.1", "@types/node": "~18.11.9", "@types/yargs": "~17.0.24", "@typespec/eslint-config-typespec": "workspace:~0.48.0", + "@types/semver": "^7.5.2", "eslint": "^8.49.0", "mocha": "~10.2.0", "mocha-junit-reporter": "~2.2.1", diff --git a/packages/internal-build-utils/src/prerelease.ts b/packages/internal-build-utils/src/prerelease.ts index 4d615c10f2..30129926e6 100644 --- a/packages/internal-build-utils/src/prerelease.ts +++ b/packages/internal-build-utils/src/prerelease.ts @@ -1,6 +1,7 @@ /* eslint-disable no-console */ import { lstat, readdir, readFile, stat, writeFile } from "fs/promises"; import { join } from "path"; +import { parse } from "semver"; import stripJsonComments from "strip-json-comments"; interface RushChangeFile { @@ -133,8 +134,19 @@ function getDevVersion(version: string, changeCount: number) { } function getNextVersion(version: string) { - const [major, minor] = version.split(".").map((x) => parseInt(x, 10)); - return `${major}.${minor + 1}.0`; + const parsed = parse(version); + if (parsed === null) { + throw new Error(`Invalid semver version ${version}`); + } + if (parsed.prerelease.length > 0) { + const [preName, preVersion] = parsed.prerelease; + if (typeof preVersion !== "number") { + throw new Error(`Invalid expected prerelease version ${preVersion} to be a number.`); + } + return `${parsed.major}.${parsed.minor}.${parsed.patch}-${preName}.${preVersion + 1}`; + } else { + return `${parsed.major}.${parsed.minor + 1}.0`; + } } async function addPrereleaseNumber( diff --git a/packages/json-schema/test/scalar-constraints.test.ts b/packages/json-schema/test/scalar-constraints.test.ts index d75f8065b4..d566091ded 100644 --- a/packages/json-schema/test/scalar-constraints.test.ts +++ b/packages/json-schema/test/scalar-constraints.test.ts @@ -1,43 +1,62 @@ import assert from "assert"; import { emitSchema } from "./utils.js"; -describe("emitting scalars with constraints", () => { - const scalarNumberTypes = [ - "int8", - "int16", - "int32", - "uint8", - "uint16", - "uint32", - "integer", - "float32", - "float64", - "numeric", - "float", - "safeint", - ]; +describe("jsonschema: scalar constraints", () => { + describe("numeric constraints", () => { + const scalarNumberTypes = [ + "int8", + "int16", + "int32", + "uint8", + "uint16", + "uint32", + "integer", + "float32", + "float64", + "numeric", + "float", + "safeint", + ]; - describe("number decl constraints", () => { - for (const numType of scalarNumberTypes) { - it(`handles ${numType}`, async () => { - const schemas = await emitSchema(` + function assertNumericConstraints(schema: any) { + assert.strictEqual(schema.minimum, 1); + assert.strictEqual(schema.maximum, 2); + assert.strictEqual(schema.multipleOf, 10); + } + + describe("on scalar declaration", () => { + for (const numType of scalarNumberTypes) { + it(`handles ${numType}`, async () => { + const schemas = await emitSchema(` @minValue(1) @maxValue(2) @multipleOf(10) scalar Test extends ${numType}; `); - assert.strictEqual(schemas["Test.json"].minimum, 1); - assert.strictEqual(schemas["Test.json"].maximum, 2); - assert.strictEqual(schemas["Test.json"].multipleOf, 10); - }); - } - }); + assertNumericConstraints(schemas["Test.json"]); + }); + } - describe("number property constraints", () => { - for (const numType of scalarNumberTypes) { - it(`handles ${numType} properties`, async () => { + it("on a union", async () => { const schemas = await emitSchema(` + @minValue(1) + @maxValue(2) + @multipleOf(10) + union Test { + int32, + string, + null + }; + `); + assertNumericConstraints(schemas["Test.json"]); + }); + }); + + describe("on property", () => { + for (const numType of [...scalarNumberTypes, "int32 | string | null"]) { + it(`handles ${numType} properties`, async () => { + const schemas = await emitSchema(` model Test { @minValue(1) @maxValue(2) @@ -45,16 +64,26 @@ describe("emitting scalars with constraints", () => { prop: ${numType}; } `); + assertNumericConstraints(schemas["Test.json"].properties.prop); + }); + } + }); + }); - assert.strictEqual(schemas["Test.json"].properties.prop.minimum, 1); - assert.strictEqual(schemas["Test.json"].properties.prop.maximum, 2); - assert.strictEqual(schemas["Test.json"].properties.prop.multipleOf, 10); + describe("string constraints", () => { + function assertStringConstraints(schema: any) { + assert.strictEqual(schema.minLength, 1); + assert.strictEqual(schema.maxLength, 2); + assert.strictEqual(schema.pattern, "a|b"); + assert.strictEqual(schema.format, "ipv4"); + assert.strictEqual(schema.contentEncoding, "base64url"); + assert.strictEqual(schema.contentMediaType, "application/jwt"); + assert.deepStrictEqual(schema.contentSchema, { + $ref: "JwtToken.json", }); } - }); - - it("handles string decl constraints", async () => { - const schemas = await emitSchema(` + it("on scalar declaration", async () => { + const schemas = await emitSchema(` @minLength(1) @maxLength(2) @pattern("a|b") @@ -66,19 +95,29 @@ describe("emitting scalars with constraints", () => { model JwtToken is Array>; `); - assert.strictEqual(schemas["shortString.json"].minLength, 1); - assert.strictEqual(schemas["shortString.json"].maxLength, 2); - assert.strictEqual(schemas["shortString.json"].pattern, "a|b"); - assert.strictEqual(schemas["shortString.json"].format, "ipv4"); - assert.strictEqual(schemas["shortString.json"].contentEncoding, "base64url"); - assert.strictEqual(schemas["shortString.json"].contentMediaType, "application/jwt"); - assert.deepStrictEqual(schemas["shortString.json"].contentSchema, { - $ref: "JwtToken.json", + assertStringConstraints(schemas["shortString.json"]); + }); + + it("on union", async () => { + const schemas = await emitSchema(` + @minLength(1) + @maxLength(2) + @pattern("a|b") + @format("ipv4") + @contentEncoding("base64url") + @contentMediaType("application/jwt") + @contentSchema(JwtToken) + union Test { + string, int32, null + } + + model JwtToken is Array>; + `); + assertStringConstraints(schemas["Test.json"]); }); - }); - it("handles string property constraints", async () => { - const schemas = await emitSchema(` + it("on property", async () => { + const schemas = await emitSchema(` model Test { @minLength(1) @maxLength(2) @@ -92,14 +131,7 @@ describe("emitting scalars with constraints", () => { model JwtToken is Array>; `); - assert.strictEqual(schemas["Test.json"].properties.prop.minLength, 1); - assert.strictEqual(schemas["Test.json"].properties.prop.maxLength, 2); - assert.strictEqual(schemas["Test.json"].properties.prop.pattern, "a|b"); - assert.strictEqual(schemas["Test.json"].properties.prop.format, "ipv4"); - assert.strictEqual(schemas["Test.json"].properties.prop.contentEncoding, "base64url"); - assert.strictEqual(schemas["Test.json"].properties.prop.contentMediaType, "application/jwt"); - assert.deepStrictEqual(schemas["Test.json"].properties.prop.contentSchema, { - $ref: "JwtToken.json", + assertStringConstraints(schemas["Test.json"].properties.prop); }); }); }); diff --git a/packages/openapi3/README.md b/packages/openapi3/README.md index 7f382db028..0648f87a67 100644 --- a/packages/openapi3/README.md +++ b/packages/openapi3/README.md @@ -103,7 +103,7 @@ Specify that `oneOf` should be used instead of `anyOf` for that union. ##### Target -`Union` +`union Union | ModelProperty` ##### Parameters diff --git a/packages/openapi3/lib/decorators.tsp b/packages/openapi3/lib/decorators.tsp index 433e2e8471..d791474709 100644 --- a/packages/openapi3/lib/decorators.tsp +++ b/packages/openapi3/lib/decorators.tsp @@ -7,7 +7,7 @@ using TypeSpec.Reflection; /** * Specify that `oneOf` should be used instead of `anyOf` for that union. */ -extern dec oneOf(target: Union); +extern dec oneOf(target: Union | ModelProperty); /** * Specify an external reference that should be used inside of emitting this type. * @param ref External reference(e.g. "../../common.json#/components/schemas/Foo") diff --git a/packages/openapi3/src/decorators.ts b/packages/openapi3/src/decorators.ts index 4703b4a860..c402200004 100644 --- a/packages/openapi3/src/decorators.ts +++ b/packages/openapi3/src/decorators.ts @@ -1,5 +1,5 @@ import { DecoratorContext, Model, ModelProperty, Program, Type, Union } from "@typespec/compiler"; -import { createStateSymbol } from "./lib.js"; +import { createStateSymbol, reportDiagnostic } from "./lib.js"; const refTargetsKey = createStateSymbol("refs"); export function $useRef( @@ -15,7 +15,13 @@ export function getRef(program: Program, entity: Type): string | undefined { } const oneOfKey = createStateSymbol("oneOf"); -export function $oneOf(context: DecoratorContext, entity: Union) { +export function $oneOf(context: DecoratorContext, entity: Union | ModelProperty) { + if (entity.kind === "ModelProperty" && entity.type.kind !== "Union") { + reportDiagnostic(context.program, { + code: "oneof-union", + target: context.decoratorTarget, + }); + } context.program.stateMap(oneOfKey).set(entity, true); } diff --git a/packages/openapi3/src/lib.ts b/packages/openapi3/src/lib.ts index bad2c27484..98ba3fab68 100644 --- a/packages/openapi3/src/lib.ts +++ b/packages/openapi3/src/lib.ts @@ -124,6 +124,13 @@ const EmitterOptionsSchema: JSONSchemaType = { export const libDef = { name: "@typespec/openapi3", diagnostics: { + "oneof-union": { + severity: "error", + messages: { + default: + "@oneOf decorator can only be used on a union or a model property which type is a union.", + }, + }, "inconsistent-shared-route-request-visibility": { severity: "error", messages: { @@ -139,8 +146,7 @@ export const libDef = { "invalid-format": { severity: "warning", messages: { - tsv: "Collection format 'tsv' is not supported in OpenAPI3. Defaulting to type 'string'.", - formHeader: paramMessage`Collection format '${"value"}' is not supported in OpenAPI3 headers. Defaulting to type 'string'.`, + default: paramMessage`Collection format '${"value"}' is not supported in OpenAPI3 ${"paramType"} parameters. Defaulting to type 'string'.`, }, }, "resource-namespace": { diff --git a/packages/openapi3/src/openapi.ts b/packages/openapi3/src/openapi.ts index cefb96bced..9bf41e2544 100644 --- a/packages/openapi3/src/openapi.ts +++ b/packages/openapi3/src/openapi.ts @@ -24,7 +24,6 @@ import { getMinValueExclusive, getNamespaceFullName, getPattern, - getPropertyType, getService, getSummary, ignoreDiagnostics, @@ -37,10 +36,8 @@ import { isGlobalNamespace, isNeverType, isNullType, - isNumericType, isRecordModelType, isSecret, - isStringType, isTemplateDeclaration, listServices, Model, @@ -71,6 +68,7 @@ import { getHttpService, getStatusCodeDescription, getVisibilitySuffix, + HeaderFieldOptions, HttpAuth, HttpOperation, HttpOperationParameter, @@ -80,6 +78,7 @@ import { isContentTypeHeader, isOverloadSameEndpoint, MetadataInfo, + QueryParameterOptions, reportIfNoRoutes, ServiceAuthentication, Visibility, @@ -1157,58 +1156,89 @@ function createOAPIEmitter(program: Program, options: ResolvedOpenAPI3EmitterOpt parameter: HttpOperationParameter, visibility: Visibility ) { - let defaultToString = false; ph.name = parameter.name; ph.in = parameter.type; - if (parameter.type === "query" || parameter.type === "header") { - if (parameter.format === "csv" || parameter.format === "simple") { - if (parameter.type === "query") { - ph.style = "form"; - ph.explode = false; - } else { - ph.style = "simple"; - } - } else if (parameter.format === "multi" || parameter.format === "form") { - if (parameter.type === "header") { - reportDiagnostic(program, { - code: "invalid-format", - messageId: "formHeader", - format: { - value: parameter.format, - }, - target: parameter.param, - }); - defaultToString = true; - } - ph.style = "form"; - ph.explode = true; - } else if (parameter.format === "ssv") { - ph.style = "spaceDelimited"; - ph.explode = false; - } else if (parameter.format === "tsv") { - reportDiagnostic(program, { - code: "invalid-format", - messageId: "tsv", - target: parameter.param, - }); - defaultToString = true; - } else if (parameter.format === "pipes") { - ph.style = "pipeDelimited"; - ph.explode = false; - } - } + const paramBase = getOpenAPIParameterBase(parameter.param, visibility); if (paramBase) { ph = mergeOpenApiParameters(ph, paramBase); } - // Revert unsupported formats to just string schema type - if (defaultToString) { + const format = mapParameterFormat(parameter); + if (format === undefined) { ph.schema = { type: "string", }; - delete ph.style; - delete ph.explode; + } else { + Object.assign(ph, format); + } + } + + function mapParameterFormat( + parameter: HttpOperationParameter + ): { style?: string; explode?: boolean } | undefined { + switch (parameter.type) { + case "header": + return mapHeaderParameterFormat(parameter); + case "query": + return mapQueryParameterFormat(parameter); + case "path": + return {}; + } + } + + function mapHeaderParameterFormat( + parameter: HeaderFieldOptions & { + param: ModelProperty; + } + ): { style?: string; explode?: boolean } | undefined { + switch (parameter.format) { + case undefined: + return {}; + case "csv": + case "simple": + return { style: "simple" }; + default: + reportDiagnostic(program, { + code: "invalid-format", + format: { + paramType: "header", + value: parameter.format, + }, + target: parameter.param, + }); + return undefined; + } + } + function mapQueryParameterFormat( + parameter: QueryParameterOptions & { + param: ModelProperty; + } + ): { style?: string; explode?: boolean } | undefined { + switch (parameter.format) { + case undefined: + return {}; + case "csv": + case "simple": + return { style: "form", explode: false }; + case "multi": + case "form": + return { style: "form", explode: true }; + case "ssv": + return { style: "spaceDelimited", explode: false }; + case "pipes": + return { style: "pipeDelimited", explode: false }; + + default: + reportDiagnostic(program, { + code: "invalid-format", + format: { + paramType: "query", + value: parameter.format, + }, + target: parameter.param, + }); + return undefined; } } @@ -1480,7 +1510,7 @@ function createOAPIEmitter(program: Program, options: ResolvedOpenAPI3EmitterOpt } } - return schema; + return applyIntrinsicDecorators(union, schema); } function getSchemaForUnionVariant(variant: UnionVariant, visibility: Visibility) { @@ -1637,6 +1667,7 @@ function createOAPIEmitter(program: Program, options: ResolvedOpenAPI3EmitterOpt // Attach any additional OpenAPI extensions attachExtensions(program, prop, additionalProps); + if (schema && "$ref" in schema) { if (Object.keys(additionalProps).length === 0) { return schema; @@ -1647,6 +1678,11 @@ function createOAPIEmitter(program: Program, options: ResolvedOpenAPI3EmitterOpt }; } } else { + if (getOneOf(program, prop) && schema.anyOf) { + schema.oneOf = schema.anyOf; + delete schema.anyOf; + } + return { ...schema, ...additionalProps }; } } @@ -1669,58 +1705,51 @@ function createOAPIEmitter(program: Program, options: ResolvedOpenAPI3EmitterOpt return mapping; } - function applyIntrinsicDecorators( - typespecType: Model | Scalar | ModelProperty, - target: OpenAPI3Schema - ): OpenAPI3Schema { + function applyIntrinsicDecorators(typespecType: Type, target: OpenAPI3Schema): OpenAPI3Schema { const newTarget = { ...target }; const docStr = getDoc(program, typespecType); - const isString = - typespecType.kind !== "Model" && isStringType(program, getPropertyType(typespecType)); - const isNumeric = - typespecType.kind !== "Model" && isNumericType(program, getPropertyType(typespecType)); if (docStr) { newTarget.description = docStr; } const formatStr = getFormat(program, typespecType); - if (isString && formatStr) { + if (formatStr) { newTarget.format = formatStr; } const pattern = getPattern(program, typespecType); - if (isString && pattern) { + if (pattern) { newTarget.pattern = pattern; } const minLength = getMinLength(program, typespecType); - if (isString && minLength !== undefined) { + if (minLength !== undefined) { newTarget.minLength = minLength; } const maxLength = getMaxLength(program, typespecType); - if (isString && maxLength !== undefined) { + if (maxLength !== undefined) { newTarget.maxLength = maxLength; } const minValue = getMinValue(program, typespecType); - if (isNumeric && minValue !== undefined) { + if (minValue !== undefined) { newTarget.minimum = minValue; } const minValueExclusive = getMinValueExclusive(program, typespecType); - if (isNumeric && minValueExclusive !== undefined) { + if (minValueExclusive !== undefined) { newTarget.minimum = minValueExclusive; newTarget.exclusiveMinimum = true; } const maxValue = getMaxValue(program, typespecType); - if (isNumeric && maxValue !== undefined) { + if (maxValue !== undefined) { newTarget.maximum = maxValue; } const maxValueExclusive = getMaxValueExclusive(program, typespecType); - if (isNumeric && maxValueExclusive !== undefined) { + if (maxValueExclusive !== undefined) { newTarget.maximum = maxValueExclusive; newTarget.exclusiveMaximum = true; } @@ -1739,13 +1768,11 @@ function createOAPIEmitter(program: Program, options: ResolvedOpenAPI3EmitterOpt newTarget.format = "password"; } - if (isString) { - const values = getKnownValues(program, typespecType); - if (values) { - return { - oneOf: [newTarget, getSchemaForEnum(values)], - }; - } + const values = getKnownValues(program, typespecType as any); + if (values) { + return { + oneOf: [newTarget, getSchemaForEnum(values)], + }; } attachExtensions(program, typespecType, newTarget); diff --git a/packages/openapi3/test/models.test.ts b/packages/openapi3/test/models.test.ts index c753abde24..b7cc3e83bf 100644 --- a/packages/openapi3/test/models.test.ts +++ b/packages/openapi3/test/models.test.ts @@ -685,6 +685,25 @@ describe("openapi3: models", () => { }); }); + it("defines oneOf schema for property of a union with @oneOf decorator", async () => { + const openApi = await openApiFor(` + model Foo { + @oneOf + bar: string | int32; + } + `); + ok(openApi.components.schemas.Foo, "expected definition named Foo"); + deepStrictEqual(openApi.components.schemas.Foo, { + type: "object", + properties: { + bar: { + oneOf: [{ type: "string" }, { type: "integer", format: "int32" }], + }, + }, + required: ["bar"], + }); + }); + it("defines oneOf schema for unions with @oneOf decorator", async () => { const openApi = await openApiFor(` model Cat { diff --git a/packages/openapi3/test/parameters.test.ts b/packages/openapi3/test/parameters.test.ts index 80b8c6e315..4f28df2a89 100644 --- a/packages/openapi3/test/parameters.test.ts +++ b/packages/openapi3/test/parameters.test.ts @@ -150,7 +150,9 @@ describe("openapi3: parameters", () => { @header({name: "$multi", format: "multi"}) multis: string[], #suppress "@typespec/openapi3/invalid-format" "test" @header({name: "$tsv", format: "tsv"}) tsvs: string[], + #suppress "@typespec/openapi3/invalid-format" "test" @header({name: "$ssv", format: "ssv"}) ssvs: string[], + #suppress "@typespec/openapi3/invalid-format" "test" @header({name: "$pipes", format: "pipes"}) pipes: string[] ): void; ` @@ -187,28 +189,18 @@ describe("openapi3: parameters", () => { deepStrictEqual(params[3], { in: "header", name: "$ssv", - style: "spaceDelimited", required: true, schema: { - type: "array", - items: { - type: "string", - }, + type: "string", }, - explode: false, }); deepStrictEqual(params[4], { in: "header", name: "$pipes", - style: "pipeDelimited", required: true, schema: { - type: "array", - items: { - type: "string", - }, + type: "string", }, - explode: false, }); }); diff --git a/packages/openapi3/test/primitive-types.test.ts b/packages/openapi3/test/primitive-types.test.ts index b0fb2b737c..8c86f11247 100644 --- a/packages/openapi3/test/primitive-types.test.ts +++ b/packages/openapi3/test/primitive-types.test.ts @@ -1,4 +1,4 @@ -import { deepStrictEqual, ok, strictEqual } from "assert"; +import { deepStrictEqual, ok } from "assert"; import { OpenAPI3Schema } from "../src/types.js"; import { oapiForModel } from "./test-host.js"; @@ -270,59 +270,4 @@ describe("openapi3: primitives", () => { testEncode("bytes", { type: "string", format: "base64url" }, "base64url")); }); }); - - describe("constraints", () => { - const scalarNumberTypes = [ - "int8", - "int16", - "int32", - "uint8", - "uint16", - "uint32", - "integer", - "float32", - "float64", - "numeric", - "float", - "safeint", - ]; - - describe("@minValue/@maxValue", () => { - for (const numType of scalarNumberTypes) { - it(numType, async () => { - const schemas = await oapiForModel( - "Test", - ` - @minValue(1) - @maxValue(2) - scalar Test extends ${numType}; - ` - ); - - strictEqual(schemas.schemas.Test.minimum, 1); - strictEqual(schemas.schemas.Test.maximum, 2); - }); - } - }); - - describe("@minValueExclusive/@maxValueExclusive", () => { - for (const numType of scalarNumberTypes) { - it(numType, async () => { - const schemas = await oapiForModel( - "Test", - ` - @minValueExclusive(1) - @maxValueExclusive(2) - scalar Test extends ${numType}; - ` - ); - - strictEqual(schemas.schemas.Test.minimum, 1); - strictEqual(schemas.schemas.Test.exclusiveMaximum, true); - strictEqual(schemas.schemas.Test.maximum, 2); - strictEqual(schemas.schemas.Test.exclusiveMaximum, true); - }); - } - }); - }); }); diff --git a/packages/openapi3/test/response-descriptions.test.ts b/packages/openapi3/test/response-descriptions.test.ts new file mode 100644 index 0000000000..f20fd0e97a --- /dev/null +++ b/packages/openapi3/test/response-descriptions.test.ts @@ -0,0 +1,63 @@ +import { strictEqual } from "assert"; +import { openApiFor } from "./test-host.js"; + +describe("openapi3: response descriptions", () => { + it("use a default message by status code if not specified", async () => { + const res = await openApiFor( + ` + op read(): {@statusCode _: 200, content: string}; + ` + ); + strictEqual(res.paths["/"].get.responses["200"].description, "The request has succeeded."); + }); + + it("@returns set doc for all success responses", async () => { + const res = await openApiFor( + ` + @error model Error {} + @returnsDoc("A string") + op read(): { @statusCode _: 200, content: string } | { @statusCode _: 201, content: string } | Error; + ` + ); + strictEqual(res.paths["/"].get.responses["200"].description, "A string"); + strictEqual(res.paths["/"].get.responses["201"].description, "A string"); + strictEqual( + res.paths["/"].get.responses["default"].description, + "An unexpected error response." + ); + }); + + it("@errors set doc for all success responses", async () => { + const res = await openApiFor( + ` + @error model Error {} + @errorsDoc("Generic error") + op read(): { @statusCode _: 200, content: string } | { @statusCode _: 201, content: string } | Error; + ` + ); + strictEqual(res.paths["/"].get.responses["200"].description, "The request has succeeded."); + strictEqual( + res.paths["/"].get.responses["201"].description, + "The request has succeeded and a new resource has been created as a result." + ); + strictEqual(res.paths["/"].get.responses["default"].description, "Generic error"); + }); + + it("@doc explicitly on a response override the operation returns doc", async () => { + const res = await openApiFor( + ` + @error model Error {} + @error @doc("Not found model") model NotFound {@statusCode _: 404} + @errorsDoc("Generic error") + op read(): { @statusCode _: 200, content: string } | { @statusCode _: 201, content: string } | Error | NotFound; + ` + ); + strictEqual(res.paths["/"].get.responses["200"].description, "The request has succeeded."); + strictEqual( + res.paths["/"].get.responses["201"].description, + "The request has succeeded and a new resource has been created as a result." + ); + strictEqual(res.paths["/"].get.responses["404"].description, "Not found model"); + strictEqual(res.paths["/"].get.responses["default"].description, "Generic error"); + }); +}); diff --git a/packages/openapi3/test/return-types.test.ts b/packages/openapi3/test/return-types.test.ts index e6da937653..2692579332 100644 --- a/packages/openapi3/test/return-types.test.ts +++ b/packages/openapi3/test/return-types.test.ts @@ -159,35 +159,6 @@ describe("openapi3: return types", () => { ); }); - it("defines separate responses for each status code property in return type", async () => { - const res = await openApiFor( - ` - model CreatedOrUpdatedResponse { - @statusCode ok: "200"; - @statusCode created: "201"; - } - model DateHeader { - @header date: utcDateTime; - } - model Key { - key: string; - } - @put op create(): CreatedOrUpdatedResponse & DateHeader & Key; - ` - ); - ok(res.paths["/"].put.responses["200"]); - ok(res.paths["/"].put.responses["201"]); - // Note: 200 and 201 response should be equal except for description - deepStrictEqual( - res.paths["/"].put.responses["200"].headers, - res.paths["/"].put.responses["201"].headers - ); - deepStrictEqual( - res.paths["/"].put.responses["200"].content, - res.paths["/"].put.responses["201"].content - ); - }); - it("defines separate responses for each variant of a union return type", async () => { const res = await openApiFor( ` diff --git a/packages/openapi3/test/scalar-constraints.test.ts b/packages/openapi3/test/scalar-constraints.test.ts new file mode 100644 index 0000000000..4235e2373a --- /dev/null +++ b/packages/openapi3/test/scalar-constraints.test.ts @@ -0,0 +1,127 @@ +import { strictEqual } from "assert"; +import { oapiForModel } from "./test-host.js"; + +describe("scalar constraints", () => { + describe("numeric constraints", () => { + const scalarNumberTypes = [ + "int8", + "int16", + "int32", + "uint8", + "uint16", + "uint32", + "integer", + "float32", + "float64", + "numeric", + "float", + "safeint", + ]; + + describe("@minValue/@maxValue", () => { + for (const numType of scalarNumberTypes) { + it(numType, async () => { + const schemas = await oapiForModel( + "Test", + ` + @minValue(1) + @maxValue(2) + scalar Test extends ${numType}; + ` + ); + + strictEqual(schemas.schemas.Test.minimum, 1); + strictEqual(schemas.schemas.Test.maximum, 2); + }); + } + + it("can be applied on a union", async () => { + const schemas = await oapiForModel( + "Test", + ` + @minValue(1) + @maxValue(2) + union Test {int32, string, null}; + ` + ); + + strictEqual(schemas.schemas.Test.minimum, 1); + strictEqual(schemas.schemas.Test.maximum, 2); + }); + }); + + describe("@minValueExclusive/@maxValueExclusive", () => { + for (const numType of scalarNumberTypes) { + it(numType, async () => { + const schemas = await oapiForModel( + "Test", + ` + @minValueExclusive(1) + @maxValueExclusive(2) + scalar Test extends ${numType}; + ` + ); + + strictEqual(schemas.schemas.Test.minimum, 1); + strictEqual(schemas.schemas.Test.exclusiveMaximum, true); + strictEqual(schemas.schemas.Test.maximum, 2); + strictEqual(schemas.schemas.Test.exclusiveMaximum, true); + }); + + it("can be applied on a union", async () => { + const schemas = await oapiForModel( + "Test", + ` + @minValueExclusive(1) + @maxValueExclusive(2) + union Test {int32, string, null}; + ` + ); + + strictEqual(schemas.schemas.Test.minimum, 1); + strictEqual(schemas.schemas.Test.exclusiveMaximum, true); + strictEqual(schemas.schemas.Test.maximum, 2); + strictEqual(schemas.schemas.Test.exclusiveMaximum, true); + }); + } + }); + }); + + describe("string constraints", () => { + function assertStringConstraints(schema: any) { + strictEqual(schema.minLength, 1); + strictEqual(schema.maxLength, 2); + strictEqual(schema.pattern, "a|b"); + strictEqual(schema.format, "ipv4"); + } + + const decorators = ` + @minLength(1) + @maxLength(2) + @pattern("a|b") + @format("ipv4")`; + + it("on scalar declaration", async () => { + const schemas = await oapiForModel( + "Test", + ` + ${decorators} + scalar Test extends string; + ` + ); + + assertStringConstraints(schemas.schemas.Test); + }); + it("on union declaration", async () => { + const schemas = await oapiForModel( + "Test", + ` + ${decorators} + union Test {string, int32, null}; + ` + ); + + assertStringConstraints(schemas.schemas.Test); + }); + }); +}); diff --git a/packages/playground-website/package.json b/packages/playground-website/package.json index 2d5d5cd38b..34134dc84f 100644 --- a/packages/playground-website/package.json +++ b/packages/playground-website/package.json @@ -41,7 +41,7 @@ "!dist/test/**" ], "dependencies": { - "@typespec/playground": "workspace:~0.44.0", + "@typespec/playground": "workspace:~0.1.0-alpha.0", "@typespec/versioning": "workspace:~0.48.0", "@typespec/compiler": "workspace:~0.48.1", "@typespec/http": "workspace:~0.48.0", @@ -65,7 +65,6 @@ "@types/react": "~18.2.22", "@types/swagger-ui-react": "^4.18.0", "@types/swagger-ui": "~3.52.0", - "@typespec/bundler": "workspace:~0.1.0", "@typespec/eslint-config-typespec": "workspace:~0.48.0", "@vitejs/plugin-react": "~4.0.4", "c8": "~8.0.1", diff --git a/packages/playground/README.md b/packages/playground/README.md index 11e5130008..f13f18298f 100644 --- a/packages/playground/README.md +++ b/packages/playground/README.md @@ -1,3 +1,64 @@ # TypeSpec Playground -A web app to play with TypeSpec in the browser. +Contains react components for the TypeSpec playground. + +It can be used as a standalone custom playground with your own libraries or components can be used individually to customize the UI as you see fit. + +## Usage + +### Standalone + +The stanalone playground provides some vite helpers to make it easy to get started. + +In `vite.config.ts`: + +```ts +import { definePlaygroundViteConfig } from "@typespec/playground/vite"; + +const config = definePlaygroundViteConfig({ + defaultEmitter: "@typespec/openapi3", + libraries: [ + "@typespec/compiler", + "@typespec/http", + "@typespec/openapi3", + + // Add any other libraries here. Make sure those libraries are also dependencies of that package. + ], + samples: { + "My sample": { + filename: "samples/my.tsp", + preferredEmitter: "@typespec/openapi3", + }, + }, + links: { + githubIssueUrl: ``, + documentationUrl: "", + }, +}); + +export default config; +``` + +In `src/main.tsx`: + +```tsx +import { PlaygroundManifest } from "@typespec/playground/manifest"; +import { renderReactPlayground } from "@typespec/playground/react"; +import { SwaggerUIViewer } from "@typespec/playground/react/viewers"; +import "./style.css"; + +await renderReactPlayground({ + ...PlaygroundManifest, + emitterViewers: { + "@typespec/openapi3": [SwaggerUIViewer], + }, +}); +``` + +### Individual components + +Playground react components can be used individually. The things to watch out for is for the TypeSpec compiler to be working correctly it needs: + +- The libraries to be loaded and registered +- The libraries **MUST** be importable by their name this means an import map must be setup. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap +- The libraries **MUST** have been bundled using `@typespec/bundler` diff --git a/packages/playground/package.json b/packages/playground/package.json index b918d9378d..49582a11b6 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -1,7 +1,6 @@ { "name": "@typespec/playground", - "private": true, - "version": "0.44.0", + "version": "0.1.0-alpha.0", "author": "Microsoft Corporation", "description": "TypeSpec playground UI components.", "homepage": "https://microsoft.github.io/typespec", @@ -64,9 +63,7 @@ "monaco-editor": "~0.43.0", "react-dom": "~18.2.0", "react": "~18.2.0", - "swagger-client": "~3.18.5", - "swagger-ui-react": "~4.15.5", - "swagger-ui": "~4.15.5", + "swagger-ui-react": "~5.7.2", "vscode-languageserver-textdocument": "~1.0.8", "vscode-languageserver": "~9.0.0" }, @@ -80,7 +77,7 @@ "@types/react": "~18.2.22", "@types/swagger-ui-react": "^4.18.0", "@types/swagger-ui": "~3.52.0", - "@typespec/bundler": "workspace:~0.1.0", + "@typespec/bundler": "workspace:~0.1.0-alpha.0", "@typespec/eslint-config-typespec": "workspace:~0.48.0", "@vitejs/plugin-react": "~4.0.4", "c8": "~8.0.1", diff --git a/packages/playground/src/react/output-view.tsx b/packages/playground/src/react/output-view.tsx index fe9b150e8b..966f311095 100644 --- a/packages/playground/src/react/output-view.tsx +++ b/packages/playground/src/react/output-view.tsx @@ -2,7 +2,6 @@ import { css } from "@emotion/react"; import { Diagnostic, Program } from "@typespec/compiler"; import { TypeSpecProgramViewer } from "@typespec/html-program-viewer"; import { FunctionComponent, useCallback, useEffect, useMemo, useState } from "react"; -import "swagger-ui/dist/swagger-ui.css"; import { ErrorTab, InternalCompilerError } from "./error-tab.js"; import { FileOutput } from "./file-output.js"; import { OutputTabs, Tab } from "./output-tabs.js"; diff --git a/packages/playground/src/react/playground.tsx b/packages/playground/src/react/playground.tsx index f4f1a9f2e8..e904c9d67b 100644 --- a/packages/playground/src/react/playground.tsx +++ b/packages/playground/src/react/playground.tsx @@ -2,7 +2,7 @@ import { CompilerOptions } from "@typespec/compiler"; import debounce from "debounce"; import { KeyCode, KeyMod, MarkerSeverity, Uri, editor } from "monaco-editor"; import { FunctionComponent, useCallback, useEffect, useMemo, useState } from "react"; -import "swagger-ui/dist/swagger-ui.css"; +import "swagger-ui-react/swagger-ui.css"; import { CompletionItemTag } from "vscode-languageserver"; import { BrowserHost } from "../browser-host.js"; import { importTypeSpecCompiler } from "../core.js"; diff --git a/packages/protobuf/lib/proto.tsp b/packages/protobuf/lib/proto.tsp index 1d1e7a5360..cdd173e1b1 100644 --- a/packages/protobuf/lib/proto.tsp +++ b/packages/protobuf/lib/proto.tsp @@ -74,6 +74,7 @@ namespace WellKnown { * Uses variable-length encoding. These more efficiently encode negative numbers than regular int32s. */ scalar sint32 extends int32; + /** * A signed 64-bit integer that will use the `sint64` encoding when used in a Protobuf message. * @@ -82,6 +83,7 @@ scalar sint32 extends int32; * Uses variable-length encoding. These more efficiently encode negative numbers than regular `int64s`. */ scalar sint64 extends int64; + /** * A signed 32-bit integer that will use the `sfixed32` encoding when used in a Protobuf message. * @@ -90,6 +92,7 @@ scalar sint64 extends int64; * Always four bytes. */ scalar sfixed32 extends int32; + /** * A signed 64-bit integer that will use the `sfixed64` encoding when used in a Protobuf message. * @@ -98,6 +101,7 @@ scalar sfixed32 extends int32; * Always eight bytes. */ scalar sfixed64 extends int64; + /** * An unsigned 32-bit integer that will use the `fixed32` encoding when used in a Protobuf message. * @@ -106,6 +110,7 @@ scalar sfixed64 extends int64; * Always four bytes. More efficient than `uint32` if values are often greater than 228. */ scalar fixed32 extends uint32; + /** * An unsigned 64-bit integer that will use the `fixed64` encoding when used in a Protobuf message. * diff --git a/packages/protobuf/src/ast.ts b/packages/protobuf/src/ast.ts index c43456893d..d627704d35 100644 --- a/packages/protobuf/src/ast.ts +++ b/packages/protobuf/src/ast.ts @@ -35,6 +35,11 @@ export interface ProtoFile { * The original namespace node from which this ProtoFile originated. */ source: Namespace; + + /** + * The package-level documentation comment, if any. + */ + doc?: string | undefined; } /** @@ -66,7 +71,8 @@ export type ProtoDeclaration = | ProtoFieldDeclaration | ProtoOneOfDeclaration | ProtoEnumDeclaration - | ProtoMethodDeclaration; + | ProtoMethodDeclaration + | ProtoEnumVariantDeclaration; /** * A Protobuf scalar type. @@ -187,10 +193,20 @@ export function matchType(type: ProtoType, pattern: ProtoTypeMatchPatter } } +/** + * Elements common to all protobuf declarations. + */ +export interface ProtoDeclarationCommon { + /** + * Documentation comment text, if any. + */ + doc?: string | undefined; +} + /** * A `service` declaration. */ -export interface ProtoServiceDeclaration { +export interface ProtoServiceDeclaration extends ProtoDeclarationCommon { kind: "service"; name: string; operations: ProtoMethodDeclaration[]; @@ -209,7 +225,7 @@ export const enum StreamingMode { /** * An `rfc` method declaration. */ -export interface ProtoMethodDeclaration { +export interface ProtoMethodDeclaration extends ProtoDeclarationCommon { kind: "method"; stream: StreamingMode; name: string; @@ -229,7 +245,7 @@ export type ProtoMessageBodyDeclaration = /** * A `message` declaration. */ -export interface ProtoMessageDeclaration { +export interface ProtoMessageDeclaration extends ProtoDeclarationCommon { kind: "message"; name: string; declarations: Array; @@ -239,7 +255,7 @@ export interface ProtoMessageDeclaration { /** * A field declaration within a message. */ -export interface ProtoFieldDeclaration { +export interface ProtoFieldDeclaration extends ProtoDeclarationCommon { kind: "field"; name: string; /** @@ -262,7 +278,7 @@ export interface DefaultFieldOptions { /** * A `one_of` declaration. */ -export interface ProtoOneOfDeclaration { +export interface ProtoOneOfDeclaration extends ProtoDeclarationCommon { kind: "oneof"; name: string; declarations: ProtoFieldDeclaration[]; @@ -271,9 +287,18 @@ export interface ProtoOneOfDeclaration { /** * An `enum` declaration. */ -export interface ProtoEnumDeclaration { +export interface ProtoEnumDeclaration extends ProtoDeclarationCommon { kind: "enum"; name: string; allowAlias?: boolean; - variants: [string, number][]; + variants: ProtoEnumVariantDeclaration[]; +} + +/** + * A variant within an `enum` declaration. + */ +export interface ProtoEnumVariantDeclaration extends ProtoDeclarationCommon { + kind: "variant"; + name: string; + value: number; } diff --git a/packages/protobuf/src/transform/index.ts b/packages/protobuf/src/transform/index.ts index a2ed73c79a..aa89e6c684 100644 --- a/packages/protobuf/src/transform/index.ts +++ b/packages/protobuf/src/transform/index.ts @@ -5,6 +5,7 @@ import { DiagnosticTarget, Enum, formatDiagnostic, + getDoc, getEffectiveModelType, getTypeName, Interface, @@ -26,6 +27,7 @@ import { map, matchType, ProtoEnumDeclaration, + ProtoEnumVariantDeclaration, ProtoFieldDeclaration, ProtoFile, ProtoMap, @@ -206,6 +208,8 @@ function tspToProto(program: Program, emitterOptions: ProtobufEmitterOptions): P declarations: declarationMap.get(namespace), source: namespace, + + doc: getDoc(program, namespace), } as ProtoFile; }); @@ -261,6 +265,7 @@ function tspToProto(program: Program, emitterOptions: ProtobufEmitterOptions): P name: iface.name, // The service's methods are just projections of the interface operations. operations: [...iface.operations.values()].map(toMethodFromOperation), + doc: getDoc(program, iface), }); } } @@ -297,6 +302,7 @@ function tspToProto(program: Program, emitterOptions: ProtobufEmitterOptions): P operation, operation.returnType as NamespaceTraversable ), + doc: getDoc(program, operation), }; } @@ -680,6 +686,7 @@ function tspToProto(program: Program, emitterOptions: ProtobufEmitterOptions): P name: model.name, reservations: program.stateMap(state.reserve).get(model), declarations: [...model.properties.values()].map((f) => toMessageBodyDeclaration(f, model)), + doc: getDoc(program, model), }; } @@ -775,6 +782,7 @@ function tspToProto(program: Program, emitterOptions: ProtobufEmitterOptions): P property.type as NamespaceTraversable ), index: program.stateMap(state.fieldIndex).get(property), + doc: getDoc(program, property), }; // Determine if the property type is an array @@ -796,7 +804,15 @@ function tspToProto(program: Program, emitterOptions: ProtobufEmitterOptions): P kind: "enum", name: e.name, allowAlias: needsAlias, - variants: [...e.members.values()].map(({ name, value }) => [name, value as number]), + variants: [...e.members.values()].map( + (variant): ProtoEnumVariantDeclaration => ({ + kind: "variant", + name: variant.name, + value: variant.value as number, + doc: getDoc(program, variant), + }) + ), + doc: getDoc(program, e), }; } diff --git a/packages/protobuf/src/write.ts b/packages/protobuf/src/write.ts index 5826d5d404..c476dd87f2 100644 --- a/packages/protobuf/src/write.ts +++ b/packages/protobuf/src/write.ts @@ -5,6 +5,7 @@ import { matchType, ProtoDeclaration, ProtoEnumDeclaration, + ProtoEnumVariantDeclaration, ProtoFieldDeclaration, ProtoFile, ProtoMessageDeclaration, @@ -17,21 +18,19 @@ import { // This module defines how to emit the text representation of a ProtoFile AST. -/** - * Header for the top of all emitted proto files. - * - * We only support Protobuf 3 syntax. - */ -export const PROTO_HEADER = `/* Generated by Microsoft TypeSpec */ - -syntax = "proto3"; -`; +const PROTO_MAX_ONE_LINE_DOC_LENGTH = 80; /** * Write the given `file` to a string. */ export function writeProtoFile(file: ProtoFile): string { - let result = PROTO_HEADER; + let result = "// Generated by Microsoft TypeSpec\n"; + + let docComment = collect(writeBlockDocumentationComment(file)).join("\n"); + if (docComment.length > 0) docComment = "\n" + docComment; + result += docComment; + + result += '\nsyntax = "proto3";\n'; if (file.package) result += `\npackage ${file.package};\n`; @@ -51,7 +50,7 @@ export function writeProtoFile(file: ProtoFile): string { if (opts.length > 0) result += "\n"; for (const decl of file.declarations) { - result += "\n" + collect(writeDeclaration(decl)).join("\n") + "\n"; + result += "\n" + collect(writeDeclaration(decl, 0)).join("\n") + "\n"; } return result; @@ -60,25 +59,28 @@ export function writeProtoFile(file: ProtoFile): string { /** * Write the given `decl` to a line iterable. */ -function* writeDeclaration(decl: ProtoDeclaration): Iterable { +function* writeDeclaration(decl: ProtoDeclaration, indentLevel: number): Iterable { switch (decl.kind) { case "message": - yield* writeMessage(decl); + yield* writeMessage(decl, indentLevel); return; case "service": - yield* writeService(decl); + yield* writeService(decl, indentLevel); return; case "field": - yield writeField(decl); + yield* writeField(decl, indentLevel); return; case "oneof": - yield* writeOneOf(decl); + yield* writeOneOf(decl, indentLevel); return; case "enum": - yield* writeEnum(decl); + yield* writeEnum(decl, indentLevel); + return; + case "variant": + yield* writeVariant(decl, indentLevel); return; case "method": - yield writeMethod(decl); + yield* writeMethod(decl); return; /* c8 ignore next 5 */ default: @@ -90,14 +92,16 @@ function* writeDeclaration(decl: ProtoDeclaration): Iterable { /** * Write the given message `decl` to a line iterable. */ -function* writeMessage(decl: ProtoMessageDeclaration): Iterable { +function* writeMessage(decl: ProtoMessageDeclaration, indentLevel: number): Iterable { + yield* writeBlockDocumentationComment(decl); + const head = `message ${decl.name} {`; const tail = "}"; if (decl.declarations.length > 0 || decl.reservations?.length) { yield head; yield* indent(writeReservations(decl)); - yield* indent(flatMap(decl.declarations, writeDeclaration)); + yield* indent(flatMap(decl.declarations, (decl) => writeDeclaration(decl, indentLevel + 1))); yield tail; } else yield head + tail; } @@ -119,49 +123,65 @@ function* writeReservations(decl: ProtoMessageDeclaration): Iterable { } } -function* writeService(decl: ProtoServiceDeclaration): Iterable { +function* writeService(decl: ProtoServiceDeclaration, indentLevel: number): Iterable { + yield* writeBlockDocumentationComment(decl); + const head = `service ${decl.name} {`; const tail = "}"; if (decl.operations.length > 0) { yield head; - yield* indent(flatMap(decl.operations, writeDeclaration)); + yield* indent(flatMap(decl.operations, (decl) => writeDeclaration(decl, indentLevel + 1))); yield tail; } else yield head + tail; } -function writeMethod(decl: ProtoMethodDeclaration): string { +function* writeMethod(decl: ProtoMethodDeclaration): Iterable { + yield* writeBlockDocumentationComment(decl); + const [inStream, outStream] = [ decl.stream & StreamingMode.In, decl.stream & StreamingMode.Out, ].map((v) => (v ? "stream " : "")); - return `rpc ${decl.name}(${inStream}${writeType(decl.input)}) returns (${outStream}${writeType( + yield `rpc ${decl.name}(${inStream}${writeType(decl.input)}) returns (${outStream}${writeType( decl.returns )});`; } -function* writeOneOf(decl: ProtoOneOfDeclaration): Iterable { +function* writeOneOf(decl: ProtoOneOfDeclaration, indentLevel: number): Iterable { + yield* writeBlockDocumentationComment(decl); + // OneOf declarations must have at least one element, so no need to check for declarations yield `oneof ${decl.name} {`; - yield* indent(flatMap(decl.declarations, writeDeclaration)); + yield* indent(flatMap(decl.declarations, (decl) => writeDeclaration(decl, indentLevel + 1))); yield "}"; } -function* writeEnum(decl: ProtoEnumDeclaration): Iterable { +function* writeEnum(decl: ProtoEnumDeclaration, indentLevel: number): Iterable { + yield* writeBlockDocumentationComment(decl); + yield `enum ${decl.name} {`; if (decl.allowAlias) { yield " option allow_alias = true;"; if (decl.variants.length > 0) yield ""; } - yield* indent(flatMap(decl.variants, ([name, idx]) => `${name} = ${idx};`)); + yield* indent(flatMap(decl.variants, (decl) => writeDeclaration(decl, indentLevel + 1))); yield "}"; } -function writeField(decl: ProtoFieldDeclaration): string { +function writeVariant(decl: ProtoEnumVariantDeclaration, indentLevel: number): Iterable { + const output = `${decl.name} = ${decl.value};`; + + return writeDocumentationCommentFlexible(decl, output, indentLevel); +} + +function writeField(decl: ProtoFieldDeclaration, indentLevel: number): Iterable { const prefix = decl.repeated ? "repeated " : ""; - return prefix + `${writeType(decl.type)} ${decl.name} = ${decl.index};`; + const output = prefix + `${writeType(decl.type)} ${decl.name} = ${decl.index};`; + + return writeDocumentationCommentFlexible(decl, output, indentLevel); } function writeType(type: ProtoType): string { @@ -189,6 +209,37 @@ function* indent(it: Iterable, depth: number = 2): Iterable { } } +/** + * Writes a block comment from the given declaration. + */ +function* writeBlockDocumentationComment(decl: ProtoDeclaration | ProtoFile): Iterable { + yield* decl.doc + ?.trim() + .split("\n") + .map((line) => `// ${line}`) ?? []; +} + +/** + * Writes a block comment or inline postfix comment depending on the length of the content. + */ +function* writeDocumentationCommentFlexible( + decl: ProtoDeclaration, + output: string, + indentLevel: number +): Iterable { + const docComment = decl.doc?.trim(); + const docCommentIsOneLine = docComment && !docComment?.includes("\n"); + + const fullLength = indentLevel * 2 + output.length + 1 + (docComment?.length ?? 0); + + if (docCommentIsOneLine && fullLength <= PROTO_MAX_ONE_LINE_DOC_LENGTH) { + yield output + " // " + decl.doc; + } else { + yield* writeBlockDocumentationComment(decl); + yield output; + } +} + /** * A version of flatMap that works with generic iterables. * diff --git a/packages/protobuf/test/scenarios/addressbook/output/@typespec/protobuf/addressbook.proto b/packages/protobuf/test/scenarios/addressbook/output/@typespec/protobuf/addressbook.proto index 2fdbab6ede..401786e593 100644 --- a/packages/protobuf/test/scenarios/addressbook/output/@typespec/protobuf/addressbook.proto +++ b/packages/protobuf/test/scenarios/addressbook/output/@typespec/protobuf/addressbook.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/addressbook/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/addressbook/output/@typespec/protobuf/main.proto index dde2c14764..66a110dfa0 100644 --- a/packages/protobuf/test/scenarios/addressbook/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/addressbook/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/anonymous-package/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/anonymous-package/output/@typespec/protobuf/main.proto index b990bd3bf4..364c5442e4 100644 --- a/packages/protobuf/test/scenarios/anonymous-package/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/anonymous-package/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/array/output/@typespec/protobuf/com/azure/test.proto b/packages/protobuf/test/scenarios/array/output/@typespec/protobuf/com/azure/test.proto index c3bd262fb2..fcb0a5d3eb 100644 --- a/packages/protobuf/test/scenarios/array/output/@typespec/protobuf/com/azure/test.proto +++ b/packages/protobuf/test/scenarios/array/output/@typespec/protobuf/com/azure/test.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/cross package references/output/@typespec/protobuf/A.proto b/packages/protobuf/test/scenarios/cross package references/output/@typespec/protobuf/A.proto index 0eae330f10..be7ca84ede 100644 --- a/packages/protobuf/test/scenarios/cross package references/output/@typespec/protobuf/A.proto +++ b/packages/protobuf/test/scenarios/cross package references/output/@typespec/protobuf/A.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/cross package references/output/@typespec/protobuf/B.proto b/packages/protobuf/test/scenarios/cross package references/output/@typespec/protobuf/B.proto index bcaece25e2..8b0c9f4329 100644 --- a/packages/protobuf/test/scenarios/cross package references/output/@typespec/protobuf/B.proto +++ b/packages/protobuf/test/scenarios/cross package references/output/@typespec/protobuf/B.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/derived-scalar/output/@typespec/protobuf/com/azure/Test.proto b/packages/protobuf/test/scenarios/derived-scalar/output/@typespec/protobuf/com/azure/Test.proto index 32114a3b14..ab65259c52 100644 --- a/packages/protobuf/test/scenarios/derived-scalar/output/@typespec/protobuf/com/azure/Test.proto +++ b/packages/protobuf/test/scenarios/derived-scalar/output/@typespec/protobuf/com/azure/Test.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/doc/input/main.tsp b/packages/protobuf/test/scenarios/doc/input/main.tsp new file mode 100644 index 0000000000..4e9fa34ffd --- /dev/null +++ b/packages/protobuf/test/scenarios/doc/input/main.tsp @@ -0,0 +1,67 @@ +import "@typespec/protobuf"; + +using TypeSpec.Protobuf; + +@package({ + name: "com.azure.Test", +}) +@doc("A test package.") +namespace Test; + +/** + * A test service. + */ +@Protobuf.service +interface Service { + /** + * A test method. + */ + foo(...Input): Output; + + /** + * Another test method. + * + * @param barInputField A test input field declared with 'param'. + */ + bar(@field(1) barInputField: string): Output; +} + +/** + * A test input message. + */ +model Input { + /** + * A test input field. + */ + @field(1) testInputField: string; +} + +/** + * A test output message. + */ +model Output { + /** + * A test output field. + */ + @field(1) testOutputField: int32; + + /** + * A second test output field. + */ + @field(2) secondField: Qux; +} + +/** + * A test enum. + */ +enum Qux { + /** + * A test enum value. + */ + QUUX: 0, + + /** + * Another test enum value. + */ + CORGE: 1, +} diff --git a/packages/protobuf/test/scenarios/doc/output/@typespec/protobuf/com/azure/Test.proto b/packages/protobuf/test/scenarios/doc/output/@typespec/protobuf/com/azure/Test.proto new file mode 100644 index 0000000000..f6058ec0d8 --- /dev/null +++ b/packages/protobuf/test/scenarios/doc/output/@typespec/protobuf/com/azure/Test.proto @@ -0,0 +1,35 @@ +// Generated by Microsoft TypeSpec + +// A test package. +syntax = "proto3"; + +package com.azure.Test; + +// A test input message. +message Input { + string testInputField = 1; // A test input field. +} + +// A test enum. +enum Qux { + QUUX = 0; // A test enum value. + CORGE = 1; // Another test enum value. +} + +// A test output message. +message Output { + int32 testOutputField = 1; // A test output field. + Qux secondField = 2; // A second test output field. +} + +message BarRequest { + string barInputField = 1; // A test input field declared with 'param'. +} + +// A test service. +service Service { + // A test method. + rpc Foo(Input) returns (Output); + // Another test method. + rpc Bar(BarRequest) returns (Output); +} diff --git a/packages/protobuf/test/scenarios/empty/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/empty/output/@typespec/protobuf/main.proto index d0d99a4278..3edff85be8 100644 --- a/packages/protobuf/test/scenarios/empty/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/empty/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/enum/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/enum/output/@typespec/protobuf/main.proto index 9d8ae850a0..fa17395500 100644 --- a/packages/protobuf/test/scenarios/enum/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/enum/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/extern/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/extern/output/@typespec/protobuf/main.proto index 119d0339a8..52620d08ed 100644 --- a/packages/protobuf/test/scenarios/extern/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/extern/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/inferred-message-names/output/@typespec/protobuf/com/azure/test.proto b/packages/protobuf/test/scenarios/inferred-message-names/output/@typespec/protobuf/com/azure/test.proto index 6337433b26..65c01034f3 100644 --- a/packages/protobuf/test/scenarios/inferred-message-names/output/@typespec/protobuf/com/azure/test.proto +++ b/packages/protobuf/test/scenarios/inferred-message-names/output/@typespec/protobuf/com/azure/test.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/intrinsics/output/@typespec/protobuf/com/azure/Test.proto b/packages/protobuf/test/scenarios/intrinsics/output/@typespec/protobuf/com/azure/Test.proto index 292c1a0620..a2c2499473 100644 --- a/packages/protobuf/test/scenarios/intrinsics/output/@typespec/protobuf/com/azure/Test.proto +++ b/packages/protobuf/test/scenarios/intrinsics/output/@typespec/protobuf/com/azure/Test.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/map/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/map/output/@typespec/protobuf/main.proto index 6907839def..73bf127b03 100644 --- a/packages/protobuf/test/scenarios/map/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/map/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/name-collision/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/name-collision/output/@typespec/protobuf/main.proto index bd7a640d09..5a5de71fd6 100644 --- a/packages/protobuf/test/scenarios/name-collision/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/name-collision/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/omit-off/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/omit-off/output/@typespec/protobuf/main.proto index 46d107ab76..ee2215d488 100644 --- a/packages/protobuf/test/scenarios/omit-off/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/omit-off/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/omit/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/omit/output/@typespec/protobuf/main.proto index 1bb6162ecc..7907cea0f2 100644 --- a/packages/protobuf/test/scenarios/omit/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/omit/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/options/output/@typespec/protobuf/com/azure/Test.proto b/packages/protobuf/test/scenarios/options/output/@typespec/protobuf/com/azure/Test.proto index f5457833f2..2f7e68a7ca 100644 --- a/packages/protobuf/test/scenarios/options/output/@typespec/protobuf/com/azure/Test.proto +++ b/packages/protobuf/test/scenarios/options/output/@typespec/protobuf/com/azure/Test.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/reserved fields/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/reserved fields/output/@typespec/protobuf/main.proto index 478af2f97c..4452d9ca16 100644 --- a/packages/protobuf/test/scenarios/reserved fields/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/reserved fields/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/simple-no-service/output/@typespec/protobuf/com/azure/Test.proto b/packages/protobuf/test/scenarios/simple-no-service/output/@typespec/protobuf/com/azure/Test.proto index 4606b3c9ba..ce4b913023 100644 --- a/packages/protobuf/test/scenarios/simple-no-service/output/@typespec/protobuf/com/azure/Test.proto +++ b/packages/protobuf/test/scenarios/simple-no-service/output/@typespec/protobuf/com/azure/Test.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/simple/output/@typespec/protobuf/com/azure/Test.proto b/packages/protobuf/test/scenarios/simple/output/@typespec/protobuf/com/azure/Test.proto index 32114a3b14..ab65259c52 100644 --- a/packages/protobuf/test/scenarios/simple/output/@typespec/protobuf/com/azure/Test.proto +++ b/packages/protobuf/test/scenarios/simple/output/@typespec/protobuf/com/azure/Test.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/protobuf/test/scenarios/streams/output/@typespec/protobuf/main.proto b/packages/protobuf/test/scenarios/streams/output/@typespec/protobuf/main.proto index 31181e2591..0b987c4c3d 100644 --- a/packages/protobuf/test/scenarios/streams/output/@typespec/protobuf/main.proto +++ b/packages/protobuf/test/scenarios/streams/output/@typespec/protobuf/main.proto @@ -1,4 +1,4 @@ -/* Generated by Microsoft TypeSpec */ +// Generated by Microsoft TypeSpec syntax = "proto3"; diff --git a/packages/rest/src/resource.ts b/packages/rest/src/resource.ts index 7372bbfd63..343d41f01c 100644 --- a/packages/rest/src/resource.ts +++ b/packages/rest/src/resource.ts @@ -63,6 +63,16 @@ export function getResourceTypeKey(program: Program, resourceType: Model): Resou } }); + // if still no key, search the base model + if (resourceKey === undefined && resourceType.baseModel !== undefined) { + resourceKey = getResourceTypeKey(program, resourceType.baseModel); + + if (resourceKey !== undefined) { + // Cache the key for future queries + setResourceTypeKey(program, resourceType, resourceKey.keyProperty); + } + } + return resourceKey; } diff --git a/packages/rest/test/resource.test.ts b/packages/rest/test/resource.test.ts index c5aa9e235e..e2e3fa4746 100644 --- a/packages/rest/test/resource.test.ts +++ b/packages/rest/test/resource.test.ts @@ -21,6 +21,28 @@ describe("rest: resources", () => { }); }); + it("getResourceTypeKey works for base classes", async () => { + const runner = await createRestTestRunner(); + const { Thing } = (await runner.compile(` + + model BaseThing { + @key + id: string; + } + + @test + @resource("things") + model Thing extends BaseThing { + extra: string; + } + `)) as { Thing: Model }; + + // Check the key property to ensure the segment got added + const key = getResourceTypeKey(runner.program, Thing); + ok(key, "No key property found."); + strictEqual(getSegment(runner.program, key.keyProperty), "things"); + }); + it("@resource decorator applies @segment decorator on the @key property", async () => { const runner = await createRestTestRunner(); const { Thing } = (await runner.compile(` diff --git a/packages/samples/src/sample-snapshot-testing.ts b/packages/samples/src/sample-snapshot-testing.ts index 352567bafe..aff140112b 100644 --- a/packages/samples/src/sample-snapshot-testing.ts +++ b/packages/samples/src/sample-snapshot-testing.ts @@ -95,6 +95,7 @@ function defineSampleSnaphotTest( overrides.emit = config.emit; } const [options, diagnostics] = await resolveCompilerOptions(host, { + cwd: process.cwd(), entrypoint: sample.fullPath, overrides, }); diff --git a/packages/samples/test/output/visibility/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/visibility/@typespec/openapi3/openapi.yaml index e603ebba1f..464f8a85ca 100644 --- a/packages/samples/test/output/visibility/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/visibility/@typespec/openapi3/openapi.yaml @@ -81,13 +81,13 @@ paths: type: string - name: fieldMask in: query - style: form - explode: true required: true schema: type: array items: type: string + style: form + explode: true responses: '200': description: The request has succeeded. diff --git a/packages/tspd/package.json b/packages/tspd/package.json index 7f9645623c..fd9eef72fc 100644 --- a/packages/tspd/package.json +++ b/packages/tspd/package.json @@ -73,7 +73,7 @@ "mocha": "~10.2.0", "source-map-support": "~0.5.21", "rimraf": "~5.0.1", - "typedoc-plugin-markdown": "~4.0.0-next.20", + "typedoc-plugin-markdown": "~4.0.0-next.22", "typedoc": "~0.25.1", "typescript": "~5.2.2" } diff --git a/packages/tspd/src/ref-doc/api-docs.ts b/packages/tspd/src/ref-doc/api-docs.ts index 48d0a5a0ba..8dd4372d19 100644 --- a/packages/tspd/src/ref-doc/api-docs.ts +++ b/packages/tspd/src/ref-doc/api-docs.ts @@ -7,6 +7,7 @@ export async function generateJsApiDocs(libraryPath: string, outputDir: string) const markdownPluginOptions: Partial = { entryFileName: "index.md", propertiesFormat: "table", + parametersFormat: "table", enumMembersFormat: "table", typeDeclarationFormat: "table", hidePageTitle: true, @@ -14,10 +15,7 @@ export async function generateJsApiDocs(libraryPath: string, outputDir: string) titleTemplate: "{name}", hideInPageTOC: true, hidePageHeader: true, - - tocFormat: "list", - flattenOutputFiles: true, - identifiersAsCodeBlocks: true, + useCodeBlocks: true, }; const app = await Application.bootstrapWithPlugins({ diff --git a/packages/tspd/src/ref-doc/emitters/docusaurus.ts b/packages/tspd/src/ref-doc/emitters/docusaurus.ts index 5e90757114..92784d0503 100644 --- a/packages/tspd/src/ref-doc/emitters/docusaurus.ts +++ b/packages/tspd/src/ref-doc/emitters/docusaurus.ts @@ -159,13 +159,22 @@ function renderInterfacesFile( return renderMarkdowDoc(content); } -function renderDataTypes(renderer: DocusaurusRenderer, refDoc: TypeSpecRefDoc): string | undefined { +export type DataTypeRenderOptions = { + title?: string; +}; + +export function renderDataTypes( + renderer: DocusaurusRenderer, + refDoc: TypeSpecRefDoc, + options?: DataTypeRenderOptions +): string | undefined { if (!refDoc.namespaces.some((x) => x.models.length > 0)) { return undefined; } + const title = options?.title ?? "Data types"; const content: MarkdownDoc = [ "---", - `title: "Data types"`, + `title: "${title}"`, "toc_min_heading_level: 2", "toc_max_heading_level: 3", "---", diff --git a/packages/versioning/src/lib.ts b/packages/versioning/src/lib.ts index dabd904cec..8d2a6628d1 100644 --- a/packages/versioning/src/lib.ts +++ b/packages/versioning/src/lib.ts @@ -89,6 +89,12 @@ const libDef = { default: paramMessage`Property '${"name"}' marked with @madeOptional but is required. Should be '${"name"}?'`, }, }, + "renamed-duplicate-property": { + severity: "error", + messages: { + default: paramMessage`Property '${"name"}' marked with '@renamedFrom' conflicts with existing property in version ${"version"}.`, + }, + }, }, } as const; export const { reportDiagnostic, createStateSymbol } = createTypeSpecLibrary(libDef); diff --git a/packages/versioning/src/validate.ts b/packages/versioning/src/validate.ts index 13e39fc792..eb79e45db0 100644 --- a/packages/versioning/src/validate.ts +++ b/packages/versioning/src/validate.ts @@ -16,6 +16,7 @@ import { findVersionedNamespace, getAvailabilityMap, getMadeOptionalOn, + getRenamedFrom, getReturnTypeChangedFrom, getTypeChangedFrom, getUseDependencies, @@ -65,6 +66,7 @@ export function $onValidate(program: Program) { // Validate model property type is correct when madeOptional validateMadeOptional(program, prop); } + validateVersionedPropertyNames(program, model); }, union: (union) => { // If this is an instantiated type we don't want to keep the mapping. @@ -77,6 +79,7 @@ export function $onValidate(program: Program) { for (const variant of union.variants.values()) { addDependency(union.namespace, variant.type); } + validateVersionedPropertyNames(program, union); }, operation: (op) => { // If this is an instantiated type we don't want to keep the mapping. @@ -148,6 +151,8 @@ export function $onValidate(program: Program) { } }, enum: (en) => { + validateVersionedPropertyNames(program, en); + // construct the list of tuples in the old format if version // information is placed in the Version enum members const useDependencies = getUseDependencies(program, en); @@ -205,6 +210,72 @@ function validateMultiTypeReference(program: Program, source: Type) { } } +/** + * Constructs a map of version to name for the the source. + */ +function getVersionedNameMap( + program: Program, + source: Type +): Map | undefined { + const allVersions = getAllVersions(program, source); + if (allVersions === undefined) return undefined; + + const map: Map = new Map(allVersions.map((v) => [v, undefined])); + const availMap = getAvailabilityMap(program, source); + const alwaysAvail = availMap === undefined; + + // Populate the map with any RenamedFrom data, which may have holes. + // We will fill these holes in a later pass. + const renamedFrom = getRenamedFrom(program, source); + if (renamedFrom !== undefined) { + for (const rename of renamedFrom) { + const version = rename.version; + const oldName = rename.oldName; + const versionIndex = allVersions.indexOf(version); + if (versionIndex !== -1) { + map.set(allVersions[versionIndex - 1], oldName); + } + } + } + let lastName: string | undefined = undefined; + switch (source.kind) { + case "ModelProperty": + lastName = source.name; + break; + case "UnionVariant": + if (typeof source.name === "string") { + lastName = source.name; + } + break; + case "EnumMember": + lastName = source.name; + break; + default: + throw new Error(`Not implemented '${source.kind}'.`); + } + for (const version of allVersions.reverse()) { + const isAvail = + alwaysAvail || + [Availability.Added, Availability.Available].includes(availMap.get(version.name)!); + + // If property is unavailable in this version, it can't have a type + if (!isAvail) { + map.set(version, undefined); + continue; + } + + // Working backwards, we fill in any holes from the last type we encountered. Since we expect + // to encounter a hole at the start, we use the raw property type + const mapType = map.get(version); + if (mapType !== undefined) { + lastName = mapType; + } else { + map.set(version, lastName); + } + } + return map; +} + /** * Constructs a map of version to type for the the source. */ @@ -304,6 +375,54 @@ function validateVersionedNamespaceUsage( } } +function validateVersionedPropertyNames(program: Program, source: Type) { + const allVersions = getAllVersions(program, source); + if (allVersions === undefined) return; + + const versionedNameMap = new Map(allVersions.map((v) => [v, []])); + + let values: Iterable = []; + if (source.kind === "Model") { + values = source.properties.values(); + } else if (source.kind === "Enum") { + values = source.members.values(); + } else if (source.kind === "Union") { + values = source.variants.values(); + } + for (const value of values) { + const nameMap = getVersionedNameMap(program, value); + if (nameMap === undefined) continue; + for (const [version, name] of nameMap) { + if (name === undefined) continue; + versionedNameMap.get(version)?.push(name); + } + } + + // for each version, ensure there are no duplicate property names + for (const [version, names] of versionedNameMap.entries()) { + // create a map with names to count of occurrences + const nameCounts = new Map(); + for (const name of names) { + const count = nameCounts.get(name) ?? 0; + nameCounts.set(name, count + 1); + } + // emit diagnostic for each duplicate name + for (const [name, count] of nameCounts.entries()) { + if (name === undefined) continue; + if (count > 1) { + reportDiagnostic(program, { + code: "renamed-duplicate-property", + format: { + name: name, + version: prettyVersion(version), + }, + target: source, + }); + } + } + } +} + function isSubNamespace(parent: Namespace, child: Namespace): boolean { let current: Namespace | undefined = child; diff --git a/packages/versioning/src/versioning.ts b/packages/versioning/src/versioning.ts index 3d4c04af40..8ebf12a27a 100644 --- a/packages/versioning/src/versioning.ts +++ b/packages/versioning/src/versioning.ts @@ -179,7 +179,10 @@ export function $madeOptional(context: DecoratorContext, t: ModelProperty, v: En program.stateMap(madeOptionalKey).set(t, version); } -function getRenamedFrom(p: Program, t: Type): Array | undefined { +/** + * @returns the array of RenamedFrom metadata if applicable. + */ +export function getRenamedFrom(p: Program, t: Type): Array | undefined { return p.stateMap(renamedFromKey).get(t) as Array; } diff --git a/packages/versioning/test/versioning.test.ts b/packages/versioning/test/versioning.test.ts index a3a5552101..d2c1a06a19 100644 --- a/packages/versioning/test/versioning.test.ts +++ b/packages/versioning/test/versioning.test.ts @@ -11,7 +11,7 @@ import { Type, Union, } from "@typespec/compiler"; -import { BasicTestRunner, createTestWrapper } from "@typespec/compiler/testing"; +import { BasicTestRunner, createTestWrapper, expectDiagnostics } from "@typespec/compiler/testing"; import { fail, ok, strictEqual } from "assert"; import { Version } from "../src/types.js"; import { VersioningTimeline } from "../src/versioning-timeline.js"; @@ -330,6 +330,36 @@ describe("versioning: logic", () => { ); }); + it("emits diagnostic when renaming causes duplicates", async () => { + const code = ` + @versioned(Versions) + @service({ + title: "Widget Service", + }) + namespace DemoService; + + enum Versions { + "v1", + "v2", + "v3", + } + + model Test { + @key id: string; + weight: int32; + @renamedFrom(Versions.v3, "color") shade: string; + @added(Versions.v2) + color: string; + } + `; + const diagnostics = await runner.diagnose(code); + expectDiagnostics(diagnostics, { + code: "@typespec/versioning/renamed-duplicate-property", + message: + "Property 'color' marked with '@renamedFrom' conflicts with existing property in version v2.", + }); + }); + it("can be added/removed multiple times", async () => { const { source, @@ -470,6 +500,7 @@ describe("versioning: logic", () => { source ); }); + it("can be added", async () => { const { projections: [v1, v2], @@ -667,6 +698,32 @@ describe("versioning: logic", () => { assertHasVariants(v5, ["d"]); }); + it("emits diagnostic when renaming causes duplicates", async () => { + const code = ` + @versioned(Versions) + @service({ + title: "Widget Service", + }) + namespace DemoService; + + enum Versions { + "v1", + "v2", + } + + union BadUnion { + color: string, + @renamedFrom(Versions.v2, "color") shade: string; + } + `; + const diagnostics = await runner.diagnose(code); + expectDiagnostics(diagnostics, { + code: "@typespec/versioning/renamed-duplicate-property", + message: + "Property 'color' marked with '@renamedFrom' conflicts with existing property in version v1.", + }); + }); + it("can be added/removed multiple times", async () => { const { projections: [v1, v2, v3, v4, v5, v6], @@ -1597,6 +1654,32 @@ describe("versioning: logic", () => { assertHasMembers(v5, ["d"]); }); + it("emits diagnostic when renaming causes duplicates", async () => { + const code = ` + @versioned(Versions) + @service({ + title: "Widget Service", + }) + namespace DemoService; + + enum Versions { + "v1", + "v2", + } + + enum BadEnum { + color, + @renamedFrom(Versions.v2, "color") shade; + } + `; + const diagnostics = await runner.diagnose(code); + expectDiagnostics(diagnostics, { + code: "@typespec/versioning/renamed-duplicate-property", + message: + "Property 'color' marked with '@renamedFrom' conflicts with existing property in version v1.", + }); + }); + it("can be added/removed multiple times", async () => { const { projections: [v1, v2, v3, v4, v5, v6], diff --git a/packages/website/.scripts/regen-compiler-docs.mjs b/packages/website/.scripts/regen-compiler-docs.mjs index da47d068fd..8d051d898e 100644 --- a/packages/website/.scripts/regen-compiler-docs.mjs +++ b/packages/website/.scripts/regen-compiler-docs.mjs @@ -4,6 +4,7 @@ import { NodeHost, joinPaths, logDiagnostics } from "@typespec/compiler"; import { generateJsApiDocs, resolveLibraryRefDocsBase } from "@typespec/tspd/ref-doc"; import { DocusaurusRenderer, + renderDataTypes, renderDecoratorFile, } from "@typespec/tspd/ref-doc/emitters/docusaurus"; @@ -44,6 +45,9 @@ async function generateCompilerDocs() { const decoratorContent = renderDecoratorFile(renderer, refDoc, { title: "Built-in Decorators" }); assert(decoratorContent, "Unexpected decorator file shouldn't be empty for compiler."); await writeFile(join(outputDir, "built-in-decorators.md"), decoratorContent); + const dataTypeContent = renderDataTypes(renderer, refDoc, { title: "Built-in Data types" }); + assert(dataTypeContent, "Unexpected data type file shouldn't be empty for compiler."); + await writeFile(join(outputDir, "built-in-data-types.md"), dataTypeContent); await generateJsApiDocs(joinPaths(compilerPath), join(outputDir, "reference/js-api")); return diagnostics; diff --git a/packages/website/docusaurus.config.js b/packages/website/docusaurus.config.js index b1539c3ac6..c0530bd192 100644 --- a/packages/website/docusaurus.config.js +++ b/packages/website/docusaurus.config.js @@ -87,6 +87,28 @@ const config = { resolve(__dirname, "./node_modules/@typespec/spec/dist"), ], + webpack: { + jsLoader: (isServer) => ({ + loader: require.resolve("swc-loader"), + options: { + jsc: { + parser: { + syntax: "typescript", + tsx: true, + }, + target: "es2019", + transform: { + react: { + runtime: "automatic", + }, + }, + }, + module: { + type: isServer ? "commonjs" : "es6", + }, + }, + }), + }, themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ diff --git a/packages/website/package.json b/packages/website/package.json index c90e4d6f8d..631798bc54 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -34,6 +34,7 @@ "@fluentui/react-components": "~9.32.1" }, "devDependencies": { + "@swc/core": "^1.3.62", "@typespec/compiler": "workspace:~0.48.1", "@typespec/tspd": "workspace:~0.46.0", "@typespec/spec": "workspace:*", @@ -56,7 +57,8 @@ "@typespec/eslint-config-typespec": "workspace:~0.48.0", "eslint": "^8.49.0", "rimraf": "~5.0.1", - "dotenv": "~16.3.1" + "dotenv": "~16.3.1", + "swc-loader": "^0.2.3" }, "browserslist": { "production": [ diff --git a/packages/website/sidebars.js b/packages/website/sidebars.js index 26eaa1fdc0..6665fa80ab 100644 --- a/packages/website/sidebars.js +++ b/packages/website/sidebars.js @@ -54,7 +54,11 @@ const sidebars = { { type: "category", label: "Getting Started", - items: ["getting-started/getting-started", "getting-started/typespec-for-openapi-dev"], + items: [ + "getting-started/getting-started", + "getting-started/getting-started-http", + "getting-started/typespec-for-openapi-dev", + ], }, { type: "category", diff --git a/rush.json b/rush.json index f30bbfa40d..ebe8974062 100644 --- a/rush.json +++ b/rush.json @@ -4,16 +4,9 @@ */ { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", - "rushVersion": "5.100.1", + "rushVersion": "5.108.0", "pnpmVersion": "8.6.12", "ensureConsistentVersions": true, - /** - * Options that are only used when the PNPM package manager is selected - */ - "pnpmOptions": { - "strictPeerDependencies": false, - "useWorkspaces": true - }, "nodeSupportedVersionRange": ">=16.0.0", "suppressNodeLtsWarning": true, "projectFolderMinDepth": 1, @@ -173,7 +166,7 @@ "packageName": "@typespec/playground", "projectFolder": "packages/playground", "reviewCategory": "production", - "shouldPublish": false + "versionPolicyName": "playground" }, { "packageName": "@typespec/playground-website", @@ -191,7 +184,7 @@ "packageName": "@typespec/bundler", "projectFolder": "packages/bundler", "reviewCategory": "production", - "shouldPublish": false + "versionPolicyName": "playground" }, { "packageName": "@typespec/protobuf",