@adobe/helix-config-storage 1.5.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 +14 -0
- package/package.json +1 -1
- package/src/config-store.js +14 -1
- package/src/transient-token-store.js +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
8
|
+
# [1.6.0](https://github.com/adobe/helix-config-storage/compare/v1.5.0...v1.6.0) (2024-09-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* allow modify access.admin.roles ([#17](https://github.com/adobe/helix-config-storage/issues/17)) ([20de603](https://github.com/adobe/helix-config-storage/commit/20de603828b9fdb582ae813e978abbe9bb407fad))
|
|
14
|
+
|
|
1
15
|
# [1.5.0](https://github.com/adobe/helix-config-storage/compare/v1.4.0...v1.5.0) (2024-09-02)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/config-store.js
CHANGED
|
@@ -39,7 +39,20 @@ const FRAGMENTS_COMMON = {
|
|
|
39
39
|
access: {
|
|
40
40
|
'.': 'object',
|
|
41
41
|
site: 'object',
|
|
42
|
-
admin:
|
|
42
|
+
admin: {
|
|
43
|
+
'.': 'object',
|
|
44
|
+
role: {
|
|
45
|
+
'.': 'object',
|
|
46
|
+
admin: 'object',
|
|
47
|
+
author: 'object',
|
|
48
|
+
publish: 'object',
|
|
49
|
+
develop: 'object',
|
|
50
|
+
basic_author: 'object',
|
|
51
|
+
basic_publish: 'object',
|
|
52
|
+
config: 'object',
|
|
53
|
+
config_admin: 'object',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
43
56
|
preview: 'object',
|
|
44
57
|
live: 'object',
|
|
45
58
|
},
|
|
@@ -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(
|
|
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
|
|