Rimuovo node_modules e aggiorno .gitignore

This commit is contained in:
Paolo A
2025-02-18 23:00:18 +00:00
parent 4bbf35cefb
commit c9aa87160f
6874 changed files with 0 additions and 621988 deletions

1
node_modules/.bin/is-docker generated vendored
View File

@@ -1 +0,0 @@
../is-docker/cli.js

1
node_modules/.bin/mime generated vendored
View File

@@ -1 +0,0 @@
../mime/cli.js

1
node_modules/.bin/mssql generated vendored
View File

@@ -1 +0,0 @@
../mssql/bin/mssql

1
node_modules/.bin/semver generated vendored
View File

@@ -1 +0,0 @@
../semver/bin/semver.js

1
node_modules/.bin/uuid generated vendored
View File

@@ -1 +0,0 @@
../uuid/dist/bin/uuid

1709
node_modules/.package-lock.json generated vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2020 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,69 +0,0 @@
# Azure Abort Controller client library for JavaScript
The `@azure/abort-controller` package provides `AbortSignalLike` interface and
`AbortError` classes to make it easier to work with the
[AbortController](https://developer.mozilla.org/docs/Web/API/AbortController)
and the `AbortSignal` used by
[fetch](https://developer.mozilla.org/docs/Web/API/Fetch_API) built into modern JavaScript platforms.
Customers of Azure SDK for JavaScript in general do not need to use this library. Instead they
use `AbortController` and `AbortSignal` provided by their platforms and pass the abort signals to Azure SDK operations.
Key links:
- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller)
- [Package (npm)](https://www.npmjs.com/package/@azure/abort-controller)
- [API Reference Documentation](https://docs.microsoft.com/javascript/api/overview/azure/abort-controller-readme)
## Getting started
### Installation
Install this library using npm as follows
```
npm install @azure/abort-controller
```
## Key Concepts
Use `AbortController` to create an `AbortSignal` which can then be passed to Azure SDK operations to cancel
pending work. The `AbortSignal` can be accessed via the `signal` property on an instantiated `AbortController`.
An `AbortSignal` can also be returned directly from a static method, e.g. `AbortSignal.timeout(100)`.
that is cancelled after 100 milliseconds.
## Examples
The below examples assume that `doAsyncWork` is a function that takes a bag of properties, one of which is
of the abort signal.
### Example 1 - basic usage
```js
const controller = new AbortController();
doAsyncWork({ abortSignal: controller.signal });
// at some point later
controller.abort();
```
### Example 2 - Aborting with timeout
```js
const signal = AbortSignal.timeout(1000);
doAsyncWork({ abortSignal: signal });
```
## Next steps
You can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes.
## Troubleshooting
If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new).
## Contributing
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fabort-controller%2FREADME.png)

View File

@@ -1,42 +0,0 @@
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
export declare class AbortError extends Error {
constructor(message?: string);
}
/**
* Allows the request to be aborted upon firing of the "abort" event.
* Compatible with the browser built-in AbortSignal and common polyfills.
*/
export declare interface AbortSignalLike {
/**
* Indicates if the signal has already been aborted.
*/
readonly aborted: boolean;
/**
* Add new "abort" event listener, only support "abort" event.
*/
addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
/**
* Remove "abort" event listener, only support "abort" event.
*/
removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
}
export { }

View File

@@ -1,22 +0,0 @@
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
export declare class AbortError extends Error {
constructor(message?: string);
}
//# sourceMappingURL=AbortError.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortError.d.ts","sourceRoot":"","sources":["../../src/AbortError.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,CAAC,EAAE,MAAM;CAI7B"}

View File

@@ -1,27 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
export class AbortError extends Error {
constructor(message) {
super(message);
this.name = "AbortError";
}
}
//# sourceMappingURL=AbortError.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortError.js","sourceRoot":"","sources":["../../src/AbortError.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message?: string) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n"]}

View File

@@ -1,19 +0,0 @@
/**
* Allows the request to be aborted upon firing of the "abort" event.
* Compatible with the browser built-in AbortSignal and common polyfills.
*/
export interface AbortSignalLike {
/**
* Indicates if the signal has already been aborted.
*/
readonly aborted: boolean;
/**
* Add new "abort" event listener, only support "abort" event.
*/
addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
/**
* Remove "abort" event listener, only support "abort" event.
*/
removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
}
//# sourceMappingURL=AbortSignalLike.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortSignalLike.d.ts","sourceRoot":"","sources":["../../src/AbortSignalLike.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,gBAAgB,CACd,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;IACR;;OAEG;IACH,mBAAmB,CACjB,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;CACT"}

View File

@@ -1,4 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export {};
//# sourceMappingURL=AbortSignalLike.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortSignalLike.js","sourceRoot":"","sources":["../../src/AbortSignalLike.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n /**\n * Indicates if the signal has already been aborted.\n */\n readonly aborted: boolean;\n /**\n * Add new \"abort\" event listener, only support \"abort\" event.\n */\n addEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any,\n ): void;\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n */\n removeEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any,\n ): void;\n}\n"]}

View File

@@ -1,7 +0,0 @@
declare global {
interface Event {
}
}
export { AbortError } from "./AbortError.js";
export { AbortSignalLike } from "./AbortSignalLike.js";
//# sourceMappingURL=index.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;KAAG;CACnB;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}

View File

@@ -1,4 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export { AbortError } from "./AbortError.js";
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\ndeclare global {\n interface Event {}\n}\n\nexport { AbortError } from \"./AbortError.js\";\nexport { AbortSignalLike } from \"./AbortSignalLike.js\";\n"]}

View File

@@ -1,3 +0,0 @@
{
"type": "module"
}

View File

