@ms-cloudpack/api-server 0.54.9 → 0.55.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.
Files changed (89) hide show
  1. package/lib/apis/addPackageOverride.d.ts +4 -19
  2. package/lib/apis/ensurePackageBundled.d.ts +0 -16
  3. package/lib/apis/ensurePackageBundled.d.ts.map +1 -1
  4. package/lib/apis/ensurePackageBundled.js +1 -59
  5. package/lib/apis/ensurePackageBundled.js.map +1 -1
  6. package/lib/apis/getData.d.ts +4 -16
  7. package/lib/apis/getSessionId.d.ts +4 -14
  8. package/lib/apis/index.d.ts +0 -3
  9. package/lib/apis/index.d.ts.map +1 -1
  10. package/lib/apis/index.js +1 -3
  11. package/lib/apis/index.js.map +1 -1
  12. package/lib/apis/linkPath.d.ts +4 -19
  13. package/lib/apis/onDataChanged.d.ts +4 -16
  14. package/lib/apis/openCodeEditor.d.ts +4 -19
  15. package/lib/apis/openConfigEditor.d.ts +4 -14
  16. package/lib/apis/openConfigEditor.d.ts.map +1 -1
  17. package/lib/apis/openFilePath.d.ts +4 -17
  18. package/lib/apis/reportMetric.d.ts +4 -18
  19. package/lib/apis/restartAllTasks.d.ts +4 -14
  20. package/lib/apis/restartAllTasks.d.ts.map +1 -1
  21. package/lib/apis/restartTask.d.ts +4 -17
  22. package/lib/apis/syncDownload.d.ts +2 -31
  23. package/lib/apis/syncDownload.d.ts.map +1 -1
  24. package/lib/apis/syncDownload.js +1 -8
  25. package/lib/apis/syncDownload.js.map +1 -1
  26. package/lib/apis/syncUpload.d.ts +2 -31
  27. package/lib/apis/syncUpload.d.ts.map +1 -1
  28. package/lib/apis/syncUpload.js +1 -8
  29. package/lib/apis/syncUpload.js.map +1 -1
  30. package/lib/apis/unlinkPath.d.ts +4 -19
  31. package/lib/apis/validatePackageOverride.d.ts +4 -20
  32. package/lib/data/busSources.d.ts +5 -4
  33. package/lib/data/busSources.d.ts.map +1 -1
  34. package/lib/data/busSources.js +1 -2
  35. package/lib/data/busSources.js.map +1 -1
  36. package/lib/index.browser.d.ts +0 -8
  37. package/lib/index.browser.d.ts.map +1 -1
  38. package/lib/index.browser.js.map +1 -1
  39. package/lib/index.d.ts +8 -22
  40. package/lib/index.d.ts.map +1 -1
  41. package/lib/index.js +6 -7
  42. package/lib/index.js.map +1 -1
  43. package/lib/trpc/common.d.ts +14 -19
  44. package/lib/trpc/common.d.ts.map +1 -1
  45. package/lib/trpc/common.js +1 -1
  46. package/lib/trpc/common.js.map +1 -1
  47. package/lib/trpc/connectBusToClient.d.ts +3 -3
  48. package/lib/trpc/connectBusToClient.d.ts.map +1 -1
  49. package/lib/trpc/connectBusToClient.js.map +1 -1
  50. package/lib/trpc/createCloudpackClient.d.ts +3 -5
  51. package/lib/trpc/createCloudpackClient.d.ts.map +1 -1
  52. package/lib/trpc/createCloudpackClient.js +4 -2
  53. package/lib/trpc/createCloudpackClient.js.map +1 -1
  54. package/lib/trpc/createCloudpackServer.d.ts +5 -66
  55. package/lib/trpc/createCloudpackServer.d.ts.map +1 -1
  56. package/lib/trpc/createCloudpackServer.js +5 -16
  57. package/lib/trpc/createCloudpackServer.js.map +1 -1
  58. package/lib/types/AppRouter.d.ts +6 -0
  59. package/lib/types/AppRouter.d.ts.map +1 -0
  60. package/lib/types/AppRouter.js +2 -0
  61. package/lib/types/AppRouter.js.map +1 -0
  62. package/lib/types/SyncInput.d.ts +6 -0
  63. package/lib/types/SyncInput.d.ts.map +1 -0
  64. package/lib/types/SyncInput.js +2 -0
  65. package/lib/types/SyncInput.js.map +1 -0
  66. package/lib/utilities/getImportsAndExports.d.ts.map +1 -1
  67. package/lib/utilities/getImportsAndExports.js +5 -4
  68. package/lib/utilities/getImportsAndExports.js.map +1 -1
  69. package/package.json +5 -5
  70. package/lib/trpc/createAppRouter.d.ts +0 -325
  71. package/lib/trpc/createAppRouter.d.ts.map +0 -1
  72. package/lib/trpc/createAppRouter.js +0 -9
  73. package/lib/trpc/createAppRouter.js.map +0 -1
  74. package/lib/trpc/createRouterFromApis.d.ts +0 -12
  75. package/lib/trpc/createRouterFromApis.d.ts.map +0 -1
  76. package/lib/trpc/createRouterFromApis.js +0 -9
  77. package/lib/trpc/createRouterFromApis.js.map +0 -1
  78. package/lib/types/ApiServer.d.ts +0 -6
  79. package/lib/types/ApiServer.d.ts.map +0 -1
  80. package/lib/types/ApiServer.js +0 -2
  81. package/lib/types/ApiServer.js.map +0 -1
  82. package/lib/types/ErrorEntry.d.ts +0 -4
  83. package/lib/types/ErrorEntry.d.ts.map +0 -1
  84. package/lib/types/ErrorEntry.js +0 -3
  85. package/lib/types/ErrorEntry.js.map +0 -1
  86. package/lib/types/ZodLoginMethod.d.ts +0 -3
  87. package/lib/types/ZodLoginMethod.d.ts.map +0 -1
  88. package/lib/types/ZodLoginMethod.js +0 -3
  89. package/lib/types/ZodLoginMethod.js.map +0 -1
@@ -1,33 +1,4 @@
1
- import { z } from 'zod';
2
1
  import type { ApiParams } from '../types/ApiParams.js';
