@azure/keyvault-admin 4.2.1-alpha.20220330.1 → 4.2.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/index.js +54 -93
- package/dist/index.js.map +1 -1
- package/dist-esm/keyvault-admin/src/accessControlClient.js +16 -15
- package/dist-esm/keyvault-admin/src/accessControlClient.js.map +1 -1
- package/dist-esm/keyvault-admin/src/backupClient.js +5 -3
- package/dist-esm/keyvault-admin/src/backupClient.js.map +1 -1
- package/dist-esm/keyvault-admin/src/constants.js +0 -4
- package/dist-esm/keyvault-admin/src/constants.js.map +1 -1
- package/dist-esm/keyvault-admin/src/generated/keyVaultClientContext.js +1 -2
- package/dist-esm/keyvault-admin/src/generated/keyVaultClientContext.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/backup/operation.js +3 -7
- package/dist-esm/keyvault-admin/src/lro/backup/operation.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/restore/operation.js +3 -7
- package/dist-esm/keyvault-admin/src/lro/restore/operation.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/operation.js +3 -7
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/operation.js.map +1 -1
- package/dist-esm/keyvault-admin/src/tracing.js +10 -0
- package/dist-esm/keyvault-admin/src/tracing.js.map +1 -0
- package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js +70 -151
- package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js.map +1 -1
- package/dist-esm/keyvault-common/src/index.js +0 -1
- package/dist-esm/keyvault-common/src/index.js.map +1 -1
- package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js.map +1 -1
- package/package.json +10 -10
- package/CHANGELOG.md +0 -116
- package/dist-esm/keyvault-admin/src/challengeAuthenticationCallbacks.js +0 -81
- package/dist-esm/keyvault-admin/src/challengeAuthenticationCallbacks.js.map +0 -1
- package/dist-esm/keyvault-admin/src/tracingHelpers.js +0 -42
- package/dist-esm/keyvault-admin/src/tracingHelpers.js.map +0 -1
- package/dist-esm/keyvault-common/src/tracingHelpers.js +0 -42
- package/dist-esm/keyvault-common/src/tracingHelpers.js.map +0 -1
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { SpanStatusCode, createSpanFunction } from "@azure/core-tracing";
|
|
4
|
-
/**
|
|
5
|
-
* Returns a function that can be used for tracing options.
|
|
6
|
-
*
|
|
7
|
-
* @param prefix - The prefix to use, likely the name of the class / client.
|
|
8
|
-
*
|
|
9
|
-
* @example const withTrace = createTraceFunction("Azure.KeyVault.Certificates.CertificateClient")
|
|
10
|
-
*
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export function createTraceFunction(prefix) {
|
|
14
|
-
const createSpan = createSpanFunction({
|
|
15
|
-
namespace: "Microsoft.KeyVault",
|
|
16
|
-
packagePrefix: prefix,
|
|
17
|
-
});
|
|
18
|
-
return async function (operationName, options, cb) {
|
|
19
|
-
const { updatedOptions, span } = createSpan(operationName, options);
|
|
20
|
-
try {
|
|
21
|
-
// NOTE: we really do need to await on this function here so we can handle any exceptions thrown and properly
|
|
22
|
-
// close the span.
|
|
23
|
-
const result = await cb(updatedOptions, span);
|
|
24
|
-
// otel 0.16+ needs this or else the code ends up being set as UNSET
|
|
25
|
-
span.setStatus({
|
|
26
|
-
code: SpanStatusCode.OK,
|
|
27
|
-
});
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
30
|
-
catch (err) {
|
|
31
|
-
span.setStatus({
|
|
32
|
-
code: SpanStatusCode.ERROR,
|
|
33
|
-
message: err.message,
|
|
34
|
-
});
|
|
35
|
-
throw err;
|
|
36
|
-
}
|
|
37
|
-
finally {
|
|
38
|
-
span.end();
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=tracingHelpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tracingHelpers.js","sourceRoot":"","sources":["../../../src/tracingHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAQ,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAsB/E;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,MAAM,UAAU,GAAG,kBAAkB,CAAC;QACpC,SAAS,EAAE,oBAAoB;QAC/B,aAAa,EAAE,MAAM;KACtB,CAAC,CAAC;IAEH,OAAO,KAAK,WAAW,aAAa,EAAE,OAAO,EAAE,EAAE;QAC/C,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAEpE,IAAI;YACF,6GAA6G;YAC7G,kBAAkB;YAClB,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YAE9C,oEAAoE;YACpE,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,EAAE;aACxB,CAAC,CAAC;YACH,OAAO,MAAM,CAAC;SACf;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,KAAK;gBAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;aACrB,CAAC,CAAC;YACH,MAAM,GAAG,CAAC;SACX;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Span, SpanStatusCode, createSpanFunction } from \"@azure/core-tracing\";\nimport { OperationOptions } from \"@azure/core-client\";\n\n/**\n * An interface representing a function that is traced.\n *\n * A traced function will automatically create and close tracing '\n * spans as needed and will handle setting the status / errors as a\n * result of calling the underlying callback.\n *\n * use {@link createTraceFunction} to add tracing to a block of code.\n *\n * @internal\n */\nexport interface TracedFunction {\n <TOptions extends OperationOptions, TReturn>(\n operationName: string,\n options: TOptions,\n cb: (options: TOptions, span: Span) => Promise<TReturn>\n ): Promise<TReturn>;\n}\n\n/**\n * Returns a function that can be used for tracing options.\n *\n * @param prefix - The prefix to use, likely the name of the class / client.\n *\n * @example const withTrace = createTraceFunction(\"Azure.KeyVault.Certificates.CertificateClient\")\n *\n * @internal\n */\nexport function createTraceFunction(prefix: string): TracedFunction {\n const createSpan = createSpanFunction({\n namespace: \"Microsoft.KeyVault\",\n packagePrefix: prefix,\n });\n\n return async function (operationName, options, cb) {\n const { updatedOptions, span } = createSpan(operationName, options);\n\n try {\n // NOTE: we really do need to await on this function here so we can handle any exceptions thrown and properly\n // close the span.\n const result = await cb(updatedOptions, span);\n\n // otel 0.16+ needs this or else the code ends up being set as UNSET\n span.setStatus({\n code: SpanStatusCode.OK,\n });\n return result;\n } catch (err) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message,\n });\n throw err;\n } finally {\n span.end();\n }\n };\n}\n"]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { SpanStatusCode, createSpanFunction } from "@azure/core-tracing";
|
|
4
|
-
/**
|
|
5
|
-
* Returns a function that can be used for tracing options.
|
|
6
|
-
*
|
|
7
|
-
* @param prefix - The prefix to use, likely the name of the class / client.
|
|
8
|
-
*
|
|
9
|
-
* @example const withTrace = createTraceFunction("Azure.KeyVault.Certificates.CertificateClient")
|
|
10
|
-
*
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export function createTraceFunction(prefix) {
|
|
14
|
-
const createSpan = createSpanFunction({
|
|
15
|
-
namespace: "Microsoft.KeyVault",
|
|
16
|
-
packagePrefix: prefix,
|
|
17
|
-
});
|
|
18
|
-
return async function (operationName, options, cb) {
|
|
19
|
-
const { updatedOptions, span } = createSpan(operationName, options);
|
|
20
|
-
try {
|
|
21
|
-
// NOTE: we really do need to await on this function here so we can handle any exceptions thrown and properly
|
|
22
|
-
// close the span.
|
|
23
|
-
const result = await cb(updatedOptions, span);
|
|
24
|
-
// otel 0.16+ needs this or else the code ends up being set as UNSET
|
|
25
|
-
span.setStatus({
|
|
26
|
-
code: SpanStatusCode.OK,
|
|
27
|
-
});
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
30
|
-
catch (err) {
|
|
31
|
-
span.setStatus({
|
|
32
|
-
code: SpanStatusCode.ERROR,
|
|
33
|
-
message: err.message,
|
|
34
|
-
});
|
|
35
|
-
throw err;
|
|
36
|
-
}
|
|
37
|
-
finally {
|
|
38
|
-
span.end();
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=tracingHelpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tracingHelpers.js","sourceRoot":"","sources":["../../../../keyvault-common/src/tracingHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAQ,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAsB/E;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,MAAM,UAAU,GAAG,kBAAkB,CAAC;QACpC,SAAS,EAAE,oBAAoB;QAC/B,aAAa,EAAE,MAAM;KACtB,CAAC,CAAC;IAEH,OAAO,KAAK,WAAW,aAAa,EAAE,OAAO,EAAE,EAAE;QAC/C,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAEpE,IAAI;YACF,6GAA6G;YAC7G,kBAAkB;YAClB,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YAE9C,oEAAoE;YACpE,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,EAAE;aACxB,CAAC,CAAC;YACH,OAAO,MAAM,CAAC;SACf;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,KAAK;gBAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;aACrB,CAAC,CAAC;YACH,MAAM,GAAG,CAAC;SACX;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Span, SpanStatusCode, createSpanFunction } from \"@azure/core-tracing\";\nimport { OperationOptions } from \"@azure/core-http\";\n\n/**\n * An interface representing a function that is traced.\n *\n * A traced function will automatically create and close tracing '\n * spans as needed and will handle setting the status / errors as a\n * result of calling the underlying callback.\n *\n * use {@link createTraceFunction} to add tracing to a block of code.\n *\n * @internal\n */\nexport interface TracedFunction {\n <TOptions extends OperationOptions, TReturn>(\n operationName: string,\n options: TOptions,\n cb: (options: TOptions, span: Span) => Promise<TReturn>\n ): Promise<TReturn>;\n}\n\n/**\n * Returns a function that can be used for tracing options.\n *\n * @param prefix - The prefix to use, likely the name of the class / client.\n *\n * @example const withTrace = createTraceFunction(\"Azure.KeyVault.Certificates.CertificateClient\")\n *\n * @internal\n */\nexport function createTraceFunction(prefix: string): TracedFunction {\n const createSpan = createSpanFunction({\n namespace: \"Microsoft.KeyVault\",\n packagePrefix: prefix,\n });\n\n return async function (operationName, options, cb) {\n const { updatedOptions, span } = createSpan(operationName, options);\n\n try {\n // NOTE: we really do need to await on this function here so we can handle any exceptions thrown and properly\n // close the span.\n const result = await cb(updatedOptions, span);\n\n // otel 0.16+ needs this or else the code ends up being set as UNSET\n span.setStatus({\n code: SpanStatusCode.OK,\n });\n return result;\n } catch (err) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message,\n });\n throw err;\n } finally {\n span.end();\n }\n };\n}\n"]}
|