@@ -1,22 +0,0 @@
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
export declare class AbortError extends Error {
constructor(message?: string);
}
//# sourceMappingURL=AbortError.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortError.d.ts","sourceRoot":"","sources":["../../src/AbortError.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,CAAC,EAAE,MAAM;CAI7B"}

View File

@@ -1,31 +0,0 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AbortError = void 0;
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
class AbortError extends Error {
constructor(message) {
super(message);
this.name = "AbortError";
}
}
exports.AbortError = AbortError;
//# sourceMappingURL=AbortError.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortError.js","sourceRoot":"","sources":["../../src/AbortError.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF;AALD,gCAKC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message?: string) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n"]}

View File

@@ -1,19 +0,0 @@
/**
* Allows the request to be aborted upon firing of the "abort" event.
* Compatible with the browser built-in AbortSignal and common polyfills.
*/
export interface AbortSignalLike {
/**
* Indicates if the signal has already been aborted.
*/
readonly aborted: boolean;
/**
* Add new "abort" event listener, only support "abort" event.
*/
addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
/**
* Remove "abort" event listener, only support "abort" event.
*/
removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
}
//# sourceMappingURL=AbortSignalLike.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortSignalLike.d.ts","sourceRoot":"","sources":["../../src/AbortSignalLike.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,gBAAgB,CACd,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;IACR;;OAEG;IACH,mBAAmB,CACjB,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;CACT"}

View File

@@ -1,5 +0,0 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=AbortSignalLike.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortSignalLike.js","sourceRoot":"","sources":["../../src/AbortSignalLike.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n /**\n * Indicates if the signal has already been aborted.\n */\n readonly aborted: boolean;\n /**\n * Add new \"abort\" event listener, only support \"abort\" event.\n */\n addEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any,\n ): void;\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n */\n removeEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any,\n ): void;\n}\n"]}

View File

@@ -1,7 +0,0 @@
declare global {
interface Event {
}
}
export { AbortError } from "./AbortError.js";
export { AbortSignalLike } from "./AbortSignalLike.js";
//# sourceMappingURL=index.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;KAAG;CACnB;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}

View File

@@ -1,8 +0,0 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AbortError = void 0;
var AbortError_js_1 = require("./AbortError.js");
Object.defineProperty(exports, "AbortError", { enumerable: true, get: function () { return AbortError_js_1.AbortError; } });
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAMlC,iDAA6C;AAApC,2GAAA,UAAU,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\ndeclare global {\n interface Event {}\n}\n\nexport { AbortError } from \"./AbortError.js\";\nexport { AbortSignalLike } from \"./AbortSignalLike.js\";\n"]}

View File

@@ -1,3 +0,0 @@
{
"type": "commonjs"
}

View File

@@ -1,11 +0,0 @@
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
// It should be published with your NPM package. It should not be tracked by Git.
{
"tsdocVersion": "0.12",
"toolPackages": [
{
"packageName": "@microsoft/api-extractor",
"packageVersion": "7.43.1"
}
]
}

View File

@@ -1,22 +0,0 @@
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
export declare class AbortError extends Error {
constructor(message?: string);
}
//# sourceMappingURL=AbortError.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortError.d.ts","sourceRoot":"","sources":["../../src/AbortError.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,CAAC,EAAE,MAAM;CAI7B"}

View File

@@ -1,27 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
export class AbortError extends Error {
constructor(message) {
super(message);
this.name = "AbortError";
}
}
//# sourceMappingURL=AbortError.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortError.js","sourceRoot":"","sources":["../../src/AbortError.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message?: string) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n"]}

View File

@@ -1,19 +0,0 @@
/**
* Allows the request to be aborted upon firing of the "abort" event.
* Compatible with the browser built-in AbortSignal and common polyfills.
*/
export interface AbortSignalLike {
/**
* Indicates if the signal has already been aborted.
*/
readonly aborted: boolean;
/**
* Add new "abort" event listener, only support "abort" event.
*/
addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
/**
* Remove "abort" event listener, only support "abort" event.
*/
removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
}
//# sourceMappingURL=AbortSignalLike.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortSignalLike.d.ts","sourceRoot":"","sources":["../../src/AbortSignalLike.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,gBAAgB,CACd,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;IACR;;OAEG;IACH,mBAAmB,CACjB,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;CACT"}

View File

@@ -1,4 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export {};
//# sourceMappingURL=AbortSignalLike.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortSignalLike.js","sourceRoot":"","sources":["../../src/AbortSignalLike.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n /**\n * Indicates if the signal has already been aborted.\n */\n readonly aborted: boolean;\n /**\n * Add new \"abort\" event listener, only support \"abort\" event.\n */\n addEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any,\n ): void;\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n */\n removeEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any,\n ): void;\n}\n"]}

View File

@@ -1,7 +0,0 @@
declare global {
interface Event {
}
}
export { AbortError } from "./AbortError.js";
export { AbortSignalLike } from "./AbortSignalLike.js";
//# sourceMappingURL=index.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;KAAG;CACnB;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}

View File

@@ -1,4 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export { AbortError } from "./AbortError.js";
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\ndeclare global {\n interface Event {}\n}\n\nexport { AbortError } from \"./AbortError.js\";\nexport { AbortSignalLike } from \"./AbortSignalLike.js\";\n"]}

View File

@@ -1,3 +0,0 @@
{
"type": "module"
}

View File

@@ -1,22 +0,0 @@
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
export declare class AbortError extends Error {
constructor(message?: string);
}
//# sourceMappingURL=AbortError.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortError.d.ts","sourceRoot":"","sources":["../../src/AbortError.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,CAAC,EAAE,MAAM;CAI7B"}

View File