3
- declare const ZodSyncDownloadInput: z.ZodObject<{
4
- loginMethod: z.ZodUnion<[z.ZodLiteral<"interactive">, z.ZodLiteral<"azure-cli">, z.ZodLiteral<"device-code">]>;
5
- }, "strip", z.ZodTypeAny, {
6
- loginMethod: "interactive" | "azure-cli" | "device-code";
7
- }, {
8
- loginMethod: "interactive" | "azure-cli" | "device-code";
9
- }>;
10
- type SyncDownloadInput = z.infer<typeof ZodSyncDownloadInput>;
11
- export declare function syncDownload(params: ApiParams<SyncDownloadInput, 'session' | 'packages' | 'reporter' | 'telemetryClient' | 'packageHashes'>): Promise<void>;
12
- export declare namespace syncDownload {
13
- var procedure: import("@trpc/server").BuildProcedure<"mutation", {
14
- _config: import("@trpc/server").RootConfig<{
15
- ctx: import("../index.js").Context;
16
- meta: object;
17
- errorShape: import("@trpc/server").DefaultErrorShape;
18
- transformer: import("@trpc/server").DefaultDataTransformer;
19
- }>;
20
- _meta: object;
21
- _ctx_out: import("../index.js").Context;
22
- _input_in: {
23
- loginMethod: "interactive" | "azure-cli" | "device-code";
24
- };
25
- _input_out: {
26
- loginMethod: "interactive" | "azure-cli" | "device-code";
27
- };
28
- _output_in: typeof import("@trpc/server").unsetMarker;
29
- _output_out: typeof import("@trpc/server").unsetMarker;
30
- }, void>;
31
- }
32
- export {};
2
+ import type { SyncInput } from '../types/SyncInput.js';
3
+ export declare function syncDownload(params: ApiParams<SyncInput, 'session' | 'packages' | 'reporter' | 'telemetryClient' | 'packageHashes'>): Promise<void>;
33
4
  //# sourceMappingURL=syncDownload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"syncDownload.d.ts","sourceRoot":"","sources":["../../src/apis/syncDownload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD,QAAA,MAAM,oBAAoB;;;;;;EAExB,CAAC;AAEH,KAAK,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE9D,wBAAsB,YAAY,CAChC,MAAM,EAAE,SAAS,CAAC,iBAAiB,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,iBAAiB,GAAG,eAAe,CAAC,GAC9G,OAAO,CAAC,IAAI,CAAC,CAuBf;yBAzBqB,YAAY"}
1
+ {"version":3,"file":"syncDownload.d.ts","sourceRoot":"","sources":["../../src/apis/syncDownload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,wBAAsB,YAAY,CAChC,MAAM,EAAE,SAAS,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,iBAAiB,GAAG,eAAe,CAAC,GACtG,OAAO,CAAC,IAAI,CAAC,CAuBf"}
@@ -1,13 +1,7 @@
1
- import { z } from 'zod';
2
- import { publicProcedure } from '../trpc/common.js';
3
1
  import { getPackagesToSync } from '../utilities/getPackagesToSync.js';
4
2
  import { PerfMeasurementSyncDownload } from '../performance/markers.js';
5
3
  import { getRemoteCachePromiseResultCounts } from '../utilities/getRemoteCachePromiseResultCounts.js';
6
4
  import { createRemoteCacheClient } from '../utilities/createRemoteCacheClient.js';
7
- import { ZodLoginMethod } from '../types/ZodLoginMethod.js';
8
- const ZodSyncDownloadInput = z.object({
9
- loginMethod: ZodLoginMethod,
10
- });
11
5
  export async function syncDownload(params) {
12
6
  const { input, ctx } = params;
13
7
  const { loginMethod } = input;
@@ -28,6 +22,5 @@ export async function syncDownload(params) {
28
22
  tracker.setProperties(getRemoteCachePromiseResultCounts(promiseResults));
29
23
  });
30
24
  }
31
- // Attach a trpc procedure to the function.
32
- syncDownload.procedure = publicProcedure.input(ZodSyncDownloadInput).mutation(syncDownload);
25
+ // This function doesn't have an attached procedure because it's never called via the TRPC server.
33
26
  //# sourceMappingURL=syncDownload.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"syncDownload.js","sourceRoot":"","sources":["../../src/apis/syncDownload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,cAAc;CAC5B,CAAC,CAAC;AAIH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAA+G;IAE/G,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAEhC,MAAM,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACrF,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACjD,uBAAuB,CAAC;gBACtB,KAAK,EAAE;oBACL,WAAW;iBACZ;gBACD,GAAG;aACJ,CAAC;YACF,iBAAiB,CAAC,GAAG,CAAC;SACvB,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;QAE1E,6FAA6F;QAC7F,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAE3D,OAAO,CAAC,aAAa,CAAC,iCAAiC,CAAC,cAAc,CAAC,CAAC,CAAC;IAC3E,CAAC,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 { z } from 'zod';\nimport { publicProcedure } from '../trpc/common.js';\nimport { getPackagesToSync } from '../utilities/getPackagesToSync.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { PerfMeasurementSyncDownload } from '../performance/markers.js';\nimport { getRemoteCachePromiseResultCounts } from '../utilities/getRemoteCachePromiseResultCounts.js';\nimport { createRemoteCacheClient } from '../utilities/createRemoteCacheClient.js';\nimport { ZodLoginMethod } from '../types/ZodLoginMethod.js';\n\nconst ZodSyncDownloadInput = z.object({\n loginMethod: ZodLoginMethod,\n});\n\ntype SyncDownloadInput = z.infer<typeof ZodSyncDownloadInput>;\n\nexport async function syncDownload(\n params: ApiParams<SyncDownloadInput, 'session' | 'packages' | 'reporter' | 'telemetryClient' | 'packageHashes'>,\n): Promise<void> {\n const { input, ctx } = params;\n const { loginMethod } = input;\n const { telemetryClient } = ctx;\n\n await telemetryClient.performance.track(PerfMeasurementSyncDownload, async (tracker) => {\n const [client, packagesToSync] = await Promise.all([\n createRemoteCacheClient({\n input: {\n loginMethod,\n },\n ctx,\n }),\n getPackagesToSync(ctx),\n ]);\n\n const downloads = packagesToSync.map((pkg) => client.downloadFolder(pkg));\n\n // Do not reject if there is a failure. Failed downloads will be logged in the task reporter.\n const promiseResults = await Promise.allSettled(downloads);\n\n tracker.setProperties(getRemoteCachePromiseResultCounts(promiseResults));\n });\n}\n\n// Attach a trpc procedure to the function.\nsyncDownload.procedure = publicProcedure.input(ZodSyncDownloadInput).mutation(syncDownload);\n"]}
