@azure/arm-trustedsigning 1.0.0-alpha.20241101.1 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ## 1.0.0-beta.2 (2024-11-04)
4
+
5
+ ### Bugs Fixed
6
+
7
+ - Fix missing package information issue in user agent
8
+
3
9
  ## 1.0.0-beta.1 (2024-09-29)
4
10
 
5
11
  ### Features Added
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAgCpB"}
1
+ {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAmCpB"}
@@ -8,7 +8,10 @@ export function createCodeSigning(credential, options = {}) {
8
8
  var _a, _b, _c, _d, _e, _f, _g, _h;
9
9
  const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `https://management.azure.com`;
10
10
  const prefixFromOptions = (_c = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _c === void 0 ? void 0 : _c.userAgentPrefix;
11
- const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : "azsdk-js-api";
11
+ const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.2`;
12
+ const userAgentPrefix = prefixFromOptions
13
+ ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
14
+ : `azsdk-js-api ${userAgentInfo}`;
12
15
  const _j = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info }, credentials: {
13
16
  scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : [`${endpointUrl}/.default`],
14
17
  } }), { apiVersion: _ } = _j, updatedOptions = __rest(_j, ["apiVersion"]);
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningContext.js","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAUtC,0CAA0C;AAC1C,MAAM,UAAU,iBAAiB,CAC/B,UAA2B,EAC3B,UAA2C,EAAE;;IAE7C,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,O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AAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : \"azsdk-js-api\";\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return clientContext;\n}\n"]}
1
+ {"version":3,"file":"codeSigningContext.js","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAUtC,0CAA0C;AAC1C,MAAM,UAAU,iBAAiB,CAC/B,UAA2B,EAC3B,UAA2C,EAAE;;IAE7C,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,CAAC;IAE1F,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,0CAA0C,CAAC;IACjE,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,qCACD,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE,EACrC,cAAc,EAAE,EAAE,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI,EAAE,EACzE,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,GAAG,WAAW,WAAW,CAAC;SACnE,GACF,EAPK,EAAE,UAAU,EAAE,CAAC,OAOpB,EAPyB,cAAc,cAAlC,cAAoC,CAOzC,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAC9D,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.2`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return clientContext;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAgCpB"}
1
+ {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAmCpB"}
@@ -11,7 +11,10 @@ function createCodeSigning(credential, options = {}) {
11
11
  var _a, _b, _c, _d, _e, _f, _g, _h;
12
12
  const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `https://management.azure.com`;
13
13
  const prefixFromOptions = (_c = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _c === void 0 ? void 0 : _c.userAgentPrefix;
14
- const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : "azsdk-js-api";
14
+ const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.2`;
15
+ const userAgentPrefix = prefixFromOptions
16
+ ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
17
+ : `azsdk-js-api ${userAgentInfo}`;
15
18
  const _j = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger_js_1.logger.info }, credentials: {
16
19
  scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : [`${endpointUrl}/.default`],
17
20
  } }), { apiVersion: _ } = _j, updatedOptions = tslib_1.__rest(_j, ["apiVersion"]);
@@ -1 +1 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AC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : \"azsdk-js-api\";\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return clientContext;\n}\n"]}
1
+ {"version":3,"file":"codeSigningContext.js","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAelC,8CAsCC;;AAlDD,yDAA2E;AAC3E,4CAAsC;AAUtC,0CAA0C;AAC1C,SAAgB,iBAAiB,CAC/B,UAA2B,EAC3B,UAA2C,EAAE;;IAE7C,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,CAAC;IAE1F,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,0CAA0C,CAAC;IACjE,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,qCACD,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE,EACrC,cAAc,EAAE,EAAE,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI,EAAE,EACzE,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,GAAG,WAAW,WAAW,CAAC;SACnE,GACF,EAPK,EAAE,UAAU,EAAE,CAAC,OAOpB,EAPyB,cAAc,sBAAlC,cAAoC,CAOzC,CAAC;IACF,MAAM,aAAa,GAAG,IAAA,uBAAS,EAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAC9D,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.2`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return clientContext;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAgCpB"}
1
+ {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAmCpB"}
@@ -8,7 +8,10 @@ export function createCodeSigning(credential, options = {}) {
8
8
  var _a, _b, _c, _d, _e, _f, _g, _h;
9
9
  const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `https://management.azure.com`;
10
10
  const prefixFromOptions = (_c = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _c === void 0 ? void 0 : _c.userAgentPrefix;
11
- const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : "azsdk-js-api";
11
+ const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.2`;
12
+ const userAgentPrefix = prefixFromOptions
13
+ ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
14
+ : `azsdk-js-api ${userAgentInfo}`;
12
15
  const _j = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info }, credentials: {
13
16
  scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : [`${endpointUrl}/.default`],
14
17
  } }), { apiVersion: _ } = _j, updatedOptions = __rest(_j, ["apiVersion"]);
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningContext.js","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAUtC,0CAA0C;AAC1C,MAAM,UAAU,iBAAiB,CAC/B,UAA2B,EAC3B,UAA2C,EAAE;;IAE7C,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,CAAC;IAE1F,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;IACrE,MAAM,eAAe,GAAG,iBAAiB,CAAC,CAAC,CAAC,GAAG,iBAAiB,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC;IACjG,MAAM,qCACD,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE,EACrC,cAAc,EAAE,EAAE,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI,EAAE,EACzE,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,GAAG,WAAW,WAAW,CAAC;SACnE,GACF,EAPK,EAAE,UAAU,EAAE,CAAC,OAOpB,EAPyB,cAAc,cAAlC,cAAoC,CAOzC,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAC9D,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : \"azsdk-js-api\";\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return clientContext;\n}\n"]}
1
+ {"version":3,"file":"codeSigningContext.js","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAUtC,0CAA0C;AAC1C,MAAM,UAAU,iBAAiB,CAC/B,UAA2B,EAC3B,UAA2C,EAAE;;IAE7C,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,CAAC;IAE1F,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,0CAA0C,CAAC;IACjE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CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.2`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return clientContext;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAgCpB"}
1
+ {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAmCpB"}
@@ -8,7 +8,10 @@ export function createCodeSigning(credential, options = {}) {
8
8
  var _a, _b, _c, _d, _e, _f, _g, _h;
9
9
  const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `https://management.azure.com`;
10
10
  const prefixFromOptions = (_c = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _c === void 0 ? void 0 : _c.userAgentPrefix;
11
- const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : "azsdk-js-api";
11
+ const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.2`;
12
+ const userAgentPrefix = prefixFromOptions
13
+ ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
14
+ : `azsdk-js-api ${userAgentInfo}`;
12
15
  const _j = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info }, credentials: {
13
16
  scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : [`${endpointUrl}/.default`],
14
17
  } }), { apiVersion: _ } = _j, updatedOptions = __rest(_j, ["apiVersion"]);
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningContext.js","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAUtC,0CAA0C;AAC1C,MAAM,UAAU,iBAAiB,CAC/B,UAA2B,EAC3B,UAA2C,EAAE;;IAE7C,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,CAAC;IAE1F,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;IACrE,MAAM,eAAe,GAAG,iBAAiB,CAAC,CAAC,CAAC,GAAG,iBAAiB,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC;IACjG,MAAM,qCACD,OAAO,KACV,gBAAgB,EAAE,E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(c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : \"azsdk-js-api\";\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return clientContext;\n}\n"]}
1
+ {"version":3,"file":"codeSigningContext.js","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAA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AAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.2`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return clientContext;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/arm-trustedsigning",
3
- "version": "1.0.0-alpha.20241101.1",
3
+ "version": "1.0.0-beta.2",
4
4
  "description": "A generated SDK for CodeSigningClient.",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -50,7 +50,7 @@
50
50
  "//metadata": {
51
51
  "constantPaths": [
52
52
  {
53
- "path": "src/rest/codeSigningClient.ts",
53
+ "path": "src/api/codeSigningContext.ts",
54
54
  "prefix": "userAgentInfo"
55
55
  }
56
56
  ]
@@ -77,8 +77,8 @@
77
77
  "vitest": "^2.0.5",
78
78
  "@azure-tools/test-credential": "^2.0.0",
79
79
  "@azure-tools/test-recorder": "^4.0.0",
80
- "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
81
- "@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb"
80
+ "@azure/dev-tool": "^1.0.0",
81
+ "@azure/eslint-plugin-azure-sdk": "^3.0.0"
82
82
  },
83
83
  "scripts": {
84
84
  "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",