@lage-run/cache 1.3.0 → 1.3.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/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@lage-run/cache",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 18 Jun 2024 00:31:16 GMT",
5
+ "date": "Tue, 25 Jun 2024 18:25:07 GMT",
6
+ "version": "1.3.1",
7
+ "tag": "@lage-run/cache_v1.3.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "brunoru@microsoft.com_msteamsmdb",
12
+ "package": "@lage-run/cache",
13
+ "commit": "09e1689b8716b87202634a2866d712a1e0b9783f",
14
+ "comment": "Revert \"DefaultAzureCredential as fallback with optional in config set credential (#760)\""
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 18 Jun 2024 00:31:29 GMT",
6
21
  "version": "1.3.0",
7
22
  "tag": "@lage-run/cache_v1.3.0",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Change Log - @lage-run/cache
2
2
 
3
- This log was last generated on Tue, 18 Jun 2024 00:31:16 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 25 Jun 2024 18:25:07 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.3.1
8
+
9
+ Tue, 25 Jun 2024 18:25:07 GMT
10
+
11
+ ### Patches
12
+
13
+ - Revert "DefaultAzureCredential as fallback with optional in config set credential (#760)" (brunoru@microsoft.com_msteamsmdb)
14
+
7
15
  ## 1.3.0
8
16
 
9
- Tue, 18 Jun 2024 00:31:16 GMT
17
+ Tue, 18 Jun 2024 00:31:29 GMT
10
18
 
11
19
  ### Minor changes
12
20
 
@@ -80,31 +80,17 @@ function createBackfillLogger() {
80
80
  }
81
81
  function createBackfillCacheConfig(cwd, cacheOptions = {}, backfillLogger) {
82
82
  const envConfig = (0, _backfillconfig.getEnvConfig)(backfillLogger);
83
- // To avoid weakmap issues, we need to store the credential and restore post-merge
84
- const credentialStash = getCredentialStash(cacheOptions);
85
83
  const mergedConfig = {
86
84
  ...(0, _backfillconfig.createDefaultConfig)(cwd),
87
85
  ...cacheOptions,
88
86
  ...envConfig
89
87
  };
90
- applyCredentialStashToMergedConfig(mergedConfig, credentialStash);
91
- return mergedConfig;
92
- }
93
- function getCredentialStash(cacheOptions) {
94
- if (cacheOptions.cacheStorageConfig && cacheOptions.cacheStorageConfig.provider === "azure-blob" && cacheOptions.cacheStorageConfig.options.credential) {
95
- const stashedCredential = cacheOptions.cacheStorageConfig.options.credential;
96
- delete cacheOptions.cacheStorageConfig.options.credential;
97
- return stashedCredential;
98
- }
99
- return null;
100
- }
101
- function applyCredentialStashToMergedConfig(mergedConfig, credentialStash) {
102
88
  if (mergedConfig.cacheStorageConfig.provider === "azure-blob") {
103
- const connectionString = mergedConfig.cacheStorageConfig.options.connectionString;
104
- if (connectionString && !isTokenConnectionString(connectionString)) {
105
- mergedConfig.cacheStorageConfig.options.credential = credentialStash || _CredentialCache.CredentialCache.getInstance();
89
+ if (mergedConfig.cacheStorageConfig.options.connectionString && !isTokenConnectionString(mergedConfig.cacheStorageConfig.options.connectionString)) {
90
+ mergedConfig.cacheStorageConfig.options.credential = _CredentialCache.CredentialCache.getInstance();
106
91
  }
107
92
  }
93
+ return mergedConfig;
108
94
  }
109
95
  function isTokenConnectionString(connectionString) {
110
96
  return connectionString.includes("SharedAccessSignature");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lage-run/cache",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Cache for Lage",
5
5
  "repository": {
6
6
  "type": "git",