@ms-cloudpack/remote-cache 0.7.2 → 0.7.4
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-NEV2XCF7.js → AzureRemoteCacheClient-ZZ27K4AF.js} +2477 -2900
- package/dist/{ReporterDecorator-SNBYNGOT.js → ReporterDecorator-I4CR7TWD.js} +10 -6
- package/dist/chunk-26KCJU2L.js +914 -0
- package/dist/chunk-B4GP6UPK.js +867 -0
- package/dist/chunk-FUGMINXQ.js +80 -0
- package/dist/chunk-IVPGYNQL.js +19 -0
- package/dist/{chunk-KFSFZYG6.js → chunk-OXARBRZV.js} +404 -260
- package/dist/{getCredential-2R4O36RK.js → getCredential-ONYVRAN5.js} +22396 -20404
- package/dist/{getListOfBlobs-E5OFG2MF.js → getListOfBlobs-YTVBR3IU.js} +11 -7
- package/dist/index.js +26 -14
- package/lib/registerAzureLogger.d.ts +5 -0
- package/package.json +3 -2
- package/dist/chunk-4P62L7ZZ.js +0 -1530
- package/dist/chunk-R2VDVRDZ.js +0 -15
- package/dist/chunk-TQLTL4XO.js +0 -65
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
import { createRequire as topLevelCreateRequire } from 'node:module';
|
|
2
|
+
import topLevelPath from 'node:path';
|
|
3
|
+
import topLevelUrl from 'node:url';
|
|
4
|
+
const require = topLevelCreateRequire(import.meta.url);
|
|
5
|
+
const __filename = topLevelUrl.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = topLevelPath.dirname(__filename);
|
|
1
7
|
import {
|
|
2
8
|
createBlobStorageUrl
|
|
3
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IVPGYNQL.js";
|
|
4
10
|
import {
|
|
5
11
|
require_dist
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-OXARBRZV.js";
|
|
13
|
+
import "./chunk-26KCJU2L.js";
|
|
8
14
|
import {
|
|
9
15
|
__name,
|
|
10
|
-
__toESM
|
|
11
|
-
|
|
12
|
-
} from "./chunk-TQLTL4XO.js";
|
|
16
|
+
__toESM
|
|
17
|
+
} from "./chunk-B4GP6UPK.js";
|
|
13
18
|
|
|
14
19
|
// src/getListOfBlobs.ts
|
|
15
|
-
init_esbuildCjsShims();
|
|
16
20
|
var import_storage_blob = __toESM(require_dist(), 1);
|
|
17
21
|
async function getListOfBlobs({ container, storageAccount, credential }) {
|
|
18
22
|
const blobStorageClient = new import_storage_blob.BlobServiceClient(createBlobStorageUrl(storageAccount), credential);
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
|
+
import { createRequire as topLevelCreateRequire } from 'node:module';
|
|
2
|
+
import topLevelPath from 'node:path';
|
|
3
|
+
import topLevelUrl from 'node:url';
|
|
4
|
+
const require = topLevelCreateRequire(import.meta.url);
|
|
5
|
+
const __filename = topLevelUrl.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = topLevelPath.dirname(__filename);
|
|
1
7
|
import {
|
|
2
8
|
__name,
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
9
|
+
require_commonjs
|
|
10
|
+
} from "./chunk-B4GP6UPK.js";
|
|
5
11
|
|
|
6
|
-
// src/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
// src/registerAzureLogger.ts
|
|
13
|
+
var logger = require_commonjs();
|
|
14
|
+
function registerAzureLogger() {
|
|
15
|
+
logger.setLogLevel("verbose");
|
|
16
|
+
logger.AzureLogger.log = (...msgs) => {
|
|
17
|
+
if (msgs[0] === "azure:identity:info Node.js MSAL Open Browser =>" && msgs[1].includes("falling back to interactive method")) {
|
|
18
|
+
console.warn(
|
|
19
|
+
"Prepare to sign in \u2013 we are launching a browser page for you. Simply follow the instructions on the login page to seamlessly complete the authentication process. You can manually access the login page by navigating to http://localhost:1337 if you inadvertently close the authentication page or prefer to use a different web browser or a profile."
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
__name(registerAzureLogger, "registerAzureLogger");
|
|
11
25
|
|
|
12
26
|
// src/decorators/InMemoryDecorator.ts
|
|
13
|
-
init_esbuildCjsShims();
|
|
14
27
|
var _InMemoryDecorator = class _InMemoryDecorator {
|
|
15
28
|
constructor(options) {
|
|
16
29
|
this.cacheClient = options.cacheClient;
|
|
@@ -37,7 +50,6 @@ __name(_InMemoryDecorator, "InMemoryDecorator");
|
|
|
37
50
|
var InMemoryDecorator = _InMemoryDecorator;
|
|
38
51
|
|
|
39
52
|
// src/decorators/RetryDecorator.ts
|
|
40
|
-
init_esbuildCjsShims();
|
|
41
53
|
var _RetryDecorator = class _RetryDecorator {
|
|
42
54
|
constructor(options) {
|
|
43
55
|
this.cacheClient = options.cacheClient;
|
|
@@ -67,7 +79,6 @@ __name(_RetryDecorator, "RetryDecorator");
|
|
|
67
79
|
var RetryDecorator = _RetryDecorator;
|
|
68
80
|
|
|
69
81
|
// src/retry/blockListIsInvalidRetryPolicy.ts
|
|
70
|
-
init_esbuildCjsShims();
|
|
71
82
|
var blockListIsInvalidRetryPolicy = {
|
|
72
83
|
maxRetries: 1,
|
|
73
84
|
handle: (error) => {
|
|
@@ -79,12 +90,13 @@ var blockListIsInvalidRetryPolicy = {
|
|
|
79
90
|
// src/createRemoteCacheClient.ts
|
|
80
91
|
import { RetryManager } from "@ms-cloudpack/retry";
|
|
81
92
|
async function createRemoteCacheClient(params) {
|
|
93
|
+
registerAzureLogger();
|
|
82
94
|
const { context, options } = params;
|
|
83
95
|
const { container, loginMethod, storageAccount, cachePath, tenantId } = options;
|
|
84
|
-
const { getCredential } = await import("./getCredential-
|
|
85
|
-
const { AzureRemoteCacheClient } = await import("./AzureRemoteCacheClient-
|
|
86
|
-
const { ReporterDecorator } = await import("./ReporterDecorator-
|
|
87
|
-
const { getListOfBlobs } = await import("./getListOfBlobs-
|
|
96
|
+
const { getCredential } = await import("./getCredential-ONYVRAN5.js");
|
|
97
|
+
const { AzureRemoteCacheClient } = await import("./AzureRemoteCacheClient-ZZ27K4AF.js");
|
|
98
|
+
const { ReporterDecorator } = await import("./ReporterDecorator-I4CR7TWD.js");
|
|
99
|
+
const { getListOfBlobs } = await import("./getListOfBlobs-YTVBR3IU.js");
|
|
88
100
|
const credential = await getCredential(loginMethod, cachePath, tenantId);
|
|
89
101
|
const remoteCacheClientOptions = {
|
|
90
102
|
storageAccount,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/remote-cache",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Manages syncing the local Cloudpack cached assets to/from a remote storage service.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
"@azure/msal-node-extensions": "^1.0.10",
|
|
31
31
|
"@ms-cloudpack/retry": "^0.1.1",
|
|
32
32
|
"@ms-cloudpack/task-reporter": "^0.14.0",
|
|
33
|
-
"@ms-cloudpack/telemetry": "^0.5.
|
|
33
|
+
"@ms-cloudpack/telemetry": "^0.5.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@azure/identity": "^4.0.0",
|
|
37
37
|
"@azure/identity-cache-persistence": "^1.1.0",
|
|
38
|
+
"@azure/logger": "^1.0.0",
|
|
38
39
|
"@azure/storage-blob": "^12.17.0",
|
|
39
40
|
"@ms-cloudpack/eslint-plugin-internal": "*",
|
|
40
41
|
"@ms-cloudpack/scripts": "*",
|