@@ -1,27 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
export class AbortError extends Error {
constructor(message) {
super(message);
this.name = "AbortError";
}
}
//# sourceMappingURL=AbortError.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortError.js","sourceRoot":"","sources":["../../src/AbortError.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message?: string) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n"]}

View File

@@ -1,19 +0,0 @@
/**
* Allows the request to be aborted upon firing of the "abort" event.
* Compatible with the browser built-in AbortSignal and common polyfills.
*/
export interface AbortSignalLike {
/**
* Indicates if the signal has already been aborted.
*/
readonly aborted: boolean;
/**
* Add new "abort" event listener, only support "abort" event.
*/
addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
/**
* Remove "abort" event listener, only support "abort" event.
*/
removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
}
//# sourceMappingURL=AbortSignalLike.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortSignalLike.d.ts","sourceRoot":"","sources":["../../src/AbortSignalLike.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,gBAAgB,CACd,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;IACR;;OAEG;IACH,mBAAmB,CACjB,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;CACT"}

View File

@@ -1,4 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export {};
//# sourceMappingURL=AbortSignalLike.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"AbortSignalLike.js","sourceRoot":"","sources":["../../src/AbortSignalLike.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n /**\n * Indicates if the signal has already been aborted.\n */\n readonly aborted: boolean;\n /**\n * Add new \"abort\" event listener, only support \"abort\" event.\n */\n addEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any,\n ): void;\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n */\n removeEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any,\n ): void;\n}\n"]}

View File

@@ -1,7 +0,0 @@
declare global {
interface Event {
}
}
export { AbortError } from "./AbortError.js";
export { AbortSignalLike } from "./AbortSignalLike.js";
//# sourceMappingURL=index.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;KAAG;CACnB;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}

View File

@@ -1,4 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export { AbortError } from "./AbortError.js";
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\ndeclare global {\n interface Event {}\n}\n\nexport { AbortError } from \"./AbortError.js\";\nexport { AbortSignalLike } from \"./AbortSignalLike.js\";\n"]}

View File

@@ -1,3 +0,0 @@
{
"type": "module"
}

View File

@@ -1,116 +0,0 @@
{
"name": "@azure/abort-controller",
"sdk-type": "client",
"version": "2.1.2",
"description": "Microsoft Azure SDK for JavaScript - Aborter",
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md",
"repository": "github:Azure/azure-sdk-for-js",
"sideEffects": false,
"type": "module",
"main": "./dist/commonjs/index.js",
"browser": "./dist/browser/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"browser": {
"types": "./dist/browser/index.d.ts",
"default": "./dist/browser/index.js"
},
"react-native": {
"types": "./dist/react-native/index.d.ts",
"default": "./dist/react-native/index.js"
},
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"types": "./dist/commonjs/index.d.ts",
"files": [
"dist/",
"README.md",
"LICENSE"
],
"engines": {
"node": ">=18.0.0"
},
"keywords": [
"azure",
"aborter",
"abortsignal",
"cancellation",
"node.js",
"typescript",
"javascript",
"browser",
"cloud"
],
"scripts": {
"build:samples": "echo Obsolete",
"build:test": "npm run clean && tshy && dev-tool run build-test",
"build": "npm run clean && tshy && api-extractor run --local",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,mjs,cjs,json}\"",
"clean": "rimraf --glob dist dist-* temp types *.tgz *.log",
"execute:samples": "echo skipped",
"extract-api": "tshy && api-extractor run --local",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,mjs,cjs,json}\"",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --ext .cts --ext .mts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts --ext .cts --ext .mts",
"pack": "npm pack 2>&1",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
"test:node": "npm run clean && tshy && npm run unit-test:node && npm run integration-test:node",
"test": "npm run clean && tshy && npm run unit-test:node && dev-tool run build-test && npm run unit-test:browser && npm run integration-test",
"unit-test:browser": "npm run build:test && dev-tool run test:vitest --no-test-proxy --browser",
"unit-test:node": "dev-tool run test:vitest --no-test-proxy",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"dependencies": {
"tslib": "^2.6.2"
},
"devDependencies": {
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@microsoft/api-extractor": "^7.40.3",
"@types/node": "^18.0.0",
"@vitest/browser": "^1.3.1",
"@vitest/coverage-istanbul": "^1.3.1",
"eslint": "^8.56.0",
"playwright": "^1.41.2",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"tshy": "^1.13.0",
"typescript": "~5.3.3",
"vitest": "^1.3.1"
},
"//metadata": {
"migrationDate": "2023-03-08T18:36:03.000Z"
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
},
"dialects": [
"esm",
"commonjs"
],
"esmDialects": [
"browser",
"react-native"
],
"selfLink": false
}
}

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2020 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,78 +0,0 @@
# Azure Core Authentication client library for JavaScript
The `@azure/core-auth` package provides core interfaces and helper methods for authenticating with Azure services using Azure Active Directory and other authentication schemes common across the Azure SDK. As a "core" library, it shouldn't need to be added as a dependency to any user code, only other Azure SDK libraries.
## Getting started
### Installation
Install this library using npm as follows
```
npm install @azure/core-auth
```
## Key Concepts
The `TokenCredential` interface represents a credential capable of providing an authentication token. The `@azure/identity` package contains various credentials that implement the `TokenCredential` interface.
The `AzureKeyCredential` is a static key-based credential that supports key rotation via the `update` method. Use this when a single secret value is needed for authentication, e.g. when using a shared access key.
The `AzureNamedKeyCredential` is a static name/key-based credential that supports name and key rotation via the `update` method. Use this when both a secret value and a label are needed, e.g. when using a shared access key and shared access key name.
The `AzureSASCredential` is a static signature-based credential that supports updating the signature value via the `update` method. Use this when using a shared access signature.
## Examples
### AzureKeyCredential
```ts snippet:azure_key_credential
import { AzureKeyCredential } from "@azure/core-auth";
const credential = new AzureKeyCredential("secret value");
// prints: "secret value"
console.log(credential.key);
credential.update("other secret value");
// prints: "other secret value"
console.log(credential.key);
```
### AzureNamedKeyCredential
```ts snippet:azure_named_key_credential
import { AzureNamedKeyCredential } from "@azure/core-auth";
const credential = new AzureNamedKeyCredential("ManagedPolicy", "secret value");
// prints: "ManagedPolicy, secret value"
console.log(`${credential.name}, ${credential.key}`);
credential.update("OtherManagedPolicy", "other secret value");
// prints: "OtherManagedPolicy, other secret value"
console.log(`${credential.name}, ${credential.key}`);
```
### AzureSASCredential
```ts snippet:azure_sas_credential
import { AzureSASCredential } from "@azure/core-auth";
const credential = new AzureSASCredential("signature1");
// prints: "signature1"
console.log(credential.signature);
credential.update("signature2");
// prints: "signature2"
console.log(credential.signature);
```
## Next steps
You can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes.
## Troubleshooting
If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new).
## Contributing
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-auth%2FREADME.png)

