@azure/arm-trustedsigning 1.0.0-beta.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,OAAO,C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AAC,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 @@
1
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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"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.47.9"
8
+ "packageVersion": "7.47.11"
9
9
  }
10
10
  ]
11
11
  }
@@ -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;IAE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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,M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AAC;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/cod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,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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/arm-trustedsigning",
3
- "version": "1.0.0-beta.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
  ]
@@ -67,13 +67,9 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "dotenv": "^16.0.0",
70
- "@microsoft/api-extractor": "^7.40.3",
71
70
  "@types/node": "^18.0.0",
72
71
  "eslint": "^8.55.0",
73
- "rimraf": "^5.0.5",
74
- "mkdirp": "^3.0.1",
75
72
  "typescript": "~5.6.2",
76
- "tshy": "^1.11.1",
77
73
  "@azure/identity": "^4.2.1",
78
74
  "@vitest/browser": "^2.0.5",
79
75
  "@vitest/coverage-istanbul": "^2.0.5",
@@ -85,8 +81,8 @@
85
81
  "@azure/eslint-plugin-azure-sdk": "^3.0.0"
86
82
  },
87
83
  "scripts": {
88
- "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
89
- "extract-api": "rimraf review && mkdirp ./review && dev-tool run extract-api",
84
+ "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
85
+ "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
90
86
  "pack": "npm pack 2>&1",
91
87
  "lint": "echo skipped",
92
88
  "lint:fix": "echo skipped",
@@ -96,18 +92,17 @@
96
92
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
97
93
  "integration-test:browser": "echo skipped",
98
94
  "integration-test:node": "echo skipped",
99
- "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
100
95
  "build:samples": "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f",
101
96
  "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
102
97
  "execute:samples": "dev-tool samples run samples-dev",
103
98
  "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
104
99
  "generate:client": "echo skipped",
105
100
  "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
106
- "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
107
- "build:test": "npm run clean && tshy && dev-tool run build-test",
108
- "build": "npm run clean && tshy && mkdirp ./review && dev-tool run extract-api",
109
- "test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node",
110
- "test": "npm run clean && tshy && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test"
101
+ "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
102
+ "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test",
103
+ "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
104
+ "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node",
105
+ "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test"
111
106
  },
112
107
  "//sampleConfiguration": {
113
108
  "productName": "@azure/arm-trustedsigning",
@@ -121,44 +116,36 @@
121
116
  "./package.json": "./package.json",
122
117
  ".": {
123
118
  "browser": {
124
- "source": "./src/index.ts",
125
119
  "types": "./dist/browser/index.d.ts",
126
120
  "default": "./dist/browser/index.js"
127
121
  },
128
122
  "react-native": {
129
- "source": "./src/index.ts",
130
123
  "types": "./dist/react-native/index.d.ts",
131
124
  "default": "./dist/react-native/index.js"
132
125
  },
133
126
  "import": {
134
- "source": "./src/index.ts",
135
127
  "types": "./dist/esm/index.d.ts",
136
128
  "default": "./dist/esm/index.js"
137
129
  },
138
130
  "require": {
139
- "source": "./src/index.ts",
140
131
  "types": "./dist/commonjs/index.d.ts",
141
132
  "default": "./dist/commonjs/index.js"
142
133
  }
143
134
  },
144
135
  "./models": {
145
136
  "browser": {
146
- "source": "./src/models/index.ts",
147
137
  "types": "./dist/browser/models/index.d.ts",
148
138
  "default": "./dist/browser/models/index.js"
149
139
  },
150
140
  "react-native": {
151
- "source": "./src/models/index.ts",
152
141
  "types": "./dist/react-native/models/index.d.ts",
153
142
  "default": "./dist/react-native/models/index.js"
154
143
  },
155
144
  "import": {
156
- "source": "./src/models/index.ts",
157
145
  "types": "./dist/esm/models/index.d.ts",
158
146
  "default": "./dist/esm/models/index.js"
159
147
  },
160
148
  "require": {
161
- "source": "./src/models/index.ts",
162
149
  "types": "./dist/commonjs/models/index.d.ts",
163
150
  "default": "./dist/commonjs/models/index.js"
164
151
  }