ThongCoder commited on
Commit
0d9acd2
·
verified ·
1 Parent(s): 93f519e

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +18 -0
  2. workspace/node_modules/.bin/esparse +3 -0
  3. workspace/node_modules/.bin/esvalidate +3 -0
  4. workspace/node_modules/.bin/glob +3 -0
  5. workspace/node_modules/.bin/is-ci +3 -0
  6. workspace/node_modules/.bin/is-docker +3 -0
  7. workspace/node_modules/.bin/is-inside-container +3 -0
  8. workspace/node_modules/.bin/js-yaml +3 -0
  9. workspace/node_modules/.bin/json5 +3 -0
  10. workspace/node_modules/.bin/markdown-it +3 -0
  11. workspace/node_modules/.bin/mime +3 -0
  12. workspace/node_modules/.bin/node-which +3 -0
  13. workspace/node_modules/.bin/ovsx +3 -0
  14. workspace/node_modules/.bin/prebuild-install +3 -0
  15. workspace/node_modules/.bin/rc +3 -0
  16. workspace/node_modules/.bin/secretlint +3 -0
  17. workspace/node_modules/.bin/semver +3 -0
  18. workspace/node_modules/.bin/uuid +3 -0
  19. workspace/node_modules/.bin/vsce +3 -0
  20. workspace/node_modules/.package-lock.json +0 -0
  21. workspace/node_modules/@azu/format-text/README.md +23 -0
  22. workspace/node_modules/@azu/format-text/index.js +31 -0
  23. workspace/node_modules/@azu/format-text/package.json +21 -0
  24. workspace/node_modules/@azu/style-format/LICENSE +13 -0
  25. workspace/node_modules/@azu/style-format/README.md +30 -0
  26. workspace/node_modules/@azu/style-format/ansi-codes.js +52 -0
  27. workspace/node_modules/@azu/style-format/index.js +8 -0
  28. workspace/node_modules/@azu/style-format/package.json +27 -0
  29. workspace/node_modules/@azure/abort-controller/LICENSE +21 -0
  30. workspace/node_modules/@azure/abort-controller/README.md +69 -0
  31. workspace/node_modules/@azure/abort-controller/dist/abort-controller.d.ts +42 -0
  32. workspace/node_modules/@azure/abort-controller/dist/browser/AbortError.d.ts +22 -0
  33. workspace/node_modules/@azure/abort-controller/dist/browser/AbortError.d.ts.map +1 -0
  34. workspace/node_modules/@azure/abort-controller/dist/browser/AbortError.js +27 -0
  35. workspace/node_modules/@azure/abort-controller/dist/browser/AbortError.js.map +1 -0
  36. workspace/node_modules/@azure/abort-controller/dist/browser/AbortSignalLike.d.ts +19 -0
  37. workspace/node_modules/@azure/abort-controller/dist/browser/AbortSignalLike.d.ts.map +1 -0
  38. workspace/node_modules/@azure/abort-controller/dist/browser/AbortSignalLike.js +4 -0
  39. workspace/node_modules/@azure/abort-controller/dist/browser/AbortSignalLike.js.map +1 -0
  40. workspace/node_modules/@azure/abort-controller/dist/browser/index.d.ts +7 -0
  41. workspace/node_modules/@azure/abort-controller/dist/browser/index.d.ts.map +1 -0
  42. workspace/node_modules/@azure/abort-controller/dist/browser/index.js +4 -0
  43. workspace/node_modules/@azure/abort-controller/dist/browser/index.js.map +1 -0
  44. workspace/node_modules/@azure/abort-controller/dist/browser/package.json +3 -0
  45. workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortError.d.ts +22 -0
  46. workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortError.d.ts.map +1 -0
  47. workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +31 -0
  48. workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js.map +1 -0
  49. workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortSignalLike.d.ts +19 -0
  50. workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortSignalLike.d.ts.map +1 -0
.gitattributes CHANGED
@@ -80,3 +80,21 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
80
  workspace/database_merger/fully_merged_database.sqlite filter=lfs diff=lfs merge=lfs -text
81
  workspace/mega-test/main filter=lfs diff=lfs merge=lfs -text
82
  workspace/database_merger/cache.sqlite filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  workspace/database_merger/fully_merged_database.sqlite filter=lfs diff=lfs merge=lfs -text
81
  workspace/mega-test/main filter=lfs diff=lfs merge=lfs -text
