@ms-cloudpack/api-server 0.42.0 → 0.43.0
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/lib/apis/ensurePackageBundled.d.ts.map +1 -1
- package/lib/apis/ensurePackageBundled.js +1 -5
- package/lib/apis/ensurePackageBundled.js.map +1 -1
- package/lib/apis/index.d.ts +2 -0
- package/lib/apis/index.d.ts.map +1 -1
- package/lib/apis/index.js +2 -0
- package/lib/apis/index.js.map +1 -1
- package/lib/apis/openCodeEditor.d.ts +4 -4
- package/lib/apis/restartAllTasks.d.ts +19 -0
- package/lib/apis/restartAllTasks.d.ts.map +1 -0
- package/lib/apis/restartAllTasks.js +19 -0
- package/lib/apis/restartAllTasks.js.map +1 -0
- package/lib/apis/restartTask.d.ts +38 -0
- package/lib/apis/restartTask.d.ts.map +1 -0
- package/lib/apis/restartTask.js +19 -0
- package/lib/apis/restartTask.js.map +1 -0
- package/lib/common/createPartialApiContext.d.ts.map +1 -1
- package/lib/common/createPartialApiContext.js +5 -1
- package/lib/common/createPartialApiContext.js.map +1 -1
- package/lib/common/createSession.d.ts.map +1 -1
- package/lib/common/createSession.js +2 -6
- package/lib/common/createSession.js.map +1 -1
- package/lib/data/busSources.d.ts +42 -36
- package/lib/data/busSources.d.ts.map +1 -1
- package/lib/data/busSources.js +2 -4
- package/lib/data/busSources.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/startApiServer.d.ts.map +1 -1
- package/lib/startApiServer.js +11 -73
- package/lib/startApiServer.js.map +1 -1
- package/lib/trpc/createAppRouter.d.ts +36 -2
- package/lib/trpc/createAppRouter.d.ts.map +1 -1
- package/lib/trpc/createCloudpackClient.d.ts +1 -1
- package/lib/trpc/createCloudpackClient.d.ts.map +1 -1
- package/lib/trpc/createCloudpackClient.js +3 -3
- package/lib/trpc/createCloudpackClient.js.map +1 -1
- package/lib/trpc/createCloudpackServer.d.ts +6 -1
- package/lib/trpc/createCloudpackServer.d.ts.map +1 -1
- package/lib/trpc/createContextFactory.js +1 -1
- package/lib/trpc/createContextFactory.js.map +1 -1
- package/lib/trpc/httpAdapter.d.ts.map +1 -1
- package/lib/trpc/httpAdapter.js +2 -1
- package/lib/trpc/httpAdapter.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/types/Context.d.ts +8 -0
- package/lib/types/Context.d.ts.map +1 -1
- package/lib/types/Context.js.map +1 -1
- package/lib/types/Session.d.ts +11 -13
- package/lib/types/Session.d.ts.map +1 -1
- package/lib/types/Session.js.map +1 -1
- package/lib/types/TaskDescription.d.ts +23 -20
- package/lib/types/TaskDescription.d.ts.map +1 -1
- package/lib/types/TaskList.d.ts +392 -0
- package/lib/types/TaskList.d.ts.map +1 -0
- package/lib/types/TaskList.js +6 -0
- package/lib/types/TaskList.js.map +1 -0
- package/lib/types/TaskRunnerContext.d.ts +3 -0
- package/lib/types/TaskRunnerContext.d.ts.map +1 -0
- package/lib/types/TaskRunnerContext.js +2 -0
- package/lib/types/TaskRunnerContext.js.map +1 -0
- package/lib/utilities/TaskRunner.d.ts +19 -6
- package/lib/utilities/TaskRunner.d.ts.map +1 -1
- package/lib/utilities/TaskRunner.js +94 -18
- package/lib/utilities/TaskRunner.js.map +1 -1
- package/lib/utilities/addOverride.js +3 -3
- package/lib/utilities/addOverride.js.map +1 -1
- package/lib/utilities/bundleTask.d.ts +8 -16
- package/lib/utilities/bundleTask.d.ts.map +1 -1
- package/lib/utilities/bundleTask.js +105 -115
- package/lib/utilities/bundleTask.js.map +1 -1
- package/lib/utilities/createBundleTask.d.ts +5 -21
- package/lib/utilities/createBundleTask.d.ts.map +1 -1
- package/lib/utilities/createBundleTask.js +16 -24
- package/lib/utilities/createBundleTask.js.map +1 -1
- package/lib/utilities/getDefaultTaskStats.d.ts +3 -0
- package/lib/utilities/getDefaultTaskStats.d.ts.map +1 -0
- package/lib/utilities/getDefaultTaskStats.js +8 -0
- package/lib/utilities/getDefaultTaskStats.js.map +1 -0
- package/lib/utilities/resolveDependenciesTask.d.ts +2 -6
- package/lib/utilities/resolveDependenciesTask.d.ts.map +1 -1
- package/lib/utilities/resolveDependenciesTask.js +1 -7
- package/lib/utilities/resolveDependenciesTask.js.map +1 -1
- package/lib/utilities/validateOverride.d.ts.map +1 -1
- package/lib/utilities/validateOverride.js +3 -2
- package/lib/utilities/validateOverride.js.map +1 -1
- package/package.json +12 -12
package/lib/types/Session.d.ts
CHANGED
|
@@ -16,16 +16,13 @@ export interface Session {
|
|
|
16
16
|
appPath: string;
|
|
17
17
|
/**
|
|
18
18
|
* The type of session controls how the code is served via start.
|
|
19
|
-
* Web apps require app server and asset hosting, while libraries
|
|
20
|
-
* only need a bundle service.
|
|
19
|
+
* Web apps require app server and asset hosting, while libraries only need a bundle service.
|
|
21
20
|
*/
|
|
22
21
|
type: 'web-app' | 'library';
|
|
23
22
|
/**
|
|
24
|
-
* The mode of the session controls how the code is bundled. Library
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* mode is fastest but packages must be complaint for loading in
|
|
28
|
-
* the browser.
|
|
23
|
+
* The mode of the session controls how the code is bundled. Library mode bundles each package
|
|
24
|
+
* in isolation, while development and production modes bundle the full app graph together.
|
|
25
|
+
* Library mode is fastest but packages must be compliant for loading in the browser.
|
|
29
26
|
*/
|
|
30
27
|
mode: 'library' | 'development' | 'production';
|
|
31
28
|
/**
|
|
@@ -33,17 +30,18 @@ export interface Session {
|
|
|
33
30
|
*/
|
|
34
31
|
resolveMap: ResolveMap;
|
|
35
32
|
/**
|
|
36
|
-
* Reload sequence to ensure that the client is always
|
|
37
|
-
* up to date with the latest changes.
|
|
33
|
+
* Reload sequence to ensure that the client is always up to date with the latest changes.
|
|
38
34
|
*/
|
|
39
35
|
sequence: number;
|
|
40
36
|
/**
|
|
41
|
-
*
|
|
37
|
+
* URLs of the active servers hosting this session.
|
|
38
|
+
* Each URL will only be set after the server is started.
|
|
42
39
|
*/
|
|
43
40
|
urls: {
|
|
44
|
-
appServer
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
appServer?: string;
|
|
42
|
+
/** If `useSingleWebServer` is enabled, this will be a URL for bundles under the app server. */
|
|
43
|
+
bundleServer?: string;
|
|
44
|
+
apiServer?: string;
|
|
47
45
|
};
|
|
48
46
|
/**
|
|
49
47
|
* Used to force a hard refresh on the client.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../src/types/Session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB
|
|
1
|
+
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../src/types/Session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAE5B;;;;OAIG;IACH,IAAI,EAAE,SAAS,GAAG,aAAa,GAAG,YAAY,CAAC;IAE/C;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,+FAA+F;QAC/F,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,uBAAuB,EAAE,MAAM,IAAI,CAAC;IAEpC;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEvC;;OAEG;IACH,sBAAsB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpD;;OAEG;IACH,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC"}
|
package/lib/types/Session.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../../src/types/Session.ts"],"names":[],"mappings":"","sourcesContent":["import type { ImportMap } from '@ms-cloudpack/import-map';\nimport type { ResolveMap } from '@ms-cloudpack/package-utilities';\nimport type { CloudpackConfig } from '@ms-cloudpack/common-types';\n\nexport interface Session {\n /**\n * The session id, used for identifying\n */\n id: string;\n\n /**\n * The config used by the session.\n */\n config: CloudpackConfig;\n\n /**\n * The primary application path to monitor.\n */\n appPath: string;\n\n /**\n * The type of session controls how the code is served via start.\n * Web apps require app server and asset hosting, while libraries
|
|
1
|
+
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../../src/types/Session.ts"],"names":[],"mappings":"","sourcesContent":["import type { ImportMap } from '@ms-cloudpack/import-map';\nimport type { ResolveMap } from '@ms-cloudpack/package-utilities';\nimport type { CloudpackConfig } from '@ms-cloudpack/common-types';\n\nexport interface Session {\n /**\n * The session id, used for identifying\n */\n id: string;\n\n /**\n * The config used by the session.\n */\n config: CloudpackConfig;\n\n /**\n * The primary application path to monitor.\n */\n appPath: string;\n\n /**\n * The type of session controls how the code is served via start.\n * Web apps require app server and asset hosting, while libraries only need a bundle service.\n */\n type: 'web-app' | 'library';\n\n /**\n * The mode of the session controls how the code is bundled. Library mode bundles each package\n * in isolation, while development and production modes bundle the full app graph together.\n * Library mode is fastest but packages must be compliant for loading in the browser.\n */\n mode: 'library' | 'development' | 'production';\n\n /**\n * Used to resolve packages in the dependency graph.\n */\n resolveMap: ResolveMap;\n\n /**\n * Reload sequence to ensure that the client is always up to date with the latest changes.\n */\n sequence: number;\n\n /**\n * URLs of the active servers hosting this session.\n * Each URL will only be set after the server is started.\n */\n urls: {\n appServer?: string;\n /** If `useSingleWebServer` is enabled, this will be a URL for bundles under the app server. */\n bundleServer?: string;\n apiServer?: string;\n };\n\n /**\n * Used to force a hard refresh on the client.\n */\n sessionVersion: number;\n\n /**\n * Used to increment the session version by 1.\n */\n incrementSessionVersion: () => void;\n\n /**\n * The name of the project folder.\n * Used to differentiate between multiple projects.\n */\n projectName: string;\n\n /**\n * The version of each target.\n * Used to force a client cache refresh on a single target.\n */\n targetVersions: Record<string, number>;\n\n /**\n * Increments the version for the given target.\n */\n incrementTargetVersion: (inputPath: string) => void;\n\n /**\n * The import map for the session.\n */\n importMap: ImportMap | undefined;\n}\n"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
export declare const ZodTaskDescription: z.ZodObject<{
|
|
2
|
+
export declare const ZodTaskDescription: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3
3
|
status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"complete">]>>;
|
|
4
|
-
name: z.ZodOptional<z.ZodString>;
|
|
5
|
-
inputPath: z.ZodOptional<z.ZodString>;
|
|
6
|
-
outputPath: z.ZodOptional<z.ZodString>;
|
|
7
4
|
timings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8
5
|
name: z.ZodString;
|
|
9
6
|
start: z.ZodNumber;
|
|
@@ -23,6 +20,12 @@ export declare const ZodTaskDescription: z.ZodObject<{
|
|
|
23
20
|
startTime: z.ZodNumber;
|
|
24
21
|
durationMilliseconds: z.ZodOptional<z.ZodNumber>;
|
|
25
22
|
lastUpdated: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
}, {
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
name: z.ZodOptional<z.ZodString>;
|
|
26
|
+
inputPath: z.ZodOptional<z.ZodString>;
|
|
27
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}>, {
|
|
26
29
|
id: z.ZodString;
|
|
27
30
|
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
31
|
text: z.ZodString;
|
|
@@ -182,21 +185,13 @@ export declare const ZodTaskDescription: z.ZodObject<{
|
|
|
182
185
|
} | undefined;
|
|
183
186
|
}[] | undefined;
|
|
184
187
|
}>, "many">>;
|
|
185
|
-
}
|
|
188
|
+
}>, "strip", z.ZodTypeAny, {
|
|
186
189
|
id: string;
|
|
187
190
|
startTime: number;
|
|
188
191
|
status?: "pending" | "complete" | undefined;
|
|
189
192
|
name?: string | undefined;
|
|
190
193
|
inputPath?: string | undefined;
|
|
191
194
|
outputPath?: string | undefined;
|
|
192
|
-
timings?: {
|
|
193
|
-
name: string;
|
|
194
|
-
start: number;
|
|
195
|
-
end?: number | undefined;
|
|
196
|
-
threwException?: boolean | undefined;
|
|
197
|
-
}[] | undefined;
|
|
198
|
-
durationMilliseconds?: number | undefined;
|
|
199
|
-
lastUpdated?: number | undefined;
|
|
200
195
|
errors?: {
|
|
201
196
|
text: string;
|
|
202
197
|
source: string;
|
|
@@ -231,13 +226,6 @@ export declare const ZodTaskDescription: z.ZodObject<{
|
|
|
231
226
|
} | undefined;
|
|
232
227
|
}[] | undefined;
|
|
233
228
|
}[] | undefined;
|
|
234
|
-
}, {
|
|
235
|
-
id: string;
|
|
236
|
-
startTime: number;
|
|
237
|
-
status?: "pending" | "complete" | undefined;
|
|
238
|
-
name?: string | undefined;
|
|
239
|
-
inputPath?: string | undefined;
|
|
240
|
-
outputPath?: string | undefined;
|
|
241
229
|
timings?: {
|
|
242
230
|
name: string;
|
|
243
231
|
start: number;
|
|
@@ -246,6 +234,13 @@ export declare const ZodTaskDescription: z.ZodObject<{
|
|
|
246
234
|
}[] | undefined;
|
|
247
235
|
durationMilliseconds?: number | undefined;
|
|
248
236
|
lastUpdated?: number | undefined;
|
|
237
|
+
}, {
|
|
238
|
+
id: string;
|
|
239
|
+
startTime: number;
|
|
240
|
+
status?: "pending" | "complete" | undefined;
|
|
241
|
+
name?: string | undefined;
|
|
242
|
+
inputPath?: string | undefined;
|
|
243
|
+
outputPath?: string | undefined;
|
|
249
244
|
errors?: {
|
|
250
245
|
text: string;
|
|
251
246
|
source: string;
|
|
@@ -280,6 +275,14 @@ export declare const ZodTaskDescription: z.ZodObject<{
|
|
|
280
275
|
} | undefined;
|
|
281
276
|
}[] | undefined;
|
|
282
277
|
}[] | undefined;
|
|
278
|
+
timings?: {
|
|
279
|
+
name: string;
|
|
280
|
+
start: number;
|
|
281
|
+
end?: number | undefined;
|
|
282
|
+
threwException?: boolean | undefined;
|
|
283
|
+
}[] | undefined;
|
|
284
|
+
durationMilliseconds?: number | undefined;
|
|
285
|
+
lastUpdated?: number | undefined;
|
|
283
286
|
}>;
|
|
284
287
|
export type TaskDescription = z.infer<typeof ZodTaskDescription>;
|
|
285
288
|
//# sourceMappingURL=TaskDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskDescription.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"TaskDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskDescription.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASO,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ZodTaskList: z.ZodObject<{
|
|
3
|
+
tasks: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
4
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"complete">]>>;
|
|
5
|
+
timings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
start: z.ZodNumber;
|
|
8
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
threwException: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
start: number;
|
|
13
|
+
end?: number | undefined;
|
|
14
|
+
threwException?: boolean | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
name: string;
|
|
17
|
+
start: number;
|
|
18
|
+
end?: number | undefined;
|
|
19
|
+
threwException?: boolean | undefined;
|
|
20
|
+
}>, "many">>;
|
|
21
|
+
startTime: z.ZodNumber;
|
|
22
|
+
durationMilliseconds: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
lastUpdated: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
}, {
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
name: z.ZodOptional<z.ZodString>;
|
|
27
|
+
inputPath: z.ZodOptional<z.ZodString>;
|
|
28
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}>, {
|
|
30
|
+
id: z.ZodString;
|
|
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">>;
|
|
110
|
+
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">>;
|
|
189
|
+
}>, "strip", z.ZodTypeAny, {
|
|
190
|
+
id: string;
|
|
191
|
+
startTime: number;
|
|
192
|
+
status?: "pending" | "complete" | undefined;
|
|
193
|
+
name?: string | undefined;
|
|
194
|
+
inputPath?: string | undefined;
|
|
195
|
+
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;
|
|
230
|
+
timings?: {
|
|
231
|
+
name: string;
|
|
232
|
+
start: number;
|
|
233
|
+
end?: number | undefined;
|
|
234
|
+
threwException?: boolean | undefined;
|
|
235
|
+
}[] | undefined;
|
|
236
|
+
durationMilliseconds?: number | undefined;
|
|
237
|
+
lastUpdated?: number | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
id: string;
|
|
240
|
+
startTime: number;
|
|
241
|
+
status?: "pending" | "complete" | undefined;
|
|
242
|
+
name?: string | undefined;
|
|
243
|
+
inputPath?: string | undefined;
|
|
244
|
+
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;
|
|
279
|
+
timings?: {
|
|
280
|
+
name: string;
|
|
281
|
+
start: number;
|
|
282
|
+
end?: number | undefined;
|
|
283
|
+
threwException?: boolean | undefined;
|
|
284
|
+
}[] | undefined;
|
|
285
|
+
durationMilliseconds?: number | undefined;
|
|
286
|
+
lastUpdated?: number | undefined;
|
|
287
|
+
}>, "many">;
|
|
288
|
+
}, "strip", z.ZodTypeAny, {
|
|
289
|
+
tasks: {
|
|
290
|
+
id: string;
|
|
291
|
+
startTime: number;
|
|
292
|
+
status?: "pending" | "complete" | undefined;
|
|
293
|
+
name?: string | undefined;
|
|
294
|
+
inputPath?: string | undefined;
|
|
295
|
+
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;
|
|
330
|
+
timings?: {
|
|
331
|
+
name: string;
|
|
332
|
+
start: number;
|
|
333
|
+
end?: number | undefined;
|
|
334
|
+
threwException?: boolean | undefined;
|
|
335
|
+
}[] | undefined;
|
|
336
|
+
durationMilliseconds?: number | undefined;
|
|
337
|
+
lastUpdated?: number | undefined;
|
|
338
|
+
}[];
|
|
339
|
+
}, {
|
|
340
|
+
tasks: {
|
|
341
|
+
id: string;
|
|
342
|
+
startTime: number;
|
|
343
|
+
status?: "pending" | "complete" | undefined;
|
|
344
|
+
name?: string | undefined;
|
|
345
|
+
inputPath?: string | undefined;
|
|
346
|
+
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;
|
|
381
|
+
timings?: {
|
|
382
|
+
name: string;
|
|
383
|
+
start: number;
|
|
384
|
+
end?: number | undefined;
|
|
385
|
+
threwException?: boolean | undefined;
|
|
386
|
+
}[] | undefined;
|
|
387
|
+
durationMilliseconds?: number | undefined;
|
|
388
|
+
lastUpdated?: number | undefined;
|
|
389
|
+
}[];
|
|
390
|
+
}>;
|
|
391
|
+
export type TaskList = z.infer<typeof ZodTaskList>;
|
|
392
|
+
//# sourceMappingURL=TaskList.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskList.js","sourceRoot":"","sources":["../../src/types/TaskList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;CACnC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ZodTaskDescription } from './TaskDescription.js';\n\nexport const ZodTaskList = z.object({\n tasks: z.array(ZodTaskDescription),\n});\n\nexport type TaskList = z.infer<typeof ZodTaskList>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskRunnerContext.d.ts","sourceRoot":"","sources":["../../src/types/TaskRunnerContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,KAAK,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskRunnerContext.js","sourceRoot":"","sources":["../../src/types/TaskRunnerContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { Context } from './Context.js';\n\nexport type TaskRunnerContext = Pick<Context, 'reporter' | 'bus' | 'session'>;\n"]}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
1
|
import type { TaskOptions } from '../types/TaskOptions.js';
|
|
3
2
|
import type { Task } from '../types/Task.js';
|
|
4
|
-
import
|
|
3
|
+
import type { TaskRunnerContext } from '../types/TaskRunnerContext.js';
|
|
5
4
|
/**
|
|
6
5
|
* TaskRunner class manages the state of Tasks.
|
|
7
6
|
* This class is to be called by the api server.
|
|
8
7
|
*/
|
|
9
|
-
export declare class TaskRunner
|
|
8
|
+
export declare class TaskRunner {
|
|
9
|
+
private _context;
|
|
10
10
|
private _queue;
|
|
11
|
+
private _taskStats;
|
|
11
12
|
private _pendingTasks;
|
|
12
13
|
private _completedTasks;
|
|
13
14
|
private _requiresRerun;
|
|
14
15
|
private _prevTasks;
|
|
15
|
-
constructor();
|
|
16
|
+
constructor(context?: TaskRunnerContext);
|
|
16
17
|
/**
|
|
17
18
|
* The add method enqueues a Task and returns its Promise.
|
|
18
19
|
* If a Task with the same id has already been processed,
|
|
@@ -30,9 +31,21 @@ export declare class TaskRunner extends EventEmitter {
|
|
|
30
31
|
* to clear the TaskRunner's state before reloading the page.
|
|
31
32
|
*/
|
|
32
33
|
remove(id: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* The clear method disposes all tasks and clears the TaskRunner.
|
|
36
|
+
*/
|
|
37
|
+
clear(): void;
|
|
33
38
|
/** Pauses the TaskRunner (for testing). */
|
|
34
|
-
|
|
39
|
+
_pause(): void;
|
|
35
40
|
/** Starts or resumes the TaskRunner (for testing). */
|
|
36
|
-
|
|
41
|
+
_start(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Internal method to report the start of a task to the bus.
|
|
44
|
+
*/
|
|
45
|
+
private _reportStart;
|
|
46
|
+
/**
|
|
47
|
+
* Internal method to report the end of a task to the bus.
|
|
48
|
+
*/
|
|
49
|
+
private _reportEnd;
|
|
37
50
|
}
|
|
38
51
|
//# sourceMappingURL=TaskRunner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskRunner.d.ts","sourceRoot":"","sources":["../../src/utilities/TaskRunner.ts"],"names":[],"mappings":"
|
|
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;IA6E1E;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAaxB;;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"}
|