View File

@@ -1,29 +0,0 @@
import { KeyCredential } from "./keyCredential.js";
/**
* A static-key-based credential that supports updating
* the underlying key value.
*/
export declare class AzureKeyCredential implements KeyCredential {
private _key;
/**
* The value of the key to be used in authentication
*/
get key(): string;
/**
* Create an instance of an AzureKeyCredential for use
* with a service client.
*
* @param key - The initial value of the key to use in authentication
*/
constructor(key: string);
/**
* Change the value of the key.
*
* Updates will take effect upon the next request after
* updating the key value.
*
* @param newKey - The new key value to be used
*/
update(newKey: string): void;
}
//# sourceMappingURL=azureKeyCredential.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"azureKeyCredential.d.ts","sourceRoot":"","sources":["../../src/azureKeyCredential.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,aAAa;IACtD,OAAO,CAAC,IAAI,CAAS;IAErB;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IAED;;;;;OAKG;gBACS,GAAG,EAAE,MAAM;IAQvB;;;;;;;OAOG;IACI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAGpC"}

View File

@@ -1,38 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* A static-key-based credential that supports updating
* the underlying key value.
*/
export class AzureKeyCredential {
/**
* The value of the key to be used in authentication
*/
get key() {
return this._key;
}
/**
* Create an instance of an AzureKeyCredential for use
* with a service client.
*
* @param key - The initial value of the key to use in authentication
*/
constructor(key) {
if (!key) {
throw new Error("key must be a non-empty string");
}
this._key = key;
}
/**
* Change the value of the key.
*
* Updates will take effect upon the next request after
* updating the key value.
*
* @param newKey - The new key value to be used
*/
update(newKey) {
this._key = newKey;
}
}
//# sourceMappingURL=azureKeyCredential.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"azureKeyCredential.js","sourceRoot":"","sources":["../../src/azureKeyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAG7B;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACH,YAAY,GAAW;QACrB,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,MAAc;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { KeyCredential } from \"./keyCredential.js\";\n\n/**\n * A static-key-based credential that supports updating\n * the underlying key value.\n */\nexport class AzureKeyCredential implements KeyCredential {\n private _key: string;\n\n /**\n * The value of the key to be used in authentication\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Create an instance of an AzureKeyCredential for use\n * with a service client.\n *\n * @param key - The initial value of the key to use in authentication\n */\n constructor(key: string) {\n if (!key) {\n throw new Error(\"key must be a non-empty string\");\n }\n\n this._key = key;\n }\n\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newKey - The new key value to be used\n */\n public update(newKey: string): void {\n this._key = newKey;\n }\n}\n"]}

View File

@@ -1,54 +0,0 @@
/**
* Represents a credential defined by a static API name and key.
*/
export interface NamedKeyCredential {
/**
* The value of the API key represented as a string
*/
readonly key: string;
/**
* The value of the API name represented as a string.
*/
readonly name: string;
}
/**
* A static name/key-based credential that supports updating
* the underlying name and key values.
*/
export declare class AzureNamedKeyCredential implements NamedKeyCredential {
private _key;
private _name;
/**
* The value of the key to be used in authentication.
*/
get key(): string;
/**
* The value of the name to be used in authentication.
*/
get name(): string;
/**
* Create an instance of an AzureNamedKeyCredential for use
* with a service client.
*
* @param name - The initial value of the name to use in authentication.
* @param key - The initial value of the key to use in authentication.
*/
constructor(name: string, key: string);
/**
* Change the value of the key.
*
* Updates will take effect upon the next request after
* updating the key value.
*
* @param newName - The new name value to be used.
* @param newKey - The new key value to be used.
*/
update(newName: string, newKey: string): void;
}
/**
* Tests an object to determine whether it implements NamedKeyCredential.
*
* @param credential - The assumed NamedKeyCredential to be tested.
*/
export declare function isNamedKeyCredential(credential: unknown): credential is NamedKeyCredential;
//# sourceMappingURL=azureNamedKeyCredential.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"azureNamedKeyCredential.d.ts","sourceRoot":"","sources":["../../src/azureNamedKeyCredential.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,kBAAkB;IAChE,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,KAAK,CAAS;IAEtB;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IASrC;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CAQrD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,IAAI,kBAAkB,CAM1F"}

View File