82
  workspace/database_merger/cache.sqlite filter=lfs diff=lfs merge=lfs -text
83
+ workspace/node_modules/@node-rs/crc32-linux-x64-gnu/crc32.linux-x64-gnu.node filter=lfs diff=lfs merge=lfs -text
84
+ workspace/node_modules/@vscode/vsce-sign/bin/vsce-sign filter=lfs diff=lfs merge=lfs -text
85
+ workspace/node_modules/@vscode/vsce-sign-linux-x64/bin/vsce-sign filter=lfs diff=lfs merge=lfs -text
86
+ workspace/vsix/cweijan.vscode-database-client2-8.4.0.vsix filter=lfs diff=lfs merge=lfs -text
87
+ workspace/vsix/dbaeumer.vscode-eslint.vsix filter=lfs diff=lfs merge=lfs -text
88
+ workspace/vsix/elmtooling.elm-ls-vscode.vsix filter=lfs diff=lfs merge=lfs -text
89
+ workspace/vsix/esbenp.prettier-vscode.vsix filter=lfs diff=lfs merge=lfs -text
90
+ workspace/vsix/golang.go.vsix filter=lfs diff=lfs merge=lfs -text
91
+ workspace/vsix/haskell.haskell.vsix filter=lfs diff=lfs merge=lfs -text
92
+ workspace/vsix/julialang.language-julia.vsix filter=lfs diff=lfs merge=lfs -text
93
+ workspace/vsix/mikestead.dotenv.vsix filter=lfs diff=lfs merge=lfs -text
94
+ workspace/vsix/ms-dotnettools.csharp-1.23.16.vsix filter=lfs diff=lfs merge=lfs -text
95
+ workspace/vsix/ms-python.python.vsix filter=lfs diff=lfs merge=lfs -text
96
+ workspace/vsix/ms-vscode.vscode-typescript-next.vsix filter=lfs diff=lfs merge=lfs -text
97
+ workspace/vsix/redhat.java.vsix filter=lfs diff=lfs merge=lfs -text
98
+ workspace/vsix/redhat.vscode-yaml.vsix filter=lfs diff=lfs merge=lfs -text
99
+ workspace/vsix/rust-lang.rust-analyzer.vsix filter=lfs diff=lfs merge=lfs -text
100
+ workspace/vsix/scala-lang.scala.vsix filter=lfs diff=lfs merge=lfs -text
workspace/node_modules/.bin/esparse ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:503d1d9067c1c662a036dc378a0cbe7dbb99c332cd4b7e4bd4b2ba09a30d69c0
3
+ size 4948
workspace/node_modules/.bin/esvalidate ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c38a63e723365b57dcc71ca327d0d2ebb7d3deeaccbb22b2468e8faf80a28ee
3
+ size 7744
workspace/node_modules/.bin/glob ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:13d386ca6afb3706c528e432fd6d1bc4d123e4107157e0eba25ccd318685a02f
3
+ size 9690
workspace/node_modules/.bin/is-ci ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34e06901c785d3220c276f45a32603bc8b7a183815f831b0025fdf5ff8aab138
3
+ size 70
workspace/node_modules/.bin/is-docker ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f08aa00b111ebaa3cf221db6883771d0048b3d5085ed160eafe5ddc2dd57f63b
3
+ size 131
workspace/node_modules/.bin/is-inside-container ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe0e60553d21c59af1280e8d76aa028bacde298b362645639b35d7c802491b8e
3
+ size 149
workspace/node_modules/.bin/js-yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d0c9cbce9363a08e5d932e6c843013059758e4bd426cd77d2e09a2a229a443f
3
+ size 2727
workspace/node_modules/.bin/json5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5625791d31c1a385ca8e8823119fc659b61cd53957b2bd494bc8941486684bd4
3
+ size 3592
workspace/node_modules/.bin/markdown-it ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:632d1d2131ec2dc0d8b1d94b62988509e5ff0894f49c04d9f46472888f99dd75
3
+ size 2166
workspace/node_modules/.bin/mime ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8691b2f01b77334e33bb6898d69c80dc05b18e4be66760c476331a388f9cd27
3
+ size 149
workspace/node_modules/.bin/node-which ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:055f0ac4eed1a1591d033d59462972968bf3483b4cc07e163589569c0fb999f0
3
+ size 985
workspace/node_modules/.bin/ovsx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3623d4ccb5fcf6049ea421c2c177be50701e247f0db81eee27915e14d5320d7e
3
+ size 279
workspace/node_modules/.bin/prebuild-install ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27e6a2d2e63549eb0b3c2d9a9067b7646f9157a120b7f345a12a1e20c997a998
3
+ size 2304
workspace/node_modules/.bin/rc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82383f5748af5f9380dbcde8f0166088614bf024e25bdbe073bb87cd385336ba
3
+ size 109
workspace/node_modules/.bin/secretlint ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42977e06e2d071eda3535424d72fe65996b7cfca4a0803ea95a2b244fde22186
3
+ size 643
workspace/node_modules/.bin/semver ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad25dc10977d5f51e783a48f8721fcc8f0f2284f1a99614d14eb1428b959ce47
3
+ size 4739
workspace/node_modules/.bin/uuid ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30b5422b6c95ccdc402effd7d3354ca6a6bce621cf21d0379749ddf1f96c1ad7
3
+ size 44
workspace/node_modules/.bin/vsce ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3253616e7d950d94c3a339a6cb90e6257f85943801f0dbc50fa4b8ffabe24966
3
+ size 57
workspace/node_modules/.package-lock.json ADDED
The diff for this file is too large to render. See raw diff
 
