@ms-cloudpack/api-server 0.54.2 → 0.54.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restartAllTasks.d.ts","sourceRoot":"","sources":["../../src/apis/restartAllTasks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,wBAAsB,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,GAAG,YAAY,GAAG,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"restartAllTasks.d.ts","sourceRoot":"","sources":["../../src/apis/restartAllTasks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,wBAAsB,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,GAAG,YAAY,GAAG,iBAAiB,CAAC,iBAmBlH;yBAnBqB,eAAe;;;;;;;;;iCAsBk9E,cAAmB;kCAAqD,cAAmB;kCAAqD,cAAmB;mCAAsD,cAAmB"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import fsPromises from 'fs/promises';
|
|
2
2
|
import { publicProcedure } from '../trpc/common.js';
|
|
3
3
|
import { notifyReload } from '../utilities/notifyReload.js';
|
|
4
4
|
export async function restartAllTasks(params) {
|
|
5
5
|
const { ctx } = params;
|
|
6
6
|
const { session, bus, taskRunner, telemetryClient } = ctx;
|
|
7
7
|
console.debug('ApiServer: Restarting all tasks');
|
|
8
|
-
// Clear entire
|
|
9
|
-
|
|
8
|
+
// Clear entire cloudpack cache.
|
|
9
|
+
// TODO: should this really be clearing everything, even stuff not used for this app?
|
|
10
|
+
await fsPromises.rm(session.cachePath, { recursive: true });
|
|
11
|
+
await fsPromises.mkdir(session.cachePath, { recursive: true });
|
|
10
12
|
// All tasks can be removed as notifyReload()
|
|
11
13
|
// will cause the client to add the tasks again.
|
|
12
14
|
taskRunner.clear();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restartAllTasks.js","sourceRoot":"","sources":["../../src/apis/restartAllTasks.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"restartAllTasks.js","sourceRoot":"","sources":["../../src/apis/restartAllTasks.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAA6E;IACjH,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAE1D,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;IAEjD,gCAAgC;IAChC,qFAAqF;IACrF,MAAM,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,MAAM,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE/D,6CAA6C;IAC7C,gDAAgD;IAChD,UAAU,CAAC,KAAK,EAAE,CAAC;IAEnB,0BAA0B;IAC1B,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAElC,YAAY,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;AACnF,CAAC;AAED,eAAe,CAAC,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import fsPromises from 'fs/promises';\nimport { publicProcedure } from '../trpc/common.js';\nimport { notifyReload } from '../utilities/notifyReload.js';\nimport type { ApiParams } from '../types/ApiParams.js';\n\nexport async function restartAllTasks(params: ApiParams<void, 'session' | 'bus' | 'taskRunner' | 'telemetryClient'>) {\n const { ctx } = params;\n const { session, bus, taskRunner, telemetryClient } = ctx;\n\n console.debug('ApiServer: Restarting all tasks');\n\n // Clear entire cloudpack cache.\n // TODO: should this really be clearing everything, even stuff not used for this app?\n await fsPromises.rm(session.cachePath, { recursive: true });\n await fsPromises.mkdir(session.cachePath, { recursive: true });\n\n // All tasks can be removed as notifyReload()\n // will cause the client to add the tasks again.\n taskRunner.clear();\n\n // Update session version.\n session.incrementSessionVersion();\n\n notifyReload({ reason: 'restart-all-tasks' }, { bus, session, telemetryClient });\n}\n\nrestartAllTasks.procedure = publicProcedure.mutation(restartAllTasks);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/api-server",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.4",
|
|
4
4
|
"description": "An implementation of the API server that does interacts with a task scheduler.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"@lage-run/logger": "^1.3.0",
|
|
28
28
|
"@lage-run/scheduler": "^1.2.1",
|
|
29
29
|
"@lage-run/target-graph": "^0.8.9",
|
|
30
|
-
"@ms-cloudpack/bundler": "^0.23.
|
|
31
|
-
"@ms-cloudpack/common-types": "^0.
|
|
32
|
-
"@ms-cloudpack/config": "^0.31.
|
|
33
|
-
"@ms-cloudpack/create-express-app": "^1.
|
|
30
|
+
"@ms-cloudpack/bundler": "^0.23.5",
|
|
31
|
+
"@ms-cloudpack/common-types": "^0.22.0",
|
|
32
|
+
"@ms-cloudpack/config": "^0.31.3",
|
|
33
|
+
"@ms-cloudpack/create-express-app": "^1.10.0",
|
|
34
34
|
"@ms-cloudpack/data-bus": "^0.4.2",
|
|
35
35
|
"@ms-cloudpack/file-watcher": "^0.1.2",
|
|
36
|
-
"@ms-cloudpack/import-map": "^0.8.
|
|
37
|
-
"@ms-cloudpack/json-utilities": "^0.1.
|
|
38
|
-
"@ms-cloudpack/package-hashes": "^0.7.
|
|
39
|
-
"@ms-cloudpack/package-utilities": "^10.2.
|
|
36
|
+
"@ms-cloudpack/import-map": "^0.8.5",
|
|
37
|
+
"@ms-cloudpack/json-utilities": "^0.1.8",
|
|
38
|
+
"@ms-cloudpack/package-hashes": "^0.7.1",
|
|
39
|
+
"@ms-cloudpack/package-utilities": "^10.2.3",
|
|
40
40
|
"@ms-cloudpack/path-string-parsing": "^1.2.4",
|
|
41
|
-
"@ms-cloudpack/path-utilities": "^2.7.
|
|
42
|
-
"@ms-cloudpack/remote-cache": "^0.8.
|
|
41
|
+
"@ms-cloudpack/path-utilities": "^2.7.48",
|
|
42
|
+
"@ms-cloudpack/remote-cache": "^0.8.15",
|
|
43
43
|
"@ms-cloudpack/task-reporter": "^0.14.5",
|
|
44
44
|
"@ms-cloudpack/telemetry": "^0.6.3",
|
|
45
45
|
"@trpc/client": "^10.45.0",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"cors": "^2.8.5",
|
|
48
48
|
"es-module-lexer": "^1.4.1",
|
|
49
49
|
"filenamify": "^6.0.0",
|
|
50
|
-
"fs-extra": "^11.2.0",
|
|
51
50
|
"get-port": "^7.0.0",
|
|
52
51
|
"p-queue": "^8.0.1",
|
|
53
52
|
"source-map": "^0.7.0",
|