@@ -1,62 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { isObjectWithProperties } from "@azure/core-util";
/**
* A static name/key-based credential that supports updating
* the underlying name and key values.
*/
export class AzureNamedKeyCredential {
/**
* The value of the key to be used in authentication.
*/
get key() {
return this._key;
}
/**
* The value of the name to be used in authentication.
*/
get name() {
return this._name;
}
/**
* Create an instance of an AzureNamedKeyCredential for use
* with a service client.
*
* @param name - The initial value of the name to use in authentication.
* @param key - The initial value of the key to use in authentication.
*/
constructor(name, key) {
if (!name || !key) {
throw new TypeError("name and key must be non-empty strings");
}
this._name = name;
this._key = key;
}
/**
* Change the value of the key.
*
* Updates will take effect upon the next request after
* updating the key value.
*
* @param newName - The new name value to be used.
* @param newKey - The new key value to be used.
*/
update(newName, newKey) {
if (!newName || !newKey) {
throw new TypeError("newName and newKey must be non-empty strings");
}
this._name = newName;
this._key = newKey;
}
}
/**
* Tests an object to determine whether it implements NamedKeyCredential.
*
* @param credential - The assumed NamedKeyCredential to be tested.
*/
export function isNamedKeyCredential(credential) {
return (isObjectWithProperties(credential, ["name", "key"]) &&
typeof credential.key === "string" &&
typeof credential.name === "string");
}
//# sourceMappingURL=azureNamedKeyCredential.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"azureNamedKeyCredential.js","sourceRoot":"","sources":["../../src/azureNamedKeyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAgB1D;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAIlC;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,GAAW;QACnC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAClB,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAe,EAAE,MAAc;QAC3C,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;YACxB,MAAM,IAAI,SAAS,CAAC,8CAA8C,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAmB;IACtD,OAAO,CACL,sBAAsB,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,UAAU,CAAC,GAAG,KAAK,QAAQ;QAClC,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,CACpC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { isObjectWithProperties } from \"@azure/core-util\";\n\n/**\n * Represents a credential defined by a static API name and key.\n */\nexport interface NamedKeyCredential {\n /**\n * The value of the API key represented as a string\n */\n readonly key: string;\n /**\n * The value of the API name represented as a string.\n */\n readonly name: string;\n}\n\n/**\n * A static name/key-based credential that supports updating\n * the underlying name and key values.\n */\nexport class AzureNamedKeyCredential implements NamedKeyCredential {\n private _key: string;\n private _name: string;\n\n /**\n * The value of the key to be used in authentication.\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * The value of the name to be used in authentication.\n */\n public get name(): string {\n return this._name;\n }\n\n /**\n * Create an instance of an AzureNamedKeyCredential for use\n * with a service client.\n *\n * @param name - The initial value of the name to use in authentication.\n * @param key - The initial value of the key to use in authentication.\n */\n constructor(name: string, key: string) {\n if (!name || !key) {\n throw new TypeError(\"name and key must be non-empty strings\");\n }\n\n this._name = name;\n this._key = key;\n }\n\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newName - The new name value to be used.\n * @param newKey - The new key value to be used.\n */\n public update(newName: string, newKey: string): void {\n if (!newName || !newKey) {\n throw new TypeError(\"newName and newKey must be non-empty strings\");\n }\n\n this._name = newName;\n this._key = newKey;\n }\n}\n\n/**\n * Tests an object to determine whether it implements NamedKeyCredential.\n *\n * @param credential - The assumed NamedKeyCredential to be tested.\n */\nexport function isNamedKeyCredential(credential: unknown): credential is NamedKeyCredential {\n return (\n isObjectWithProperties(credential, [\"name\", \"key\"]) &&\n typeof credential.key === \"string\" &&\n typeof credential.name === \"string\"\n );\n}\n"]}

View File

@@ -1,43 +0,0 @@
/**
* Represents a credential defined by a static shared access signature.
*/
export interface SASCredential {
/**
* The value of the shared access signature represented as a string
*/
readonly signature: string;
}
/**
* A static-signature-based credential that supports updating
* the underlying signature value.
*/
export declare class AzureSASCredential implements SASCredential {
private _signature;
/**
* The value of the shared access signature to be used in authentication
*/
get signature(): string;
/**
* Create an instance of an AzureSASCredential for use
* with a service client.
*
* @param signature - The initial value of the shared access signature to use in authentication
*/
constructor(signature: string);
/**
* Change the value of the signature.
*
* Updates will take effect upon the next request after
* updating the signature value.
*
* @param newSignature - The new shared access signature value to be used
*/
update(newSignature: string): void;
}
/**
* Tests an object to determine whether it implements SASCredential.
*
* @param credential - The assumed SASCredential to be tested.
*/
export declare function isSASCredential(credential: unknown): credential is SASCredential;
//# sourceMappingURL=azureSASCredential.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"azureSASCredential.d.ts","sourceRoot":"","sources":["../../src/azureSASCredential.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,aAAa;IACtD,OAAO,CAAC,UAAU,CAAS;IAE3B;;OAEG;IACH,IAAW,SAAS,IAAI,MAAM,CAE7B;IAED;;;;;OAKG;gBACS,SAAS,EAAE,MAAM;IAQ7B;;;;;;;OAOG;IACI,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CAO1C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,IAAI,aAAa,CAIhF"}

View File

