@azure-tools/rlc-common 0.49.0 → 0.49.1

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @azure-tools/rlc-common@0.49.0 build /mnt/vss/_work/1/s/packages/rlc-common
2
+ > @azure-tools/rlc-common@0.49.1 build /mnt/vss/_work/1/s/packages/rlc-common
3
3
  > rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## 0.49.1 (2026-02-14)
2
+
3
+ - [Feature] Ignore null for nullable optional properties. Please refer to [#3706](https://github.com/Azure/autorest.typescript/pull/3706)
4
+ - [Feature] Support multiple services in one client. Please refer to [#3713](https://github.com/Azure/autorest.typescript/pull/3713)
5
+ - [Feature] Add type-safe clientDefaultValue support for optional parameters in Modular SDK. Please refer to [#3721](https://github.com/Azure/autorest.typescript/pull/3721)
6
+ - [Bugfix] Fix nightly CI. Please refer to [#3723](https://github.com/Azure/autorest.typescript/pull/3723)
7
+ - [Feature] Apply tcgc response type for operation returnType and add ut. Please refer to [#3726](https://github.com/Azure/autorest.typescript/pull/3726)
8
+ - [Feature] Response Headers. Please refer to [#3728](https://github.com/Azure/autorest.typescript/pull/3728)
9
+ - [Feature] Extract header deserialization to a helper function. Please refer to [#3729](https://github.com/Azure/autorest.typescript/pull/3729)
10
+ - [Bugfix] Fix Nested XML Serialization. Please refer to [#3730](https://github.com/Azure/autorest.typescript/pull/3730)
11
+ - [Bugfix] Use wire format name for discriminator deserialization. Please refer to [#3732](https://github.com/Azure/autorest.typescript/pull/3732)
12
+ - [Feature] Generate index files for nested clients. Please refer to [#3734](https://github.com/Azure/autorest.typescript/pull/3734)
13
+ - [Bugfix] Fix syntax error in afterEach function template. Please refer to [#3736](https://github.com/Azure/autorest.typescript/pull/3736)
14
+ - [Bugfix] Fix naming conflict when model is named `Client`. Please refer to [#3737](https://github.com/Azure/autorest.typescript/pull/3737)
15
+ - [Bugfix] Avoid variable shadowing in generated operation code. Please refer to [#3740](https://github.com/Azure/autorest.typescript/pull/3740)
16
+ - [Bugfix] Fix serializeRecord ESLint violations: missing return type and parameter reassignment. Please refer to [#3741](https://github.com/Azure/autorest.typescript/pull/3741)
17
+ - [Bugfix] Fix unnecessary regex escape in urlTemplate.ts. Please refer to [#3742](https://github.com/Azure/autorest.typescript/pull/3742)
18
+ - [Bugfix] Fix eslint warning in url template helper. Please refer to [#3743](https://github.com/Azure/autorest.typescript/pull/3743)
19
+ - [Bugfix] Do not generate readonly properties in sample gen. Please refer to [#3748](https://github.com/Azure/autorest.typescript/pull/3748)
20
+ - [Feature] Use content-type aware deserialization for error responses. Please refer to [#3754](https://github.com/Azure/autorest.typescript/pull/3754)
21
+ - [Feature] Bump TypeSpec dependencies to latest stable (1.9.0 / 0.65.0). Please refer to [#3759](https://github.com/Azure/autorest.typescript/pull/3759)
22
+ - [Feature] MFD upload: support anonymous model cases. Please refer to [#3762](https://github.com/Azure/autorest.typescript/pull/3762)
23
+ - [Bugfix] Honor bytes encoding in XML and fix deserialization of nested text-only elements. Please refer to [#3763](https://github.com/Azure/autorest.typescript/pull/3763)
24
+
1
25
  ## 0.49.0 (2026-02-02)
2
26
 
3
27
  - [Feature] Support @disablePageable. Please refer to [#3715](https://github.com/Azure/autorest.typescript/pull/3715)
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;;AA0La,QAAA,2BAA2B,GAAG,CAAC,EAC1C,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAuFjC,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,kDAAkD;IAClD,gCAAe,CAAA;IACf,qDAAqD;IACrD,kCAAiB,CAAA;IACjB,wDAAwD;IACxD,wCAAuB,CAAA;AACzB,CAAC,EAPW,aAAa,6BAAb,aAAa,QAOxB"}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;;AA0La,QAAA,2BAA2B,GAAG,CAAC,EAC1C,QAAA,0BAA0B,GAAG,CAAC,CAAC;AA6FjC,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,kDAAkD;IAClD,gCAAe,CAAA;IACf,qDAAqD;IACrD,kCAAiB,CAAA;IACjB,wDAAwD;IACxD,wCAAuB,CAAA;AACzB,CAAC,EAPW,aAAa,6BAAb,aAAa,QAOxB"}
package/dist/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@azure-tools/rlc-common","version":"0.49.0","description":"","type":"commonjs","main":"dist/index.js","module":"dist-esm/index.js","exports":{".":{"types":"./types/index.d.ts","require":"./dist/index.js","import":"./dist-esm/index.js"}},"types":"./types/index.d.ts","scripts":{"lint":"eslint src --ext .ts --max-warnings=0","lint:fix":"eslint src --fix --ext .ts","format":"npm run -s prettier -- --write","check-format":"npm run prettier -- --check","prettier":"prettier --config ./.prettierrc \"src/**/*.ts\"","build":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && node publishPackage.js","test":"npm run unit-test","unit-test":"cross-env TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register --loader=ts-node/esm --experimental-specifier-resolution=node test/**/*.spec.ts"},"keywords":[],"author":"","license":"ISC","dependencies":{"handlebars":"^4.7.7","lodash":"^4.17.21","ts-morph":"^23.0.0"},"devDependencies":{"@types/chai":"^4.3.4","@types/fs-extra":"^8.1.0","@types/lodash":"^4.14.182","@types/mocha":"^10.0.1","@typescript-eslint/eslint-plugin":"^6.8.0","@typescript-eslint/parser":"^6.8.0","chai":"^4.3.7","cross-env":"7.0.3","eslint-plugin-require-extensions":"0.1.3","fs-extra":"^10.0.0","mocha":"^10.2.0","prettier":"^3.1.0","rimraf":"^5.0.10","ts-node":"^10.7.0"},"bugs":{"url":"https://github.com/Azure/autorest.typescript/issues"},"homepage":"https://github.com/Azure/autorest.typescript/tree/main/packages/rlc-common/"}
1
+ {"name":"@azure-tools/rlc-common","version":"0.49.1","description":"","type":"commonjs","main":"dist/index.js","module":"dist-esm/index.js","exports":{".":{"types":"./types/index.d.ts","require":"./dist/index.js","import":"./dist-esm/index.js"}},"types":"./types/index.d.ts","scripts":{"lint":"eslint src --ext .ts --max-warnings=0","lint:fix":"eslint src --fix --ext .ts","format":"npm run -s prettier -- --write","check-format":"npm run prettier -- --check","prettier":"prettier --config ./.prettierrc \"src/**/*.ts\"","build":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && node publishPackage.js","test":"npm run unit-test","unit-test":"cross-env TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register --loader=ts-node/esm --experimental-specifier-resolution=node test/**/*.spec.ts"},"keywords":[],"author":"","license":"ISC","dependencies":{"handlebars":"^4.7.7","lodash":"^4.17.21","ts-morph":"^23.0.0"},"devDependencies":{"@types/chai":"^4.3.4","@types/fs-extra":"^8.1.0","@types/lodash":"^4.14.182","@types/mocha":"^10.0.1","@typescript-eslint/eslint-plugin":"^6.8.0","@typescript-eslint/parser":"^6.8.0","chai":"^4.3.7","cross-env":"7.0.3","eslint-plugin-require-extensions":"0.1.3","fs-extra":"^10.0.0","mocha":"^10.2.0","prettier":"^3.1.0","rimraf":"^5.0.10","ts-node":"^10.7.0"},"bugs":{"url":"https://github.com/Azure/autorest.typescript/issues"},"homepage":"https://github.com/Azure/autorest.typescript/tree/main/packages/rlc-common/"}
@@ -204,7 +204,7 @@ describe("My test", () => {
204
204
 
205
205
  // afterEach(async function() {
206
206
  // await recorder.stop();
207
- // );
207
+ // });
208
208
 
209
209
  it("sample test", async function() {
210
210
  assert.equal(1, 1);
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AA0LA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,0BAA0B,GAAG,CAAC,CAAC;AAuFjC,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,kDAAkD;IAClD,gCAAe,CAAA;IACf,qDAAqD;IACrD,kCAAiB,CAAA;IACjB,wDAAwD;IACxD,wCAAuB,CAAA;AACzB,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB"}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AA0LA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,0BAA0B,GAAG,CAAC,CAAC;AA6FjC,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,kDAAkD;IAClD,gCAAe,CAAA;IACf,qDAAqD;IACrD,kCAAiB,CAAA;IACjB,wDAAwD;IACxD,wCAAuB,CAAA;AACzB,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB"}
@@ -1 +1 @@
1
- {"name":"@azure-tools/rlc-common","version":"0.49.0","description":"","type":"module","main":"dist/index.js","module":"dist-esm/index.js","exports":{".":{"types":"./types/index.d.ts","require":"./dist/index.js","import":"./dist-esm/index.js"}},"types":"./types/index.d.ts","scripts":{"lint":"eslint src --ext .ts --max-warnings=0","lint:fix":"eslint src --fix --ext .ts","format":"npm run -s prettier -- --write","check-format":"npm run prettier -- --check","prettier":"prettier --config ./.prettierrc \"src/**/*.ts\"","build":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && node publishPackage.js","test":"npm run unit-test","unit-test":"cross-env TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register --loader=ts-node/esm --experimental-specifier-resolution=node test/**/*.spec.ts"},"keywords":[],"author":"","license":"ISC","dependencies":{"handlebars":"^4.7.7","lodash":"^4.17.21","ts-morph":"^23.0.0"},"devDependencies":{"@types/chai":"^4.3.4","@types/fs-extra":"^8.1.0","@types/lodash":"^4.14.182","@types/mocha":"^10.0.1","@typescript-eslint/eslint-plugin":"^6.8.0","@typescript-eslint/parser":"^6.8.0","chai":"^4.3.7","cross-env":"7.0.3","eslint-plugin-require-extensions":"0.1.3","fs-extra":"^10.0.0","mocha":"^10.2.0","prettier":"^3.1.0","rimraf":"^5.0.10","ts-node":"^10.7.0"},"bugs":{"url":"https://github.com/Azure/autorest.typescript/issues"},"homepage":"https://github.com/Azure/autorest.typescript/tree/main/packages/rlc-common/"}
1
+ {"name":"@azure-tools/rlc-common","version":"0.49.1","description":"","type":"module","main":"dist/index.js","module":"dist-esm/index.js","exports":{".":{"types":"./types/index.d.ts","require":"./dist/index.js","import":"./dist-esm/index.js"}},"types":"./types/index.d.ts","scripts":{"lint":"eslint src --ext .ts --max-warnings=0","lint:fix":"eslint src --fix --ext .ts","format":"npm run -s prettier -- --write","check-format":"npm run prettier -- --check","prettier":"prettier --config ./.prettierrc \"src/**/*.ts\"","build":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && node publishPackage.js","test":"npm run unit-test","unit-test":"cross-env TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register --loader=ts-node/esm --experimental-specifier-resolution=node test/**/*.spec.ts"},"keywords":[],"author":"","license":"ISC","dependencies":{"handlebars":"^4.7.7","lodash":"^4.17.21","ts-morph":"^23.0.0"},"devDependencies":{"@types/chai":"^4.3.4","@types/fs-extra":"^8.1.0","@types/lodash":"^4.14.182","@types/mocha":"^10.0.1","@typescript-eslint/eslint-plugin":"^6.8.0","@typescript-eslint/parser":"^6.8.0","chai":"^4.3.7","cross-env":"7.0.3","eslint-plugin-require-extensions":"0.1.3","fs-extra":"^10.0.0","mocha":"^10.2.0","prettier":"^3.1.0","rimraf":"^5.0.10","ts-node":"^10.7.0"},"bugs":{"url":"https://github.com/Azure/autorest.typescript/issues"},"homepage":"https://github.com/Azure/autorest.typescript/tree/main/packages/rlc-common/"}
@@ -201,7 +201,7 @@ describe("My test", () => {
201
201
 
202
202
  // afterEach(async function() {
203
203
  // await recorder.stop();
204
- // );
204
+ // });
205
205
 
206
206
  it("sample test", async function() {
207
207
  assert.equal(1, 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/rlc-common",
3
- "version": "0.49.0",
3
+ "version": "0.49.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/interfaces.ts CHANGED
@@ -202,6 +202,10 @@ export interface OperationLroDetail {
202
202
  export type PackageFlavor = "azure" | undefined;
203
203
 
204
204
  export interface RLCOptions {
205
+ /**
206
+ * Whether to include response headers in the generated response types. If true, the generated response types will include headers as properties.
207
+ */
208
+ includeHeadersInResponse?: boolean;
205
209
  includeShortcuts?: boolean;
206
210
  multiClient?: boolean;
207
211
  batch?: any[];
@@ -255,6 +259,8 @@ export interface RLCOptions {
255
259
  typespecTitleMap?: Record<string, string>;
256
260
  hasSubscriptionId?: boolean;
257
261
  compatibilityLro?: boolean;
262
+ ignoreNullableOnOptional?: boolean;
263
+ isMultiService?: boolean;
258
264
  }
259
265
 
260
266
  export interface ServiceInfo {
@@ -203,7 +203,7 @@ describe("My test", () => {
203
203
 
204
204
  // afterEach(async function() {
205
205
  // await recorder.stop();
206
- // );
206
+ // });
207
207
 
208
208
  it("sample test", async function() {
209
209
  assert.equal(1, 1);
@@ -155,6 +155,10 @@ export interface OperationLroDetail {
155
155
  */
156
156
  export type PackageFlavor = "azure" | undefined;
157
157
  export interface RLCOptions {
158
+ /**
159
+ * Whether to include response headers in the generated response types. If true, the generated response types will include headers as properties.
160
+ */
161
+ includeHeadersInResponse?: boolean;
158
162
  includeShortcuts?: boolean;
159
163
  multiClient?: boolean;
160
164
  batch?: any[];
@@ -208,6 +212,8 @@ export interface RLCOptions {
208
212
  typespecTitleMap?: Record<string, string>;
209
213
  hasSubscriptionId?: boolean;
210
214
  compatibilityLro?: boolean;
215
+ ignoreNullableOnOptional?: boolean;
216
+ isMultiService?: boolean;
211
217
  }
212
218
  export interface ServiceInfo {
213
219
  title?: string;
@@ -1,4 +1,4 @@
1
1
  export declare const karmaConfig = "\n// https://github.com/karma-runner/karma-chrome-launcher\nprocess.env.CHROME_BIN = require(\"puppeteer\").executablePath();\nrequire(\"dotenv\").config();\nconst { relativeRecordingsPath } = require(\"@azure-tools/test-recorder\");\nprocess.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath();\n\nmodule.exports = function (config) {\n config.set({\n // base path that will be used to resolve all patterns (eg. files, exclude)\n basePath: \"./\",\n\n // frameworks to use\n // available frameworks: https://npmjs.org/browse/keyword/karma-adapter\n frameworks: [\"source-map-support\", \"mocha\"],\n\n plugins: [\n \"karma-mocha\",\n \"karma-mocha-reporter\",\n \"karma-chrome-launcher\",\n \"karma-firefox-launcher\",\n \"karma-env-preprocessor\",\n \"karma-coverage\",\n \"karma-sourcemap-loader\",\n \"karma-junit-reporter\",\n \"karma-source-map-support\",\n ],\n\n // list of files / patterns to load in the browser\n files: [\n \"dist-test/index.browser.js\",\n { pattern: \"dist-test/index.browser.js.map\", type: \"html\", included: false, served: true },\n ],\n\n // list of files / patterns to exclude\n exclude: [],\n\n // preprocess matching files before serving them to the browser\n // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor\n preprocessors: {\n \"**/*.js\": [\"sourcemap\", \"env\"],\n // IMPORTANT: COMMENT following line if you want to debug in your browsers!!\n // Preprocess source file to calculate code coverage, however this will make source file unreadable\n // \"dist-test/index.js\": [\"coverage\"]\n },\n\n envPreprocessor: [\n \"TEST_MODE\",\n \"ENDPOINT\",\n \"AZURE_CLIENT_SECRET\",\n \"AZURE_CLIENT_ID\",\n \"AZURE_TENANT_ID\",\n \"SUBSCRIPTION_ID\",\n \"RECORDINGS_RELATIVE_PATH\",\n ],\n\n // test results reporter to use\n // possible values: 'dots', 'progress'\n // available reporters: https://npmjs.org/browse/keyword/karma-reporter\n reporters: [\"mocha\", \"coverage\", \"junit\"],\n\n coverageReporter: {\n // specify a common output directory\n dir: \"coverage-browser/\",\n reporters: [\n { type: \"json\", subdir: \".\", file: \"coverage.json\" },\n { type: \"lcovonly\", subdir: \".\", file: \"lcov.info\" },\n { type: \"html\", subdir: \"html\" },\n { type: \"cobertura\", subdir: \".\", file: \"cobertura-coverage.xml\" },\n ],\n },\n\n junitReporter: {\n outputDir: \"\", // results will be saved as $outputDir/$browserName.xml\n outputFile: \"test-results.browser.xml\", // if included, results will be saved as $outputDir/$browserName/$outputFile\n suite: \"\", // suite will become the package name attribute in xml testsuite element\n useBrowserName: false, // add browser name to report and classes names\n nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element\n classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element\n properties: {}, // key value pair of properties to add to the <properties> section of the report\n },\n\n // web server port\n port: 9876,\n\n // enable / disable colors in the output (reporters and logs)\n colors: true,\n\n // level of logging\n // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG\n logLevel: config.LOG_INFO,\n\n // enable / disable watching file and executing tests whenever any file changes\n autoWatch: false,\n\n // --no-sandbox allows our tests to run in Linux without having to change the system.\n // --disable-web-security allows us to authenticate from the browser without having to write tests using interactive auth, which would be far more complex.\n browsers: [\"ChromeHeadlessNoSandbox\"],\n customLaunchers: {\n ChromeHeadlessNoSandbox: {\n base: \"ChromeHeadless\",\n flags: [\"--no-sandbox\", \"--disable-web-security\"],\n },\n },\n\n // Continuous Integration mode\n // if true, Karma captures browsers, runs the tests and exits\n singleRun: false,\n\n // Concurrency level\n // how many browser should be started simultaneous\n concurrency: 1,\n\n browserNoActivityTimeout: 60000000,\n browserDisconnectTimeout: 10000,\n browserDisconnectTolerance: 3,\n\n client: {\n mocha: {\n // change Karma's debug.html to the mocha web reporter\n reporter: \"html\",\n timeout: \"600000\",\n },\n },\n });\n};\n";
2
2
  export declare const recordedClientContent = "\n\n{{#if isEsm}}\nimport {\n Recorder,\n RecorderStartOptions,\n VitestTestContext,\n} from \"@azure-tools/test-recorder\";\n{{/if}}\n\n{{#if isCjs}}\nimport { Context } from \"mocha\";\nimport { Recorder, RecorderStartOptions } from \"@azure-tools/test-recorder\";\n{{/if}}\n\nconst replaceableVariables: Record<string, string> = {\n SUBSCRIPTION_ID: \"azure_subscription_id\"\n};\n\nconst recorderEnvSetup: RecorderStartOptions = {\n envSetupForPlayback: replaceableVariables,\n};\n\n/**\n * creates the recorder and reads the environment variables from the `.env` file.\n * Should be called first in the test suite to make sure environment variables are\n * read before they are being used.\n */\n{{#if isEsm}}\nexport async function createRecorder(context: VitestTestContext): Promise<Recorder> {\n const recorder = new Recorder(context);\n await recorder.start(recorderEnvSetup);\n return recorder;\n}\n{{/if}}\n\n{{#if isCjs}}\nexport async function createRecorder(context: Context): Promise<Recorder> {\n const recorder = new Recorder(context.currentTest);\n await recorder.start(recorderEnvSetup);\n return recorder;\n}\n{{/if}}\n";
3
- export declare const sampleTestContent = "\n{{#if isEsm}}\n// import { Recorder } from \"@azure-tools/test-recorder\";\n// import { createRecorder } from \"./utils/recordedClient.js\";\nimport { assert, \n // beforeEach,\n // afterEach,\n it,\n describe\n} from \"vitest\";\n{{/if}}\n\n{{#if isCjs}}\n// import { Recorder } from \"@azure-tools/test-recorder\";\nimport { assert } from \"chai\";\n// import { createRecorder } from \"./utils/recordedClient{{#if isModularLibrary}}.js{{/if}}\";\n// import { Context } from \"mocha\";\n{{/if}}\n\ndescribe(\"My test\", () => {\n // let recorder: Recorder;\n\n // beforeEach(async function({{#if isCjs}}this: Context{{else}}ctx{{/if}}) {\n {{#if isEsm}}\n // recorder = await createRecorder(ctx);\n {{else}}\n // recorder = await createRecorder(this);\n {{/if}}\n // });\n\n // afterEach(async function() {\n // await recorder.stop();\n // );\n\n it(\"sample test\", async function() {\n assert.equal(1, 1);\n });\n});\n";
3
+ export declare const sampleTestContent = "\n{{#if isEsm}}\n// import { Recorder } from \"@azure-tools/test-recorder\";\n// import { createRecorder } from \"./utils/recordedClient.js\";\nimport { assert, \n // beforeEach,\n // afterEach,\n it,\n describe\n} from \"vitest\";\n{{/if}}\n\n{{#if isCjs}}\n// import { Recorder } from \"@azure-tools/test-recorder\";\nimport { assert } from \"chai\";\n// import { createRecorder } from \"./utils/recordedClient{{#if isModularLibrary}}.js{{/if}}\";\n// import { Context } from \"mocha\";\n{{/if}}\n\ndescribe(\"My test\", () => {\n // let recorder: Recorder;\n\n // beforeEach(async function({{#if isCjs}}this: Context{{else}}ctx{{/if}}) {\n {{#if isEsm}}\n // recorder = await createRecorder(ctx);\n {{else}}\n // recorder = await createRecorder(this);\n {{/if}}\n // });\n\n // afterEach(async function() {\n // await recorder.stop();\n // });\n\n it(\"sample test\", async function() {\n assert.equal(1, 1);\n });\n});\n";
4
4
  export declare const snippetsContent = "\n{{#if isModularLibrary}}\nimport { {{ clientClassName }} } from \"../src/index.js\";\nimport { DefaultAzureCredential, InteractiveBrowserCredential } from \"@azure/identity\";\n{{/if}}\nimport { setLogLevel } from \"@azure/logger\";\nimport { describe, it } from \"vitest\";\n\ndescribe(\"snippets\", () => {\n{{#if isModularLibrary}}\n it(\"ReadmeSampleCreateClient_Node\", async () => {\n {{#if azureArm}}\n {{#if hasSubscriptionId}}\n const subscriptionId = \"00000000-0000-0000-0000-000000000000\";\n const client = new {{ clientClassName }}(new DefaultAzureCredential(), subscriptionId);\n {{else}}\n const client = new {{ clientClassName }}(new DefaultAzureCredential());\n {{/if}}\n {{else}}\n const client = new {{ clientClassName }}(\"<endpoint>\", new DefaultAzureCredential());\n {{/if}}\n });\n\n it(\"ReadmeSampleCreateClient_Browser\", async () => {\n {{#if azureArm}}\n const credential = new InteractiveBrowserCredential({\n tenantId: \"<YOUR_TENANT_ID>\",\n clientId: \"<YOUR_CLIENT_ID>\",\n });\n {{#if hasSubscriptionId}}\n const subscriptionId = \"00000000-0000-0000-0000-000000000000\";\n const client = new {{ clientClassName }}(credential, subscriptionId);\n {{else}}\n const client = new {{ clientClassName }}(credential);\n {{/if}}\n {{else}}\n const credential = new InteractiveBrowserCredential({\n tenantId: \"<YOUR_TENANT_ID>\",\n clientId: \"<YOUR_CLIENT_ID>\",\n });\n const client = new {{ clientClassName }}(\"<endpoint>\", credential);\n {{/if}}\n });\n {{/if}}\n\n it(\"SetLogLevel\", async () => {\n setLogLevel(\"info\");\n });\n});\n";