@adobe/helix-config-storage 1.6.0 → 1.6.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.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.6.1](https://github.com/adobe/helix-config-storage/compare/v1.6.0...v1.6.1) (2024-09-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * properly store tokens ([#18](https://github.com/adobe/helix-config-storage/issues/18)) ([d919bf8](https://github.com/adobe/helix-config-storage/commit/d919bf86f248e0badc771305fa4f995b2bae74df))
7
+
1
8
  # [1.6.0](https://github.com/adobe/helix-config-storage/compare/v1.5.0...v1.6.0) (2024-09-02)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config-storage",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Helix Config Storage",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -57,6 +57,11 @@ export class TransientTokenStore {
57
57
  */
58
58
  #modified;
59
59
 
60
+ /**
61
+ * flag indicating that the store was modified
62
+ */
63
+ wasModified = false;
64
+
60
65
  /**
61
66
  * consistent "now"
62
67
  */
@@ -108,8 +113,11 @@ export class TransientTokenStore {
108
113
  async #save(ctx) {
109
114
  if (this.#modified) {
110
115
  const storage = HelixStorage.fromContext(ctx).configBus();
111
- await storage.put(this.#key, JSON.stringify(this.#tokens));
116
+ await storage.put(this.#key, JSON.stringify({
117
+ tokens: this.#tokens,
118
+ }));
112
119
  this.#modified = false;
120
+ this.wasModified = true;
113
121
  }
114
122
  }
115
123