@ms-cloudpack/api-server 0.63.11 → 0.64.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/lib/apis/addPackageOverride.d.ts +1 -1
  2. package/lib/apis/addPackageOverride.js +7 -7
  3. package/lib/apis/addPackageOverride.js.map +1 -1
  4. package/lib/apis/ensurePackageBundled.js.map +1 -1
  5. package/lib/apis/getData.d.ts +9 -17
  6. package/lib/apis/getData.d.ts.map +1 -1
  7. package/lib/apis/getData.js +5 -5
  8. package/lib/apis/getData.js.map +1 -1
  9. package/lib/apis/getLinkConfig.d.ts +2 -4
  10. package/lib/apis/getLinkConfig.d.ts.map +1 -1
  11. package/lib/apis/getLinkConfig.js +4 -3
  12. package/lib/apis/getLinkConfig.js.map +1 -1
  13. package/lib/apis/getSessionId.d.ts +2 -6
  14. package/lib/apis/getSessionId.d.ts.map +1 -1
  15. package/lib/apis/getSessionId.js +3 -4
  16. package/lib/apis/getSessionId.js.map +1 -1
  17. package/lib/apis/linkPath.d.ts +3 -8
  18. package/lib/apis/linkPath.js +3 -3
  19. package/lib/apis/linkPath.js.map +1 -1
  20. package/lib/apis/notifyLinkChange.d.ts +3 -16
  21. package/lib/apis/notifyLinkChange.d.ts.map +1 -1
  22. package/lib/apis/notifyLinkChange.js +5 -4
  23. package/lib/apis/notifyLinkChange.js.map +1 -1
  24. package/lib/apis/onDataChanged.d.ts +5 -18
  25. package/lib/apis/onDataChanged.d.ts.map +1 -1
  26. package/lib/apis/onDataChanged.js +4 -10
  27. package/lib/apis/onDataChanged.js.map +1 -1
  28. package/lib/apis/openCodeEditor.d.ts +10 -26
  29. package/lib/apis/openCodeEditor.d.ts.map +1 -1
  30. package/lib/apis/openCodeEditor.js +11 -7
  31. package/lib/apis/openCodeEditor.js.map +1 -1
  32. package/lib/apis/openConfigEditor.d.ts +4 -1
  33. package/lib/apis/openConfigEditor.d.ts.map +1 -1
  34. package/lib/apis/openConfigEditor.js +6 -2
  35. package/lib/apis/openConfigEditor.js.map +1 -1
  36. package/lib/apis/openFilePath.d.ts +10 -17
  37. package/lib/apis/openFilePath.d.ts.map +1 -1
  38. package/lib/apis/openFilePath.js +9 -5
  39. package/lib/apis/openFilePath.js.map +1 -1
  40. package/lib/apis/publishData.d.ts +7 -17
  41. package/lib/apis/publishData.d.ts.map +1 -1
  42. package/lib/apis/publishData.js +5 -4
  43. package/lib/apis/publishData.js.map +1 -1
  44. package/lib/apis/reportSpan.d.ts +6 -24
  45. package/lib/apis/reportSpan.d.ts.map +1 -1
  46. package/lib/apis/reportSpan.js +6 -5
  47. package/lib/apis/reportSpan.js.map +1 -1
  48. package/lib/apis/restartAllTasks.d.ts +1 -1
  49. package/lib/apis/restartAllTasks.d.ts.map +1 -1
  50. package/lib/apis/restartAllTasks.js +14 -7
  51. package/lib/apis/restartAllTasks.js.map +1 -1
  52. package/lib/apis/restartTask.d.ts +4 -18
  53. package/lib/apis/restartTask.d.ts.map +1 -1
  54. package/lib/apis/restartTask.js +6 -5
  55. package/lib/apis/restartTask.js.map +1 -1
  56. package/lib/apis/unlinkPath.d.ts +3 -8
  57. package/lib/apis/unlinkPath.js +3 -3
  58. package/lib/apis/unlinkPath.js.map +1 -1
  59. package/lib/apis/validatePackageOverride.d.ts +1 -1
  60. package/lib/apis/validatePackageOverride.js +5 -8
  61. package/lib/apis/validatePackageOverride.js.map +1 -1
  62. package/lib/common/createApiContext.d.ts.map +1 -1
  63. package/lib/common/createApiContext.js +4 -1
  64. package/lib/common/createApiContext.js.map +1 -1
  65. package/lib/common/createMockContext.d.ts +16 -9
  66. package/lib/common/createMockContext.d.ts.map +1 -1
  67. package/lib/common/createMockContext.js +21 -16
  68. package/lib/common/createMockContext.js.map +1 -1
  69. package/lib/common/createMockSession.d.ts +1 -1
  70. package/lib/common/createMockSession.d.ts.map +1 -1
  71. package/lib/common/createMockSession.js.map +1 -1
  72. package/lib/common/createSession.d.ts +5 -1
  73. package/lib/common/createSession.d.ts.map +1 -1
  74. package/lib/common/createSession.js +1 -1
  75. package/lib/common/createSession.js.map +1 -1
  76. package/lib/common/prepareOutputPath.js +1 -1
  77. package/lib/common/prepareOutputPath.js.map +1 -1
  78. package/lib/data/busSources.d.ts +12 -240
  79. package/lib/data/busSources.d.ts.map +1 -1
  80. package/lib/data/busSources.js +4 -4
  81. package/lib/data/busSources.js.map +1 -1
  82. package/lib/index.browser.d.ts +2 -2
  83. package/lib/index.browser.d.ts.map +1 -1
  84. package/lib/index.browser.js.map +1 -1
  85. package/lib/index.d.ts +0 -2
  86. package/lib/index.d.ts.map +1 -1
  87. package/lib/index.js.map +1 -1
  88. package/lib/trpc/common.d.ts +41 -2
  89. package/lib/trpc/common.d.ts.map +1 -1
  90. package/lib/trpc/common.js +44 -3
  91. package/lib/trpc/common.js.map +1 -1
  92. package/lib/types/GetLinkConfigOutput.d.ts +5 -0
  93. package/lib/types/GetLinkConfigOutput.d.ts.map +1 -0
  94. package/lib/types/GetLinkConfigOutput.js +18 -0
  95. package/lib/types/GetLinkConfigOutput.js.map +1 -0
  96. package/lib/types/LinkPath.d.ts +9 -93
  97. package/lib/types/LinkPath.d.ts.map +1 -1
  98. package/lib/types/LinkPath.js +28 -34
  99. package/lib/types/LinkPath.js.map +1 -1
  100. package/lib/types/NotifyLinkChangeInput.d.ts +9 -0
  101. package/lib/types/NotifyLinkChangeInput.d.ts.map +1 -0
  102. package/lib/types/NotifyLinkChangeInput.js +16 -0
  103. package/lib/types/NotifyLinkChangeInput.js.map +1 -0
  104. package/lib/types/Task.d.ts +20 -12
  105. package/lib/types/Task.d.ts.map +1 -1
  106. package/lib/types/Task.js.map +1 -1
  107. package/lib/types/TaskDescription.d.ts +19 -73
  108. package/lib/types/TaskDescription.d.ts.map +1 -1
  109. package/lib/types/TaskDescription.js +15 -12
  110. package/lib/types/TaskDescription.js.map +1 -1
  111. package/lib/types/TaskList.d.ts +6 -115
  112. package/lib/types/TaskList.d.ts.map +1 -1
  113. package/lib/types/TaskList.js +3 -2
  114. package/lib/types/TaskList.js.map +1 -1
  115. package/lib/types/TaskMessage.d.ts +3 -11
  116. package/lib/types/TaskMessage.d.ts.map +1 -1
  117. package/lib/types/TaskMessage.js +4 -4
  118. package/lib/types/TaskMessage.js.map +1 -1
  119. package/lib/types/TaskMessageLocation.d.ts +2 -6
  120. package/lib/types/TaskMessageLocation.d.ts.map +1 -1
  121. package/lib/types/TaskMessageLocation.js +3 -3
  122. package/lib/types/TaskMessageLocation.js.map +1 -1
  123. package/lib/types/TaskStats.d.ts +26 -17
  124. package/lib/types/TaskStats.d.ts.map +1 -1
  125. package/lib/types/TaskStats.js +4 -3
  126. package/lib/types/TaskStats.js.map +1 -1
  127. package/lib/types/Timing.d.ts +8 -18
  128. package/lib/types/Timing.d.ts.map +1 -1
  129. package/lib/types/Timing.js +5 -8
  130. package/lib/types/Timing.js.map +1 -1
  131. package/lib/utilities/TaskRunner.d.ts +56 -18
  132. package/lib/utilities/TaskRunner.d.ts.map +1 -1
  133. package/lib/utilities/TaskRunner.js +177 -98
  134. package/lib/utilities/TaskRunner.js.map +1 -1
  135. package/lib/utilities/createBundleTask.d.ts.map +1 -1
  136. package/lib/utilities/createBundleTask.js +9 -15
  137. package/lib/utilities/createBundleTask.js.map +1 -1
  138. package/lib/utilities/matchingZodObject.d.ts +18 -10
  139. package/lib/utilities/matchingZodObject.d.ts.map +1 -1
  140. package/lib/utilities/matchingZodObject.js +19 -7
  141. package/lib/utilities/matchingZodObject.js.map +1 -1
  142. package/lib/utilities/notifyHost.d.ts +3 -4
  143. package/lib/utilities/notifyHost.d.ts.map +1 -1
  144. package/lib/utilities/notifyHost.js.map +1 -1
  145. package/lib/utilities/notifyReload.d.ts +4 -3
  146. package/lib/utilities/notifyReload.d.ts.map +1 -1
  147. package/lib/utilities/notifyReload.js +2 -1
  148. package/lib/utilities/notifyReload.js.map +1 -1
  149. package/lib/utilities/waitForBusData.d.ts +2 -2
  150. package/lib/utilities/waitForBusData.d.ts.map +1 -1
  151. package/lib/utilities/waitForBusData.js.map +1 -1
  152. package/package.json +16 -16
  153. package/lib/types/TaskEndDescription.d.ts +0 -26
  154. package/lib/types/TaskEndDescription.d.ts.map +0 -1
  155. package/lib/types/TaskEndDescription.js +0 -8
  156. package/lib/types/TaskEndDescription.js.map +0 -1
  157. package/lib/types/TaskStartDescription.d.ts +0 -19
  158. package/lib/types/TaskStartDescription.d.ts.map +0 -1
  159. package/lib/types/TaskStartDescription.js +0 -8
  160. package/lib/types/TaskStartDescription.js.map +0 -1
  161. package/lib/types/ZodGetLinkConfigOutput.d.ts +0 -4
  162. package/lib/types/ZodGetLinkConfigOutput.d.ts.map +0 -1
  163. package/lib/types/ZodGetLinkConfigOutput.js +0 -13
  164. package/lib/types/ZodGetLinkConfigOutput.js.map +0 -1
  165. package/lib/types/ZodNotifyLinkChangeInput.d.ts +0 -45
  166. package/lib/types/ZodNotifyLinkChangeInput.d.ts.map +0 -1
  167. package/lib/types/ZodNotifyLinkChangeInput.js +0 -8
  168. package/lib/types/ZodNotifyLinkChangeInput.js.map +0 -1
  169. package/lib/types/ZodResolveMap.d.ts +0 -4
  170. package/lib/types/ZodResolveMap.d.ts.map +0 -1
  171. package/lib/types/ZodResolveMap.js +0 -14
  172. package/lib/types/ZodResolveMap.js.map +0 -1
