@requence/task 1.0.0-alpha.2 → 1.0.0-alpha.4
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 +13 -0
- package/build/{chunk-s4kgf465.js → chunk-6pjtq0hg.js} +4 -5
- package/build/{chunk-s4kgf465.js.map → chunk-6pjtq0hg.js.map} +5 -5
- package/build/cli.js +1 -1
- package/build/index.js +120 -44
- package/build/index.js.map +8 -6
- 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 +2 -101
- package/build/types/task/src/index.d.ts.map +1 -1
- package/build/types/task/src/types.d.ts +536 -24
- 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/watchTasks.d.ts +105 -0
- package/build/types/task/src/watchTasks.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -1,102 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
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 & {})>(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
|
-
type: "nodeEnd";
|
|
76
|
-
timestamp: Date;
|
|
77
|
-
node: {
|
|
78
|
-
type: "service";
|
|
79
|
-
id: string;
|
|
80
|
-
service?: {
|
|
81
|
-
id: string;
|
|
82
|
-
name: string;
|
|
83
|
-
version: string;
|
|
84
|
-
} | undefined;
|
|
85
|
-
alias?: string | undefined;
|
|
86
|
-
} | {
|
|
87
|
-
type: "logic";
|
|
88
|
-
id: string;
|
|
89
|
-
alias?: string | undefined;
|
|
90
|
-
logic?: {
|
|
91
|
-
language: "typescript" | "javascript" | "python";
|
|
92
|
-
} | undefined;
|
|
93
|
-
};
|
|
94
|
-
}> & {
|
|
95
|
-
getTaskId(): Promise<string> & {
|
|
96
|
-
resolve: (value: string | PromiseLike<string>) => void;
|
|
97
|
-
reject: (reason?: any) => void;
|
|
98
|
-
promise: Promise<string>;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
export {};
|
|
1
|
+
export { createTask } from './createTask.ts';
|
|
2
|
+
export { watchTasks } from './watchTasks.ts';
|
|
102
3
|
//# 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"}
|