1
+ {"version":3,"file":"syncDownload.js","sourceRoot":"","sources":["../../src/apis/syncDownload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAGlF,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAuG;IAEvG,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAEhC,MAAM,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACrF,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACjD,uBAAuB,CAAC;gBACtB,KAAK,EAAE;oBACL,WAAW;iBACZ;gBACD,GAAG;aACJ,CAAC;YACF,iBAAiB,CAAC,GAAG,CAAC;SACvB,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;QAE1E,6FAA6F;QAC7F,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAE3D,OAAO,CAAC,aAAa,CAAC,iCAAiC,CAAC,cAAc,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kGAAkG","sourcesContent":["import { getPackagesToSync } from '../utilities/getPackagesToSync.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { PerfMeasurementSyncDownload } from '../performance/markers.js';\nimport { getRemoteCachePromiseResultCounts } from '../utilities/getRemoteCachePromiseResultCounts.js';\nimport { createRemoteCacheClient } from '../utilities/createRemoteCacheClient.js';\nimport type { SyncInput } from '../types/SyncInput.js';\n\nexport async function syncDownload(\n params: ApiParams<SyncInput, 'session' | 'packages' | 'reporter' | 'telemetryClient' | 'packageHashes'>,\n): Promise<void> {\n const { input, ctx } = params;\n const { loginMethod } = input;\n const { telemetryClient } = ctx;\n\n await telemetryClient.performance.track(PerfMeasurementSyncDownload, async (tracker) => {\n const [client, packagesToSync] = await Promise.all([\n createRemoteCacheClient({\n input: {\n loginMethod,\n },\n ctx,\n }),\n getPackagesToSync(ctx),\n ]);\n\n const downloads = packagesToSync.map((pkg) => client.downloadFolder(pkg));\n\n // Do not reject if there is a failure. Failed downloads will be logged in the task reporter.\n const promiseResults = await Promise.allSettled(downloads);\n\n tracker.setProperties(getRemoteCachePromiseResultCounts(promiseResults));\n });\n}\n\n// This function doesn't have an attached procedure because it's never called via the TRPC server.\n"]}
@@ -1,33 +1,4 @@
1
- import { z } from 'zod';
2
1
  import type { ApiParams } from '../types/ApiParams.js';
3
- declare const ZodSyncUploadInput: z.ZodObject<{
4
- loginMethod: z.ZodUnion<[z.ZodLiteral<"interactive">, z.ZodLiteral<"azure-cli">, z.ZodLiteral<"device-code">]>;
5
- }, "strip", z.ZodTypeAny, {
6
- loginMethod: "interactive" | "azure-cli" | "device-code";
7
- }, {
8
- loginMethod: "interactive" | "azure-cli" | "device-code";
9
- }>;
10
- type SyncUploadInput = z.infer<typeof ZodSyncUploadInput>;
11
- export declare function syncUpload(params: ApiParams<SyncUploadInput, 'session' | 'packages' | 'reporter' | 'bus' | 'taskRunner' | 'watcher' | 'telemetryClient' | 'packageImportPaths' | 'packageHashes'>): Promise<void>;
12
- export declare namespace syncUpload {
13
- var procedure: import("@trpc/server").BuildProcedure<"mutation", {
14
- _config: import("@trpc/server").RootConfig<{
15
- ctx: import("../index.js").Context;
16
- meta: object;
17
- errorShape: import("@trpc/server").DefaultErrorShape;
18
- transformer: import("@trpc/server").DefaultDataTransformer;
19
- }>;
20
- _meta: object;
21
- _ctx_out: import("../index.js").Context;
22
- _input_in: {
23
- loginMethod: "interactive" | "azure-cli" | "device-code";
24
- };
25
- _input_out: {
26
- loginMethod: "interactive" | "azure-cli" | "device-code";
27
- };
28
- _output_in: typeof import("@trpc/server").unsetMarker;
29
- _output_out: typeof import("@trpc/server").unsetMarker;
30
- }, void>;
31
- }
32
- export {};
2
+ import type { SyncInput } from '../types/SyncInput.js';
3
+ export declare function syncUpload(params: ApiParams<SyncInput, 'session' | 'packages' | 'reporter' | 'bus' | 'taskRunner' | 'watcher' | 'telemetryClient' | 'packageImportPaths' | 'packageHashes'>): Promise<void>;
33
4
  //# sourceMappingURL=syncUpload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"syncUpload.d.ts","sourceRoot":"","sources":["../../src/apis/syncUpload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAOvD,QAAA,MAAM,kBAAkB;;;;;;EAEtB,CAAC;AAEH,KAAK,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE1D,wBAAsB,UAAU,CAC9B,MAAM,EAAE,SAAS,CACf,eAAe,EACb,SAAS,GACT,UAAU,GACV,UAAU,GACV,KAAK,GACL,YAAY,GACZ,SAAS,GACT,iBAAiB,GACjB,oBAAoB,GACpB,eAAe,CAClB,GACA,OAAO,CAAC,IAAI,CAAC,CAqDf;yBAlEqB,UAAU"}
1
+ {"version":3,"file":"syncUpload.d.ts","sourceRoot":"","sources":["../../src/apis/syncUpload.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAKvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,SAAS,CACf,SAAS,EACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,KAAK,GACL,YAAY,GACZ,SAAS,GACT,iBAAiB,GACjB,oBAAoB,GACpB,eAAe,CAClB,GACA,OAAO,CAAC,IAAI,CAAC,CAqDf"}
@@ -1,15 +1,9 @@
1
- import { z } from 'zod';
2
- import { publicProcedure } from '../trpc/common.js';
3
1
  import { ensurePackageBundled } from './ensurePackageBundled.js';
4
2
  import { PerfMeasurementSyncUpload } from '../performance/markers.js';
5
3
  import { getRemoteCachePromiseResultCounts } from '../utilities/getRemoteCachePromiseResultCounts.js';
6
4
  import { createRemoteCacheClient } from '../utilities/createRemoteCacheClient.js';
7
- import { ZodLoginMethod } from '../types/ZodLoginMethod.js';
8
5
  import { createRemoteCacheClientOperationOptions } from '../utilities/createRemoteCacheClientOperationOptions.js';
9
6
  import { createUploadTask } from '../utilities/createUploadTask.js';
10
- const ZodSyncUploadInput = z.object({
11
- loginMethod: ZodLoginMethod,
12
- });
13
7
  export async function syncUpload(params) {
14
8
  const { ctx, input } = params;
15
9
  const { session, telemetryClient, taskRunner } = ctx;
@@ -49,6 +43,5 @@ export async function syncUpload(params) {
49
43
  tracker.setProperties(getRemoteCachePromiseResultCounts(promiseResults));
50
44
  });
51
45
  }
52
- // Attach a trpc procedure to the function.
53
- syncUpload.procedure = publicProcedure.input(ZodSyncUploadInput).mutation(syncUpload);
46
+ // This function doesn't have an attached procedure because it's never called via the TRPC server.
54
47
  //# sourceMappingURL=syncUpload.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"syncUpload.js","sourceRoot":"","sources":["../../src/apis/syncUpload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,uCAAuC,EAAE,MAAM,yDAAyD,CAAC;AAClH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,WAAW,EAAE,cAAc;CAC5B,CAAC,CAAC;AAIH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,MAWC;IAED,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC;IACrD,MAAM,EAAE,MAAM,EAAE,G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AAI,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,EAC7E,GAAG,CACJ,CACF,CACJ,CAAC;QAEF,MAAM,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC3C,UAAU,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,GAAG,GAAG,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAC/E,CAAC;QAEF,2FAA2F;QAC3F,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAEzD,OAAO,CAAC,aAAa,CAAC,iCAAiC,CAAC,cAAc,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAED,2CAA2C;AAC3C,UAAU,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { publicProcedure } from '../trpc/common.js';\nimport { ensurePackageBundled } from './ensurePackageBundled.js';\nimport { PerfMeasurementSyncUpload } from '../performance/markers.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { getRemoteCachePromiseResultCounts } from '../utilities/getRemoteCachePromiseResultCounts.js';\nimport { createRemoteCacheClient } from '../utilities/createRemoteCacheClient.js';\nimport { ZodLoginMethod } from '../types/ZodLoginMethod.js';\nimport { createRemoteCacheClientOperationOptions } from '../utilities/createRemoteCacheClientOperationOptions.js';\nimport { createUploadTask } from '../utilities/createUploadTask.js';\n\nconst ZodSyncUploadInput = z.object({\n loginMethod: ZodLoginMethod,\n});\n\ntype SyncUploadInput = z.infer<typeof ZodSyncUploadInput>;\n\nexport async function syncUpload(\n params: ApiParams<\n SyncUploadInput,\n | 'session'\n | 'packages'\n | 'reporter'\n | 'bus'\n | 'taskRunner'\n | 'watcher'\n | 'telemetryClient'\n | 'packageImportPaths'\n | 'packageHashes'\n >,\n): Promise<void> {\n const { ctx, input } = params;\n const { session, telemetryClient, taskRunner } = ctx;\n const { config } = session;\n const { appPath } = config;\n const { loginMethod } = input;\n const syncInternalPackages = config?.features?.syncInternalPackages ?? false;\n\n // Glob pattern for the files to upload.\n const globMatches = ['**/*', '!**/*-input.json', '!**/*-output.json'];\n\n await telemetryClient.performance.track(PerfMeasurementSyncUpload, async (tracker) => {\n const { name, version } = await ctx.packages.get(appPath);\n\n const [client, { dependencies, result }] = await Promise.all([\n createRemoteCacheClient({\n input: {\n loginMethod,\n },\n ctx,\n }),\n ensurePackageBundled({\n input: {\n name,\n version,\n enqueueDependencies: true,\n },\n ctx,\n }),\n ]);\n\n const bundledPackages = [result, ...(await dependencies)];\n const packagesToUpload = await Promise.all(\n bundledPackages\n .filter((p) => p.inputPath && (p.isExternal || syncInternalPackages))\n .map((p) =>\n createRemoteCacheClientOperationOptions(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- verified above that it's set\n { packagePath: p.inputPath!, packageName: p.name, packageVersion: p.version },\n ctx,\n ),\n ),\n );\n\n const uploads = packagesToUpload.map((pkg) =>\n taskRunner.add(createUploadTask({ client, options: { ...pkg, globMatches } })),\n );\n\n // Do not reject if there is a failure. Failed uploads will be logged in the task reporter.\n const promiseResults = await Promise.allSettled(uploads);\n\n tracker.setProperties(getRemoteCachePromiseResultCounts(promiseResults));\n });\n}\n\n// Attach a trpc procedure to the function.\nsyncUpload.procedure = publicProcedure.input(ZodSyncUploadInput).mutation(syncUpload);\n"]}
1
+ {"version":3,"file":"syncUpload.js","sourceRoot":"","sources":["../../src/apis/syncUpload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCA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;QAC1D,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,GAAG,CACxC,eAAe;aACZ,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,oBAAoB,CAAC,CAAC;aACpE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACT,uCAAuC;QACrC,oGAAoG;QACpG,EAAE,WAAW,EAAE,CAAC,CAAC,SAAU,EAAE,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,EAC7E,GAAG,CACJ,CACF,CACJ,CAAC;QAEF,MAAM,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC3C,UAAU,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,GAAG,GAAG,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAC/E,CAAC;QAEF,2FAA2F;QAC3F,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAEzD,OAAO,CAAC,aAAa,CAAC,iCAAiC,CAAC,cAAc,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kGAAkG","sourcesContent":["import { ensurePackageBundled } from './ensurePackageBundled.js';\nimport { PerfMeasurementSyncUpload } from '../performance/markers.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { getRemoteCachePromiseResultCounts } from '../utilities/getRemoteCachePromiseResultCounts.js';\nimport { createRemoteCacheClient } from '../utilities/createRemoteCacheClient.js';\nimport { createRemoteCacheClientOperationOptions } from '../utilities/createRemoteCacheClientOperationOptions.js';\nimport { createUploadTask } from '../utilities/createUploadTask.js';\nimport type { SyncInput } from '../types/SyncInput.js';\n\nexport async function syncUpload(\n params: ApiParams<\n SyncInput,\n | 'session'\n | 'packages'\n | 'reporter'\n | 'bus'\n | 'taskRunner'\n | 'watcher'\n | 'telemetryClient'\n | 'packageImportPaths'\n | 'packageHashes'\n >,\n): Promise<void> {\n const { ctx, input } = params;\n const { session, telemetryClient, taskRunner } = ctx;\n const { config } = session;\n const { appPath } = config;\n const { loginMethod } = input;\n const syncInternalPackages = config?.features?.syncInternalPackages ?? false;\n\n // Glob pattern for the files to upload.\n const globMatches = ['**/*', '!**/*-input.json', '!**/*-output.json'];\n\n await telemetryClient.performance.track(PerfMeasurementSyncUpload, async (tracker) => {\n const { name, version } = await ctx.packages.get(appPath);\n\n const [client, { dependencies, result }] = await Promise.all([\n createRemoteCacheClient({\n input: {\n loginMethod,\n },\n ctx,\n }),\n ensurePackageBundled({\n input: {\n name,\n version,\n enqueueDependencies: true,\n },\n ctx,\n }),\n ]);\n\n const bundledPackages = [result, ...(await dependencies)];\n const packagesToUpload = await Promise.all(\n bundledPackages\n .filter((p) => p.inputPath && (p.isExternal || syncInternalPackages))\n .map((p) =>\n createRemoteCacheClientOperationOptions(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- verified above that it's set\n { packagePath: p.inputPath!, packageName: p.name, packageVersion: p.version },\n ctx,\n ),\n ),\n );\n\n const uploads = packagesToUpload.map((pkg) =>\n taskRunner.add(createUploadTask({ client, options: { ...pkg, globMatches } })),\n );\n\n // Do not reject if there is a failure. Failed uploads will be logged in the task reporter.\n const promiseResults = await Promise.allSettled(uploads);\n\n tracker.setProperties(getRemoteCachePromiseResultCounts(promiseResults));\n });\n}\n\n// This function doesn't have an attached procedure because it's never called via the TRPC server.\n"]}
@@ -5,29 +5,14 @@ import { type LinkPathInput, type LinkPathOutput } from '../types/LinkPath.js';
5
5
  */
6
6
  export declare function unlinkPath(params: ApiParams<LinkPathInput, 'session' | 'reporter' | 'bus' | 'telemetryClient'>): Promise<LinkPathOutput>;
7
7
  export declare namespace unlinkPath {
8
- var procedure: import("@trpc/server").BuildProcedure<"query", {
9
- _config: import("@trpc/server").RootConfig<{
10
- ctx: import("../index.js").Context;
11
- meta: object;
12
- errorShape: import("@trpc/server").DefaultErrorShape;
13
- transformer: import("@trpc/server").DefaultDataTransformer;
14
- }>;
15
- _meta: object;
16
- _ctx_out: import("../index.js").Context;
17
- _input_in: {
8
+ var procedure: import("@trpc/server").TRPCQueryProcedure<{
9
+ input: {
18
10
  linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
19
11
  };
20
- _input_out: {
21
- linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
22
- };
23
- _output_in: {
24
- resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
25
- linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
26
- };
27
- _output_out: {
12
+ output: {
28
13
  resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
29
14
  linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
30
15
  };
31
- }, unknown>;
16
+ }>;
32
17
  }
33
18
  //# sourceMappingURL=unlinkPath.d.ts.map
@@ -24,32 +24,16 @@ declare const ZodValidatePackageOverrideOutput: z.ZodObject<{
24
24
  export type ValidatePackageOverrideOutput = z.infer<typeof ZodValidatePackageOverrideOutput>;
25
25
  export declare function validatePackageOverride(params: ApiParams<ValidatePackageOverrideInput, 'session' | 'packages' | 'bus'>): Promise<ValidatePackageOverrideOutput>;
26
26
  export declare namespace validatePackageOverride {
27
- var procedure: import("@trpc/server").BuildProcedure<"query", {
28
- _config: import("@trpc/server").RootConfig<{
29
- ctx: import("../index.js").Context;
30
- meta: object;
31
- errorShape: import("@trpc/server").DefaultErrorShape;
32
- transformer: import("@trpc/server").DefaultDataTransformer;
33
- }>;
34
- _meta: object;
35
- _ctx_out: import("../index.js").Context;
36
- _input_in: {
27
+ var procedure: import("@trpc/server").TRPCQueryProcedure<{
28
+ input: {
37
29
  packageName: string;
38
30
  importPath: string;
39
31
  issuerUrl?: string | undefined;
40
32
  };
41
- _input_out: {
42
- packageName: string;
43
- importPath: string;
44
- issuerUrl?: string | undefined;
45
- };
46
- _output_in: {
47
- fixable: boolean;
48
- };
49
- _output_out: {
33
+ output: {
50
34
  fixable: boolean;
51
35
  };
52
- }, unknown>;
36
+ }>;
53
37
  }
54
38
  export {};
55
39
  //# sourceMappingURL=validatePackageOverride.d.ts.map
@@ -1,12 +1,13 @@
1
1
  import z from 'zod';
2
+ import { type DataBusPath } from '@ms-cloudpack/data-bus';
2
3
  /**
3
4
  * Used for tracking the reload count.
4
5
  */
5
- export declare const reloadCountSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodNumber>;
6
+ export declare const reloadCountSource: DataBusPath<z.ZodNumber>;
6
7
  /**
7
8
  * Used for tracking the task stats displayed in the badge.
8
9
  */
9
- export declare const taskStatsSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodObject<{
10
+ export declare const taskStatsSource: DataBusPath<z.ZodObject<{
10
11
  status: z.ZodUnion<[z.ZodLiteral<"idle">, z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"unknown">]>]>;
11
12
  remainingTasks: z.ZodNumber;
12
13
  totalTasks: z.ZodNumber;
@@ -28,7 +29,7 @@ export declare const taskStatsSource: import("@ms-cloudpack/data-bus").DataBusPa
28
29
  /**
29
30
  * Used for tracking the list of tasks.
30
31
  */
31
- export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodObject<{
32
+ export declare const taskListSource: DataBusPath<z.ZodObject<{
32
33
  tasks: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
33
34
  status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"complete">]>>;
34
35
  timings: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -421,5 +422,5 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
421
422
  * Used for tracking entry errors: `Failed to resolve module specifier "${packageName}@${version}${filePath}".`
422
423
  * This is used to display errors in the UI and to notify the user of the error when autoUpdateEntries is enabled.
423
424
  */
424
- export declare const errorEntrySource: import("@ms-cloudpack/data-bus").DataBusPath<z.ZodString>;
425
+ export declare const errorEntrySource: DataBusPath<z.ZodString>;
425
426
  //# sourceMappingURL=busSources.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"busSources.d.ts","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAMpB;;GAEG;AACH,eAAO,MAAM,iBAAiB,2DAG5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;GAG1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGzB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,2DAG3B,CAAC"}
1
+ {"version":3,"file":"busSources.d.ts","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,iBAAiB,0BAG5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;GAG1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGzB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAGpD,CAAC"}
@@ -2,7 +2,6 @@ import z from 'zod';
2
2
  import { ZodTaskStats } from '../types/TaskStats.js';
3
3
  import { ZodTaskList } from '../types/TaskList.js';
4
4
  import { createDataPath } from '@ms-cloudpack/data-bus';
5
- import { ZodErrorEntry } from '../types/ErrorEntry.js';
6
5
  /**
7
6
  * Used for tracking the reload count.
8
7
  */
@@ -30,6 +29,6 @@ export const taskListSource = createDataPath({
30
29
  */
31
30
  export const errorEntrySource = createDataPath({
32
31
  path: ['error', 'entry'],
33
- type: ZodErrorEntry,
32
+ type: z.string(),
34
33
  });
35
34
  //# sourceMappingURL=busSources.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"busSources.js","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,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,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;IAC9C,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IAC5B,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,CAAC;IACvB,IAAI,EAAE,YAAY;CACnB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;IAC3C,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAC7C,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,aAAa;CACpB,CAAC,CAAC","sourcesContent":["import z from 'zod';\nimport { ZodTaskStats } from '../types/TaskStats.js';\nimport { ZodTaskList } from '../types/TaskList.js';\nimport { createDataPath } from '@ms-cloudpack/data-bus';\nimport { ZodErrorEntry } from '../types/ErrorEntry.js';\n\n/**\n * Used for tracking the reload count.\n */\nexport const reloadCountSource = createDataPath({\n path: ['session', 'version'],\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'],\n type: ZodTaskStats,\n});\n\n/**\n * Used for tracking the list of tasks.\n */\nexport const taskListSource = createDataPath({\n path: ['task', 'list'],\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'],\n type: ZodErrorEntry,\n});\n"]}
1
+ {"version":3,"file":"busSources.js","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAoB,MAAM,wBAAwB,CAAC;AAE1E;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;IAC9C,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IAC5B,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,CAAC;IACvB,IAAI,EAAE,YAAY;CACnB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;IAC3C,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA6B,cAAc,CAAC;IACvE,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC","sourcesContent":["import z from 'zod';\nimport { ZodTaskStats } from '../types/TaskStats.js';\nimport { ZodTaskList } from '../types/TaskList.js';\nimport { createDataPath, type DataBusPath } from '@ms-cloudpack/data-bus';\n\n/**\n * Used for tracking the reload count.\n */\nexport const reloadCountSource = createDataPath({\n path: ['session', 'version'],\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'],\n type: ZodTaskStats,\n});\n\n/**\n * Used for tracking the list of tasks.\n */\nexport const taskListSource = createDataPath({\n path: ['task', 'list'],\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: DataBusPath<z.ZodString> = createDataPath({\n path: ['error', 'entry'],\n type: z.string(),\n});\n"]}
@@ -1,15 +1,7 @@
1
1
  export type { TaskStats } from './types/TaskStats.js';
2
2
  export type { TaskDescription } from './types/TaskDescription.js';
3
3
  export type { TaskMessage } from './types/TaskMessage.js';
4
- export type { ErrorEntry } from './types/ErrorEntry.js';
5
4
  export type { TaskList } from './types/TaskList.js';
6
- export type { AddPackageOverrideInput } from './apis/addPackageOverride.js';
7
- export type { OpenCodeEditorInput } from './apis/openCodeEditor.js';
8
- export type { OpenFilePathInput } from './apis/openFilePath.js';
9
- export type { ReportMetricInput } from './apis/reportMetric.js';
10
- export type { ValidatePackageOverrideInput, ValidatePackageOverrideOutput } from './apis/validatePackageOverride.js';
11
- export type { RestartTaskInput } from './apis/restartTask.js';
12
- export type { LinkPathInput } from './types/LinkPath.js';
13
5
  export { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';
14
6
  export { taskListSource, taskStatsSource, reloadCountSource, errorEntrySource } from './data/busSources.js';
15
7
  //# sourceMappingURL=index.browser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,YAAY,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AACrH,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export type { TaskStats } from './types/TaskStats.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { ErrorEntry } from './types/ErrorEntry.js';\nexport type { TaskList } from './types/TaskList.js';\n\nexport type { AddPackageOverrideInput } from './apis/addPackageOverride.js';\nexport type { OpenCodeEditorInput } from './apis/openCodeEditor.js';\nexport type { OpenFilePathInput } from './apis/openFilePath.js';\nexport type { ReportMetricInput } from './apis/reportMetric.js';\nexport type { ValidatePackageOverrideInput, ValidatePackageOverrideOutput } from './apis/validatePackageOverride.js';\nexport type { RestartTaskInput } from './apis/restartTask.js';\nexport type { LinkPathInput } from './types/LinkPath.js';\n\nexport { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';\n\nexport { taskListSource, taskStatsSource, reloadCountSource, errorEntrySource } from './data/busSources.js';\n"]}
1
+ {"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export type { TaskStats } from './types/TaskStats.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskList } from './types/TaskList.js';\n\nexport { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';\n\nexport { taskListSource, taskStatsSource, reloadCountSource, errorEntrySource } from './data/busSources.js';\n"]}
package/lib/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export type { ApiServer } from './types/ApiServer.js';
2
1
  export type { Context, PartialContext } from './types/Context.js';
3
2
  export type { BundleInfo, BundleEntryInfo, BundleEntryConsumes } from './types/BundleInfo.js';
4
3
  export type { Session } from '@ms-cloudpack/common-types';
@@ -9,30 +8,17 @@ export type { TaskEndDescription } from './types/TaskEndDescription.js';
9
8
  export type { TaskMessage } from './types/TaskMessage.js';
10
9
  export type { TaskOptions } from './types/TaskOptions.js';
11
10
  export type { TaskStartDescription } from './types/TaskStartDescription.js';
12
- export type { ErrorEntry } from './types/ErrorEntry.js';
13
- export type { CloudpackServer } from './trpc/createCloudpackServer.js';
14
- export type { AddPackageOverrideInput } from './apis/addPackageOverride.js';
15
- export type { OpenCodeEditorInput } from './apis/openCodeEditor.js';
16
- export type { OpenFilePathInput } from './apis/openFilePath.js';
17
- export type { ReportMetricInput } from './apis/reportMetric.js';
18
- export type { ValidatePackageOverrideInput, ValidatePackageOverrideOutput } from './apis/validatePackageOverride.js';
19
- export type { RestartTaskInput } from './apis/restartTask.js';
20
- export type { LinkPathInput } from './types/LinkPath.js';
21
- export type { EnsurePackageBundledContext, EnsurePackageBundledInput, EnsurePackageBundledOutput, EnsurePackageBundledResult, } from './apis/ensurePackageBundled.js';
22
- export type { BundleRequest } from './types/BundleRequest.js';
23
- export type { BundleTaskOptions } from './types/BundleTaskOptions.js';
24
- export type { OverrideOptions } from './types/OverrideOptions.js';
11
+ export type { EnsurePackageBundledContext } from './apis/ensurePackageBundled.js';
25
12
  export { TaskRunner } from './utilities/TaskRunner.js';
26
- export { reloadCountSource, taskListSource, taskStatsSource, errorEntrySource } from './data/busSources.js';
27
- export { createCloudpackClient } from './trpc/createCloudpackClient.js';
28
- export { createCloudpackServer } from './trpc/createCloudpackServer.js';
29
- export { ZodTaskDescription } from './types/TaskDescription.js';
30
- export { ZodTaskEndDescription } from './types/TaskEndDescription.js';
31
- export { ZodTaskMessage } from './types/TaskMessage.js';
32
- export { ZodTaskStartDescription } from './types/TaskStartDescription.js';
13
+ export { errorEntrySource } from './data/busSources.js';
14
+ export { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';
15
+ export { createCloudpackServer, type CloudpackServer } from './trpc/createCloudpackServer.js';
33
16
  export { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';
34
17
  export { getConsumedDependencies } from './utilities/getConsumedDependencies.js';
35
18
  export { getConsumedPaths } from './utilities/getConsumedPaths.js';
36
19
  export { createPartialApiContext, type LazyApiContextOptions } from './common/createPartialApiContext.js';
37
- export { addPackageOverride, ensurePackageBundled, getData, getSessionId, linkPath, onDataChanged, openCodeEditor, openConfigEditor, openFilePath, reportMetric, restartTask, restartAllTasks, syncDownload, syncUpload, unlinkPath, validatePackageOverride, } from './apis/index.js';
20
+ export { addPackageOverride } from './apis/addPackageOverride.js';
21
+ export { ensurePackageBundled } from './apis/ensurePackageBundled.js';
22
+ export { syncDownload } from './apis/syncDownload.js';
23
+ export { syncUpload } from './apis/syncUpload.js';
38
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,YAAY,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,eAAe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,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,OAAO,EAAE,uBAAuB,EAAE,KAAK,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAG1G,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"}
package/lib/index.js CHANGED
@@ -1,16 +1,15 @@
1
1
  export { TaskRunner } from './utilities/TaskRunner.js';
2
- export { reloadCountSource, taskListSource, taskStatsSource, errorEntrySource } from './data/busSources.js';
2
+ export { errorEntrySource } from './data/busSources.js';
3
3
  export { createCloudpackClient } from './trpc/createCloudpackClient.js';
4
4
  export { createCloudpackServer } from './trpc/createCloudpackServer.js';
5
- export { ZodTaskDescription } from './types/TaskDescription.js';
6
- export { ZodTaskEndDescription } from './types/TaskEndDescription.js';
7
- export { ZodTaskMessage } from './types/TaskMessage.js';
8
- export { ZodTaskStartDescription } from './types/TaskStartDescription.js';
9
5
  export { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';
10
6
  export { getConsumedDependencies } from './utilities/getConsumedDependencies.js';
11
7
  export { getConsumedPaths } from './utilities/getConsumedPaths.js';
12
8
  // Utilities
13
9
  export { createPartialApiContext } from './common/createPartialApiContext.js';
14
- // API methods
15
- export { addPackageOverride, ensurePackageBundled, getData, getSessionId, linkPath, onDataChanged, openCodeEditor, openConfigEditor, openFilePath, reportMetric, restartTask, restartAllTasks, syncDownload, syncUpload, unlinkPath, validatePackageOverride, } from './apis/index.js';
10
+ // API methods directly used outside this package
11
+ export { addPackageOverride } from './apis/addPackageOverride.js';
12
+ export { ensurePackageBundled } from './apis/ensurePackageBundled.js';
13
+ export { syncDownload } from './apis/syncDownload.js';
14
+ export { syncUpload } from './apis/syncUpload.js';
16
15
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,YAAY;AACZ,OAAO,EAAE,uBAAuB,EAA8B,MAAM,qCAAqC,CAAC;AAE1G,cAAc;AACd,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,YAAY,EACZ,UAAU,EACV,UAAU,EACV,uBAAuB,GACxB,MAAM,iBAAiB,CAAC","sourcesContent":["export type { ApiServer } from './types/ApiServer.js';\nexport type { Context, PartialContext } from './types/Context.js';\nexport type { BundleInfo, BundleEntryInfo, BundleEntryConsumes } from './types/BundleInfo.js';\nexport type { Session } from '@ms-cloudpack/common-types';\nexport type { TaskStats } from './types/TaskStats.js';\nexport type { Task } from './types/Task.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskEndDescription } from './types/TaskEndDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskOptions } from './types/TaskOptions.js';\nexport type { TaskStartDescription } from './types/TaskStartDescription.js';\nexport type { ErrorEntry } from './types/ErrorEntry.js';\nexport type { CloudpackServer } from './trpc/createCloudpackServer.js';\n\n// API types\nexport type { AddPackageOverrideInput } from './apis/addPackageOverride.js';\nexport type { OpenCodeEditorInput } from './apis/openCodeEditor.js';\nexport type { OpenFilePathInput } from './apis/openFilePath.js';\nexport type { ReportMetricInput } from './apis/reportMetric.js';\nexport type { ValidatePackageOverrideInput, ValidatePackageOverrideOutput } from './apis/validatePackageOverride.js';\nexport type { RestartTaskInput } from './apis/restartTask.js';\nexport type { LinkPathInput } from './types/LinkPath.js';\n\n// TODO: delete these type exports once API reporting of \"forgotten\" exports is enabled\n// (they're not used and don't really need to be visible in the API)\nexport type {\n EnsurePackageBundledContext,\n EnsurePackageBundledInput,\n EnsurePackageBundledOutput,\n EnsurePackageBundledResult,\n} from './apis/ensurePackageBundled.js';\nexport type { BundleRequest } from './types/BundleRequest.js';\nexport type { BundleTaskOptions } from './types/BundleTaskOptions.js';\nexport type { OverrideOptions } from './types/OverrideOptions.js';\n\nexport { TaskRunner } from './utilities/TaskRunner.js';\nexport { reloadCountSource, taskListSource, taskStatsSource, errorEntrySource } from './data/busSources.js';\nexport { createCloudpackClient } from './trpc/createCloudpackClient.js';\nexport { createCloudpackServer } from './trpc/createCloudpackServer.js';\nexport { ZodTaskDescription } from './types/TaskDescription.js';\nexport { ZodTaskEndDescription } from './types/TaskEndDescription.js';\nexport { ZodTaskMessage } from './types/TaskMessage.js';\nexport { ZodTaskStartDescription } from './types/TaskStartDescription.js';\nexport { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';\nexport { getConsumedDependencies } from './utilities/getConsumedDependencies.js';\nexport { getConsumedPaths } from './utilities/getConsumedPaths.js';\n\n// Utilities\nexport { createPartialApiContext, type LazyApiContextOptions } from './common/createPartialApiContext.js';\n\n// API methods\nexport {\n addPackageOverride,\n ensurePackageBundled,\n getData,\n getSessionId,\n linkPath,\n onDataChanged,\n openCodeEditor,\n openConfigEditor,\n openFilePath,\n reportMetric,\n restartTask,\n restartAllTasks,\n syncDownload,\n syncUpload,\n unlinkPath,\n validatePackageOverride,\n} from './apis/index.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,YAAY;AACZ,OAAO,EAAE,uBAAuB,EAA8B,MAAM,qCAAqC,CAAC;AAE1G,iDAAiD;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export type { Context, PartialContext } from './types/Context.js';\nexport type { BundleInfo, BundleEntryInfo, BundleEntryConsumes } from './types/BundleInfo.js';\nexport type { Session } from '@ms-cloudpack/common-types';\nexport type { TaskStats } from './types/TaskStats.js';\nexport type { Task } from './types/Task.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskEndDescription } from './types/TaskEndDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskOptions } from './types/TaskOptions.js';\nexport type { TaskStartDescription } from './types/TaskStartDescription.js';\nexport type { EnsurePackageBundledContext } from './apis/ensurePackageBundled.js';\n\nexport { TaskRunner } from './utilities/TaskRunner.js';\nexport { errorEntrySource } from './data/busSources.js';\nexport { createCloudpackClient, type CloudpackClient } from './trpc/createCloudpackClient.js';\nexport { createCloudpackServer, type CloudpackServer } from './trpc/createCloudpackServer.js';\nexport { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';\nexport { getConsumedDependencies } from './utilities/getConsumedDependencies.js';\nexport { getConsumedPaths } from './utilities/getConsumedPaths.js';\n\n// Utilities\nexport { createPartialApiContext, type LazyApiContextOptions } from './common/createPartialApiContext.js';\n\n// API methods directly used outside this package\nexport { addPackageOverride } from './apis/addPackageOverride.js';\nexport { ensurePackageBundled } from './apis/ensurePackageBundled.js';\nexport { syncDownload } from './apis/syncDownload.js';\nexport { syncUpload } from './apis/syncUpload.js';\n"]}
@@ -1,23 +1,18 @@
1
1
  /** Reusable TRPC router helper. */
2
- export declare const router: <TProcRouterRecord extends import("@trpc/server").ProcedureRouterRecord>(procedures: TProcRouterRecord) => import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
3
- ctx: import("../index.js").Context;
4
- meta: object;
5
- errorShape: import("@trpc/server").DefaultErrorShape;
6
- transformer: import("@trpc/server").DefaultDataTransformer;
7
- }>, TProcRouterRecord>;
8
- /** Reusable TRPC procedure helper. */
9
- export declare const publicProcedure: import("@trpc/server").ProcedureBuilder<{
10
- _config: import("@trpc/server").RootConfig<{
2
+ export declare const createRouter: {
3
+ <TInput extends import("@trpc/server").RouterRecord>(input: TInput): import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
4
+ ctx: import("../index.js").Context;
5
+ meta: object;
6
+ errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
7
+ transformer: false;
8
+ }, TInput>;
9
+ <TInput extends import("@trpc/server/unstable-core-do-not-import").CreateRouterOptions>(input: TInput): import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
11
10
  ctx: import("../index.js").Context;
12
11
  meta: object;
13
- errorShape: import("@trpc/server").DefaultErrorShape;
14
- transformer: import("@trpc/server").DefaultDataTransformer;
15
- }>;
16
- _ctx_out: import("../index.js").Context;
17
- _input_in: typeof import("@trpc/server").unsetMarker;
18
- _input_out: typeof import("@trpc/server").unsetMarker;
19
- _output_in: typeof import("@trpc/server").unsetMarker;
20
- _output_out: typeof import("@trpc/server").unsetMarker;
21
- _meta: object;
22
- }>;
12
+ errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
13
+ transformer: false;
14
+ }, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput>>;
15
+ };
16
+ /** Reusable TRPC procedure helper. */
17
+ export declare const publicProcedure: import("@trpc/server/unstable-core-do-not-import").ProcedureBuilder<import("../index.js").Context, object, object, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, false>;
23
18
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAMA,mCAAmC;AACnC,eAAO,MAAM,MAAM,oCAIioL,cAAU;;;;;sBAJhoL,CAAC;AAE/B,sCAAsC;AACtC,eAAO,MAAM,eAAe;;;;;;;;6BACsoG,cAAmB;8BAAqD,cAAmB;8BAAqD,cAAmB;+BAAsD,cAAmB;;EADp2G,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAMA,mCAAmC;AACnC,eAAO,MAAM,YAAY;2BAIi+E,cAAU;;;;;;2BAAoa,0CAAU;;;;;;CAJ94F,CAAC;AAErC,sCAAsC;AACtC,eAAO,MAAM,eAAe,uZAAc,CAAC"}
@@ -2,7 +2,7 @@ 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
- export const router = t.router;
5
+ export const createRouter = t.router;
6
6
  /** Reusable TRPC procedure helper. */
7
7
  export const publicProcedure = t.procedure;
8
8
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,wEAAwE;AACxE,MAAM,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAiB,CAAC,MAAM,EAAE,CAAC;AAErD,mCAAmC;AACnC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;AAE/B,sCAAsC;AACtC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,SAAS,CAAC","sourcesContent":["import { initTRPC } from '@trpc/server';\nimport type { CreateContext } from './createContextFactory.js';\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 router = t.router;\n\n/** Reusable TRPC procedure helper. */\nexport const publicProcedure = t.procedure;\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,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,sCAAsC;AACtC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,SAAS,CAAC","sourcesContent":["import { initTRPC } from '@trpc/server';\nimport type { CreateContext } from './createContextFactory.js';\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/** Reusable TRPC procedure helper. */\nexport const publicProcedure = t.procedure;\n"]}
@@ -1,8 +1,8 @@
1
1
  import type { DataBus } from '@ms-cloudpack/data-bus';
2
- import type { CreateTRPCProxyClient } from '@trpc/client';
3
- import type { AppRouter } from './createAppRouter.js';
2
+ import type { CreateTRPCClient } from '@trpc/client';
3
+ import type { AppRouter } from '../types/AppRouter.js';
4
4
  export declare function connectBusToClient({ bus, client }: {
5
5
  bus: DataBus;
6
- client: CreateTRPCProxyClient<AppRouter>;
6
+ client: CreateTRPCClient<AppRouter>;
7
7
  }): void;
8
8
  //# sourceMappingURL=connectBusToClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connectBusToClient.d.ts","sourceRoot":"","sources":["../../src/trpc/connectBusToClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,wBAAgB,kBAAkB,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAA;CAAE,QAgC7G"}
1
+ {"version":3,"file":"connectBusToClient.d.ts","sourceRoot":"","sources":["../../src/trpc/connectBusToClient.ts"],"names":[],"mappings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;YACzB,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC1B,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;YACzB,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;QACpB,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { DataBus } from '@ms-cloudpack/data-bus';\nimport type { CreateTRPCProxyClient } from '@trpc/client';\nimport type { Unsubscribable } from '@trpc/server/observable';\nimport type { AppRouter } from './createAppRouter.js';\n\nexport function connectBusToClient({ bus, client }: { bus: DataBus; client: CreateTRPCProxyClient<AppRouter> }) {\n const subIds: Record<string, Unsubscribable> = {};\n\n bus.addProvider({\n path: [],\n onActivate: ({ path }) => {\n const id = path.join('/');\n\n client.getData\n .query({ path })\n .then((value) => {\n bus.publish(path, value);\n })\n .catch(() => {\n /* no-op */\n });\n\n subIds[id] = client.onDataChanged.subscribe(\n { path },\n {\n onData(value) {\n bus.publish(path, value);\n },\n },\n );\n },\n onDeactivate: ({ path }) => {\n const id = path.join('/');\n subIds[id].unsubscribe();\n delete subIds[id];\n },\n });\n}\n"]}
1
+ {"version":3,"file":"connectBusToClient.js","sourceRoot":"","sources":["../../src/trpc/connectBusToClient.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,kBAAkB,CAAC,EAAE,GAAG,EAAE,MAAM,EAAyD;IACvG,MAAM,MAAM,GAAmC,EAAE,CAAC;IAElD,GAAG,CAAC,WAAW,CAAC;QACd,IAAI,EAAE,EAAE;QACR,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;YACvB,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAE1B,MAAM,CAAC,OAAO;iBACX,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;iBACf,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;gBACd,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC3B,CAAC,CAAC;iBACD,KAAK,CAAC,GAAG,EAAE;gBACV,WAAW;YACb,CAAC,CAAC,CAAC;YAEL,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC,SAAS,CACzC,EAAE,IAAI,EAAE,EACR;gBACE,MAAM,CAAC,KAAK;oBACV,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAC3B,CAAC;aACF,CACF,CAAC;QACJ,CAAC;QACD,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;YACzB,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC1B,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;YACzB,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;QACpB,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { DataBus } from '@ms-cloudpack/data-bus';\nimport type { CreateTRPCClient } from '@trpc/client';\nimport type { Unsubscribable } from '@trpc/server/observable';\nimport type { AppRouter } from '../types/AppRouter.js';\n\nexport function connectBusToClient({ bus, client }: { bus: DataBus; client: CreateTRPCClient<AppRouter> }) {\n const subIds: Record<string, Unsubscribable> = {};\n\n bus.addProvider({\n path: [],\n onActivate: ({ path }) => {\n const id = path.join('/');\n\n client.getData\n .query({ path })\n .then((value) => {\n bus.publish(path, value);\n })\n .catch(() => {\n /* no-op */\n });\n\n subIds[id] = client.onDataChanged.subscribe(\n { path },\n {\n onData(value) {\n bus.publish(path, value);\n },\n },\n );\n },\n onDeactivate: ({ path }) => {\n const id = path.join('/');\n subIds[id].unsubscribe();\n delete subIds[id];\n },\n });\n}\n"]}
@@ -1,9 +1,7 @@
1
- import type { DataBus } from '@ms-cloudpack/data-bus';
2
1
  import type { TaskReporter } from '@ms-cloudpack/task-reporter';
3
- import type { CreateTRPCProxyClient } from '@trpc/client';
4
- import type { AppRouter } from './createAppRouter.js';
5
- export type CloudpackClient = CreateTRPCProxyClient<AppRouter> & {
6
- bus: DataBus;
2
+ import type { CreateTRPCClient } from '@trpc/client';
3
+ import type { AppRouter } from '../types/AppRouter.js';
4
+ export type CloudpackClient = CreateTRPCClient<AppRouter> & {
7
5
  close: () => Promise<void>;
8
6
  };
9
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"createCloudpackClient.d.ts","sourceRoot":"","sources":["../../src/trpc/createCloudpackClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAI1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC,SAAS,CAAC,GAAG;IAC/D,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB,GAAG,OAAO,CAAC,eAAe,CAAC,CAiD3B"}
1
+ {"version":3,"file":"createCloudpackClient.d.ts","sourceRoot":"","sources":["../../src/trpc/createCloudpackClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,SAAS,CAAC,GAAG;IAC1D,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB,GAAG,OAAO,CAAC,eAAe,CAAC,CAmD3B"}