@ms-cloudpack/api-server 0.59.0 → 0.60.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.
Files changed (73) hide show
  1. package/lib/apis/ensurePackageBundled.d.ts +13 -7
  2. package/lib/apis/ensurePackageBundled.d.ts.map +1 -1
  3. package/lib/apis/ensurePackageBundled.js +8 -4
  4. package/lib/apis/ensurePackageBundled.js.map +1 -1
  5. package/lib/apis/syncUpload.d.ts +5 -2
  6. package/lib/apis/syncUpload.d.ts.map +1 -1
  7. package/lib/apis/syncUpload.js +1 -0
  8. package/lib/apis/syncUpload.js.map +1 -1
  9. package/lib/common/createApiContext.d.ts +29 -0
  10. package/lib/common/createApiContext.d.ts.map +1 -0
  11. package/lib/common/createApiContext.js +62 -0
  12. package/lib/common/createApiContext.js.map +1 -0
  13. package/lib/data/busSources.d.ts +18 -292
  14. package/lib/data/busSources.d.ts.map +1 -1
  15. package/lib/index.d.ts +3 -3
  16. package/lib/index.d.ts.map +1 -1
  17. package/lib/index.js +2 -2
  18. package/lib/index.js.map +1 -1
  19. package/lib/types/Context.d.ts +5 -3
  20. package/lib/types/Context.d.ts.map +1 -1
  21. package/lib/types/Context.js.map +1 -1
  22. package/lib/types/TaskDescription.d.ts +14 -224
  23. package/lib/types/TaskDescription.d.ts.map +1 -1
  24. package/lib/types/TaskDescription.js +2 -2
  25. package/lib/types/TaskDescription.js.map +1 -1
  26. package/lib/types/TaskEndDescription.d.ts +14 -224
  27. package/lib/types/TaskEndDescription.d.ts.map +1 -1
  28. package/lib/types/TaskList.d.ts +18 -292
  29. package/lib/types/TaskList.d.ts.map +1 -1
  30. package/lib/types/TaskMessage.d.ts +11 -108
  31. package/lib/types/TaskMessage.d.ts.map +1 -1
  32. package/lib/types/TaskMessage.js +3 -2
  33. package/lib/types/TaskMessage.js.map +1 -1
  34. package/lib/types/TaskMessageLocation.d.ts +6 -13
  35. package/lib/types/TaskMessageLocation.d.ts.map +1 -1
  36. package/lib/types/TaskMessageLocation.js +2 -1
  37. package/lib/types/TaskMessageLocation.js.map +1 -1
  38. package/lib/utilities/TaskRunner.d.ts +22 -11
  39. package/lib/utilities/TaskRunner.d.ts.map +1 -1
  40. package/lib/utilities/TaskRunner.js +24 -25
  41. package/lib/utilities/TaskRunner.js.map +1 -1
  42. package/lib/utilities/matchingZodObject.d.ts +4 -0
  43. package/lib/utilities/matchingZodObject.d.ts.map +1 -1
  44. package/lib/utilities/matchingZodObject.js +4 -0
  45. package/lib/utilities/matchingZodObject.js.map +1 -1
  46. package/lib/utilities/writeStubForDensityEntries.d.ts.map +1 -1
  47. package/lib/utilities/writeStubForDensityEntries.js +2 -1
  48. package/lib/utilities/writeStubForDensityEntries.js.map +1 -1
  49. package/package.json +2 -2
  50. package/lib/common/createPartialApiContext.d.ts +0 -17
  51. package/lib/common/createPartialApiContext.d.ts.map +0 -1
  52. package/lib/common/createPartialApiContext.js +0 -163
  53. package/lib/common/createPartialApiContext.js.map +0 -1
  54. package/lib/types/TaskOptions.d.ts +0 -6
  55. package/lib/types/TaskOptions.d.ts.map +0 -1
  56. package/lib/types/TaskOptions.js +0 -2
  57. package/lib/types/TaskOptions.js.map +0 -1
  58. package/lib/types/TaskResponse.d.ts +0 -337
  59. package/lib/types/TaskResponse.d.ts.map +0 -1
  60. package/lib/types/TaskResponse.js +0 -8
  61. package/lib/types/TaskResponse.js.map +0 -1
  62. package/lib/types/TaskResult.d.ts +0 -233
  63. package/lib/types/TaskResult.d.ts.map +0 -1
  64. package/lib/types/TaskResult.js +0 -7
  65. package/lib/types/TaskResult.js.map +0 -1
  66. package/lib/types/TaskRunnerContext.d.ts +0 -3
  67. package/lib/types/TaskRunnerContext.d.ts.map +0 -1
  68. package/lib/types/TaskRunnerContext.js +0 -2
  69. package/lib/types/TaskRunnerContext.js.map +0 -1
  70. package/lib/types/Timings.d.ts +0 -20
  71. package/lib/types/Timings.d.ts.map +0 -1
  72. package/lib/types/Timings.js +0 -5
  73. package/lib/types/Timings.js.map +0 -1
