@azure/keyvault-secrets 4.11.0 → 4.11.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.
- package/dist/browser/api/keyVaultContext.js +2 -1
- package/dist/browser/api/keyVaultContext.js.map +1 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/commonjs/api/keyVaultContext.js +2 -1
- package/dist/commonjs/api/keyVaultContext.js.map +2 -2
- package/dist/commonjs/constants.js +1 -1
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/esm/api/keyVaultContext.js +2 -1
- package/dist/esm/api/keyVaultContext.js.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/react-native/api/keyVaultContext.js +2 -1
- package/dist/react-native/api/keyVaultContext.js.map +1 -1
- package/dist/react-native/constants.js +1 -1
- package/dist/react-native/constants.js.map +1 -1
- package/package.json +4 -4
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import { logger } from "../logger.js";
|
|
4
4
|
import { getClient } from "@azure-rest/core-client";
|
|
5
|
+
import { SDK_VERSION } from "../constants.js";
|
|
5
6
|
/** Creates a new Azure Key Vault Secrets client context. */
|
|
6
7
|
export function createKeyVault(endpointParam, credential, options = {}) {
|
|
7
8
|
const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);
|
|
8
9
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
9
|
-
const userAgentInfo = `azsdk-js-keyvault-secrets
|
|
10
|
+
const userAgentInfo = `azsdk-js-keyvault-secrets/${SDK_VERSION}`;
|
|
10
11
|
const userAgentPrefix = prefixFromOptions
|
|
11
12
|
? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
|
|
12
13
|
: `azsdk-js-api ${userAgentInfo}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyVaultContext.js","sourceRoot":"","sources":["../../../src/api/keyVaultContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"keyVaultContext.js","sourceRoot":"","sources":["../../../src/api/keyVaultContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAgB9C,4DAA4D;AAC5D,MAAM,UAAU,cAAc,CAC5B,aAAqB,EACrB,UAA2B,EAC3B,UAAwC,EAAE;IAE1C,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC;IACjF,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,6BAA6B,WAAW,EAAE,CAAC;IACjE,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE;YACX,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,kCAAkC,CAAC;SAC5E;KACF,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,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACtD,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,EAAE,GAAG,aAAa,EAAE,UAAU,EAAqB,CAAC;AAC7D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { SDK_VERSION } from \"../constants.js\";\n\n/** The Azure Key Vault Secrets client manages secrets in the Key Vault service. */\nexport interface KeyVaultContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface KeyVaultClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Creates a new Azure Key Vault Secrets client context. */\nexport function createKeyVault(\n endpointParam: string,\n credential: TokenCredential,\n options: KeyVaultClientOptionalParams = {},\n): KeyVaultContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-keyvault-secrets/${SDK_VERSION}`;\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 ?? [\"https://vault.azure.net/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-07-01\";\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, apiVersion } as KeyVaultContext;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"4.
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"4.11.1\";\n"]}
|
|
@@ -22,10 +22,11 @@ __export(keyVaultContext_exports, {
|
|
|
22
22
|
module.exports = __toCommonJS(keyVaultContext_exports);
|
|
23
23
|
var import_logger = require("../logger.js");
|
|
24
24
|
var import_core_client = require("@azure-rest/core-client");
|
|
25
|
+
var import_constants = require("../constants.js");
|
|
25
26
|
function createKeyVault(endpointParam, credential, options = {}) {
|
|
26
27
|
const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);
|
|
27
28
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
28
|
-
const userAgentInfo = `azsdk-js-keyvault-secrets
|
|
29
|
+
const userAgentInfo = `azsdk-js-keyvault-secrets/${import_constants.SDK_VERSION}`;
|
|
29
30
|
const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` : `azsdk-js-api ${userAgentInfo}`;
|
|
30
31
|
const { apiVersion: _, ...updatedOptions } = {
|
|
31
32
|
...options,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/api/keyVaultContext.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/** The Azure Key Vault Secrets client manages secrets in the Key Vault service. */\nexport interface KeyVaultContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface KeyVaultClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Creates a new Azure Key Vault Secrets client context. */\nexport function createKeyVault(\n endpointParam: string,\n credential: TokenCredential,\n options: KeyVaultClientOptionalParams = {},\n): KeyVaultContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-keyvault-secrets
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAuB;AAGvB,yBAA0B;
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { SDK_VERSION } from \"../constants.js\";\n\n/** The Azure Key Vault Secrets client manages secrets in the Key Vault service. */\nexport interface KeyVaultContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface KeyVaultClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Creates a new Azure Key Vault Secrets client context. */\nexport function createKeyVault(\n endpointParam: string,\n credential: TokenCredential,\n options: KeyVaultClientOptionalParams = {},\n): KeyVaultContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-keyvault-secrets/${SDK_VERSION}`;\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 ?? [\"https://vault.azure.net/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-07-01\";\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, apiVersion } as KeyVaultContext;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAuB;AAGvB,yBAA0B;AAE1B,uBAA4B;AAiBrB,SAAS,eACd,eACA,YACA,UAAwC,CAAC,GACxB;AACjB,QAAM,cAAc,QAAQ,YAAY,QAAQ,WAAW,OAAO,aAAa;AAC/E,QAAM,oBAAoB,SAAS,kBAAkB;AACrD,QAAM,gBAAgB,6BAA6B,4BAAW;AAC9D,QAAM,kBAAkB,oBACpB,GAAG,iBAAiB,iBAAiB,aAAa,KAClD,gBAAgB,aAAa;AACjC,QAAM,EAAE,YAAY,GAAG,GAAG,eAAe,IAAI;AAAA,IAC3C,GAAG;AAAA,IACH,kBAAkB,EAAE,gBAAgB;AAAA,IACpC,gBAAgB,EAAE,QAAQ,QAAQ,gBAAgB,UAAU,qBAAO,KAAK;AAAA,IACxE,aAAa;AAAA,MACX,QAAQ,QAAQ,aAAa,UAAU,CAAC,kCAAkC;AAAA,IAC5E;AAAA,EACF;AACA,QAAM,oBAAgB,8BAAU,aAAa,YAAY,cAAc;AACvE,gBAAc,SAAS,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAChE,QAAM,aAAa,QAAQ,cAAc;AACzC,gBAAc,SAAS,UAAU;AAAA,IAC/B,MAAM;AAAA,IACN,aAAa,CAAC,KAAK,SAAS;AAG1B,YAAM,MAAM,IAAI,IAAI,IAAI,GAAG;AAC3B,UAAI,CAAC,IAAI,aAAa,IAAI,aAAa,GAAG;AACxC,YAAI,MAAM,GAAG,IAAI,GAAG,GAClB,MAAM,KAAK,IAAI,aAAa,KAAK,CAAC,EAAE,SAAS,IAAI,MAAM,GACzD,eAAe,UAAU;AAAA,MAC3B;AAEA,aAAO,KAAK,GAAG;AAAA,IACjB;AAAA,EACF,CAAC;AACD,SAAO,EAAE,GAAG,eAAe,WAAW;AACxC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -20,7 +20,7 @@ __export(constants_exports, {
|
|
|
20
20
|
SDK_VERSION: () => SDK_VERSION
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(constants_exports);
|
|
23
|
-
const SDK_VERSION = "4.
|
|
23
|
+
const SDK_VERSION = "4.11.1";
|
|
24
24
|
// Annotate the CommonJS export names for ESM import in node:
|
|
25
25
|
0 && (module.exports = {
|
|
26
26
|
SDK_VERSION
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"4.
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"4.11.1\";\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,cAAsB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import { logger } from "../logger.js";
|
|
4
4
|
import { getClient } from "@azure-rest/core-client";
|
|
5
|
+
import { SDK_VERSION } from "../constants.js";
|
|
5
6
|
/** Creates a new Azure Key Vault Secrets client context. */
|
|
6
7
|
export function createKeyVault(endpointParam, credential, options = {}) {
|
|
7
8
|
const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);
|
|
8
9
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
9
|
-
const userAgentInfo = `azsdk-js-keyvault-secrets
|
|
10
|
+
const userAgentInfo = `azsdk-js-keyvault-secrets/${SDK_VERSION}`;
|
|
10
11
|
const userAgentPrefix = prefixFromOptions
|
|
11
12
|
? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
|
|
12
13
|
: `azsdk-js-api ${userAgentInfo}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyVaultContext.js","sourceRoot":"","sources":["../../../src/api/keyVaultContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"keyVaultContext.js","sourceRoot":"","sources":["../../../src/api/keyVaultContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAgB9C,4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AAG,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,EAAE,GAAG,aAAa,EAAE,UAAU,EAAqB,CAAC;AAC7D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { SDK_VERSION } from \"../constants.js\";\n\n/** The Azure Key Vault Secrets client manages secrets in the Key Vault service. */\nexport interface KeyVaultContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface KeyVaultClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Creates a new Azure Key Vault Secrets client context. */\nexport function createKeyVault(\n endpointParam: string,\n credential: TokenCredential,\n options: KeyVaultClientOptionalParams = {},\n): KeyVaultContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-keyvault-secrets/${SDK_VERSION}`;\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 ?? [\"https://vault.azure.net/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-07-01\";\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, apiVersion } as KeyVaultContext;\n}\n"]}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"4.
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"4.11.1\";\n"]}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import { logger } from "../logger.js";
|
|
4
4
|
import { getClient } from "@azure-rest/core-client";
|
|
5
|
+
import { SDK_VERSION } from "../constants.js";
|
|
5
6
|
/** Creates a new Azure Key Vault Secrets client context. */
|
|
6
7
|
export function createKeyVault(endpointParam, credential, options = {}) {
|
|
7
8
|
const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);
|
|
8
9
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
9
|
-
const userAgentInfo = `azsdk-js-keyvault-secrets
|
|
10
|
+
const userAgentInfo = `azsdk-js-keyvault-secrets/${SDK_VERSION}`;
|
|
10
11
|
const userAgentPrefix = prefixFromOptions
|
|
11
12
|
? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
|
|
12
13
|
: `azsdk-js-api ${userAgentInfo}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyVaultContext.js","sourceRoot":"","sources":["../../../src/api/keyVaultContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"keyVaultContext.js","sourceRoot":"","sources":["../../../src/api/keyVaultContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAgB9C,4DAA4D;AAC5D,MAAM,UAAU,cAAc,CAC5B,aAAqB,EACrB,UAA2B,EAC3B,UAAwC,EAAE;IAE1C,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC;IACjF,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,6BA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AAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAqB,CAAC;AAC7D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { SDK_VERSION } from \"../constants.js\";\n\n/** The Azure Key Vault Secrets client manages secrets in the Key Vault service. */\nexport interface KeyVaultContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface KeyVaultClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Creates a new Azure Key Vault Secrets client context. */\nexport function createKeyVault(\n endpointParam: string,\n credential: TokenCredential,\n options: KeyVaultClientOptionalParams = {},\n): KeyVaultContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-keyvault-secrets/${SDK_VERSION}`;\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 ?? [\"https://vault.azure.net/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-07-01\";\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, apiVersion } as KeyVaultContext;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"4.
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"4.11.1\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/keyvault-secrets",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.1",
|
|
4
4
|
"description": "Azure Key Vault Secrets",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.0.0"
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@azure/core-rest-pipeline": "^1.19.0",
|
|
91
91
|
"@azure/core-tracing": "^1.2.0",
|
|
92
92
|
"@azure/core-util": "^1.11.0",
|
|
93
|
-
"@azure/keyvault-common": "^2.
|
|
93
|
+
"@azure/keyvault-common": "^2.1.0",
|
|
94
94
|
"@azure/logger": "^1.1.4",
|
|
95
95
|
"tslib": "^2.8.1"
|
|
96
96
|
},
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"vitest": "^4.1.2",
|
|
110
110
|
"@azure-tools/test-credential": "^2.1.2",
|
|
111
111
|
"@azure-tools/test-utils-vitest": "^2.0.1",
|
|
112
|
+
"@azure-tools/test-recorder": "^4.1.1",
|
|
112
113
|
"@azure/dev-tool": "^1.0.0",
|
|
113
|
-
"@azure/eslint-plugin-azure-sdk": "^3.0.0"
|
|
114
|
-
"@azure-tools/test-recorder": "^4.1.1"
|
|
114
|
+
"@azure/eslint-plugin-azure-sdk": "^3.0.0"
|
|
115
115
|
},
|
|
116
116
|
"scripts": {
|
|
117
117
|
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|