@azure/abort-controller 2.1.3-alpha.20260226.1 → 2.1.3-alpha.20260305.6
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/index.d.ts +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/commonjs/AbortError.js +30 -39
- package/dist/commonjs/AbortError.js.map +7 -1
- package/dist/commonjs/AbortSignalLike.js +15 -5
- package/dist/commonjs/AbortSignalLike.js.map +7 -1
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +27 -8
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/AbortError.js +8 -36
- package/dist/esm/AbortError.js.map +7 -1
- package/dist/esm/AbortSignalLike.js +0 -4
- package/dist/esm/AbortSignalLike.js.map +7 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +7 -1
- package/dist/react-native/index.d.ts +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/package.json +1 -18
package/dist/browser/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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"]}
|
|
1
|
+
{"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 type { AbortSignalLike } from \"./AbortSignalLike.js\";\n"]}
|
|
@@ -1,41 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* const controller = new AbortController();
|
|
24
|
-
* controller.abort();
|
|
25
|
-
* try {
|
|
26
|
-
* doAsyncWork({ abortSignal: controller.signal });
|
|
27
|
-
* } catch (e) {
|
|
28
|
-
* if (e instanceof Error && e.name === "AbortError") {
|
|
29
|
-
* // handle abort error here.
|
|
30
|
-
* }
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var AbortError_exports = {};
|
|
19
|
+
__export(AbortError_exports, {
|
|
20
|
+
AbortError: () => AbortError
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(AbortError_exports);
|
|
34
23
|
class AbortError extends Error {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
constructor(message) {
|
|
25
|
+
super(message);
|
|
26
|
+
this.name = "AbortError";
|
|
27
|
+
}
|
|
39
28
|
}
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
AbortError
|
|
32
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/core/abort-controller/src/AbortError.ts"],
|
|
4
|
+
"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 snippet:AbortErrorSample\n * import { AbortError } from \"@azure/abort-controller\";\n *\n * async function doAsyncWork(options: { abortSignal: AbortSignal }): Promise<void> {\n * if (options.abortSignal.aborted) {\n * throw new AbortError();\n * }\n *\n * // do async work\n * }\n *\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork({ abortSignal: controller.signal });\n * } catch (e) {\n * if (e instanceof Error && 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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BO,MAAM,mBAAmB,MAAM;AAAA,EACpC,YAAY,SAAkB;AAC5B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var AbortSignalLike_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(AbortSignalLike_exports);
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/core/abort-controller/src/AbortSignalLike.ts"],
|
|
4
|
+
"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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/commonjs/index.d.ts
CHANGED
package/dist/commonjs/index.js
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var src_exports = {};
|
|
19
|
+
__export(src_exports, {
|
|
20
|
+
AbortError: () => import_AbortError.AbortError
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(src_exports);
|
|
23
|
+
var import_AbortError = require("./AbortError.js");
|
|
24
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
+
0 && (module.exports = {
|
|
26
|
+
AbortError
|
|
27
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/core/abort-controller/src/index.ts"],
|
|
4
|
+
"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 type { AbortSignalLike } from \"./AbortSignalLike.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,wBAA2B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/AbortError.js
CHANGED
|
@@ -1,37 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* error matches `"AbortError"`.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts snippet:AbortErrorSample
|
|
10
|
-
* import { AbortError } from "@azure/abort-controller";
|
|
11
|
-
*
|
|
12
|
-
* async function doAsyncWork(options: { abortSignal: AbortSignal }): Promise<void> {
|
|
13
|
-
* if (options.abortSignal.aborted) {
|
|
14
|
-
* throw new AbortError();
|
|
15
|
-
* }
|
|
16
|
-
*
|
|
17
|
-
* // do async work
|
|
18
|
-
* }
|
|
19
|
-
*
|
|
20
|
-
* const controller = new AbortController();
|
|
21
|
-
* controller.abort();
|
|
22
|
-
* try {
|
|
23
|
-
* doAsyncWork({ abortSignal: controller.signal });
|
|
24
|
-
* } catch (e) {
|
|
25
|
-
* if (e instanceof Error && e.name === "AbortError") {
|
|
26
|
-
* // handle abort error here.
|
|
27
|
-
* }
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export class AbortError extends Error {
|
|
32
|
-
constructor(message) {
|
|
33
|
-
super(message);
|
|
34
|
-
this.name = "AbortError";
|
|
35
|
-
}
|
|
1
|
+
class AbortError extends Error {
|
|
2
|
+
constructor(message) {
|
|
3
|
+
super(message);
|
|
4
|
+
this.name = "AbortError";
|
|
5
|
+
}
|
|
36
6
|
}
|
|
37
|
-
|
|
7
|
+
export {
|
|
8
|
+
AbortError
|
|
9
|
+
};
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/core/abort-controller/src/AbortError.ts"],
|
|
4
|
+
"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 snippet:AbortErrorSample\n * import { AbortError } from \"@azure/abort-controller\";\n *\n * async function doAsyncWork(options: { abortSignal: AbortSignal }): Promise<void> {\n * if (options.abortSignal.aborted) {\n * throw new AbortError();\n * }\n *\n * // do async work\n * }\n *\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork({ abortSignal: controller.signal });\n * } catch (e) {\n * if (e instanceof Error && 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"],
|
|
5
|
+
"mappings": "AA+BO,MAAM,mBAAmB,MAAM;AAAA,EACpC,YAAY,SAAkB;AAC5B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": [],
|
|
4
|
+
"sourcesContent": [],
|
|
5
|
+
"mappings": "",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { AbortError } from "./AbortError.js";
|
|
2
|
+
export {
|
|
3
|
+
AbortError
|
|
4
|
+
};
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/core/abort-controller/src/index.ts"],
|
|
4
|
+
"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 type { AbortSignalLike } from \"./AbortSignalLike.js\";\n"],
|
|
5
|
+
"mappings": "AAOA,SAAS,kBAAkB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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"]}
|
|
1
|
+
{"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 type { AbortSignalLike } from \"./AbortSignalLike.js\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/abort-controller",
|
|
3
3
|
"sdk-type": "client",
|
|
4
|
-
"version": "2.1.3-alpha.
|
|
4
|
+
"version": "2.1.3-alpha.20260305.6",
|
|
5
5
|
"description": "Microsoft Azure SDK for JavaScript - Aborter",
|
|
6
6
|
"author": "Microsoft Corporation",
|
|
7
7
|
"license": "MIT",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"playwright": "^1.56.1",
|
|
70
70
|
"prettier": "^3.6.2",
|
|
71
71
|
"rimraf": "^6.1.0",
|
|
72
|
-
"tshy": "^3.0.3",
|
|
73
72
|
"typescript": "~5.9.3",
|
|
74
73
|
"vitest": "^4.0.8",
|
|
75
74
|
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
|
@@ -78,22 +77,6 @@
|
|
|
78
77
|
"//metadata": {
|
|
79
78
|
"migrationDate": "2023-03-08T18:36:03.000Z"
|
|
80
79
|
},
|
|
81
|
-
"tshy": {
|
|
82
|
-
"exports": {
|
|
83
|
-
"./package.json": "./package.json",
|
|
84
|
-
".": "./src/index.ts"
|
|
85
|
-
},
|
|
86
|
-
"dialects": [
|
|
87
|
-
"esm",
|
|
88
|
-
"commonjs"
|
|
89
|
-
],
|
|
90
|
-
"esmDialects": [
|
|
91
|
-
"browser",
|
|
92
|
-
"react-native"
|
|
93
|
-
],
|
|
94
|
-
"selfLink": false,
|
|
95
|
-
"project": "../../../tsconfig.src.build.json"
|
|
96
|
-
},
|
|
97
80
|
"module": "./dist/esm/index.js",
|
|
98
81
|
"scripts": {
|
|
99
82
|
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
|