@@ -29,163 +29,17 @@ export declare const ZodTaskList: z.ZodObject<{
29
29
  }>, {
30
30
  id: z.ZodString;
31
31
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
32
- text: z.ZodString;
33
- source: z.ZodString;
34
- location: z.ZodOptional<z.ZodObject<{
35
- file: z.ZodString;
36
- line: z.ZodOptional<z.ZodNumber>;
37
- column: z.ZodOptional<z.ZodNumber>;
38
- }, "strip", z.ZodTypeAny, {
39
- file: string;
40
- line?: number | undefined;
41
- column?: number | undefined;
42
- }, {
43
- file: string;
44
- line?: number | undefined;
45
- column?: number | undefined;
46
- }>>;
47
- notes: z.ZodOptional<z.ZodArray<z.ZodObject<{
48
- text: z.ZodString;
49
- location: z.ZodOptional<z.ZodObject<{
50
- file: z.ZodString;
51
- line: z.ZodOptional<z.ZodNumber>;
52
- column: z.ZodOptional<z.ZodNumber>;
53
- }, "strip", z.ZodTypeAny, {
54
- file: string;
55
- line?: number | undefined;
56
- column?: number | undefined;
57
- }, {
58
- file: string;
59
- line?: number | undefined;
60
- column?: number | undefined;
61
- }>>;
62
- }, "strip", z.ZodTypeAny, {
63
- text: string;
64
- location?: {
65
- file: string;
66
- line?: number | undefined;
67
- column?: number | undefined;
68
- } | undefined;
69
- }, {
70
- text: string;
71
- location?: {
72
- file: string;
73
- line?: number | undefined;
74
- column?: number | undefined;
75
- } | undefined;
76
- }>, "many">>;
77
- }, "strip", z.ZodTypeAny, {
78
- text: string;
79
- source: string;
80
- location?: {
81
- file: string;
82
- line?: number | undefined;
83
- column?: number | undefined;
84
- } | undefined;
85
- notes?: {
86
- text: string;
87
- location?: {
88
- file: string;
89
- line?: number | undefined;
90
- column?: number | undefined;
91
- } | undefined;
92
- }[] | undefined;
93
- }, {
94
- text: string;
95
- source: string;
96
- location?: {
97
- file: string;
98
- line?: number | undefined;
99
- column?: number | undefined;
100
- } | undefined;
101
- notes?: {
102
- text: string;
103
- location?: {
104
- file: string;
105
- line?: number | undefined;
106
- column?: number | undefined;
107
- } | undefined;
108
- }[] | undefined;
109
- }>, "many">>;
32
+ text: z.ZodType<string, z.ZodTypeDef, string>;
33
+ source: z.ZodType<string, z.ZodTypeDef, string>;
34
+ location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
35
+ notes: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined>;
36
+ }, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").BundleMessage, import("@ms-cloudpack/common-types").BundleMessage>, "many">>;
110
37
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
111
- text: z.ZodString;
112
- source: z.ZodString;
113
- location: z.ZodOptional<z.ZodObject<{
114
- file: z.ZodString;
115
- line: z.ZodOptional<z.ZodNumber>;
116
- column: z.ZodOptional<z.ZodNumber>;
117
- }, "strip", z.ZodTypeAny, {
118
- file: string;
119
- line?: number | undefined;
120
- column?: number | undefined;
121
- }, {
122
- file: string;
123
- line?: number | undefined;
124
- column?: number | undefined;
125
- }>>;
126
- notes: z.ZodOptional<z.ZodArray<z.ZodObject<{
127
- text: z.ZodString;
128
- location: z.ZodOptional<z.ZodObject<{
129
- file: z.ZodString;
130
- line: z.ZodOptional<z.ZodNumber>;
131
- column: z.ZodOptional<z.ZodNumber>;
132
- }, "strip", z.ZodTypeAny, {
133
- file: string;
134
- line?: number | undefined;
135
- column?: number | undefined;
136
- }, {
137
- file: string;
138
- line?: number | undefined;
139
- column?: number | undefined;
140
- }>>;
141
- }, "strip", z.ZodTypeAny, {
142
- text: string;
143
- location?: {
144
- file: string;
145
- line?: number | undefined;
146
- column?: number | undefined;
147
- } | undefined;
148
- }, {
149
- text: string;
150
- location?: {
151
- file: string;
152
- line?: number | undefined;
153
- column?: number | undefined;
154
- } | undefined;
155
- }>, "many">>;
156
- }, "strip", z.ZodTypeAny, {
157
- text: string;
158
- source: string;
159
- location?: {
160
- file: string;
161
- line?: number | undefined;
162
- column?: number | undefined;
163
- } | undefined;
164
- notes?: {
165
- text: string;
166
- location?: {
167
- file: string;
168
- line?: number | undefined;
169
- column?: number | undefined;
170
- } | undefined;
171
- }[] | undefined;
172
- }, {
173
- text: string;
174
- source: string;
175
- location?: {
176
- file: string;
177
- line?: number | undefined;
178
- column?: number | undefined;
179
- } | undefined;
180
- notes?: {
181
- text: string;
182
- location?: {
183
- file: string;
184
- line?: number | undefined;
185
- column?: number | undefined;
186
- } | undefined;
187
- }[] | undefined;
188
- }>, "many">>;
38
+ text: z.ZodType<string, z.ZodTypeDef, string>;
39
+ source: z.ZodType<string, z.ZodTypeDef, string>;
40
+ location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
41
+ notes: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined>;
42
+ }, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").BundleMessage, import("@ms-cloudpack/common-types").BundleMessage>, "many">>;
189
43
  }>, "strip", z.ZodTypeAny, {
190
44
  id: string;
191
45
  startTime: number;
@@ -193,40 +47,8 @@ export declare const ZodTaskList: z.ZodObject<{
193
47
  name?: string | undefined;
194
48
  inputPath?: string | undefined;
195
49
  outputPath?: string | undefined;
196
- errors?: {
197
- text: string;
198
- source: string;
199
- location?: {
200
- file: string;
201
- line?: number | undefined;
202
- column?: number | undefined;
203
- } | undefined;
204
- notes?: {
205
- text: string;
206
- location?: {
207
- file: string;
208
- line?: number | undefined;
209
- column?: number | undefined;
210
- } | undefined;
211
- }[] | undefined;
212
- }[] | undefined;
213
- warnings?: {
214
- text: string;
215
- source: string;
216
- location?: {
217
- file: string;
218
- line?: number | undefined;
219
- column?: number | undefined;
220
- } | undefined;
221
- notes?: {
222
- text: string;
223
- location?: {
224
- file: string;
225
- line?: number | undefined;
226
- column?: number | undefined;
227
- } | undefined;
228
- }[] | undefined;
229
- }[] | undefined;
50
+ errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
51
+ warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
230
52
  timings?: {
231
53
  name: string;
232
54
  start: number;
@@ -242,40 +64,8 @@ export declare const ZodTaskList: z.ZodObject<{
242
64
  name?: string | undefined;
243
65
  inputPath?: string | undefined;
244
66
  outputPath?: string | undefined;
245
- errors?: {
246
- text: string;
247
- source: string;
248
- location?: {
249
- file: string;
250
- line?: number | undefined;
251
- column?: number | undefined;
252
- } | undefined;
253
- notes?: {
254
- text: string;
255
- location?: {
256
- file: string;
257
- line?: number | undefined;
258
- column?: number | undefined;
259
- } | undefined;
260
- }[] | undefined;
261
- }[] | undefined;
262
- warnings?: {
263
- text: string;
264
- source: string;
265
- location?: {
266
- file: string;
267
- line?: number | undefined;
268
- column?: number | undefined;
269
- } | undefined;
270
- notes?: {
271
- text: string;
272
- location?: {
273
- file: string;
274
- line?: number | undefined;
275
- column?: number | undefined;
276
- } | undefined;
277
- }[] | undefined;
278
- }[] | undefined;
67
+ errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
68
+ warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
279
69
  timings?: {
280
70
  name: string;
281
71
  start: number;
@@ -293,40 +83,8 @@ export declare const ZodTaskList: z.ZodObject<{
293
83
  name?: string | undefined;
294
84
  inputPath?: string | undefined;
295
85
  outputPath?: string | undefined;
296
- errors?: {
297
- text: string;
298
- source: string;
299
- location?: {
300
- file: string;
301
- line?: number | undefined;
302
- column?: number | undefined;
303
- } | undefined;
304
- notes?: {
305
- text: string;
306
- location?: {
307
- file: string;
308
- line?: number | undefined;
309
- column?: number | undefined;
310
- } | undefined;
311
- }[] | undefined;
312
- }[] | undefined;
313
- warnings?: {
314
- text: string;
315
- source: string;
316
- location?: {
317
- file: string;
318
- line?: number | undefined;
319
- column?: number | undefined;
320
- } | undefined;
321
- notes?: {
322
- text: string;
323
- location?: {
324
- file: string;
325
- line?: number | undefined;
326
- column?: number | undefined;
327
- } | undefined;
328
- }[] | undefined;
329
- }[] | undefined;
86
+ errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
87
+ warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
330
88
  timings?: {
331
89
  name: string;
332
90
  start: number;
@@ -344,40 +102,8 @@ export declare const ZodTaskList: z.ZodObject<{
344
102
  name?: string | undefined;
345
103
  inputPath?: string | undefined;
346
104
  outputPath?: string | undefined;
347
- errors?: {
348
- text: string;
349
- source: string;
350
- location?: {
351
- file: string;
352
- line?: number | undefined;
353
- column?: number | undefined;
354
- } | undefined;
355
- notes?: {
356
- text: string;
357
- location?: {
358
- file: string;
359
- line?: number | undefined;
360
- column?: number | undefined;
361
- } | undefined;
362
- }[] | undefined;
363
- }[] | undefined;
364
- warnings?: {
365
- text: string;
366
- source: string;
367
- location?: {
368
- file: string;
369
- line?: number | undefined;
370
- column?: number | undefined;
371
- } | undefined;
372
- notes?: {
373
- text: string;
374
- location?: {
375
- file: string;
376
- line?: number | undefined;
377
- column?: number | undefined;
378
- } | undefined;
379
- }[] | undefined;
380
- }[] | undefined;
105
+ errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
106
+ warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
381
107
  timings?: {
382
108
  name: string;
383
109
  start: number;
@@ -1 +1 @@
1
- {"version":3,"file":"TaskList.d.ts","sourceRoot":"","sources":["../../src/types/TaskList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"TaskList.d.ts","sourceRoot":"","sources":["../../src/types/TaskList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -1,112 +1,15 @@
1
1
  import z from 'zod';
2
+ import type { BundleMessage, BundleMessageNote } from '@ms-cloudpack/common-types';
3
+ export type TaskNote = BundleMessageNote;
2
4
  export declare const ZodTaskNote: z.ZodObject<{
3
- text: z.ZodString;
4
- location: z.ZodOptional<z.ZodObject<{
5
- file: z.ZodString;
6
- line: z.ZodOptional<z.ZodNumber>;
7
- column: z.ZodOptional<z.ZodNumber>;
8
- }, "strip", z.ZodTypeAny, {
9
- file: string;
10
- line?: number | undefined;
11
- column?: number | undefined;
12
- }, {
13
- file: string;
14
- line?: number | undefined;
15
- column?: number | undefined;
16
- }>>;
17
- }, "strip", z.ZodTypeAny, {
18
- text: string;
19
- location?: {
20
- file: string;
21
- line?: number | undefined;
22
- column?: number | undefined;
23
- } | undefined;
24
- }, {
25
- text: string;
26
- location?: {
27
- file: string;
28
- line?: number | undefined;
29
- column?: number | undefined;
30
- } | undefined;
31
- }>;
5
+ text: z.ZodType<string, z.ZodTypeDef, string>;
6
+ location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
7
+ }, "strict", z.ZodTypeAny, BundleMessageNote, BundleMessageNote>;
8
+ export type TaskMessage = BundleMessage;
32
9
  export declare const ZodTaskMessage: z.ZodObject<{
33
- text: z.ZodString;
34
- source: z.ZodString;
35
- location: z.ZodOptional<z.ZodObject<{
36
- file: z.ZodString;
37
- line: z.ZodOptional<z.ZodNumber>;
38
- column: z.ZodOptional<z.ZodNumber>;
39
- }, "strip", z.ZodTypeAny, {
40
- file: string;
41
- line?: number | undefined;
42
- column?: number | undefined;
43
- }, {
44
- file: string;
45
- line?: number | undefined;
46
- column?: number | undefined;
47
- }>>;
48
- notes: z.ZodOptional<z.ZodArray<z.ZodObject<{
49
- text: z.ZodString;
50
- location: z.ZodOptional<z.ZodObject<{
51
- file: z.ZodString;
52
- line: z.ZodOptional<z.ZodNumber>;
53
- column: z.ZodOptional<z.ZodNumber>;
54
- }, "strip", z.ZodTypeAny, {
55
- file: string;
56
- line?: number | undefined;
57
- column?: number | undefined;
58
- }, {
59
- file: string;
60
- line?: number | undefined;
61
- column?: number | undefined;
62
- }>>;
63
- }, "strip", z.ZodTypeAny, {
64
- text: string;
65
- location?: {
66
- file: string;
67
- line?: number | undefined;
68
- column?: number | undefined;
69
- } | undefined;
70
- }, {
71
- text: string;
72
- location?: {
73
- file: string;
74
- line?: number | undefined;
75
- column?: number | undefined;
76
- } | undefined;
77
- }>, "many">>;
78
- }, "strip", z.ZodTypeAny, {
79
- text: string;
80
- source: string;
81
- location?: {
82
- file: string;
83
- line?: number | undefined;
84
- column?: number | undefined;
85
- } | undefined;
86
- notes?: {
87
- text: string;
88
- location?: {
89
- file: string;
90
- line?: number | undefined;
91
- column?: number | undefined;
92
- } | undefined;
93
- }[] | undefined;
94
- }, {
95
- text: string;
96
- source: string;
97
- location?: {
98
- file: string;
99
- line?: number | undefined;
100
- column?: number | undefined;
101
- } | undefined;
102
- notes?: {
103
- text: string;
104
- location?: {
105
- file: string;
106
- line?: number | undefined;
107
- column?: number | undefined;
108
- } | undefined;
109
- }[] | undefined;
110
- }>;
111
- export type TaskMessage = z.infer<typeof ZodTaskMessage>;
10
+ text: z.ZodType<string, z.ZodTypeDef, string>;
11
+ source: z.ZodType<string, z.ZodTypeDef, string>;
12
+ location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
13
+ notes: z.ZodType<BundleMessageNote[] | undefined, z.ZodTypeDef, BundleMessageNote[] | undefined>;
14
+ }, "strict", z.ZodTypeAny, BundleMessage, BundleMessage>;
112
15
  //# sourceMappingURL=TaskMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TaskMessage.d.ts","sourceRoot":"","sources":["../../src/types/TaskMessage.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKzB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"TaskMessage.d.ts","sourceRoot":"","sources":["../../src/types/TaskMessage.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAInF,MAAM,MAAM,QAAQ,GAAG,iBAAiB,CAAC;AAEzC,eAAO,MAAM,WAAW;;;gEAGtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC;AAExC,eAAO,MAAM,cAAc;;;;;wDAKzB,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import z from 'zod';
2
2
  import { ZodTaskMessageLocation } from './TaskMessageLocation.js';
3
- export const ZodTaskNote = z.object({
3
+ import { matchingZodObject } from '../utilities/matchingZodObject.js';
4
+ export const ZodTaskNote = matchingZodObject({
4
5
  text: z.string(),
5
6
  location: ZodTaskMessageLocation.optional(),
6
7
  });
7
- export const ZodTaskMessage = z.object({
8
+ export const ZodTaskMessage = matchingZodObject({
8
9
  text: z.string(),
9
10
  source: z.string(),
10
11
  location: ZodTaskMessageLocation.optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"TaskMessage.js","sourceRoot":"","sources":["../../src/types/TaskMessage.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC","sourcesContent":["import z from 'zod';\nimport { ZodTaskMessageLocation } from './TaskMessageLocation.js';\n\nexport const ZodTaskNote = z.object({\n text: z.string(),\n location: ZodTaskMessageLocation.optional(),\n});\n\nexport const ZodTaskMessage = z.object({\n text: z.string(),\n source: z.string(),\n location: ZodTaskMessageLocation.optional(),\n notes: z.array(ZodTaskNote).optional(),\n});\n\nexport type TaskMessage = z.infer<typeof ZodTaskMessage>;\n"]}
1
+ {"version":3,"file":"TaskMessage.js","sourceRoot":"","sources":["../../src/types/TaskMessage.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAItE,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAW;IACrD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAc;IAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC","sourcesContent":["import z from 'zod';\nimport type { BundleMessage, BundleMessageNote } from '@ms-cloudpack/common-types';\nimport { ZodTaskMessageLocation } from './TaskMessageLocation.js';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\n\nexport type TaskNote = BundleMessageNote;\n\nexport const ZodTaskNote = matchingZodObject<TaskNote>({\n text: z.string(),\n location: ZodTaskMessageLocation.optional(),\n});\n\nexport type TaskMessage = BundleMessage;\n\nexport const ZodTaskMessage = matchingZodObject<TaskMessage>({\n text: z.string(),\n source: z.string(),\n location: ZodTaskMessageLocation.optional(),\n notes: z.array(ZodTaskNote).optional(),\n});\n"]}
@@ -1,16 +1,9 @@
1
1
  import z from 'zod';
2
+ import type { BundleMessageLocation } from '@ms-cloudpack/common-types';
3
+ export type TaskMessageLocation = BundleMessageLocation;
2
4
  export declare const ZodTaskMessageLocation: z.ZodObject<{
3
- file: z.ZodString;
4
- line: z.ZodOptional<z.ZodNumber>;
5
- column: z.ZodOptional<z.ZodNumber>;
6
- }, "strip", z.ZodTypeAny, {
7
- file: string;
8
- line?: number | undefined;
9
- column?: number | undefined;
10
- }, {
11
- file: string;
12
- line?: number | undefined;
13
- column?: number | undefined;
14
- }>;
15
- export type TaskMessageLocation = z.infer<typeof ZodTaskMessageLocation>;
5
+ file: z.ZodType<string, z.ZodTypeDef, string>;
6
+ line: z.ZodType<number | undefined, z.ZodTypeDef, number | undefined>;
7
+ column: z.ZodType<number | undefined, z.ZodTypeDef, number | undefined>;
8
+ }, "strict", z.ZodTypeAny, BundleMessageLocation, BundleMessageLocation>;
16
9
  //# sourceMappingURL=TaskMessageLocation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TaskMessageLocation.d.ts","sourceRoot":"","sources":["../../src/types/TaskMessageLocation.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"TaskMessageLocation.d.ts","sourceRoot":"","sources":["../../src/types/TaskMessageLocation.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGxE,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAExD,eAAO,MAAM,sBAAsB;;;;wEAIjC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import z from 'zod';
2
- export const ZodTaskMessageLocation = z.object({
2
+ import { matchingZodObject } from '../utilities/matchingZodObject.js';
3
+ export const ZodTaskMessageLocation = matchingZodObject({
3
4
  file: z.string(),
4
5
  line: z.number().optional(),
5
6
  column: z.number().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"TaskMessageLocation.js","sourceRoot":"","sources":["../../src/types/TaskMessageLocation.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC","sourcesContent":["import z from 'zod';\n\nexport const ZodTaskMessageLocation = z.object({\n file: z.string(),\n line: z.number().optional(),\n column: z.number().optional(),\n});\n\nexport type TaskMessageLocation = z.infer<typeof ZodTaskMessageLocation>;\n"]}
1
+ {"version":3,"file":"TaskMessageLocation.js","sourceRoot":"","sources":["../../src/types/TaskMessageLocation.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAItE,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAsB;IAC3E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC","sourcesContent":["import z from 'zod';\nimport type { BundleMessageLocation } from '@ms-cloudpack/common-types';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\n\nexport type TaskMessageLocation = BundleMessageLocation;\n\nexport const ZodTaskMessageLocation = matchingZodObject<TaskMessageLocation>({\n file: z.string(),\n line: z.number().optional(),\n column: z.number().optional(),\n});\n"]}
@@ -1,26 +1,37 @@
1
- import type { TaskOptions } from '../types/TaskOptions.js';
2
1
  import type { Task } from '../types/Task.js';
3
- import type { TaskRunnerContext } from '../types/TaskRunnerContext.js';
2
+ import type { DataBus } from '@ms-cloudpack/data-bus';
4
3
  /**
5
- * TaskRunner class manages the state of Tasks.
6
- * This class is to be called by the api server.
4
+ * TaskRunner tracks the status of tasks, manages concurrency, allows reusing task results,
5
+ * and sends notifications about task status to the data bus (currently just used for `start`).
6
+ *
7
+ * NOTE: To enable data bus notifications, you must call `connectToBus()`.
8
+ * `createApiContext` does this with the `taskRunner` passed in.
7
9
  */
8
10
  export declare class TaskRunner {
9
- private _context;
11
+ private _bus;
10
12
  private _queue;
11
13
  private _taskStats;
12
14
  private _pendingTasks;
13
15
  private _completedTasks;
14
16
  private _requiresRerun;
15
17
  private _prevTasks;
16
- constructor(context?: TaskRunnerContext);
18
+ constructor();
17
19
  /**
18
- * The add method enqueues a Task and returns its Promise.
19
- * If a Task with the same id has already been processed,
20
- * it returns either the result or the promise.
21
- * Rerun flag forces the Task to be run again.
20
+ * Connects the TaskRunner to the data bus. Tasks will still run without this, but they won't
21
+ * send any notifications to a client (which only matters if a client is listening, e.g.
22
+ * the browser while running `start`).
22
23
  */
23
- add<TReturn>(task: Task<TReturn>, options?: TaskOptions): Promise<TReturn>;
24
+ connectToBus(bus: DataBus): void;
25
+ /**
26
+ * Enqueue a task and return its result promise.
27
+ *
28
+ * If a task with the same `id` was already added, it returns either the previous result
29
+ * (if completed) or the promise (if pending). Pass `options.rerun` to force re-running.
30
+ */
31
+ add<TReturn>(task: Task<TReturn>, options?: {
32
+ rerun?: boolean;
33
+ priority?: number;
34
+ }): Promise<TReturn>;
24
35
  /**
25
36
  * The remove method disposes a task if available
26
37
  * and then removes it from the TaskRunner.
@@ -1 +1 @@
1
- {"version":3,"file":"TaskRunner.d.ts","sourceRoot":"","sources":["../../src/utilities/TaskRunner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAOvE;;;GAGG;AACH,qBAAa,UAAU;IAGrB,OAAO,CAAC,QAAQ,CAAgC;IAChD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAY;IAE9B,OAAO,CAAC,aAAa,CAA4B;IAEjD,OAAO,CAAC,eAAe,CAAmB;IAC1C,OAAO,CAAC,cAAc,CAAc;IAEpC,OAAO,CAAC,UAAU,CAAyB;gBAE/B,OAAO,CAAC,EAAE,iBAAiB;IAevC;;;;;OAKG;IACH,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAmE1E;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAkBxB;;OAEG;IACH,KAAK,IAAI,IAAI;IAYb,2CAA2C;IAC3C,MAAM,IAAI,IAAI;IAId,sDAAsD;IACtD,MAAM,IAAI,IAAI;IAId;;OAEG;IACH,OAAO,CAAC,YAAY;IAmCpB;;OAEG;IACH,OAAO,CAAC,UAAU;CA6BnB"}
1
+ {"version":3,"file":"TaskRunner.d.ts","sourceRoot":"","sources":["../../src/utilities/TaskRunner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAM7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;;;;GAMG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,IAAI,CAAsB;IAClC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,aAAa,CAAgC;IACrD,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,cAAc,CAAc;IAEpC,OAAO,CAAC,UAAU,CAAyB;;IAW3C;;;;OAIG;IACI,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAIvC;;;;;OAKG;IACH,GAAG,CAAC,OAAO,EACT,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,EACnB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GACA,OAAO,CAAC,OAAO,CAAC;IAiEnB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAgBxB;;OAEG;IACH,KAAK,IAAI,IAAI;IASb,2CAA2C;IAC3C,MAAM,IAAI,IAAI;IAId,sDAAsD;IACtD,MAAM,IAAI,IAAI;IAId;;OAEG;IACH,OAAO,CAAC,YAAY;IAoCpB;;OAEG;IACH,OAAO,CAAC,UAAU;CA8BnB"}