clever-queue 0.1.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitlab-ci.yml +79 -0
- package/README.md +66 -6
- package/dist/engine/index.d.ts +14 -10
- package/dist/engine/index.js +45 -46
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/interfaces.d.ts +3 -2
- package/dist/engine/interfaces.js.map +1 -1
- package/dist/helpers/id.d.ts +2 -0
- package/dist/helpers/id.js +7 -0
- package/dist/helpers/id.js.map +1 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.js +19 -8
- package/dist/helpers/index.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +25 -15
- package/dist/index.js.map +1 -1
- package/dist/{queue → queues}/index.d.ts +8 -5
- package/dist/{queue → queues}/index.js +27 -33
- package/dist/queues/index.js.map +1 -0
- package/dist/{queue → queues}/interfaces.d.ts +9 -4
- package/dist/{queue → queues}/interfaces.js +4 -2
- package/dist/queues/interfaces.js.map +1 -0
- package/dist/{runner → runners}/index.d.ts +7 -3
- package/dist/{runner → runners}/index.js +33 -15
- package/dist/runners/index.js.map +1 -0
- package/dist/{runner → runners}/interfaces.d.ts +2 -1
- package/dist/{runner → runners}/interfaces.js +1 -1
- package/dist/runners/interfaces.js.map +1 -0
- package/dist/{task → tasks}/index.d.ts +8 -2
- package/dist/{task → tasks}/index.js +27 -15
- package/dist/tasks/index.js.map +1 -0
- package/dist/{task → tasks}/interfaces.d.ts +1 -0
- package/dist/tasks/interfaces.js.map +1 -0
- package/documentation/demo_1E_1Q_1R_4T.svg +1 -0
- package/documentation/demo_1E_1Q_2R_4T.svg +1 -0
- package/documentation/demo_1E_2Q_1R_8T.svg +1 -0
- package/eslint.config.mjs +68 -68
- package/examples/package-lock.json +19 -0
- package/examples/package.json +15 -0
- package/examples/src/demo_1E_1Q_1R_4T.ts +37 -0
- package/examples/src/demo_1E_1Q_2R_4T.ts +36 -0
- package/examples/src/demo_1E_2Q_1R_8T.ts +40 -0
- package/examples/src/example00.ts +16 -0
- package/examples/src/helpers/animations.ts +295 -0
- package/examples/src/helpers/index.ts +2 -0
- package/examples/src/helpers/myAsyncTaskToExecute.ts +6 -0
- package/examples/src/helpers/svg.ts +155 -0
- package/examples/src/tsconfig.json +24 -0
- package/package.json +16 -6
- package/src/engine/index.ts +37 -48
- package/src/engine/interfaces.ts +3 -2
- package/src/helpers/id.ts +4 -0
- package/src/helpers/index.ts +1 -0
- package/src/index.ts +7 -7
- package/src/{queue → queues}/index.ts +11 -28
- package/src/{queue → queues}/interfaces.ts +4 -3
- package/src/{runner → runners}/index.ts +17 -12
- package/src/{runner → runners}/interfaces.ts +2 -1
- package/src/{task → tasks}/index.ts +11 -10
- package/src/{task → tasks}/interfaces.ts +1 -0
- package/test/issues/00001.mjs +1 -1
- package/test/miscellaneous/test.mjs +13 -13
- package/test/units/engine.mjs +5 -5
- package/test/units/queue.mjs +4 -4
- package/test/units/task.mjs +6 -6
- package/dist/errors.d.ts +0 -13
- package/dist/errors.js +0 -42
- package/dist/errors.js.map +0 -1
- package/dist/queue/index.js.map +0 -1
- package/dist/queue/interfaces.js.map +0 -1
- package/dist/runner/index.js.map +0 -1
- package/dist/runner/interfaces.js.map +0 -1
- package/dist/task/index.js.map +0 -1
- package/dist/task/interfaces.js.map +0 -1
- package/exemples/index01.js +0 -116
- package/exemples/index01.ts +0 -98
- package/exemples/index02.mjs +0 -13
- package/exemples/tsconfig.json +0 -24
- /package/dist/{task → tasks}/interfaces.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/queues/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,iDAAmC;AACnC,6CAA2E;AAM3E,MAAM,cAAc,GAAY;IAC9B,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,u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standard: number;
|
|
5
|
+
Absolute: number;
|
|
6
|
+
};
|
|
7
|
+
declare const Weights: {
|
|
8
|
+
Lowest: number;
|
|
9
|
+
Default: number;
|
|
10
|
+
Highest: number;
|
|
6
11
|
};
|
|
7
12
|
interface Options {
|
|
8
|
-
|
|
13
|
+
id?: string;
|
|
9
14
|
priority: number;
|
|
10
15
|
weight: number;
|
|
11
16
|
autostart?: boolean;
|
|
@@ -24,4 +29,4 @@ declare const ErrorsList: {
|
|
|
24
29
|
message: string;
|
|
25
30
|
};
|
|
26
31
|
};
|
|
27
|
-
export { Options, Statistics, ErrorsList, Priorities };
|
|
32
|
+
export { Options, Statistics, ErrorsList, Priorities, Weights };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Priorities = exports.ErrorsList = void 0;
|
|
4
|
-
const Priorities = {
|
|
3
|
+
exports.Weights = exports.Priorities = exports.ErrorsList = void 0;
|
|
4
|
+
const Priorities = { BestEffort: 0, Standard: 128, Absolute: 255 };
|
|
5
5
|
exports.Priorities = Priorities;
|
|
6
|
+
const Weights = { Lowest: 0, Default: 128, Highest: 255 };
|
|
7
|
+
exports.Weights = Weights;
|
|
6
8
|
const ErrorsList = {
|
|
7
9
|
BadPriorityOptionsOnQueueInitialization: {
|
|
8
10
|
name: "BadPriorityOptionsOnQueueInitialization",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/queues/interfaces.ts"],"names":[],"mappings":";;;AAEA,MAAM,UAAU,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAG,QAAQ,EAAE,GAAG,EAAC,CAAC;AAoCzB,gCAAU;AAnCpD,MAAM,OAAO,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;AAmCJ,0BAAO;AAhB7D,MAAM,UAAU,GAEZ;IACF,uCAAuC,EAAE;QACvC,IAAI,EAAE,yCAAyC;QAC/C,OAAO,EACL,yKAAyK;KAC5K;IACD,oCAAoC,EAAE;QACpC,IAAI,EAAE,sCAAsC;QAC5C,OAAO,EAAE,gEAAgE;KAC1E;IAED,8BAA8B,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE,OAAO,EAAE,gDAAgD,EAAE;CACtI,CAAC;AAE4B,gCAAU"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { Options, Statistics } from "./interfaces";
|
|
2
|
-
import
|
|
2
|
+
import * as cqEngine from "../engine";
|
|
3
3
|
export * from "./interfaces";
|
|
4
|
-
type Status = "unknown" | "initialiazing" | "running" | "stopping" | "destroying";
|
|
4
|
+
type Status = "unknown" | "initialiazing" | "idle" | "running" | "stopping" | "destroying";
|
|
5
5
|
declare class Runner {
|
|
6
6
|
#private;
|
|
7
7
|
status: Status;
|
|
8
|
-
|
|
8
|
+
readonly options: Options;
|
|
9
|
+
tags: {
|
|
10
|
+
[key: string]: string | number | boolean;
|
|
11
|
+
};
|
|
12
|
+
constructor(opt: Options, engine: cqEngine.Engine);
|
|
9
13
|
start(): void;
|
|
10
14
|
stop(): void;
|
|
11
15
|
statistics(): Statistics;
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
37
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
38
|
};
|
|
@@ -38,13 +48,16 @@ const defaultOptions = {
|
|
|
38
48
|
};
|
|
39
49
|
class Runner {
|
|
40
50
|
status = "unknown";
|
|
41
|
-
|
|
51
|
+
options;
|
|
52
|
+
tags = {};
|
|
42
53
|
#engine;
|
|
43
54
|
constructor(opt, engine) {
|
|
44
55
|
this.status = "initialiazing";
|
|
45
|
-
this
|
|
56
|
+
this.options = this.#checkOptionsConsistancy({ ...defaultOptions, ...opt });
|
|
57
|
+
if (!this.options.id)
|
|
58
|
+
this.options.id = _.Id.generate();
|
|
46
59
|
this.#engine = engine; // Store parent engine for later callbacks
|
|
47
|
-
if (this
|
|
60
|
+
if (this.options.autostart)
|
|
48
61
|
this.start();
|
|
49
62
|
}
|
|
50
63
|
#checkOptionsConsistancy(options) {
|
|
@@ -53,17 +66,22 @@ class Runner {
|
|
|
53
66
|
return options;
|
|
54
67
|
}
|
|
55
68
|
async #run() {
|
|
56
|
-
while (
|
|
69
|
+
while (["idle", "running"].includes(this.status)) {
|
|
57
70
|
await new Promise((resolve) => setTimeout(resolve, 10)); // Do not freeze the event loop with infinite loop.
|
|
58
71
|
// get the next task to run according to this runner priority
|
|
59
|
-
const task = await this.#engine.getNextTask(this
|
|
72
|
+
const task = await this.#engine.getNextTask(this.options.priority);
|
|
60
73
|
if (task) {
|
|
61
|
-
|
|
74
|
+
if (this.status === "idle")
|
|
75
|
+
this.status = "running";
|
|
76
|
+
task.runnerId = this.options.id; // store runner that handle task for future references
|
|
77
|
+
await task.run();
|
|
78
|
+
if (this.status === "running")
|
|
79
|
+
this.status = "idle";
|
|
62
80
|
}
|
|
63
81
|
}
|
|
64
82
|
}
|
|
65
83
|
start() {
|
|
66
|
-
this.status = "
|
|
84
|
+
this.status = "idle";
|
|
67
85
|
this.#run();
|
|
68
86
|
}
|
|
69
87
|
stop() {
|
|
@@ -72,7 +90,7 @@ class Runner {
|
|
|
72
90
|
statistics() {
|
|
73
91
|
const stat = {
|
|
74
92
|
status: this.status,
|
|
75
|
-
priority: this
|
|
93
|
+
priority: this.options.priority,
|
|
76
94
|
};
|
|
77
95
|
return stat;
|
|
78
96
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runners/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,6CAA2E;AAG3E,+CAA6B;AAI7B,MAAM,cAAc,GAAY;IAC9B,QAAQ,EAAE,uBAAU,CAAC,UAAU;IAC/B,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,MAAM,MAAM;IACV,MAAM,GAAW,SAAS,CAAC;IAClB,OAAO,CAAU;IAC1B,IAAI,GAAiD,EAAE,CAAC;IAC/C,OAAO,CAAkB;IAElC,YAAY,GAAY,EAAE,MAAuB;QAC/C,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,wBAAwB,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YAAE,IAAI,CAA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QACF,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,MAAM,IAAI,GAAe;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;SAChC,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAGQ,wBAAM;AADf,2CAA+D;AAAjC,wGAAA,UAAU,OAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _ from "../helpers";
|
|
2
2
|
interface Options {
|
|
3
|
+
id?: string;
|
|
3
4
|
autostart?: boolean;
|
|
4
5
|
priority: number;
|
|
5
6
|
logFunction?: _.Logs.LogFunction;
|
|
@@ -15,5 +16,5 @@ declare const ErrorsList: {
|
|
|
15
16
|
message: string;
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
|
-
export { Priorities } from "../
|
|
19
|
+
export { Priorities } from "../queues/interfaces";
|
|
19
20
|
export { Options, Statistics, ErrorsList };
|
|
@@ -8,6 +8,6 @@ const ErrorsList = {
|
|
|
8
8
|
},
|
|
9
9
|
};
|
|
10
10
|
exports.ErrorsList = ErrorsList;
|
|
11
|
-
var interfaces_1 = require("../
|
|
11
|
+
var interfaces_1 = require("../queues/interfaces");
|
|
12
12
|
Object.defineProperty(exports, "Priorities", { enumerable: true, get: function () { return interfaces_1.Priorities; } });
|
|
13
13
|
//# sourceMappingURL=interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/runners/interfaces.ts"],"names":[],"mappings":";;;AAcA,MAAM,UAAU,GAEZ;IACF,+BAA+B,EAAE;QAC/B,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE,iCAAiC;KAC3C;CACF,CAAC;AAG4B,gCAAU;AADxC,mDAAkD;AAAzC,wGAAA,UAAU,OAAA"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { Options, Statistics, FunctionToExecute } from "./interfaces";
|
|
2
|
-
type Status = "unknown" | "initialiazing" | "running" | "
|
|
2
|
+
type Status = "unknown" | "initialiazing" | "queued" | "running" | "runned" | "exception" | "destroying";
|
|
3
3
|
declare class Task {
|
|
4
4
|
#private;
|
|
5
5
|
status: Status;
|
|
6
|
+
readonly options: Options;
|
|
7
|
+
tags: {
|
|
8
|
+
[key: string]: string | number | boolean;
|
|
9
|
+
};
|
|
10
|
+
queueId: string | undefined;
|
|
11
|
+
runnerId: string | undefined;
|
|
6
12
|
result: unknown | undefined;
|
|
7
|
-
readonly
|
|
13
|
+
readonly run: () => Promise<unknown>;
|
|
8
14
|
resolver: (value: any | PromiseLike<any>) => void;
|
|
9
15
|
rejecter: (reason?: any) => void;
|
|
10
16
|
constructor(function_: FunctionToExecute, opt: Options);
|
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
37
|
exports.Task = exports.ErrorsList = void 0;
|
|
28
38
|
const _ = __importStar(require("../helpers"));
|
|
@@ -32,10 +42,13 @@ const defaultOptions = {
|
|
|
32
42
|
};
|
|
33
43
|
class Task {
|
|
34
44
|
status = "unknown";
|
|
35
|
-
|
|
45
|
+
options;
|
|
46
|
+
tags = {};
|
|
47
|
+
queueId;
|
|
48
|
+
runnerId;
|
|
36
49
|
#functionToExecute;
|
|
37
50
|
result = undefined;
|
|
38
|
-
|
|
51
|
+
run;
|
|
39
52
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
53
|
resolver;
|
|
41
54
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -48,23 +61,22 @@ class Task {
|
|
|
48
61
|
}
|
|
49
62
|
constructor(function_, opt) {
|
|
50
63
|
this.status = "initialiazing";
|
|
51
|
-
this
|
|
64
|
+
this.options = this.#checkOptionsConsistancy({ ...defaultOptions, ...opt });
|
|
65
|
+
if (!this.options.id)
|
|
66
|
+
this.options.id = _.Id.generate();
|
|
52
67
|
if (typeof function_ !== "function")
|
|
53
68
|
throw new _.Errors.CQError(interfaces_1.ErrorsList.FunctionIsNotAFunction);
|
|
54
69
|
this.resolver = this.#defaultResolver;
|
|
55
70
|
this.rejecter = this.#defaultRejecter;
|
|
56
71
|
this.#functionToExecute = function_;
|
|
57
|
-
this.
|
|
72
|
+
this.run = async () => {
|
|
58
73
|
this.status = "running";
|
|
59
|
-
// console.log("running Task");
|
|
60
74
|
try {
|
|
61
75
|
this.result = await this.#functionToExecute();
|
|
62
|
-
|
|
63
|
-
this.status = "stopping";
|
|
76
|
+
this.status = "runned";
|
|
64
77
|
this.resolver(this.result);
|
|
65
78
|
}
|
|
66
79
|
catch (error) {
|
|
67
|
-
// console.log("task error", this.result);
|
|
68
80
|
this.status = "exception";
|
|
69
81
|
this.rejecter(new _.Errors.CQError(interfaces_1.ErrorsList.FunctionRaisedAnHundledException));
|
|
70
82
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":";AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,8CAAgC;AAChC,6CAAkF;AAIlF,MAAM,cAAc,GAAY;IAC9B,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,MAAM,IAAI;IACR,MAAM,GAAW,SAAS,CAAC;IAClB,OAAO,CAAU;IAC1B,IAAI,GAAiD,EAAE,CAAC;IACxD,OAAO,CAAqB;IAC5B,QAAQ,CAAqB;IAE7B,kBAAkB,CAAoB;IACtC,MAAM,GAAwB,SAAS,CAAC;IAC/B,GAAG,CAAyB;IAErC,8DAA8D;IAC9D,QAAQ,CAA0C;IAClD,8DAA8D;IAC9D,QAAQ,CAAyB;IAEjC,gBAAgB;QACd,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAU,CAAC,wBAAwB,CAAC,CAAC;IAClE,CAAC;IACD,gBAAgB;QACd,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAU,CAAC,wBAAwB,CAAC,CAAC;IAClE,CAAC;IAED,YAAY,SAA4B,EAAE,GAAY;QACpD,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,wBAAwB,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YAAE,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;QACxD,IAAI,OAAO,SAAS,KAAK,UAAU;YAAE,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAU,CAAC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AE,+BAA+B;QACrC,OAAO,EAAE,+BAA+B;KACzC;IACD,sBAAsB,EAAE;QACtB,IAAI,EAAE,wBAAwB;QAC9B,OAAO,EAAE,wBAAwB;KAClC;IACD,gCAAgC,EAAE;QAChC,IAAI,EAAE,kCAAkC;QACxC,OAAO,EAAE,kCAAkC;KAC5C;IACD,wBAAwB,EAAE;QACxB,IAAI,EAAE,0BAA0B;QAChC,OAAO,EAAE,0BAA0B;KACpC;CACF,CAAC;AAE4B,gCAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800"><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="start" begin="stop.end;0" dur="2" path="M400,-800"></animateMotion></g><g id="526867e1b6"><g><rect x="350" y="100" width="100" height="350" rx="20" ry="20" fill="lightblue" stroke="blue" stroke-width="5"></rect></g></g><g id="f49c8ad61f"><g><rect x="350" y="610" width="100" height="100" rx="20" ry="20" fill="lightgreen" stroke="green" stroke-width="5"></rect></g></g><g id="task A1"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A1</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L360,360"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M360,360 L360,360"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M360,360 L360,360"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M360,360 L360,620"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A2"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A2</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L360,277"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M360,277 L360,277"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M360,277 L360,277"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M360,277 L360,360"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M360,360 L360,360"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M360,360 L360,620"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A3"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A3</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L360,193"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M360,193 L360,193"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M360,193 L360,193"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M360,193 L360,270"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M360,270 L360,270"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M360,270 L360,360"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,360 L360,360"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,360 L360,360"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,360 L360,620"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A4"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A4</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L360,110"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M360,110 L360,110"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M360,110 L360,110"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M360,110 L360,180"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M360,180 L360,180"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M360,180 L360,270"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,270 L360,270"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,270 L360,270"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,270 L360,360"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,360 L360,360"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,360 L360,620"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion></g><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="stop" begin="start.end + 16s" dur="2" path="M400,-800"></animateMotion></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800"><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="start" begin="stop.end;0" dur="2" path="M400,-800"></animateMotion></g><g id="18aeea3b4d4"><g><rect x="350" y="100" width="100" height="350" rx="20" ry="20" fill="lightblue" stroke="blue" stroke-width="5"></rect></g></g><g id="db6e103b77"><g><rect x="200" y="610" width="100" height="100" rx="20" ry="20" fill="lightgreen" stroke="green" stroke-width="5"></rect></g></g><g id="5a7ca1813a"><g><rect x="500" y="610" width="100" height="100" rx="20" ry="20" fill="lightgreen" stroke="green" stroke-width="5"></rect></g></g><g id="task A1"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A1</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L360,360"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M360,360 L360,360"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M360,360 L360,360"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M360,360 L210,620"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,620 L360,870"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A2"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A2</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L360,277"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M360,277 L360,277"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M360,277 L360,277"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M360,277 L510,620"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,620 L510,620"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,620 L360,870"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A3"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A3</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L360,193"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M360,193 L360,193"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M360,193 L360,193"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M360,193 L360,360"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M360,360 L360,360"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M360,360 L210,620"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M210,620 L210,620"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M210,620 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A4"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A4</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L360,110"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M360,110 L360,110"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M360,110 L360,110"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M360,110 L360,270"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M360,270 L360,270"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M360,270 L510,620"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,620 L510,620"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,620 L510,620"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,620 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion></g><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="stop" begin="start.end + 11s" dur="2" path="M400,-800"></animateMotion></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800"><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="start" begin="stop.end;0" dur="2" path="M400,-800"></animateMotion></g><g id="ddfea64138"><g><rect x="200" y="100" width="100" height="350" rx="20" ry="20" fill="lightblue" stroke="blue" stroke-width="5"></rect></g></g><g id="bf5d4b05ef"><g><rect x="500" y="100" width="100" height="350" rx="20" ry="20" fill="lightblue" stroke="blue" stroke-width="5"></rect></g></g><g id="c0744fdb8e"><g><rect x="350" y="610" width="100" height="100" rx="20" ry="20" fill="lightgreen" stroke="green" stroke-width="5"></rect></g></g><g id="task A1"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A1</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,360"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,360 L360,620"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A2"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A2</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,277"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,277 L210,277"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,277 L210,277"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,277 L210,360"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M210,360 L360,620"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A3"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A3</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,193"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,193 L210,193"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,193 L210,193"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,193 L210,270"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M210,270 L210,360"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M210,360 L360,620"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task A4"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task A4</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L210,110"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M210,110 L210,110"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M210,110 L210,110"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M210,110 L210,180"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M210,180 L210,180"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M210,180 L210,180"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M210,180 L210,180"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M210,180 L210,180"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M210,180 L210,270"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M210,270 L210,270"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M210,270 L210,360"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M210,360 L210,360"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M210,360 L360,620"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B1"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B1</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,360"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,360 L360,620"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B2"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B2</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,277"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,277 L510,277"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,277 L510,360"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M510,360 L360,620"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B3"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B3</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,193"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,193 L510,193"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,193 L510,270"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M510,270 L510,360"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M510,360 L360,620"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g id="task B4"><g><rect width="80" height="80" rx="20" ry="20" fill="blue"></rect><rect width="20" height="10" rx="20" ry="20" fill="green"></rect><text dx="40" dy="40" dominant-baseline="middle" text-anchor="middle" fill="white">task B4</text></g><animateMotion begin="0" dur="0" path="M360,-80"></animateMotion><animateMotion begin="start.end+1s" dur="1" path="M360,-80 L510,110"></animateMotion><animateMotion begin="start.end+2s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+3s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+4s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+5s" dur="1" path="M510,110 L510,110"></animateMotion><animateMotion begin="start.end+6s" dur="1" path="M510,110 L510,180"></animateMotion><animateMotion begin="start.end+7s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+8s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+9s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+10s" dur="1" path="M510,180 L510,180"></animateMotion><animateMotion begin="start.end+11s" dur="1" path="M510,180 L510,270"></animateMotion><animateMotion begin="start.end+12s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+13s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+14s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+15s" dur="1" path="M510,270 L510,270"></animateMotion><animateMotion begin="start.end+16s" dur="1" path="M510,270 L510,360"></animateMotion><animateMotion begin="start.end+17s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+18s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+19s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+20s" dur="1" path="M510,360 L510,360"></animateMotion><animateMotion begin="start.end+21s" dur="1" path="M510,360 L360,620"></animateMotion><animateMotion begin="start.end+22s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+23s" dur="1" path="M360,620 L360,620"></animateMotion><animateMotion begin="start.end+24s" dur="1" path="M360,620 L360,870"></animateMotion><animateMotion begin="start.end+25s" dur="1" path="M360,870 L360,870"></animateMotion><animateMotion begin="start.end+26s" dur="1" path="M360,870 L360,870"></animateMotion></g><g><rect x="10" y="10" width="10" height="10"></rect><animateMotion id="stop" begin="start.end + 26s" dur="2" path="M400,-800"></animateMotion></g></svg>
|
package/eslint.config.mjs
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import eslint from "@eslint/js";
|
|
2
|
-
import tseslint from "typescript-eslint";
|
|
3
|
-
import globals from "globals";
|
|
4
|
-
|
|
5
|
-
import security from "eslint-plugin-security";
|
|
6
|
-
import unicorn from "eslint-plugin-unicorn";
|
|
7
|
-
import promise from "eslint-plugin-promise";
|
|
8
|
-
import prettierRecommended from "eslint-plugin-prettier/recommended";
|
|
9
|
-
|
|
10
|
-
import tsParser from "@typescript-eslint/parser";
|
|
11
|
-
|
|
12
|
-
export default [
|
|
13
|
-
eslint.configs.recommended,
|
|
14
|
-
...tseslint.configs.recommended,
|
|
15
|
-
security.configs.recommended,
|
|
16
|
-
promise.configs["flat/recommended"],
|
|
17
|
-
unicorn.configs["flat/recommended"],
|
|
18
|
-
prettierRecommended,
|
|
19
|
-
{
|
|
20
|
-
languageOptions: {
|
|
21
|
-
parser: tsParser,
|
|
22
|
-
ecmaVersion: 2020,
|
|
23
|
-
sourceType: "module",
|
|
24
|
-
globals: {
|
|
25
|
-
...globals.node,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
rules: {
|
|
29
|
-
"no-console": "warn",
|
|
30
|
-
|
|
31
|
-
"max-len": [
|
|
32
|
-
"error",
|
|
33
|
-
{
|
|
34
|
-
code: 180,
|
|
35
|
-
ignoreUrls: true,
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
|
|
39
|
-
"max-lines-per-function": [
|
|
40
|
-
"warn",
|
|
41
|
-
{
|
|
42
|
-
max: 75,
|
|
43
|
-
skipBlankLines: true,
|
|
44
|
-
skipComments: true,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
|
|
48
|
-
"@typescript-eslint/no-explicit-any": "warn",
|
|
49
|
-
"@typescript-eslint/explicit-function-return-type": "warn",
|
|
50
|
-
"unicorn/filename-case": "off",
|
|
51
|
-
"unicorn/prevent-abbreviations": "warn",
|
|
52
|
-
"security/detect-object-injection": "off",
|
|
53
|
-
"security/detect-non-literal-fs-filename": "off",
|
|
54
|
-
"promise/always-return": "warn",
|
|
55
|
-
"promise/no-return-wrap": "warn",
|
|
56
|
-
"promise/param-names": "warn",
|
|
57
|
-
"promise/catch-or-return": "warn",
|
|
58
|
-
"promise/no-native": "off",
|
|
59
|
-
"promise/no-nesting": "warn",
|
|
60
|
-
"promise/no-promise-in-callback": "warn",
|
|
61
|
-
"promise/no-callback-in-promise": "warn",
|
|
62
|
-
"promise/avoid-new": "off",
|
|
63
|
-
"promise/no-new-statics": "warn",
|
|
64
|
-
"promise/no-return-in-finally": "warn",
|
|
65
|
-
"promise/valid-params": "warn",
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
];
|
|
1
|
+
import eslint from "@eslint/js";
|
|
2
|
+
import tseslint from "typescript-eslint";
|
|
3
|
+
import globals from "globals";
|
|
4
|
+
|
|
5
|
+
import security from "eslint-plugin-security";
|
|
6
|
+
import unicorn from "eslint-plugin-unicorn";
|
|
7
|
+
import promise from "eslint-plugin-promise";
|
|
8
|
+
import prettierRecommended from "eslint-plugin-prettier/recommended";
|
|
9
|
+
|
|
10
|
+
import tsParser from "@typescript-eslint/parser";
|
|
11
|
+
|
|
12
|
+
export default [
|
|
13
|
+
eslint.configs.recommended,
|
|
14
|
+
...tseslint.configs.recommended,
|
|
15
|
+
security.configs.recommended,
|
|
16
|
+
promise.configs["flat/recommended"],
|
|
17
|
+
unicorn.configs["flat/recommended"],
|
|
18
|
+
prettierRecommended,
|
|
19
|
+
{
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parser: tsParser,
|
|
22
|
+
ecmaVersion: 2020,
|
|
23
|
+
sourceType: "module",
|
|
24
|
+
globals: {
|
|
25
|
+
...globals.node,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
rules: {
|
|
29
|
+
"no-console": "warn",
|
|
30
|
+
|
|
31
|
+
"max-len": [
|
|
32
|
+
"error",
|
|
33
|
+
{
|
|
34
|
+
code: 180,
|
|
35
|
+
ignoreUrls: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
|
|
39
|
+
"max-lines-per-function": [
|
|
40
|
+
"warn",
|
|
41
|
+
{
|
|
42
|
+
max: 75,
|
|
43
|
+
skipBlankLines: true,
|
|
44
|
+
skipComments: true,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
|
|
48
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
49
|
+
"@typescript-eslint/explicit-function-return-type": "warn",
|
|
50
|
+
"unicorn/filename-case": "off",
|
|
51
|
+
"unicorn/prevent-abbreviations": "warn",
|
|
52
|
+
"security/detect-object-injection": "off",
|
|
53
|
+
"security/detect-non-literal-fs-filename": "off",
|
|
54
|
+
"promise/always-return": "warn",
|
|
55
|
+
"promise/no-return-wrap": "warn",
|
|
56
|
+
"promise/param-names": "warn",
|
|
57
|
+
"promise/catch-or-return": "warn",
|
|
58
|
+
"promise/no-native": "off",
|
|
59
|
+
"promise/no-nesting": "warn",
|
|
60
|
+
"promise/no-promise-in-callback": "warn",
|
|
61
|
+
"promise/no-callback-in-promise": "warn",
|
|
62
|
+
"promise/avoid-new": "off",
|
|
63
|
+
"promise/no-new-statics": "warn",
|
|
64
|
+
"promise/no-return-in-finally": "warn",
|
|
65
|
+
"promise/valid-params": "warn",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "clever-queue_examples",
|
|
3
|
+
"lockfileVersion": 3,
|
|
4
|
+
"requires": true,
|
|
5
|
+
"packages": {
|
|
6
|
+
"": {
|
|
7
|
+
"name": "clever-queue_examples",
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"clever-queue": "../dist"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"../dist": {},
|
|
14
|
+
"node_modules/clever-queue": {
|
|
15
|
+
"resolved": "../dist",
|
|
16
|
+
"link": true
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "clever-queue_examples",
|
|
3
|
+
"scripts": {
|
|
4
|
+
"build": "npx tsc -p src/ --declaration",
|
|
5
|
+
"build:watch": "npx tsc -p src/ -w",
|
|
6
|
+
"prestart": "npx npm run build",
|
|
7
|
+
"start": "node dist/index.js",
|
|
8
|
+
"debug": "node --nolazy --inspect-brk=9229 dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"author": "Olivier GROSJEANNE",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"clever-queue": "../dist"
|
|
14
|
+
}
|
|
15
|
+
}
|