@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.
@@ -1,102 +1,3 @@
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 & {})>(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":"AAMA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,MAAM,EACX,KAAK,MAAM,EAEZ,MAAM,YAAY,CAAA;AAGnB,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;AAOjD,wBAAgB,UAAU,CACxB,CAAC,SAAS,MAAM,QAAQ,CAAC,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EACrD,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoK3D"}
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"}