@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.
- package/lib/apis/addPackageOverride.d.ts +4 -19
- package/lib/apis/ensurePackageBundled.d.ts +0 -16
- package/lib/apis/ensurePackageBundled.d.ts.map +1 -1
- package/lib/apis/ensurePackageBundled.js +1 -59
- package/lib/apis/ensurePackageBundled.js.map +1 -1
- package/lib/apis/getData.d.ts +4 -16
- package/lib/apis/getSessionId.d.ts +4 -14
- package/lib/apis/index.d.ts +0 -3
- package/lib/apis/index.d.ts.map +1 -1
- package/lib/apis/index.js +1 -3
- package/lib/apis/index.js.map +1 -1
- package/lib/apis/linkPath.d.ts +4 -19
- package/lib/apis/onDataChanged.d.ts +4 -16
- package/lib/apis/openCodeEditor.d.ts +4 -19
- package/lib/apis/openConfigEditor.d.ts +4 -14
- package/lib/apis/openConfigEditor.d.ts.map +1 -1
- package/lib/apis/openFilePath.d.ts +4 -17
- package/lib/apis/reportMetric.d.ts +4 -18
- package/lib/apis/restartAllTasks.d.ts +4 -14
- package/lib/apis/restartAllTasks.d.ts.map +1 -1
- package/lib/apis/restartTask.d.ts +4 -17
- package/lib/apis/syncDownload.d.ts +2 -31
- package/lib/apis/syncDownload.d.ts.map +1 -1
- package/lib/apis/syncDownload.js +1 -8
- package/lib/apis/syncDownload.js.map +1 -1
- package/lib/apis/syncUpload.d.ts +2 -31
- package/lib/apis/syncUpload.d.ts.map +1 -1
- package/lib/apis/syncUpload.js +1 -8
- package/lib/apis/syncUpload.js.map +1 -1
- package/lib/apis/unlinkPath.d.ts +4 -19
- package/lib/apis/validatePackageOverride.d.ts +4 -20
- package/lib/data/busSources.d.ts +5 -4
- package/lib/data/busSources.d.ts.map +1 -1
- package/lib/data/busSources.js +1 -2
- package/lib/data/busSources.js.map +1 -1
- package/lib/index.browser.d.ts +0 -8
- package/lib/index.browser.d.ts.map +1 -1
- package/lib/index.browser.js.map +1 -1
- package/lib/index.d.ts +8 -22
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -7
- package/lib/index.js.map +1 -1
- package/lib/trpc/common.d.ts +14 -19
- package/lib/trpc/common.d.ts.map +1 -1
- package/lib/trpc/common.js +1 -1
- package/lib/trpc/common.js.map +1 -1
- package/lib/trpc/connectBusToClient.d.ts +3 -3
- package/lib/trpc/connectBusToClient.d.ts.map +1 -1
- package/lib/trpc/connectBusToClient.js.map +1 -1
- package/lib/trpc/createCloudpackClient.d.ts +3 -5
- package/lib/trpc/createCloudpackClient.d.ts.map +1 -1
- package/lib/trpc/createCloudpackClient.js +4 -2
- package/lib/trpc/createCloudpackClient.js.map +1 -1
- package/lib/trpc/createCloudpackServer.d.ts +5 -66
- package/lib/trpc/createCloudpackServer.d.ts.map +1 -1
- package/lib/trpc/createCloudpackServer.js +5 -16
- package/lib/trpc/createCloudpackServer.js.map +1 -1
- package/lib/types/AppRouter.d.ts +6 -0
- package/lib/types/AppRouter.d.ts.map +1 -0
- package/lib/types/AppRouter.js +2 -0
- package/lib/types/AppRouter.js.map +1 -0
- package/lib/types/SyncInput.d.ts +6 -0
- package/lib/types/SyncInput.d.ts.map +1 -0
- package/lib/types/SyncInput.js +2 -0
- package/lib/types/SyncInput.js.map +1 -0
- package/lib/utilities/getImportsAndExports.d.ts.map +1 -1
- package/lib/utilities/getImportsAndExports.js +5 -4
- package/lib/utilities/getImportsAndExports.js.map +1 -1
- package/package.json +5 -5
- package/lib/trpc/createAppRouter.d.ts +0 -325
- package/lib/trpc/createAppRouter.d.ts.map +0 -1
- package/lib/trpc/createAppRouter.js +0 -9
- package/lib/trpc/createAppRouter.js.map +0 -1
- package/lib/trpc/createRouterFromApis.d.ts +0 -12
- package/lib/trpc/createRouterFromApis.d.ts.map +0 -1
- package/lib/trpc/createRouterFromApis.js +0 -9
- package/lib/trpc/createRouterFromApis.js.map +0 -1
- package/lib/types/ApiServer.d.ts +0 -6
- package/lib/types/ApiServer.d.ts.map +0 -1
- package/lib/types/ApiServer.js +0 -2
- package/lib/types/ApiServer.js.map +0 -1
- package/lib/types/ErrorEntry.d.ts +0 -4
- package/lib/types/ErrorEntry.d.ts.map +0 -1
- package/lib/types/ErrorEntry.js +0 -3
- package/lib/types/ErrorEntry.js.map +0 -1
- package/lib/types/ZodLoginMethod.d.ts +0 -3
- package/lib/types/ZodLoginMethod.d.ts.map +0 -1
- package/lib/types/ZodLoginMethod.js +0 -3
- 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
|
-
|
|
4
|
-
|
|
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":"
|
|
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"}
|
package/lib/apis/syncDownload.js
CHANGED
|
@@ -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
|
-
//
|
|
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,
|
|
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"]}
|
package/lib/apis/syncUpload.d.ts
CHANGED
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import type { ApiParams } from '../types/ApiParams.js';
|
|
3
|
-
|
|
4
|
-
|
|
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":"
|
|
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"}
|
package/lib/apis/syncUpload.js
CHANGED
|
@@ -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
|
-
//
|
|
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,
|
|
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,yCAAyC,CAAC;AAClF,OAAO,EAAE,uCAAuC,EAAE,MAAM,yDAAyD,CAAC;AAClH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,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,GAAG,OAAO,CAAC;IAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAC3B,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,oBAAoB,GAAG,MAAM,EAAE,QAAQ,EAAE,oBAAoB,IAAI,KAAK,CAAC;IAE7E,wCAAwC;IACxC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAEtE,MAAM,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACnF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE1D,MAAM,CAAC,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YAC3D,uBAAuB,CAAC;gBACtB,KAAK,EAAE;oBACL,WAAW;iBACZ;gBACD,GAAG;aACJ,CAAC;YACF,oBAAoB,CAAC;gBACnB,KAAK,EAAE;oBACL,IAAI;oBACJ,OAAO;oBACP,mBAAmB,EAAE,IAAI;iBAC1B;gBACD,GAAG;aACJ,CAAC;SACH,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC;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"]}
|
package/lib/apis/unlinkPath.d.ts
CHANGED
|
@@ -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").
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
}
|
|
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").
|
|
28
|
-
|
|
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
|
-
|
|
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
|
-
}
|
|
36
|
+
}>;
|
|
53
37
|
}
|
|
54
38
|
export {};
|
|
55
39
|
//# sourceMappingURL=validatePackageOverride.d.ts.map
|
package/lib/data/busSources.d.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
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:
|
|
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:
|
|
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;
|
|
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"}
|
package/lib/data/busSources.js
CHANGED
|
@@ -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:
|
|
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,
|
|
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"]}
|
package/lib/index.browser.d.ts
CHANGED
|
@@ -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,
|
|
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"}
|
package/lib/index.browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"
|
|
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 {
|
|
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 {
|
|
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
|
|
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
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,YAAY,EAAE,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,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,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 {
|
|
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
|
|
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":"
|
|
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"]}
|
package/lib/trpc/common.d.ts
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
/** Reusable TRPC router helper. */
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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:
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
package/lib/trpc/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAMA,mCAAmC;AACnC,eAAO,MAAM,
|
|
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"}
|
package/lib/trpc/common.js
CHANGED
|
@@ -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
|
|
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
|
package/lib/trpc/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/trpc/common.ts"],"names":[],"mappings":"AAAA,OAAO,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,
|
|
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 {
|
|
3
|
-
import type { AppRouter } from '
|
|
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:
|
|
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,
|
|
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,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,wBAAgB,kBAAkB,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAA;CAAE,QAgCxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectBusToClient.js","sourceRoot":"","sources":["../../src/trpc/connectBusToClient.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,kBAAkB,CAAC,EAAE,GAAG,EAAE,MAAM,
|
|
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 {
|
|
4
|
-
import type { AppRouter } from '
|
|
5
|
-
export type CloudpackClient =
|
|
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":"
|
|
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"}
|