@ms-cloudpack/remote-cache 0.9.15 → 0.9.17
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/dist/{AzureRemoteCacheClient-CJD7OP6W.js → AzureRemoteCacheClient-2PTNMOT6.js} +562 -560
- package/dist/{getCredential-4DBWPMN2.js → getCredential-KVHUWSLC.js} +226 -223
- package/dist/{getListOfBlobs-DNKXQNGR.js → getListOfBlobs-3HS5OH6K.js} +2 -1
- package/dist/index.js +3 -3
- package/lib/AzureRemoteCacheClient.d.ts +2 -2
- package/lib/authentication/getAuthenticationRecord.d.ts +2 -1
- package/lib/authentication/lock-file/getAuthenticationLockFilePath.d.ts +11 -3
- package/lib/decorators/ReporterDecorator.d.ts +3 -3
- package/lib/getListOfBlobs.d.ts +1 -1
- package/lib/registerAzureLogger.d.ts +1 -1
- package/package.json +6 -5
|
@@ -17,7 +17,8 @@ import {
|
|
|
17
17
|
|
|
18
18
|
// src/getListOfBlobs.ts
|
|
19
19
|
var import_storage_blob = __toESM(require_dist(), 1);
|
|
20
|
-
async function getListOfBlobs(
|
|
20
|
+
async function getListOfBlobs(options) {
|
|
21
|
+
const { container, storageAccount, credential } = options;
|
|
21
22
|
const blobStorageClient = new import_storage_blob.BlobServiceClient(createBlobStorageUrl(storageAccount), credential);
|
|
22
23
|
const containerClient = blobStorageClient.getContainerClient(container);
|
|
23
24
|
const blobs = /* @__PURE__ */ new Set();
|
package/dist/index.js
CHANGED
|
@@ -98,10 +98,10 @@ async function createRemoteCacheClient(params) {
|
|
|
98
98
|
const azureLogEventHandler = registerAzureLogger();
|
|
99
99
|
const { context, options } = params;
|
|
100
100
|
const { container, loginMethod, storageAccount, cachePath, tenantId } = options;
|
|
101
|
-
const { getCredential } = await import("./getCredential-
|
|
102
|
-
const { AzureRemoteCacheClient } = await import("./AzureRemoteCacheClient-
|
|
101
|
+
const { getCredential } = await import("./getCredential-KVHUWSLC.js");
|
|
102
|
+
const { AzureRemoteCacheClient } = await import("./AzureRemoteCacheClient-2PTNMOT6.js");
|
|
103
103
|
const { ReporterDecorator } = await import("./ReporterDecorator-FZKB4MWN.js");
|
|
104
|
-
const { getListOfBlobs } = await import("./getListOfBlobs-
|
|
104
|
+
const { getListOfBlobs } = await import("./getListOfBlobs-3HS5OH6K.js");
|
|
105
105
|
const credential = await getCredential(
|
|
106
106
|
{ loginMethod, cachePath, tenantId },
|
|
107
107
|
{ ...context, azureLogger: azureLogEventHandler }
|
|
@@ -11,13 +11,13 @@ export declare class AzureRemoteCacheClient implements RemoteCacheClient {
|
|
|
11
11
|
* @param globMatches - The glob pattern to use when uploading the folder.
|
|
12
12
|
* @returns - A promise that resolves when the folder has been uploaded.
|
|
13
13
|
*/
|
|
14
|
-
uploadFolder(
|
|
14
|
+
uploadFolder(options: RemoteCacheClientUploadOperationOptions): Promise<'success' | 'not-found'>;
|
|
15
15
|
/**
|
|
16
16
|
* Downloads the folder from the remote cache.
|
|
17
17
|
* @param id - The unique identifier of the asset to download.
|
|
18
18
|
* @param path - The path to download the folder to.
|
|
19
19
|
* @returns - A promise that resolves when the folder has been downloaded.
|
|
20
20
|
*/
|
|
21
|
-
downloadFolder(
|
|
21
|
+
downloadFolder(options: RemoteCacheClientOperationOptions): Promise<'success' | 'not-found' | 'already-exist'>;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=AzureRemoteCacheClient.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type AuthenticationRecord } from '@azure/identity';
|
|
1
2
|
/**
|
|
2
3
|
* Retrieves the authentication record from Cloudpack's global cache folder.
|
|
3
4
|
* @param cachePath - The path to Cloudpack's cache folder.
|
|
4
5
|
* @returns - The authentication record if it exists; otherwise, returns `undefined`.
|
|
5
6
|
*/
|
|
6
|
-
export declare function getAuthenticationRecord(cachePath: string):
|
|
7
|
+
export declare function getAuthenticationRecord(cachePath: string): AuthenticationRecord | undefined;
|
|
7
8
|
//# sourceMappingURL=getAuthenticationRecord.d.ts.map
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @returns The file path of the authentication lock file.
|
|
3
3
|
* Expected responses:
|
|
4
|
-
* - Darwin:
|
|
5
|
-
* - Windows 8+:
|
|
6
|
-
* - Linux:
|
|
4
|
+
* - Darwin: `/Users/user/.IdentityService/cloudpack.lockfile`
|
|
5
|
+
* - Windows 8+: `C:\Users\user\AppData\Local\.IdentityService\cloudpack.lockfile`
|
|
6
|
+
* - Linux: `/home/user/.IdentityService/cloudpack.lockfile`
|
|
7
7
|
*
|
|
8
8
|
* The lock file is generated by the @azure/identity and msal-node-extensions packages. Unfortunately, these packages do not provide an API to retrieve the lock file path directly. Therefore, we've implemented a function to obtain their lock file path, albeit without a formal contract.
|
|
9
9
|
*/
|
|
10
10
|
export declare function getAuthenticationLockFilePath(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Local application data folder
|
|
13
|
+
* Expected values:
|
|
14
|
+
* - Darwin: `/Users/user/`
|
|
15
|
+
* - Windows 8+: `C:\Users\user\AppData\Local`
|
|
16
|
+
* - Linux: `/home/user/.local/share`
|
|
17
|
+
*/
|
|
18
|
+
export declare function getIdentityServiceCachePath(): string;
|
|
11
19
|
//# sourceMappingURL=getAuthenticationLockFilePath.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TaskReporter } from '@ms-cloudpack/task-reporter';
|
|
2
|
-
import type { RemoteCacheClient, RemoteCacheClientUploadOperationOptions, RemoteCacheClientOperationOptions } from '../types/RemoteCacheClient.js';
|
|
2
|
+
import type { RemoteCacheClient, RemoteCacheClientUploadOperationOptions, RemoteCacheClientOperationOptions, RemoteCacheClientOperationResult } from '../types/RemoteCacheClient.js';
|
|
3
3
|
import type { TelemetryClient } from '@ms-cloudpack/telemetry';
|
|
4
4
|
export declare class ReporterDecorator implements RemoteCacheClient {
|
|
5
5
|
private readonly client;
|
|
@@ -9,7 +9,7 @@ export declare class ReporterDecorator implements RemoteCacheClient {
|
|
|
9
9
|
telemetryClient: TelemetryClient;
|
|
10
10
|
});
|
|
11
11
|
private buildFailureResult;
|
|
12
|
-
uploadFolder(options: RemoteCacheClientUploadOperationOptions): Promise<
|
|
13
|
-
downloadFolder(options: RemoteCacheClientOperationOptions): Promise<
|
|
12
|
+
uploadFolder(options: RemoteCacheClientUploadOperationOptions): Promise<RemoteCacheClientOperationResult>;
|
|
13
|
+
downloadFolder(options: RemoteCacheClientOperationOptions): Promise<RemoteCacheClientOperationResult>;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=ReporterDecorator.d.ts.map
|
package/lib/getListOfBlobs.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import type { RemoteCacheClientOptions } from './types/RemoteCacheClientOptions.
|
|
|
2
2
|
/**
|
|
3
3
|
* Gets all the blobs in the remote cache.
|
|
4
4
|
*/
|
|
5
|
-
export declare function getListOfBlobs(
|
|
5
|
+
export declare function getListOfBlobs(options: RemoteCacheClientOptions): Promise<Set<string>>;
|
|
6
6
|
//# sourceMappingURL=getListOfBlobs.d.ts.map
|
|
@@ -2,5 +2,5 @@ import EventEmitter from 'events';
|
|
|
2
2
|
/**
|
|
3
3
|
* Registers a custom logger for the Azure SDK that emits events for some specific log messages.
|
|
4
4
|
*/
|
|
5
|
-
export declare function registerAzureLogger(): EventEmitter
|
|
5
|
+
export declare function registerAzureLogger(): EventEmitter;
|
|
6
6
|
//# sourceMappingURL=registerAzureLogger.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/remote-cache",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"description": "Manages syncing the local Cloudpack cached assets to/from a remote storage service.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,10 +27,11 @@
|
|
|
27
27
|
"lib/**/*.d.ts"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@ms-cloudpack/common-types": "^0.23.
|
|
31
|
-
"@ms-cloudpack/
|
|
32
|
-
"@ms-cloudpack/
|
|
33
|
-
"@ms-cloudpack/
|
|
30
|
+
"@ms-cloudpack/common-types": "^0.23.7",
|
|
31
|
+
"@ms-cloudpack/environment": "^0.1.1",
|
|
32
|
+
"@ms-cloudpack/retry": "^0.1.3",
|
|
33
|
+
"@ms-cloudpack/task-reporter": "^0.14.8",
|
|
34
|
+
"@ms-cloudpack/telemetry": "^0.10.4",
|
|
34
35
|
"@napi-rs/keyring": "^1.0.0",
|
|
35
36
|
"mime-types": "^2.0.0",
|
|
36
37
|
"node-dpapi-prebuilt": "^1.0.3"
|