@ms-cloudpack/api-server 0.63.11 → 0.64.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/addPackageOverride.d.ts +1 -1
- package/lib/apis/addPackageOverride.js +7 -7
- package/lib/apis/addPackageOverride.js.map +1 -1
- package/lib/apis/ensurePackageBundled.js.map +1 -1
- package/lib/apis/getData.d.ts +7 -13
- package/lib/apis/getData.d.ts.map +1 -1
- package/lib/apis/getData.js +3 -4
- package/lib/apis/getData.js.map +1 -1
- package/lib/apis/getLinkConfig.d.ts +2 -2
- package/lib/apis/getLinkConfig.d.ts.map +1 -1
- package/lib/apis/getLinkConfig.js +3 -2
- package/lib/apis/getLinkConfig.js.map +1 -1
- package/lib/apis/getSessionId.d.ts +2 -6
- package/lib/apis/getSessionId.d.ts.map +1 -1
- package/lib/apis/getSessionId.js +3 -4
- package/lib/apis/getSessionId.js.map +1 -1
- package/lib/apis/linkPath.d.ts +29 -3
- package/lib/apis/linkPath.js +2 -2
- package/lib/apis/linkPath.js.map +1 -1
- package/lib/apis/notifyLinkChange.d.ts +2 -2
- package/lib/apis/notifyLinkChange.d.ts.map +1 -1
- package/lib/apis/notifyLinkChange.js +3 -2
- package/lib/apis/notifyLinkChange.js.map +1 -1
- package/lib/apis/onDataChanged.d.ts +7 -13
- package/lib/apis/onDataChanged.d.ts.map +1 -1
- package/lib/apis/onDataChanged.js +3 -7
- package/lib/apis/onDataChanged.js.map +1 -1
- package/lib/apis/openCodeEditor.d.ts +9 -19
- package/lib/apis/openCodeEditor.d.ts.map +1 -1
- package/lib/apis/openCodeEditor.js +6 -6
- package/lib/apis/openCodeEditor.js.map +1 -1
- package/lib/apis/openConfigEditor.d.ts +1 -1
- package/lib/apis/openConfigEditor.d.ts.map +1 -1
- package/lib/apis/openConfigEditor.js +3 -2
- package/lib/apis/openConfigEditor.js.map +1 -1
- package/lib/apis/openFilePath.d.ts +6 -12
- package/lib/apis/openFilePath.d.ts.map +1 -1
- package/lib/apis/openFilePath.js +4 -4
- package/lib/apis/openFilePath.js.map +1 -1
- package/lib/apis/publishData.d.ts +7 -13
- package/lib/apis/publishData.d.ts.map +1 -1
- package/lib/apis/publishData.js +3 -3
- package/lib/apis/publishData.js.map +1 -1
- package/lib/apis/reportSpan.d.ts +10 -20
- package/lib/apis/reportSpan.d.ts.map +1 -1
- package/lib/apis/reportSpan.js +5 -5
- package/lib/apis/reportSpan.js.map +1 -1
- package/lib/apis/restartAllTasks.d.ts +1 -1
- package/lib/apis/restartAllTasks.d.ts.map +1 -1
- package/lib/apis/restartAllTasks.js +14 -7
- package/lib/apis/restartAllTasks.js.map +1 -1
- package/lib/apis/restartTask.d.ts +4 -18
- package/lib/apis/restartTask.d.ts.map +1 -1
- package/lib/apis/restartTask.js +6 -5
- package/lib/apis/restartTask.js.map +1 -1
- package/lib/apis/unlinkPath.d.ts +29 -3
- package/lib/apis/unlinkPath.js +2 -2
- package/lib/apis/unlinkPath.js.map +1 -1
- package/lib/apis/validatePackageOverride.d.ts +1 -1
- package/lib/apis/validatePackageOverride.js +5 -8
- package/lib/apis/validatePackageOverride.js.map +1 -1
- package/lib/common/createApiContext.d.ts.map +1 -1
- package/lib/common/createApiContext.js +4 -1
- package/lib/common/createApiContext.js.map +1 -1
- package/lib/common/createMockContext.d.ts +16 -9
- package/lib/common/createMockContext.d.ts.map +1 -1
- package/lib/common/createMockContext.js +21 -16
- package/lib/common/createMockContext.js.map +1 -1
- package/lib/common/createMockSession.d.ts +1 -1
- package/lib/common/createMockSession.d.ts.map +1 -1
- package/lib/common/createMockSession.js.map +1 -1
- package/lib/common/createSession.d.ts +5 -1
- package/lib/common/createSession.d.ts.map +1 -1
- package/lib/common/createSession.js +1 -1
- package/lib/common/createSession.js.map +1 -1
- package/lib/data/busSources.d.ts +27 -240
- package/lib/data/busSources.d.ts.map +1 -1
- package/lib/data/busSources.js +2 -2
- package/lib/data/busSources.js.map +1 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/trpc/common.d.ts +41 -2
- package/lib/trpc/common.d.ts.map +1 -1
- package/lib/trpc/common.js +44 -3
- package/lib/trpc/common.js.map +1 -1
- package/lib/types/LinkPath.d.ts +16 -92
- package/lib/types/LinkPath.d.ts.map +1 -1
- package/lib/types/LinkPath.js +21 -17
- package/lib/types/LinkPath.js.map +1 -1
- package/lib/types/Task.d.ts +20 -12
- package/lib/types/Task.d.ts.map +1 -1
- package/lib/types/Task.js.map +1 -1
- package/lib/types/TaskDescription.d.ts +19 -73
- package/lib/types/TaskDescription.d.ts.map +1 -1
- package/lib/types/TaskDescription.js +15 -12
- package/lib/types/TaskDescription.js.map +1 -1
- package/lib/types/TaskList.d.ts +6 -115
- package/lib/types/TaskList.d.ts.map +1 -1
- package/lib/types/TaskList.js +3 -2
- package/lib/types/TaskList.js.map +1 -1
- package/lib/types/TaskMessage.d.ts +3 -11
- package/lib/types/TaskMessage.d.ts.map +1 -1
- package/lib/types/TaskMessage.js +4 -4
- package/lib/types/TaskMessage.js.map +1 -1
- package/lib/types/TaskMessageLocation.d.ts +2 -6
- package/lib/types/TaskMessageLocation.d.ts.map +1 -1
- package/lib/types/TaskMessageLocation.js +3 -3
- package/lib/types/TaskMessageLocation.js.map +1 -1
- package/lib/types/TaskStats.d.ts +26 -17
- package/lib/types/TaskStats.d.ts.map +1 -1
- package/lib/types/TaskStats.js +4 -3
- package/lib/types/TaskStats.js.map +1 -1
- package/lib/types/Timing.d.ts +8 -18
- package/lib/types/Timing.d.ts.map +1 -1
- package/lib/types/Timing.js +5 -8
- package/lib/types/Timing.js.map +1 -1
- package/lib/types/ZodGetLinkConfigOutput.d.ts +2 -2
- package/lib/types/ZodGetLinkConfigOutput.d.ts.map +1 -1
- package/lib/types/ZodGetLinkConfigOutput.js +12 -10
- package/lib/types/ZodGetLinkConfigOutput.js.map +1 -1
- package/lib/types/ZodNotifyLinkChangeInput.d.ts +12 -44
- package/lib/types/ZodNotifyLinkChangeInput.d.ts.map +1 -1
- package/lib/types/ZodNotifyLinkChangeInput.js +7 -3
- package/lib/types/ZodNotifyLinkChangeInput.js.map +1 -1
- package/lib/types/ZodResolveMap.d.ts +2 -2
- package/lib/types/ZodResolveMap.d.ts.map +1 -1
- package/lib/types/ZodResolveMap.js +6 -6
- package/lib/types/ZodResolveMap.js.map +1 -1
- package/lib/utilities/TaskRunner.d.ts +56 -18
- package/lib/utilities/TaskRunner.d.ts.map +1 -1
- package/lib/utilities/TaskRunner.js +176 -98
- package/lib/utilities/TaskRunner.js.map +1 -1
- package/lib/utilities/createBundleTask.d.ts.map +1 -1
- package/lib/utilities/createBundleTask.js +9 -15
- package/lib/utilities/createBundleTask.js.map +1 -1
- package/lib/utilities/matchingZodObject.d.ts +15 -9
- package/lib/utilities/matchingZodObject.d.ts.map +1 -1
- package/lib/utilities/matchingZodObject.js +16 -6
- package/lib/utilities/matchingZodObject.js.map +1 -1
- package/lib/utilities/notifyReload.d.ts.map +1 -1
- package/lib/utilities/notifyReload.js +2 -1
- package/lib/utilities/notifyReload.js.map +1 -1
- package/lib/utilities/waitForBusData.d.ts +2 -2
- package/lib/utilities/waitForBusData.d.ts.map +1 -1
- package/lib/utilities/waitForBusData.js.map +1 -1
- package/package.json +16 -16
- package/lib/types/TaskEndDescription.d.ts +0 -26
- package/lib/types/TaskEndDescription.d.ts.map +0 -1
- package/lib/types/TaskEndDescription.js +0 -8
- package/lib/types/TaskEndDescription.js.map +0 -1
- package/lib/types/TaskStartDescription.d.ts +0 -19
- package/lib/types/TaskStartDescription.d.ts.map +0 -1
- package/lib/types/TaskStartDescription.js +0 -8
- package/lib/types/TaskStartDescription.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"busSources.d.ts","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"busSources.d.ts","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAQhC;;GAEG;AACH,eAAO,MAAM,iBAAiB,uEAG5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,sLAG1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,qLAGzB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,uEAG3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;kBAG3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,+TAG3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe;;kBAG1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;kBAGzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;kBAGjC,CAAC"}
|
package/lib/data/busSources.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file is used in the browser,
|
|
2
2
|
// so it must only import types (ts and zod) to not trigger a trpc server error due to bad tree shaking.
|
|
3
|
-
import z from 'zod';
|
|
3
|
+
import { z } from 'zod/v4-mini';
|
|
4
4
|
import { ZodTaskStats } from '../types/TaskStats.js';
|
|
5
5
|
import { ZodTaskList } from '../types/TaskList.js';
|
|
6
6
|
import { createDataPath } from '@ms-cloudpack/data-bus';
|
|
@@ -69,6 +69,6 @@ export const linkDoneSource = createDataPath({
|
|
|
69
69
|
*/
|
|
70
70
|
export const linkDisconnectedSource = createDataPath({
|
|
71
71
|
path: ['link', 'disconnected'],
|
|
72
|
-
type: z.object({ reason: z.
|
|
72
|
+
type: z.object({ reason: z.literal(['lost', 'unreachable']) }),
|
|
73
73
|
});
|
|
74
74
|
//# sourceMappingURL=busSources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"busSources.js","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,wGAAwG;AACxG,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"busSources.js","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,wGAAwG;AACxG,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;IAC9C,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAU;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC;IAC5C,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAU;IAChC,IAAI,EAAE,YAAY;CACnB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;IAC3C,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAU;IAC/B,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAC7C,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,CAAU;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAC7C,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAU;IACjC,IAAI,EAAE,wBAAwB;CAC/B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAC7C,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAU;IACjC,IAAI,EAAE,sBAAsB;CAC7B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC;IAC5C,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAU;IAChC,IAAI,EAAE,gBAAgB;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;IAC3C,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAU;IAC/B,IAAI,EAAE,iBAAiB;CACxB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAAC;IACnD,IAAI,EAAE,CAAC,MAAM,EAAE,cAAc,CAAU;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC;CAC/D,CAAC,CAAC","sourcesContent":["// This file is used in the browser,\n// so it must only import types (ts and zod) to not trigger a trpc server error due to bad tree shaking.\nimport { z } from 'zod/v4-mini';\nimport { ZodTaskStats } from '../types/TaskStats.js';\nimport { ZodTaskList } from '../types/TaskList.js';\nimport { createDataPath } from '@ms-cloudpack/data-bus';\nimport { ZodNotifyLinkChangeInput } from '../types/ZodNotifyLinkChangeInput.js';\nimport { ZodLinkPathInput, ZodLinkPathOutput } from '../types/LinkPath.js';\nimport { ZodGetLinkConfigOutput } from '../types/ZodGetLinkConfigOutput.js';\n\n/**\n * Used for tracking the reload count.\n */\nexport const reloadCountSource = createDataPath({\n path: ['session', 'version'] as const,\n type: z.number(),\n});\n\n/**\n * Used for tracking the task stats displayed in the badge.\n */\nexport const taskStatsSource = createDataPath({\n path: ['task', 'stats'] as const,\n type: ZodTaskStats,\n});\n\n/**\n * Used for tracking the list of tasks.\n */\nexport const taskListSource = createDataPath({\n path: ['task', 'list'] as const,\n type: ZodTaskList,\n});\n\n/**\n * Used for tracking entry errors: `Failed to resolve module specifier \"${packageName}@${version}${filePath}\".`\n * This is used to display errors in the UI and to notify the user of the error when autoUpdateEntries is enabled.\n */\nexport const errorEntrySource = createDataPath({\n path: ['error', 'entry'] as const,\n type: z.string(),\n});\n\n/**\n * Used for tracking link updates.\n */\nexport const linkUpdateSource = createDataPath({\n path: ['link', 'update'] as const,\n type: ZodNotifyLinkChangeInput,\n});\n\n/**\n * Used for fetching the host configuration.\n */\nexport const linkConfigSource = createDataPath({\n path: ['link', 'config'] as const,\n type: ZodGetLinkConfigOutput,\n});\n\n/**\n * Used for tracking linked paths.\n */\nexport const linkPathsSource = createDataPath({\n path: ['link', 'paths'] as const,\n type: ZodLinkPathInput,\n});\n\n/**\n * Used for tracking when linking is done.\n */\nexport const linkDoneSource = createDataPath({\n path: ['link', 'done'] as const,\n type: ZodLinkPathOutput,\n});\n\n/**\n * Used for detecting host disconnection on link.\n */\nexport const linkDisconnectedSource = createDataPath({\n path: ['link', 'disconnected'] as const,\n type: z.object({ reason: z.literal(['lost', 'unreachable']) }),\n});\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -3,10 +3,8 @@ export type { BundleInfo, BundleEntryInfo, BundleEntryConsumes } from './types/B
|
|
|
3
3
|
export type { TaskStats } from './types/TaskStats.js';
|
|
4
4
|
export type { Task } from './types/Task.js';
|
|
5
5
|
export type { TaskDescription } from './types/TaskDescription.js';
|
|
6
|
-
export type { TaskEndDescription } from './types/TaskEndDescription.js';
|
|
7
6
|
export type { TaskList } from './types/TaskList.js';
|
|
8
7
|
export type { TaskMessage } from './types/TaskMessage.js';
|
|
9
|
-
export type { TaskStartDescription } from './types/TaskStartDescription.js';
|
|
10
8
|
export type { EnsurePackageBundledContext, EnsurePackageBundledResult } from './apis/ensurePackageBundled.js';
|
|
11
9
|
export type { CloudAppContext } from './types/CloudAppContext.js';
|
|
12
10
|
export type { LinkPathInput, LinkPathOutput } from './types/LinkPath.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -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,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,
|
|
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,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC9G,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvH,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAGzF,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;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAwB,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,YAAY;AACZ,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAgC,MAAM,8BAA8B,CAAC;AACvH,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEzF,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 { TaskStats } from './types/TaskStats.js';\nexport type { Task } from './types/Task.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskList } from './types/TaskList.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { EnsurePackageBundledContext, EnsurePackageBundledResult } from './apis/ensurePackageBundled.js';\nexport type { CloudAppContext } from './types/CloudAppContext.js';\nexport type { LinkPathInput, LinkPathOutput } from './types/LinkPath.js';\n\nexport { TaskRunner } from './utilities/TaskRunner.js';\nexport {\n taskListSource,\n taskStatsSource,\n errorEntrySource,\n linkConfigSource,\n linkPathsSource,\n linkDoneSource,\n linkDisconnectedSource,\n} from './data/busSources.js';\nexport { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';\nexport { createCloudpackServer, type CloudpackServer, apiServerPort } from './trpc/createCloudpackServer.js';\nexport { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';\nexport { getConsumedDependencies } from './utilities/getConsumedDependencies.js';\nexport { getConsumedPaths } from './utilities/getConsumedPaths.js';\nexport { waitForBusData } from './utilities/waitForBusData.js';\n\n// Utilities\nexport { createApiContext, createPartialApiContext, type CreateApiContextOptions } from './common/createApiContext.js';\nexport { createMockContext, createPartialMockContext } from './common/createMockContext.js';\nexport { createMockSession, createMockSessionNoFS } from './common/createMockSession.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"]}
|
package/lib/trpc/common.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { type TRPCMutationProcedure, type TRPCQueryProcedure, type TRPCSubscriptionProcedure } from '@trpc/server';
|
|
1
2
|
import type { Context } from '../types/Context.js';
|
|
3
|
+
import type { z } from 'zod/v4-mini';
|
|
4
|
+
import type { ApiParams } from '../types/ApiParams.js';
|
|
5
|
+
import type { Session } from '@ms-cloudpack/common-types';
|
|
2
6
|
export type CreateContext = () => Promise<Context>;
|
|
3
7
|
/** Reusable TRPC router helper. */
|
|
4
8
|
export declare const createRouter: import("@trpc/server").TRPCRouterBuilder<{
|
|
@@ -7,6 +11,41 @@ export declare const createRouter: import("@trpc/server").TRPCRouterBuilder<{
|
|
|
7
11
|
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
8
12
|
transformer: false;
|
|
9
13
|
}>;
|
|
10
|
-
/**
|
|
11
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Generic procedure supertype for the procedure helpers. This should only be used in defining
|
|
16
|
+
* procedure helpers (not as a type on functions) because it expects all Context/Session keys
|
|
17
|
+
* rather than narrowing to only the ones used.
|
|
18
|
+
*/
|
|
19
|
+
type Procedure<TInput, TOutput> = (opts: ApiParams<TInput, keyof Context, keyof Session>) => TOutput | Promise<TOutput>;
|
|
20
|
+
/**
|
|
21
|
+
* tRPC procedure definition type. `metadata` is marked as `never` because we're not currently
|
|
22
|
+
* using the `.metadata()` feature of procedures (could be added later).
|
|
23
|
+
*/
|
|
24
|
+
type ProcedureDef<TInput, TOutput> = {
|
|
25
|
+
input: TInput;
|
|
26
|
+
output: TOutput;
|
|
27
|
+
meta: never;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Mutation procedure helper for tRPC.
|
|
31
|
+
*
|
|
32
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
33
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
34
|
+
*/
|
|
35
|
+
export declare function mutationProcedure<TInput, TOutput>(procedure: Procedure<TInput, TOutput>, input: z.ZodMiniType<TInput, TInput>, output: z.ZodMiniType<TOutput, TOutput>): TRPCMutationProcedure<ProcedureDef<TInput, TOutput>>;
|
|
36
|
+
/**
|
|
37
|
+
* Query procedure helper for tRPC.
|
|
38
|
+
*
|
|
39
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
40
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
41
|
+
*/
|
|
42
|
+
export declare function queryProcedure<TInput, TOutput>(procedure: Procedure<TInput, TOutput>, input: z.ZodMiniType<TInput, TInput>, output: z.ZodMiniType<TOutput, TOutput>): TRPCQueryProcedure<ProcedureDef<TInput, TOutput>>;
|
|
43
|
+
/**
|
|
44
|
+
* Subscription procedure helper for tRPC.
|
|
45
|
+
*
|
|
46
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
47
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
48
|
+
*/
|
|
49
|
+
export declare function subscriptionProcedure<TInput, TOutput>(procedure: Procedure<TInput, TOutput>, input: z.ZodMiniType<TInput, TInput>, output: z.ZodMiniType<TOutput, TOutput>): TRPCSubscriptionProcedure<ProcedureDef<TInput, TOutput>>;
|
|
50
|
+
export {};
|
|
12
51
|
//# sourceMappingURL=common.d.ts.map
|
package/lib/trpc/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC/B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;AAKnD,mCAAmC;AACnC,eAAO,MAAM,YAAY;;;;;EAAW,CAAC;AAErC;;;;GAIG;AACH,KAAK,SAAS,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAExH;;;GAGG;AACH,KAAK,YAAY,CAAC,MAAM,EAAE,OAAO,IAAI;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAErF;;;;;GAKG;AAKH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAC/C,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GACtC,qBAAqB,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQtD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAC5C,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GACtC,kBAAkB,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQnD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,EACnD,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GACtC,yBAAyB,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQ1D"}
|
package/lib/trpc/common.js
CHANGED
|
@@ -1,8 +1,49 @@
|
|
|
1
|
-
import { initTRPC } from '@trpc/server';
|
|
1
|
+
import { initTRPC, } from '@trpc/server';
|
|
2
2
|
// Initialization of tRPC backend. Should be done only once per backend!
|
|
3
3
|
const t = initTRPC.context().create();
|
|
4
4
|
/** Reusable TRPC router helper. */
|
|
5
5
|
export const createRouter = t.router;
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Mutation procedure helper for tRPC.
|
|
8
|
+
*
|
|
9
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
10
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
11
|
+
*/
|
|
12
|
+
// These helpers exist because for some reason the generic input/output type inference in
|
|
13
|
+
// `t.procedure.mutation` etc (maybe when combined with the way zod defines input/output types)
|
|
14
|
+
// loses the original types during declaration emit, and instead emits copies with all the same
|
|
15
|
+
// properties but no docs.
|
|
16
|
+
export function mutationProcedure(procedure, input, output) {
|
|
17
|
+
return t.procedure
|
|
18
|
+
.input(input)
|
|
19
|
+
.output(output)
|
|
20
|
+
// eslint-disable-next-line
|
|
21
|
+
.mutation(procedure);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Query procedure helper for tRPC.
|
|
25
|
+
*
|
|
26
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
27
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
28
|
+
*/
|
|
29
|
+
export function queryProcedure(procedure, input, output) {
|
|
30
|
+
return t.procedure
|
|
31
|
+
.input(input)
|
|
32
|
+
.output(output)
|
|
33
|
+
// eslint-disable-next-line
|
|
34
|
+
.query(procedure);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Subscription procedure helper for tRPC.
|
|
38
|
+
*
|
|
39
|
+
* It's recommended to explicitly specify the type parameters to ensure the original types
|
|
40
|
+
* and any docs are preserved in the procedures exposed on the client.
|
|
41
|
+
*/
|
|
42
|
+
export function subscriptionProcedure(procedure, input, output) {
|
|
43
|
+
return t.procedure
|
|
44
|
+
.input(input)
|
|
45
|
+
.output(output)
|
|
46
|
+
// eslint-disable-next-line
|
|
47
|
+
.subscription(procedure);
|
|
48
|
+
}
|
|
8
49
|
//# sourceMappingURL=common.js.map
|
package/lib/trpc/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAIT,MAAM,cAAc,CAAC;AAQtB,wEAAwE;AACxE,MAAM,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAiB,CAAC,MAAM,EAAE,CAAC;AAErD,mCAAmC;AACnC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;AAerC;;;;;GAKG;AACH,yFAAyF;AACzF,+FAA+F;AAC/F,+FAA+F;AAC/F,0BAA0B;AAC1B,MAAM,UAAU,iBAAiB,CAC/B,SAAqC,EACrC,KAAoC,EACpC,MAAuC;IAEvC,OACE,CAAC,CAAC,SAAS;SACR,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,MAAM,CAAC;QACf,2BAA2B;SAC1B,QAAQ,CAAC,SAAgB,CAC7B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,SAAqC,EACrC,KAAoC,EACpC,MAAuC;IAEvC,OACE,CAAC,CAAC,SAAS;SACR,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,MAAM,CAAC;QACf,2BAA2B;SAC1B,KAAK,CAAC,SAAgB,CAC1B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,SAAqC,EACrC,KAAoC,EACpC,MAAuC;IAEvC,OACE,CAAC,CAAC,SAAS;SACR,KAAK,CAAC,KAAK,CAAC;SACZ,MAAM,CAAC,MAAM,CAAC;QACf,2BAA2B;SAC1B,YAAY,CAAC,SAAgB,CACjC,CAAC;AACJ,CAAC","sourcesContent":["import {\n initTRPC,\n type TRPCMutationProcedure,\n type TRPCQueryProcedure,\n type TRPCSubscriptionProcedure,\n} from '@trpc/server';\nimport type { Context } from '../types/Context.js';\nimport type { z } from 'zod/v4-mini';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport type { Session } from '@ms-cloudpack/common-types';\n\nexport type CreateContext = () => Promise<Context>;\n\n// Initialization of tRPC backend. Should be done only once per backend!\nconst t = initTRPC.context<CreateContext>().create();\n\n/** Reusable TRPC router helper. */\nexport const createRouter = t.router;\n\n/**\n * Generic procedure supertype for the procedure helpers. This should only be used in defining\n * procedure helpers (not as a type on functions) because it expects all Context/Session keys\n * rather than narrowing to only the ones used.\n */\ntype Procedure<TInput, TOutput> = (opts: ApiParams<TInput, keyof Context, keyof Session>) => TOutput | Promise<TOutput>;\n\n/**\n * tRPC procedure definition type. `metadata` is marked as `never` because we're not currently\n * using the `.metadata()` feature of procedures (could be added later).\n */\ntype ProcedureDef<TInput, TOutput> = { input: TInput; output: TOutput; meta: never };\n\n/**\n * Mutation procedure helper for tRPC.\n *\n * It's recommended to explicitly specify the type parameters to ensure the original types\n * and any docs are preserved in the procedures exposed on the client.\n */\n// These helpers exist because for some reason the generic input/output type inference in\n// `t.procedure.mutation` etc (maybe when combined with the way zod defines input/output types)\n// loses the original types during declaration emit, and instead emits copies with all the same\n// properties but no docs.\nexport function mutationProcedure<TInput, TOutput>(\n procedure: Procedure<TInput, TOutput>,\n input: z.ZodMiniType<TInput, TInput>,\n output: z.ZodMiniType<TOutput, TOutput>,\n): TRPCMutationProcedure<ProcedureDef<TInput, TOutput>> {\n return (\n t.procedure\n .input(input)\n .output(output)\n // eslint-disable-next-line\n .mutation(procedure as any) as TRPCMutationProcedure<ProcedureDef<TInput, TOutput>>\n );\n}\n\n/**\n * Query procedure helper for tRPC.\n *\n * It's recommended to explicitly specify the type parameters to ensure the original types\n * and any docs are preserved in the procedures exposed on the client.\n */\nexport function queryProcedure<TInput, TOutput>(\n procedure: Procedure<TInput, TOutput>,\n input: z.ZodMiniType<TInput, TInput>,\n output: z.ZodMiniType<TOutput, TOutput>,\n): TRPCQueryProcedure<ProcedureDef<TInput, TOutput>> {\n return (\n t.procedure\n .input(input)\n .output(output)\n // eslint-disable-next-line\n .query(procedure as any) as TRPCQueryProcedure<ProcedureDef<TInput, TOutput>>\n );\n}\n\n/**\n * Subscription procedure helper for tRPC.\n *\n * It's recommended to explicitly specify the type parameters to ensure the original types\n * and any docs are preserved in the procedures exposed on the client.\n */\nexport function subscriptionProcedure<TInput, TOutput>(\n procedure: Procedure<TInput, TOutput>,\n input: z.ZodMiniType<TInput, TInput>,\n output: z.ZodMiniType<TOutput, TOutput>,\n): TRPCSubscriptionProcedure<ProcedureDef<TInput, TOutput>> {\n return (\n t.procedure\n .input(input)\n .output(output)\n // eslint-disable-next-line\n .subscription(procedure as any) as TRPCSubscriptionProcedure<ProcedureDef<TInput, TOutput>>\n );\n}\n"]}
|
package/lib/types/LinkPath.d.ts
CHANGED
|
@@ -1,96 +1,20 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4-mini';
|
|
2
2
|
import type { LinkedPath } from '@ms-cloudpack/common-types';
|
|
3
|
-
export declare const ZodLinkPackageDefinition: z.
|
|
4
|
-
name: z.
|
|
5
|
-
version: z.
|
|
6
|
-
exports: z.
|
|
7
|
-
dependencies: z.
|
|
8
|
-
peerDependencies: z.
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
peerDependencies?: Record<string, string | undefined> | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
name: string;
|
|
17
|
-
version: string;
|
|
18
|
-
exports?: any;
|
|
19
|
-
dependencies?: Record<string, string | undefined> | undefined;
|
|
20
|
-
peerDependencies?: Record<string, string | undefined> | undefined;
|
|
21
|
-
}>;
|
|
22
|
-
export declare const ZodLinkedPath: z.ZodObject<{
|
|
23
|
-
path: z.ZodType<string, z.ZodTypeDef, string>;
|
|
24
|
-
rootPath: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
25
|
-
includeAll: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
26
|
-
ignoredPackages: z.ZodType<string[] | undefined, z.ZodTypeDef, string[] | undefined>;
|
|
27
|
-
ignoreResolutions: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
28
|
-
resolveStrategy: z.ZodType<"dedupe" | "duplicate" | undefined, z.ZodTypeDef, "dedupe" | "duplicate" | undefined>;
|
|
29
|
-
remote: z.ZodType<{
|
|
30
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
31
|
-
hostUrl: string;
|
|
32
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
33
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
34
|
-
} | undefined, z.ZodTypeDef, {
|
|
35
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
36
|
-
hostUrl: string;
|
|
37
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
38
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
39
|
-
} | undefined>;
|
|
40
|
-
}, "strict", z.ZodTypeAny, LinkedPath, LinkedPath>;
|
|
41
|
-
export declare const ZodLinkPathInput: z.ZodObject<{
|
|
42
|
-
linkedPath: z.ZodObject<{
|
|
43
|
-
path: z.ZodType<string, z.ZodTypeDef, string>;
|
|
44
|
-
rootPath: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
45
|
-
includeAll: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
46
|
-
ignoredPackages: z.ZodType<string[] | undefined, z.ZodTypeDef, string[] | undefined>;
|
|
47
|
-
ignoreResolutions: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
48
|
-
resolveStrategy: z.ZodType<"dedupe" | "duplicate" | undefined, z.ZodTypeDef, "dedupe" | "duplicate" | undefined>;
|
|
49
|
-
remote: z.ZodType<{
|
|
50
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
51
|
-
hostUrl: string;
|
|
52
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
53
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
54
|
-
} | undefined, z.ZodTypeDef, {
|
|
55
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
56
|
-
hostUrl: string;
|
|
57
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
58
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
59
|
-
} | undefined>;
|
|
60
|
-
}, "strict", z.ZodTypeAny, LinkedPath, LinkedPath>;
|
|
61
|
-
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
linkedPath: LinkedPath;
|
|
63
|
-
}, {
|
|
64
|
-
linkedPath: LinkedPath;
|
|
65
|
-
}>;
|
|
3
|
+
export declare const ZodLinkPackageDefinition: z.ZodMiniObject<{
|
|
4
|
+
name: z.ZodMiniString<string>;
|
|
5
|
+
version: z.ZodMiniString<string>;
|
|
6
|
+
exports: z.ZodMiniOptional<z.ZodMiniAny>;
|
|
7
|
+
dependencies: z.ZodMiniOptional<z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniUndefined, z.ZodMiniString<string>]>>>>;
|
|
8
|
+
peerDependencies: z.ZodMiniOptional<z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniUndefined, z.ZodMiniString<string>]>>>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const ZodLinkedPath: z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<LinkedPath>, z.core.$strict>;
|
|
11
|
+
export declare const ZodLinkPathInput: z.ZodMiniObject<{
|
|
12
|
+
linkedPath: z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<LinkedPath>, z.core.$strict>;
|
|
13
|
+
}, z.core.$strip>;
|
|
66
14
|
export type LinkPathInput = z.infer<typeof ZodLinkPathInput>;
|
|
67
|
-
export declare const ZodLinkPathOutput: z.
|
|
68
|
-
resolveMap: z.
|
|
69
|
-
linkedPaths: z.
|
|
70
|
-
|
|
71
|
-
rootPath: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
72
|
-
includeAll: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
73
|
-
ignoredPackages: z.ZodType<string[] | undefined, z.ZodTypeDef, string[] | undefined>;
|
|
74
|
-
ignoreResolutions: z.ZodType<boolean | undefined, z.ZodTypeDef, boolean | undefined>;
|
|
75
|
-
resolveStrategy: z.ZodType<"dedupe" | "duplicate" | undefined, z.ZodTypeDef, "dedupe" | "duplicate" | undefined>;
|
|
76
|
-
remote: z.ZodType<{
|
|
77
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
78
|
-
hostUrl: string;
|
|
79
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
80
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
81
|
-
} | undefined, z.ZodTypeDef, {
|
|
82
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
83
|
-
hostUrl: string;
|
|
84
|
-
packages: import("@ms-cloudpack/common-types").SerializablePackageDefinitionsCache;
|
|
85
|
-
packageHashes: import("@ms-cloudpack/common-types").SerializablePackageHashesCache;
|
|
86
|
-
} | undefined>;
|
|
87
|
-
}, "strict", z.ZodTypeAny, LinkedPath, LinkedPath>, "many">;
|
|
88
|
-
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
90
|
-
linkedPaths: LinkedPath[];
|
|
91
|
-
}, {
|
|
92
|
-
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
93
|
-
linkedPaths: LinkedPath[];
|
|
94
|
-
}>;
|
|
15
|
+
export declare const ZodLinkPathOutput: z.ZodMiniObject<{
|
|
16
|
+
resolveMap: z.ZodMiniType<import("@ms-cloudpack/common-types").ResolveMap, import("@ms-cloudpack/common-types").ResolveMap, z.core.$ZodTypeInternals<import("@ms-cloudpack/common-types").ResolveMap, import("@ms-cloudpack/common-types").ResolveMap>>;
|
|
17
|
+
linkedPaths: z.ZodMiniArray<z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<LinkedPath>, z.core.$strict>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
95
19
|
export type LinkPathOutput = z.infer<typeof ZodLinkPathOutput>;
|
|
96
20
|
//# sourceMappingURL=LinkPath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkPath.d.ts","sourceRoot":"","sources":["../../src/types/LinkPath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LinkPath.d.ts","sourceRoot":"","sources":["../../src/types/LinkPath.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAEhC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAa7D,eAAO,MAAM,wBAAwB;;;;;;iBASnC,CAAC;AAEH,eAAO,MAAM,aAAa,2GAuBxB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAA0C,CAAC;AAExE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE7D,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/lib/types/LinkPath.js
CHANGED
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
//
|
|
2
|
+
// This must be in a separate file because it's imported by busSources.ts, which is also used
|
|
3
|
+
// in the browser, so it must only import zod types.
|
|
4
|
+
// (Also, these types are used by both `linkPath` and `unlinkPath`.)
|
|
5
|
+
//
|
|
6
|
+
import { z } from 'zod/v4-mini';
|
|
2
7
|
import { matchingZodObject } from '../utilities/matchingZodObject.js';
|
|
3
8
|
import { ZodResolveMap } from '../types/ZodResolveMap.js';
|
|
4
|
-
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
+
const ZodPackageRecord = (ZodPackageJson) => z.record(z.string(), z.union([ZodPackageJson, z.undefined()]));
|
|
5
11
|
const ZodPackageHashesEntry = z.object({
|
|
6
|
-
browser: z.record(z.string()),
|
|
7
|
-
node: z.record(z.string()),
|
|
12
|
+
browser: z.record(z.string(), z.string()),
|
|
13
|
+
node: z.record(z.string(), z.string()),
|
|
8
14
|
});
|
|
9
|
-
const ZodDependency = z.record(z.string(), z.union([z.undefined(), z.string()]))
|
|
15
|
+
const ZodDependency = z.optional(z.record(z.string(), z.union([z.undefined(), z.string()])));
|
|
10
16
|
export const ZodLinkPackageDefinition = z.object({
|
|
11
17
|
// Name and version are required for the import map.
|
|
12
18
|
name: z.string(),
|
|
13
19
|
version: z.string(),
|
|
14
20
|
// The exports are also required for the import map.
|
|
15
|
-
exports: z.any(),
|
|
21
|
+
exports: z.optional(z.any()),
|
|
16
22
|
// Dependencies are required for the resolve map.
|
|
17
|
-
dependencies: ZodDependency,
|
|
18
|
-
peerDependencies: ZodDependency,
|
|
23
|
+
dependencies: z.optional(ZodDependency),
|
|
24
|
+
peerDependencies: z.optional(ZodDependency),
|
|
19
25
|
});
|
|
20
26
|
export const ZodLinkedPath = matchingZodObject({
|
|
21
27
|
path: z.string(),
|
|
22
|
-
rootPath: z.
|
|
23
|
-
includeAll: z.
|
|
24
|
-
ignoredPackages: z.
|
|
25
|
-
ignoreResolutions: z.
|
|
26
|
-
resolveStrategy: z.
|
|
27
|
-
remote: z
|
|
28
|
-
.object({
|
|
28
|
+
rootPath: z.optional(z.string()),
|
|
29
|
+
includeAll: z.optional(z.boolean()),
|
|
30
|
+
ignoredPackages: z.optional(z.array(z.string())),
|
|
31
|
+
ignoreResolutions: z.optional(z.boolean()),
|
|
32
|
+
resolveStrategy: z.optional(z.literal(['dedupe', 'duplicate'])),
|
|
33
|
+
remote: z.optional(z.object({
|
|
29
34
|
resolveMap: ZodResolveMap,
|
|
30
35
|
hostUrl: z.string(),
|
|
31
36
|
packages: z.object({
|
|
@@ -38,8 +43,7 @@ export const ZodLinkedPath = matchingZodObject({
|
|
|
38
43
|
hashesWithSource: ZodPackageHashesEntry,
|
|
39
44
|
hashesWithNoSource: ZodPackageHashesEntry,
|
|
40
45
|
}),
|
|
41
|
-
})
|
|
42
|
-
.optional(),
|
|
46
|
+
})),
|
|
43
47
|
});
|
|
44
48
|
export const ZodLinkPathInput = z.object({ linkedPath: ZodLinkedPath });
|
|
45
49
|
export const ZodLinkPathOutput = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkPath.js","sourceRoot":"","sources":["../../src/types/LinkPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"LinkPath.js","sourceRoot":"","sources":["../../src/types/LinkPath.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,6FAA6F;AAC7F,oDAAoD;AACpD,oEAAoE;AACpE,EAAE;AACF,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,8DAA8D;AAC9D,MAAM,gBAAgB,GAAG,CAAC,cAAuC,EAAE,EAAE,CACnE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AAEjE,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;CACvC,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,oDAAoD;IACpD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,oDAAoD;IACpD,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IAC5B,iDAAiD;IACjD,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC;IACvC,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAa;IACzD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACnC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC1C,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IAC/D,MAAM,EAAE,CAAC,CAAC,QAAQ,CAChB,CAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,aAAa;QACzB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;YACjB,yFAAyF;YACzF,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAC3C,sGAAsG;YACtG,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;SACnE,CAAC;QACF,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC;YACtB,gBAAgB,EAAE,qBAAqB;YACvC,kBAAkB,EAAE,qBAAqB;SAC1C,CAAC;KACH,CAAC,CACH;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,CAAC;AAIxE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;CACpC,CAAC,CAAC","sourcesContent":["//\n// This must be in a separate file because it's imported by busSources.ts, which is also used\n// in the browser, so it must only import zod types.\n// (Also, these types are used by both `linkPath` and `unlinkPath`.)\n//\nimport { z } from 'zod/v4-mini';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\nimport type { LinkedPath } from '@ms-cloudpack/common-types';\nimport { ZodResolveMap } from '../types/ZodResolveMap.js';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst ZodPackageRecord = (ZodPackageJson: z.ZodMiniType<any, any>) =>\n z.record(z.string(), z.union([ZodPackageJson, z.undefined()]));\n\nconst ZodPackageHashesEntry = z.object({\n browser: z.record(z.string(), z.string()),\n node: z.record(z.string(), z.string()),\n});\n\nconst ZodDependency = z.optional(z.record(z.string(), z.union([z.undefined(), z.string()])));\nexport const ZodLinkPackageDefinition = z.object({\n // Name and version are required for the import map.\n name: z.string(),\n version: z.string(),\n // The exports are also required for the import map.\n exports: z.optional(z.any()),\n // Dependencies are required for the resolve map.\n dependencies: z.optional(ZodDependency),\n peerDependencies: z.optional(ZodDependency),\n});\n\nexport const ZodLinkedPath = matchingZodObject<LinkedPath>({\n path: z.string(),\n rootPath: z.optional(z.string()),\n includeAll: z.optional(z.boolean()),\n ignoredPackages: z.optional(z.array(z.string())),\n ignoreResolutions: z.optional(z.boolean()),\n resolveStrategy: z.optional(z.literal(['dedupe', 'duplicate'])),\n remote: z.optional(\n z.object({\n resolveMap: ZodResolveMap,\n hostUrl: z.string(),\n packages: z.object({\n // Dummy package json as start should not require any non transformed package definitions\n definitions: ZodPackageRecord(z.object({})),\n // For linked packages, we need name and version across Cloudpack, and the exports for the import map.\n transformedDefinitions: ZodPackageRecord(ZodLinkPackageDefinition),\n }),\n packageHashes: z.object({\n hashesWithSource: ZodPackageHashesEntry,\n hashesWithNoSource: ZodPackageHashesEntry,\n }),\n }),\n ),\n});\n\nexport const ZodLinkPathInput = z.object({ linkedPath: ZodLinkedPath });\n\nexport type LinkPathInput = z.infer<typeof ZodLinkPathInput>;\n\nexport const ZodLinkPathOutput = z.object({\n resolveMap: ZodResolveMap,\n linkedPaths: z.array(ZodLinkedPath),\n});\n\nexport type LinkPathOutput = z.infer<typeof ZodLinkPathOutput>;\n"]}
|
package/lib/types/Task.d.ts
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { TaskEndDescription } from './TaskEndDescription.js';
|
|
3
|
-
import type { TaskMessage } from './TaskMessage.js';
|
|
1
|
+
import type { TaskDescription } from './TaskDescription.js';
|
|
4
2
|
/** Task for `TaskRunner`. */
|
|
5
|
-
export interface Task<TReturn> {
|
|
6
|
-
|
|
7
|
-
id: string;
|
|
8
|
-
dir?: string;
|
|
3
|
+
export interface Task<TReturn> extends Pick<TaskDescription, 'id' | 'name'> {
|
|
4
|
+
/** Run the task */
|
|
9
5
|
execute: () => Promise<TReturn | undefined>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
/** Clean up resources in memory, such as disposing a watched task result. */
|
|
7
|
+
dispose?: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Remove the result of running the task, such as deleting bundled files from disk.
|
|
10
|
+
* (Use `dispose` for cleanup of in-memory resources.)
|
|
11
|
+
*/
|
|
12
|
+
clear?: () => Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Get info available at the start of the task.
|
|
15
|
+
* This is required for task info to be sent over the data bus to the client.
|
|
16
|
+
*/
|
|
15
17
|
getStartDescription?: () => TaskStartDescription;
|
|
18
|
+
/**
|
|
19
|
+
* Get task result summary.
|
|
20
|
+
* This is required for task info to be sent over the data bus to the client.
|
|
21
|
+
*/
|
|
16
22
|
getEndDescription?: (result: TReturn | undefined) => TaskEndDescription;
|
|
17
23
|
}
|
|
24
|
+
export type TaskStartDescription = Pick<TaskDescription, 'inputPath'>;
|
|
25
|
+
export type TaskEndDescription = Pick<TaskDescription, 'outputPath' | 'errors' | 'warnings'>;
|
|
18
26
|
//# sourceMappingURL=Task.d.ts.map
|
package/lib/types/Task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Task.d.ts","sourceRoot":"","sources":["../../src/types/Task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Task.d.ts","sourceRoot":"","sources":["../../src/types/Task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,6BAA6B;AAC7B,MAAM,WAAW,IAAI,CAAC,OAAO,CAAE,SAAQ,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,CAAC;IACzE,mBAAmB;IACnB,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAE5C,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,oBAAoB,CAAC;IAEjD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,KAAK,kBAAkB,CAAC;CACzE;AAED,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC"}
|
package/lib/types/Task.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Task.js","sourceRoot":"","sources":["../../src/types/Task.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Task.js","sourceRoot":"","sources":["../../src/types/Task.ts"],"names":[],"mappings":"","sourcesContent":["import type { TaskDescription } from './TaskDescription.js';\n\n/** Task for `TaskRunner`. */\nexport interface Task<TReturn> extends Pick<TaskDescription, 'id' | 'name'> {\n /** Run the task */\n execute: () => Promise<TReturn | undefined>;\n\n /** Clean up resources in memory, such as disposing a watched task result. */\n dispose?: () => void;\n\n /**\n * Remove the result of running the task, such as deleting bundled files from disk.\n * (Use `dispose` for cleanup of in-memory resources.)\n */\n clear?: () => Promise<void>;\n\n /**\n * Get info available at the start of the task.\n * This is required for task info to be sent over the data bus to the client.\n */\n getStartDescription?: () => TaskStartDescription;\n\n /**\n * Get task result summary.\n * This is required for task info to be sent over the data bus to the client.\n */\n getEndDescription?: (result: TReturn | undefined) => TaskEndDescription;\n}\n\nexport type TaskStartDescription = Pick<TaskDescription, 'inputPath'>;\nexport type TaskEndDescription = Pick<TaskDescription, 'outputPath' | 'errors' | 'warnings'>;\n"]}
|
|
@@ -1,76 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
name: string;
|
|
11
|
-
start: number;
|
|
12
|
-
end?: number | undefined;
|
|
13
|
-
threwException?: boolean | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
name: string;
|
|
16
|
-
start: number;
|
|
17
|
-
end?: number | undefined;
|
|
18
|
-
threwException?: boolean | undefined;
|
|
19
|
-
}>, "many">>;
|
|
20
|
-
startTime: z.ZodNumber;
|
|
21
|
-
durationMilliseconds: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
lastUpdated: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
name: z.ZodOptional<z.ZodString>;
|
|
24
|
-
inputPath: z.ZodOptional<z.ZodString>;
|
|
25
|
-
outputPath: z.ZodOptional<z.ZodString>;
|
|
26
|
-
} & {
|
|
27
|
-
id: z.ZodString;
|
|
28
|
-
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
29
|
-
text: z.ZodType<string, z.ZodTypeDef, string>;
|
|
30
|
-
source: z.ZodType<string, z.ZodTypeDef, string>;
|
|
31
|
-
location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
|
|
32
|
-
notes: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined>;
|
|
33
|
-
}, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").BundleMessage, import("@ms-cloudpack/common-types").BundleMessage>, "many">>;
|
|
34
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
-
text: z.ZodType<string, z.ZodTypeDef, string>;
|
|
36
|
-
source: z.ZodType<string, z.ZodTypeDef, string>;
|
|
37
|
-
location: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageLocation | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageLocation | undefined>;
|
|
38
|
-
notes: z.ZodType<import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined, z.ZodTypeDef, import("@ms-cloudpack/common-types").BundleMessageNote[] | undefined>;
|
|
39
|
-
}, "strict", z.ZodTypeAny, import("@ms-cloudpack/common-types").BundleMessage, import("@ms-cloudpack/common-types").BundleMessage>, "many">>;
|
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
|
1
|
+
import type { BundleResult } from '@ms-cloudpack/common-types';
|
|
2
|
+
import { z } from 'zod/v4-mini';
|
|
3
|
+
import { type Timing } from './Timing.js';
|
|
4
|
+
/**
|
|
5
|
+
* Task description to be displayed in the UI.
|
|
6
|
+
*/
|
|
7
|
+
export interface TaskDescription extends Pick<BundleResult, 'inputPath' | 'outputPath' | 'errors' | 'warnings'> {
|
|
8
|
+
/** Unique ID for the task */
|
|
41
9
|
id: string;
|
|
10
|
+
/** Task display name */
|
|
11
|
+
name: string;
|
|
12
|
+
status: 'pending' | 'complete';
|
|
13
|
+
/** Start time of the task in milliseconds. */
|
|
42
14
|
startTime: number;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
name: string;
|
|
51
|
-
start: number;
|
|
52
|
-
end?: number | undefined;
|
|
53
|
-
threwException?: boolean | undefined;
|
|
54
|
-
}[] | undefined;
|
|
55
|
-
durationMilliseconds?: number | undefined;
|
|
56
|
-
lastUpdated?: number | undefined;
|
|
57
|
-
}, {
|
|
58
|
-
id: string;
|
|
59
|
-
startTime: number;
|
|
60
|
-
status?: "pending" | "complete" | undefined;
|
|
61
|
-
name?: string | undefined;
|
|
62
|
-
inputPath?: string | undefined;
|
|
63
|
-
outputPath?: string | undefined;
|
|
64
|
-
errors?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
65
|
-
warnings?: import("@ms-cloudpack/common-types").BundleMessage[] | undefined;
|
|
66
|
-
timings?: {
|
|
67
|
-
name: string;
|
|
68
|
-
start: number;
|
|
69
|
-
end?: number | undefined;
|
|
70
|
-
threwException?: boolean | undefined;
|
|
71
|
-
}[] | undefined;
|
|
72
|
-
durationMilliseconds?: number | undefined;
|
|
73
|
-
lastUpdated?: number | undefined;
|
|
74
|
-
}>;
|
|
75
|
-
export type TaskDescription = z.infer<typeof ZodTaskDescription>;
|
|
15
|
+
/** Duration of the task in milliseconds. */
|
|
16
|
+
duration?: number;
|
|
17
|
+
/** Last updated time of the task in milliseconds. */
|
|
18
|
+
lastUpdated?: number;
|
|
19
|
+
timings?: Timing[];
|
|
20
|
+
}
|
|
21
|
+
export declare const ZodTaskDescription: z.ZodMiniObject<import("../utilities/matchingZodObject.js").MatchingZodShape<TaskDescription>, z.core.$strict>;
|
|
76
22
|
//# 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,
|
|
1
|
+
{"version":3,"file":"TaskDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAa,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC7G,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,gHAY7B,CAAC"}
|