@@ -1,14 +1,18 @@
1
- import { publicProcedure } from '../trpc/common.js';
2
- import { z } from 'zod';
1
+ import { mutationProcedure } from '../trpc/common.js';
2
+ import { z } from 'zod/v4-mini';
3
3
  import path from 'path';
4
4
  import { spawnSync } from 'child_process';
5
5
  import { formatLocation } from '@ms-cloudpack/path-utilities';
6
- const ZodOpenCodeEditorInput = z.object({
6
+ import { matchingZodObject } from '../utilities/matchingZodObject.js';
7
+ const ZodOpenCodeEditorInput = matchingZodObject({
7
8
  rootPath: z.string(),
8
- relativePath: z.string().optional(),
9
- line: z.number().optional(),
10
- column: z.number().optional(),
9
+ relativePath: z.optional(z.string()),
10
+ line: z.optional(z.number()),
11
+ column: z.optional(z.number()),
11
12
  });
13
+ /**
14
+ * Open a file or folder in VS Code.
15
+ */
12
16
  export function openCodeEditor(params) {
13
17
  const { input: { rootPath, relativePath, line, column }, } = params;
14
18
  const fullPath = formatLocation({ file: path.resolve(rootPath, relativePath || ''), line, column });
@@ -16,5 +20,5 @@ export function openCodeEditor(params) {
16
20
  spawnSync('code', ['--goto', fullPath], { cwd: rootPath, stdio: 'inherit' });
17
21
  }
18
22
  // Attach a trpc procedure to the function.
19
- openCodeEditor.procedure = publicProcedure.input(ZodOpenCodeEditorInput).mutation(openCodeEditor);
23
+ openCodeEditor.procedure = mutationProcedure(openCodeEditor, ZodOpenCodeEditorInput, z.void());
20
24
  //# sourceMappingURL=openCodeEditor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"openCodeEditor.js","sourceRoot":"","sources":["../../src/apis/openCodeEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAGH,MAAM,UAAU,cAAc,CAAC,MAA6C;IAC1E,MAAM,EACJ,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,GAChD,GAAG,MAAM,CAAC;IACX,MAAM,QAAQ,GAAG,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAEpG,OAAO,CAAC,GAAG,CAAC,6BAA6B,QAAQ,EAAE,CAAC,CAAC;IAErD,SAAS,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAC/E,CAAC;AAED,2CAA2C;AAC3C,cAAc,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import { publicProcedure } from '../trpc/common.js';\nimport { z } from 'zod';\nimport path from 'path';\nimport { spawnSync } from 'child_process';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { formatLocation } from '@ms-cloudpack/path-utilities';\n\nconst ZodOpenCodeEditorInput = z.object({\n rootPath: z.string(),\n relativePath: z.string().optional(),\n line: z.number().optional(),\n column: z.number().optional(),\n});\nexport type OpenCodeEditorInput = z.infer<typeof ZodOpenCodeEditorInput>;\n\nexport function openCodeEditor(params: ApiParams<OpenCodeEditorInput, never>): void {\n const {\n input: { rootPath, relativePath, line, column },\n } = params;\n const fullPath = formatLocation({ file: path.resolve(rootPath, relativePath || ''), line, column });\n\n console.log(`Opening VSCode with path: ${fullPath}`);\n\n spawnSync('code', ['--goto', fullPath], { cwd: rootPath, stdio: 'inherit' });\n}\n\n// Attach a trpc procedure to the function.\nopenCodeEditor.procedure = publicProcedure.input(ZodOpenCodeEditorInput).mutation(openCodeEditor);\n"]}
1
+ {"version":3,"file":"openCodeEditor.js","sourceRoot":"","sources":["../../src/apis/openCodeEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAQtE,MAAM,sBAAsB,GAAG,iBAAiB,CAAsB;IACpE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC/B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAA6C;IAC1E,MAAM,EACJ,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,GAChD,GAAG,MAAM,CAAC;IACX,MAAM,QAAQ,GAAG,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAEpG,OAAO,CAAC,GAAG,CAAC,6BAA6B,QAAQ,EAAE,CAAC,CAAC;IAErD,SAAS,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAC/E,CAAC;AAED,2CAA2C;AAC3C,cAAc,CAAC,SAAS,GAAG,iBAAiB,CAC1C,cAAc,EACd,sBAAsB,EACtB,CAAC,CAAC,IAAI,EAAE,CACT,CAAC","sourcesContent":["import { mutationProcedure } from '../trpc/common.js';\nimport { z } from 'zod/v4-mini';\nimport path from 'path';\nimport { spawnSync } from 'child_process';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { formatLocation } from '@ms-cloudpack/path-utilities';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\nimport type { OpenFilePathInput } from './openFilePath.js';\n\nexport interface OpenCodeEditorInput extends OpenFilePathInput {\n line?: number;\n column?: number;\n}\n\nconst ZodOpenCodeEditorInput = matchingZodObject<OpenCodeEditorInput>({\n rootPath: z.string(),\n relativePath: z.optional(z.string()),\n line: z.optional(z.number()),\n column: z.optional(z.number()),\n});\n\n/**\n * Open a file or folder in VS Code.\n */\nexport function openCodeEditor(params: ApiParams<OpenCodeEditorInput, never>): void {\n const {\n input: { rootPath, relativePath, line, column },\n } = params;\n const fullPath = formatLocation({ file: path.resolve(rootPath, relativePath || ''), line, column });\n\n console.log(`Opening VSCode with path: ${fullPath}`);\n\n spawnSync('code', ['--goto', fullPath], { cwd: rootPath, stdio: 'inherit' });\n}\n\n// Attach a trpc procedure to the function.\nopenCodeEditor.procedure = mutationProcedure<OpenCodeEditorInput, void>(\n openCodeEditor,\n ZodOpenCodeEditorInput,\n z.void(),\n);\n"]}
@@ -1,10 +1,13 @@
1
1
  import type { ApiParams } from '../types/ApiParams.js';
2
+ /**
3
+ * Open the Cloudpack configuration file in VS Code.
4
+ */
2
5
  export declare function openConfigEditor(params: ApiParams<void, 'session', 'config'>): Promise<void>;
3
6
  export declare namespace openConfigEditor {
4
7
  var procedure: import("@trpc/server").TRPCMutationProcedure<{
5
8
  input: void;
6
9
  output: void;
7
- meta: object;
10
+ meta: never;
8
11
  }>;
9
12
  }
10
13
  //# sourceMappingURL=openConfigEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openConfigEditor.d.ts","sourceRoot":"","sources":["../../src/apis/openConfigEditor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAKlG;yBALqB,gBAAgB"}
1
+ {"version":3,"file":"openConfigEditor.d.ts","sourceRoot":"","sources":["../../src/apis/openConfigEditor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAKlG;yBALqB,gBAAgB"}
@@ -1,11 +1,15 @@
1
1
  import { ensureAppConfig } from '@ms-cloudpack/config';
2
2
  import { spawnSync } from 'child_process';
3
- import { publicProcedure } from '../trpc/common.js';
3
+ import { z } from 'zod/v4-mini';
4
+ import { mutationProcedure } from '../trpc/common.js';
5
+ /**
6
+ * Open the Cloudpack configuration file in VS Code.
7
+ */
4
8
  export async function openConfigEditor(params) {
5
9
  const cwd = params.ctx.session.config.appPath;
6
10
  const appConfigPath = await ensureAppConfig(cwd);
7
11
  spawnSync('code', ['--goto', appConfigPath], { cwd, stdio: 'inherit' });
8
12
  }
9
13
  // Attach a trpc procedure to the function.
10
- openConfigEditor.procedure = publicProcedure.mutation(openConfigEditor);
14
+ openConfigEditor.procedure = mutationProcedure(openConfigEditor, z.void(), z.void());
11
15
  //# sourceMappingURL=openConfigEditor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"openConfigEditor.js","sourceRoot":"","sources":["../../src/apis/openConfigEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAA4C;IACjF,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;IAC9C,MAAM,aAAa,GAAG,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC;IAEjD,SAAS,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,2CAA2C;AAC3C,gBAAgB,CAAC,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import { ensureAppConfig } from '@ms-cloudpack/config';\nimport { spawnSync } from 'child_process';\nimport { publicProcedure } from '../trpc/common.js';\nimport type { ApiParams } from '../types/ApiParams.js';\n\nexport async function openConfigEditor(params: ApiParams<void, 'session', 'config'>): Promise<void> {\n const cwd = params.ctx.session.config.appPath;\n const appConfigPath = await ensureAppConfig(cwd);\n\n spawnSync('code', ['--goto', appConfigPath], { cwd, stdio: 'inherit' });\n}\n\n// Attach a trpc procedure to the function.\nopenConfigEditor.procedure = publicProcedure.mutation(openConfigEditor);\n"]}
1
+ {"version":3,"file":"openConfigEditor.js","sourceRoot":"","sources":["../../src/apis/openConfigEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAA4C;IACjF,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;IAC9C,MAAM,aAAa,GAAG,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC;IAEjD,SAAS,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,2CAA2C;AAC3C,gBAAgB,CAAC,SAAS,GAAG,iBAAiB,CAAC,gBAAgB,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC","sourcesContent":["import { ensureAppConfig } from '@ms-cloudpack/config';\nimport { spawnSync } from 'child_process';\nimport { z } from 'zod/v4-mini';\nimport { mutationProcedure } from '../trpc/common.js';\nimport type { ApiParams } from '../types/ApiParams.js';\n\n/**\n * Open the Cloudpack configuration file in VS Code.\n */\nexport async function openConfigEditor(params: ApiParams<void, 'session', 'config'>): Promise<void> {\n const cwd = params.ctx.session.config.appPath;\n const appConfigPath = await ensureAppConfig(cwd);\n\n spawnSync('code', ['--goto', appConfigPath], { cwd, stdio: 'inherit' });\n}\n\n// Attach a trpc procedure to the function.\nopenConfigEditor.procedure = mutationProcedure(openConfigEditor, z.void(), z.void());\n"]}
@@ -1,26 +1,19 @@
1
- import { z } from 'zod';
2
1
  import type { ApiParams } from '../types/ApiParams.js';
3
- declare const ZodOpenFilePathInput: z.ZodObject<{
4
- rootPath: z.ZodString;
5
- relativePath: z.ZodOptional<z.ZodString>;
6
- }, "strip", z.ZodTypeAny, {
2
+ export interface OpenFilePathInput {
3
+ /** Root folder path */
7
4
  rootPath: string;
8
- relativePath?: string | undefined;
9
- }, {
10
- rootPath: string;
11
- relativePath?: string | undefined;
12
- }>;
13
- export type OpenFilePathInput = z.infer<typeof ZodOpenFilePathInput>;
5
+ /** File/folder path relative to `rootPath`. If not provided, opens `rootPath`. */
6
+ relativePath?: string;
7
+ }
8
+ /**
9
+ * Open a file or folder using the OS default application.
10
+ */
14
11
  export declare function openFilePath(params: ApiParams<OpenFilePathInput, 'session', 'config'>): void;
15
12
  export declare namespace openFilePath {
16
13
  var procedure: import("@trpc/server").TRPCMutationProcedure<{
17
- input: {
18
- rootPath: string;
19
- relativePath?: string | undefined;
20
- };
14
+ input: OpenFilePathInput;
21
15
  output: void;
22
- meta: object;
16
+ meta: never;
23
17
  }>;
24
18
  }
25
- export {};
26
19
  //# sourceMappingURL=openFilePath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openFilePath.d.ts","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,QAAA,MAAM,oBAAoB;;;;;;;;;EAGxB,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAErE,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,iBAAiB,EAAE,SAAS,EAAE,QAAQ,CAAC,GAAG,IAAI,CAc5F;yBAde,YAAY"}
1
+ {"version":3,"file":"openFilePath.d.ts","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIvD,MAAM,WAAW,iBAAiB;IAChC,uBAAuB;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAOD;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,iBAAiB,EAAE,SAAS,EAAE,QAAQ,CAAC,GAAG,IAAI,CAc5F;yBAde,YAAY"}
@@ -1,12 +1,16 @@
1
- import { publicProcedure } from '../trpc/common.js';
2
- import { z } from 'zod';
1
+ import { mutationProcedure } from '../trpc/common.js';
2
+ import { z } from 'zod/v4-mini';
3
3
  import { join } from 'path';
4
4
  import { spawnSync } from 'child_process';
5
5
  import { environmentInfo } from '@ms-cloudpack/environment';
6
- const ZodOpenFilePathInput = z.object({
6
+ import { matchingZodObject } from '../utilities/matchingZodObject.js';
7
+ const ZodOpenFilePathInput = matchingZodObject({
7
8
  rootPath: z.string(),
8
- relativePath: z.string().optional(),
9
+ relativePath: z.optional(z.string()),
9
10
  });
11
+ /**
12
+ * Open a file or folder using the OS default application.
13
+ */
10
14
  export function openFilePath(params) {
11
15
  const { input: { rootPath, relativePath }, ctx: { session }, } = params;
12
16
  const fullPath = join(rootPath, relativePath || '');
@@ -18,5 +22,5 @@ export function openFilePath(params) {
18
22
  });
19
23
  }
20
24
  // Attach a trpc procedure to the function.
21
- openFilePath.procedure = publicProcedure.input(ZodOpenFilePathInput).mutation(openFilePath);
25
+ openFilePath.procedure = mutationProcedure(openFilePath, ZodOpenFilePathInput, z.void());
22
26
  //# sourceMappingURL=openFilePath.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"openFilePath.js","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC;AAGH,MAAM,UAAU,YAAY,CAAC,MAAyD;IACpF,MAAM,EACJ,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EACjC,GAAG,EAAE,EAAE,OAAO,EAAE,GACjB,GAAG,MAAM,CAAC;IACX,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC;IAEpD,OAAO,CAAC,GAAG,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC;IAEzC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE;QAClE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO;QAC3B,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK;QAC3D,KAAK,EAAE,SAAS;KACjB,CAAC,CAAC;AACL,CAAC;AAED,2CAA2C;AAC3C,YAAY,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { publicProcedure } from '../trpc/common.js';\nimport { z } from 'zod';\nimport { join } from 'path';\nimport { spawnSync } from 'child_process';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { environmentInfo } from '@ms-cloudpack/environment';\n\nconst ZodOpenFilePathInput = z.object({\n rootPath: z.string(),\n relativePath: z.string().optional(),\n});\nexport type OpenFilePathInput = z.infer<typeof ZodOpenFilePathInput>;\n\nexport function openFilePath(params: ApiParams<OpenFilePathInput, 'session', 'config'>): void {\n const {\n input: { rootPath, relativePath },\n ctx: { session },\n } = params;\n const fullPath = join(rootPath, relativePath || '');\n\n console.log(`Opening path: ${fullPath}`);\n\n spawnSync(environmentInfo.isWindows ? 'start' : 'open', [fullPath], {\n cwd: session.config.appPath,\n shell: environmentInfo.isWindows ? 'powershell.exe' : false,\n stdio: 'inherit',\n });\n}\n\n// Attach a trpc procedure to the function.\nopenFilePath.procedure = publicProcedure.input(ZodOpenFilePathInput).mutation(openFilePath);\n"]}
1
+ {"version":3,"file":"openFilePath.js","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAStE,MAAM,oBAAoB,GAAG,iBAAiB,CAAoB;IAChE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACrC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,MAAyD;IACpF,MAAM,EACJ,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EACjC,GAAG,EAAE,EAAE,OAAO,EAAE,GACjB,GAAG,MAAM,CAAC;IACX,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC;IAEpD,OAAO,CAAC,GAAG,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC;IAEzC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE;QAClE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO;QAC3B,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK;QAC3D,KAAK,EAAE,SAAS;KACjB,CAAC,CAAC;AACL,CAAC;AAED,2CAA2C;AAC3C,YAAY,CAAC,SAAS,GAAG,iBAAiB,CAA0B,YAAY,EAAE,oBAAoB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC","sourcesContent":["import { mutationProcedure } from '../trpc/common.js';\nimport { z } from 'zod/v4-mini';\nimport { join } from 'path';\nimport { spawnSync } from 'child_process';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { environmentInfo } from '@ms-cloudpack/environment';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\n\nexport interface OpenFilePathInput {\n /** Root folder path */\n rootPath: string;\n /** File/folder path relative to `rootPath`. If not provided, opens `rootPath`. */\n relativePath?: string;\n}\n\nconst ZodOpenFilePathInput = matchingZodObject<OpenFilePathInput>({\n rootPath: z.string(),\n relativePath: z.optional(z.string()),\n});\n\n/**\n * Open a file or folder using the OS default application.\n */\nexport function openFilePath(params: ApiParams<OpenFilePathInput, 'session', 'config'>): void {\n const {\n input: { rootPath, relativePath },\n ctx: { session },\n } = params;\n const fullPath = join(rootPath, relativePath || '');\n\n console.log(`Opening path: ${fullPath}`);\n\n spawnSync(environmentInfo.isWindows ? 'start' : 'open', [fullPath], {\n cwd: session.config.appPath,\n shell: environmentInfo.isWindows ? 'powershell.exe' : false,\n stdio: 'inherit',\n });\n}\n\n// Attach a trpc procedure to the function.\nopenFilePath.procedure = mutationProcedure<OpenFilePathInput, void>(openFilePath, ZodOpenFilePathInput, z.void());\n"]}
@@ -1,28 +1,18 @@
1
- import { z } from 'zod';
2
1
  import type { ApiParams } from '../types/ApiParams.js';
3
- declare const ZodPublishDataInput: z.ZodObject<{
4
- path: z.ZodArray<z.ZodString, "many">;
5
- data: z.ZodUnknown;
6
- }, "strip", z.ZodTypeAny, {
7
- path: string[];
8
- data?: unknown;
9
- }, {
10
- path: string[];
11
- data?: unknown;
12
- }>;
13
- type PublishDataInput = z.infer<typeof ZodPublishDataInput>;
2
+ import type { GetDataInput } from './getData.js';
3
+ interface PublishDataInput extends GetDataInput {
4
+ /** Data to publish */
5
+ data: unknown;
6
+ }
14
7
  /**
15
8
  * Allows clients to publish data to the bus
16
9
  */
17
10
  export declare function publishData(params: ApiParams<PublishDataInput, 'bus'>): void;
18
11
  export declare namespace publishData {
19
12
  var procedure: import("@trpc/server").TRPCMutationProcedure<{
20
- input: {
21
- path: string[];
22
- data?: unknown;
23
- };
13
+ input: PublishDataInput;
24
14
  output: void;
25
- meta: object;
15
+ meta: never;
26
16
  }>;
27
17
  }
28
18
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"publishData.d.ts","sourceRoot":"","sources":["../../src/apis/publishData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,QAAA,MAAM,mBAAmB;;;;;;;;;EAGvB,CAAC;AACH,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE5D;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC,GAAG,IAAI,CAO5E;yBAPe,WAAW"}
1
+ {"version":3,"file":"publishData.d.ts","sourceRoot":"","sources":["../../src/apis/publishData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,UAAU,gBAAiB,SAAQ,YAAY;IAC7C,sBAAsB;IACtB,IAAI,EAAE,OAAO,CAAC;CACf;AAOD;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC,GAAG,IAAI,CAO5E;yBAPe,WAAW"}
@@ -1,6 +1,7 @@
1
- import { z } from 'zod';
2
- import { publicProcedure } from '../trpc/common.js';
3
- const ZodPublishDataInput = z.object({
1
+ import { z } from 'zod/v4-mini';
2
+ import { mutationProcedure } from '../trpc/common.js';
3
+ import { matchingZodObject } from '../utilities/matchingZodObject.js';
4
+ const ZodPublishDataInput = matchingZodObject({
4
5
  path: z.array(z.string()),
5
6
  data: z.unknown(),
6
7
  });
@@ -12,5 +13,5 @@ export function publishData(params) {
12
13
  bus.publish(path, data);
13
14
  }
14
15
  // Attach a trpc procedure to the function.
15
- publishData.procedure = publicProcedure.input(ZodPublishDataInput).mutation(publishData);
16
+ publishData.procedure = mutationProcedure(publishData, ZodPublishDataInput, z.void());
16
17
  //# sourceMappingURL=publishData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"publishData.js","sourceRoot":"","sources":["../../src/apis/publishData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE;CAClB,CAAC,CAAC;AAGH;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAA0C;IACpE,MAAM,EACJ,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EACrB,GAAG,EAAE,EAAE,GAAG,EAAE,GACb,GAAG,MAAM,CAAC;IAEX,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,2CAA2C;AAC3C,WAAW,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { publicProcedure } from '../trpc/common.js';\nimport type { ApiParams } from '../types/ApiParams.js';\n\nconst ZodPublishDataInput = z.object({\n path: z.array(z.string()),\n data: z.unknown(),\n});\ntype PublishDataInput = z.infer<typeof ZodPublishDataInput>;\n\n/**\n * Allows clients to publish data to the bus\n */\nexport function publishData(params: ApiParams<PublishDataInput, 'bus'>): void {\n const {\n input: { path, data },\n ctx: { bus },\n } = params;\n\n bus.publish(path, data);\n}\n\n// Attach a trpc procedure to the function.\npublishData.procedure = publicProcedure.input(ZodPublishDataInput).mutation(publishData);\n"]}
1
+ {"version":3,"file":"publishData.js","sourceRoot":"","sources":["../../src/apis/publishData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAQtE,MAAM,mBAAmB,GAAG,iBAAiB,CAAmB;IAC9D,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE;CAClB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAA0C;IACpE,MAAM,EACJ,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EACrB,GAAG,EAAE,EAAE,GAAG,EAAE,GACb,GAAG,MAAM,CAAC;IAEX,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,2CAA2C;AAC3C,WAAW,CAAC,SAAS,GAAG,iBAAiB,CAAyB,WAAW,EAAE,mBAAmB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC","sourcesContent":["import { z } from 'zod/v4-mini';\nimport { mutationProcedure } from '../trpc/common.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\nimport type { GetDataInput } from './getData.js';\n\ninterface PublishDataInput extends GetDataInput {\n /** Data to publish */\n data: unknown;\n}\n\nconst ZodPublishDataInput = matchingZodObject<PublishDataInput>({\n path: z.array(z.string()),\n data: z.unknown(),\n});\n\n/**\n * Allows clients to publish data to the bus\n */\nexport function publishData(params: ApiParams<PublishDataInput, 'bus'>): void {\n const {\n input: { path, data },\n ctx: { bus },\n } = params;\n\n bus.publish(path, data);\n}\n\n// Attach a trpc procedure to the function.\npublishData.procedure = mutationProcedure<PublishDataInput, void>(publishData, ZodPublishDataInput, z.void());\n"]}
@@ -1,37 +1,19 @@
1
- import { z } from 'zod';
2
1
  import type { ApiParams } from '../types/ApiParams.js';
3
- declare const SpanInput: z.ZodObject<{
4
- name: z.ZodString;
5
- startTime: z.ZodNumber;
6
- endTime: z.ZodNumber;
7
- attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
8
- }, "strip", z.ZodTypeAny, {
2
+ export interface ReportSpanInput {
9
3
  name: string;
10
4
  startTime: number;
11
5
  endTime: number;
12
- attributes?: Record<string, string | number | boolean> | undefined;
13
- }, {
14
- name: string;
15
- startTime: number;
16
- endTime: number;
17
- attributes?: Record<string, string | number | boolean> | undefined;
18
- }>;
19
- export type SpanInput = z.infer<typeof SpanInput>;
6
+ attributes?: Record<string, string | number | boolean>;
7
+ }
20
8
  /**
21
9
  * Report spans to the telemetry client. This is useful for reporting spans that were captured in the browser.
22
10
  */
23
- export declare function reportSpan(params: ApiParams<SpanInput, 'telemetryClient', 'sequence'>): void;
11
+ export declare function reportSpan(params: ApiParams<ReportSpanInput, 'telemetryClient', 'sequence'>): void;
24
12
  export declare namespace reportSpan {
25
13
  var procedure: import("@trpc/server").TRPCMutationProcedure<{
26
- input: {
27
- name: string;
28
- startTime: number;
29
- endTime: number;
30
- attributes?: Record<string, string | number | boolean> | undefined;
31
- };
14
+ input: ReportSpanInput;
32
15
  output: void;
33
- meta: object;
16
+ meta: never;
34
17
  }>;
35
18
  }
36
- export {};
37
19
  //# sourceMappingURL=reportSpan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reportSpan.d.ts","sourceRoot":"","sources":["../../src/apis/reportSpan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;EAKb,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,CAAC,GAAG,IAAI,CAc5F;yBAde,UAAU"}
1
+ {"version":3,"file":"reportSpan.d.ts","sourceRoot":"","sources":["../../src/apis/reportSpan.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACxD;AASD;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,iBAAiB,EAAE,UAAU,CAAC,GAAG,IAAI,CAclG;yBAde,UAAU"}
@@ -1,10 +1,11 @@
1
- import { publicProcedure } from '../trpc/common.js';
2
- import { z } from 'zod';
3
- const SpanInput = z.object({
1
+ import { mutationProcedure } from '../trpc/common.js';
2
+ import { z } from 'zod/v4-mini';
3
+ import { matchingZodObject } from '../utilities/matchingZodObject.js';
4
+ const ZodReportSpanInput = matchingZodObject({
4
5
  name: z.string(),
5
6
  startTime: z.number(),
6
7
  endTime: z.number(),
7
- attributes: z.optional(z.record(z.union([z.string(), z.number(), z.boolean()]))),
8
+ attributes: z.optional(z.record(z.string(), z.union([z.string(), z.number(), z.boolean()]))),
8
9
  });
9
10
  /**
10
11
  * Report spans to the telemetry client. This is useful for reporting spans that were captured in the browser.
@@ -24,5 +25,5 @@ export function reportSpan(params) {
24
25
  .end(endTime);
25
26
  }
26
27
  // Attach a trpc procedure to the function.
27
- reportSpan.procedure = publicProcedure.input(SpanInput).mutation(reportSpan);
28
+ reportSpan.procedure = mutationProcedure(reportSpan, ZodReportSpanInput, z.void());
28
29
  //# sourceMappingURL=reportSpan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reportSpan.js","sourceRoot":"","sources":["../../src/apis/reportSpan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;CACjF,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,MAA2D;IACpF,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;IACzC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAEvD,eAAe,CAAC,MAAM;SACnB,SAAS,CAAC,IAAI,EAAE;QACf,UAAU,EAAE;YACV,GAAG,UAAU;YACb,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B;QACD,SAAS;KACV,CAAC;SACD,GAAG,CAAC,OAAO,CAAC,CAAC;AAClB,CAAC;AAED,2CAA2C;AAC3C,UAAU,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { publicProcedure } from '../trpc/common.js';\nimport { z } from 'zod';\nimport type { ApiParams } from '../types/ApiParams.js';\n\nconst SpanInput = z.object({\n name: z.string(),\n startTime: z.number(),\n endTime: z.number(),\n attributes: z.optional(z.record(z.union([z.string(), z.number(), z.boolean()]))),\n});\n\nexport type SpanInput = z.infer<typeof SpanInput>;\n\n/**\n * Report spans to the telemetry client. This is useful for reporting spans that were captured in the browser.\n */\nexport function reportSpan(params: ApiParams<SpanInput, 'telemetryClient', 'sequence'>): void {\n const { input, ctx } = params;\n const { telemetryClient, session } = ctx;\n const { name, endTime, startTime, attributes } = input;\n\n telemetryClient.tracer\n .startSpan(name, {\n attributes: {\n ...attributes,\n sequence: session.sequence,\n },\n startTime,\n })\n .end(endTime);\n}\n\n// Attach a trpc procedure to the function.\nreportSpan.procedure = publicProcedure.input(SpanInput).mutation(reportSpan);\n"]}
1
+ {"version":3,"file":"reportSpan.js","sourceRoot":"","sources":["../../src/apis/reportSpan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAStE,MAAM,kBAAkB,GAAG,iBAAiB,CAAkB;IAC5D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;CAC7F,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,MAAiE;IAC1F,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;IACzC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAEvD,eAAe,CAAC,MAAM;SACnB,SAAS,CAAC,IAAI,EAAE;QACf,UAAU,EAAE;YACV,GAAG,UAAU;YACb,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B;QACD,SAAS;KACV,CAAC;SACD,GAAG,CAAC,OAAO,CAAC,CAAC;AAClB,CAAC;AAED,2CAA2C;AAC3C,UAAU,CAAC,SAAS,GAAG,iBAAiB,CAAwB,UAAU,EAAE,kBAAkB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC","sourcesContent":["import { mutationProcedure } from '../trpc/common.js';\nimport { z } from 'zod/v4-mini';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\n\nexport interface ReportSpanInput {\n name: string;\n startTime: number;\n endTime: number;\n attributes?: Record<string, string | number | boolean>;\n}\n\nconst ZodReportSpanInput = matchingZodObject<ReportSpanInput>({\n name: z.string(),\n startTime: z.number(),\n endTime: z.number(),\n attributes: z.optional(z.record(z.string(), z.union([z.string(), z.number(), z.boolean()]))),\n});\n\n/**\n * Report spans to the telemetry client. This is useful for reporting spans that were captured in the browser.\n */\nexport function reportSpan(params: ApiParams<ReportSpanInput, 'telemetryClient', 'sequence'>): void {\n const { input, ctx } = params;\n const { telemetryClient, session } = ctx;\n const { name, endTime, startTime, attributes } = input;\n\n telemetryClient.tracer\n .startSpan(name, {\n attributes: {\n ...attributes,\n sequence: session.sequence,\n },\n startTime,\n })\n .end(endTime);\n}\n\n// Attach a trpc procedure to the function.\nreportSpan.procedure = mutationProcedure<ReportSpanInput, void>(reportSpan, ZodReportSpanInput, z.void());\n"]}
@@ -4,7 +4,7 @@ export declare namespace restartAllTasks {
4
4
  var procedure: import("@trpc/server").TRPCMutationProcedure<{
5
5
  input: void;
6
6
  output: void;
7
- meta: object;
7
+ meta: never;
8
8
  }>;
9
9
  }
10
10
  //# sourceMappingURL=restartAllTasks.d.ts.map
@@ -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,CACnC,MAAM,EAAE,SAAS,CACf,IAAI,EACJ,KAAK,GAAG,YAAY,GAAG,iBAAiB,EACxC,WAAW,GAAG,yBAAyB,GAAG,UAAU,CACrD,GACA,OAAO,CAAC,IAAI,CAAC,CAmBf;yBAzBqB,eAAe"}
1
+ {"version":3,"file":"restartAllTasks.d.ts","sourceRoot":"","sources":["../../src/apis/restartAllTasks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,wBAAsB,eAAe,CACnC,MAAM,EAAE,SAAS,CACf,IAAI,EACJ,KAAK,GAAG,YAAY,GAAG,iBAAiB,EACxC,WAAW,GAAG,yBAAyB,GAAG,UAAU,CACrD,GACA,OAAO,CAAC,IAAI,CAAC,CAyBf;yBA/BqB,eAAe"}
@@ -1,20 +1,27 @@
1
1
  import fsPromises from 'fs/promises';
2
- import { publicProcedure } from '../trpc/common.js';
2
+ import { z } from 'zod/v4-mini';
3
+ import { mutationProcedure } from '../trpc/common.js';
3
4
  import { notifyReload } from '../utilities/notifyReload.js';
4
5
  export async function restartAllTasks(params) {
5
6
  const { ctx } = params;
6
7
  const { session, bus, taskRunner, telemetryClient } = ctx;
7
8
  console.debug('ApiServer: Restarting all tasks');
9
+ // Delete all this session's bundle results from disk, and clear the task runner's
10
+ // in-memory records. This also sends an empty task list to the client.
11
+ await taskRunner.clearAllResults();
8
12
  // 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 });
13
+ // TODO: update this to be more granular--deleting TaskRunner task results isn't enough since
14
+ // this won't include packages that were implicitly loaded from the browser cache.
15
+ // A better/faster way than deleting files would be if we can force the session version update
16
+ // below to be reflected in all URLs, or use a special query param to force new bundles on reload
17
+ // (even if a cached version with matching hash exists). An in-between solution might be to
18
+ // delete all cached bundles referenced by the current resolve map.
19
+ // Tracking: https://github.com/microsoft/cloudpack/issues/3003
20
+ await fsPromises.rm(session.cachePath, { force: true, recursive: true, maxRetries: 5 });
11
21
  await fsPromises.mkdir(session.cachePath, { recursive: true });
12
- // All tasks can be removed as notifyReload()
13
- // will cause the client to add the tasks again.
14
- taskRunner.clear();
15
22
  // Update session version.
16
23
  session.incrementSessionVersion();
17
24
  await notifyReload({ reason: 'restart-all-tasks' }, { bus, session, telemetryClient });
18
25
  }
19
- restartAllTasks.procedure = publicProcedure.mutation(restartAllTasks);
26
+ restartAllTasks.procedure = mutationProcedure(restartAllTasks, z.void(), z.void());
20
27
  //# sourceMappingURL=restartAllTasks.js.map
@@ -1 +1 @@
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,CACnC,MAIC;IAED,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,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;AACzF,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(\n params: ApiParams<\n void,\n 'bus' | 'taskRunner' | 'telemetryClient',\n 'cachePath' | 'incrementSessionVersion' | 'sequence'\n >,\n): Promise<void> {\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 await notifyReload({ reason: 'restart-all-tasks' }, { bus, session, telemetryClient });\n}\n\nrestartAllTasks.procedure = publicProcedure.mutation(restartAllTasks);\n"]}
1
+ {"version":3,"file":"restartAllTasks.js","sourceRoot":"","sources":["../../src/apis/restartAllTasks.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAIC;IAED,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,kFAAkF;IAClF,uEAAuE;IACvE,MAAM,UAAU,CAAC,eAAe,EAAE,CAAC;IAEnC,gCAAgC;IAChC,6FAA6F;IAC7F,kFAAkF;IAClF,8FAA8F;IAC9F,iGAAiG;IACjG,2FAA2F;IAC3F,mEAAmE;IACnE,+DAA+D;IAC/D,MAAM,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;IACxF,MAAM,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE/D,0BAA0B;IAC1B,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAElC,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;AACzF,CAAC;AAED,eAAe,CAAC,SAAS,GAAG,iBAAiB,CAAC,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC","sourcesContent":["import fsPromises from 'fs/promises';\nimport { z } from 'zod/v4-mini';\nimport { mutationProcedure } from '../trpc/common.js';\nimport { notifyReload } from '../utilities/notifyReload.js';\nimport type { ApiParams } from '../types/ApiParams.js';\n\nexport async function restartAllTasks(\n params: ApiParams<\n void,\n 'bus' | 'taskRunner' | 'telemetryClient',\n 'cachePath' | 'incrementSessionVersion' | 'sequence'\n >,\n): Promise<void> {\n const { ctx } = params;\n const { session, bus, taskRunner, telemetryClient } = ctx;\n\n console.debug('ApiServer: Restarting all tasks');\n\n // Delete all this session's bundle results from disk, and clear the task runner's\n // in-memory records. This also sends an empty task list to the client.\n await taskRunner.clearAllResults();\n\n // Clear entire cloudpack cache.\n // TODO: update this to be more granular--deleting TaskRunner task results isn't enough since\n // this won't include packages that were implicitly loaded from the browser cache.\n // A better/faster way than deleting files would be if we can force the session version update\n // below to be reflected in all URLs, or use a special query param to force new bundles on reload\n // (even if a cached version with matching hash exists). An in-between solution might be to\n // delete all cached bundles referenced by the current resolve map.\n // Tracking: https://github.com/microsoft/cloudpack/issues/3003\n await fsPromises.rm(session.cachePath, { force: true, recursive: true, maxRetries: 5 });\n await fsPromises.mkdir(session.cachePath, { recursive: true });\n\n // Update session version.\n session.incrementSessionVersion();\n\n await notifyReload({ reason: 'restart-all-tasks' }, { bus, session, telemetryClient });\n}\n\nrestartAllTasks.procedure = mutationProcedure(restartAllTasks, z.void(), z.void());\n"]}
@@ -1,16 +1,6 @@
1
- import { z } from 'zod';
2
1
  import type { ApiParams } from '../types/ApiParams.js';
3
- declare const ZodRestartTaskInput: z.ZodObject<{
4
- id: z.ZodString;
5
- inputPath: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- id: string;
8
- inputPath: string;
9
- }, {
10
- id: string;
11
- inputPath: string;
12
- }>;
13
- export type RestartTaskInput = z.infer<typeof ZodRestartTaskInput>;
2
+ import type { TaskDescription } from '../types/TaskDescription.js';
3
+ export type RestartTaskInput = Pick<TaskDescription, 'id' | 'inputPath'>;
14
4
  /**
15
5
  * Remove the record of a specific task (usually bundle result) and notify the client to reload,
16
6
  * which will trigger the task to be re-run.
@@ -18,13 +8,9 @@ export type RestartTaskInput = z.infer<typeof ZodRestartTaskInput>;
18
8
  export declare function restartTask(params: ApiParams<RestartTaskInput, 'bus' | 'taskRunner' | 'telemetryClient', 'incrementTargetVersion' | 'sequence'>): Promise<void>;
19
9
  export declare namespace restartTask {
20
10
  var procedure: import("@trpc/server").TRPCMutationProcedure<{
21
- input: {
22
- id: string;
23
- inputPath: string;
24
- };
11
+ input: RestartTaskInput;
25
12
  output: void;
26
- meta: object;
13
+ meta: never;
27
14
  }>;
28
15
  }
29
- export {};
30
16
  //# sourceMappingURL=restartTask.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"restartTask.d.ts","sourceRoot":"","sources":["../../src/apis/restartTask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,QAAA,MAAM,mBAAmB;;;;;;;;;EAGvB,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEnE;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,SAAS,CAAC,gBAAgB,EAAE,KAAK,GAAG,YAAY,GAAG,iBAAiB,EAAE,wBAAwB,GAAG,UAAU,CAAC,GACnH,OAAO,CAAC,IAAI,CAAC,CASf;yBAXqB,WAAW"}
1
+ {"version":3,"file":"restartTask.d.ts","sourceRoot":"","sources":["../../src/apis/restartTask.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGnE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC;AAMzE;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,SAAS,CAAC,gBAAgB,EAAE,KAAK,GAAG,YAAY,GAAG,iBAAiB,EAAE,wBAAwB,GAAG,UAAU,CAAC,GACnH,OAAO,CAAC,IAAI,CAAC,CASf;yBAXqB,WAAW"}
@@ -1,7 +1,8 @@
1
- import { z } from 'zod';
2
- import { publicProcedure } from '../trpc/common.js';
1
+ import { z } from 'zod/v4-mini';
2
+ import { mutationProcedure } from '../trpc/common.js';
3
3
  import { notifyReload } from '../utilities/notifyReload.js';
4
- const ZodRestartTaskInput = z.object({
4
+ import { matchingZodObject } from '../utilities/matchingZodObject.js';
5
+ const ZodRestartTaskInput = matchingZodObject({
5
6
  id: z.string(),
6
7
  inputPath: z.string(),
7
8
  });
@@ -14,10 +15,10 @@ export async function restartTask(params) {
14
15
  const { id, inputPath } = input;
15
16
  const { session, bus, taskRunner, telemetryClient } = ctx;
16
17
  console.debug(`ApiServer: Restarting task ${id}`);
17
- taskRunner.remove(id);
18
+ await taskRunner.clearResult(id);
18
19
  session.incrementTargetVersion(inputPath);
19
20
  await notifyReload({ reason: 'restart-task' }, { bus, session, telemetryClient });
20
21
  }
21
22
  // Attach a trpc procedure to the function.
22
- restartTask.procedure = publicProcedure.input(ZodRestartTaskInput).mutation(restartTask);
23
+ restartTask.procedure = mutationProcedure(restartTask, ZodRestartTaskInput, z.void());
23
24
  //# sourceMappingURL=restartTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"restartTask.js","sourceRoot":"","sources":["../../src/apis/restartTask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAoH;IAEpH,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAChC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAE1D,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC;IAClD,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACtB,OAAO,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;AACpF,CAAC;AAED,2CAA2C;AAC3C,WAAW,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { publicProcedure } from '../trpc/common.js';\nimport { notifyReload } from '../utilities/notifyReload.js';\nimport type { ApiParams } from '../types/ApiParams.js';\n\nconst ZodRestartTaskInput = z.object({\n id: z.string(),\n inputPath: z.string(),\n});\nexport type RestartTaskInput = z.infer<typeof ZodRestartTaskInput>;\n\n/**\n * Remove the record of a specific task (usually bundle result) and notify the client to reload,\n * which will trigger the task to be re-run.\n */\nexport async function restartTask(\n params: ApiParams<RestartTaskInput, 'bus' | 'taskRunner' | 'telemetryClient', 'incrementTargetVersion' | 'sequence'>,\n): Promise<void> {\n const { input, ctx } = params;\n const { id, inputPath } = input;\n const { session, bus, taskRunner, telemetryClient } = ctx;\n\n console.debug(`ApiServer: Restarting task ${id}`);\n taskRunner.remove(id);\n session.incrementTargetVersion(inputPath);\n await notifyReload({ reason: 'restart-task' }, { bus, session, telemetryClient });\n}\n\n// Attach a trpc procedure to the function.\nrestartTask.procedure = publicProcedure.input(ZodRestartTaskInput).mutation(restartTask);\n"]}
1
+ {"version":3,"file":"restartTask.js","sourceRoot":"","sources":["../../src/apis/restartTask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,MAAM,mBAAmB,GAAG,iBAAiB,CAAmB;IAC9D,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAoH;IAEpH,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAChC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAE1D,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACjC,OAAO,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;AACpF,CAAC;AAED,2CAA2C;AAC3C,WAAW,CAAC,SAAS,GAAG,iBAAiB,CAAyB,WAAW,EAAE,mBAAmB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC","sourcesContent":["import { z } from 'zod/v4-mini';\nimport { mutationProcedure } from '../trpc/common.js';\nimport { notifyReload } from '../utilities/notifyReload.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport type { TaskDescription } from '../types/TaskDescription.js';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\n\nexport type RestartTaskInput = Pick<TaskDescription, 'id' | 'inputPath'>;\nconst ZodRestartTaskInput = matchingZodObject<RestartTaskInput>({\n id: z.string(),\n inputPath: z.string(),\n});\n\n/**\n * Remove the record of a specific task (usually bundle result) and notify the client to reload,\n * which will trigger the task to be re-run.\n */\nexport async function restartTask(\n params: ApiParams<RestartTaskInput, 'bus' | 'taskRunner' | 'telemetryClient', 'incrementTargetVersion' | 'sequence'>,\n): Promise<void> {\n const { input, ctx } = params;\n const { id, inputPath } = input;\n const { session, bus, taskRunner, telemetryClient } = ctx;\n\n console.debug(`ApiServer: Restarting task ${id}`);\n await taskRunner.clearResult(id);\n session.incrementTargetVersion(inputPath);\n await notifyReload({ reason: 'restart-task' }, { bus, session, telemetryClient });\n}\n\n// Attach a trpc procedure to the function.\nrestartTask.procedure = mutationProcedure<RestartTaskInput, void>(restartTask, ZodRestartTaskInput, z.void());\n"]}
@@ -6,14 +6,9 @@ import { type LinkPathInput, type LinkPathOutput } from '../types/LinkPath.js';
6
6
  export declare function unlinkPath(params: ApiParams<LinkPathInput, 'bus' | 'reporter' | 'telemetryClient', 'incrementSessionVersion' | 'linkedPaths' | 'projectName' | 'removeLinkedPath' | 'resolveMap' | 'sequence'>): Promise<LinkPathOutput>;
7
7
  export declare namespace unlinkPath {
8
8
  var procedure: import("@trpc/server").TRPCMutationProcedure<{
9
- input: {
10
- linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
11
- };
12
- output: {
13
- resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
14
- linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
15
- };
16
- meta: object;
9
+ input: LinkPathInput;
10
+ output: LinkPathOutput;
11
+ meta: never;
17
12
  }>;
18
13
  }
19
14
  //# sourceMappingURL=unlinkPath.d.ts.map
@@ -1,4 +1,4 @@
1
- import { publicProcedure } from '../trpc/common.js';
1
+ import { mutationProcedure } from '../trpc/common.js';
2
2
  import { notifyReload } from '../utilities/notifyReload.js';
3
3
  import { ZodLinkPathInput, ZodLinkPathOutput } from '../types/LinkPath.js';
4
4
  /**
@@ -20,9 +20,9 @@ export async function unlinkPath(params) {
20
20
  });
21
21
  }
22
22
  catch (e) {
23
- task.complete({ status: 'fail', message: `Failed to unlink paths`, forceShow: true });
23
+ task.complete({ status: 'fail', message: `Failed to unlink paths: ${e.stack || e}`, forceShow: true });
24
24
  }
25
25
  return result;
26
26
  }
27
- unlinkPath.procedure = publicProcedure.input(ZodLinkPathInput).output(ZodLinkPathOutput).mutation(unlinkPath);
27
+ unlinkPath.procedure = mutationProcedure(unlinkPath, ZodLinkPathInput, ZodLinkPathOutput);
28
28
  //# sourceMappingURL=unlinkPath.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unlinkPath.js","sourceRoot":"","sources":["../../src/apis/unlinkPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAA2C,MAAM,sBAAsB,CAAC;AAEpH;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,MAIC;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC7B,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IACxD,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,sBAAsB,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAC3E,IAAI,MAAM,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;IAClF,IAAI,CAAC;QACH,MAAM,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,aAAa,EAAE,KAAK,IAAI,EAAE;YACrE,mCAAmC;YACnC,MAAM,GAAG,MAAM,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACpD,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAClF,OAAO,CAAC,uBAAuB,EAAE,CAAC;YAClC,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;QACnF,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,UAAU,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { publicProcedure } from '../trpc/common.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { notifyReload } from '../utilities/notifyReload.js';\nimport { ZodLinkPathInput, ZodLinkPathOutput, type LinkPathInput, type LinkPathOutput } from '../types/LinkPath.js';\n\n/**\n * Unlinks a path to the session.\n */\nexport async function unlinkPath(\n params: ApiParams<\n LinkPathInput,\n 'bus' | 'reporter' | 'telemetryClient',\n 'incrementSessionVersion' | 'linkedPaths' | 'projectName' | 'removeLinkedPath' | 'resolveMap' | 'sequence'\n >,\n): Promise<LinkPathOutput> {\n const { input, ctx } = params;\n const { linkedPath } = input;\n const { session, reporter, bus, telemetryClient } = ctx;\n const task = reporter.addTask(`Unlinking paths in ${session.projectName}`);\n let result = { resolveMap: session.resolveMap, linkedPaths: session.linkedPaths };\n try {\n await telemetryClient.tracer.startActiveSpan('UNLINK_PATH', async () => {\n // Remove linked paths from session\n result = await session.removeLinkedPath(linkedPath);\n task.complete({ status: 'complete', message: `Unlinked paths`, forceShow: true });\n session.incrementSessionVersion();\n await notifyReload({ reason: 'unlink-path' }, { bus, session, telemetryClient });\n });\n } catch (e) {\n task.complete({ status: 'fail', message: `Failed to unlink paths`, forceShow: true });\n }\n\n return result;\n}\n\nunlinkPath.procedure = publicProcedure.input(ZodLinkPathInput).output(ZodLinkPathOutput).mutation(unlinkPath);\n"]}
1
+ {"version":3,"file":"unlinkPath.js","sourceRoot":"","sources":["../../src/apis/unlinkPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAA2C,MAAM,sBAAsB,CAAC;AAEpH;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,MAIC;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC7B,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IACxD,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,sBAAsB,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAC3E,IAAI,MAAM,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;IAClF,IAAI,CAAC;QACH,MAAM,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,aAAa,EAAE,KAAK,IAAI,EAAE;YACrE,mCAAmC;YACnC,MAAM,GAAG,MAAM,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACpD,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAClF,OAAO,CAAC,uBAAuB,EAAE,CAAC;YAClC,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;QACnF,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,2BAA4B,CAAW,CAAC,KAAK,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,UAAU,CAAC,SAAS,GAAG,iBAAiB,CACtC,UAAU,EACV,gBAAgB,EAChB,iBAAiB,CAClB,CAAC","sourcesContent":["import { mutationProcedure } from '../trpc/common.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { notifyReload } from '../utilities/notifyReload.js';\nimport { ZodLinkPathInput, ZodLinkPathOutput, type LinkPathInput, type LinkPathOutput } from '../types/LinkPath.js';\n\n/**\n * Unlinks a path to the session.\n */\nexport async function unlinkPath(\n params: ApiParams<\n LinkPathInput,\n 'bus' | 'reporter' | 'telemetryClient',\n 'incrementSessionVersion' | 'linkedPaths' | 'projectName' | 'removeLinkedPath' | 'resolveMap' | 'sequence'\n >,\n): Promise<LinkPathOutput> {\n const { input, ctx } = params;\n const { linkedPath } = input;\n const { session, reporter, bus, telemetryClient } = ctx;\n const task = reporter.addTask(`Unlinking paths in ${session.projectName}`);\n let result = { resolveMap: session.resolveMap, linkedPaths: session.linkedPaths };\n try {\n await telemetryClient.tracer.startActiveSpan('UNLINK_PATH', async () => {\n // Remove linked paths from session\n result = await session.removeLinkedPath(linkedPath);\n task.complete({ status: 'complete', message: `Unlinked paths`, forceShow: true });\n session.incrementSessionVersion();\n await notifyReload({ reason: 'unlink-path' }, { bus, session, telemetryClient });\n });\n } catch (e) {\n task.complete({ status: 'fail', message: `Failed to unlink paths: ${(e as Error).stack || e}`, forceShow: true });\n }\n\n return result;\n}\n\nunlinkPath.procedure = mutationProcedure<LinkPathInput, LinkPathOutput>(\n unlinkPath,\n ZodLinkPathInput,\n ZodLinkPathOutput,\n);\n"]}
@@ -9,7 +9,7 @@ export declare namespace validatePackageOverride {
9
9
  var procedure: import("@trpc/server").TRPCQueryProcedure<{
10
10
  input: ValidatePackageOverrideInput;
11
11
  output: ValidatePackageOverrideOutput;
12
- meta: object;
12
+ meta: never;
13
13
  }>;
14
14
  }
15
15
  //# sourceMappingURL=validatePackageOverride.d.ts.map
@@ -1,12 +1,12 @@
1
- import { z } from 'zod';
2
- import { publicProcedure } from '../trpc/common.js';
1
+ import { z } from 'zod/v4-mini';
2
+ import { queryProcedure } from '../trpc/common.js';
3
3
  import { validateOverride } from '../utilities/validateOverride.js';
4
- import { errorEntrySource } from '../index.browser.js';
4
+ import { errorEntrySource } from '../data/busSources.js';
5
5
  import { matchingZodObject } from '../utilities/matchingZodObject.js';
6
6
  const ZodValidatePackageOverrideInput = matchingZodObject({
7
7
  packageName: z.string(),
8
8
  importPath: z.string(),
9
- issuerUrl: z.string().optional(),
9
+ issuerUrl: z.optional(z.string()),
10
10
  });
11
11
  const ZodValidatePackageOverrideOutput = matchingZodObject({
12
12
  fixable: z.boolean(),
@@ -21,8 +21,5 @@ export async function validatePackageOverride(params) {
21
21
  fixable: await validateOverride(input, ctx),
22
22
  };
23
23
  }
24
- validatePackageOverride.procedure = publicProcedure
25
- .input(ZodValidatePackageOverrideInput)
26
- .output(ZodValidatePackageOverrideOutput)
27
- .query(validatePackageOverride);
24
+ validatePackageOverride.procedure = queryProcedure(validatePackageOverride, ZodValidatePackageOverrideInput, ZodValidatePackageOverrideOutput);
28
25
  //# sourceMappingURL=validatePackageOverride.js.map