await-num-q 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +36 -0
- package/dist/index.js +121 -0
- package/package.json +13 -0
- package/tsconfig.json +109 -0
package/dist/index.d.ts
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
export type RunFunBoj = {
|
2
|
+
status: "wait" | "ing" | "end";
|
3
|
+
target: Function;
|
4
|
+
callback?: Function;
|
5
|
+
err?: Function;
|
6
|
+
};
|
7
|
+
export declare class asyncQueue {
|
8
|
+
#private;
|
9
|
+
constructor(max?: number);
|
10
|
+
/**
|
11
|
+
* 添加任务
|
12
|
+
* @param f 目标函数
|
13
|
+
* @param callback 成功回调函数
|
14
|
+
* @param err 错误回调函数
|
15
|
+
* @returns 添加成功与否
|
16
|
+
*/
|
17
|
+
push(f: Function, callback?: Function, err?: Function): boolean;
|
18
|
+
/**
|
19
|
+
* 清除运行完成的任务
|
20
|
+
*/
|
21
|
+
clear(): void;
|
22
|
+
/**
|
23
|
+
* 添加并运行任务 若是没有传入函数 运行 之前传入的任务
|
24
|
+
* @param f 目标函数
|
25
|
+
* @param callback 成功回调函数
|
26
|
+
* @param err 错误回调函数
|
27
|
+
* @returns 添加成功与否
|
28
|
+
*/
|
29
|
+
run(f?: Function, callback?: Function, err?: Function): Promise<void>;
|
30
|
+
/**
|
31
|
+
* 异步运行并得到返回值
|
32
|
+
* @param fun 目标函数
|
33
|
+
* @returns
|
34
|
+
*/
|
35
|
+
wait(fun: (...arg: any) => any): Promise<any>;
|
36
|
+
}
|
package/dist/index.js
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
12
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
13
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
14
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
15
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
16
|
+
};
|
17
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
18
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
19
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
20
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
21
|
+
};
|
22
|
+
var _asyncQueue_Queue, _asyncQueue_runNum, _asyncQueue_maxNum;
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
24
|
+
exports.asyncQueue = void 0;
|
25
|
+
class asyncQueue {
|
26
|
+
constructor(max) {
|
27
|
+
_asyncQueue_Queue.set(this, []);
|
28
|
+
_asyncQueue_runNum.set(this, 0);
|
29
|
+
_asyncQueue_maxNum.set(this, 3);
|
30
|
+
if (max) {
|
31
|
+
__classPrivateFieldSet(this, _asyncQueue_maxNum, max, "f");
|
32
|
+
}
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* 添加任务
|
36
|
+
* @param f 目标函数
|
37
|
+
* @param callback 成功回调函数
|
38
|
+
* @param err 错误回调函数
|
39
|
+
* @returns 添加成功与否
|
40
|
+
*/
|
41
|
+
push(f, callback, err) {
|
42
|
+
if (f.constructor.name !== "AsyncFunction") {
|
43
|
+
return false;
|
44
|
+
}
|
45
|
+
let funObj = {
|
46
|
+
status: "wait",
|
47
|
+
target: f,
|
48
|
+
callback,
|
49
|
+
err
|
50
|
+
};
|
51
|
+
__classPrivateFieldGet(this, _asyncQueue_Queue, "f").push(funObj);
|
52
|
+
this.clear();
|
53
|
+
return true;
|
54
|
+
}
|
55
|
+
/**
|
56
|
+
* 清除运行完成的任务
|
57
|
+
*/
|
58
|
+
clear() {
|
59
|
+
__classPrivateFieldSet(this, _asyncQueue_Queue, __classPrivateFieldGet(this, _asyncQueue_Queue, "f").filter(item => item.status !== 'end'), "f");
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* 添加并运行任务 若是没有传入函数 运行 之前传入的任务
|
63
|
+
* @param f 目标函数
|
64
|
+
* @param callback 成功回调函数
|
65
|
+
* @param err 错误回调函数
|
66
|
+
* @returns 添加成功与否
|
67
|
+
*/
|
68
|
+
run(f, callback, err) {
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
70
|
+
var _a, _b;
|
71
|
+
if (f) {
|
72
|
+
this.push(f, callback, err);
|
73
|
+
}
|
74
|
+
if (__classPrivateFieldGet(this, _asyncQueue_runNum, "f") >= __classPrivateFieldGet(this, _asyncQueue_maxNum, "f")) {
|
75
|
+
return;
|
76
|
+
}
|
77
|
+
let fun = null;
|
78
|
+
for (let f of __classPrivateFieldGet(this, _asyncQueue_Queue, "f")) {
|
79
|
+
if (f.status == 'wait') {
|
80
|
+
fun = f;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
if (fun) {
|
84
|
+
let data = null;
|
85
|
+
try {
|
86
|
+
fun.status = 'ing';
|
87
|
+
__classPrivateFieldSet(this, _asyncQueue_runNum, (_a = __classPrivateFieldGet(this, _asyncQueue_runNum, "f"), _a++, _a), "f");
|
88
|
+
data = yield fun.target();
|
89
|
+
if (fun.callback instanceof Function) {
|
90
|
+
fun.callback(data);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
catch (_c) {
|
94
|
+
if (fun.err instanceof Function) {
|
95
|
+
fun.err(data);
|
96
|
+
}
|
97
|
+
}
|
98
|
+
finally {
|
99
|
+
__classPrivateFieldSet(this, _asyncQueue_runNum, (_b = __classPrivateFieldGet(this, _asyncQueue_runNum, "f"), _b--, _b), "f");
|
100
|
+
fun.status = 'end';
|
101
|
+
this.run();
|
102
|
+
}
|
103
|
+
}
|
104
|
+
});
|
105
|
+
}
|
106
|
+
/**
|
107
|
+
* 异步运行并得到返回值
|
108
|
+
* @param fun 目标函数
|
109
|
+
* @returns
|
110
|
+
*/
|
111
|
+
wait(fun) {
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
113
|
+
return yield new Promise((rej, rea) => {
|
114
|
+
this.run(fun, rej, rea);
|
115
|
+
});
|
116
|
+
});
|
117
|
+
}
|
118
|
+
}
|
119
|
+
exports.asyncQueue = asyncQueue;
|
120
|
+
_asyncQueue_Queue = new WeakMap(), _asyncQueue_runNum = new WeakMap(), _asyncQueue_maxNum = new WeakMap();
|
121
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBTUEsTUFBYSxVQUFVO0lBSW5CLFlBQVksR0FBWTtRQUh4Qiw0QkFBc0IsRUFBRSxFQUFBO1FBQ3hCLDZCQUFVLENBQUMsRUFBQTtRQUNYLDZCQUFVLENBQUMsRUFBQTtRQUVQLElBQUksR0FBRyxFQUFFLENBQUM7WUFDTix1QkFBQSxJQUFJLHNCQUFXLEdBQUcsTUFBQSxDQUFBO1FBQ3RCLENBQUM7SUFD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QyxPQUFPLE1BQU0sSUFBSSxPQUFPLENBQXlCLENBQUMsR0FBRyxFQUFFLEdBQUcsRUFBRSxFQUFFO2dCQUMxRCxJQUFJLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUE7WUFDM0IsQ0FBQyxDQUFDLENBQUE7UUFDTixDQUFDO0tBQUE7Q0FDSjtBQTFGRCxnQ0EwRkMifQ==
|
package/package.json
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"name": "await-num-q",
|
3
|
+
"version": "1.0.1",
|
4
|
+
"description": "一个用于 处理 指定并行异步任务数量的 队列",
|
5
|
+
"keywords":["q","await","async","队列","异步","并行"],
|
6
|
+
"main": "dist/index.js",
|
7
|
+
"scripts": {
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
9
|
+
},
|
10
|
+
"types": "dist/index.d.ts",
|
11
|
+
"author": "xxl.nice@foxmail.com",
|
12
|
+
"license": "ISC"
|
13
|
+
}
|
package/tsconfig.json
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
4
|
+
|
5
|
+
/* Projects */
|
6
|
+
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
7
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
8
|
+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
9
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
10
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
11
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
12
|
+
|
13
|
+
/* Language and Environment */
|
14
|
+
"target": "ES2015", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
15
|
+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
16
|
+
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
17
|
+
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
18
|
+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
19
|
+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
20
|
+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
21
|
+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
22
|
+
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
23
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
24
|
+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
25
|
+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
26
|
+
|
27
|
+
/* Modules */
|
28
|
+
"module": "commonjs", /* Specify what module code is generated. */
|
29
|
+
"rootDir": "./src", /* Specify the root folder within your source files. */
|
30
|
+
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
31
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
32
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
33
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
34
|
+
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
35
|
+
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
36
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
37
|
+
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
38
|
+
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
39
|
+
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
40
|
+
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
41
|
+
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
42
|
+
// "resolveJsonModule": true, /* Enable importing .json files. */
|
43
|
+
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
44
|
+
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
45
|
+
|
46
|
+
/* JavaScript Support */
|
47
|
+
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
48
|
+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
49
|
+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
50
|
+
|
51
|
+
/* Emit */
|
52
|
+
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
53
|
+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
54
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
55
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
56
|
+
"inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
57
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
58
|
+
"outDir": "./dist", /* Specify an output folder for all emitted files. */
|
59
|
+
// "removeComments": true, /* Disable emitting comments. */
|
60
|
+
// "noEmit": true, /* Disable emitting files from a compilation. */
|
61
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
62
|
+
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
63
|
+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
64
|
+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
65
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
66
|
+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
67
|
+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
68
|
+
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
69
|
+
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
70
|
+
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
71
|
+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
72
|
+
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
73
|
+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
74
|
+
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
75
|
+
|
76
|
+
/* Interop Constraints */
|
77
|
+
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
78
|
+
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
79
|
+
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
80
|
+
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
81
|
+
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
82
|
+
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
83
|
+
|
84
|
+
/* Type Checking */
|
85
|
+
"strict": true, /* Enable all strict type-checking options. */
|
86
|
+
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
87
|
+
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
88
|
+
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
89
|
+
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
90
|
+
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
91
|
+
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
92
|
+
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
93
|
+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
94
|
+
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
95
|
+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
96
|
+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
97
|
+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
98
|
+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
99
|
+
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
100
|
+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
101
|
+
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
102
|
+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
103
|
+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
104
|
+
|
105
|
+
/* Completeness */
|
106
|
+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
107
|
+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
108
|
+
}
|
109
|
+
}
|