@requence/task 1.0.0-alpha.1 → 1.0.0-alpha.10
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/CHANGELOG.md +49 -0
- package/build/chunk-ajdmm777.js +125 -0
- package/build/chunk-ajdmm777.js.map +12 -0
- package/build/cli.js +17 -502
- package/build/cli.js.map +4 -8
- package/build/index.js +351 -88
- package/build/index.js.map +12 -6
- package/build/types/helpers/src/context/context.d.ts +156 -0
- package/build/types/helpers/src/context/context.d.ts.map +1 -0
- package/build/types/helpers/src/context/index.d.ts +2 -0
- package/build/types/helpers/src/context/index.d.ts.map +1 -0
- package/build/types/helpers/src/files/RequenceFile.d.ts +40 -0
- package/build/types/helpers/src/files/RequenceFile.d.ts.map +1 -0
- package/build/types/helpers/src/files/RequenceStream.d.ts +32 -0
- package/build/types/helpers/src/files/RequenceStream.d.ts.map +1 -0
- package/build/types/helpers/src/files/index.d.ts +48 -0
- package/build/types/helpers/src/files/index.d.ts.map +1 -0
- package/build/types/helpers/src/files/isValidMimeType.d.ts +5 -0
- package/build/types/helpers/src/files/isValidMimeType.d.ts.map +1 -0
- package/build/types/helpers/src/files/mapOutput.d.ts +7 -0
- package/build/types/helpers/src/files/mapOutput.d.ts.map +1 -0
- package/build/types/helpers/src/files/types.d.ts +4 -0
- package/build/types/helpers/src/files/types.d.ts.map +1 -0
- package/build/types/helpers/src/jsonschema/mapSchema.d.ts +20 -0
- package/build/types/helpers/src/jsonschema/mapSchema.d.ts.map +1 -0
- package/build/types/helpers/src/jsonschema/types.d.ts +11 -0
- package/build/types/helpers/src/jsonschema/types.d.ts.map +1 -0
- package/build/types/helpers/src/jsonschema/validate.d.ts +27 -0
- package/build/types/helpers/src/jsonschema/validate.d.ts.map +1 -0
- package/build/types/helpers/src/jsonschema/zod.d.ts +20 -0
- package/build/types/helpers/src/jsonschema/zod.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/command.d.ts +1969 -0
- package/build/types/helpers/src/protocol/command.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/createNodeMaps.d.ts +10 -0
- package/build/types/helpers/src/protocol/createNodeMaps.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/getCycles.d.ts +3 -0
- package/build/types/helpers/src/protocol/getCycles.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/getNodeOutputs.d.ts +4 -0
- package/build/types/helpers/src/protocol/getNodeOutputs.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/getPossiblePaths.d.ts +9 -0
- package/build/types/helpers/src/protocol/getPossiblePaths.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/identifyNode.d.ts +4 -0
- package/build/types/helpers/src/protocol/identifyNode.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/index.d.ts +10 -0
- package/build/types/helpers/src/protocol/index.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/node.d.ts +1014 -0
- package/build/types/helpers/src/protocol/node.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/nodes.d.ts +801 -0
- package/build/types/helpers/src/protocol/nodes.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/update.d.ts +3087 -0
- package/build/types/helpers/src/protocol/update.d.ts.map +1 -0
- package/build/types/helpers/src/utils.d.ts +14 -1
- package/build/types/helpers/src/utils.d.ts.map +1 -1
- package/build/types/task/src/createTask.d.ts +110 -0
- package/build/types/task/src/createTask.d.ts.map +1 -0
- package/build/types/task/src/index.d.ts +3 -81
- package/build/types/task/src/index.d.ts.map +1 -1
- package/build/types/task/src/types.d.ts +658 -41
- package/build/types/task/src/types.d.ts.map +1 -1
- package/build/types/task/src/utils/callbackToAsyncIterator.d.ts +1 -1
- package/build/types/task/src/utils/callbackToAsyncIterator.d.ts.map +1 -1
- package/build/types/task/src/utils/getAccessToken.d.ts +5 -0
- package/build/types/task/src/utils/getAccessToken.d.ts.map +1 -0
- package/build/types/task/src/utils/mapOutput.d.ts +2 -0
- package/build/types/task/src/utils/mapOutput.d.ts.map +1 -0
- package/build/types/task/src/watchTasks.d.ts +105 -0
- package/build/types/task/src/watchTasks.d.ts.map +1 -0
- package/package.json +8 -4
- package/build/chunk-s4kgf465.js +0 -67
- package/build/chunk-s4kgf465.js.map +0 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgBvB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGzB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKpB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG5B,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKzB,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUvB,CAAA;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export declare function matchSchema<Schema extends z.ZodSchema>(schema: Schema, input: unknown): input is z.infer<Schema>;
|
|
3
3
|
export declare function matchSchema<Schema extends z.ZodSchema>(schema: Schema): (input: unknown) => input is z.infer<Schema>;
|
|
4
|
+
export declare function isRecord(data: unknown): data is Record<string, unknown>;
|
|
5
|
+
type DataVistor<T> = (data: T, path: Array<string | number>) => Promise<any> | any;
|
|
6
|
+
interface DataVistors {
|
|
7
|
+
Null?: DataVistor<null>;
|
|
8
|
+
String?: DataVistor<string>;
|
|
9
|
+
Number?: DataVistor<number>;
|
|
10
|
+
Object?: DataVistor<object>;
|
|
11
|
+
Array?: DataVistor<Array<any>>;
|
|
12
|
+
Buffer?: DataVistor<Buffer>;
|
|
13
|
+
}
|
|
14
|
+
type HasPromiseVistor<T extends DataVistors, Then, Else> = T[keyof T] extends (...args: any[]) => any ? Promise<any> extends ReturnType<T[keyof T]> ? Then : Else : Else;
|
|
15
|
+
export declare function mapData<Output, Input = unknown, V extends DataVistors = DataVistors>(data: Input, visitors: V): HasPromiseVistor<V, Promise<unknown extends Output ? Input : Output>, unknown extends Output ? Input : Output>;
|
|
16
|
+
export {};
|
|
4
17
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../helpers/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts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G,GACJ,OAAO,CAAC,GAAG,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GACzC,IAAI,GACJ,IAAI,GACN,IAAI,CAAA;AAiBR,wBAAgB,OAAO,CACrB,MAAM,EACN,KAAK,GAAG,OAAO,EACf,CAAC,SAAS,WAAW,GAAG,WAAW,EAEnC,IAAI,EAAE,KAAK,EACX,QAAQ,EAAE,CAAC,GACV,gBAAgB,CACjB,CAAC,EACD,OAAO,CAAC,OAAO,SAAS,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC,EAChD,OAAO,SAAS,MAAM,GAAG,KAAK,GAAG,MAAM,CACxC,CAyDA"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { type CreateTaskOptions, type Result, type Update } from './types.ts';
|
|
2
|
+
export declare class TaskError extends Error {
|
|
3
|
+
readonly taskTemplate: string;
|
|
4
|
+
constructor(message: string, taskTemplate: string);
|
|
5
|
+
}
|
|
6
|
+
type TaskUpdateHandler = (update: Update) => void;
|
|
7
|
+
export declare function createTask<T extends keyof Requence.TaskTemplate | (string & {})>(options: CreateTaskOptions<T>, onUpdate?: TaskUpdateHandler): Promise<Result<T>> & AsyncIterable<{
|
|
8
|
+
type: "taskStart";
|
|
9
|
+
timestamp: Date;
|
|
10
|
+
taskId: string;
|
|
11
|
+
meta?: unknown;
|
|
12
|
+
input?: unknown;
|
|
13
|
+
} | {
|
|
14
|
+
type: "taskError";
|
|
15
|
+
timestamp: Date;
|
|
16
|
+
error: string;
|
|
17
|
+
taskId: string;
|
|
18
|
+
} | {
|
|
19
|
+
type: "taskEnd";
|
|
20
|
+
timestamp: Date;
|
|
21
|
+
taskId: string;
|
|
22
|
+
result: Record<string, unknown>;
|
|
23
|
+
partialResults: {
|
|
24
|
+
timestamp: Date | null;
|
|
25
|
+
node: {
|
|
26
|
+
type: "service";
|
|
27
|
+
id: string;
|
|
28
|
+
service?: {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
version: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
alias?: string | undefined;
|
|
34
|
+
} | {
|
|
35
|
+
type: "logic";
|
|
36
|
+
id: string;
|
|
37
|
+
alias?: string | undefined;
|
|
38
|
+
logic?: {
|
|
39
|
+
language: "javascript" | "python" | "typescript";
|
|
40
|
+
} | undefined;
|
|
41
|
+
};
|
|
42
|
+
data?: unknown;
|
|
43
|
+
error?: string | undefined;
|
|
44
|
+
}[];
|
|
45
|
+
} | {
|
|
46
|
+
type: "nodeStart";
|
|
47
|
+
timestamp: Date;
|
|
48
|
+
taskId: string;
|
|
49
|
+
node: {
|
|
50
|
+
type: "service";
|
|
51
|
+
id: string;
|
|
52
|
+
service?: {
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
version: string;
|
|
56
|
+
} | undefined;
|
|
57
|
+
alias?: string | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
type: "logic";
|
|
60
|
+
id: string;
|
|
61
|
+
alias?: string | undefined;
|
|
62
|
+
logic?: {
|
|
63
|
+
language: "javascript" | "python" | "typescript";
|
|
64
|
+
} | undefined;
|
|
65
|
+
};
|
|
66
|
+
} | {
|
|
67
|
+
type: "nodeUpdate";
|
|
68
|
+
timestamp: Date;
|
|
69
|
+
taskId: string;
|
|
70
|
+
data?: unknown;
|
|
71
|
+
} | {
|
|
72
|
+
type: "nodeError";
|
|
73
|
+
timestamp: Date;
|
|
74
|
+
error: string;
|
|
75
|
+
taskId: string;
|
|
76
|
+
} | {
|
|
77
|
+
type: "nodeDefer";
|
|
78
|
+
timestamp: Date;
|
|
79
|
+
taskId: string;
|
|
80
|
+
reason?: string | undefined;
|
|
81
|
+
} | {
|
|
82
|
+
type: "nodeEnd";
|
|
83
|
+
timestamp: Date;
|
|
84
|
+
taskId: string;
|
|
85
|
+
node: {
|
|
86
|
+
type: "service";
|
|
87
|
+
id: string;
|
|
88
|
+
service?: {
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
version: string;
|
|
92
|
+
} | undefined;
|
|
93
|
+
alias?: string | undefined;
|
|
94
|
+
} | {
|
|
95
|
+
type: "logic";
|
|
96
|
+
id: string;
|
|
97
|
+
alias?: string | undefined;
|
|
98
|
+
logic?: {
|
|
99
|
+
language: "javascript" | "python" | "typescript";
|
|
100
|
+
} | undefined;
|
|
101
|
+
};
|
|
102
|
+
}> & {
|
|
103
|
+
getTaskId(): Promise<string> & {
|
|
104
|
+
resolve: (value: string | PromiseLike<string>) => void;
|
|
105
|
+
reject: (reason?: any) => void;
|
|
106
|
+
promise: Promise<string>;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
export {};
|
|
110
|
+
//# sourceMappingURL=createTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTask.d.ts","sourceRoot":"","sources":["../../../../src/createTask.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,MAAM,EACX,KAAK,MAAM,EAEZ,MAAM,YAAY,CAAA;AAKnB,qBAAa,SAAU,SAAQ,KAAK;aAGhB,YAAY,EAAE,MAAM;gBADpC,OAAO,EAAE,MAAM,EACC,YAAY,EAAE,MAAM;CAIvC;AAED,KAAK,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;AAEjD,wBAAgB,UAAU,CACxB,CAAC,SAAS,MAAM,QAAQ,CAAC,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EACrD,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmN5D"}
|
|
@@ -1,82 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
constructor(message: string, taskTemplate: string);
|
|
5
|
-
}
|
|
6
|
-
type TaskUpdateHandler = (update: Update) => void;
|
|
7
|
-
export declare function createTask<T extends keyof Requence.TaskTemplate | (string & {})>(params: CreateTaskOptions<T>, onUpdate?: TaskUpdateHandler): Promise<Result<T>> & AsyncIterable<{
|
|
8
|
-
type: "taskStart";
|
|
9
|
-
timestamp: Date;
|
|
10
|
-
input?: unknown;
|
|
11
|
-
meta?: unknown;
|
|
12
|
-
} | {
|
|
13
|
-
type: "taskError";
|
|
14
|
-
timestamp: Date;
|
|
15
|
-
error: string;
|
|
16
|
-
} | {
|
|
17
|
-
type: "taskEnd";
|
|
18
|
-
timestamp: Date;
|
|
19
|
-
result: Record<string, unknown>;
|
|
20
|
-
partialResults: {
|
|
21
|
-
timestamp: Date | null;
|
|
22
|
-
node: {
|
|
23
|
-
type: "service";
|
|
24
|
-
id: string;
|
|
25
|
-
service?: {
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
version: string;
|
|
29
|
-
} | undefined;
|
|
30
|
-
alias?: string | undefined;
|
|
31
|
-
} | {
|
|
32
|
-
type: "logic";
|
|
33
|
-
id: string;
|
|
34
|
-
alias?: string | undefined;
|
|
35
|
-
logic?: {
|
|
36
|
-
language: "typescript" | "javascript" | "python";
|
|
37
|
-
} | undefined;
|
|
38
|
-
};
|
|
39
|
-
error?: string | undefined;
|
|
40
|
-
data?: unknown;
|
|
41
|
-
}[];
|
|
42
|
-
} | {
|
|
43
|
-
type: "nodeStart";
|
|
44
|
-
timestamp: Date;
|
|
45
|
-
node: {
|
|
46
|
-
type: "service";
|
|
47
|
-
id: string;
|
|
48
|
-
service?: {
|
|
49
|
-
id: string;
|
|
50
|
-
name: string;
|
|
51
|
-
version: string;
|
|
52
|
-
} | undefined;
|
|
53
|
-
alias?: string | undefined;
|
|
54
|
-
} | {
|
|
55
|
-
type: "logic";
|
|
56
|
-
id: string;
|
|
57
|
-
alias?: string | undefined;
|
|
58
|
-
logic?: {
|
|
59
|
-
language: "typescript" | "javascript" | "python";
|
|
60
|
-
} | undefined;
|
|
61
|
-
};
|
|
62
|
-
} | {
|
|
63
|
-
type: "nodeUpdate";
|
|
64
|
-
timestamp: Date;
|
|
65
|
-
data?: unknown;
|
|
66
|
-
} | {
|
|
67
|
-
type: "nodeError";
|
|
68
|
-
timestamp: Date;
|
|
69
|
-
error: string;
|
|
70
|
-
} | {
|
|
71
|
-
type: "nodeDefer";
|
|
72
|
-
timestamp: Date;
|
|
73
|
-
reason?: string | undefined;
|
|
74
|
-
}> & {
|
|
75
|
-
getTaskId(): Promise<string> & {
|
|
76
|
-
resolve: (value: string | PromiseLike<string>) => void;
|
|
77
|
-
reject: (reason?: any) => void;
|
|
78
|
-
promise: Promise<string>;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
export {};
|
|
1
|
+
export { createTask } from './createTask.ts';
|
|
2
|
+
export { watchTasks } from './watchTasks.ts';
|
|
3
|
+
export { RequenceFile, RequenceStream } from '../../helpers/src/files/index.js';
|
|
82
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA"}
|