diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 2a9e5fe14c..fdf161c3e5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -191,36 +191,36 @@ importers: ../../packages/typespec-test: specifiers: - '@azure-tools/typespec-autorest': '>=0.47.0 <1.0.0' - '@azure-tools/typespec-azure-core': '>=0.47.0 <1.0.0' - '@azure-tools/typespec-azure-resource-manager': '>=0.47.0 <1.0.0' - '@azure-tools/typespec-azure-rulesets': '>=0.47.0 <1.0.0' - '@azure-tools/typespec-client-generator-core': '>=0.47.4 <1.0.0' + '@azure-tools/typespec-autorest': '>=0.48.0 <1.0.0' + '@azure-tools/typespec-azure-core': '>=0.48.0 <1.0.0' + '@azure-tools/typespec-azure-resource-manager': '>=0.48.0 <1.0.0' + '@azure-tools/typespec-azure-rulesets': '>=0.48.0 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.48.0 <1.0.0' '@azure-tools/typespec-ts': workspace:^0.34.0 '@types/mocha': ^5.2.7 '@types/node': ^18.0.0 - '@typespec/compiler': '>=0.61.2 <1.0.0' - '@typespec/http': '>=0.61.0 <1.0.0' - '@typespec/openapi': '>=0.61.0 <1.0.0' - '@typespec/openapi3': '>=0.61.0 <1.0.0' - '@typespec/rest': '>=0.61.0 <1.0.0' - '@typespec/versioning': '>=0.61.0 <1.0.0' + '@typespec/compiler': '>=0.62.0 <1.0.0' + '@typespec/http': '>=0.62.0 <1.0.0' + '@typespec/openapi': '>=0.62.0 <1.0.0' + '@typespec/openapi3': '>=0.62.0 <1.0.0' + '@typespec/rest': '>=0.62.0 <1.0.0' + '@typespec/versioning': '>=0.62.0 <1.0.0' prettier: ^3.1.0 ts-node: ^8.5.2 typescript: ~5.6.2 dependencies: - '@azure-tools/typespec-autorest': 0.47.0_rib5axdcd64bxmzq35qykcrahq - '@azure-tools/typespec-azure-core': 0.47.0_fxc6wb4hdwr6r5hw5qrofq3aoy - '@azure-tools/typespec-azure-resource-manager': 0.47.0_f62ldmasulsabis4qbnzkqboii - '@azure-tools/typespec-azure-rulesets': 0.47.0_b25iwclywefnqfkiov4zadde3a - '@azure-tools/typespec-client-generator-core': 0.47.4_f62ldmasulsabis4qbnzkqboii + '@azure-tools/typespec-autorest': 0.48.0_ox3wjptpcck6ih5jxiqdmkmsau + '@azure-tools/typespec-azure-core': 0.48.0_aaegv3jydxpwng7gbukr25tg2m + '@azure-tools/typespec-azure-resource-manager': 0.48.0_xptzwysxh7uiycxgwx225suwku + '@azure-tools/typespec-azure-rulesets': 0.48.0_eibu3mzdg6wb26jplwmxghr54m + '@azure-tools/typespec-client-generator-core': 0.48.1_xptzwysxh7uiycxgwx225suwku '@azure-tools/typespec-ts': link:../typespec-ts - '@typespec/compiler': 0.61.2 - '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 - '@typespec/openapi': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/openapi3': 0.61.0_55ilrakjwebv5frpjugw2fujmu - '@typespec/rest': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/versioning': 0.61.0_@typespec+compiler@0.61.2 + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/openapi': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/openapi3': 0.62.0_w4ienkqkqg3jsox2pddtpe4f5m + '@typespec/rest': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/versioning': 0.62.0_@typespec+compiler@0.62.0 prettier: 3.1.1 devDependencies: '@types/mocha': 5.2.7 @@ -236,10 +236,10 @@ importers: '@azure-tools/cadl-ranch-expect': ^0.15.5 '@azure-tools/cadl-ranch-specs': ^0.38.0 '@azure-tools/rlc-common': workspace:^0.34.0 - '@azure-tools/typespec-autorest': '>=0.47.0 <1.0.0' - '@azure-tools/typespec-azure-core': '>=0.47.0 <1.0.0' - '@azure-tools/typespec-azure-resource-manager': '>=0.47.0 <1.0.0' - '@azure-tools/typespec-client-generator-core': '>=0.47.4 <1.0.0' + '@azure-tools/typespec-autorest': '>=0.48.0 <1.0.0' + '@azure-tools/typespec-azure-core': '>=0.48.0 <1.0.0' + '@azure-tools/typespec-azure-resource-manager': '>=0.48.0 <1.0.0' + '@azure-tools/typespec-client-generator-core': '>=0.48.0 <1.0.0' '@azure/abort-controller': ^2.1.2 '@azure/core-auth': ^1.6.0 '@azure/core-lro': ^3.1.0 @@ -255,12 +255,12 @@ importers: '@types/node': ^18.0.0 '@typescript-eslint/eslint-plugin': ^6.8.0 '@typescript-eslint/parser': ^6.8.0 - '@typespec/compiler': '>=0.61.2 <1.0.0' - '@typespec/http': '>=0.61.0 <1.0.0' - '@typespec/openapi': '>=0.61.0, <1.0.0' - '@typespec/rest': '>=0.61.0 <1.0.0' + '@typespec/compiler': '>=0.62.0 <1.0.0' + '@typespec/http': '>=0.62.0 <1.0.0' + '@typespec/openapi': '>=0.62.0, <1.0.0' + '@typespec/rest': '>=0.62.0 <1.0.0' '@typespec/ts-http-runtime': 1.0.0-alpha.20240314.2 - '@typespec/versioning': '>=0.61.0 <1.0.0' + '@typespec/versioning': '>=0.62.0 <1.0.0' '@vitest/coverage-istanbul': ~1.6.0 '@vitest/coverage-v8': ~1.6.0 chai: ^4.3.6 @@ -290,14 +290,14 @@ importers: tslib: 2.6.2 devDependencies: '@azure-rest/core-client': 2.3.1 - '@azure-tools/cadl-ranch': 0.15.0_d4yylgqtsey5a7wubqjw5gjsq4 + '@azure-tools/cadl-ranch': 0.15.0_maorf56vredk4k7ivyf3kw4p7i '@azure-tools/cadl-ranch-api': 0.5.0 - '@azure-tools/cadl-ranch-expect': 0.15.5_str2psid7izwllhra2ow6hs7pi - '@azure-tools/cadl-ranch-specs': 0.38.0_ouo3nkt6333nzbxz2spj76mz74 - '@azure-tools/typespec-autorest': 0.47.0_rib5axdcd64bxmzq35qykcrahq - '@azure-tools/typespec-azure-core': 0.47.0_fxc6wb4hdwr6r5hw5qrofq3aoy - '@azure-tools/typespec-azure-resource-manager': 0.47.0_f62ldmasulsabis4qbnzkqboii - '@azure-tools/typespec-client-generator-core': 0.47.4_f62ldmasulsabis4qbnzkqboii + '@azure-tools/cadl-ranch-expect': 0.15.6_f5giq3reeireto67b6daw62k5y + '@azure-tools/cadl-ranch-specs': 0.38.0_uv4m3qq5ivkac27hpehot5vivy + '@azure-tools/typespec-autorest': 0.48.0_ox3wjptpcck6ih5jxiqdmkmsau + '@azure-tools/typespec-azure-core': 0.48.0_aaegv3jydxpwng7gbukr25tg2m + '@azure-tools/typespec-azure-resource-manager': 0.48.0_xptzwysxh7uiycxgwx225suwku + '@azure-tools/typespec-client-generator-core': 0.48.1_xptzwysxh7uiycxgwx225suwku '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.6.0 '@azure/core-lro': 3.1.0 @@ -313,12 +313,12 @@ importers: '@types/node': 18.18.0 '@typescript-eslint/eslint-plugin': 6.8.0_wroavni7rd6ng5lxj6jm5p2pxq '@typescript-eslint/parser': 6.8.0_wgnkk2eh2432jxos7omdkkhhte - '@typespec/compiler': 0.61.2 - '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 - '@typespec/openapi': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/rest': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/openapi': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/rest': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe '@typespec/ts-http-runtime': 1.0.0-alpha.20240314.2 - '@typespec/versioning': 0.61.0_@typespec+compiler@0.61.2 + '@typespec/versioning': 0.62.0_@typespec+compiler@0.62.0 '@vitest/coverage-istanbul': 1.6.0_vitest@1.6.0 '@vitest/coverage-v8': 1.6.0_vitest@1.6.0 chai: 4.3.8 @@ -442,22 +442,37 @@ packages: - supports-color dev: true - /@azure-tools/cadl-ranch-expect/0.15.5_str2psid7izwllhra2ow6hs7pi: - resolution: {integrity: sha512-7tr/FIDeFCJnDjEQ7J/A2MKmnmYrJBlTS7y9XjsWpJLC/fpB3lyvDvVYlsFmeO5dmnRc3+B4eEoWgWx46r3auA==} + /@azure-tools/cadl-ranch-expect/0.15.6_3nr3pl3bbvepagmvirvhh4urmy: + resolution: {integrity: sha512-t601oyRwiSy/Nbbro5A7OHZSKsVGxGRJMPnd4X80dYetTBinUHXS2+cVx+fVQlUmb/4Ru/qNOvG0jtTJY9/XHw==} engines: {node: '>=16.0.0'} peerDependencies: - '@typespec/compiler': ~0.61.0 - '@typespec/http': ~0.61.0 - '@typespec/rest': ~0.61.0 - '@typespec/versioning': ~0.61.0 + '@typespec/compiler': ~0.62.0 + '@typespec/http': ~0.62.0 + '@typespec/rest': ~0.62.0 + '@typespec/versioning': ~0.62.0 dependencies: '@typespec/compiler': 0.61.2 '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 '@typespec/rest': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/versioning': 0.61.0_@typespec+compiler@0.61.2 + '@typespec/versioning': 0.62.0_@typespec+compiler@0.62.0 + dev: true + + /@azure-tools/cadl-ranch-expect/0.15.6_f5giq3reeireto67b6daw62k5y: + resolution: {integrity: sha512-t601oyRwiSy/Nbbro5A7OHZSKsVGxGRJMPnd4X80dYetTBinUHXS2+cVx+fVQlUmb/4Ru/qNOvG0jtTJY9/XHw==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@typespec/compiler': ~0.62.0 + '@typespec/http': ~0.62.0 + '@typespec/rest': ~0.62.0 + '@typespec/versioning': ~0.62.0 + dependencies: + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/rest': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/versioning': 0.62.0_@typespec+compiler@0.62.0 dev: true - /@azure-tools/cadl-ranch-specs/0.38.0_ouo3nkt6333nzbxz2spj76mz74: + /@azure-tools/cadl-ranch-specs/0.38.0_uv4m3qq5ivkac27hpehot5vivy: resolution: {integrity: sha512-AbOpERFpxYGmfFcSxDQl7ZeBy6FHEWFgqqw8FBRaugtVbeAj9BfUOPfc/OSEGNQmEIrzZJpH1N974JqhmKtKYg==} engines: {node: '>=16.0.0'} peerDependencies: @@ -469,15 +484,15 @@ packages: '@typespec/versioning': ~0.61.0 '@typespec/xml': ~0.61.0 dependencies: - '@azure-tools/cadl-ranch': 0.15.0_d4yylgqtsey5a7wubqjw5gjsq4 + '@azure-tools/cadl-ranch': 0.15.0_maorf56vredk4k7ivyf3kw4p7i '@azure-tools/cadl-ranch-api': 0.5.0 - '@azure-tools/cadl-ranch-expect': 0.15.5_str2psid7izwllhra2ow6hs7pi - '@azure-tools/typespec-azure-core': 0.47.0_fxc6wb4hdwr6r5hw5qrofq3aoy - '@typespec/compiler': 0.61.2 - '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 - '@typespec/rest': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/versioning': 0.61.0_@typespec+compiler@0.61.2 - '@typespec/xml': 0.61.0_@typespec+compiler@0.61.2 + '@azure-tools/cadl-ranch-expect': 0.15.6_f5giq3reeireto67b6daw62k5y + '@azure-tools/typespec-azure-core': 0.48.0_aaegv3jydxpwng7gbukr25tg2m + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/rest': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/versioning': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/xml': 0.61.0_@typespec+compiler@0.62.0 transitivePeerDependencies: - '@types/express' - '@typespec/streams' @@ -485,14 +500,14 @@ packages: - supports-color dev: true - /@azure-tools/cadl-ranch/0.15.0_d4yylgqtsey5a7wubqjw5gjsq4: + /@azure-tools/cadl-ranch/0.15.0_maorf56vredk4k7ivyf3kw4p7i: resolution: {integrity: sha512-RU8AktXgCW7tuZF5yE2JCQdqY51qp5YJ8bvF82/M1tNwkN8GTxSXde3rBMyYnXJRd/DQUxaCqFMbwX1MgFBWFA==} engines: {node: '>=16.0.0'} hasBin: true dependencies: '@azure-tools/cadl-ranch-api': 0.5.0 '@azure-tools/cadl-ranch-coverage-sdk': 0.9.0 - '@azure-tools/cadl-ranch-expect': 0.15.5_str2psid7izwllhra2ow6hs7pi + '@azure-tools/cadl-ranch-expect': 0.15.6_3nr3pl3bbvepagmvirvhh4urmy '@azure/identity': 4.4.1 '@types/js-yaml': 4.0.6 '@typespec/compiler': 0.61.2 @@ -550,92 +565,92 @@ packages: - supports-color dev: true - /@azure-tools/typespec-autorest/0.47.0_rib5axdcd64bxmzq35qykcrahq: - resolution: {integrity: sha512-uYkk8mnzekSMhJKU3RS0cXvKPH0vbkonthYoPe7/vxZ7tWv4xJLSglV2v3m3QElFgvNebNVoBOEWSY8Kz/ip2Q==} + /@azure-tools/typespec-autorest/0.48.0_ox3wjptpcck6ih5jxiqdmkmsau: + resolution: {integrity: sha512-AyoNMq3EORugHynFF8bN0TJh+zYxui/ApU5DoVEL7Xr1yMD6k9p5b90VD4HiCsP0dz8470ApFnjt5Vl6xCSzig==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.47.0 - '@azure-tools/typespec-azure-resource-manager': ~0.47.0 - '@azure-tools/typespec-client-generator-core': ~0.47.0 - '@typespec/compiler': ~0.61.0 - '@typespec/http': ~0.61.0 - '@typespec/openapi': ~0.61.0 - '@typespec/rest': ~0.61.0 - '@typespec/versioning': ~0.61.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.47.0_fxc6wb4hdwr6r5hw5qrofq3aoy - '@azure-tools/typespec-azure-resource-manager': 0.47.0_f62ldmasulsabis4qbnzkqboii - '@azure-tools/typespec-client-generator-core': 0.47.4_f62ldmasulsabis4qbnzkqboii - '@typespec/compiler': 0.61.2 - '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 - '@typespec/openapi': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/rest': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/versioning': 0.61.0_@typespec+compiler@0.61.2 - - /@azure-tools/typespec-azure-core/0.47.0_fxc6wb4hdwr6r5hw5qrofq3aoy: - resolution: {integrity: sha512-RcBC5+dE1BVXTrUkkKULTImGxzM/ea3P3IL2kr9pk7r1uqF7D4CGqEKHFTg5L6QUtqc1f+zgTgQTNn6t4gI92w==} + '@azure-tools/typespec-azure-core': ~0.48.0 + '@azure-tools/typespec-azure-resource-manager': ~0.48.0 + '@azure-tools/typespec-client-generator-core': ~0.48.0 + '@typespec/compiler': ~0.62.0 + '@typespec/http': ~0.62.0 + '@typespec/openapi': ~0.62.0 + '@typespec/rest': ~0.62.0 + '@typespec/versioning': ~0.62.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.48.0_aaegv3jydxpwng7gbukr25tg2m + '@azure-tools/typespec-azure-resource-manager': 0.48.0_xptzwysxh7uiycxgwx225suwku + '@azure-tools/typespec-client-generator-core': 0.48.1_xptzwysxh7uiycxgwx225suwku + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/openapi': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/rest': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/versioning': 0.62.0_@typespec+compiler@0.62.0 + + /@azure-tools/typespec-azure-core/0.48.0_aaegv3jydxpwng7gbukr25tg2m: + resolution: {integrity: sha512-80qyqgTgBbrnCGXtz6eWAMBdEAjYVVL780L0Ye+rBEd6VoA0m3JrgzUqf5bC0Iwju6lEtBAb8o6sefKD/NGA7g==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.61.0 - '@typespec/http': ~0.61.0 - '@typespec/rest': ~0.61.0 + '@typespec/compiler': ~0.62.0 + '@typespec/http': ~0.62.0 + '@typespec/rest': ~0.62.0 dependencies: - '@typespec/compiler': 0.61.2 - '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 - '@typespec/rest': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/rest': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe - /@azure-tools/typespec-azure-resource-manager/0.47.0_f62ldmasulsabis4qbnzkqboii: - resolution: {integrity: sha512-pe9XhHJezTZtVlSVKIMhL1kRATMg6QSaXUZQhQmQKSuozVRsRBxI4IAhK3RU4p6SA8A2CoCpPeJpRhQTvdt73Q==} + /@azure-tools/typespec-azure-resource-manager/0.48.0_xptzwysxh7uiycxgwx225suwku: + resolution: {integrity: sha512-4JxPbKxd3EJ98sLbtfBlqyANWVrU6tT2nk3iLspg7MITPLhiMTeRT9BprsJXH18ks8qw8scR7/am5r57YERTmQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.47.0 - '@typespec/compiler': ~0.61.0 - '@typespec/http': ~0.61.0 - '@typespec/openapi': ~0.61.0 - '@typespec/rest': ~0.61.0 - '@typespec/versioning': ~0.61.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.47.0_fxc6wb4hdwr6r5hw5qrofq3aoy - '@typespec/compiler': 0.61.2 - '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 - '@typespec/openapi': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/rest': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/versioning': 0.61.0_@typespec+compiler@0.61.2 + '@azure-tools/typespec-azure-core': ~0.48.0 + '@typespec/compiler': ~0.62.0 + '@typespec/http': ~0.62.0 + '@typespec/openapi': ~0.62.0 + '@typespec/rest': ~0.62.0 + '@typespec/versioning': ~0.62.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.48.0_aaegv3jydxpwng7gbukr25tg2m + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/openapi': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/rest': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/versioning': 0.62.0_@typespec+compiler@0.62.0 change-case: 5.4.4 pluralize: 8.0.0 - /@azure-tools/typespec-azure-rulesets/0.47.0_b25iwclywefnqfkiov4zadde3a: - resolution: {integrity: sha512-CG6sGYc/9qKAQIWtauzH6yEoTdugfz4DEmiWcytJMhgw1tQ2bqmcJuar01ctDKuaD5F1PKZ0X3oAxPu84pIlqw==} + /@azure-tools/typespec-azure-rulesets/0.48.0_eibu3mzdg6wb26jplwmxghr54m: + resolution: {integrity: sha512-IkPxC8v9wVSl/eKU7N4NhqD3RPh+bIYpxDW5LBAhkuQVcE3RumAkWqh2pmkckihQRhgwiCXhcJVZAzBpVa5SUA==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.47.0 - '@azure-tools/typespec-azure-resource-manager': ~0.47.0 - '@azure-tools/typespec-client-generator-core': ~0.47.0 - '@typespec/compiler': ~0.61.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.47.0_fxc6wb4hdwr6r5hw5qrofq3aoy - '@azure-tools/typespec-azure-resource-manager': 0.47.0_f62ldmasulsabis4qbnzkqboii - '@azure-tools/typespec-client-generator-core': 0.47.4_f62ldmasulsabis4qbnzkqboii - '@typespec/compiler': 0.61.2 + '@azure-tools/typespec-azure-core': ~0.48.0 + '@azure-tools/typespec-azure-resource-manager': ~0.48.0 + '@azure-tools/typespec-client-generator-core': ~0.48.0 + '@typespec/compiler': ~0.62.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.48.0_aaegv3jydxpwng7gbukr25tg2m + '@azure-tools/typespec-azure-resource-manager': 0.48.0_xptzwysxh7uiycxgwx225suwku + '@azure-tools/typespec-client-generator-core': 0.48.1_xptzwysxh7uiycxgwx225suwku + '@typespec/compiler': 0.62.0 dev: false - /@azure-tools/typespec-client-generator-core/0.47.4_f62ldmasulsabis4qbnzkqboii: - resolution: {integrity: sha512-oXA8rHzBsoofzSXvGLGohj6VDYegtgAfGMWo2o4ubew1bS4cvl3CYl9DJ54blqafxtJXnNh4SdjadeHTsCz2mw==} + /@azure-tools/typespec-client-generator-core/0.48.1_xptzwysxh7uiycxgwx225suwku: + resolution: {integrity: sha512-pYEZDExltNNLAaA12EwEag5VLESyPoKNQQ/6Olj4rJouA4cBjZDTW80VYgKuPQBt/uCtA0Yn6xxl0nH7TGOwWQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.47.0 - '@typespec/compiler': ~0.61.0 - '@typespec/http': ~0.61.0 - '@typespec/openapi': ~0.61.0 - '@typespec/rest': ~0.61.0 - '@typespec/versioning': ~0.61.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.47.0_fxc6wb4hdwr6r5hw5qrofq3aoy - '@typespec/compiler': 0.61.2 - '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 - '@typespec/openapi': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/rest': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/versioning': 0.61.0_@typespec+compiler@0.61.2 + '@azure-tools/typespec-azure-core': ~0.48.0 + '@typespec/compiler': ~0.62.0 + '@typespec/http': ~0.62.0 + '@typespec/openapi': ~0.62.0 + '@typespec/rest': ~0.62.0 + '@typespec/versioning': ~0.62.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.48.0_aaegv3jydxpwng7gbukr25tg2m + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/openapi': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/rest': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/versioning': 0.62.0_@typespec+compiler@0.62.0 change-case: 5.4.4 pluralize: 8.0.0 @@ -903,7 +918,15 @@ packages: resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.24.7 + '@babel/highlight': 7.25.9 + picocolors: 1.1.0 + dev: true + + /@babel/code-frame/7.25.9: + resolution: {integrity: sha512-z88xeGxnzehn2sqZ8UdGQEvYErF1odv2CftxInpSYJt6uHuPe9YjahKZITGs3l5LeI9d2ROG+obuDAoSlqbNfQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.25.9 picocolors: 1.1.0 /@babel/compat-data/7.24.7: @@ -916,7 +939,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.25.9 '@babel/generator': 7.24.7 '@babel/helper-compilation-targets': 7.24.7 '@babel/helper-module-transforms': 7.24.7_@babel+core@7.24.7 @@ -998,7 +1021,7 @@ packages: '@babel/helper-module-imports': 7.24.7 '@babel/helper-simple-access': 7.24.7 '@babel/helper-split-export-declaration': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.25.9 transitivePeerDependencies: - supports-color dev: true @@ -1025,8 +1048,8 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-identifier/7.24.7: - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + /@babel/helper-validator-identifier/7.25.9: + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} /@babel/helper-validator-option/7.24.7: @@ -1042,11 +1065,11 @@ packages: '@babel/types': 7.24.7 dev: true - /@babel/highlight/7.24.7: - resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + /@babel/highlight/7.25.9: + resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.25.9 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.1.0 @@ -1068,7 +1091,7 @@ packages: resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.25.9 '@babel/parser': 7.24.7 '@babel/types': 7.24.7 dev: true @@ -1077,7 +1100,7 @@ packages: resolution: {integrity: sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.25.9 '@babel/generator': 7.24.7 '@babel/helper-environment-visitor': 7.24.7 '@babel/helper-function-name': 7.24.7 @@ -1096,7 +1119,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.25.9 to-fast-properties: 2.0.0 dev: true @@ -1817,7 +1840,7 @@ packages: peerDependencies: ajv: 4.11.8 - 8 dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.25.9 '@babel/runtime': 7.24.8 '@humanwhocodes/momoa': 2.0.4 ajv: 8.17.1 @@ -2421,6 +2444,27 @@ packages: vscode-languageserver-textdocument: 1.0.12 yaml: 2.5.1 yargs: 17.7.2 + dev: true + + /@typespec/compiler/0.62.0: + resolution: {integrity: sha512-RfKJ/rF2Wjxu7dl74oJE8yEfSkeL7NopFlyJ4dW1JQXpRN2IOJYPxas12qZA6H9ZEIB8rBjyrHNxJSQbvn/UDQ==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + '@babel/code-frame': 7.25.9 + ajv: 8.17.1 + change-case: 5.4.4 + globby: 14.0.2 + mustache: 4.2.0 + picocolors: 1.1.0 + prettier: 3.3.3 + prompts: 2.4.2 + semver: 7.6.3 + temporal-polyfill: 0.2.5 + vscode-languageserver: 9.0.1 + vscode-languageserver-textdocument: 1.0.12 + yaml: 2.5.1 + yargs: 17.7.2 /@typespec/http/0.61.0_@typespec+compiler@0.61.2: resolution: {integrity: sha512-7+AYHkzkc+p652GY9BcEbXY4OZa1fTr03MVmZeafvmbQbXfyzUU9eJld13M3v6NaUWqXWZ7nBNMISyKiXp/kSw==} @@ -2433,32 +2477,49 @@ packages: optional: true dependencies: '@typespec/compiler': 0.61.2 + dev: true - /@typespec/openapi/0.61.0_rd6g2np7ypwc24nhrvozahtdfy: - resolution: {integrity: sha512-3AF319Ae4yGVOscsCLQeedXUJJcL/NdGOR2/e/nFiL/AOVdgLfIRnpR0Ad9Zj9XAESh1fq9XSu4Mi7N1k4V7rw==} + /@typespec/http/0.62.0_@typespec+compiler@0.62.0: + resolution: {integrity: sha512-6H9y9e32lb2s76MMy29ITCwSZNG42sa/qWthiByUvfbTEXMpu5a1fQHNj7RXg+xmDKmVIHv3gAfjGPAWfXhkaQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.61.0 - '@typespec/http': ~0.61.0 + '@typespec/compiler': ~0.62.0 + '@typespec/streams': ~0.62.0 + peerDependenciesMeta: + '@typespec/streams': + optional: true dependencies: - '@typespec/compiler': 0.61.2 - '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 + '@typespec/compiler': 0.62.0 - /@typespec/openapi3/0.61.0_55ilrakjwebv5frpjugw2fujmu: - resolution: {integrity: sha512-ALLsTkK1UiJBzvygV1Zk/yZaym+lOWroGeEUhQNXYShsq+/GLZkK0rl8sd76Gigq+TVXKMOEwUUvgfws/LMUJw==} + /@typespec/openapi/0.62.0_ehpjn7t5lr2snllrxt4bmumehe: + resolution: {integrity: sha512-Xtm0Nd2BuSmEfSWGtc10ok22jyomYm9L2jY+kVTy+v5J89DrVh0o6+YpipUl1QhcItM1YMBphWHIHPfwkDRbnw==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.62.0 + '@typespec/http': ~0.62.0 + dependencies: + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + + /@typespec/openapi3/0.62.0_w4ienkqkqg3jsox2pddtpe4f5m: + resolution: {integrity: sha512-tfmaPvZ38fM+O5+ZBq4ic7fc32E3v0JOFP9h+7otQyrVprLVCToXpBwaxB7c2nTSJbI4vcxK7/T3Z8BD5j8X+w==} engines: {node: '>=18.0.0'} hasBin: true peerDependencies: - '@typespec/compiler': ~0.61.0 - '@typespec/http': ~0.61.0 - '@typespec/openapi': ~0.61.0 - '@typespec/versioning': ~0.61.0 + '@typespec/compiler': ~0.62.0 + '@typespec/http': ~0.62.0 + '@typespec/openapi': ~0.62.0 + '@typespec/versioning': ~0.62.0 + '@typespec/xml': '*' + peerDependenciesMeta: + '@typespec/xml': + optional: true dependencies: '@readme/openapi-parser': 2.6.0_openapi-types@7.2.3 - '@typespec/compiler': 0.61.2 - '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 - '@typespec/openapi': 0.61.0_rd6g2np7ypwc24nhrvozahtdfy - '@typespec/versioning': 0.61.0_@typespec+compiler@0.61.2 + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 + '@typespec/openapi': 0.62.0_ehpjn7t5lr2snllrxt4bmumehe + '@typespec/versioning': 0.62.0_@typespec+compiler@0.62.0 yaml: 2.5.1 transitivePeerDependencies: - openapi-types @@ -2473,6 +2534,17 @@ packages: dependencies: '@typespec/compiler': 0.61.2 '@typespec/http': 0.61.0_@typespec+compiler@0.61.2 + dev: true + + /@typespec/rest/0.62.0_ehpjn7t5lr2snllrxt4bmumehe: + resolution: {integrity: sha512-ci5UjelEKFwsPTdpgysoUoDCcw02EnbG4GBuYJdR5mRrFCBZMxrbro+OJLgSN3g/TORSsWlW7dEOWLfbyrmlZQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.62.0 + '@typespec/http': ~0.62.0 + dependencies: + '@typespec/compiler': 0.62.0 + '@typespec/http': 0.62.0_@typespec+compiler@0.62.0 /@typespec/ts-http-runtime/1.0.0-alpha.20240314.2: resolution: {integrity: sha512-Rc/bFkKLbrEo9KKXiSdRYNSmosZ1W6ycQKEKScpXvK4jaXFNyCvmS0tLv7rEN4EzEEds2fPzEHNtX4e8gMu/lA==} @@ -2485,21 +2557,21 @@ packages: - supports-color dev: true - /@typespec/versioning/0.61.0_@typespec+compiler@0.61.2: - resolution: {integrity: sha512-PIIug6eg3zc7E+BBHyNHHQD+OBq3FU465nhKrLEp35iVji/sYFuPc1ywnELDuwJVRWm6nvqNL1vtnc+4lEk+oA==} + /@typespec/versioning/0.62.0_@typespec+compiler@0.62.0: + resolution: {integrity: sha512-M5KTCVH5fBniZU8eQlw+NV13vAmPr58HyBLDIyxeOuV+SHNlx+f+qanUEDIPaJheKlaSSNTEZKsDhs83/iIMMA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.61.0 + '@typespec/compiler': ~0.62.0 dependencies: - '@typespec/compiler': 0.61.2 + '@typespec/compiler': 0.62.0 - /@typespec/xml/0.61.0_@typespec+compiler@0.61.2: + /@typespec/xml/0.61.0_@typespec+compiler@0.62.0: resolution: {integrity: sha512-LnMYyzB7f6C8rBZmQwhKyJOJ8mUTFls6aVKXw4EAaO2+HPsm73GN16lj1bt2ffbWR3izCGnz911K2wGtUrtSpA==} engines: {node: '>=18.0.0'} peerDependencies: '@typespec/compiler': ~0.61.0 dependencies: - '@typespec/compiler': 0.61.2 + '@typespec/compiler': 0.62.0 dev: true /@ungap/promise-all-settled/1.1.2: @@ -6576,7 +6648,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.25.9 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 diff --git a/packages/typespec-test/package.json b/packages/typespec-test/package.json index 3caa88fbdd..471a93033a 100644 --- a/packages/typespec-test/package.json +++ b/packages/typespec-test/package.json @@ -4,17 +4,17 @@ "type": "module", "dependencies": { "@azure-tools/typespec-ts": "workspace:^0.34.0", - "@typespec/openapi": ">=0.61.0 <1.0.0", - "@azure-tools/typespec-autorest": ">=0.47.0 <1.0.0", - "@typespec/openapi3": ">=0.61.0 <1.0.0", - "@azure-tools/typespec-azure-core": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.47.4 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-azure-rulesets": ">=0.47.0 <1.0.0", - "@typespec/compiler": ">=0.61.2 <1.0.0", - "@typespec/http": ">=0.61.0 <1.0.0", - "@typespec/rest": ">=0.61.0 <1.0.0", - "@typespec/versioning": ">=0.61.0 <1.0.0", + "@typespec/openapi": ">=0.62.0 <1.0.0", + "@azure-tools/typespec-autorest": ">=0.48.0 <1.0.0", + "@typespec/openapi3": ">=0.62.0 <1.0.0", + "@azure-tools/typespec-azure-core": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-azure-rulesets": ">=0.48.0 <1.0.0", + "@typespec/compiler": ">=0.62.0 <1.0.0", + "@typespec/http": ">=0.62.0 <1.0.0", + "@typespec/rest": ">=0.62.0 <1.0.0", + "@typespec/versioning": ">=0.62.0 <1.0.0", "prettier": "^3.1.0" }, "devDependencies": { diff --git a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/review/ai-anomaly-detector.api.md b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/review/ai-anomaly-detector.api.md index 9343baff99..0e724ef35a 100644 --- a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/review/ai-anomaly-detector.api.md +++ b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/review/ai-anomaly-detector.api.md @@ -22,9 +22,6 @@ export interface AnomalyDetectorClientOptionalParams extends ClientOptions { apiVersion?: string; } -// @public -export type APIVersion = "v1.1"; - // @public export type ContinuablePage = TPage & { continuationToken?: string; diff --git a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/index.ts b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/index.ts index 28f00a7b74..1ffeb30c5e 100644 --- a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/index.ts +++ b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/index.ts @@ -41,7 +41,6 @@ export { UnivariateUnivariateLastDetectionResult, UnivariateUnivariateChangePointDetectionOptions, UnivariateUnivariateChangePointDetectionResult, - APIVersion, KnownVersions, } from "./models/index.js"; export { diff --git a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/models/index.ts b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/models/index.ts index 7b124d4141..5eb7ae421a 100644 --- a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/models/index.ts +++ b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/models/index.ts @@ -34,6 +34,5 @@ export { UnivariateUnivariateLastDetectionResult, UnivariateUnivariateChangePointDetectionOptions, UnivariateUnivariateChangePointDetectionResult, - APIVersion, KnownVersions, } from "./models.js"; diff --git a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/models/models.ts b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/models/models.ts index cad4b4f7c6..deba0d49a3 100644 --- a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/models/models.ts +++ b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/src/models/models.ts @@ -1071,9 +1071,6 @@ export function univariateUnivariateChangePointDetectionResultDeserializer( }; } -/** Type of APIVersion */ -export type APIVersion = "v1.1"; - /** Known values of {@link Versions} that the service accepts. */ export enum KnownVersions { v1_1 = "v1.1", diff --git a/packages/typespec-test/test/anomalyDetector/spec/multivariate/models.tsp b/packages/typespec-test/test/anomalyDetector/spec/multivariate/models.tsp index 64e3d1bc9b..6d22a7532f 100644 --- a/packages/typespec-test/test/anomalyDetector/spec/multivariate/models.tsp +++ b/packages/typespec-test/test/anomalyDetector/spec/multivariate/models.tsp @@ -341,7 +341,7 @@ model ModelList { maxCount: int32; @doc("The link to fetch more models.") - @nextLink + @Azure.Core.nextLink nextLink?: string; } diff --git a/packages/typespec-test/test/batch_modular/spec/models.tsp b/packages/typespec-test/test/batch_modular/spec/models.tsp index dd214569e2..0a0f77fc03 100644 --- a/packages/typespec-test/test/batch_modular/spec/models.tsp +++ b/packages/typespec-test/test/batch_modular/spec/models.tsp @@ -586,7 +586,7 @@ model ApplicationListResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -642,7 +642,7 @@ model PoolListUsageMetricsResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -673,7 +673,7 @@ model AccountListSupportedImagesResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -738,7 +738,7 @@ model PoolNodeCountsListResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -1001,7 +1001,7 @@ model CertificateListResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -1017,7 +1017,7 @@ model NodeFileListResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -2228,7 +2228,7 @@ model BatchJobScheduleListResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -2461,7 +2461,7 @@ model BatchJobListResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -2477,7 +2477,7 @@ model BatchJobListPreparationAndReleaseTaskStatusResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -2998,7 +2998,7 @@ model BatchPoolListResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -3422,7 +3422,7 @@ model BatchTaskListResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -3783,7 +3783,7 @@ model BatchNodeListResult { #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } @@ -3840,6 +3840,6 @@ model NodeVMExtensionList { value?: NodeVMExtension[]; @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } diff --git a/packages/typespec-test/test/confidentialLedger/spec/main.tsp b/packages/typespec-test/test/confidentialLedger/spec/main.tsp index 8160210844..653ab931b6 100644 --- a/packages/typespec-test/test/confidentialLedger/spec/main.tsp +++ b/packages/typespec-test/test/confidentialLedger/spec/main.tsp @@ -163,7 +163,7 @@ model PagedLedgerEntries { state: LedgerQueryState; @doc("Path from which to retrieve the next page of results.") - @nextLink + @Azure.Core.nextLink nextLink?: ResourceLocation; } diff --git a/packages/typespec-test/test/todo_non_branded/spec/main.tsp b/packages/typespec-test/test/todo_non_branded/spec/main.tsp index 68ad60a0fd..1dd9dbc43e 100644 --- a/packages/typespec-test/test/todo_non_branded/spec/main.tsp +++ b/packages/typespec-test/test/todo_non_branded/spec/main.tsp @@ -182,6 +182,7 @@ namespace TodoItems { model TodoPage { /** The items in the page */ + @pageItems items: TodoItem[]; pagination: { @@ -248,7 +249,7 @@ namespace TodoItems { @route("{itemId}/attachments") namespace Attachments { - @list op list( + op list( @path itemId: TodoItem.id, ): TodoAttachment[] | NotFoundResponse; diff --git a/packages/typespec-test/test/widget_dpg/spec/main.tsp b/packages/typespec-test/test/widget_dpg/spec/main.tsp index c1fb81bb15..2afb658195 100644 --- a/packages/typespec-test/test/widget_dpg/spec/main.tsp +++ b/packages/typespec-test/test/widget_dpg/spec/main.tsp @@ -78,7 +78,7 @@ model ListWidgetsPagesResults { @items results: Widget[]; @doc("The URL to get the next set of results.") - @nextLink + @Azure.Core.nextLink `odata.nextLink`?: string; } diff --git a/packages/typespec-ts/package.json b/packages/typespec-ts/package.json index 206318bf8a..7d83b05512 100644 --- a/packages/typespec-ts/package.json +++ b/packages/typespec-ts/package.json @@ -67,10 +67,10 @@ "@azure-tools/cadl-ranch-specs": "^0.38.0", "@azure-tools/cadl-ranch": "^0.15.0", "@azure-tools/cadl-ranch-api": "^0.5.0", - "@azure-tools/typespec-autorest": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-azure-core": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.47.4 <1.0.0", + "@azure-tools/typespec-autorest": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-azure-core": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.48.0 <1.0.0", "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.6.0", "@azure/core-lro": "^3.1.0", @@ -85,12 +85,12 @@ "@types/node": "^18.0.0", "@typescript-eslint/eslint-plugin": "^6.8.0", "@typescript-eslint/parser": "^6.8.0", - "@typespec/compiler": ">=0.61.2 <1.0.0", - "@typespec/http": ">=0.61.0 <1.0.0", - "@typespec/openapi": ">=0.61.0, <1.0.0", - "@typespec/rest": ">=0.61.0 <1.0.0", + "@typespec/compiler": ">=0.62.0 <1.0.0", + "@typespec/http": ">=0.62.0 <1.0.0", + "@typespec/openapi": ">=0.62.0, <1.0.0", + "@typespec/rest": ">=0.62.0 <1.0.0", "@typespec/ts-http-runtime": "1.0.0-alpha.20240314.2", - "@typespec/versioning": ">=0.61.0 <1.0.0", + "@typespec/versioning": ">=0.62.0 <1.0.0", "chai": "^4.3.6", "chalk": "^4.0.0", "cross-env": "^7.0.3", @@ -110,12 +110,12 @@ "tsx": "^4.16.5" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.47.4 <1.0.0", - "@typespec/compiler": ">=0.61.2 <1.0.0", - "@typespec/http": ">=0.61.0 <1.0.0", - "@typespec/rest": ">=0.61.0 <1.0.0", - "@typespec/versioning": ">=0.61.0 <1.0.0" + "@azure-tools/typespec-azure-core": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.48.0 <1.0.0", + "@typespec/compiler": ">=0.62.0 <1.0.0", + "@typespec/http": ">=0.62.0 <1.0.0", + "@typespec/rest": ">=0.62.0 <1.0.0", + "@typespec/versioning": ">=0.62.0 <1.0.0" }, "dependencies": { "@azure-tools/rlc-common": "workspace:^0.34.0", diff --git a/packages/typespec-ts/src/lib.ts b/packages/typespec-ts/src/lib.ts index 74151295ba..8a6b1285ce 100644 --- a/packages/typespec-ts/src/lib.ts +++ b/packages/typespec-ts/src/lib.ts @@ -267,6 +267,12 @@ const libDef = { messages: { default: paramMessage`Path parameter '${"paramName"}' cannot be optional.` } + }, + "parameter-type-not-supported": { + severity: "warning", + messages: { + default: paramMessage`Parameter '${"paramName"}' with type '${"paramType"}' is not supported and we would ignore this parameter.` + } } }, emitter: { diff --git a/packages/typespec-ts/src/modular/buildCodeModel.ts b/packages/typespec-ts/src/modular/buildCodeModel.ts index ca8e22d2fc..c8eb6ff068 100644 --- a/packages/typespec-ts/src/modular/buildCodeModel.ts +++ b/packages/typespec-ts/src/modular/buildCodeModel.ts @@ -509,7 +509,19 @@ function emitParameter( context: SdkContext, parameter: HttpOperationParameter | HttpServerParameter, implementation: string -): Parameter { +): Parameter | undefined { + if (parameter.type === "cookie") { + // TODO: support cookie parameters, https://github.com/Azure/autorest.typescript/issues/2898 + reportDiagnostic(context.program, { + code: "parameter-type-not-supported", + format: { + paramType: parameter.type, + paramName: parameter.name + }, + target: NoTarget + }); + return undefined; + } const base = emitParamBase(context, parameter.param); let type = getType(context, parameter.param.type, { usage: UsageFlags.Input @@ -857,6 +869,9 @@ function emitBasicOperation( continue; } const emittedParam = emitParameter(context, param, "Method"); + if (emittedParam === undefined) { + continue; + } if (isApiVersion(context, param)) { emittedParam.isApiVersion = true; methodApiVersionParam = emittedParam; @@ -1719,6 +1734,9 @@ function emitServerParams( serverParameter, "Client" ); + if (emittedParameter === undefined) { + continue; + } endpointPathParameters.push(emittedParameter); if (isApiVersion(context, serverParameter as any)) { emittedParameter.isApiVersion = true; diff --git a/packages/typespec-ts/src/transform/transformApiVersionInfo.ts b/packages/typespec-ts/src/transform/transformApiVersionInfo.ts index 6bf7ed451a..6bbe08bb9f 100644 --- a/packages/typespec-ts/src/transform/transformApiVersionInfo.ts +++ b/packages/typespec-ts/src/transform/transformApiVersionInfo.ts @@ -86,7 +86,7 @@ export function getOperationApiVersion( relevantProperty: p.param }); required.add(!p.param.optional); - if (p.type !== "header") { + if (p.type === "query" || p.type === "path") { locations.add(p.type); } const typeString = JSON.stringify(trimUsage(type)); @@ -127,7 +127,7 @@ export function getOperationApiVersion( relevantProperty: p.param }); required.add(!p.param.optional); - if (p.type !== "header") { + if (p.type === "query" || p.type === "path") { locations.add(p.type); } const typeString = JSON.stringify(trimUsage(type)); diff --git a/packages/typespec-ts/src/transform/transformParameters.ts b/packages/typespec-ts/src/transform/transformParameters.ts index 1541a290db..1f1064d91d 100644 --- a/packages/typespec-ts/src/transform/transformParameters.ts +++ b/packages/typespec-ts/src/transform/transformParameters.ts @@ -29,7 +29,7 @@ import { listOperationGroups, listOperationsInOperationGroup } from "@azure-tools/typespec-client-generator-core"; -import { Type, isVoidType } from "@typespec/compiler"; +import { NoTarget, Type, isVoidType } from "@typespec/compiler"; import { getBodyType, getFormattedPropertyDoc, @@ -46,6 +46,7 @@ import { } from "../utils/operationUtil.js"; import { SdkContext } from "../utils/interfaces.js"; +import { reportDiagnostic } from "../lib.js"; export function transformToParameterTypes( client: SdkClient, @@ -99,6 +100,8 @@ export function transformToParameterTypes( ); // transform path param const pathParams = transformPathParameters(); + // TODO: support cookie parameters, https://github.com/Azure/autorest.typescript/issues/2898 + transformCookieParameters(dpgContext, parameters); // transform header param including content-type const headerParams = transformHeaderParameters( dpgContext, @@ -200,6 +203,25 @@ function getParameterName(name: string) { return `"${name}"`; } +function transformCookieParameters( + dpgContext: SdkContext, + parameters: HttpOperationParameters +) { + // TODO: support cookie parameters, https://github.com/Azure/autorest.typescript/issues/2898 + parameters.parameters + .filter((p) => p.type === "cookie") + .forEach((p) => { + reportDiagnostic(dpgContext.program, { + code: "parameter-type-not-supported", + format: { + paramName: p.name, + paramType: p.type + }, + target: NoTarget + }); + }); +} + function transformQueryParameters( dpgContext: SdkContext, parameters: HttpOperationParameters, diff --git a/packages/typespec-ts/test/modularUnit/operations.spec.ts b/packages/typespec-ts/test/modularUnit/operations.spec.ts index 6c222432a5..290d5eca31 100644 --- a/packages/typespec-ts/test/modularUnit/operations.spec.ts +++ b/packages/typespec-ts/test/modularUnit/operations.spec.ts @@ -719,7 +719,7 @@ describe("operations", () => { model Bar { @items lists: string[]; - @nextLink + @Azure.Core.nextLink nextLink: string; } diff --git a/packages/typespec-ts/test/modularUnit/scenarios/operations/cookieParam/ignoreCookieParam.md b/packages/typespec-ts/test/modularUnit/scenarios/operations/cookieParam/ignoreCookieParam.md new file mode 100644 index 0000000000..51f2987604 --- /dev/null +++ b/packages/typespec-ts/test/modularUnit/scenarios/operations/cookieParam/ignoreCookieParam.md @@ -0,0 +1,61 @@ +# Should ignore cookie parameters for now + +// TODO: https://github.com/Azure/autorest.typescript/issues/2898 + +## TypeSpec + +This is tsp definition. + +```tsp +op test(@cookie token: string): string; +``` + +Should ingore the warning `@azure-tools/typespec-ts/parameter-type-not-supported`: + +```yaml +mustEmptyDiagnostic: false +``` + +## Provide generated operations to call rest-level methods + +## Operations + +Should normal path parameter: + +```ts operations +import { TestingContext as Client } from "./index.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters +} from "@azure-rest/core-client"; + +export function _testSend( + context: Client, + options: TestOptionalParams = { requestOptions: {} } +): StreamableMethod { + return context + .path("/") + .get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _testDeserialize( + result: PathUncheckedResponse +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + throw createRestError(result); + } + + return result.body; +} + +export async function test( + context: Client, + options: TestOptionalParams = { requestOptions: {} } +): Promise { + const result = await _testSend(context, options); + return _testDeserialize(result); +} +``` diff --git a/packages/typespec-ts/test/unit/pageHelperGenerator.spec.ts b/packages/typespec-ts/test/unit/pageHelperGenerator.spec.ts index 5d153dc228..22d59d14df 100644 --- a/packages/typespec-ts/test/unit/pageHelperGenerator.spec.ts +++ b/packages/typespec-ts/test/unit/pageHelperGenerator.spec.ts @@ -23,7 +23,7 @@ async function generatePagingHelper(code: string) { @doc("List of items.") customizedItems: T[]; - @nextLink + @global.Azure.Core.nextLink @doc("Link to fetch more items.") #suppress "@azure-tools/typespec-azure-core/casing-style" "for test" \`@odata.nextLink\`?: string; diff --git a/packages/typespec-ts/test/unit/parametersGenerator.spec.ts b/packages/typespec-ts/test/unit/parametersGenerator.spec.ts index 8eb6f4d43b..a02bfb9c62 100644 --- a/packages/typespec-ts/test/unit/parametersGenerator.spec.ts +++ b/packages/typespec-ts/test/unit/parametersGenerator.spec.ts @@ -7,6 +7,31 @@ import { import { assertEqualContent } from "../util/testUtil.js"; describe("Parameters.ts", () => { + describe("cookie parameters", () => { + it("should report warning for cookie parameter", async () => { + try { + await emitParameterFromTypeSpec( + ` + op test(@cookie token: string): string; + ` + ); + assert.fail("should throw error"); + } catch (e: any) { + assert.strictEqual("Parameter 'token' with type 'cookie' is not supported and we would ignore this parameter.", e[0].message); + } + }); + + it("should not include cookie parameter", async () => { + const parameters = await emitParameterFromTypeSpec( + ` + op test(@cookie token: string): string; + ` + , { + mustEmptyDiagnostic: false + }); + assert.notDeepInclude(parameters?.content, "token"); + }); + }); describe("query parameters", () => { describe("apiVersion in query", () => { it("should not generate apiVersion if there's a client level apiVersion but without default value", async () => { diff --git a/packages/typespec-ts/test/util/testUtil.ts b/packages/typespec-ts/test/util/testUtil.ts index c4ce8c8aea..671bde3f35 100644 --- a/packages/typespec-ts/test/util/testUtil.ts +++ b/packages/typespec-ts/test/util/testUtil.ts @@ -66,7 +66,7 @@ export interface RLCEmitterOptions { export async function rlcEmitterFor( code: string, - { + { needNamespaces = true, needAzureCore = false, needTCGC = false, @@ -95,11 +95,10 @@ import "@typespec/rest"; import "@typespec/versioning"; ${needTCGC ? 'import "@azure-tools/typespec-client-generator-core";' : ""} ${needAzureCore ? 'import "@azure-tools/typespec-azure-core";' : ""} -${ - needArmTemplate - ? 'import "@azure-tools/typespec-azure-resource-manager";' - : "" -} +${needArmTemplate + ? 'import "@azure-tools/typespec-azure-resource-manager";' + : "" + } using TypeSpec.Rest; using TypeSpec.Http; @@ -108,11 +107,10 @@ ${needTCGC ? "using Azure.ClientGenerator.Core;" : ""} ${needAzureCore ? "using Azure.Core;" : ""} ${needNamespaces ? namespace : ""} ${needArmTemplate ? "using Azure.ResourceManager;" : ""} -${ - withVersionedApiVersion && needNamespaces - ? 'enum Versions { v2022_05_15_preview: "2022-05-15-preview"}' - : "" -} +${withVersionedApiVersion && needNamespaces + ? 'enum Versions { v2022_05_15_preview: "2022-05-15-preview"}' + : "" + } ${code} `; host.addTypeSpecFile("main.tsp", content); @@ -217,8 +215,8 @@ export async function createDpgContextTestHelper( tcgcContext: sdkContext }); - provideSdkTypes(context); await provideBinderWithAzureDependencies(outputProject); + provideSdkTypes(context); return sdkContext; }