@@ -1,50 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { isObjectWithProperties } from "@azure/core-util";
/**
* A static-signature-based credential that supports updating
* the underlying signature value.
*/
export class AzureSASCredential {
/**
* The value of the shared access signature to be used in authentication
*/
get signature() {
return this._signature;
}
/**
* Create an instance of an AzureSASCredential for use
* with a service client.
*
* @param signature - The initial value of the shared access signature to use in authentication
*/
constructor(signature) {
if (!signature) {
throw new Error("shared access signature must be a non-empty string");
}
this._signature = signature;
}
/**
* Change the value of the signature.
*
* Updates will take effect upon the next request after
* updating the signature value.
*
* @param newSignature - The new shared access signature value to be used
*/
update(newSignature) {
if (!newSignature) {
throw new Error("shared access signature must be a non-empty string");
}
this._signature = newSignature;
}
}
/**
* Tests an object to determine whether it implements SASCredential.
*
* @param credential - The assumed SASCredential to be tested.
*/
export function isSASCredential(credential) {
return (isObjectWithProperties(credential, ["signature"]) && typeof credential.signature === "string");
}
//# sourceMappingURL=azureSASCredential.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"azureSASCredential.js","sourceRoot":"","sources":["../../src/azureSASCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAY1D;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAG7B;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,YAAY,SAAiB;QAC3B,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,YAAoB;QAChC,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;IACjC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,UAAmB;IACjD,OAAO,CACL,sBAAsB,CAAC,UAAU,EAAE,CAAC,WAAW,CAAC,CAAC,IAAI,OAAO,UAAU,CAAC,SAAS,KAAK,QAAQ,CAC9F,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { isObjectWithProperties } from \"@azure/core-util\";\n\n/**\n * Represents a credential defined by a static shared access signature.\n */\nexport interface SASCredential {\n /**\n * The value of the shared access signature represented as a string\n */\n readonly signature: string;\n}\n\n/**\n * A static-signature-based credential that supports updating\n * the underlying signature value.\n */\nexport class AzureSASCredential implements SASCredential {\n private _signature: string;\n\n /**\n * The value of the shared access signature to be used in authentication\n */\n public get signature(): string {\n return this._signature;\n }\n\n /**\n * Create an instance of an AzureSASCredential for use\n * with a service client.\n *\n * @param signature - The initial value of the shared access signature to use in authentication\n */\n constructor(signature: string) {\n if (!signature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n\n this._signature = signature;\n }\n\n /**\n * Change the value of the signature.\n *\n * Updates will take effect upon the next request after\n * updating the signature value.\n *\n * @param newSignature - The new shared access signature value to be used\n */\n public update(newSignature: string): void {\n if (!newSignature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n\n this._signature = newSignature;\n }\n}\n\n/**\n * Tests an object to determine whether it implements SASCredential.\n *\n * @param credential - The assumed SASCredential to be tested.\n */\nexport function isSASCredential(credential: unknown): credential is SASCredential {\n return (\n isObjectWithProperties(credential, [\"signature\"]) && typeof credential.signature === \"string\"\n );\n}\n"]}

View File

@@ -1,8 +0,0 @@
export { HttpMethods } from "@azure/core-util";
export { AzureKeyCredential } from "./azureKeyCredential.js";
export { KeyCredential, isKeyCredential } from "./keyCredential.js";
export { AzureNamedKeyCredential, NamedKeyCredential, isNamedKeyCredential, } from "./azureNamedKeyCredential.js";
export { AzureSASCredential, SASCredential, isSASCredential } from "./azureSASCredential.js";
export { TokenCredential, GetTokenOptions, AccessToken, isTokenCredential, } from "./tokenCredential.js";
export { TracingContext } from "./tracing.js";
//# sourceMappingURL=index.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE7F,OAAO,EACL,eAAe,EACf,eAAe,EACf,WAAW,EACX,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}

View File

@@ -1,6 +0,0 @@
export { AzureKeyCredential } from "./azureKeyCredential.js";
export { isKeyCredential } from "./keyCredential.js";
export { AzureNamedKeyCredential, isNamedKeyCredential, } from "./azureNamedKeyCredential.js";
export { AzureSASCredential, isSASCredential } from "./azureSASCredential.js";
export { isTokenCredential, } from "./tokenCredential.js";
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAiB,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACL,uBAAuB,EAEvB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAiB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE7F,OAAO,EAIL,iBAAiB,GAClB,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport { HttpMethods } from \"@azure/core-util\";\nexport { AzureKeyCredential } from \"./azureKeyCredential.js\";\nexport { KeyCredential, isKeyCredential } from \"./keyCredential.js\";\nexport {\n AzureNamedKeyCredential,\n NamedKeyCredential,\n isNamedKeyCredential,\n} from \"./azureNamedKeyCredential.js\";\nexport { AzureSASCredential, SASCredential, isSASCredential } from \"./azureSASCredential.js\";\n\nexport {\n TokenCredential,\n GetTokenOptions,\n AccessToken,\n isTokenCredential,\n} from \"./tokenCredential.js\";\n\nexport { TracingContext } from \"./tracing.js\";\n"]}

View File

@@ -1,16 +0,0 @@
/**
* Represents a credential defined by a static API key.
*/
export interface KeyCredential {
/**
* The value of the API key represented as a string
*/
readonly key: string;
}
/**
* Tests an object to determine whether it implements KeyCredential.
*
* @param credential - The assumed KeyCredential to be tested.
*/
export declare function isKeyCredential(credential: unknown): credential is KeyCredential;
//# sourceMappingURL=keyCredential.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"keyCredential.d.ts","sourceRoot":"","sources":["../../src/keyCredential.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,IAAI,aAAa,CAEhF"}

View File

@@ -1,12 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { isObjectWithProperties } from "@azure/core-util";
/**
* Tests an object to determine whether it implements KeyCredential.
*
* @param credential - The assumed KeyCredential to be tested.
*/
export function isKeyCredential(credential) {
return isObjectWithProperties(credential, ["key"]) && typeof credential.key === "string";
}
//# sourceMappingURL=keyCredential.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"keyCredential.js","sourceRoot":"","sources":["../../src/keyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAY1D;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,UAAmB;IACjD,OAAO,sBAAsB,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,OAAO,UAAU,CAAC,GAAG,KAAK,QAAQ,CAAC;AAC3F,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { isObjectWithProperties } from \"@azure/core-util\";\n\n/**\n * Represents a credential defined by a static API key.\n */\nexport interface KeyCredential {\n /**\n * The value of the API key represented as a string\n */\n readonly key: string;\n}\n\n/**\n * Tests an object to determine whether it implements KeyCredential.\n *\n * @param credential - The assumed KeyCredential to be tested.\n */\nexport function isKeyCredential(credential: unknown): credential is KeyCredential {\n return isObjectWithProperties(credential, [\"key\"]) && typeof credential.key === \"string\";\n}\n"]}

