@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
@@ -59,163 +59,17 @@ export declare const taskListSource: DataBusPath<z.ZodObject<{
59
59
  }>, {
60
60
  id: z.ZodString;
61
61
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
62
- text: z.ZodString;
63
- source: z.ZodString;
64
- location: z.ZodOptional<z.ZodObject<{
65
- file: z.ZodString;
66
- line: z.ZodOptional<z.ZodNumber>;
67
- column: z.ZodOptional<z.ZodNumber>;
68
- }, "strip", z.ZodTypeAny, {
69
- file: string;
70
- line?: number | undefined;
71
- column?: number | undefined;
72
- }, {
73
- file: string;
74
- line?: number | undefined;
75
- column?: number | undefined;
76
- }>>;
77
- notes: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
- text: z.ZodString;
79
- location: z.ZodOptional<z.ZodObject<{
80
- file: z.ZodString;
81
- line: z.ZodOptional<z.ZodNumber>;
82
- column: z.ZodOptional<z.ZodNumber>;
83
- }, "strip", z.ZodTypeAny, {
84
- file: string;
85
- line?: number | undefined;
86
- column?: number | undefined;
87
- }, {
88
- file: string;
89
- line?: number | undefined;
90
- column?: number | undefined;
91
- }>>;
92
- }, "strip", z.ZodTypeAny, {
93
- text: string;
94
- location?: {
95
- file: string;
96
- line?: number | undefined;
97
- column?: number | undefined;
98
- } | undefined;
99
- }, {
100
- text: string;
101
- location?: {
102
- file: string;
103
- line?: number | undefined;
104
- column?: number | undefined;
105
- } | undefined;
106
- }>, "many">>;
107
- }, "strip", z.ZodTypeAny, {
108
- text: string;
109
- source: string;
110
- location?: {
111
- file: string;
112
- line?: number | undefined;
113
- column?: number | undefined;
114
- } | undefined;
115
- notes?: {
116
- text: string;
117
- location?: {
118
- file: string;
119
- line?: number | undefined;
120
- column?: number | undefined;
121
- } | undefined;
122
- }[] | undefined;
123
- }, {
124
- text: string;
125
- source: string;
126
- location?: {
127
- file: string;
128
- line?: number | undefined;
129
- column?: number | undefined;
130
- } | undefined;
131
- notes?: {
132
- text: string;
133
- location?: {
134
- file: string;
135
- line?: number | undefined;
136
- column?: number | undefined;
137
- } | undefined;
138
- }[] | undefined;
139
- }>, "many">>;
62
+ text: z.ZodType<string, z.ZodTypeDef, string>;
63
+ source: z.ZodType<string, z.ZodTypeDef, string>;
64
+ location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
65
+ notes: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined>;
66
+ }, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").BundleMessage, import("@ms-cloudpack/common-types").BundleMessage>, "many">>;
140
67
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
141
- text: z.ZodString;
142
- source: z.ZodString;
143
- location: z.ZodOptional<z.ZodObject<{
144
- file: z.ZodString;
145
- line: z.ZodOptional<z.ZodNumber>;
146
- column: z.ZodOptional<z.ZodNumber>;
147
- }, "strip", z.ZodTypeAny, {
148
- file: string;
149
- line?: number | undefined;
150
- column?: number | undefined;
151
- }, {
152
- file: string;
153
- line?: number | undefined;
154
- column?: number | undefined;
155
- }>>;
156
- notes: z.ZodOptional<z.ZodArray<z.ZodObject<{
157
- text: z.ZodString;
158
- location: z.ZodOptional<z.ZodObject<{
159
- file: z.ZodString;
160
- line: z.ZodOptional<z.ZodNumber>;
161
- column: z.ZodOptional<z.ZodNumber>;
162
- }, "strip", z.ZodTypeAny, {
163
- file: string;
164
- line?: number | undefined;
165
- column?: number | undefined;
166
- }, {
167
- file: string;
168
- line?: number | undefined;
169
- column?: number | undefined;
170
- }>>;
171
- }, "strip", z.ZodTypeAny, {
172
- text: string;
173
- location?: {
174
- file: string;
175
- line?: number | undefined;
176
- column?: number | undefined;
177
- } | undefined;
178
- }, {
179
- text: string;
180
- location?: {
181
- file: string;
182
- line?: number | undefined;
183
- column?: number | undefined;
184
- } | undefined;
185
- }>, "many">>;
186
- }, "strip", z.ZodTypeAny, {
187
- text: string;
188
- source: string;
189
- location?: {
190
- file: string;
191
- line?: number | undefined;
192
- column?: number | undefined;
193
- } | undefined;
194
- notes?: {
195
- text: string;
196
- location?: {
197
- file: string;
198
- line?: number | undefined;
199
- column?: number | undefined;
200
- } | undefined;
201
- }[] | undefined;
202
- }, {
203
- text: string;
204
- source: string;
205
- location?: {
206
- file: string;
207
- line?: number | undefined;
208
- column?: number | undefined;
209
- } | undefined;
210
- notes?: {
211
- text: string;
212
- location?: {
213
- file: string;
214
- line?: number | undefined;
215
- column?: number | undefined;
216
- } | undefined;
217
- }[] | undefined;
218
- }>, "many">>;
68
+ text: z.ZodType<string, z.ZodTypeDef, string>;
69
+ source: z.ZodType<string, z.ZodTypeDef, string>;
70
+ location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
71
+ notes: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined>;
72
+ }, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").BundleMessage, import("@ms-cloudpack/common-types").BundleMessage>, "many">>;
219
73
  }>, "strip", z.ZodTypeAny, {
220
74
  id: string;
221
75
  startTime: number;
@@ -223,40 +77,8 @@ export declare const taskListSource: DataBusPath<z.ZodObject<{
223
77
  name?: string | undefined;
224
78
  inputPath?: string | undefined;
225
79
  outputPath?: string | undefined;
226
- errors?: {
227
- text: string;
228
- source: string;
229
- location?: {
230
- file: string;
231
- line?: number | undefined;
232
- column?: number | undefined;
233
- } | undefined;
234
- notes?: {
235
- text: string;
236
- location?: {
237
- file: string;
238
- line?: number | undefined;
239
- column?: number | undefined;
240
- } | undefined;
241
- }[] | undefined;
242
- }[] | undefined;
243
- warnings?: {
244
- text: string;
245
- source: string;
246
- location?: {
247
- file: string;
248
- line?: number | undefined;
249
- column?: number | undefined;
250
- } | undefined;
251
- notes?: {
252
- text: string;
253
- location?: {
254
- file: string;
255
- line?: number | undefined;
256
- column?: number | undefined;
257
- } | undefined;
258
- }[] | undefined;
259
- }[] | undefined;
80
+ errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
81
+ warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
260
82
  timings?: {
261
83
  name: string;
262
84
  start: number;
@@ -272,40 +94,8 @@ export declare const taskListSource: DataBusPath<z.ZodObject<{
272
94
  name?: string | undefined;
273
95
  inputPath?: string | undefined;
274
96
  outputPath?: string | undefined;
275
- errors?: {
276
- text: string;
277
- source: string;
278
- location?: {
279
- file: string;
280
- line?: number | undefined;
281
- column?: number | undefined;
282
- } | undefined;
283
- notes?: {
284
- text: string;
285
- location?: {
286
- file: string;
287
- line?: number | undefined;
288
- column?: number | undefined;
289
- } | undefined;
290
- }[] | undefined;
291
- }[] | undefined;
292
- warnings?: {
293
- text: string;
294
- source: string;
295
- location?: {
296
- file: string;
297
- line?: number | undefined;
298
- column?: number | undefined;
299
- } | undefined;
300
- notes?: {
301
- text: string;
302
- location?: {
303
- file: string;
304
- line?: number | undefined;
305
- column?: number | undefined;
306
- } | undefined;
307
- }[] | undefined;
308
- }[] | undefined;
97
+ errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
98
+ warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
309
99
  timings?: {
310
100
  name: string;
311
101
  start: number;
@@ -323,40 +113,8 @@ export declare const taskListSource: DataBusPath<z.ZodObject<{
323
113
  name?: string | undefined;
324
114
  inputPath?: string | undefined;
325
115
  outputPath?: string | undefined;
326
- errors?: {
327
- text: string;
328
- source: string;
329
- location?: {
330
- file: string;
331
- line?: number | undefined;
332
- column?: number | undefined;
333
- } | undefined;
334
- notes?: {
335
- text: string;
336
- location?: {
337
- file: string;
338
- line?: number | undefined;
339
- column?: number | undefined;
340
- } | undefined;
341
- }[] | undefined;
342
- }[] | undefined;
343
- warnings?: {
344
- text: string;
345
- source: string;
346
- location?: {
347
- file: string;
348
- line?: number | undefined;
349
- column?: number | undefined;
350
- } | undefined;
351
- notes?: {
352
- text: string;
353
- location?: {
354
- file: string;
355
- line?: number | undefined;
356
- column?: number | undefined;
357
- } | undefined;
358
- }[] | undefined;
359
- }[] | undefined;
116
+ errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
117
+ warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
360
118
  timings?: {
361
119
  name: string;
362
120
  start: number;
@@ -374,40 +132,8 @@ export declare const taskListSource: DataBusPath<z.ZodObject<{
374
132
  name?: string | undefined;
375
133
  inputPath?: string | undefined;
376
134
  outputPath?: string | undefined;
377
- errors?: {
378
- text: string;
379
- source: string;
380
- location?: {
381
- file: string;
382
- line?: number | undefined;
383
- column?: number | undefined;
384
- } | undefined;
385
- notes?: {
386
- text: string;
387
- location?: {
388
- file: string;
389
- line?: number | undefined;
390
- column?: number | undefined;
391
- } | undefined;
392
- }[] | undefined;
393
- }[] | undefined;
394
- warnings?: {
395
- text: string;
396
- source: string;
397
- location?: {
398
- file: string;
399
- line?: number | undefined;
400
- column?: number | undefined;
401
- } | undefined;
402
- notes?: {
403
- text: string;
404
- location?: {
405
- file: string;
406
- line?: number | undefined;
407
- column?: number | undefined;
408
- } | undefined;
409
- }[] | undefined;
410
- }[] | undefined;
135
+ errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
136
+ warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
411
137
  timings?: {
412
138
  name: string;
413
139
  start: number;
@@ -1 +1 @@
1
- {"version":3,"file":"busSources.d.ts","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,iBAAiB,0BAG5B,CAAC;AAEH;;GAEG;AACH,eAAO,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ts CHANGED
@@ -5,18 +5,18 @@ export type { TaskStats } from './types/TaskStats.js';
5
5
  export type { Task } from './types/Task.js';
6
6
  export type { TaskDescription } from './types/TaskDescription.js';
7
7
  export type { TaskEndDescription } from './types/TaskEndDescription.js';
8
+ export type { TaskList } from './types/TaskList.js';
8
9
  export type { TaskMessage } from './types/TaskMessage.js';
9
- export type { TaskOptions } from './types/TaskOptions.js';
10
10
  export type { TaskStartDescription } from './types/TaskStartDescription.js';
11
11
  export type { EnsurePackageBundledContext, EnsurePackageBundledResult } from './apis/ensurePackageBundled.js';
12
12
  export { TaskRunner } from './utilities/TaskRunner.js';
13
- export { errorEntrySource } from './data/busSources.js';
13
+ export { taskListSource, taskStatsSource, errorEntrySource } from './data/busSources.js';
14
14
  export { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';
15
15
  export { createCloudpackServer, type CloudpackServer } from './trpc/createCloudpackServer.js';
16
16
  export { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';
17
17
  export { getConsumedDependencies } from './utilities/getConsumedDependencies.js';
18
18
  export { getConsumedPaths } from './utilities/getConsumedPaths.js';
19
- export { createPartialApiContext, type LazyApiContextOptions } from './common/createPartialApiContext.js';
19
+ export { createApiContext, createPartialApiContext, type CreateApiContextOptions } from './common/createApiContext.js';
20
20
  export { addPackageOverride } from './apis/addPackageOverride.js';
21
21
  export { ensurePackageBundled } from './apis/ensurePackageBundled.js';
22
22
  export { syncDownload } from './apis/syncDownload.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,YAAY,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,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E,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
package/lib/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  export { TaskRunner } from './utilities/TaskRunner.js';
2
- export { errorEntrySource } from './data/busSources.js';
2
+ export { taskListSource, taskStatsSource, errorEntrySource } from './data/busSources.js';
3
3
  export { createCloudpackClient } from './trpc/createCloudpackClient.js';
4
4
  export { createCloudpackServer } from './trpc/createCloudpackServer.js';
5
5
  export { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';
6
6
  export { getConsumedDependencies } from './utilities/getConsumedDependencies.js';
7
7
  export { getConsumedPaths } from './utilities/getConsumedPaths.js';
8
8
  // Utilities
9
- export { createPartialApiContext } from './common/createPartialApiContext.js';
9
+ export { createApiContext, createPartialApiContext } from './common/createApiContext.js';
10
10
  // API methods directly used outside this package
11
11
  export { addPackageOverride } from './apis/addPackageOverride.js';
12
12
  export { ensurePackageBundled } from './apis/ensurePackageBundled.js';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,YAAY;AACZ,OAAO,EAAE,uBAAuB,EAA8B,MAAM,qCAAqC,CAAC;AAE1G,iDAAiD;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export type { Context, PartialContext } from './types/Context.js';\nexport type { BundleInfo, BundleEntryInfo, BundleEntryConsumes } from './types/BundleInfo.js';\nexport type { Session } from '@ms-cloudpack/common-types';\nexport type { TaskStats } from './types/TaskStats.js';\nexport type { Task } from './types/Task.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskEndDescription } from './types/TaskEndDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskOptions } from './types/TaskOptions.js';\nexport type { TaskStartDescription } from './types/TaskStartDescription.js';\nexport type { EnsurePackageBundledContext, EnsurePackageBundledResult } from './apis/ensurePackageBundled.js';\n\nexport { TaskRunner } from './utilities/TaskRunner.js';\nexport { errorEntrySource } from './data/busSources.js';\nexport { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';\nexport { createCloudpackServer, type CloudpackServer } from './trpc/createCloudpackServer.js';\nexport { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';\nexport { getConsumedDependencies } from './utilities/getConsumedDependencies.js';\nexport { getConsumedPaths } from './utilities/getConsumedPaths.js';\n\n// Utilities\nexport { createPartialApiContext, type LazyApiContextOptions } from './common/createPartialApiContext.js';\n\n// API methods directly used outside this package\nexport { addPackageOverride } from './apis/addPackageOverride.js';\nexport { ensurePackageBundled } from './apis/ensurePackageBundled.js';\nexport { syncDownload } from './apis/syncDownload.js';\nexport { syncUpload } from './apis/syncUpload.js';\nexport type { SyncResult } from './types/SyncResult.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,YAAY;AACZ,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAgC,MAAM,8BAA8B,CAAC;AAEvH,iDAAiD;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export type { Context, PartialContext } from './types/Context.js';\nexport type { BundleInfo, BundleEntryInfo, BundleEntryConsumes } from './types/BundleInfo.js';\nexport type { Session } from '@ms-cloudpack/common-types';\nexport type { TaskStats } from './types/TaskStats.js';\nexport type { Task } from './types/Task.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskEndDescription } from './types/TaskEndDescription.js';\nexport type { TaskList } from './types/TaskList.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskStartDescription } from './types/TaskStartDescription.js';\nexport type { EnsurePackageBundledContext, EnsurePackageBundledResult } from './apis/ensurePackageBundled.js';\n\nexport { TaskRunner } from './utilities/TaskRunner.js';\nexport { taskListSource, taskStatsSource, errorEntrySource } from './data/busSources.js';\nexport { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';\nexport { createCloudpackServer, type CloudpackServer } from './trpc/createCloudpackServer.js';\nexport { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';\nexport { getConsumedDependencies } from './utilities/getConsumedDependencies.js';\nexport { getConsumedPaths } from './utilities/getConsumedPaths.js';\n\n// Utilities\nexport { createApiContext, createPartialApiContext, type CreateApiContextOptions } from './common/createApiContext.js';\n\n// API methods directly used outside this package\nexport { addPackageOverride } from './apis/addPackageOverride.js';\nexport { ensurePackageBundled } from './apis/ensurePackageBundled.js';\nexport { syncDownload } from './apis/syncDownload.js';\nexport { syncUpload } from './apis/syncUpload.js';\nexport type { SyncResult } from './types/SyncResult.js';\n"]}
@@ -5,19 +5,21 @@ import type { TaskReporter } from '@ms-cloudpack/task-reporter';
5
5
  import type { TelemetryClient } from '@ms-cloudpack/telemetry';
6
6
  import type { TaskRunner } from '../utilities/TaskRunner.js';
7
7
  import type { RemoteCacheClient } from '@ms-cloudpack/remote-cache';
8
- /** Context for Cloudpack API server procedures. */
8
+ /** Context for Cloudpack API server procedures and other APIs. */
9
9
  export interface Context {
10
10
  session: Session;
11
11
  /** Data bus for sending notifications to the client. */
12
12
  bus: DataBus;
13
13
  telemetryClient: TelemetryClient;
14
14
  reporter: TaskReporter;
15
- watcher: Watcher;
15
+ /** Only used by `ensurePackageBundled`. */
16
+ watcher?: Watcher;
16
17
  packages: PackageDefinitionsCache;
17
18
  taskRunner: TaskRunner;
18
19
  packageHashes: PackageHashesCache;
19
20
  remoteCacheClient?: RemoteCacheClient;
20
- dispose(): void | Promise<void>;
21
+ /** Only set if `watcher` is initialized. */
22
+ dispose?: () => void | Promise<void>;
21
23
  }
22
24
  /**
23
25
  * Helper for partial context and session objects.
@@ -1 +1 @@
1
- {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../src/types/Context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACvG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;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AAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,kEAAkE;AAClE,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,GAAG,EAAE,OAAO,CAAC;IACb,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,YAAY,CAAC;IACvB,2CAA2C;IAE3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,uBAAuB,CAAC;IAClC,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,kBAAkB,CAAC;IAClC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,CACxB,YAAY,SAAS,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EACnD,YAAY,SAAS,MAAM,OAAO,IAChC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG;IAChC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;CACtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sourceRoot":"","sources":["../../src/types/Context.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageDefinitionsCache, PackageHashesCache, Session } from '@ms-cloudpack/common-types';\nimport type { DataBus } from '@ms-cloudpack/data-bus';\nimport type { Watcher } from '@ms-cloudpack/file-watcher';\nimport type { TaskReporter } from '@ms-cloudpack/task-reporter';\nimport type { TelemetryClient } from '@ms-cloudpack/telemetry';\nimport type { TaskRunner } from '../utilities/TaskRunner.js';\nimport type { RemoteCacheClient } from '@ms-cloudpack/remote-cache';\n\n/** Context for Cloudpack API server procedures. */\nexport interface Context {\n session: Session;\n /** Data bus for sending notifications to the client. */\n bus: DataBus;\n telemetryClient: TelemetryClient;\n reporter: TaskReporter;\n watcher: Watcher;\n packages: PackageDefinitionsCache;\n taskRunner: TaskRunner;\n packageHashes: PackageHashesCache;\n remoteCacheClient?: RemoteCacheClient;\n // This typically returns a promise. Allow a non-promise for convenience for tests.\n dispose(): void | Promise<void>;\n}\n\n/**\n * Helper for partial context and session objects.\n * First param is context keys and second is session keys.\n * (This can make it easier to tell which properties are actually used where.)\n */\nexport type PartialContext<\n TContextKeys extends keyof Omit<Context, 'session'>,\n TSessionKeys extends keyof Session,\n> = Pick<Context, TContextKeys> & {\n session: Pick<Session, TSessionKeys>;\n};\n"]}
1
+ {"version":3,"file":"Context.js","sourceRoot":"","sources":["../../src/types/Context.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageDefinitionsCache, PackageHashesCache, Session } from '@ms-cloudpack/common-types';\nimport type { DataBus } from '@ms-cloudpack/data-bus';\nimport type { Watcher } from '@ms-cloudpack/file-watcher';\nimport type { TaskReporter } from '@ms-cloudpack/task-reporter';\nimport type { TelemetryClient } from '@ms-cloudpack/telemetry';\nimport type { TaskRunner } from '../utilities/TaskRunner.js';\nimport type { RemoteCacheClient } from '@ms-cloudpack/remote-cache';\n\n/** Context for Cloudpack API server procedures and other APIs. */\nexport interface Context {\n session: Session;\n /** Data bus for sending notifications to the client. */\n bus: DataBus;\n telemetryClient: TelemetryClient;\n reporter: TaskReporter;\n /** Only used by `ensurePackageBundled`. */\n // TODO: split to a separate type for non-tRPC APIs\n watcher?: Watcher;\n packages: PackageDefinitionsCache;\n taskRunner: TaskRunner;\n packageHashes: PackageHashesCache;\n remoteCacheClient?: RemoteCacheClient;\n /** Only set if `watcher` is initialized. */\n dispose?: () => void | Promise<void>;\n}\n\n/**\n * Helper for partial context and session objects.\n * First param is context keys and second is session keys.\n * (This can make it easier to tell which properties are actually used where.)\n */\nexport type PartialContext<\n TContextKeys extends keyof Omit<Context, 'session'>,\n TSessionKeys extends keyof Session,\n> = Pick<Context, TContextKeys> & {\n session: Pick<Session, TSessionKeys>;\n};\n"]}