@azure-tools/typespec-ts 0.56.0-dev.0 → 0.56.0-dev.10
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/README.md +1 -13
- package/dist/src/context-manager.d.ts +2 -2
- package/dist/src/context-manager.d.ts.map +1 -1
- package/dist/src/framework/declaration.d.ts.map +1 -1
- package/dist/src/framework/declaration.js +6 -20
- package/dist/src/framework/declaration.js.map +1 -1
- package/dist/src/framework/hooks/sdk-types.d.ts.map +1 -1
- package/dist/src/framework/hooks/sdk-types.js +1 -1
- package/dist/src/framework/hooks/sdk-types.js.map +1 -1
- package/dist/src/framework/source-file-batch.d.ts +35 -0
- package/dist/src/framework/source-file-batch.d.ts.map +1 -0
- package/dist/src/framework/source-file-batch.js +128 -0
- package/dist/src/framework/source-file-batch.js.map +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +63 -60
- package/dist/src/index.js.map +1 -1
- package/dist/src/{rlc-common/interfaces.d.ts → interfaces.d.ts} +12 -14
- package/dist/src/interfaces.d.ts.map +1 -0
- package/dist/src/interfaces.js.map +1 -0
- package/dist/src/lib.d.ts +2 -4
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +2 -12
- package/dist/src/lib.js.map +1 -1
- package/dist/src/meta-tree.d.ts +4 -4
- package/dist/src/meta-tree.d.ts.map +1 -1
- package/dist/src/metadata/build-api-extractor-config.d.ts +6 -0
- package/dist/src/metadata/build-api-extractor-config.d.ts.map +1 -0
- package/dist/src/metadata/build-api-extractor-config.js.map +1 -0
- package/dist/src/metadata/build-changelog-file.d.ts +6 -0
- package/dist/src/metadata/build-changelog-file.d.ts.map +1 -0
- package/dist/src/metadata/build-changelog-file.js.map +1 -0
- package/dist/src/metadata/build-es-lint-config.d.ts +6 -0
- package/dist/src/metadata/build-es-lint-config.d.ts.map +1 -0
- package/dist/src/metadata/build-es-lint-config.js.map +1 -0
- package/dist/src/metadata/build-license-file.d.ts.map +1 -0
- package/dist/src/metadata/build-license-file.js.map +1 -0
- package/dist/src/{rlc-common/metadata → metadata}/build-package-file.d.ts +3 -3
- package/dist/src/metadata/build-package-file.d.ts.map +1 -0
- package/dist/src/{rlc-common/metadata → metadata}/build-package-file.js +1 -1
- package/dist/src/metadata/build-package-file.js.map +1 -0
- package/dist/src/metadata/build-readme-file.d.ts +11 -0
- package/dist/src/metadata/build-readme-file.d.ts.map +1 -0
- package/dist/src/{rlc-common/metadata → metadata}/build-readme-file.js +16 -69
- package/dist/src/metadata/build-readme-file.js.map +1 -0
- package/dist/src/metadata/build-sample-env-file.d.ts +6 -0
- package/dist/src/metadata/build-sample-env-file.d.ts.map +1 -0
- package/dist/src/metadata/build-sample-env-file.js.map +1 -0
- package/dist/src/{rlc-common/metadata → metadata}/build-test-config.d.ts +3 -3
- package/dist/src/metadata/build-test-config.d.ts.map +1 -0
- package/dist/src/metadata/build-test-config.js.map +1 -0
- package/dist/src/{rlc-common/metadata → metadata}/build-ts-config.d.ts +3 -3
- package/dist/src/metadata/build-ts-config.d.ts.map +1 -0
- package/dist/src/metadata/build-ts-config.js.map +1 -0
- package/dist/src/metadata/build-vitest-config.d.ts +6 -0
- package/dist/src/metadata/build-vitest-config.d.ts.map +1 -0
- package/dist/src/metadata/build-vitest-config.js.map +1 -0
- package/dist/src/{rlc-common/metadata → metadata}/build-warp-config.d.ts +2 -2
- package/dist/src/metadata/build-warp-config.d.ts.map +1 -0
- package/dist/src/metadata/build-warp-config.js.map +1 -0
- package/dist/src/metadata/package-json/azure-package-common.d.ts.map +1 -0
- package/dist/src/metadata/package-json/azure-package-common.js.map +1 -0
- package/dist/src/metadata/package-json/build-azure-monorepo-package.d.ts.map +1 -0
- package/dist/src/{rlc-common/metadata → metadata}/package-json/build-azure-monorepo-package.js +1 -1
- package/dist/src/metadata/package-json/build-azure-monorepo-package.js.map +1 -0
- package/dist/src/metadata/package-json/package-common.d.ts.map +1 -0
- package/dist/src/metadata/package-json/package-common.js.map +1 -0
- package/dist/src/metadata/render-template.d.ts +24 -0
- package/dist/src/metadata/render-template.d.ts.map +1 -0
- package/dist/src/metadata/render-template.js +148 -0
- package/dist/src/metadata/render-template.js.map +1 -0
- package/dist/src/metadata/test/build-recorded-client.d.ts +6 -0
- package/dist/src/metadata/test/build-recorded-client.d.ts.map +1 -0
- package/dist/src/metadata/test/build-recorded-client.js +8 -0
- package/dist/src/metadata/test/build-recorded-client.js.map +1 -0
- package/dist/src/metadata/test/build-sample-test.d.ts +6 -0
- package/dist/src/metadata/test/build-sample-test.d.ts.map +1 -0
- package/dist/src/metadata/test/build-sample-test.js +8 -0
- package/dist/src/metadata/test/build-sample-test.js.map +1 -0
- package/dist/src/metadata/test/build-snippets.d.ts +6 -0
- package/dist/src/metadata/test/build-snippets.d.ts.map +1 -0
- package/dist/src/{rlc-common → metadata}/test/build-snippets.js +3 -5
- package/dist/src/metadata/test/build-snippets.js.map +1 -0
- package/dist/src/metadata/test/template.d.ts +4 -0
- package/dist/src/metadata/test/template.d.ts.map +1 -0
- package/dist/src/metadata/test/template.js +100 -0
- package/dist/src/metadata/test/template.js.map +1 -0
- package/dist/src/metadata/utils.d.ts +3 -0
- package/dist/src/metadata/utils.d.ts.map +1 -0
- package/dist/src/metadata/utils.js.map +1 -0
- package/dist/src/modular/build-classical-client.d.ts.map +1 -1
- package/dist/src/modular/build-classical-client.js +9 -9
- package/dist/src/modular/build-classical-client.js.map +1 -1
- package/dist/src/modular/build-classical-operation-groups.d.ts.map +1 -1
- package/dist/src/modular/build-classical-operation-groups.js +3 -3
- package/dist/src/modular/build-classical-operation-groups.js.map +1 -1
- package/dist/src/modular/build-client-context.d.ts.map +1 -1
- package/dist/src/modular/build-client-context.js +7 -7
- package/dist/src/modular/build-client-context.js.map +1 -1
- package/dist/src/modular/build-modular-options.js +3 -3
- package/dist/src/modular/build-modular-options.js.map +1 -1
- package/dist/src/modular/build-operations.d.ts.map +1 -1
- package/dist/src/modular/build-operations.js +6 -6
- package/dist/src/modular/build-operations.js.map +1 -1
- package/dist/src/modular/build-project-files.d.ts.map +1 -1
- package/dist/src/modular/build-project-files.js +4 -4
- package/dist/src/modular/build-project-files.js.map +1 -1
- package/dist/src/modular/build-restore-poller.d.ts.map +1 -1
- package/dist/src/modular/build-restore-poller.js +3 -3
- package/dist/src/modular/build-restore-poller.js.map +1 -1
- package/dist/src/modular/build-root-index.d.ts.map +1 -1
- package/dist/src/modular/build-root-index.js +42 -14
- package/dist/src/modular/build-root-index.js.map +1 -1
- package/dist/src/modular/build-subpath-index.d.ts.map +1 -1
- package/dist/src/modular/build-subpath-index.js +17 -4
- package/dist/src/modular/build-subpath-index.js.map +1 -1
- package/dist/src/modular/emit-models-options.d.ts.map +1 -1
- package/dist/src/modular/emit-models-options.js +3 -3
- package/dist/src/modular/emit-models-options.js.map +1 -1
- package/dist/src/modular/emit-models.d.ts +1 -1
- package/dist/src/modular/emit-models.d.ts.map +1 -1
- package/dist/src/modular/emit-models.js +32 -25
- package/dist/src/modular/emit-models.js.map +1 -1
- package/dist/src/modular/emit-samples.d.ts.map +1 -1
- package/dist/src/modular/emit-samples.js +5 -5
- package/dist/src/modular/emit-samples.js.map +1 -1
- package/dist/src/modular/emit-tests.d.ts.map +1 -1
- package/dist/src/modular/emit-tests.js +1 -1
- package/dist/src/modular/emit-tests.js.map +1 -1
- package/dist/src/modular/helpers/classical-operation-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/classical-operation-helpers.js +11 -11
- package/dist/src/modular/helpers/classical-operation-helpers.js.map +1 -1
- package/dist/src/modular/helpers/client-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/client-helpers.js +3 -3
- package/dist/src/modular/helpers/client-helpers.js.map +1 -1
- package/dist/src/modular/helpers/example-value-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/example-value-helpers.js +2 -2
- package/dist/src/modular/helpers/example-value-helpers.js.map +1 -1
- package/dist/src/modular/helpers/naming-helpers.d.ts +1 -1
- package/dist/src/modular/helpers/naming-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/naming-helpers.js +2 -2
- package/dist/src/modular/helpers/naming-helpers.js.map +1 -1
- package/dist/src/modular/helpers/operation-helpers.d.ts +4 -4
- package/dist/src/modular/helpers/operation-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operation-helpers.js +25 -26
- package/dist/src/modular/helpers/operation-helpers.js.map +1 -1
- package/dist/src/modular/helpers/type-helpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/type-helpers.js +1 -1
- package/dist/src/modular/helpers/type-helpers.js.map +1 -1
- package/dist/src/modular/interfaces.d.ts +4 -4
- package/dist/src/modular/interfaces.d.ts.map +1 -1
- package/dist/src/modular/serialization/build-deserializer-function.d.ts.map +1 -1
- package/dist/src/modular/serialization/build-deserializer-function.js +2 -2
- package/dist/src/modular/serialization/build-deserializer-function.js.map +1 -1
- package/dist/src/modular/serialization/build-serializer-function.d.ts.map +1 -1
- package/dist/src/modular/serialization/build-serializer-function.js +2 -2
- package/dist/src/modular/serialization/build-serializer-function.js.map +1 -1
- package/dist/src/modular/serialization/build-xml-serializer-function.d.ts.map +1 -1
- package/dist/src/modular/serialization/build-xml-serializer-function.js +1 -1
- package/dist/src/modular/serialization/build-xml-serializer-function.js.map +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.js +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.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.js +3 -3
- package/dist/src/modular/type-expressions/get-type-expression.js.map +1 -1
- package/dist/src/transform/transform-api-version-info.d.ts +1 -1
- package/dist/src/transform/transform-api-version-info.d.ts.map +1 -1
- package/dist/src/transform/transform-api-version-info.js +4 -3
- package/dist/src/transform/transform-api-version-info.js.map +1 -1
- package/dist/src/transform/{transfrom-rlc-options.d.ts → transform-client-options.d.ts} +3 -3
- package/dist/src/transform/transform-client-options.d.ts.map +1 -0
- package/dist/src/transform/{transfrom-rlc-options.js → transform-client-options.js} +9 -13
- package/dist/src/transform/transform-client-options.js.map +1 -0
- package/dist/src/transform/transform-helper-function-details.d.ts +1 -1
- package/dist/src/transform/transform-helper-function-details.d.ts.map +1 -1
- package/dist/src/transform/transform-helper-function-details.js +4 -4
- package/dist/src/transform/transform-helper-function-details.js.map +1 -1
- package/dist/src/transform/transform-parameters.d.ts +1 -1
- package/dist/src/transform/transform-parameters.d.ts.map +1 -1
- package/dist/src/transform/transform-parameters.js +11 -11
- package/dist/src/transform/transform-parameters.js.map +1 -1
- package/dist/src/transform/transform-paths.d.ts +1 -1
- package/dist/src/transform/transform-paths.d.ts.map +1 -1
- package/dist/src/transform/transform-paths.js +5 -4
- package/dist/src/transform/transform-paths.js.map +1 -1
- package/dist/src/transform/transform-responses.d.ts +1 -1
- package/dist/src/transform/transform-responses.d.ts.map +1 -1
- package/dist/src/transform/transform-responses.js +19 -18
- package/dist/src/transform/transform-responses.js.map +1 -1
- package/dist/src/transform/transform-schemas.js +5 -5
- package/dist/src/transform/transform-schemas.js.map +1 -1
- package/dist/src/transform/transform-telemetry-info.d.ts +1 -1
- package/dist/src/transform/transform-telemetry-info.d.ts.map +1 -1
- package/dist/src/transform/transform-telemetry-info.js +2 -2
- package/dist/src/transform/transform-telemetry-info.js.map +1 -1
- package/dist/src/transform/transform.d.ts +2 -2
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/transform/transform.js +9 -10
- package/dist/src/transform/transform.js.map +1 -1
- package/dist/src/utils/api-version-util.d.ts.map +1 -0
- package/dist/src/utils/api-version-util.js.map +1 -0
- package/dist/src/utils/client-utils.d.ts +5 -5
- package/dist/src/utils/client-utils.d.ts.map +1 -1
- package/dist/src/utils/client-utils.js +10 -10
- package/dist/src/utils/client-utils.js.map +1 -1
- package/dist/src/utils/cross-language-def.d.ts.map +1 -1
- package/dist/src/utils/cross-language-def.js +3 -3
- package/dist/src/utils/cross-language-def.js.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/imports-util.d.ts.map +1 -0
- package/dist/src/{rlc-common/helpers → utils}/imports-util.js +6 -6
- package/dist/src/utils/imports-util.js.map +1 -0
- package/dist/src/utils/interfaces.d.ts +3 -4
- package/dist/src/utils/interfaces.d.ts.map +1 -1
- package/dist/src/utils/model-utils.d.ts +1 -1
- package/dist/src/utils/model-utils.d.ts.map +1 -1
- package/dist/src/utils/model-utils.js +4 -2
- package/dist/src/utils/model-utils.js.map +1 -1
- package/dist/src/{rlc-common/helpers → utils}/name-constructors.d.ts +2 -2
- package/dist/src/utils/name-constructors.d.ts.map +1 -0
- package/dist/src/utils/name-constructors.js.map +1 -0
- package/dist/src/utils/name-utils.d.ts.map +1 -0
- package/dist/src/utils/name-utils.js.map +1 -0
- package/dist/src/utils/namespace-utils.js +4 -4
- package/dist/src/utils/namespace-utils.js.map +1 -1
- package/dist/src/utils/operation-helpers.d.ts +16 -0
- package/dist/src/utils/operation-helpers.d.ts.map +1 -0
- package/dist/src/utils/operation-helpers.js.map +1 -0
- package/dist/src/utils/operation-util.d.ts +2 -2
- package/dist/src/utils/operation-util.d.ts.map +1 -1
- package/dist/src/utils/operation-util.js +17 -18
- package/dist/src/utils/operation-util.js.map +1 -1
- package/dist/src/utils/parameter-utils.d.ts +1 -1
- package/dist/src/utils/parameter-utils.d.ts.map +1 -1
- package/dist/src/utils/parameter-utils.js +2 -4
- package/dist/src/utils/parameter-utils.js.map +1 -1
- package/dist/src/{rlc-common/helpers → utils}/schema-helpers.d.ts +2 -2
- package/dist/src/utils/schema-helpers.d.ts.map +1 -0
- package/dist/src/utils/schema-helpers.js.map +1 -0
- package/dist/src/utils/type-util.d.ts.map +1 -0
- package/dist/src/utils/type-util.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -24
- package/src/context-manager.ts +2 -2
- package/src/framework/declaration.ts +8 -20
- package/src/framework/hooks/sdk-types.ts +1 -1
- package/src/framework/source-file-batch.ts +140 -0
- package/src/index.ts +81 -101
- package/src/{rlc-common/interfaces.ts → interfaces.ts} +14 -16
- package/src/lib.ts +3 -16
- package/src/meta-tree.ts +4 -4
- package/src/{rlc-common/metadata → metadata}/build-api-extractor-config.ts +2 -2
- package/src/{rlc-common/metadata → metadata}/build-changelog-file.ts +3 -3
- package/src/{rlc-common/metadata → metadata}/build-es-lint-config.ts +2 -2
- package/src/{rlc-common/metadata → metadata}/build-package-file.ts +6 -6
- package/src/{rlc-common/metadata → metadata}/build-readme-file.ts +25 -99
- package/src/{rlc-common/metadata → metadata}/build-sample-env-file.ts +2 -2
- package/src/{rlc-common/metadata → metadata}/build-test-config.ts +4 -4
- package/src/{rlc-common/metadata → metadata}/build-ts-config.ts +3 -3
- package/src/{rlc-common/metadata → metadata}/build-vitest-config.ts +2 -2
- package/src/{rlc-common/metadata → metadata}/build-warp-config.ts +2 -2
- package/src/{rlc-common/metadata → metadata}/package-json/build-azure-monorepo-package.ts +1 -1
- package/src/metadata/render-template.ts +202 -0
- package/src/metadata/test/build-recorded-client.ts +9 -0
- package/src/metadata/test/build-sample-test.ts +9 -0
- package/src/{rlc-common → metadata}/test/build-snippets.ts +5 -7
- package/src/metadata/test/template.ts +101 -0
- package/src/{rlc-common/metadata → metadata}/utils.ts +2 -2
- package/src/modular/build-classical-client.ts +9 -9
- package/src/modular/build-classical-operation-groups.ts +3 -3
- package/src/modular/build-client-context.ts +7 -7
- package/src/modular/build-modular-options.ts +3 -3
- package/src/modular/build-operations.ts +6 -6
- package/src/modular/build-project-files.ts +4 -5
- package/src/modular/build-restore-poller.ts +3 -3
- package/src/modular/build-root-index.ts +57 -19
- package/src/modular/build-subpath-index.ts +26 -5
- package/src/modular/emit-models-options.ts +3 -3
- package/src/modular/emit-models.ts +32 -26
- package/src/modular/emit-samples.ts +5 -5
- package/src/modular/emit-tests.ts +1 -1
- package/src/modular/helpers/classical-operation-helpers.ts +11 -11
- package/src/modular/helpers/client-helpers.ts +3 -3
- package/src/modular/helpers/example-value-helpers.ts +2 -2
- package/src/modular/helpers/naming-helpers.ts +2 -2
- package/src/modular/helpers/operation-helpers.ts +27 -27
- package/src/modular/helpers/type-helpers.ts +1 -1
- package/src/modular/interfaces.ts +4 -4
- package/src/modular/serialization/build-deserializer-function.ts +2 -2
- package/src/modular/serialization/build-serializer-function.ts +2 -2
- package/src/modular/serialization/build-xml-serializer-function.ts +1 -1
- package/src/modular/type-expressions/get-enum-expression.ts +1 -1
- package/src/modular/type-expressions/get-nullable-expression.ts +1 -1
- package/src/modular/type-expressions/get-type-expression.ts +3 -3
- package/src/transform/transform-api-version-info.ts +4 -10
- package/src/transform/{transfrom-rlc-options.ts → transform-client-options.ts} +12 -22
- package/src/transform/transform-helper-function-details.ts +5 -5
- package/src/transform/transform-parameters.ts +12 -12
- package/src/transform/transform-paths.ts +5 -12
- package/src/transform/transform-responses.ts +19 -19
- package/src/transform/transform-schemas.ts +5 -5
- package/src/transform/transform-telemetry-info.ts +3 -3
- package/src/transform/transform.ts +13 -18
- package/src/utils/client-utils.ts +11 -11
- package/src/utils/cross-language-def.ts +3 -3
- package/src/utils/emit-util.ts +3 -3
- package/src/{rlc-common/helpers → utils}/imports-util.ts +6 -6
- package/src/utils/interfaces.ts +3 -4
- package/src/utils/model-utils.ts +7 -8
- package/src/{rlc-common/helpers → utils}/name-constructors.ts +2 -2
- package/src/utils/namespace-utils.ts +4 -4
- package/src/{rlc-common/helpers → utils}/operation-helpers.ts +12 -12
- package/src/utils/operation-util.ts +19 -33
- package/src/utils/parameter-utils.ts +2 -4
- package/src/{rlc-common/helpers → utils}/schema-helpers.ts +2 -2
- package/dist/src/rlc-common/helpers/api-version-util.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/api-version-util.js.map +0 -1
- package/dist/src/rlc-common/helpers/imports-util.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/imports-util.js.map +0 -1
- package/dist/src/rlc-common/helpers/name-constructors.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/name-constructors.js.map +0 -1
- package/dist/src/rlc-common/helpers/name-utils.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/name-utils.js.map +0 -1
- package/dist/src/rlc-common/helpers/operation-helpers.d.ts +0 -16
- package/dist/src/rlc-common/helpers/operation-helpers.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/operation-helpers.js.map +0 -1
- package/dist/src/rlc-common/helpers/schema-helpers.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/schema-helpers.js.map +0 -1
- package/dist/src/rlc-common/helpers/type-util.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/type-util.js.map +0 -1
- package/dist/src/rlc-common/index.d.ts +0 -23
- package/dist/src/rlc-common/index.d.ts.map +0 -1
- package/dist/src/rlc-common/index.js +0 -25
- package/dist/src/rlc-common/index.js.map +0 -1
- package/dist/src/rlc-common/interfaces.d.ts.map +0 -1
- package/dist/src/rlc-common/interfaces.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts +0 -6
- package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-api-extractor-config.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-changelog-file.d.ts +0 -6
- package/dist/src/rlc-common/metadata/build-changelog-file.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-changelog-file.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts +0 -6
- package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-es-lint-config.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-license-file.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-license-file.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-package-file.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-package-file.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-readme-file.d.ts +0 -11
- package/dist/src/rlc-common/metadata/build-readme-file.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-readme-file.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-sample-env-file.d.ts +0 -6
- package/dist/src/rlc-common/metadata/build-sample-env-file.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-sample-env-file.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-test-config.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-test-config.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-ts-config.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-ts-config.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-vitest-config.d.ts +0 -6
- package/dist/src/rlc-common/metadata/build-vitest-config.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-vitest-config.js.map +0 -1
- package/dist/src/rlc-common/metadata/build-warp-config.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/build-warp-config.js.map +0 -1
- package/dist/src/rlc-common/metadata/package-json/azure-package-common.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/package-json/azure-package-common.js.map +0 -1
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js.map +0 -1
- package/dist/src/rlc-common/metadata/package-json/package-common.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/package-json/package-common.js.map +0 -1
- package/dist/src/rlc-common/metadata/utils.d.ts +0 -3
- package/dist/src/rlc-common/metadata/utils.d.ts.map +0 -1
- package/dist/src/rlc-common/metadata/utils.js.map +0 -1
- package/dist/src/rlc-common/static/paginate-content.d.ts +0 -2
- package/dist/src/rlc-common/static/paginate-content.d.ts.map +0 -1
- package/dist/src/rlc-common/static/paginate-content.js +0 -345
- package/dist/src/rlc-common/static/paginate-content.js.map +0 -1
- package/dist/src/rlc-common/static/polling-content.d.ts +0 -2
- package/dist/src/rlc-common/static/polling-content.d.ts.map +0 -1
- package/dist/src/rlc-common/static/polling-content.js +0 -225
- package/dist/src/rlc-common/static/polling-content.js.map +0 -1
- package/dist/src/rlc-common/static/sample-template.d.ts +0 -2
- package/dist/src/rlc-common/static/sample-template.d.ts.map +0 -1
- package/dist/src/rlc-common/static/sample-template.js +0 -56
- package/dist/src/rlc-common/static/sample-template.js.map +0 -1
- package/dist/src/rlc-common/static/serialize-helper.d.ts +0 -6
- package/dist/src/rlc-common/static/serialize-helper.d.ts.map +0 -1
- package/dist/src/rlc-common/static/serialize-helper.js +0 -31
- package/dist/src/rlc-common/static/serialize-helper.js.map +0 -1
- package/dist/src/rlc-common/test/build-karma-config.d.ts +0 -6
- package/dist/src/rlc-common/test/build-karma-config.d.ts.map +0 -1
- package/dist/src/rlc-common/test/build-karma-config.js +0 -11
- package/dist/src/rlc-common/test/build-karma-config.js.map +0 -1
- package/dist/src/rlc-common/test/build-recorded-client.d.ts +0 -6
- package/dist/src/rlc-common/test/build-recorded-client.d.ts.map +0 -1
- package/dist/src/rlc-common/test/build-recorded-client.js +0 -14
- package/dist/src/rlc-common/test/build-recorded-client.js.map +0 -1
- package/dist/src/rlc-common/test/build-sample-test.d.ts +0 -6
- package/dist/src/rlc-common/test/build-sample-test.d.ts.map +0 -1
- package/dist/src/rlc-common/test/build-sample-test.js +0 -11
- package/dist/src/rlc-common/test/build-sample-test.js.map +0 -1
- package/dist/src/rlc-common/test/build-snippets.d.ts +0 -6
- package/dist/src/rlc-common/test/build-snippets.d.ts.map +0 -1
- package/dist/src/rlc-common/test/build-snippets.js.map +0 -1
- package/dist/src/rlc-common/test/template.d.ts +0 -5
- package/dist/src/rlc-common/test/template.d.ts.map +0 -1
- package/dist/src/rlc-common/test/template.js +0 -227
- package/dist/src/rlc-common/test/template.js.map +0 -1
- package/dist/src/transform/transfrom-rlc-options.d.ts.map +0 -1
- package/dist/src/transform/transfrom-rlc-options.js.map +0 -1
- package/src/rlc-common/index.ts +0 -25
- package/src/rlc-common/static/paginate-content.ts +0 -345
- package/src/rlc-common/static/polling-content.ts +0 -225
- package/src/rlc-common/static/sample-template.ts +0 -56
- package/src/rlc-common/static/serialize-helper.ts +0 -34
- package/src/rlc-common/test/build-karma-config.ts +0 -12
- package/src/rlc-common/test/build-recorded-client.ts +0 -15
- package/src/rlc-common/test/build-sample-test.ts +0 -12
- package/src/rlc-common/test/template.ts +0 -229
- /package/dist/src/{rlc-common/interfaces.js → interfaces.js} +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-api-extractor-config.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-changelog-file.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-es-lint-config.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-license-file.d.ts +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-license-file.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-sample-env-file.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-test-config.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-ts-config.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-vitest-config.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/build-warp-config.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/package-json/azure-package-common.d.ts +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/package-json/azure-package-common.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/package-json/build-azure-monorepo-package.d.ts +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/package-json/package-common.d.ts +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/package-json/package-common.js +0 -0
- /package/dist/src/{rlc-common/metadata → metadata}/utils.js +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/api-version-util.d.ts +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/api-version-util.js +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/imports-util.d.ts +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/name-constructors.js +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/name-utils.d.ts +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/name-utils.js +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/operation-helpers.js +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/schema-helpers.js +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/type-util.d.ts +0 -0
- /package/dist/src/{rlc-common/helpers → utils}/type-util.js +0 -0
- /package/src/{rlc-common/metadata → metadata}/build-license-file.ts +0 -0
- /package/src/{rlc-common/metadata → metadata}/package-json/azure-package-common.ts +0 -0
- /package/src/{rlc-common/metadata → metadata}/package-json/package-common.ts +0 -0
- /package/src/{rlc-common/helpers → utils}/api-version-util.ts +0 -0
- /package/src/{rlc-common/helpers → utils}/name-utils.ts +0 -0
- /package/src/{rlc-common/helpers → utils}/type-util.ts +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-ts",
|
|
3
|
-
"version": "0.56.0-dev.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.56.0-dev.10",
|
|
4
|
+
"description": "A TypeSpec emitter for TypeScript",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
"@typespec/xml": "^0.83.0 || >=0.84.0-dev <0.84.0",
|
|
43
43
|
"@typespec/ts-http-runtime": "0.3.6",
|
|
44
44
|
"cross-env": "^10.1.0",
|
|
45
|
-
"
|
|
46
|
-
"npm-run-all": "~4.1.5",
|
|
47
|
-
"prettier": "^3.8.1",
|
|
45
|
+
"concurrently": "^10.0.0",
|
|
48
46
|
"vitest": "^4.1.3",
|
|
49
47
|
"vite": "^8.0.8",
|
|
50
48
|
"@vitest/coverage-v8": "^4.1.3",
|
|
@@ -62,7 +60,6 @@
|
|
|
62
60
|
},
|
|
63
61
|
"dependencies": {
|
|
64
62
|
"fast-xml-parser": "^5.7.0",
|
|
65
|
-
"handlebars": "^4.7.7",
|
|
66
63
|
"prettier": "^3.8.1",
|
|
67
64
|
"ts-morph": "^23.0.0",
|
|
68
65
|
"tslib": "^2.3.1"
|
|
@@ -89,28 +86,21 @@
|
|
|
89
86
|
"clean": "rimraf ./dist ./typespec-output",
|
|
90
87
|
"build": "tsc -p .",
|
|
91
88
|
"test": "npm run test-next && npm run unit-test && npm run integration-test-ci",
|
|
92
|
-
"
|
|
93
|
-
"lint": "
|
|
94
|
-
"lint:fix": "eslint . --fix --ext .ts",
|
|
89
|
+
"lint": "oxlint . --deny-warnings",
|
|
90
|
+
"lint:fix": "oxlint . --fix",
|
|
95
91
|
"check:tree": "node ./test/commands/check-clean-tree.ts",
|
|
96
|
-
"test
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"integration-test-ci:azure-modular": "npm-run-all --silent -p start-test-server:azure-modular --race generate-and-run:azure-modular",
|
|
100
|
-
"start-test-server": "mkdirp -p coverage && npx tsp-spector serve ./node_modules/@typespec/http-specs/specs --coverageFile ./coverage/spector-coverage-typescript.json",
|
|
101
|
-
"start-test-server:azure-modular": "mkdirp -p coverage && npx tsp-spector serve ./node_modules/@azure-tools/azure-http-specs/specs ./node_modules/@typespec/http-specs/specs --port 3002 --coverageFile ./coverage/spector-coverage-typescript-modular-azure.json",
|
|
92
|
+
"integration-test-ci": "npm run copy:typespec && npm run spector-test",
|
|
93
|
+
"spector-test": "concurrently --kill-others --success first \"npm:start-test-server\" \"npm:generate-and-run\"",
|
|
94
|
+
"start-test-server": "node ./test/commands/start-test-server.js",
|
|
102
95
|
"copy:typespec": "node ./test/commands/copy-typespec.ts",
|
|
103
|
-
"generate-and-run
|
|
104
|
-
"generate-tsp-only": "
|
|
105
|
-
"generate-tsp-only:
|
|
106
|
-
"generate-tsp-only:
|
|
107
|
-
"generate-tsp-only:azure-modular:declarations": "node ./test/commands/gen-spector.js --phase=declarations",
|
|
96
|
+
"generate-and-run": "npm run generate-tsp-only:client && concurrently --kill-others-on-fail \"npm:integration-test:alone\" \"npm:generate-tsp-only:declarations\" && npm run stop-test-server -- -p 3002",
|
|
97
|
+
"generate-tsp-only": "node ./test/commands/gen-spector.js",
|
|
98
|
+
"generate-tsp-only:client": "node ./test/commands/gen-spector.js --phase=client",
|
|
99
|
+
"generate-tsp-only:declarations": "node ./test/commands/gen-spector.js --phase=declarations",
|
|
108
100
|
"regen-test-baselines": "npm run generate-tsp-only",
|
|
109
|
-
"integration-test:alone": "
|
|
110
|
-
"integration-test:alone:azure-modular": "vitest run --project integration-azure-modular",
|
|
101
|
+
"integration-test:alone": "vitest run --project integration-azure-modular",
|
|
111
102
|
"stop-test-server": "npx tsp-spector server stop",
|
|
112
|
-
"unit-test": "
|
|
113
|
-
"unit-test:modular": "cross-env NODE_OPTIONS=--max-old-space-size=1024 vitest run --project unit-modular",
|
|
103
|
+
"unit-test": "cross-env NODE_OPTIONS=--max-old-space-size=1024 vitest run --project unit-modular",
|
|
114
104
|
"gen:scenario-suites": "node ./test/commands/gen-scenario-suites.ts",
|
|
115
105
|
"regen-docs": "npm run build && tspd doc . --enable-experimental --output-dir ../../website/src/content/docs/docs/emitters/clients/typespec-ts/reference --skip-js"
|
|
116
106
|
}
|
package/src/context-manager.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Project, SourceFile } from "ts-morph";
|
|
|
4
4
|
import { ExternalDependencies } from "./framework/dependency.js";
|
|
5
5
|
import { Binder } from "./framework/hooks/binder.js";
|
|
6
6
|
import { SdkTypeContext } from "./framework/hooks/sdk-types.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ClientTypeMetaTree } from "./meta-tree.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Contexts Object Guidelines
|
|
@@ -20,7 +20,7 @@ import { RlcMetaTree } from "./meta-tree.js";
|
|
|
20
20
|
* Remember, adding too many contexts can lead to complex dependencies and harder-to-maintain code. Always evaluate if the context is truly necessary or if there are better alternatives such as localized state management or passing props for simpler scenarios.
|
|
21
21
|
*/
|
|
22
22
|
type Contexts = {
|
|
23
|
-
|
|
23
|
+
clientTypeMetaTree: ClientTypeMetaTree; // Context for client type metadata.
|
|
24
24
|
outputProject: Project; // The TS-Morph root project context for code generation.
|
|
25
25
|
symbolMap: Map<string, SourceFile>; // Mapping of symbols to their corresponding source files.
|
|
26
26
|
sdkTypes: SdkTypeContext;
|
|
@@ -8,12 +8,14 @@ import {
|
|
|
8
8
|
InterfaceDeclaration,
|
|
9
9
|
InterfaceDeclarationStructure,
|
|
10
10
|
SourceFile,
|
|
11
|
+
StatementStructures,
|
|
11
12
|
StructureKind,
|
|
12
13
|
TypeAliasDeclaration,
|
|
13
14
|
TypeAliasDeclarationStructure,
|
|
14
15
|
} from "ts-morph";
|
|
15
16
|
import { useBinder } from "./hooks/binder.js";
|
|
16
17
|
import { refkey as getRefKey } from "./refkey.js";
|
|
18
|
+
import { enqueueStatement } from "./source-file-batch.js";
|
|
17
19
|
export type DeclarationStructures =
|
|
18
20
|
| ClassDeclarationStructure
|
|
19
21
|
| EnumDeclarationStructure
|
|
@@ -80,25 +82,11 @@ export function addDeclaration(
|
|
|
80
82
|
// Update the declaration name to be unique
|
|
81
83
|
const trackedDeclaration = { ...declaration, name: trackedDeclarationName };
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
case StructureKind.Enum:
|
|
88
|
-
sourceFile.addEnum(trackedDeclaration);
|
|
89
|
-
break;
|
|
90
|
-
case StructureKind.Function:
|
|
91
|
-
sourceFile.addFunction(trackedDeclaration);
|
|
92
|
-
break;
|
|
93
|
-
case StructureKind.Interface:
|
|
94
|
-
sourceFile.addInterface(trackedDeclaration);
|
|
95
|
-
break;
|
|
96
|
-
case StructureKind.TypeAlias:
|
|
97
|
-
if (trackedDeclaration.type) {
|
|
98
|
-
sourceFile.addTypeAlias(trackedDeclaration);
|
|
99
|
-
}
|
|
100
|
-
break;
|
|
101
|
-
default:
|
|
102
|
-
throw new Error(`Unsupported declaration kind ${(trackedDeclaration as any).kind}`);
|
|
85
|
+
// Skip empty type aliases (they have no body to emit). Done before
|
|
86
|
+
// dispatching so behaviour is identical whether batching or not.
|
|
87
|
+
if (trackedDeclaration.kind === StructureKind.TypeAlias && !trackedDeclaration.type) {
|
|
88
|
+
return;
|
|
103
89
|
}
|
|
90
|
+
|
|
91
|
+
enqueueStatement(sourceFile, trackedDeclaration as StatementStructures);
|
|
104
92
|
}
|
|
@@ -14,8 +14,8 @@ import { reportDiagnostic } from "../../lib.js";
|
|
|
14
14
|
import { visitPackageTypes } from "../../modular/emit-models.js";
|
|
15
15
|
import { getAllAncestors, getAllProperties } from "../../modular/helpers/operation-helpers.js";
|
|
16
16
|
import { normalizeModelPropertyName } from "../../modular/type-expressions/get-type-expression.js";
|
|
17
|
-
import { NameType, normalizeName } from "../../rlc-common/index.js";
|
|
18
17
|
import { SdkContext } from "../../utils/interfaces.js";
|
|
18
|
+
import { NameType, normalizeName } from "../../utils/name-utils.js";
|
|
19
19
|
|
|
20
20
|
export const emitQueue: Set<SdkType> = new Set<SdkType>();
|
|
21
21
|
export const flattenPropertyModelMap: Map<SdkModelPropertyType, SdkModelType> = new Map<
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ExportDeclarationStructure,
|
|
3
|
+
SourceFile,
|
|
4
|
+
StatementStructures,
|
|
5
|
+
StructureKind,
|
|
6
|
+
} from "ts-morph";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Generic per-source-file batch for ts-morph `add*` mutations.
|
|
10
|
+
*
|
|
11
|
+
* Each individual `sourceFile.addInterface/addFunction/addExportDeclaration/...`
|
|
12
|
+
* call re-parses the entire source file in ts-morph. Calling them in a loop
|
|
13
|
+
* therefore grows as O(N × file_size). This module collects structures while
|
|
14
|
+
* a batch is open and, on flush, issues a single `addStatements` call per file,
|
|
15
|
+
* collapsing N re-parses into 1.
|
|
16
|
+
*
|
|
17
|
+
* The batch is reference-counted so nested begin/flush pairs compose safely.
|
|
18
|
+
* Statements flush in insertion order and produce byte-identical output.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
let batchDepth = 0;
|
|
22
|
+
const pendingByFile = new Map<SourceFile, StatementStructures[]>();
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Opens a batching scope. Subsequent `enqueueStatement` calls queue rather
|
|
26
|
+
* than mutate the AST until the matching `flushSourceFileBatch` is called.
|
|
27
|
+
*/
|
|
28
|
+
export function beginSourceFileBatch(): void {
|
|
29
|
+
batchDepth++;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Closes the most recent batching scope. When the outermost scope closes,
|
|
34
|
+
* all pending structures are written to their source files in bulk.
|
|
35
|
+
*/
|
|
36
|
+
export function flushSourceFileBatch(): void {
|
|
37
|
+
if (batchDepth === 0) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
batchDepth--;
|
|
41
|
+
if (batchDepth > 0) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
for (const [sourceFile, statements] of pendingByFile) {
|
|
46
|
+
if (statements.length === 0) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
sourceFile.addStatements(statements);
|
|
50
|
+
}
|
|
51
|
+
} finally {
|
|
52
|
+
pendingByFile.clear();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Queues a statement structure for bulk-add on flush, or writes it
|
|
58
|
+
* immediately when no batch is open.
|
|
59
|
+
* @param sourceFile - Target source file.
|
|
60
|
+
* @param structure - The statement structure to add.
|
|
61
|
+
*/
|
|
62
|
+
export function enqueueStatement(sourceFile: SourceFile, structure: StatementStructures): void {
|
|
63
|
+
if (batchDepth > 0) {
|
|
64
|
+
let pending = pendingByFile.get(sourceFile);
|
|
65
|
+
if (!pending) {
|
|
66
|
+
pending = [];
|
|
67
|
+
pendingByFile.set(sourceFile, pending);
|
|
68
|
+
}
|
|
69
|
+
pending.push(structure);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
sourceFile.addStatements([structure]);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Returns the set of names exported from `sourceFile` considering both the
|
|
77
|
+
* declarations already present in its AST and any export declarations queued
|
|
78
|
+
* by the current batch. Use this in place of reading `getExportDeclarations`
|
|
79
|
+
* directly when callers dedup against existing exports inside a batch.
|
|
80
|
+
* @param sourceFile - The file to inspect.
|
|
81
|
+
*/
|
|
82
|
+
export function getEffectiveExportedNames(sourceFile: SourceFile): Set<string> {
|
|
83
|
+
const names = new Set<string>();
|
|
84
|
+
for (const decl of sourceFile.getExportDeclarations()) {
|
|
85
|
+
for (const named of decl.getNamedExports()) {
|
|
86
|
+
names.add(named.getAliasNode()?.getText() ?? named.getName());
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const pending = pendingByFile.get(sourceFile);
|
|
90
|
+
if (pending) {
|
|
91
|
+
for (const structure of pending) {
|
|
92
|
+
if (structure.kind !== StructureKind.ExportDeclaration) {
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
collectNamedExportNames(structure.namedExports, names);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return names;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Returns the set of named exports queued in the current batch for
|
|
103
|
+
* `sourceFile`. Use this to union with any AST-based view of exports
|
|
104
|
+
* (e.g. `getExportedDeclarations`) when deduplicating against still-pending
|
|
105
|
+
* writes inside a batch.
|
|
106
|
+
* @param sourceFile - The file to inspect.
|
|
107
|
+
*/
|
|
108
|
+
export function getQueuedExportNames(sourceFile: SourceFile): Set<string> {
|
|
109
|
+
const names = new Set<string>();
|
|
110
|
+
const pending = pendingByFile.get(sourceFile);
|
|
111
|
+
if (!pending) {
|
|
112
|
+
return names;
|
|
113
|
+
}
|
|
114
|
+
for (const structure of pending) {
|
|
115
|
+
if (structure.kind !== StructureKind.ExportDeclaration) {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
collectNamedExportNames(structure.namedExports, names);
|
|
119
|
+
}
|
|
120
|
+
return names;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function collectNamedExportNames(
|
|
124
|
+
named: ExportDeclarationStructure["namedExports"],
|
|
125
|
+
into: Set<string>,
|
|
126
|
+
): void {
|
|
127
|
+
if (!named || typeof named === "function") {
|
|
128
|
+
// WriterFunction form is opaque to us; callers can't dedup by name.
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
for (const item of named) {
|
|
132
|
+
if (typeof item === "string") {
|
|
133
|
+
into.add(item);
|
|
134
|
+
} else if (typeof item === "function") {
|
|
135
|
+
continue;
|
|
136
|
+
} else if (item) {
|
|
137
|
+
into.add(item.alias ?? item.name);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -31,37 +31,6 @@ import {
|
|
|
31
31
|
UrlTemplateHelpers,
|
|
32
32
|
XmlHelpers,
|
|
33
33
|
} from "./modular/static-helpers-metadata.js";
|
|
34
|
-
import {
|
|
35
|
-
RLCModel,
|
|
36
|
-
RLCOptions,
|
|
37
|
-
buildApiExtractorConfig,
|
|
38
|
-
buildChangelogFile,
|
|
39
|
-
buildEsLintConfig,
|
|
40
|
-
buildLicenseFile,
|
|
41
|
-
buildPackageFile,
|
|
42
|
-
buildReadmeFile,
|
|
43
|
-
buildRecordedClientFile,
|
|
44
|
-
buildSampleEnvFile,
|
|
45
|
-
buildSampleTest,
|
|
46
|
-
buildSnippets,
|
|
47
|
-
buildTestBrowserTsConfig,
|
|
48
|
-
buildTestNodeTsConfig,
|
|
49
|
-
buildTsConfig,
|
|
50
|
-
buildTsLintConfig,
|
|
51
|
-
buildTsSampleConfig,
|
|
52
|
-
buildTsSnippetsConfig,
|
|
53
|
-
buildTsSrcBrowserConfig,
|
|
54
|
-
buildTsSrcCjsConfig,
|
|
55
|
-
buildTsSrcEsmConfig,
|
|
56
|
-
buildTsSrcReactNativeConfig,
|
|
57
|
-
buildVitestConfig,
|
|
58
|
-
buildWarpConfig,
|
|
59
|
-
getClientName,
|
|
60
|
-
hasClientNameChanged,
|
|
61
|
-
hasUnexpectedHelper,
|
|
62
|
-
updatePackageFile,
|
|
63
|
-
updateReadmeFile,
|
|
64
|
-
} from "./rlc-common/index.js";
|
|
65
34
|
import { emitContentByBuilder } from "./utils/emit-util.js";
|
|
66
35
|
import { clearDirectory, emptyDir, pathExists } from "./utils/file-system-utils.js";
|
|
67
36
|
import { GenerationDirDetail, SdkContext } from "./utils/interfaces.js";
|
|
@@ -76,7 +45,35 @@ import { Project } from "ts-morph";
|
|
|
76
45
|
import { provideBinder } from "./framework/hooks/binder.js";
|
|
77
46
|
import { provideSdkTypes } from "./framework/hooks/sdk-types.js";
|
|
78
47
|
import { loadStaticHelpers } from "./framework/load-static-helpers.js";
|
|
48
|
+
import { ClientModel, ClientOptions } from "./interfaces.js";
|
|
79
49
|
import { EmitterOptions } from "./lib.js";
|
|
50
|
+
import { buildApiExtractorConfig } from "./metadata/build-api-extractor-config.js";
|
|
51
|
+
import { buildChangelogFile } from "./metadata/build-changelog-file.js";
|
|
52
|
+
import { buildEsLintConfig } from "./metadata/build-es-lint-config.js";
|
|
53
|
+
import { buildLicenseFile } from "./metadata/build-license-file.js";
|
|
54
|
+
import { buildPackageFile, updatePackageFile } from "./metadata/build-package-file.js";
|
|
55
|
+
import {
|
|
56
|
+
buildReadmeFile,
|
|
57
|
+
hasClientNameChanged,
|
|
58
|
+
updateReadmeFile,
|
|
59
|
+
} from "./metadata/build-readme-file.js";
|
|
60
|
+
import { buildSampleEnvFile } from "./metadata/build-sample-env-file.js";
|
|
61
|
+
import { buildTestBrowserTsConfig, buildTestNodeTsConfig } from "./metadata/build-test-config.js";
|
|
62
|
+
import {
|
|
63
|
+
buildTsConfig,
|
|
64
|
+
buildTsLintConfig,
|
|
65
|
+
buildTsSampleConfig,
|
|
66
|
+
buildTsSnippetsConfig,
|
|
67
|
+
buildTsSrcBrowserConfig,
|
|
68
|
+
buildTsSrcCjsConfig,
|
|
69
|
+
buildTsSrcEsmConfig,
|
|
70
|
+
buildTsSrcReactNativeConfig,
|
|
71
|
+
} from "./metadata/build-ts-config.js";
|
|
72
|
+
import { buildVitestConfig } from "./metadata/build-vitest-config.js";
|
|
73
|
+
import { buildWarpConfig } from "./metadata/build-warp-config.js";
|
|
74
|
+
import { buildRecordedClientFile } from "./metadata/test/build-recorded-client.js";
|
|
75
|
+
import { buildSampleTest } from "./metadata/test/build-sample-test.js";
|
|
76
|
+
import { buildSnippets } from "./metadata/test/build-snippets.js";
|
|
80
77
|
import { buildClassicalClient } from "./modular/build-classical-client.js";
|
|
81
78
|
import { buildClassicOperationFiles } from "./modular/build-classical-operation-groups.js";
|
|
82
79
|
import { buildClientContext, getClientContextPath } from "./modular/build-client-context.js";
|
|
@@ -93,13 +90,9 @@ import { emitTests } from "./modular/emit-tests.js";
|
|
|
93
90
|
import { getClassicalClientName } from "./modular/helpers/naming-helpers.js";
|
|
94
91
|
import { ModularEmitterOptions } from "./modular/interfaces.js";
|
|
95
92
|
import { packageUsesXmlSerialization } from "./modular/serialization/build-xml-serializer-function.js";
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
getClientHierarchyMap,
|
|
100
|
-
getModularClientOptions,
|
|
101
|
-
getRLCClients,
|
|
102
|
-
} from "./utils/client-utils.js";
|
|
93
|
+
import { transformClientOptions } from "./transform/transform-client-options.js";
|
|
94
|
+
import { transformClientModel } from "./transform/transform.js";
|
|
95
|
+
import { getClientHierarchyMap, getClientModuleInfo, getClients } from "./utils/client-utils.js";
|
|
103
96
|
import { generateCrossLanguageDefinitionFile } from "./utils/cross-language-def.js";
|
|
104
97
|
|
|
105
98
|
export * from "./lib.js";
|
|
@@ -128,11 +121,9 @@ export async function $onEmit(context: EmitContext) {
|
|
|
128
121
|
|
|
129
122
|
// Enrich the dpg context with path detail and common options
|
|
130
123
|
await enrichDpgContext();
|
|
131
|
-
const
|
|
124
|
+
const resolvedEmitterOptions = dpgContext.emitterOptions ?? {};
|
|
132
125
|
|
|
133
|
-
|
|
134
|
-
const serviceNameToRlcModelsMap: Map<string, RLCModel> = new Map<string, RLCModel>();
|
|
135
|
-
provideContext("rlcMetaTree", new Map());
|
|
126
|
+
provideContext("clientTypeMetaTree", new Map());
|
|
136
127
|
provideContext("symbolMap", new Map());
|
|
137
128
|
provideContext("outputProject", outputProject);
|
|
138
129
|
provideContext("emitContext", {
|
|
@@ -151,13 +142,13 @@ export async function $onEmit(context: EmitContext) {
|
|
|
151
142
|
...PlatformTypeHelpers,
|
|
152
143
|
...CloudSettingHelpers,
|
|
153
144
|
...XmlHelpers,
|
|
154
|
-
...(
|
|
155
|
-
...(
|
|
145
|
+
...(resolvedEmitterOptions.generateTest ? CreateRecorderHelpers : {}),
|
|
146
|
+
...(resolvedEmitterOptions.enableStorageCompat ? StorageCompatHelpers : {}),
|
|
156
147
|
},
|
|
157
148
|
{
|
|
158
|
-
sourcesDir: dpgContext.generationPathDetail?.
|
|
149
|
+
sourcesDir: dpgContext.generationPathDetail?.sourcesDir,
|
|
159
150
|
rootDir: dpgContext.generationPathDetail?.rootDir,
|
|
160
|
-
options:
|
|
151
|
+
options: resolvedEmitterOptions,
|
|
161
152
|
program,
|
|
162
153
|
host,
|
|
163
154
|
packageRoot: emitterPackageRoot,
|
|
@@ -178,20 +169,16 @@ export async function $onEmit(context: EmitContext) {
|
|
|
178
169
|
});
|
|
179
170
|
provideSdkTypes(dpgContext);
|
|
180
171
|
|
|
181
|
-
const rlcCodeModels: RLCModel[] = [];
|
|
182
172
|
let modularEmitterOptions: ModularEmitterOptions;
|
|
183
173
|
// 1. Clear sources folder
|
|
184
174
|
await clearSrcFolder();
|
|
185
|
-
// 2.
|
|
186
|
-
// TODO: skip this step in modular once modular generator is sufficiently decoupled
|
|
187
|
-
await buildRLCCodeModels();
|
|
188
|
-
// 3. Clear samples-dev folder if generateSample is true
|
|
175
|
+
// 2. Clear samples-dev folder if generateSample is true
|
|
189
176
|
await clearSamplesDevFolder();
|
|
190
177
|
|
|
191
|
-
//
|
|
192
|
-
await
|
|
178
|
+
// 3. Generate sources
|
|
179
|
+
await generateSources();
|
|
193
180
|
|
|
194
|
-
//
|
|
181
|
+
// 4. Generate metadata and test files
|
|
195
182
|
function getTypespecTsVersion(context: EmitContext): string | undefined {
|
|
196
183
|
const emitterMetadata = context.program.emitters.find(
|
|
197
184
|
(emitter) => emitter.metadata.name === "@azure-tools/typespec-ts",
|
|
@@ -205,7 +192,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
205
192
|
const generationPathDetail: GenerationDirDetail = await calculateGenerationDir();
|
|
206
193
|
dpgContext.generationPathDetail = generationPathDetail;
|
|
207
194
|
dpgContext.allServiceNamespaces = listAllServiceNamespaces(dpgContext);
|
|
208
|
-
const options:
|
|
195
|
+
const options: ClientOptions = transformClientOptions(emitterOptions, dpgContext);
|
|
209
196
|
emitterOptions["generate-sample"] = options.generateSample;
|
|
210
197
|
// clear output folder if needed
|
|
211
198
|
if (options.clearOutputFolder) {
|
|
@@ -219,7 +206,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
219
206
|
options.generateTest =
|
|
220
207
|
options.generateTest === true ||
|
|
221
208
|
(options.generateTest === undefined && (!hasTestFolder || options.azureArm));
|
|
222
|
-
dpgContext.
|
|
209
|
+
dpgContext.emitterOptions = options;
|
|
223
210
|
}
|
|
224
211
|
|
|
225
212
|
async function calculateGenerationDir(): Promise<GenerationDirDetail> {
|
|
@@ -236,18 +223,12 @@ export async function $onEmit(context: EmitContext) {
|
|
|
236
223
|
return {
|
|
237
224
|
rootDir: projectRoot,
|
|
238
225
|
metadataDir: projectRoot,
|
|
239
|
-
|
|
240
|
-
modularSourcesDir: sourcesRoot,
|
|
226
|
+
sourcesDir: sourcesRoot,
|
|
241
227
|
};
|
|
242
228
|
}
|
|
243
229
|
|
|
244
230
|
async function clearSrcFolder() {
|
|
245
|
-
await emptyDir(
|
|
246
|
-
host,
|
|
247
|
-
dpgContext.generationPathDetail?.modularSourcesDir ??
|
|
248
|
-
dpgContext.generationPathDetail?.rlcSourcesDir ??
|
|
249
|
-
"",
|
|
250
|
-
);
|
|
231
|
+
await emptyDir(host, dpgContext.generationPathDetail?.sourcesDir ?? "");
|
|
251
232
|
}
|
|
252
233
|
|
|
253
234
|
async function clearSamplesDevFolder() {
|
|
@@ -262,32 +243,30 @@ export async function $onEmit(context: EmitContext) {
|
|
|
262
243
|
}
|
|
263
244
|
}
|
|
264
245
|
|
|
265
|
-
async function
|
|
266
|
-
const
|
|
246
|
+
async function buildClientCodeModels(): Promise<ClientModel[]> {
|
|
247
|
+
const models: ClientModel[] = [];
|
|
248
|
+
const clients = getClients(dpgContext);
|
|
267
249
|
for (const client of clients) {
|
|
268
|
-
|
|
269
|
-
rlcCodeModels.push(rlcModels);
|
|
270
|
-
const serviceName = client.services[0]?.name ?? "Unknown";
|
|
271
|
-
serviceNameToRlcModelsMap.set(serviceName, rlcModels);
|
|
272
|
-
needUnexpectedHelper.set(getClientName(rlcModels), hasUnexpectedHelper(rlcModels));
|
|
250
|
+
models.push(await transformClientModel(client, dpgContext));
|
|
273
251
|
}
|
|
252
|
+
return models;
|
|
274
253
|
}
|
|
275
254
|
|
|
276
|
-
async function
|
|
277
|
-
const
|
|
255
|
+
async function generateSources() {
|
|
256
|
+
const sourcesRoot = dpgContext.generationPathDetail?.sourcesDir ?? "src";
|
|
278
257
|
const project = useContext("outputProject");
|
|
279
|
-
modularEmitterOptions = transformModularEmitterOptions(dpgContext,
|
|
258
|
+
modularEmitterOptions = transformModularEmitterOptions(dpgContext, sourcesRoot, {
|
|
280
259
|
casing: "camel",
|
|
281
260
|
});
|
|
282
261
|
|
|
283
|
-
emitLoggerFile(modularEmitterOptions,
|
|
262
|
+
emitLoggerFile(modularEmitterOptions, sourcesRoot);
|
|
284
263
|
|
|
285
|
-
const rootIndexFile = project.createSourceFile(`${
|
|
264
|
+
const rootIndexFile = project.createSourceFile(`${sourcesRoot}/index.ts`, "", {
|
|
286
265
|
overwrite: true,
|
|
287
266
|
});
|
|
288
267
|
|
|
289
|
-
emitTypes(dpgContext, { sourceRoot:
|
|
290
|
-
emitNonModelResponseTypes(dpgContext, { sourceRoot:
|
|
268
|
+
emitTypes(dpgContext, { sourceRoot: sourcesRoot });
|
|
269
|
+
emitNonModelResponseTypes(dpgContext, { sourceRoot: sourcesRoot });
|
|
291
270
|
buildSubpathIndexFile(modularEmitterOptions, "models", undefined, {
|
|
292
271
|
recursive: true,
|
|
293
272
|
});
|
|
@@ -302,7 +281,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
302
281
|
buildOperationFiles(dpgContext, subClient, modularEmitterOptions);
|
|
303
282
|
buildClientContext(dpgContext, subClient, modularEmitterOptions);
|
|
304
283
|
buildRestorePoller(dpgContext, subClient, modularEmitterOptions);
|
|
305
|
-
if (dpgContext.
|
|
284
|
+
if (dpgContext.emitterOptions?.hierarchyClient) {
|
|
306
285
|
buildSubpathIndexFile(modularEmitterOptions, "api", subClient, {
|
|
307
286
|
exportIndex: false,
|
|
308
287
|
recursive: true,
|
|
@@ -320,24 +299,24 @@ export async function $onEmit(context: EmitContext) {
|
|
|
320
299
|
exportIndex: true,
|
|
321
300
|
interfaceOnly: true,
|
|
322
301
|
});
|
|
323
|
-
const { subfolder } =
|
|
302
|
+
const { subfolder } = getClientModuleInfo(subClient);
|
|
324
303
|
// Generate index file for clients with subfolders (multi-client scenarios and nested clients)
|
|
325
304
|
if (subfolder) {
|
|
326
305
|
buildSubClientIndexFile(dpgContext, subClient, modularEmitterOptions);
|
|
327
306
|
}
|
|
328
307
|
buildRootIndex(dpgContext, modularEmitterOptions, rootIndexFile, subClient);
|
|
329
308
|
}
|
|
330
|
-
//
|
|
309
|
+
// Sample generation is enabled only when the modular generator actually emits
|
|
310
|
+
// samples. Reset the baseline here, then re-enable it below if any are emitted.
|
|
311
|
+
dpgContext.emitterOptions!.generateSample = false;
|
|
331
312
|
if (emitterOptions["generate-sample"] === true) {
|
|
332
313
|
const samples = emitSamples(dpgContext);
|
|
333
|
-
// Refine the rlc sample generation logic
|
|
334
|
-
// TODO: remember to remove this out when RLC is splitted from Modular
|
|
335
314
|
if (samples.length > 0) {
|
|
336
|
-
dpgContext.
|
|
315
|
+
dpgContext.emitterOptions!.generateSample = true;
|
|
337
316
|
}
|
|
338
317
|
}
|
|
339
318
|
|
|
340
|
-
binder.resolveAllReferences(
|
|
319
|
+
binder.resolveAllReferences(sourcesRoot, dpgContext.generationPathDetail?.rootDir);
|
|
341
320
|
if (program.compilerOptions.noEmit || program.hasError()) {
|
|
342
321
|
return;
|
|
343
322
|
}
|
|
@@ -382,17 +361,18 @@ export async function $onEmit(context: EmitContext) {
|
|
|
382
361
|
|
|
383
362
|
async function generateMetadataAndTest(context: SdkContext) {
|
|
384
363
|
const project = useContext("outputProject");
|
|
385
|
-
|
|
364
|
+
const clientCodeModels = await buildClientCodeModels();
|
|
365
|
+
if (clientCodeModels.length === 0 || !clientCodeModels[0]) {
|
|
386
366
|
return;
|
|
387
367
|
}
|
|
388
|
-
const
|
|
389
|
-
const option = dpgContext.
|
|
368
|
+
const clientModel: ClientModel = clientCodeModels[0];
|
|
369
|
+
const option = dpgContext.emitterOptions!;
|
|
390
370
|
// When generateMetadata is explicitly false and the sources are generated
|
|
391
371
|
// into a path ending with "generated" (e.g. src/generated), this package
|
|
392
372
|
// has a manual convenience layer. Skip all metadata/test file generation
|
|
393
373
|
// to avoid unexpected modifications to files like package.json, README.md,
|
|
394
374
|
// warp.config.yml, and snippets.spec.ts. metadata.json is still updated.
|
|
395
|
-
const sourcesDir = dpgContext.generationPathDetail?.
|
|
375
|
+
const sourcesDir = dpgContext.generationPathDetail?.sourcesDir ?? "";
|
|
396
376
|
const hasManualConvenienceLayer = getBaseFileName(sourcesDir) === "generated";
|
|
397
377
|
// Generate metadata
|
|
398
378
|
const existingPackageFilePath = joinPaths(
|
|
@@ -426,7 +406,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
426
406
|
|
|
427
407
|
//TODO Need consider multi-client cases
|
|
428
408
|
for (const subClient of dpgContext.sdkPackage.clients) {
|
|
429
|
-
|
|
409
|
+
clientModel.libraryName = subClient.name;
|
|
430
410
|
}
|
|
431
411
|
|
|
432
412
|
if (shouldGenerateMetadata) {
|
|
@@ -496,7 +476,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
496
476
|
await emitContentByBuilder(
|
|
497
477
|
program,
|
|
498
478
|
commonBuilders,
|
|
499
|
-
|
|
479
|
+
clientModel,
|
|
500
480
|
dpgContext.generationPathDetail?.metadataDir,
|
|
501
481
|
);
|
|
502
482
|
|
|
@@ -525,8 +505,8 @@ export async function $onEmit(context: EmitContext) {
|
|
|
525
505
|
}),
|
|
526
506
|
};
|
|
527
507
|
|
|
528
|
-
// Always update package.json (adds #platform/* imports)
|
|
529
|
-
//
|
|
508
|
+
// Always update package.json (adds #platform/* imports) along with
|
|
509
|
+
// exports, clientContextPaths and LRO deps.
|
|
530
510
|
{
|
|
531
511
|
// Read package.json content via host and pass parsed object
|
|
532
512
|
const pkgSourceFile = await host.readFile(existingPackageFilePath);
|
|
@@ -536,30 +516,30 @@ export async function $onEmit(context: EmitContext) {
|
|
|
536
516
|
} catch {
|
|
537
517
|
packageInfo = {};
|
|
538
518
|
}
|
|
539
|
-
updateBuilders.push((model:
|
|
519
|
+
updateBuilders.push((model: ClientModel) =>
|
|
540
520
|
updatePackageFile(model, packageInfo, modularPackageInfo),
|
|
541
521
|
);
|
|
542
522
|
}
|
|
543
523
|
|
|
544
524
|
// Update warp.config.yml for Azure monorepo packages
|
|
545
|
-
updateBuilders.push((model:
|
|
525
|
+
updateBuilders.push((model: ClientModel) => buildWarpConfig(model, modularPackageInfo));
|
|
546
526
|
|
|
547
527
|
// If the client name changed, regenerate the README and snippets completely;
|
|
548
528
|
// otherwise update only the API reference link in-place.
|
|
549
529
|
if (hasReadmeFile) {
|
|
550
530
|
const readmeSourceFile = await host.readFile(existingReadmeFilePath);
|
|
551
531
|
const existingReadmeContent = readmeSourceFile.text;
|
|
552
|
-
const clientNameChanged = hasClientNameChanged(
|
|
532
|
+
const clientNameChanged = hasClientNameChanged(clientModel, existingReadmeContent);
|
|
553
533
|
updateBuilders.push(
|
|
554
534
|
clientNameChanged
|
|
555
535
|
? buildReadmeFile
|
|
556
|
-
: (model:
|
|
536
|
+
: (model: ClientModel) => updateReadmeFile(model, existingReadmeContent),
|
|
557
537
|
);
|
|
558
538
|
|
|
559
539
|
// Regenerate snippets.spec.ts only when the client name changed
|
|
560
540
|
if (clientNameChanged) {
|
|
561
541
|
for (const subClient of dpgContext.sdkPackage.clients) {
|
|
562
|
-
updateBuilders.push((model:
|
|
542
|
+
updateBuilders.push((model: ClientModel) =>
|
|
563
543
|
buildSnippets(model, getClassicalClientName(subClient)),
|
|
564
544
|
);
|
|
565
545
|
}
|
|
@@ -570,14 +550,14 @@ export async function $onEmit(context: EmitContext) {
|
|
|
570
550
|
await emitContentByBuilder(
|
|
571
551
|
program,
|
|
572
552
|
updateBuilders,
|
|
573
|
-
|
|
553
|
+
clientModel,
|
|
574
554
|
dpgContext.generationPathDetail?.metadataDir,
|
|
575
555
|
);
|
|
576
556
|
}
|
|
577
557
|
await emitContentByBuilder(
|
|
578
558
|
program,
|
|
579
559
|
buildMetadataJson,
|
|
580
|
-
|
|
560
|
+
clientModel,
|
|
581
561
|
dpgContext.generationPathDetail?.metadataDir,
|
|
582
562
|
);
|
|
583
563
|
|
|
@@ -586,7 +566,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
586
566
|
await emitContentByBuilder(
|
|
587
567
|
program,
|
|
588
568
|
[buildRecordedClientFile, buildSampleTest],
|
|
589
|
-
|
|
569
|
+
clientModel,
|
|
590
570
|
dpgContext.generationPathDetail?.metadataDir,
|
|
591
571
|
);
|
|
592
572
|
}
|