workspace/node_modules/@azu/format-text/README.md ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## @azu/format-text
2
+
3
+ String formatting library inspired from Python
4
+
5
+ Fork of [azer/format-text](https://github.com/azer/format-text "azer/format-text: String formatting library inspired from Python")
6
+
7
+ ### Install
8
+
9
+ ```bash
10
+ $ npm install @azu/format-text
11
+ ```
12
+
13
+ ### Usage
14
+
15
+ ```js
16
+ format = require('@azu/format-text')
17
+
18
+ format('Hello {0}. The weather is currently {1}°.', 'Kitty', '67')
19
+ // => Hello Kitty. The weather is currently 67°.
20
+
21
+ format('Hello {name}, The weather is currently {degree}°', { name:'Kitty', degree: 67 })
22
+ // => Hello Kitty. The weather is currently 67°.
23
+ ```
workspace/node_modules/@azu/format-text/index.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ module.exports = format;
2
+
3
+ function format(text) {
4
+ var context;
5
+
6
+ if (typeof arguments[1] == 'object' && arguments[1]) {
7
+ context = arguments[1];
8
+ } else {
9
+ context = Array.prototype.slice.call(arguments, 1);
10
+ }
11
+
12
+ return String(text).replace(/\{?\{([^{}]+)}}?/g, replace(context));
13
+ };
14
+
15
+ function replace (context, nil){
16
+ return function (tag, name) {
17
+ if (tag.substring(0, 2) == '{{' && tag.substring(tag.length - 2) == '}}') {
18
+ return '{' + name + '}';
19
+ }
20
+
21
+ if (!context.hasOwnProperty(name)) {
22
+ return tag;
23
+ }
24
+
25
+ if (typeof context[name] == 'function') {
26
+ return context[name]();
27
+ }
28
+
29
+ return context[name];
30
+ }
31
+ }
workspace/node_modules/@azu/format-text/package.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@azu/format-text",
3
+ "version": "1.0.2",
4
+ "description": "String formatting library inspired from Python",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "mocha test.js"
8
+ },
9
+ "files": [
10
+ "index.js"
11
+ ],
12
+ "devDependencies": {
13
+ "mocha": "^10.2.0"
14
+ },
15
+ "repository": {
16
+ "url": "git@github.com:azu/format-text.git",
17
+ "type": "git"
18
+ },
19
+ "author": "azu",
20
+ "license": "BSD-3-Clause"
21
+ }
workspace/node_modules/@azu/style-format/LICENSE ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2
+ Version 2, December 2004
3
+
4
+ Copyright (C) 2016 azu
5
+
6
+ Everyone is permitted to copy and distribute verbatim or modified
7
+ copies of this license document, and changing it is allowed as long
8
+ as the name is changed.
9
+
10
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
+
13
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
workspace/node_modules/@azu/style-format/README.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## style-format
2
+
3
+ Library to easily style texts with string formatting.
4
+ It's based on [ansi-codes](http://github.com/azer/ansi-codes) and [format-text](http://github.com/azu/format-text)
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ $ npm install @azu/style-format
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ```js
15
+ format('{blue} hello {green} world')
16
+ // => hello world
17
+
18
+ format('{bold}{red} span {yellow} eggs {reset}')
19
+ // => span eggs
20
+ ```
21
+
22
+ ## Reference
23
+
24
+ See [ansi-codes](http://github.com/azer/ansi-codes) for reference.
25
+
26
+ ## License
27
+
28
+ MIT
29
+
30
+ Original is [style-format](http://github.com/azer/style-format).
workspace/node_modules/@azu/style-format/ansi-codes.js ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // LICENSE : MIT
2
+ module.exports = {
3
+ reset : "\033[0m",
4
+ bold : "\033[1m",
5
+ italic : "\033[3m",
6
+ blink : "\033[5m",
7
+ underline : "\033[4m",
8
+ underlineOff : "\033[24m",
9
+ inverse : "\033[7m",
10
+ inverseOff : "\033[27m",
11
+ strikethrough : "\033[9m",
12
+ strikethroughOff : "\033[29m",
13
+
14
+ def : "\033[39m",
15
+ white : "\033[37m",
16
+ black : "\033[30m",
17
+ grey : "\x1B[90m",
18
+ red : "\033[31m",
19
+ green : "\033[32m",
20
+ blue : "\033[34m",
21
+ yellow : "\033[33m",
22
+ magenta : "\033[35m",
23
+ cyan : "\033[36m",
24
+
25
+ defBg : "\033[49m",
26
+ whiteBg : "\033[47m",
27
+ blackBg : "\033[40m",
28
+ redBg : "\033[41m",
29
+ greenBg : "\033[42m",
30
+ blueBg : "\033[44m",
31
+ yellowBg : "\033[43m",
32
+ magentaBg : "\033[45m",
33
+ cyanBg : "\033[46m",
34
+
35
+ brightBlack : "\033[90m",
36
+ brightRed : "\033[91m",
37
+ brightGreen : "\033[92m",
38
+ brightYellow : "\033[93m",
39
+ brightBlue : "\033[94m",
40
+ brightMagenta : "\033[95m",
41
+ brightCyan : "\033[96m",
42
+ brightWhite : "\033[97m",
43
+
44
+ brightBlackBg : "\033[100m",
45
+ brightRedBg : "\033[101m",
46
+ brightGreenBg : "\033[102m",
47
+ brightYellowBg : "\033[103m",
48
+ brightBlueBg : "\033[104m",
49
+ brightMagentaBg : "\033[105m",
50
+ brightCyanBg : "\033[106m",
51
+ brightWhiteBg : "\033[107m"
52
+ }
workspace/node_modules/@azu/style-format/index.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ var format = require("@azu/format-text");
2
+ var ansi = require("./ansi-codes");
3
+
4
+ module.exports = styleFormat;
5
+
6
+ function styleFormat (text) {
7
+ return format(text, ansi);
8
+ }
workspace/node_modules/@azu/style-format/package.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@azu/style-format",
3
+ "version": "1.0.1",
4
+ "description": "Library to easily style texts with string formatting",
5
+ "main": "index.js",
6
+ "dependencies": {
7
+ "@azu/format-text": "^1.0.1"
8
+ },
9
+ "keywords": [
10
+ "style",
11
+ "text",
12
+ "format"
13
+ ],
14
+ "scripts": {
15
+ "test": "node test.js"
16
+ },
17
+ "files": [
18
+ "index.js",
19
+ "ansi-codes.js"
20
+ ],
21
+ "repository": {
22
+ "url": "git@github.com:azu/style-format.git",
23
+ "type": "git"
24
+ },
25
+ "author": "azu",
26
+ "license": "WTFPL"
27
+ }
workspace/node_modules/@azure/abort-controller/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Microsoft
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
workspace/node_modules/@azure/abort-controller/README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Azure Abort Controller client library for JavaScript
2
+
3
+ The `@azure/abort-controller` package provides `AbortSignalLike` interface and
4
+ `AbortError` classes to make it easier to work with the
5
+ [AbortController](https://developer.mozilla.org/docs/Web/API/AbortController)
6
+ and the `AbortSignal` used by
7
+ [fetch](https://developer.mozilla.org/docs/Web/API/Fetch_API) built into modern JavaScript platforms.
8
+
9
+ Customers of Azure SDK for JavaScript in general do not need to use this library. Instead they
10
+ use `AbortController` and `AbortSignal` provided by their platforms and pass the abort signals to Azure SDK operations.
11
+
12
+ Key links:
13
+
14
+ - [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller)
15
+ - [Package (npm)](https://www.npmjs.com/package/@azure/abort-controller)
16
+ - [API Reference Documentation](https://docs.microsoft.com/javascript/api/overview/azure/abort-controller-readme)
17
+
18
+ ## Getting started
19
+
20
+ ### Installation
21
+
22
+ Install this library using npm as follows
23
+
24
+ ```
25
+ npm install @azure/abort-controller
26
+ ```
27
+
28
+ ## Key Concepts
29
+
30
+ Use `AbortController` to create an `AbortSignal` which can then be passed to Azure SDK operations to cancel
31
+ pending work. The `AbortSignal` can be accessed via the `signal` property on an instantiated `AbortController`.
32
+ An `AbortSignal` can also be returned directly from a static method, e.g. `AbortSignal.timeout(100)`.
33
+ that is cancelled after 100 milliseconds.
34
+
35
+ ## Examples
36
+
37
+ The below examples assume that `doAsyncWork` is a function that takes a bag of properties, one of which is
38
+ of the abort signal.
39
+
40
+ ### Example 1 - basic usage
41
+
42
+ ```js
43
+ const controller = new AbortController();
44
+ doAsyncWork({ abortSignal: controller.signal });
45
+
46
+ // at some point later
47
+ controller.abort();
48
+ ```
49
+
50
+ ### Example 2 - Aborting with timeout
51
+
52
+ ```js
53
+ const signal = AbortSignal.timeout(1000);
54
+ doAsyncWork({ abortSignal: signal });
55
+ ```
56
+
57
+ ## Next steps
58
+
59
+ 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.
60
+
61
+ ## Troubleshooting
62
+
63
+ 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).
64
+
65
+ ## Contributing
66
+
67
+ 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.
68
+
69
+ ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fabort-controller%2FREADME.png)
workspace/node_modules/@azure/abort-controller/dist/abort-controller.d.ts ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This error is thrown when an asynchronous operation has been aborted.
3
+ * Check for this error by testing the `name` that the name property of the
4
+ * error matches `"AbortError"`.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * const controller = new AbortController();
9
+ * controller.abort();
10
+ * try {
11
+ * doAsyncWork(controller.signal)
12
+ * } catch (e) {
13
+ * if (e.name === 'AbortError') {
14
+ * // handle abort error here.
15
+ * }
16
+ * }
17
+ * ```
18
+ */
19
+ export declare class AbortError extends Error {
20
+ constructor(message?: string);
21
+ }
22
+
23
+ /**
24
+ * Allows the request to be aborted upon firing of the "abort" event.
25
+ * Compatible with the browser built-in AbortSignal and common polyfills.
26
+ */
27
+ export declare interface AbortSignalLike {
28
+ /**
29
+ * Indicates if the signal has already been aborted.
30
+ */
31
+ readonly aborted: boolean;
32
+ /**
33
+ * Add new "abort" event listener, only support "abort" event.
34
+ */
35
+ addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
36
+ /**
37
+ * Remove "abort" event listener, only support "abort" event.
38
+ */
39
+ removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
40
+ }
41
+
42
+ export { }
workspace/node_modules/@azure/abort-controller/dist/browser/AbortError.d.ts ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This error is thrown when an asynchronous operation has been aborted.
3
+ * Check for this error by testing the `name` that the name property of the
4
+ * error matches `"AbortError"`.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * const controller = new AbortController();
9
+ * controller.abort();
10
+ * try {
11
+ * doAsyncWork(controller.signal)
12
+ * } catch (e) {
13
+ * if (e.name === 'AbortError') {
14
+ * // handle abort error here.
15
+ * }
16
+ * }
17
+ * ```
18
+ */
19
+ export declare class AbortError extends Error {
20
+ constructor(message?: string);
21
+ }
22
+ //# sourceMappingURL=AbortError.d.ts.map
workspace/node_modules/@azure/abort-controller/dist/browser/AbortError.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"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"}
workspace/node_modules/@azure/abort-controller/dist/browser/AbortError.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ /**
4
+ * This error is thrown when an asynchronous operation has been aborted.
5
+ * Check for this error by testing the `name` that the name property of the
6
+ * error matches `"AbortError"`.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const controller = new AbortController();
11
+ * controller.abort();
12
+ * try {
13
+ * doAsyncWork(controller.signal)
14
+ * } catch (e) {
15
+ * if (e.name === 'AbortError') {
16
+ * // handle abort error here.
17
+ * }
18
+ * }
19
+ * ```
20
+ */
21
+ export class AbortError extends Error {
22
+ constructor(message) {
23
+ super(message);
24
+ this.name = "AbortError";
25
+ }
26
+ }
27
+ //# sourceMappingURL=AbortError.js.map
workspace/node_modules/@azure/abort-controller/dist/browser/AbortError.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"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"]}
workspace/node_modules/@azure/abort-controller/dist/browser/AbortSignalLike.d.ts ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Allows the request to be aborted upon firing of the "abort" event.
3
+ * Compatible with the browser built-in AbortSignal and common polyfills.
4
+ */
5
+ export interface AbortSignalLike {
6
+ /**
7
+ * Indicates if the signal has already been aborted.
8
+ */
9
+ readonly aborted: boolean;
10
+ /**
11
+ * Add new "abort" event listener, only support "abort" event.
12
+ */
13
+ addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
14
+ /**
15
+ * Remove "abort" event listener, only support "abort" event.
16
+ */
17
+ removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
18
+ }
19
+ //# sourceMappingURL=AbortSignalLike.d.ts.map
workspace/node_modules/@azure/abort-controller/dist/browser/AbortSignalLike.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"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"}
workspace/node_modules/@azure/abort-controller/dist/browser/AbortSignalLike.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ export {};
4
+ //# sourceMappingURL=AbortSignalLike.js.map
workspace/node_modules/@azure/abort-controller/dist/browser/AbortSignalLike.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"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"]}
workspace/node_modules/@azure/abort-controller/dist/browser/index.d.ts ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ declare global {
2
+ interface Event {
3
+ }
4
+ }
5
+ export { AbortError } from "./AbortError.js";
6
+ export { AbortSignalLike } from "./AbortSignalLike.js";
7
+ //# sourceMappingURL=index.d.ts.map
workspace/node_modules/@azure/abort-controller/dist/browser/index.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"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"}
workspace/node_modules/@azure/abort-controller/dist/browser/index.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ export { AbortError } from "./AbortError.js";
4
+ //# sourceMappingURL=index.js.map
workspace/node_modules/@azure/abort-controller/dist/browser/index.js.map ADDED
@@ -0,0 +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"]}
workspace/node_modules/@azure/abort-controller/dist/browser/package.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "type": "module"
3
+ }
workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortError.d.ts ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This error is thrown when an asynchronous operation has been aborted.
3
+ * Check for this error by testing the `name` that the name property of the
4
+ * error matches `"AbortError"`.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * const controller = new AbortController();
9
+ * controller.abort();
10
+ * try {
11
+ * doAsyncWork(controller.signal)
12
+ * } catch (e) {
13
+ * if (e.name === 'AbortError') {
14
+ * // handle abort error here.
15
+ * }
16
+ * }
17
+ * ```
18
+ */
19
+ export declare class AbortError extends Error {
20
+ constructor(message?: string);
21
+ }
22
+ //# sourceMappingURL=AbortError.d.ts.map
workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortError.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"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"}
workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.AbortError = void 0;
6
+ /**
7
+ * This error is thrown when an asynchronous operation has been aborted.
8
+ * Check for this error by testing the `name` that the name property of the
9
+ * error matches `"AbortError"`.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const controller = new AbortController();
14
+ * controller.abort();
15
+ * try {
16
+ * doAsyncWork(controller.signal)
17
+ * } catch (e) {
18
+ * if (e.name === 'AbortError') {
19
+ * // handle abort error here.
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ class AbortError extends Error {
25
+ constructor(message) {
26
+ super(message);
27
+ this.name = "AbortError";
28
+ }
29
+ }
30
+ exports.AbortError = AbortError;
31
+ //# sourceMappingURL=AbortError.js.map
workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"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"]}
workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortSignalLike.d.ts ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Allows the request to be aborted upon firing of the "abort" event.
3
+ * Compatible with the browser built-in AbortSignal and common polyfills.
4
+ */
5
+ export interface AbortSignalLike {
6
+ /**
7
+ * Indicates if the signal has already been aborted.
8
+ */
9
+ readonly aborted: boolean;
10
+ /**
11
+ * Add new "abort" event listener, only support "abort" event.
12
+ */
13
+ addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
14
+ /**
15
+ * Remove "abort" event listener, only support "abort" event.
16
+ */
17
+ removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
18
+ }
19
+ //# sourceMappingURL=AbortSignalLike.d.ts.map
workspace/node_modules/@azure/abort-controller/dist/commonjs/AbortSignalLike.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"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"}