@ms-cloudpack/remote-cache 0.10.1 → 0.10.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.
|
@@ -19984,7 +19984,7 @@ __name(_FilePersistence, "FilePersistence");
|
|
|
19984
19984
|
var FilePersistence = _FilePersistence;
|
|
19985
19985
|
|
|
19986
19986
|
// src/authentication/forks/msal-node-extensions/persistence/NapiRsKeyRingPersistence.ts
|
|
19987
|
-
var
|
|
19987
|
+
var _NapiRsKeyRingPersistence = class _NapiRsKeyRingPersistence extends BasePersistence {
|
|
19988
19988
|
constructor(filePersistence, service, account) {
|
|
19989
19989
|
super();
|
|
19990
19990
|
this.service = service;
|
|
@@ -19994,7 +19994,7 @@ var _NapiRsKeyRingPersistance = class _NapiRsKeyRingPersistance extends BasePers
|
|
|
19994
19994
|
}
|
|
19995
19995
|
static async create(fileLocation, serviceName, accountName, loggerOptions) {
|
|
19996
19996
|
const filePersistence = await FilePersistence.create(fileLocation, loggerOptions);
|
|
19997
|
-
return new
|
|
19997
|
+
return new _NapiRsKeyRingPersistence(filePersistence, serviceName, accountName);
|
|
19998
19998
|
}
|
|
19999
19999
|
async save(contents) {
|
|
20000
20000
|
try {
|
|
@@ -20005,7 +20005,7 @@ var _NapiRsKeyRingPersistance = class _NapiRsKeyRingPersistance extends BasePers
|
|
|
20005
20005
|
}
|
|
20006
20006
|
throw e;
|
|
20007
20007
|
}
|
|
20008
|
-
await this.filePersistence.save(
|
|
20008
|
+
await this.filePersistence.save("{}");
|
|
20009
20009
|
}
|
|
20010
20010
|
load() {
|
|
20011
20011
|
try {
|
|
@@ -20039,15 +20039,15 @@ var _NapiRsKeyRingPersistance = class _NapiRsKeyRingPersistance extends BasePers
|
|
|
20039
20039
|
}
|
|
20040
20040
|
createForPersistenceValidation() {
|
|
20041
20041
|
const testCacheFileLocation = `${dirname2(this.filePersistence.getFilePath())}/test.cache`;
|
|
20042
|
-
return
|
|
20042
|
+
return _NapiRsKeyRingPersistence.create(
|
|
20043
20043
|
testCacheFileLocation,
|
|
20044
20044
|
"persistenceValidationServiceName",
|
|
20045
20045
|
"persistencValidationAccountName"
|
|
20046
20046
|
);
|
|
20047
20047
|
}
|
|
20048
20048
|
};
|
|
20049
|
-
__name(
|
|
20050
|
-
var
|
|
20049
|
+
__name(_NapiRsKeyRingPersistence, "NapiRsKeyRingPersistence");
|
|
20050
|
+
var NapiRsKeyRingPersistence = _NapiRsKeyRingPersistence;
|
|
20051
20051
|
|
|
20052
20052
|
// src/authentication/forks/msal-node-extensions/persistence/FilePersistenceWithDataProtection.ts
|
|
20053
20053
|
import { protectData, unprotectData } from "node-dpapi-prebuilt";
|
|
@@ -20169,7 +20169,7 @@ async function persistanceFactory(options = {}) {
|
|
|
20169
20169
|
const { service, account } = defaultMsalValues.keyChain;
|
|
20170
20170
|
const persistencePath = getPersistencePath(name3 || defaultMsalValues.tokenCache.name);
|
|
20171
20171
|
try {
|
|
20172
|
-
const persistence = await
|
|
20172
|
+
const persistence = await NapiRsKeyRingPersistence.create(persistencePath, `${service}.${name3}`, account);
|
|
20173
20173
|
await persistence.load();
|
|
20174
20174
|
return persistence;
|
|
20175
20175
|
} catch (e) {
|
package/dist/index.js
CHANGED
|
@@ -111,7 +111,7 @@ async function createRemoteCacheClient(params) {
|
|
|
111
111
|
const azureLogEventHandler = registerAzureLogger();
|
|
112
112
|
const { context, options } = params;
|
|
113
113
|
const { container, loginMethod, storageAccount, cachePath, tenantId } = options;
|
|
114
|
-
const { getCredential } = await import("./getCredential-
|
|
114
|
+
const { getCredential } = await import("./getCredential-GVAO2BWN.js");
|
|
115
115
|
const { AzureRemoteCacheClient } = await import("./AzureRemoteCacheClient-XD7JMDG2.js");
|
|
116
116
|
const { ReporterDecorator } = await import("./ReporterDecorator-VMBTAZRW.js");
|
|
117
117
|
const { getListOfBlobs } = await import("./getListOfBlobs-EY2E5AZT.js");
|
package/lib/authentication/forks/msal-node-extensions/persistence/NapiRsKeyRingPersistence.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { Logger, LoggerOptions } from '@azure/msal-common';
|
|
2
2
|
import { BasePersistence } from './BasePersistence.js';
|
|
3
3
|
import type { IPersistence } from './IPersistence.js';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class NapiRsKeyRingPersistence extends BasePersistence implements IPersistence {
|
|
5
5
|
readonly service: string;
|
|
6
6
|
readonly account: string;
|
|
7
7
|
private readonly entry;
|
|
8
8
|
private readonly filePersistence;
|
|
9
9
|
private constructor();
|
|
10
|
-
static create(fileLocation: string, serviceName: string, accountName: string, loggerOptions?: LoggerOptions): Promise<
|
|
10
|
+
static create(fileLocation: string, serviceName: string, accountName: string, loggerOptions?: LoggerOptions): Promise<NapiRsKeyRingPersistence>;
|
|
11
11
|
save(contents: string): Promise<void>;
|
|
12
12
|
load(): Promise<string | null>;
|
|
13
13
|
delete(): Promise<boolean>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/remote-cache",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.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",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"lib/**/*.d.ts"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@ms-cloudpack/common-types": "^0.24.
|
|
30
|
+
"@ms-cloudpack/common-types": "^0.24.2",
|
|
31
31
|
"@ms-cloudpack/environment": "^0.1.1",
|
|
32
32
|
"@ms-cloudpack/retry": "^0.1.3",
|
|
33
33
|
"@ms-cloudpack/task-reporter": "^0.14.8",
|
|
34
|
-
"@ms-cloudpack/telemetry": "^0.10.
|
|
34
|
+
"@ms-cloudpack/telemetry": "^0.10.7",
|
|
35
35
|
"@napi-rs/keyring": "^1.0.0",
|
|
36
36
|
"mime-types": "^2.0.0",
|
|
37
37
|
"node-dpapi-prebuilt": "^1.0.3"
|