@ms-cloudpack/remote-cache 0.11.1 → 0.11.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.
Files changed (39) hide show
  1. package/dist/{AzureRemoteCacheClient-RQPQQPU4.js → AzureRemoteCacheClient-WA46BODG.js} +340 -319
  2. package/dist/{chunk-XND2VV4N.js → chunk-B4Q7L4W6.js} +567 -8100
  3. package/dist/chunk-LEHUXQFL.js +7606 -0
  4. package/dist/chunk-N4V3CONX.js +80 -0
  5. package/dist/getCredential-JMWHVVNM.js +20686 -0
  6. package/dist/index.js +45 -19
  7. package/lib/AzureAppRegistryClient.d.ts +1 -1
  8. package/lib/authentication/forks/identity-cache-persistence/cachePersistencePlugin.d.ts +34 -0
  9. package/lib/authentication/forks/identity-cache-persistence/platforms.d.ts +50 -0
  10. package/lib/authentication/forks/identity-cache-persistence/provider.d.ts +17 -0
  11. package/lib/authentication/forks/msal-node-extensions/error/PersistenceError.d.ts +37 -0
  12. package/lib/authentication/forks/msal-node-extensions/lock/CrossPlatformLock.d.ts +25 -0
  13. package/lib/authentication/forks/msal-node-extensions/lock/CrossPlatformLockOptions.d.ts +16 -0
  14. package/lib/authentication/forks/msal-node-extensions/persistence/BasePersistence.d.ts +6 -0
  15. package/lib/authentication/forks/msal-node-extensions/persistence/FilePersistence.d.ts +31 -0
  16. package/lib/authentication/forks/msal-node-extensions/persistence/FilePersistenceWithDataProtection.d.ts +30 -0
  17. package/lib/authentication/forks/msal-node-extensions/persistence/IPersistence.d.ts +17 -0
  18. package/lib/authentication/forks/msal-node-extensions/persistence/IPersistenceConfiguration.d.ts +16 -0
  19. package/lib/authentication/forks/msal-node-extensions/persistence/NapiRsKeyRingPersistence.d.ts +19 -0
  20. package/lib/authentication/forks/msal-node-extensions/persistence/PersistenceCachePlugin.d.ts +35 -0
  21. package/lib/authentication/forks/msal-node-extensions/utils/Constants.d.ts +44 -0
  22. package/lib/authentication/forks/msal-node-extensions/utils/TypeGuards.d.ts +10 -0
  23. package/lib/authentication/getAuthenticationRecord.d.ts +8 -0
  24. package/lib/authentication/getAuthenticationRecordPath.d.ts +7 -0
  25. package/lib/authentication/getCredential.d.ts +21 -0
  26. package/lib/authentication/lock-file/deleteAuthenticationLockFile.d.ts +7 -0
  27. package/lib/authentication/lock-file/doesLockFileExist.d.ts +6 -0
  28. package/lib/authentication/lock-file/getAuthenticationLockFilePath.d.ts +19 -0
  29. package/lib/authentication/lock-file/readAuthenticationLockFile.d.ts +6 -0
  30. package/lib/authentication/lock-file/tryCleaningLockFile.d.ts +6 -0
  31. package/lib/authentication/saveAuthenticationRecord.d.ts +9 -0
  32. package/lib/authentication/tokenCachePersistenceOptions.d.ts +9 -0
  33. package/lib/createAppRegistryClient.d.ts +1 -1
  34. package/lib/createRemoteCacheClient.d.ts +1 -1
  35. package/lib/index.d.ts +1 -0
  36. package/lib/registerAzureLogger.d.ts +6 -0
  37. package/lib/types/LoginMethod.d.ts +2 -0
  38. package/lib/utils/isProcessRunning.d.ts +7 -0
  39. package/package.json +10 -4
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Tries to clean the authentication lock file by deleting it if the other process is not running.
3
+ * @returns - true if the lock file is deleted successfully, false otherwise.
4
+ */
5
+ export declare function tryCleaningLockFile(): boolean;
6
+ //# sourceMappingURL=tryCleaningLockFile.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { type AuthenticationRecord } from '@azure/identity';
2
+ /**
3
+ * Saves the provided authentication record to Cloudpack's global cache folder.
4
+ * Creates the cache folder if it doesn't exist.
5
+ * @param cachePath - The path to Cloudpack's cache folder.
6
+ * @param authRecord - The authentication record to save.
7
+ */
8
+ export declare function saveAuthenticationRecord(cachePath: string, authRecord: AuthenticationRecord): void;
9
+ //# sourceMappingURL=saveAuthenticationRecord.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { type TokenCachePersistenceOptions } from '@azure/identity';
2
+ /**
3
+ * The options for token cache persistence.
4
+ * This will be used by the token cache plugin.
5
+ */
6
+ export declare const tokenCachePersistenceOptions: TokenCachePersistenceOptions & {
7
+ name: string;
8
+ };
9
+ //# sourceMappingURL=tokenCachePersistenceOptions.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { TaskReporter } from '@ms-cloudpack/task-reporter';
2
2
  import type { TelemetryClient } from '@ms-cloudpack/telemetry';
