@ms-cloudpack/remote-cache 0.1.1 → 0.1.3
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/createDownloadTask.d.ts +1 -1
- package/lib/createDownloadTask.d.ts.map +1 -1
- package/lib/createDownloadTask.js +0 -1
- package/lib/createDownloadTask.js.map +1 -1
- package/lib/createUploadTask.d.ts +1 -1
- package/lib/createUploadTask.d.ts.map +1 -1
- package/lib/createUploadTask.js.map +1 -1
- package/lib/getPackagesToSync.d.ts +2 -7
- package/lib/getPackagesToSync.d.ts.map +1 -1
- package/lib/getPackagesToSync.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/syncToRemote.d.ts +7 -1
- package/lib/syncToRemote.d.ts.map +1 -1
- package/lib/syncToRemote.js +3 -5
- package/lib/syncToRemote.js.map +1 -1
- package/lib/types/PackageToSync.d.ts +7 -0
- package/lib/types/PackageToSync.d.ts.map +1 -0
- package/lib/types/PackageToSync.js +2 -0
- package/lib/types/PackageToSync.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RemoteCacheClient } from './RemoteCacheClient.js';
|
|
2
|
-
import { type PackageToSync } from './getPackagesToSync.js';
|
|
3
2
|
import type { Task } from './Task.js';
|
|
3
|
+
import type { PackageToSync } from './types/PackageToSync.js';
|
|
4
4
|
export declare function createDownloadTask(client: RemoteCacheClient, { folderName, packageName, path, version }: PackageToSync): Task;
|
|
5
5
|
//# sourceMappingURL=createDownloadTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDownloadTask.d.ts","sourceRoot":"","sources":["../src/createDownloadTask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"createDownloadTask.d.ts","sourceRoot":"","sources":["../src/createDownloadTask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,iBAAiB,EACzB,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,aAAa,GACxD,IAAI,CAmBN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDownloadTask.js","sourceRoot":"","sources":["../src/createDownloadTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createDownloadTask.js","sourceRoot":"","sources":["../src/createDownloadTask.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,MAAM,UAAU,kBAAkB,CAChC,MAAyB,EACzB,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAiB;IAEzD,OAAO;QACL,IAAI,EAAE,eAAe,WAAW,IAAI,OAAO,EAAE;QAC7C,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;gBACpB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,8CAA8C,EAAE,CAAC;aACpF;YAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;YAC7D,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAC;aACtE;YAED,OAAO;gBACL,MAAM,EAAE,UAAU;gBAClB,OAAO,EAAE,YAAY,CAAC,CAAC,eAAe,UAAU,EAAE,EAAE,SAAS,IAAI,EAAE,EAAE,YAAY,OAAO,EAAE,CAAC,CAAC;aAC7F,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { RemoteCacheClient } from './RemoteCacheClient.js';\nimport type { Task } from './Task.js';\nimport { existsSync } from 'fs';\nimport { bulletedList } from '@ms-cloudpack/task-reporter';\nimport type { PackageToSync } from './types/PackageToSync.js';\n\nexport function createDownloadTask(\n client: RemoteCacheClient,\n { folderName, packageName, path, version }: PackageToSync,\n): Task {\n return {\n name: `Downloading ${packageName}@${version}`,\n execute: async () => {\n if (existsSync(path)) {\n return { status: 'skip', message: 'Package is already exist in the local cache.' };\n }\n\n const result = await client.downloadFolder(folderName, path);\n if (!result) {\n return { status: 'skip', message: `not found in the remote cache.` };\n }\n\n return {\n status: 'complete',\n details: bulletedList([`FolderName: ${folderName}`, `Path: ${path}`, `Version: ${version}`]),\n };\n },\n };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RemoteCacheClient } from './RemoteCacheClient.js';
|
|
2
|
-
import type { PackageToSync } from './getPackagesToSync.js';
|
|
3
2
|
import type { Task } from './Task.js';
|
|
3
|
+
import type { PackageToSync } from './types/PackageToSync.js';
|
|
4
4
|
export declare function createUploadTask(client: RemoteCacheClient, { folderName, packageName, path, version }: PackageToSync): Task;
|
|
5
5
|
//# sourceMappingURL=createUploadTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUploadTask.d.ts","sourceRoot":"","sources":["../src/createUploadTask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"createUploadTask.d.ts","sourceRoot":"","sources":["../src/createUploadTask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,iBAAiB,EACzB,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,aAAa,GACxD,IAAI,CAeN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUploadTask.js","sourceRoot":"","sources":["../src/createUploadTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createUploadTask.js","sourceRoot":"","sources":["../src/createUploadTask.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,MAAM,UAAU,gBAAgB,CAC9B,MAAyB,EACzB,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAiB;IAEzD,OAAO;QACL,IAAI,EAAE,aAAa,WAAW,IAAI,OAAO,EAAE;QAC3C,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBACrB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;aACrE;YAED,MAAM,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;YAC5C,OAAO;gBACL,MAAM,EAAE,UAAU;gBAClB,OAAO,EAAE,YAAY,CAAC,CAAC,eAAe,UAAU,EAAE,EAAE,SAAS,IAAI,EAAE,EAAE,YAAY,OAAO,EAAE,CAAC,CAAC;aAC7F,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { RemoteCacheClient } from './RemoteCacheClient.js';\nimport type { Task } from './Task.js';\nimport { existsSync } from 'fs';\nimport { bulletedList } from '@ms-cloudpack/task-reporter';\nimport type { PackageToSync } from './types/PackageToSync.js';\n\nexport function createUploadTask(\n client: RemoteCacheClient,\n { folderName, packageName, path, version }: PackageToSync,\n): Task {\n return {\n name: `Uploading ${packageName}@${version}`,\n execute: async () => {\n if (!existsSync(path)) {\n return { status: 'skip', message: `Not found in the local cache.` };\n }\n\n await client.uploadFolder(folderName, path);\n return {\n status: 'complete',\n details: bulletedList([`FolderName: ${folderName}`, `Path: ${path}`, `Version: ${version}`]),\n };\n },\n };\n}\n"]}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
path: string;
|
|
4
|
-
folderName: string;
|
|
5
|
-
packageName: string;
|
|
6
|
-
version: string;
|
|
7
|
-
}
|
|
1
|
+
import type { PackageToSync } from './types/PackageToSync.js';
|
|
2
|
+
import type { SyncContext } from './types/SyncContext.js';
|
|
8
3
|
export declare function getPackagesToSync({ packages, getBundleDetails, resolveMap, }: SyncContext): Promise<PackageToSync[]>;
|
|
9
4
|
//# sourceMappingURL=getPackagesToSync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPackagesToSync.d.ts","sourceRoot":"","sources":["../src/getPackagesToSync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"getPackagesToSync.d.ts","sourceRoot":"","sources":["../src/getPackagesToSync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,wBAAsB,iBAAiB,CAAC,EACtC,QAAQ,EACR,gBAAgB,EAChB,UAAU,GACX,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAoBxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPackagesToSync.js","sourceRoot":"","sources":["../src/getPackagesToSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"getPackagesToSync.js","sourceRoot":"","sources":["../src/getPackagesToSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,iCAAiC,CAAC;AAI5F,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,QAAQ,EACR,gBAAgB,EAChB,UAAU,GACE;IACZ,MAAM,IAAI,GAAoB,EAAE,CAAC;IAEjC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;SAC3C,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CACnB,mBAAmB,CAAC;QAClB,WAAW;QACX,UAAU;KACX,CAAC,CACH;SACA,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAsB,CAAC;IAE/C,KAAK,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,cAAc,EAAE;QACjE,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QACtE,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;SACtE;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { findResolveMapEntry, type ResolveMapEntry } from '@ms-cloudpack/package-utilities';\nimport type { PackageToSync } from './types/PackageToSync.js';\nimport type { SyncContext } from './types/SyncContext.js';\n\nexport async function getPackagesToSync({\n packages,\n getBundleDetails,\n resolveMap,\n}: SyncContext): Promise<PackageToSync[]> {\n const list: PackageToSync[] = [];\n\n const packageEntries = Object.keys(resolveMap)\n .map((packageName) =>\n findResolveMapEntry({\n packageName,\n resolveMap,\n }),\n )\n .filter((item) => item) as ResolveMapEntry[];\n\n for (const { path: packagePath, name, version } of packageEntries) {\n const details = await getBundleDetails({ packagePath }, { packages });\n if (details.isExternal) {\n list.push({ ...details.outputLocation, packageName: name, version });\n }\n }\n\n return list;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { syncToLocal } from './syncToLocal.js';\nexport { syncToRemote } from './syncToRemote.js';\n\nexport type { SyncContext } from './types/SyncContext.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { syncToLocal } from './syncToLocal.js';\nexport { syncToRemote } from './syncToRemote.js';\n\nexport type { SyncContext } from './types/SyncContext.js';\nexport type { PackageToSync } from './types/PackageToSync.js';\n"]}
|
package/lib/syncToRemote.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { SyncContext } from './types/SyncContext.js';
|
|
2
|
+
import type { TaskReporter } from '@ms-cloudpack/task-reporter';
|
|
3
|
+
import type { PackageToSync } from './types/PackageToSync.js';
|
|
2
4
|
/**
|
|
3
5
|
* Syncs the packages to the remote cache.
|
|
4
6
|
* @param syncOptions - The options for the sync command.
|
|
5
7
|
* @param context - The task context.
|
|
6
8
|
* @returns The number of packages synced.
|
|
7
9
|
*/
|
|
8
|
-
export declare function syncToRemote(
|
|
10
|
+
export declare function syncToRemote(options: {
|
|
11
|
+
config: SyncContext['config'];
|
|
12
|
+
reporter: TaskReporter;
|
|
13
|
+
packages: PackageToSync[];
|
|
14
|
+
}): Promise<void>;
|
|
9
15
|
//# sourceMappingURL=syncToRemote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncToRemote.d.ts","sourceRoot":"","sources":["../src/syncToRemote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"syncToRemote.d.ts","sourceRoot":"","sources":["../src/syncToRemote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAI1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE;IAC1C,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBhB"}
|
package/lib/syncToRemote.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getPackagesToSync } from './getPackagesToSync.js';
|
|
2
1
|
import { createUploadTask } from './createUploadTask.js';
|
|
3
2
|
import { createRemoteCacheClient } from './createRemoteCacheClient.js';
|
|
4
3
|
import { performance } from 'perf_hooks';
|
|
@@ -9,15 +8,14 @@ import { PerfMarkerSyncStart, PerfMeasurementSyncUpload } from './performance/ma
|
|
|
9
8
|
* @param context - The task context.
|
|
10
9
|
* @returns The number of packages synced.
|
|
11
10
|
*/
|
|
12
|
-
export async function syncToRemote(
|
|
13
|
-
const { config, reporter } =
|
|
11
|
+
export async function syncToRemote(options) {
|
|
12
|
+
const { config, reporter, packages } = options;
|
|
14
13
|
performance.mark(PerfMarkerSyncStart);
|
|
15
14
|
const client = await createRemoteCacheClient({ config, permissions: { read: false, write: true } });
|
|
16
15
|
if (!client) {
|
|
17
16
|
return;
|
|
18
17
|
}
|
|
19
|
-
const
|
|
20
|
-
const uploads = list.map((item) => {
|
|
18
|
+
const uploads = packages.map((item) => {
|
|
21
19
|
const { name, execute } = createUploadTask(client, item);
|
|
22
20
|
return reporter.runTask(name, execute);
|
|
23
21
|
});
|
package/lib/syncToRemote.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncToRemote.js","sourceRoot":"","sources":["../src/syncToRemote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"syncToRemote.js","sourceRoot":"","sources":["../src/syncToRemote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAI1F;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAIlC;IACC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAC/C,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAEtC,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACpG,IAAI,CAAC,MAAM,EAAE;QACX,OAAO;KACR;IAED,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACpC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACzD,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAE3B,WAAW,CAAC,OAAO,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;AACtE,CAAC","sourcesContent":["import { createUploadTask } from './createUploadTask.js';\nimport type { SyncContext } from './types/SyncContext.js';\nimport { createRemoteCacheClient } from './createRemoteCacheClient.js';\nimport { performance } from 'perf_hooks';\nimport { PerfMarkerSyncStart, PerfMeasurementSyncUpload } from './performance/markers.js';\nimport type { TaskReporter } from '@ms-cloudpack/task-reporter';\nimport type { PackageToSync } from './types/PackageToSync.js';\n\n/**\n * Syncs the packages to the remote cache.\n * @param syncOptions - The options for the sync command.\n * @param context - The task context.\n * @returns The number of packages synced.\n */\nexport async function syncToRemote(options: {\n config: SyncContext['config'];\n reporter: TaskReporter;\n packages: PackageToSync[];\n}): Promise<void> {\n const { config, reporter, packages } = options;\n performance.mark(PerfMarkerSyncStart);\n\n const client = await createRemoteCacheClient({ config, permissions: { read: false, write: true } });\n if (!client) {\n return;\n }\n\n const uploads = packages.map((item) => {\n const { name, execute } = createUploadTask(client, item);\n return reporter.runTask(name, execute);\n });\n\n await Promise.all(uploads);\n\n performance.measure(PerfMeasurementSyncUpload, PerfMarkerSyncStart);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageToSync.d.ts","sourceRoot":"","sources":["../../src/types/PackageToSync.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageToSync.js","sourceRoot":"","sources":["../../src/types/PackageToSync.ts"],"names":[],"mappings":"","sourcesContent":["export interface PackageToSync {\n path: string;\n folderName: string;\n packageName: string;\n version: string;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/remote-cache",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Manages syncing the local Cloudpack cached assets to/from a remote storage service.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ms-cloudpack/bundler-types": "^0.17.0",
|
|
33
33
|
"@ms-cloudpack/package-utilities": "^5.1.1",
|
|
34
|
-
"@ms-cloudpack/task-reporter": "^0.7.
|
|
34
|
+
"@ms-cloudpack/task-reporter": "^0.7.2",
|
|
35
35
|
"@azure/identity": "^3.2.3",
|
|
36
36
|
"@azure/storage-blob": "^12.15.0",
|
|
37
37
|
"@napi-rs/keyring": "^1.1.3",
|