@azure-tools/typespec-ts 0.56.0-dev.9 → 0.56.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/README.md +31 -15
- package/dist/src/context-manager.d.ts +23 -6
- package/dist/src/context-manager.d.ts.map +1 -1
- package/dist/src/context-manager.js +22 -0
- package/dist/src/context-manager.js.map +1 -1
- package/dist/src/framework/declaration.d.ts +1 -1
- package/dist/src/framework/declaration.d.ts.map +1 -1
- package/dist/src/framework/declaration.js +2 -1
- package/dist/src/framework/declaration.js.map +1 -1
- package/dist/src/framework/hooks/binder.d.ts +2 -5
- package/dist/src/framework/hooks/binder.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.js +2 -29
- package/dist/src/framework/hooks/binder.js.map +1 -1
- package/dist/src/framework/hooks/sdk-types.d.ts +12 -3
- package/dist/src/framework/hooks/sdk-types.d.ts.map +1 -1
- package/dist/src/framework/hooks/sdk-types.js +13 -0
- package/dist/src/framework/hooks/sdk-types.js.map +1 -1
- package/dist/src/framework/hooks/use-dependencies.d.ts +1 -1
- package/dist/src/framework/hooks/use-dependencies.d.ts.map +1 -1
- package/dist/src/framework/load-static-helpers.d.ts +2 -2
- package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
- package/dist/src/framework/load-static-helpers.js +1 -13
- package/dist/src/framework/load-static-helpers.js.map +1 -1
- package/dist/src/framework/reference.js.map +1 -1
- package/dist/src/framework/source-file-batch.d.ts +1 -1
- package/dist/src/framework/source-file-batch.d.ts.map +1 -1
- package/dist/src/framework/source-file-batch.js +1 -1
- package/dist/src/framework/source-file-batch.js.map +1 -1
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +24 -19
- package/dist/src/index.js.map +1 -1
- package/dist/src/interfaces.d.ts +0 -1
- package/dist/src/interfaces.d.ts.map +1 -1
- package/dist/src/lib.d.ts +18 -4
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +22 -6
- package/dist/src/lib.js.map +1 -1
- package/dist/src/meta-tree.d.ts +2 -2
- package/dist/src/meta-tree.d.ts.map +1 -1
- package/dist/src/metadata/build-api-extractor-config.d.ts +1 -1
- package/dist/src/metadata/build-api-extractor-config.d.ts.map +1 -1
- package/dist/src/metadata/build-changelog-file.d.ts +1 -1
- package/dist/src/metadata/build-changelog-file.d.ts.map +1 -1
- package/dist/src/metadata/build-es-lint-config.d.ts +1 -1
- package/dist/src/metadata/build-es-lint-config.d.ts.map +1 -1
- package/dist/src/metadata/build-package-file.d.ts +3 -5
- package/dist/src/metadata/build-package-file.d.ts.map +1 -1
- package/dist/src/metadata/build-package-file.js +10 -45
- package/dist/src/metadata/build-package-file.js.map +1 -1
- package/dist/src/metadata/build-readme-file.d.ts +1 -1
- package/dist/src/metadata/build-readme-file.d.ts.map +1 -1
- package/dist/src/metadata/build-readme-file.js +3 -3
- package/dist/src/metadata/build-readme-file.js.map +1 -1
- package/dist/src/metadata/build-sample-env-file.d.ts +1 -1
- package/dist/src/metadata/build-sample-env-file.d.ts.map +1 -1
- package/dist/src/metadata/build-test-config.d.ts +1 -1
- package/dist/src/metadata/build-test-config.d.ts.map +1 -1
- package/dist/src/metadata/build-ts-config.d.ts +11 -5
- package/dist/src/metadata/build-ts-config.d.ts.map +1 -1
- package/dist/src/metadata/build-ts-config.js +36 -8
- package/dist/src/metadata/build-ts-config.js.map +1 -1
- package/dist/src/metadata/build-vitest-config.d.ts +1 -1
- package/dist/src/metadata/build-vitest-config.d.ts.map +1 -1
- package/dist/src/metadata/build-warp-config.d.ts +1 -3
- package/dist/src/metadata/build-warp-config.d.ts.map +1 -1
- package/dist/src/metadata/build-warp-config.js +0 -2
- package/dist/src/metadata/build-warp-config.js.map +1 -1
- package/dist/src/metadata/package-json/azure-package-common.d.ts +1 -1
- package/dist/src/metadata/package-json/azure-package-common.d.ts.map +1 -1
- package/dist/src/metadata/package-json/build-azure-monorepo-package.d.ts +1 -2
- package/dist/src/metadata/package-json/build-azure-monorepo-package.d.ts.map +1 -1
- package/dist/src/metadata/package-json/build-azure-monorepo-package.js +2 -16
- package/dist/src/metadata/package-json/build-azure-monorepo-package.js.map +1 -1
- package/dist/src/metadata/package-json/package-common.d.ts.map +1 -1
- package/dist/src/metadata/package-json/package-common.js +0 -15
- package/dist/src/metadata/package-json/package-common.js.map +1 -1
- package/dist/src/metadata/test/build-recorded-client.d.ts +1 -1
- package/dist/src/metadata/test/build-recorded-client.d.ts.map +1 -1
- package/dist/src/metadata/test/build-sample-test.d.ts +1 -1
- package/dist/src/metadata/test/build-sample-test.d.ts.map +1 -1
- package/dist/src/metadata/test/build-snippets.d.ts +1 -1
- package/dist/src/metadata/test/build-snippets.d.ts.map +1 -1
- package/dist/src/metadata/utils.d.ts +1 -1
- package/dist/src/metadata/utils.d.ts.map +1 -1
- package/dist/src/modular/build-classical-client.d.ts +3 -3
- package/dist/src/modular/build-classical-client.d.ts.map +1 -1
- package/dist/src/modular/build-classical-client.js +3 -3
- package/dist/src/modular/build-classical-client.js.map +1 -1
- package/dist/src/modular/build-classical-operation-groups.d.ts +3 -3
- package/dist/src/modular/build-classical-operation-groups.d.ts.map +1 -1
- package/dist/src/modular/build-classical-operation-groups.js +1 -0
- package/dist/src/modular/build-classical-operation-groups.js.map +1 -1
- package/dist/src/modular/build-client-context.d.ts +3 -3
- package/dist/src/modular/build-client-context.d.ts.map +1 -1
- package/dist/src/modular/build-client-context.js +1 -0
- package/dist/src/modular/build-client-context.js.map +1 -1
- package/dist/src/modular/build-modular-options.d.ts +2 -2
- package/dist/src/modular/build-modular-options.d.ts.map +1 -1
- package/dist/src/modular/build-operations.d.ts +5 -5
- package/dist/src/modular/build-operations.d.ts.map +1 -1
- package/dist/src/modular/build-operations.js +7 -4
- package/dist/src/modular/build-operations.js.map +1 -1
- package/dist/src/modular/build-project-files.d.ts +2 -2
- package/dist/src/modular/build-project-files.d.ts.map +1 -1
- package/dist/src/modular/build-restore-poller.d.ts +3 -3
- package/dist/src/modular/build-restore-poller.d.ts.map +1 -1
- package/dist/src/modular/build-restore-poller.js +1 -0
- package/dist/src/modular/build-restore-poller.js.map +1 -1
- package/dist/src/modular/build-root-index.d.ts +3 -3
- package/dist/src/modular/build-root-index.d.ts.map +1 -1
- package/dist/src/modular/build-root-index.js +4 -3
- package/dist/src/modular/build-root-index.js.map +1 -1
- package/dist/src/modular/build-subpath-index.d.ts +2 -2
- package/dist/src/modular/build-subpath-index.d.ts.map +1 -1
- package/dist/src/modular/build-subpath-index.js +1 -1
- package/dist/src/modular/build-subpath-index.js.map +1 -1
- package/dist/src/modular/emit-logger-file.d.ts +1 -1
- package/dist/src/modular/emit-logger-file.d.ts.map +1 -1
- package/dist/src/modular/emit-models-options.d.ts +3 -3
- package/dist/src/modular/emit-models-options.d.ts.map +1 -1
- package/dist/src/modular/emit-models-options.js.map +1 -1
- package/dist/src/modular/emit-models.d.ts +3 -3
- package/dist/src/modular/emit-models.d.ts.map +1 -1
- package/dist/src/modular/emit-models.js +1 -1
- package/dist/src/modular/emit-models.js.map +1 -1
- package/dist/src/modular/emit-samples.d.ts +1 -1
- package/dist/src/modular/emit-samples.d.ts.map +1 -1
- package/dist/src/modular/emit-samples.js +1 -1
- package/dist/src/modular/emit-samples.js.map +1 -1
- package/dist/src/modular/emit-tests.d.ts +1 -1
- package/dist/src/modular/emit-tests.d.ts.map +1 -1
- package/dist/src/modular/emit-tests.js +1 -0
- package/dist/src/modular/emit-tests.js.map +1 -1
- package/dist/src/modular/external-dependencies.d.ts +1 -1
- package/dist/src/modular/external-dependencies.d.ts.map +1 -1
- package/dist/src/modular/external-dependencies.js +10 -0
- package/dist/src/modular/external-dependencies.js.map +1 -1
- package/dist/src/modular/helpers/classical-operation-helpers.d.ts +3 -3
- package/dist/src/modular/helpers/classical-operation-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/classical-operation-helpers.js +1 -1
- package/dist/src/modular/helpers/classical-operation-helpers.js.map +1 -1
- package/dist/src/modular/helpers/client-helpers.d.ts +11 -6
- package/dist/src/modular/helpers/client-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/client-helpers.js +38 -17
- package/dist/src/modular/helpers/client-helpers.js.map +1 -1
- package/dist/src/modular/helpers/client-option-helpers.d.ts +1 -1
- package/dist/src/modular/helpers/client-option-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/example-value-helpers.d.ts +3 -3
- package/dist/src/modular/helpers/example-value-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/example-value-helpers.js +1 -0
- package/dist/src/modular/helpers/example-value-helpers.js.map +1 -1
- package/dist/src/modular/helpers/naming-helpers.d.ts +7 -4
- package/dist/src/modular/helpers/naming-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/naming-helpers.js +44 -5
- package/dist/src/modular/helpers/naming-helpers.js.map +1 -1
- package/dist/src/modular/helpers/operation-helpers.d.ts +7 -7
- package/dist/src/modular/helpers/operation-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operation-helpers.js +32 -30
- package/dist/src/modular/helpers/operation-helpers.js.map +1 -1
- package/dist/src/modular/helpers/type-helpers.d.ts +3 -3
- package/dist/src/modular/helpers/type-helpers.d.ts.map +1 -1
- package/dist/src/modular/interfaces.d.ts +1 -1
- package/dist/src/modular/interfaces.d.ts.map +1 -1
- package/dist/src/modular/serialization/build-deserializer-function.d.ts +4 -4
- package/dist/src/modular/serialization/build-deserializer-function.d.ts.map +1 -1
- package/dist/src/modular/serialization/build-deserializer-function.js.map +1 -1
- package/dist/src/modular/serialization/build-serializer-function.d.ts +4 -4
- package/dist/src/modular/serialization/build-serializer-function.d.ts.map +1 -1
- package/dist/src/modular/serialization/build-serializer-function.js.map +1 -1
- package/dist/src/modular/serialization/build-xml-serializer-function.d.ts +4 -4
- package/dist/src/modular/serialization/build-xml-serializer-function.d.ts.map +1 -1
- package/dist/src/modular/serialization/build-xml-serializer-function.js.map +1 -1
- package/dist/src/modular/serialization/serialize-utils.d.ts +1 -1
- package/dist/src/modular/serialization/serialize-utils.d.ts.map +1 -1
- package/dist/src/modular/static-helpers-metadata.d.ts +0 -12
- package/dist/src/modular/static-helpers-metadata.d.ts.map +1 -1
- package/dist/src/modular/static-helpers-metadata.js +0 -12
- package/dist/src/modular/static-helpers-metadata.js.map +1 -1
- package/dist/src/modular/type-expressions/get-credential-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-credential-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.d.ts +3 -3
- package/dist/src/modular/type-expressions/get-enum-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-model-expression.d.ts +3 -3
- package/dist/src/modular/type-expressions/get-model-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.d.ts +3 -3
- package/dist/src/modular/type-expressions/get-nullable-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.d.ts +2 -2
- package/dist/src/modular/type-expressions/get-type-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.d.ts +3 -3
- package/dist/src/modular/type-expressions/get-union-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/utils.d.ts +1 -1
- package/dist/src/modular/type-expressions/utils.d.ts.map +1 -1
- package/dist/src/transform/transform-api-version-info.d.ts +3 -3
- package/dist/src/transform/transform-api-version-info.d.ts.map +1 -1
- package/dist/src/transform/transform-api-version-info.js +1 -1
- package/dist/src/transform/transform-api-version-info.js.map +1 -1
- package/dist/src/transform/transform-client-options.d.ts +4 -4
- package/dist/src/transform/transform-client-options.d.ts.map +1 -1
- package/dist/src/transform/transform-client-options.js +1 -3
- package/dist/src/transform/transform-client-options.js.map +1 -1
- package/dist/src/transform/transform-helper-function-details.d.ts +3 -3
- package/dist/src/transform/transform-helper-function-details.d.ts.map +1 -1
- package/dist/src/transform/transform-helper-function-details.js +1 -1
- package/dist/src/transform/transform-helper-function-details.js.map +1 -1
- package/dist/src/transform/transform-parameters.d.ts +4 -4
- package/dist/src/transform/transform-parameters.d.ts.map +1 -1
- package/dist/src/transform/transform-parameters.js.map +1 -1
- package/dist/src/transform/transform-paths.d.ts +3 -3
- package/dist/src/transform/transform-paths.d.ts.map +1 -1
- package/dist/src/transform/transform-paths.js +1 -1
- package/dist/src/transform/transform-paths.js.map +1 -1
- package/dist/src/transform/transform-responses.d.ts +3 -3
- package/dist/src/transform/transform-responses.d.ts.map +1 -1
- package/dist/src/transform/transform-responses.js +1 -1
- package/dist/src/transform/transform-responses.js.map +1 -1
- package/dist/src/transform/transform-schemas.d.ts +2 -2
- package/dist/src/transform/transform-schemas.d.ts.map +1 -1
- package/dist/src/transform/transform-schemas.js +2 -2
- package/dist/src/transform/transform-schemas.js.map +1 -1
- package/dist/src/transform/transform-telemetry-info.d.ts +2 -2
- package/dist/src/transform/transform-telemetry-info.d.ts.map +1 -1
- package/dist/src/transform/transform.d.ts +3 -3
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/utils/api-version-util.d.ts +1 -1
- package/dist/src/utils/api-version-util.d.ts.map +1 -1
- package/dist/src/utils/client-utils.d.ts +4 -4
- package/dist/src/utils/client-utils.d.ts.map +1 -1
- package/dist/src/utils/credential-utils.d.ts +3 -3
- package/dist/src/utils/credential-utils.d.ts.map +1 -1
- package/dist/src/utils/credential-utils.js.map +1 -1
- package/dist/src/utils/cross-language-def.d.ts +1 -1
- package/dist/src/utils/cross-language-def.d.ts.map +1 -1
- package/dist/src/utils/emit-util.d.ts +2 -2
- package/dist/src/utils/emit-util.d.ts.map +1 -1
- package/dist/src/utils/emit-util.js +2 -2
- package/dist/src/utils/emit-util.js.map +1 -1
- package/dist/src/utils/file-system-utils.d.ts +1 -1
- package/dist/src/utils/file-system-utils.d.ts.map +1 -1
- package/dist/src/utils/file-system-utils.js.map +1 -1
- package/dist/src/utils/import-helper.js +1 -0
- package/dist/src/utils/import-helper.js.map +1 -1
- package/dist/src/utils/imports-util.d.ts +1 -1
- package/dist/src/utils/imports-util.d.ts.map +1 -1
- package/dist/src/utils/imports-util.js +2 -1
- package/dist/src/utils/imports-util.js.map +1 -1
- package/dist/src/utils/interfaces.d.ts +3 -3
- package/dist/src/utils/interfaces.d.ts.map +1 -1
- package/dist/src/utils/interfaces.js +2 -1
- package/dist/src/utils/interfaces.js.map +1 -1
- package/dist/src/utils/model-utils.d.ts +4 -4
- package/dist/src/utils/model-utils.d.ts.map +1 -1
- package/dist/src/utils/name-constructors.d.ts +1 -1
- package/dist/src/utils/name-constructors.d.ts.map +1 -1
- package/dist/src/utils/namespace-utils.d.ts +2 -2
- package/dist/src/utils/namespace-utils.d.ts.map +1 -1
- package/dist/src/utils/namespace-utils.js +1 -1
- package/dist/src/utils/namespace-utils.js.map +1 -1
- package/dist/src/utils/operation-helpers.d.ts +2 -2
- package/dist/src/utils/operation-helpers.d.ts.map +1 -1
- package/dist/src/utils/operation-helpers.js.map +1 -1
- package/dist/src/utils/operation-util.d.ts +5 -5
- package/dist/src/utils/operation-util.d.ts.map +1 -1
- package/dist/src/utils/operation-util.js +1 -1
- package/dist/src/utils/operation-util.js.map +1 -1
- package/dist/src/utils/parameter-utils.d.ts +3 -3
- package/dist/src/utils/parameter-utils.d.ts.map +1 -1
- package/dist/src/utils/parameter-utils.js.map +1 -1
- package/dist/src/utils/schema-helpers.d.ts +1 -1
- package/dist/src/utils/schema-helpers.d.ts.map +1 -1
- package/dist/src/utils/schema-helpers.js +1 -1
- package/dist/src/utils/schema-helpers.js.map +1 -1
- package/dist/src/utils/type-util.d.ts +1 -1
- package/dist/src/utils/type-util.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +41 -38
- package/src/context-manager.ts +29 -6
- package/src/framework/declaration.ts +7 -6
- package/src/framework/hooks/binder.ts +5 -33
- package/src/framework/hooks/sdk-types.ts +22 -8
- package/src/framework/hooks/use-dependencies.ts +1 -1
- package/src/framework/load-static-helpers.ts +3 -18
- package/src/framework/reference.ts +2 -2
- package/src/framework/sample.ts +2 -2
- package/src/framework/source-file-batch.ts +2 -2
- package/src/index.ts +34 -29
- package/src/interfaces.ts +0 -1
- package/src/lib.ts +43 -11
- package/src/meta-tree.ts +2 -2
- package/src/metadata/build-api-extractor-config.ts +1 -1
- package/src/metadata/build-changelog-file.ts +1 -1
- package/src/metadata/build-es-lint-config.ts +1 -1
- package/src/metadata/build-package-file.ts +11 -49
- package/src/metadata/build-readme-file.ts +4 -4
- package/src/metadata/build-sample-env-file.ts +1 -1
- package/src/metadata/build-test-config.ts +1 -1
- package/src/metadata/build-ts-config.ts +38 -9
- package/src/metadata/build-vitest-config.ts +1 -1
- package/src/metadata/build-warp-config.ts +1 -3
- package/src/metadata/package-json/azure-package-common.ts +1 -1
- package/src/metadata/package-json/build-azure-monorepo-package.ts +3 -20
- package/src/metadata/package-json/package-common.ts +0 -15
- package/src/metadata/test/build-recorded-client.ts +1 -1
- package/src/metadata/test/build-sample-test.ts +1 -1
- package/src/metadata/test/build-snippets.ts +1 -1
- package/src/metadata/utils.ts +1 -1
- package/src/modular/build-classical-client.ts +8 -12
- package/src/modular/build-classical-operation-groups.ts +6 -3
- package/src/modular/build-client-context.ts +3 -3
- package/src/modular/build-modular-options.ts +2 -2
- package/src/modular/build-operations.ts +12 -9
- package/src/modular/build-project-files.ts +2 -2
- package/src/modular/build-restore-poller.ts +6 -3
- package/src/modular/build-root-index.ts +9 -10
- package/src/modular/build-subpath-index.ts +5 -2
- package/src/modular/emit-logger-file.ts +1 -1
- package/src/modular/emit-models-options.ts +6 -3
- package/src/modular/emit-models.ts +23 -33
- package/src/modular/emit-samples.ts +11 -11
- package/src/modular/emit-tests.ts +3 -3
- package/src/modular/external-dependencies.ts +11 -1
- package/src/modular/helpers/classical-operation-helpers.ts +10 -7
- package/src/modular/helpers/client-helpers.ts +52 -32
- package/src/modular/helpers/client-option-helpers.ts +1 -1
- package/src/modular/helpers/example-value-helpers.ts +9 -9
- package/src/modular/helpers/naming-helpers.ts +55 -7
- package/src/modular/helpers/operation-helpers.ts +56 -54
- package/src/modular/helpers/type-helpers.ts +3 -3
- package/src/modular/interfaces.ts +1 -1
- package/src/modular/serialization/build-deserializer-function.ts +9 -9
- package/src/modular/serialization/build-serializer-function.ts +9 -9
- package/src/modular/serialization/build-xml-serializer-function.ts +7 -7
- package/src/modular/serialization/serialize-utils.ts +1 -1
- package/src/modular/static-helpers-metadata.ts +0 -13
- package/src/modular/type-expressions/get-credential-expression.ts +1 -1
- package/src/modular/type-expressions/get-enum-expression.ts +3 -3
- package/src/modular/type-expressions/get-model-expression.ts +3 -3
- package/src/modular/type-expressions/get-nullable-expression.ts +3 -3
- package/src/modular/type-expressions/get-type-expression.ts +2 -2
- package/src/modular/type-expressions/get-union-expression.ts +3 -3
- package/src/modular/type-expressions/utils.ts +1 -1
- package/src/transform/transform-api-version-info.ts +8 -3
- package/src/transform/transform-client-options.ts +5 -7
- package/src/transform/transform-helper-function-details.ts +6 -3
- package/src/transform/transform-parameters.ts +15 -11
- package/src/transform/transform-paths.ts +10 -4
- package/src/transform/transform-responses.ts +11 -8
- package/src/transform/transform-schemas.ts +7 -4
- package/src/transform/transform-telemetry-info.ts +3 -3
- package/src/transform/transform.ts +11 -11
- package/src/utils/api-version-util.ts +1 -1
- package/src/utils/client-utils.ts +8 -8
- package/src/utils/credential-utils.ts +3 -3
- package/src/utils/cross-language-def.ts +1 -1
- package/src/utils/emit-util.ts +9 -3
- package/src/utils/file-system-utils.ts +1 -1
- package/src/utils/imports-util.ts +2 -2
- package/src/utils/interfaces.ts +3 -3
- package/src/utils/model-utils.ts +23 -23
- package/src/utils/name-constructors.ts +1 -1
- package/src/utils/namespace-utils.ts +8 -2
- package/src/utils/operation-helpers.ts +11 -7
- package/src/utils/operation-util.ts +23 -16
- package/src/utils/parameter-utils.ts +4 -4
- package/src/utils/schema-helpers.ts +7 -1
- package/src/utils/type-util.ts +1 -1
- package/static/static-helpers/multipartHelpers.ts +2 -6
- package/static/static-helpers/platform-types-browser.mts +0 -5
- package/static/static-helpers/platform-types-react-native.mts +0 -5
- package/static/static-helpers/platform-types.ts +0 -7
- package/static/static-helpers/serialization/get-binary-stream-response-browser.mts +0 -22
- package/static/static-helpers/serialization/get-binary-stream-response-react-native.mts +0 -1
- package/static/static-helpers/serialization/get-binary-stream-response.ts +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Change Log - @azure-tools/typespec-ts
|
|
2
2
|
|
|
3
|
+
## 0.56.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#4891](https://github.com/Azure/typespec-azure/pull/4891) Add built-in support for Azure service groups as extension resource targets and ARM resource identifier scopes.
|
|
8
|
+
- [#5154](https://github.com/Azure/typespec-azure/pull/5154) Rename reserved-word operations (e.g. `delete`) that belong to an operation group by suffixing the singularized group name instead of emitting a `@fixme`. For example, `Conversations.delete` is now generated as `deleteConversation` rather than `$delete` with a fixme doc comment. Operations without an operation group continue to fall back to the previous guarded name and `@fixme` guidance.
|
|
9
|
+
|
|
10
|
+
An explicit `@clientName` override opts out of this renaming: when a reserved-word operation carries a `@clientName`, the emitter keeps the requested public method name (e.g. `delete`) and does not disambiguate it with the operation group or emit a `@fixme`. This provides a backwards-compatibility escape hatch for already-shipped libraries. The generated API-layer function stays guarded (`$delete`) because a reserved word is not a valid JavaScript function binding, while the public surface preserves the original name.
|
|
11
|
+
|
|
12
|
+
```tsp
|
|
13
|
+
@route("/conversations")
|
|
14
|
+
interface Conversations {
|
|
15
|
+
// Keep `delete` as the generated method name instead of `deleteConversation`.
|
|
16
|
+
@delete
|
|
17
|
+
@clientName("delete", "javascript")
|
|
18
|
+
delete(@path conversationName: string): void;
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- [#5038](https://github.com/Azure/typespec-azure/pull/5038) Add the license header to emitted `.mts`/`.mjs` files (e.g. the browser and react-native static helper variants such as `get-binary-stream-response-browser.mts`), which were previously skipped because the source-code detection only matched `.ts`/`.js` extensions.
|
|
25
|
+
- [#4872](https://github.com/Azure/typespec-azure/pull/4872) Fix multi-client package build failures by syncing the generated `config/tsconfig.src.*.json` `include` lists with the `warp.config.yml` exports, so every client entry point is compiled and emitted to `dist` (previously warp failed with `DIST_MISSING`).
|
|
26
|
+
- [#4585](https://github.com/Azure/typespec-azure/pull/4585) [typespec-ts] fix platform import issue for customization
|
|
27
|
+
- [#5162](https://github.com/Azure/typespec-azure/pull/5162) Restore blank lines between generated TypeScript declarations after batching ts-morph source-file mutations.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 0.55.2
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
- [#5096](https://github.com/Azure/typespec-azure/pull/5096) Fix multi-client package build failures by syncing the generated `config/tsconfig.src.*.json` `include` lists with the `warp.config.yml` exports, so every client entry point is compiled and emitted to `dist` (previously warp failed with `DIST_MISSING`).
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## 0.55.1
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
- [#4804](https://github.com/Azure/typespec-azure/pull/4804) Fix return type for operations with optional body response: use `void` instead of `undefined` in union return types (e.g. `Promise<KeyValue | void>` instead of `Promise<KeyValue | undefined>`)
|
|
42
|
+
- [#4817](https://github.com/Azure/typespec-azure/pull/4817) Simplify the generated SDK `User-Agent` telemetry prefix to follow the [Azure Core telemetry policy](https://azure.github.io/azure-sdk/general_azurecore.html#telemetry-policy). The legacy internal layering tokens `azsdk-js-client` and `azsdk-js-api` are no longer emitted, so the user agent is now `[<application_id> ]azsdk-js-<package>/<version> <platform_info>`. Any caller-supplied application id is still forwarded and prepended.
|
|
43
|
+
- [#4570](https://github.com/Azure/typespec-azure/pull/4570) Use the `catalog:` pnpm workspace specifier for the `tslib` dependency when generating `package.json` for the azure-sdk-for-js monorepo.
|
|
44
|
+
|
|
45
|
+
|
|
3
46
|
## 0.55.0
|
|
4
47
|
|
|
5
48
|
### Breaking Changes
|
package/README.md
CHANGED
|
@@ -42,6 +42,29 @@ options:
|
|
|
42
42
|
Defines the emitter output directory. Defaults to `{output-dir}/@azure-tools/typespec-ts`
|
|
43
43
|
See [Configuring output directory for more info](https://typespec.io/docs/handbook/configuration/configuration/#configuring-output-directory)
|
|
44
44
|
|
|
45
|
+
### `api-version`
|
|
46
|
+
|
|
47
|
+
**Type:** `string | object`
|
|
48
|
+
|
|
49
|
+
Use this flag if you would like to generate the sdk only for a specific version. Default value is the latest version. Also accepts values `latest` and `all`. For multi-service packages, provide a map from each service namespace's full name to its desired version; services not listed default to their latest version.
|
|
50
|
+
|
|
51
|
+
**Options:**
|
|
52
|
+
|
|
53
|
+
- `string`
|
|
54
|
+
- `object`
|
|
55
|
+
|
|
56
|
+
### `examples-dir`
|
|
57
|
+
|
|
58
|
+
**Type:** `string`
|
|
59
|
+
|
|
60
|
+
Specifies the directory where the emitter will look for example files. If the flag isn't set, the emitter defaults to using an `examples` directory located at the project root.
|
|
61
|
+
|
|
62
|
+
### `namespace`
|
|
63
|
+
|
|
64
|
+
**Type:** `string`
|
|
65
|
+
|
|
66
|
+
Specifies the namespace you want to override for namespaces set in the spec. With this config, all namespace for the spec types will default to it.
|
|
67
|
+
|
|
45
68
|
### `include-headers-in-response`
|
|
46
69
|
|
|
47
70
|
**Type:** `boolean`
|
|
@@ -50,20 +73,19 @@ This option is used to indicate whether to include response headers in the gener
|
|
|
50
73
|
|
|
51
74
|
### `package-details`
|
|
52
75
|
|
|
53
|
-
**Type:** `object { name, scopeName, nameWithoutScope, description, version
|
|
76
|
+
**Type:** `object { name, scopeName, nameWithoutScope, description, version }`
|
|
54
77
|
|
|
55
78
|
This is to indicate the package information such as package name, package description etc.
|
|
56
79
|
|
|
57
80
|
**Properties:**
|
|
58
81
|
|
|
59
|
-
| Name
|
|
60
|
-
|
|
|
61
|
-
| `name`
|
|
62
|
-
| `scopeName`
|
|
63
|
-
| `nameWithoutScope`
|
|
64
|
-
| `description`
|
|
65
|
-
| `version`
|
|
66
|
-
| `isVersionUserProvided` | `boolean` | | |
|
|
82
|
+
| Name | Type | Default | Description |
|
|
83
|
+
| ------------------ | -------- | ------- | ----------- |
|
|
84
|
+
| `name` | `string` | | |
|
|
85
|
+
| `scopeName` | `string` | | |
|
|
86
|
+
| `nameWithoutScope` | `string` | | |
|
|
87
|
+
| `description` | `string` | | |
|
|
88
|
+
| `version` | `string` | | |
|
|
67
89
|
|
|
68
90
|
### `add-credentials`
|
|
69
91
|
|
|
@@ -199,12 +221,6 @@ typespec-title-map:
|
|
|
199
221
|
AnomalyDetectorClient2: AnomalyDetectorRest2
|
|
200
222
|
```
|
|
201
223
|
|
|
202
|
-
### `should-use-pnpm-dep`
|
|
203
|
-
|
|
204
|
-
**Type:** `boolean`
|
|
205
|
-
|
|
206
|
-
Internal option for test.
|
|
207
|
-
|
|
208
224
|
### `ignore-nullable-on-optional`
|
|
209
225
|
|
|
210
226
|
**Type:** `boolean`
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SdkContext } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
-
import { EmitContext } from "@typespec/compiler";
|
|
1
|
+
import type { SdkContext } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
+
import type { EmitContext } from "@typespec/compiler";
|
|
3
3
|
import { Project, SourceFile } from "ts-morph";
|
|
4
|
-
import { ExternalDependencies } from "./framework/dependency.js";
|
|
5
|
-
import { Binder } from "./framework/hooks/binder.js";
|
|
6
|
-
import { SdkTypeContext } from "./framework/hooks/sdk-types.js";
|
|
7
|
-
import { ClientTypeMetaTree } from "./meta-tree.js";
|
|
4
|
+
import type { ExternalDependencies } from "./framework/dependency.js";
|
|
5
|
+
import type { Binder } from "./framework/hooks/binder.js";
|
|
6
|
+
import type { SdkTypeContext } from "./framework/hooks/sdk-types.js";
|
|
7
|
+
import type { ClientTypeMetaTree } from "./meta-tree.js";
|
|
8
8
|
/**
|
|
9
9
|
* Contexts Object Guidelines
|
|
10
10
|
* --------------------------
|
|
@@ -56,6 +56,16 @@ declare class ContextManager {
|
|
|
56
56
|
* @returns {Contexts[K] | undefined} The value of the context if found, otherwise undefined.
|
|
57
57
|
*/
|
|
58
58
|
getContext<K extends ContextKey>(key: K): Contexts[K] | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Clears all stored contexts.
|
|
61
|
+
*
|
|
62
|
+
* The manager is a process-wide singleton, so the values provided during an
|
|
63
|
+
* emit (the `EmitContext`/`Program`, the TCGC `SdkContext`, the ts-morph
|
|
64
|
+
* `Project`, etc.) stay reachable from this map until the next emit overwrites
|
|
65
|
+
* them. Clearing at the end of an emit lets the whole previous program graph
|
|
66
|
+
* be collected instead of being retained until the following emit.
|
|
67
|
+
*/
|
|
68
|
+
clearContexts(): void;
|
|
59
69
|
}
|
|
60
70
|
export declare const contextManager: ContextManager;
|
|
61
71
|
/**
|
|
@@ -71,5 +81,12 @@ export declare function useContext<K extends ContextKey>(key: K): Contexts[K];
|
|
|
71
81
|
* @param {Contexts[K]} value - The value to set for the specified context.
|
|
72
82
|
*/
|
|
73
83
|
export declare function provideContext<K extends ContextKey>(key: K, value: Contexts[K]): void;
|
|
84
|
+
/**
|
|
85
|
+
* Clears all contexts held by the singleton context manager. Call this once an
|
|
86
|
+
* emit has finished writing its output so the retained program graph (compiler
|
|
87
|
+
* `EmitContext`/`Program`, TCGC `SdkContext`, ts-morph `Project`, binder, …) can
|
|
88
|
+
* be garbage collected instead of lingering until the next emit overwrites it.
|
|
89
|
+
*/
|
|
90
|
+
export declare function clearContexts(): void;
|
|
74
91
|
export {};
|
|
75
92
|
//# sourceMappingURL=context-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-manager.d.ts","sourceRoot":"","sources":["../../src/context-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"context-manager.d.ts","sourceRoot":"","sources":["../../src/context-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,KAAK,QAAQ,GAAG;IACd,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE;QACX,eAAe,EAAE,WAAW,CAAC;QAC7B,WAAW,EAAE,UAAU,CAAC;KACzB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,oBAAoB,CAAC;CACpC,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,QAAQ,CAAC;AAEjC;;;GAGG;AACH,cAAM,cAAc;IAClB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAmC;IAEnD,OAAO;IAEP;;;OAGG;WACW,WAAW,IAAI,cAAc;IAO3C;;;;OAIG;IACI,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;IAIzE;;;;OAIG;IACI,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS;IAIxE;;;;;;;;OAQG;IACI,aAAa,IAAI,IAAI;CAG7B;AAGD,eAAO,MAAM,cAAc,gBAA+B,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAMpE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAErF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAEpC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Project, SourceFile } from "ts-morph";
|
|
1
2
|
/**
|
|
2
3
|
* Manages shared contexts across the application to minimize prop drilling and enhance modularity.
|
|
3
4
|
* Implements the Singleton pattern to ensure there is a single instance of ContextManager.
|
|
@@ -32,6 +33,18 @@ class ContextManager {
|
|
|
32
33
|
getContext(key) {
|
|
33
34
|
return this.contexts.get(key);
|
|
34
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Clears all stored contexts.
|
|
38
|
+
*
|
|
39
|
+
* The manager is a process-wide singleton, so the values provided during an
|
|
40
|
+
* emit (the `EmitContext`/`Program`, the TCGC `SdkContext`, the ts-morph
|
|
41
|
+
* `Project`, etc.) stay reachable from this map until the next emit overwrites
|
|
42
|
+
* them. Clearing at the end of an emit lets the whole previous program graph
|
|
43
|
+
* be collected instead of being retained until the following emit.
|
|
44
|
+
*/
|
|
45
|
+
clearContexts() {
|
|
46
|
+
this.contexts.clear();
|
|
47
|
+
}
|
|
35
48
|
}
|
|
36
49
|
// Expose the singleton instance of the context manager.
|
|
37
50
|
export const contextManager = ContextManager.getInstance();
|
|
@@ -56,4 +69,13 @@ export function useContext(key) {
|
|
|
56
69
|
export function provideContext(key, value) {
|
|
57
70
|
contextManager.setContext(key, value);
|
|
58
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Clears all contexts held by the singleton context manager. Call this once an
|
|
74
|
+
* emit has finished writing its output so the retained program graph (compiler
|
|
75
|
+
* `EmitContext`/`Program`, TCGC `SdkContext`, ts-morph `Project`, binder, …) can
|
|
76
|
+
* be garbage collected instead of lingering until the next emit overwrites it.
|
|
77
|
+
*/
|
|
78
|
+
export function clearContexts() {
|
|
79
|
+
contextManager.clearContexts();
|
|
80
|
+
}
|
|
59
81
|
//# sourceMappingURL=context-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-manager.js","sourceRoot":"","sources":["../../src/context-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-manager.js","sourceRoot":"","sources":["../../src/context-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAkC/C;;;GAGG;AACH,MAAM,cAAc;IACV,MAAM,CAAC,QAAQ,CAAiB;IAChC,QAAQ,GAAyB,IAAI,GAAG,EAAE,CAAC;IAEnD,gBAAuB,CAAC;IAExB;;;OAGG;IACI,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;YAC7B,cAAc,CAAC,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;QACjD,CAAC;QACD,OAAO,cAAc,CAAC,QAAQ,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAuB,GAAM,EAAE,KAAkB;QAChE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAuB,GAAM;QAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAA4B,CAAC;IAC3D,CAAC;IAED;;;;;;;;OAQG;IACI,aAAa;QAClB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;CACF;AAED,wDAAwD;AACxD,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAuB,GAAM;IACrD,MAAM,OAAO,GAAG,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,WAAW,GAAG,YAAY,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAuB,GAAM,EAAE,KAAkB;IAC7E,cAAc,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa;IAC3B,cAAc,CAAC,aAAa,EAAE,CAAC;AACjC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassDeclaration, ClassDeclarationStructure, EnumDeclaration, EnumDeclarationStructure, FunctionDeclaration, FunctionDeclarationStructure, InterfaceDeclaration, InterfaceDeclarationStructure, SourceFile, TypeAliasDeclaration, TypeAliasDeclarationStructure } from "ts-morph";
|
|
1
|
+
import { ClassDeclaration, type ClassDeclarationStructure, EnumDeclaration, type EnumDeclarationStructure, FunctionDeclaration, type FunctionDeclarationStructure, InterfaceDeclaration, type InterfaceDeclarationStructure, SourceFile, TypeAliasDeclaration, type TypeAliasDeclarationStructure } from "ts-morph";
|
|
2
2
|
export type DeclarationStructures = ClassDeclarationStructure | EnumDeclarationStructure | FunctionDeclarationStructure | InterfaceDeclarationStructure | TypeAliasDeclarationStructure;
|
|
3
3
|
export type Declarations = ClassDeclaration | EnumDeclaration | FunctionDeclaration | InterfaceDeclaration | TypeAliasDeclaration;
|
|
4
4
|
export declare function addDeclaration(sourceFile: SourceFile, declaration: ClassDeclarationStructure, refkey: unknown): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declaration.d.ts","sourceRoot":"","sources":["../../../src/framework/declaration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"declaration.d.ts","sourceRoot":"","sources":["../../../src/framework/declaration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,yBAAyB,EAC9B,eAAe,EACf,KAAK,wBAAwB,EAC7B,mBAAmB,EACnB,KAAK,4BAA4B,EACjC,oBAAoB,EACpB,KAAK,6BAA6B,EAClC,UAAU,EAGV,oBAAoB,EACpB,KAAK,6BAA6B,EACnC,MAAM,UAAU,CAAC;AAIlB,MAAM,MAAM,qBAAqB,GAC7B,yBAAyB,GACzB,wBAAwB,GACxB,4BAA4B,GAC5B,6BAA6B,GAC7B,6BAA6B,CAAC;AAElC,MAAM,MAAM,YAAY,GACpB,gBAAgB,GAChB,eAAe,GACf,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,yBAAyB,EACtC,MAAM,EAAE,OAAO,GACd,IAAI,CAAC;AAER,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,wBAAwB,EACrC,MAAM,EAAE,OAAO,GACd,IAAI,CAAC;AAER,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,4BAA4B,EACzC,MAAM,EAAE,OAAO,GACd,IAAI,CAAC;AAER,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,6BAA6B,EAC1C,MAAM,EAAE,OAAO,GACd,IAAI,CAAC;AAER,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,6BAA6B,EAC1C,MAAM,EAAE,OAAO,GACd,IAAI,CAAC;AACR,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StructureKind, } from "ts-morph";
|
|
1
|
+
import { ClassDeclaration, EnumDeclaration, FunctionDeclaration, InterfaceDeclaration, SourceFile, StructureKind, TypeAliasDeclaration, } from "ts-morph";
|
|
2
2
|
import { useBinder } from "./hooks/binder.js";
|
|
3
3
|
import { refkey as getRefKey } from "./refkey.js";
|
|
4
4
|
import { enqueueStatement } from "./source-file-batch.js";
|
|
@@ -12,6 +12,7 @@ export function addDeclaration(sourceFile, input, refkey) {
|
|
|
12
12
|
const trackedDeclarationName = binder.trackDeclaration(stringRefkey, declaration.name, sourceFile);
|
|
13
13
|
// Update the declaration name to be unique
|
|
14
14
|
const trackedDeclaration = { ...declaration, name: trackedDeclarationName };
|
|
15
|
+
trackedDeclaration.leadingTrivia ??= "\n";
|
|
15
16
|
// Skip empty type aliases (they have no body to emit). Done before
|
|
16
17
|
// dispatching so behaviour is identical whether batching or not.
|
|
17
18
|
if (trackedDeclaration.kind === StructureKind.TypeAlias && !trackedDeclaration.type) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declaration.js","sourceRoot":"","sources":["../../../src/framework/declaration.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"declaration.js","sourceRoot":"","sources":["../../../src/framework/declaration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEhB,eAAe,EAEf,mBAAmB,EAEnB,oBAAoB,EAEpB,UAAU,EAEV,aAAa,EACb,oB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6 @@
|
|
|
1
1
|
import { Project, SourceFile } from "ts-morph";
|
|
2
|
-
import { ReferenceableSymbol } from "../dependency.js";
|
|
3
|
-
import { StaticHelperMetadata } from "../load-static-helpers.js";
|
|
2
|
+
import type { ReferenceableSymbol } from "../dependency.js";
|
|
3
|
+
import { type StaticHelperMetadata } from "../load-static-helpers.js";
|
|
4
4
|
export interface DeclarationInfo {
|
|
5
5
|
name: string;
|
|
6
6
|
sourceFile: SourceFile;
|
|
@@ -9,9 +9,6 @@ export interface DeclarationInfo {
|
|
|
9
9
|
export interface BinderOptions {
|
|
10
10
|
staticHelpers?: Map<string, StaticHelperMetadata>;
|
|
11
11
|
dependencies?: Record<string, ReferenceableSymbol>;
|
|
12
|
-
/** When true, use #platform/ subpath imports for static helpers with platform variants.
|
|
13
|
-
* Should be true for warp packages; false for tshy packages. */
|
|
14
|
-
useSubpathImports?: boolean;
|
|
15
12
|
}
|
|
16
13
|
export interface Binder {
|
|
17
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binder.d.ts","sourceRoot":"","sources":["../../../../src/framework/hooks/binder.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,OAAO,EACP,UAAU,EAEX,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"binder.d.ts","sourceRoot":"","sources":["../../../../src/framework/hooks/binder.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,OAAO,EACP,UAAU,EAEX,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAIxF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,MAAM;IACrB;;;;;;OAMG;IACH,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC;IAChF,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1C,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnE;AAiUD,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAInF;AAWD;;;GAGG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { joinPaths, normalizePath } from "@typespec/compiler";
|
|
2
|
-
import { StructureKind, } from "ts-morph";
|
|
2
|
+
import { Project, SourceFile, StructureKind, } from "ts-morph";
|
|
3
3
|
import { provideContext, useContext } from "../../context-manager.js";
|
|
4
4
|
import { generateLocallyUniqueName } from "../../modular/helpers/naming-helpers.js";
|
|
5
5
|
import { SourceFileSymbol } from "../load-static-helpers.js";
|
|
@@ -14,13 +14,11 @@ class BinderImp {
|
|
|
14
14
|
project;
|
|
15
15
|
dependencies;
|
|
16
16
|
staticHelpers;
|
|
17
|
-
useSubpathImports;
|
|
18
17
|
constructor(project, options = {}) {
|
|
19
18
|
this.project = project;
|
|
20
19
|
provideDependencies(options.dependencies);
|
|
21
20
|
this.staticHelpers = options.staticHelpers ?? new Map();
|
|
22
21
|
this.dependencies = useDependencies();
|
|
23
|
-
this.useSubpathImports = options.useSubpathImports ?? false;
|
|
24
22
|
}
|
|
25
23
|
trackDeclaration(refkey, name, sourceFile) {
|
|
26
24
|
const uniqueName = this.generateLocallyUniqueDeclarationName(name, sourceFile);
|
|
@@ -124,29 +122,6 @@ class BinderImp {
|
|
|
124
122
|
this.imports.set(fileWhereImportIsAdded, importStructures);
|
|
125
123
|
return importSpecifier;
|
|
126
124
|
}
|
|
127
|
-
/**
|
|
128
|
-
* Returns the #platform/ subpath import specifier for a static helper file
|
|
129
|
-
* that has a polyfill variant (-browser.mts or -react-native.mts sibling),
|
|
130
|
-
* or undefined if subpath imports are disabled or no variant exists.
|
|
131
|
-
* e.g. "src/static-helpers/serialization/get-binary-response.ts"
|
|
132
|
-
* -> "#platform/static-helpers/serialization/get-binary-response"
|
|
133
|
-
*/
|
|
134
|
-
getPlatformImportSpecifier(declarationSourceFile) {
|
|
135
|
-
if (!this.useSubpathImports)
|
|
136
|
-
return undefined;
|
|
137
|
-
const filePath = declarationSourceFile.getFilePath();
|
|
138
|
-
const srcIndex = filePath.indexOf("/src/");
|
|
139
|
-
if (srcIndex === -1)
|
|
140
|
-
return undefined;
|
|
141
|
-
// Check if a -browser.mts or -react-native.mts sibling exists
|
|
142
|
-
const basePath = filePath.replace(/\.ts$/, "");
|
|
143
|
-
const hasBrowserVariant = this.project.getSourceFile(basePath + "-browser.mts");
|
|
144
|
-
const hasReactNativeVariant = this.project.getSourceFile(basePath + "-react-native.mts");
|
|
145
|
-
if (!hasBrowserVariant && !hasReactNativeVariant)
|
|
146
|
-
return undefined;
|
|
147
|
-
const relativePath = filePath.substring(srcIndex + "/src/".length);
|
|
148
|
-
return "#platform/" + relativePath.replace(/\.ts$/, "");
|
|
149
|
-
}
|
|
150
125
|
/**
|
|
151
126
|
* Applies all tracked imports to their respective source files.
|
|
152
127
|
*/
|
|
@@ -228,9 +203,7 @@ class BinderImp {
|
|
|
228
203
|
}
|
|
229
204
|
if (file !== declarationSourceFile) {
|
|
230
205
|
this.trackReference(declarationKey, file);
|
|
231
|
-
|
|
232
|
-
const platformSpecifier = this.getPlatformImportSpecifier(declarationSourceFile);
|
|
233
|
-
const importTarget = platformSpecifier ?? declarationSourceFile;
|
|
206
|
+
const importTarget = declarationSourceFile;
|
|
234
207
|
const importDec = this.addImport(file, importTarget, name);
|
|
235
208
|
name = importDec.alias ?? name;
|
|
236
209
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binder.js","sourceRoot":"","sources":["../../../../src/framework/hooks/binder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAKL,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAwB,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA6B7E,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAE5C,MAAM,SAAS;IACL,YAAY,GAAG,IAAI,GAAG,EAA4B,CAAC;IACnD,UAAU,GAAG,IAAI,GAAG,EAA4B,CAAC;IACjD,OAAO,GAAG,IAAI,GAAG,EAA4C,CAAC;IAC9D,mBAAmB,GAAG,IAAI,GAAG,EAA2B,CAAC;IACzD,OAAO,CAAU;IACjB,YAAY,CAAsC;IAClD,aAAa,CAAoC;IACjD,iBAAiB,CAAU;IAEnC,YAAY,OAAgB,EAAE,UAAyB,EAAE;QACvD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,mBAAmB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,IAAI,GAAG,EAAE,CAAC;QACxD,IAAI,CAAC,YAAY,GAAG,eAAe,EAAE,C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CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SdkClientType, SdkHttpOperation, SdkModelPropertyType, SdkModelType, SdkServiceMethod, SdkType } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
-
import { Operation, Type } from "@typespec/compiler";
|
|
3
|
-
import { SdkContext } from "../../utils/interfaces.js";
|
|
1
|
+
import { type SdkClientType, type SdkHttpOperation, type SdkModelPropertyType, type SdkModelType, type SdkServiceMethod, type SdkType } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
+
import { type Operation, type Type } from "@typespec/compiler";
|
|
3
|
+
import type { SdkContext } from "../../utils/interfaces.js";
|
|
4
4
|
export declare const emitQueue: Set<SdkType>;
|
|
5
5
|
export declare const flattenPropertyModelMap: Map<SdkModelPropertyType, SdkModelType>;
|
|
6
6
|
/**
|
|
@@ -9,6 +9,15 @@ export declare const flattenPropertyModelMap: Map<SdkModelPropertyType, SdkModel
|
|
|
9
9
|
* Precomputed during visitPackageTypes for O(1) lookups in normalizeModelName.
|
|
10
10
|
*/
|
|
11
11
|
export declare const pagedModelsKeptPublic: Set<SdkType>;
|
|
12
|
+
/**
|
|
13
|
+
* Releases the module-level state that accumulates while visiting a package's
|
|
14
|
+
* types. These collections are cleared at the start of every
|
|
15
|
+
* {@link visitPackageTypes} call, but because they live at module scope they
|
|
16
|
+
* otherwise keep the most recently emitted program's SDK types reachable until
|
|
17
|
+
* the next emit runs. Call this once an emit has fully finished so that state
|
|
18
|
+
* can be garbage collected.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resetSdkTypesState(): void;
|
|
12
21
|
export interface SdkTypeContext {
|
|
13
22
|
operations: Map<Type, SdkServiceMethod<SdkHttpOperation>>;
|
|
14
23
|
types: Map<Type, SdkType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-types.d.ts","sourceRoot":"","sources":["../../../../src/framework/hooks/sdk-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"sdk-types.d.ts","sourceRoot":"","sources":["../../../../src/framework/hooks/sdk-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EAEb,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAwB,MAAM,oBAAoB,CAAC;AAOrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,eAAO,MAAM,SAAS,EAAE,GAAG,CAAC,OAAO,CAAsB,CAAC;AAC1D,eAAO,MAAM,uBAAuB,EAAE,GAAG,CAAC,oBAAoB,EAAE,YAAY,CAGzE,CAAC;AACJ;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,cAAqB,CAAC;AAExD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,GAAG,CAAC,IAAI,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC1D,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1B,iBAAiB,EAAE,GAAG,CAAC,oBAAoB,EAAE,yBAAyB,CAAC,CAAC;CACzE;AAED,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;CACjD;AAED,wBAAgB,WAAW;WAIC,SAAS,GAAG,gBAAgB,CAAC,gBAAgB,CAAC;WAC9C,IAAI,GAAG,OAAO;EAwBzC;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,QAkElD;AAmED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,wCAYjF"}
|
|
@@ -14,6 +14,19 @@ export const flattenPropertyModelMap = new Map();
|
|
|
14
14
|
* Precomputed during visitPackageTypes for O(1) lookups in normalizeModelName.
|
|
15
15
|
*/
|
|
16
16
|
export const pagedModelsKeptPublic = new Set();
|
|
17
|
+
/**
|
|
18
|
+
* Releases the module-level state that accumulates while visiting a package's
|
|
19
|
+
* types. These collections are cleared at the start of every
|
|
20
|
+
* {@link visitPackageTypes} call, but because they live at module scope they
|
|
21
|
+
* otherwise keep the most recently emitted program's SDK types reachable until
|
|
22
|
+
* the next emit runs. Call this once an emit has fully finished so that state
|
|
23
|
+
* can be garbage collected.
|
|
24
|
+
*/
|
|
25
|
+
export function resetSdkTypesState() {
|
|
26
|
+
emitQueue.clear();
|
|
27
|
+
flattenPropertyModelMap.clear();
|
|
28
|
+
pagedModelsKeptPublic.clear();
|
|
29
|
+
}
|
|
17
30
|
export function useSdkTypes() {
|
|
18
31
|
const sdkTypesContext = useContext("sdkTypes");
|
|
19
32
|
const { tcgcContext } = useContext("emitContext");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-types.js","sourceRoot":"","sources":["../../../../src/framework/hooks/sdk-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,aAAa,GACd,MAAM,6CAA6C,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"sdk-types.js","sourceRoot":"","sources":["../../../../src/framework/hooks/sdk-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,aAAa,GACd,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAA6B,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,O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;QAC5C,CAAC;QACD,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC3B,SAAS;QACX,CAAC;QACD,cAAc,CAAC,WAAW,GAAG,WAAW,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,MAAuC;IAChF,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,UAAU,GAAyC,EAAE,CAAC;IAC5D,OAAO,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAG,CAAC;QAClC,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACpB,WAAW,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExternalDependencies } from "../dependency.js";
|
|
1
|
+
import type { ExternalDependencies } from "../dependency.js";
|
|
2
2
|
export declare function provideDependencies(customDependencies?: Partial<ExternalDependencies>): void;
|
|
3
3
|
export declare function useDependencies(): ExternalDependencies;
|
|
4
4
|
//# sourceMappingURL=use-dependencies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-dependencies.d.ts","sourceRoot":"","sources":["../../../../src/framework/hooks/use-dependencies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-dependencies.d.ts","sourceRoot":"","sources":["../../../../src/framework/hooks/use-dependencies.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,wBAAgB,mBAAmB,CAAC,kBAAkB,GAAE,OAAO,CAAC,oBAAoB,CAAM,QAOzF;AAED,wBAAgB,eAAe,IAAI,oBAAoB,CAEtD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type CompilerHost, Program } from "@typespec/compiler";
|
|
1
|
+
import { type CompilerHost, type Program } from "@typespec/compiler";
|
|
2
2
|
import { Project, SourceFile } from "ts-morph";
|
|
3
|
-
import { ModularEmitterOptions } from "../modular/interfaces.js";
|
|
3
|
+
import type { ModularEmitterOptions } from "../modular/interfaces.js";
|
|
4
4
|
export declare const SourceFileSymbol: unique symbol;
|
|
5
5
|
export interface StaticHelperMetadata {
|
|
6
6
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-static-helpers.d.ts","sourceRoot":"","sources":["../../../src/framework/load-static-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAuB,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"load-static-helpers.d.ts","sourceRoot":"","sources":["../../../src/framework/load-static-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAuB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAKL,OAAO,EACP,UAAU,EAEX,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGtE,eAAO,MAAM,gBAAgB,eAAuB,CAAC;AAErD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC;CACjC;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,GAAG,GAAG,QAAQ,IAAI,oBAAoB,CAItF;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAKjE,MAAM,WAAW,wBAAyB,SAAQ,OAAO,CAAC,qBAAqB,CAAC;IAC9E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAOD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,aAAa,EACtB,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CA6D5C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { joinPaths, NoTarget } from "@typespec/compiler";
|
|
2
|
+
import { ClassDeclaration, EnumDeclaration, FunctionDeclaration, InterfaceDeclaration, Project, SourceFile, TypeAliasDeclaration, } from "ts-morph";
|
|
2
3
|
import { reportDiagnostic } from "../lib.js";
|
|
3
4
|
import { resolveProjectRoot } from "../utils/resolve-project-root.js";
|
|
4
5
|
import { refkey } from "./refkey.js";
|
|
@@ -34,19 +35,6 @@ export async function loadStaticHelpers(project, helpers, options = {}) {
|
|
|
34
35
|
const addedFile = project.createSourceFile(targetPath, contents, {
|
|
35
36
|
overwrite: true,
|
|
36
37
|
});
|
|
37
|
-
addedFile.getImportDeclarations().map((i) => {
|
|
38
|
-
// Rewrite relative platform-types imports to #platform/ specifiers
|
|
39
|
-
// so that browser/react-native variants are resolved via subpath imports.
|
|
40
|
-
// Only rewrite imports to the default variant (not -browser/-react-native variants
|
|
41
|
-
// which are already platform-specific direct imports).
|
|
42
|
-
const specifier = i.getModuleSpecifierValue();
|
|
43
|
-
if (specifier.startsWith(".") &&
|
|
44
|
-
specifier.includes("platform-types") &&
|
|
45
|
-
!specifier.includes("-browser") &&
|
|
46
|
-
!specifier.includes("-react-native")) {
|
|
47
|
-
i.setModuleSpecifier("#platform/static-helpers/platform-types");
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
38
|
for (const entry of Object.values(helpers)) {
|
|
51
39
|
if (!addedFile.getFilePath().endsWith(entry.location)) {
|
|
52
40
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-static-helpers.js","sourceRoot":"","sources":["../../../src/framework/load-static-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"load-static-helpers.js","sourceRoot":"","sources":["../../../src/framework/load-static-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAAE,QAAQ,EAAgB,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,OAAO,EACP,UAAU,EACV,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AASrD,MAAM,UAAU,sBAAsB,CAAC,QAAa;IAClD,OAAO,OAAO,CACZ,QAAQ,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,gBAAgB,CAAC,CAC9F,CAAC;AACJ,CAAC;AAID,MAAM,mCAAmC,GAAG,uBAAuB,CAAC;AACpE,MAAM,oCAAoC,GAAG,qBAAqB,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AE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/framework/reference.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAA6B,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,UAAU,gBAAgB,CAAC,MAAe;IAC9C,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,IAAI,GAAG,GAAG,MAAM,CAAC;IAEjB,IAAI,qBAAqB,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;QAChC,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAEpE,OAAO,MAAM,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,qBAAqB,CAAC,GAAQ;IACrC,OAAO,GAAG,EAAE,IAAI,KAAK,oBAAoB,CAAC;AAC5C,CAAC;AAED,SAAS,sBAAsB,CAAC,GAAQ;IACtC,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SourceFile, StatementStructures } from "ts-morph";
|
|
1
|
+
import { SourceFile, type StatementStructures } from "ts-morph";
|
|
2
2
|
/**
|
|
3
3
|
* Opens a batching scope. Subsequent `enqueueStatement` calls queue rather
|
|
4
4
|
* than mutate the AST until the matching `flushSourceFileBatch` is called.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-file-batch.d.ts","sourceRoot":"","sources":["../../../src/framework/source-file-batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,mBAAmB,
|
|
1
|
+
{"version":3,"file":"source-file-batch.d.ts","sourceRoot":"","sources":["../../../src/framework/source-file-batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,KAAK,mBAAmB,EAEzB,MAAM,UAAU,CAAC;AAkBlB;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAkB3C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAW7F;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CAiB7E;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CAaxE"}
|