@ms-cloudpack/remote-cache 0.11.79 → 0.12.1
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/NOTICE.txt +124 -86
- package/dist/{AzureRemoteCacheClient-S655UBV6.js → AzureRemoteCacheClient-IQQATZ4C.js} +20 -20
- package/dist/{ReporterDecorator-DNRF2TDF.js → ReporterDecorator-TXYL7NGD.js} +1 -1
- package/dist/{chunk-XII3BYIY.js → chunk-3AKZVDQW.js} +529 -6072
- package/dist/{chunk-GKUS2JGY.js → chunk-BKTAAWO5.js} +1 -3
- package/dist/{chunk-3WTIWSWN.js → chunk-JVACB3EN.js} +1 -1
- package/dist/{chunk-HONSOHFT.js → chunk-VAAN3ZWL.js} +1 -1
- package/dist/chunk-X63PAUN4.js +7082 -0
- package/dist/{esm-FYSF76KZ.js → esm-OOZX3H2S.js} +7 -6
- package/dist/getCredential-SDHKBJNP.js +17468 -0
- package/dist/{getListOfBlobs-EKSDNQNV.js → getListOfBlobs-TO4FMDDN.js} +1 -1
- package/dist/index.js +477 -25
- package/dist/package-PNRD3FFN.js +562 -0
- package/lib/authentication/forks/identity-cache-persistence/cachePersistencePlugin.d.ts +10 -13
- package/lib/authentication/forks/identity-cache-persistence/platforms.d.ts +4 -4
- package/lib/authentication/forks/identity-cache-persistence/provider.d.ts +2 -7
- package/lib/authentication/forks/msal-node-extensions/Dpapi.d.ts +6 -0
- package/lib/authentication/forks/msal-node-extensions/error/PersistenceError.d.ts +25 -9
- package/lib/authentication/forks/msal-node-extensions/index.d.ts +7 -0
- package/lib/authentication/forks/msal-node-extensions/lock/CrossPlatformLock.d.ts +1 -1
- package/lib/authentication/forks/msal-node-extensions/lock/CrossPlatformLockOptions.d.ts +0 -5
- package/lib/authentication/forks/msal-node-extensions/persistence/DataProtectionScope.d.ts +2 -0
- package/lib/authentication/forks/msal-node-extensions/persistence/FilePersistence.d.ts +1 -2
- package/lib/authentication/forks/msal-node-extensions/persistence/FilePersistenceWithDataProtection.d.ts +2 -7
- package/lib/authentication/forks/msal-node-extensions/persistence/IPersistence.d.ts +1 -6
- package/lib/authentication/forks/msal-node-extensions/persistence/IPersistenceConfiguration.d.ts +2 -7
- package/lib/authentication/forks/msal-node-extensions/persistence/NapiRsKeyRingPersistence.d.ts +1 -1
- package/lib/authentication/forks/msal-node-extensions/persistence/PersistenceCachePlugin.d.ts +8 -6
- package/lib/authentication/forks/msal-node-extensions/utils/Constants.d.ts +0 -16
- package/lib/authentication/forks/msal-node-extensions/utils/TypeGuards.d.ts +0 -5
- package/package.json +16 -16
- package/dist/chunk-BOUMQX3J.js +0 -1464
- package/dist/chunk-MIWDHAQF.js +0 -470
- package/dist/getCredential-Y4HWJOQE.js +0 -30268
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/error/PersistenceError.ts
|
|
5
|
-
*/
|
|
6
1
|
/**
|
|
7
2
|
* Error thrown when trying to write MSAL cache to persistence.
|
|
8
3
|
*/
|
|
@@ -14,6 +9,10 @@ export declare class PersistenceError extends Error {
|
|
|
14
9
|
* Error thrown when trying to access the file system.
|
|
15
10
|
*/
|
|
16
11
|
static createFileSystemError(errorCode: string, errorMessage: string): PersistenceError;
|
|
12
|
+
/**
|
|
13
|
+
* Error thrown when trying to write, load, or delete data from NapiRsKeyRingPersistence.
|
|
14
|
+
*/
|
|
15
|
+
static createNapiRsKeyRingPersistenceError(errorMessage: string): PersistenceError;
|
|
17
16
|
/**
|
|
18
17
|
* Error thrown when trying to encrypt or decrypt data using DPAPI on Windows.
|
|
19
18
|
*/
|
|
@@ -22,10 +21,6 @@ export declare class PersistenceError extends Error {
|
|
|
22
21
|
* Error thrown when using the cross platform lock.
|
|
23
22
|
*/
|
|
24
23
|
static createCrossPlatformLockError(errorMessage: string): PersistenceError;
|
|
25
|
-
/**
|
|
26
|
-
* Error thrown when trying to write, load, or delete data from NapiRsKeyRingPersistence.
|
|
27
|
-
*/
|
|
28
|
-
static createNapiRsKeyRingPersistenceError(errorMessage: string): PersistenceError;
|
|
29
24
|
/**
|
|
30
25
|
* Throw cache persistence error
|
|
31
26
|
*
|
|
@@ -33,5 +28,26 @@ export declare class PersistenceError extends Error {
|
|
|
33
28
|
* @returns PersistenceError
|
|
34
29
|
*/
|
|
35
30
|
static createCachePersistenceError(errorMessage: string): PersistenceError;
|
|
31
|
+
/**
|
|
32
|
+
* Throw unsupported error
|
|
33
|
+
*
|
|
34
|
+
* @param errorMessage string
|
|
35
|
+
* @returns PersistenceError
|
|
36
|
+
*/
|
|
37
|
+
static createNotSupportedError(errorMessage: string): PersistenceError;
|
|
38
|
+
/**
|
|
39
|
+
* Throw persistence not verified error
|
|
40
|
+
*
|
|
41
|
+
* @param errorMessage string
|
|
42
|
+
* @returns PersistenceError
|
|
43
|
+
*/
|
|
44
|
+
static createPersistenceNotVerifiedError(errorMessage: string): PersistenceError;
|
|
45
|
+
/**
|
|
46
|
+
* Throw persistence creation validation error
|
|
47
|
+
*
|
|
48
|
+
* @param errorMessage string
|
|
49
|
+
* @returns PersistenceError
|
|
50
|
+
*/
|
|
51
|
+
static createPersistenceNotValidatedError(errorMessage: string): PersistenceError;
|
|
36
52
|
}
|
|
37
53
|
//# sourceMappingURL=PersistenceError.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { DataProtectionScope } from './persistence/DataProtectionScope.js';
|
|
2
|
+
export { FilePersistence } from './persistence/FilePersistence.js';
|
|
3
|
+
export { FilePersistenceWithDataProtection } from './persistence/FilePersistenceWithDataProtection.js';
|
|
4
|
+
export type { IPersistence } from './persistence/IPersistence.js';
|
|
5
|
+
export { NapiRsKeyRingPersistence } from './persistence/NapiRsKeyRingPersistence.js';
|
|
6
|
+
export { PersistenceCachePlugin } from './persistence/PersistenceCachePlugin.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/lock/CrossPlatformLockOptions.ts
|
|
5
|
-
*/
|
|
6
1
|
/**
|
|
7
2
|
* Options for CrossPlatform lock.
|
|
8
3
|
*
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { IPersistence } from './IPersistence.js';
|
|
2
|
-
import type
|
|
3
|
-
import { Logger } from '@azure/msal-common';
|
|
2
|
+
import { Logger, type LoggerOptions } from '@azure/msal-common/node';
|
|
4
3
|
import { BasePersistence } from './BasePersistence.js';
|
|
5
4
|
/**
|
|
6
5
|
* Reads and writes data to file specified by file location. File contents are not
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/persistence/FilePersistenceWithDataProtection.ts
|
|
5
|
-
*/
|
|
6
1
|
import type { IPersistence } from './IPersistence.js';
|
|
7
|
-
import {
|
|
8
|
-
import type { Logger, LoggerOptions } from '@azure/msal-common';
|
|
2
|
+
import type { DataProtectionScope } from './DataProtectionScope.js';
|
|
3
|
+
import type { Logger, LoggerOptions } from '@azure/msal-common/node';
|
|
9
4
|
import { BasePersistence } from './BasePersistence.js';
|
|
10
5
|
/**
|
|
11
6
|
* Uses CryptProtectData and CryptUnprotectData on Windows to encrypt and decrypt file contents.
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/persistence/IPersistence.ts
|
|
5
|
-
*/
|
|
6
|
-
import type { Logger } from '@azure/msal-common';
|
|
1
|
+
import type { Logger } from '@azure/msal-common/node';
|
|
7
2
|
export interface IPersistence {
|
|
8
3
|
save(contents: string): Promise<void>;
|
|
9
4
|
load(): Promise<string | null>;
|
package/lib/authentication/forks/msal-node-extensions/persistence/IPersistenceConfiguration.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/persistence/IPersistenceConfiguration.ts
|
|
5
|
-
*/
|
|
6
|
-
import type { LoggerOptions } from '@azure/msal-common';
|
|
7
|
-
import type { DataProtectionScope } from 'node-dpapi-prebuilt';
|
|
1
|
+
import type { LoggerOptions } from '@azure/msal-common/node';
|
|
2
|
+
import type { DataProtectionScope } from './DataProtectionScope.js';
|
|
8
3
|
export interface IPersistenceConfiguration {
|
|
9
4
|
cachePath?: string;
|
|
10
5
|
dataProtectionScope?: DataProtectionScope;
|
package/lib/authentication/forks/msal-node-extensions/persistence/NapiRsKeyRingPersistence.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Logger, LoggerOptions } from '@azure/msal-common';
|
|
1
|
+
import type { Logger, LoggerOptions } from '@azure/msal-common/node';
|
|
2
2
|
import { BasePersistence } from './BasePersistence.js';
|
|
3
3
|
import type { IPersistence } from './IPersistence.js';
|
|
4
4
|
export declare class NapiRsKeyRingPersistence extends BasePersistence implements IPersistence {
|
package/lib/authentication/forks/msal-node-extensions/persistence/PersistenceCachePlugin.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/persistence/PersistenceCachePlugin.ts
|
|
5
|
-
*/
|
|
6
1
|
import type { IPersistence } from './IPersistence.js';
|
|
7
2
|
import type { CrossPlatformLockOptions } from '../lock/CrossPlatformLockOptions.js';
|
|
8
|
-
import type { TokenCacheContext, ICachePlugin } from '@azure/msal-common';
|
|
3
|
+
import type { TokenCacheContext, ICachePlugin } from '@azure/msal-common/node';
|
|
9
4
|
/**
|
|
10
5
|
* MSAL cache plugin which enables callers to write the MSAL cache to disk on Windows,
|
|
11
6
|
* macOs, and Linux.
|
|
7
|
+
*
|
|
8
|
+
* - Persistence can be one of:
|
|
9
|
+
* - FilePersistence: Writes and reads from an unencrypted file. Can be used on Windows,
|
|
10
|
+
* macOs, or Linux.
|
|
11
|
+
* - FilePersistenceWithDataProtection: Used on Windows, writes and reads from file encrypted
|
|
12
|
+
* with windows dpapi-addon.
|
|
13
|
+
* - NapiRsKeyRingPersistence: Used on Mac and Linux, writes and reads from the system's keyring.
|
|
12
14
|
*/
|
|
13
15
|
export declare class PersistenceCachePlugin implements ICachePlugin {
|
|
14
16
|
persistence: IPersistence;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/utils/Constants.ts
|
|
5
|
-
*/
|
|
6
1
|
export declare const Constants: {
|
|
7
2
|
/**
|
|
8
3
|
* An existing file was the target of an operation that required that the target not exist
|
|
@@ -19,22 +14,11 @@ export declare const Constants: {
|
|
|
19
14
|
* elevated privileges.
|
|
20
15
|
*/
|
|
21
16
|
EPERM_ERROR: string;
|
|
22
|
-
/**
|
|
23
|
-
* Default service name for using MSAL Keytar
|
|
24
|
-
*/
|
|
25
|
-
DEFAULT_SERVICE_NAME: string;
|
|
26
17
|
/**
|
|
27
18
|
* Test data used to verify underlying persistence mechanism
|
|
28
19
|
*/
|
|
29
20
|
PERSISTENCE_TEST_DATA: string;
|
|
30
|
-
DEFAULT_CACHE_FILE_NAME: string;
|
|
31
|
-
};
|
|
32
|
-
export declare const Platform: {
|
|
33
|
-
readonly WINDOWS: "win32";
|
|
34
|
-
readonly LINUX: "linux";
|
|
35
|
-
readonly MACOS: "darwin";
|
|
36
21
|
};
|
|
37
|
-
export type Platform = (typeof Platform)[keyof typeof Platform];
|
|
38
22
|
export declare const ErrorCodes: {
|
|
39
23
|
readonly INTERATION_REQUIRED_ERROR_CODE: "interaction_required";
|
|
40
24
|
readonly SERVER_UNAVAILABLE: "server_unavailable";
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/utils/TypeGuards.ts
|
|
5
|
-
*/
|
|
6
1
|
/**
|
|
7
2
|
* Returns whether or not the given object is a Node.js error
|
|
8
3
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/remote-cache",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Manages syncing the local Cloudpack cached assets to/from a remote storage service.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -23,28 +23,28 @@
|
|
|
23
23
|
"test": "cloudpack-scripts test"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ms-cloudpack/common-types": "^0.34.
|
|
27
|
-
"@ms-cloudpack/environment": "^0.1.
|
|
28
|
-
"@ms-cloudpack/retry": "^0.1.
|
|
29
|
-
"@ms-cloudpack/task-reporter": "^0.21.
|
|
30
|
-
"@ms-cloudpack/telemetry": "^0.12.
|
|
31
|
-
"@napi-rs/keyring": "1.
|
|
26
|
+
"@ms-cloudpack/common-types": "^0.34.5",
|
|
27
|
+
"@ms-cloudpack/environment": "^0.1.7",
|
|
28
|
+
"@ms-cloudpack/retry": "^0.1.8",
|
|
29
|
+
"@ms-cloudpack/task-reporter": "^0.21.5",
|
|
30
|
+
"@ms-cloudpack/telemetry": "^0.12.5",
|
|
31
|
+
"@napi-rs/keyring": "1.3.0",
|
|
32
32
|
"mime-types": "^3.0.0",
|
|
33
33
|
"node-dpapi-prebuilt": "^1.0.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@azure/core-paging": "
|
|
37
|
-
"@azure/data-tables": "
|
|
38
|
-
"@azure/identity": "patch:@azure/identity@npm%3A4.
|
|
39
|
-
"@azure/logger": "
|
|
40
|
-
"@azure/msal-common": "
|
|
41
|
-
"@azure/msal-node": "2.
|
|
42
|
-
"@azure/storage-blob": "
|
|
36
|
+
"@azure/core-paging": "1.6.2",
|
|
37
|
+
"@azure/data-tables": "13.3.2",
|
|
38
|
+
"@azure/identity": "patch:@azure/identity@npm%3A4.13.1#~/.yarn/patches/@azure-identity-npm-4.13.1-28285ed826.patch",
|
|
39
|
+
"@azure/logger": "1.3.0",
|
|
40
|
+
"@azure/msal-common": "16.6.2",
|
|
41
|
+
"@azure/msal-node": "5.2.2",
|
|
42
|
+
"@azure/storage-blob": "12.31.0",
|
|
43
43
|
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|
|
44
44
|
"@ms-cloudpack/scripts": "^0.0.1",
|
|
45
45
|
"@types/mime-types": "^3.0.0",
|
|
46
|
-
"backfill-cache": "
|
|
47
|
-
"backfill-logger": "
|
|
46
|
+
"backfill-cache": "5.12.5",
|
|
47
|
+
"backfill-logger": "5.4.2"
|
|
48
48
|
},
|
|
49
49
|
"files": [
|
|
50
50
|
"dist",
|