View File

@@ -1,3 +0,0 @@
{
"type": "module"
}

View File

@@ -1,117 +0,0 @@
import { AbortSignalLike } from "@azure/abort-controller";
import { TracingContext } from "./tracing.js";
import { HttpMethods } from "@azure/core-util";
/**
* Represents a credential capable of providing an authentication token.
*/
export interface TokenCredential {
/**
* Gets the token provided by this credential.
*
* This method is called automatically by Azure SDK client libraries. You may call this method
* directly, but you must also handle token caching and token refreshing.
*
* @param scopes - The list of scopes for which the token will have access.
* @param options - The options used to configure any requests this
* TokenCredential implementation might make.
*/
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken | null>;
}
/**
* Defines options for TokenCredential.getToken.
*/
export interface GetTokenOptions {
/**
* The signal which can be used to abort requests.
*/
abortSignal?: AbortSignalLike;
/**
* Options used when creating and sending HTTP requests for this operation.
*/
requestOptions?: {
/**
* The number of milliseconds a request can take before automatically being terminated.
*/
timeout?: number;
};
/**
* Options used when tracing is enabled.
*/
tracingOptions?: {
/**
* Tracing Context for the current request.
*/
tracingContext?: TracingContext;
};
/**
* Claim details to perform the Continuous Access Evaluation authentication flow
*/
claims?: string;
/**
* Indicates whether to enable the Continuous Access Evaluation authentication flow
*/
enableCae?: boolean;
/**
* Allows specifying a tenantId. Useful to handle challenges that provide tenant Id hints.
*/
tenantId?: string;
/**
* Options for Proof of Possession token requests
*/
proofOfPossessionOptions?: {
/**
* The nonce value required for PoP token requests.
* This is typically retrieved from the WWW-Authenticate header of a 401 challenge response.
* This is used in combination with {@link resourceRequestUrl} and {@link resourceRequestMethod} to generate the PoP token.
*/
nonce: string;
/**
* The HTTP method of the request.
* This is used in combination with {@link resourceRequestUrl} and {@link nonce} to generate the PoP token.
*/
resourceRequestMethod: HttpMethods;
/**
* The URL of the request.
* This is used in combination with {@link resourceRequestMethod} and {@link nonce} to generate the PoP token.
*/
resourceRequestUrl: string;
};
}
/**
* Represents an access token with an expiration time.
*/
export interface AccessToken {
/**
* The access token returned by the authentication service.
*/
token: string;
/**
* The access token's expiration timestamp in milliseconds, UNIX epoch time.
*/
expiresOnTimestamp: number;
/**
* The timestamp when the access token should be refreshed, in milliseconds, UNIX epoch time.
*/
refreshAfterTimestamp?: number;
/** Type of token - `Bearer` or `pop` */
tokenType?: "Bearer" | "pop";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
export declare function isBearerToken(accessToken: AccessToken): boolean;
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
export declare function isPopToken(accessToken: AccessToken): boolean;
/**
* Tests an object to determine whether it implements TokenCredential.
*
* @param credential - The assumed TokenCredential to be tested.
*/
export declare function isTokenCredential(credential: unknown): credential is TokenCredential;
//# sourceMappingURL=tokenCredential.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"tokenCredential.d.ts","sourceRoot":"","sources":["../../src/tokenCredential.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;OASG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC7F;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE;QACf;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF;;OAEG;IACH,cAAc,CAAC,EAAE;QACf;;WAEG;QACH,cAAc,CAAC,EAAE,cAAc,CAAC;KACjC,CAAC;IACF;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,wBAAwB,CAAC,EAAE;QACzB;;;;WAIG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;;WAGG;QACH,qBAAqB,EAAE,WAAW,CAAC;QACnC;;;WAGG;QACH,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,wCAAwC;IACxC,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,IAAI,eAAe,CAepF"}

View File

@@ -1,35 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
export function isBearerToken(accessToken) {
return !accessToken.tokenType || accessToken.tokenType === "Bearer";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
export function isPopToken(accessToken) {
return accessToken.tokenType === "pop";
}
/**
* Tests an object to determine whether it implements TokenCredential.
*
* @param credential - The assumed TokenCredential to be tested.
*/
export function isTokenCredential(credential) {
// Check for an object with a 'getToken' function and possibly with
// a 'signRequest' function. We do this check to make sure that
// a ServiceClientCredentials implementor (like TokenClientCredentials
// in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if
// it doesn't actually implement TokenCredential also.
const castCredential = credential;
return (castCredential &&
typeof castCredential.getToken === "function" &&
(castCredential.signRequest === undefined || castCredential.getToken.length > 0));
}
//# sourceMappingURL=tokenCredential.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,27 +0,0 @@
/**
* An interface structurally compatible with OpenTelemetry.
*/
export interface TracingContext {
/**
* Get a value from the context.
*
* @param key - key which identifies a context value
*/
getValue(key: symbol): unknown;
/**
* Create a new context which inherits from this context and has
* the given key set to the given value.
*
* @param key - context key for which to set the value
* @param value - value to set for the given key
*/
setValue(key: symbol, value: unknown): TracingContext;
/**
* Return a new context which inherits from this context but does
* not contain a value for the given key.
*
* @param key - context key for which to clear a value
*/
deleteValue(key: symbol): TracingContext;
}
//# sourceMappingURL=tracing.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,cAAc,CAAC;IACtD;;;;;OAKG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC;CAC1C"}

View File

@@ -1,4 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
export {};
//# sourceMappingURL=tracing.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// The interfaces in this file should be kept in sync with those\n// found in the `@azure/core-tracing` package.\n\n/**\n * An interface structurally compatible with OpenTelemetry.\n */\nexport interface TracingContext {\n /**\n * Get a value from the context.\n *\n * @param key - key which identifies a context value\n */\n getValue(key: symbol): unknown;\n /**\n * Create a new context which inherits from this context and has\n * the given key set to the given value.\n *\n * @param key - context key for which to set the value\n * @param value - value to set for the given key\n */\n setValue(key: symbol, value: unknown): TracingContext;\n /**\n * Return a new context which inherits from this context but does\n * not contain a value for the given key.\n *\n * @param key - context key for which to clear a value\n */\n deleteValue(key: symbol): TracingContext;\n}\n"]}

View File

@@ -1,29 +0,0 @@
import { KeyCredential } from "./keyCredential.js";
/**
* A static-key-based credential that supports updating
* the underlying key value.
*/
export declare class AzureKeyCredential implements KeyCredential {
private _key;
/**
* The value of the key to be used in authentication
*/
get key(): string;
/**
* Create an instance of an AzureKeyCredential for use
* with a service client.
*
* @param key - The initial value of the key to use in authentication
*/
constructor(key: string);
/**
* Change the value of the key.
*
* Updates will take effect upon the next request after
* updating the key value.
*
* @param newKey - The new key value to be used
*/
update(newKey: string): void;
}
//# sourceMappingURL=azureKeyCredential.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"azureKeyCredential.d.ts","sourceRoot":"","sources":["../../src/azureKeyCredential.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,aAAa;IACtD,OAAO,CAAC,IAAI,CAAS;IAErB;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IAED;;;;;OAKG;gBACS,GAAG,EAAE,MAAM;IAQvB;;;;;;;OAOG;IACI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAGpC"}

View File

@@ -1,42 +0,0 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AzureKeyCredential = void 0;
/**
* A static-key-based credential that supports updating
* the underlying key value.
*/
class AzureKeyCredential {
/**
* The value of the key to be used in authentication
*/
get key() {
return this._key;
}
/**
* Create an instance of an AzureKeyCredential for use
* with a service client.
*
* @param key - The initial value of the key to use in authentication
*/
constructor(key) {
if (!key) {
throw new Error("key must be a non-empty string");
}
this._key = key;
}
/**
* Change the value of the key.
*
* Updates will take effect upon the next request after
* updating the key value.
*
* @param newKey - The new key value to be used
*/
update(newKey) {
this._key = newKey;
}
}
exports.AzureKeyCredential = AzureKeyCredential;
//# sourceMappingURL=azureKeyCredential.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"azureKeyCredential.js","sourceRoot":"","sources":["../../src/azureKeyCredential.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIlC;;;GAGG;AACH,MAAa,kBAAkB;IAG7B;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACH,YAAY,GAAW;QACrB,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,MAAc;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,CAAC;CACF;AAnCD,gDAmCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { KeyCredential } from \"./keyCredential.js\";\n\n/**\n * A static-key-based credential that supports updating\n * the underlying key value.\n */\nexport class AzureKeyCredential implements KeyCredential {\n private _key: string;\n\n /**\n * The value of the key to be used in authentication\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Create an instance of an AzureKeyCredential for use\n * with a service client.\n *\n * @param key - The initial value of the key to use in authentication\n */\n constructor(key: string) {\n if (!key) {\n throw new Error(\"key must be a non-empty string\");\n }\n\n this._key = key;\n }\n\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newKey - The new key value to be used\n */\n public update(newKey: string): void {\n this._key = newKey;\n }\n}\n"]}

View File

@@ -1,54 +0,0 @@
/**
* Represents a credential defined by a static API name and key.
*/
export interface NamedKeyCredential {
/**
* The value of the API key represented as a string
*/
readonly key: string;
/**
* The value of the API name represented as a string.
*/
readonly name: string;
}
/**
* A static name/key-based credential that supports updating
* the underlying name and key values.
*/
export declare class AzureNamedKeyCredential implements NamedKeyCredential {
private _key;
private _name;
/**
* The value of the key to be used in authentication.
*/
get key(): string;
/**
* The value of the name to be used in authentication.
*/
get name(): string;
/**
* Create an instance of an AzureNamedKeyCredential for use
* with a service client.
*
* @param name - The initial value of the name to use in authentication.
* @param key - The initial value of the key to use in authentication.
*/
constructor(name: string, key: string);
/**
* Change the value of the key.
*
* Updates will take effect upon the next request after
* updating the key value.
*
* @param newName - The new name value to be used.
* @param newKey - The new key value to be used.
*/
update(newName: string, newKey: string): void;
}
/**
* Tests an object to determine whether it implements NamedKeyCredential.
*
* @param credential - The assumed NamedKeyCredential to be tested.
*/
export declare function isNamedKeyCredential(credential: unknown): credential is NamedKeyCredential;
//# sourceMappingURL=azureNamedKeyCredential.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"azureNamedKeyCredential.d.ts","sourceRoot":"","sources":["../../src/azureNamedKeyCredential.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,kBAAkB;IAChE,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,KAAK,CAAS;IAEtB;;OAEG;IACH,IAAW,GAAG,IAAI,MAAM,CAEvB;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IASrC;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CAQrD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,IAAI,kBAAkB,CAM1F"}

Some files were not shown because too many files have changed in this diff Show More