3
- import type { LoginMethod } from '@ms-cloudpack/auth';
3
+ import type { LoginMethod } from './types/LoginMethod.js';
4
4
  import type { RemoteCacheConfig } from '@ms-cloudpack/common-types';
5
5
  import type { AppRegistryClient } from './index.js';
6
6
  /**
@@ -2,7 +2,7 @@ import type { RemoteCacheConfig } from '@ms-cloudpack/common-types';
2
2
  import type { TaskReporter } from '@ms-cloudpack/task-reporter';
3
3
  import type { RemoteCacheClient } from './types/RemoteCacheClient.js';
4
4
  import type { TelemetryClient } from '@ms-cloudpack/telemetry';
5
- import type { LoginMethod } from '@ms-cloudpack/auth';
5
+ import type { LoginMethod } from './types/LoginMethod.js';
6
6
  export interface CreateRemoteCacheClientParams {
7
7
  options: RemoteCacheConfig & {
8
8
  loginMethod: LoginMethod;
package/lib/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { createRemoteCacheClient, type CreateRemoteCacheClientParams } from './createRemoteCacheClient.js';
2
2
  export { createAppRegistryClient, type CreateAppRegistryClientParams } from './createAppRegistryClient.js';
3
3
  export type { RemoteCacheClient, RemoteCacheClientUploadOperationOptions, RemoteCacheClientOperationOptions, RemoteCacheClientOperationResult, } from './types/RemoteCacheClient.js';
4
+ export type { LoginMethod } from './types/LoginMethod.js';
4
5
  export type { AppRegistration, AppRegistrationVersion } from './types/AppRegistration.js';
5
6
  export type { AppRegistryClient } from './types/AppRegistryClient.js';
6
7
  export type { PagedResult } from './types/PagedResult.js';
@@ -0,0 +1,6 @@
1
+ import EventEmitter from 'events';
2
+ /**
3
+ * Registers a custom logger for the Azure SDK that emits events for some specific log messages.
4
+ */
5
+ export declare function registerAzureLogger(): EventEmitter;
6
+ //# sourceMappingURL=registerAzureLogger.d.ts.map
@@ -0,0 +1,2 @@
1
+ export type LoginMethod = 'interactive' | 'azure-cli' | 'device-code';
2
+ //# sourceMappingURL=LoginMethod.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Check if a process with the given PID is running.
3
+ * @param pid - The process ID to check.
4
+ * @returns - true if the process is running, false otherwise.
5
+ */
6
+ export declare function isProcessRunning(pid: number): boolean;
7
+ //# sourceMappingURL=isProcessRunning.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/remote-cache",
3
- "version": "0.11.1",
3
+ "version": "0.11.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,16 +27,22 @@
27
27
  "lib/**/*.d.ts"
28
28
  ],
29
29
  "dependencies": {
30
- "@ms-cloudpack/auth": "^0.1.2",
31
30
  "@ms-cloudpack/common-types": "^0.24.13",
31
+ "@ms-cloudpack/environment": "^0.1.1",
32
32
  "@ms-cloudpack/retry": "^0.1.3",
33
33
  "@ms-cloudpack/task-reporter": "^0.16.0",
34
- "@ms-cloudpack/telemetry": "^0.11.6",
35
- "mime-types": "^2.0.0"
34
+ "@ms-cloudpack/telemetry": "^0.11.7",
35
+ "@napi-rs/keyring": "^1.0.0",
36
+ "mime-types": "^2.0.0",
37
+ "node-dpapi-prebuilt": "^1.0.3"
36
38
  },
37
39
  "devDependencies": {
38
40
  "@azure/core-paging": "^1.0.0",
39
41
  "@azure/data-tables": "^13.0.0",
42
+ "@azure/identity": "patch:@azure/identity@npm%3A4.3.0#~/.yarn/patches/@azure-identity-npm-4.3.0-e85334d38f.patch",
43
+ "@azure/logger": "^1.0.0",
44
+ "@azure/msal-common": "14.13.0",
45
+ "@azure/msal-node": "2.11.0",
40
46
  "@azure/storage-blob": "^12.17.0",
41
47
  "@ms-cloudpack/eslint-plugin-internal": "*",
42
48
  "@ms-cloudpack/scripts": "*",