decap-cms-lib-util 3.2.0 → 3.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.
Files changed (45) hide show
  1. package/README.md +1 -1
  2. package/dist/decap-cms-lib-util.js +1 -1
  3. package/dist/decap-cms-lib-util.js.LICENSE.txt +9 -0
  4. package/dist/decap-cms-lib-util.js.map +1 -1
  5. package/dist/esm/API.js +17 -25
  6. package/dist/esm/APIError.js +0 -7
  7. package/dist/esm/AccessTokenError.js +0 -4
  8. package/dist/esm/Cursor.js +4 -9
  9. package/dist/esm/EditorialWorkflowError.js +0 -5
  10. package/dist/esm/backendUtil.js +6 -7
  11. package/dist/esm/getBlobSHA.js +3 -3
  12. package/dist/esm/git-lfs.js +21 -29
  13. package/dist/esm/implementation.js +14 -17
  14. package/dist/esm/unsentRequest.js +9 -12
  15. package/package.json +5 -2
  16. package/CHANGELOG.md +0 -382
  17. package/dist/esm/stega.js +0 -129
  18. package/src/API.ts +0 -376
  19. package/src/APIError.ts +0 -17
  20. package/src/APIUtils.ts +0 -38
  21. package/src/AccessTokenError.ts +0 -11
  22. package/src/Cursor.ts +0 -178
  23. package/src/EditorialWorkflowError.ts +0 -12
  24. package/src/__tests__/api.spec.js +0 -13
  25. package/src/__tests__/apiUtils.spec.js +0 -74
  26. package/src/__tests__/asyncLock.spec.js +0 -85
  27. package/src/__tests__/backendUtil.spec.js +0 -97
  28. package/src/__tests__/implementation.spec.js +0 -58
  29. package/src/__tests__/path.spec.js +0 -53
  30. package/src/__tests__/unsentRequest.spec.js +0 -19
  31. package/src/asyncLock.ts +0 -43
  32. package/src/backendUtil.ts +0 -120
  33. package/src/getBlobSHA.ts +0 -12
  34. package/src/git-lfs.ts +0 -133
  35. package/src/implementation.ts +0 -575
  36. package/src/index.ts +0 -213
  37. package/src/loadScript.js +0 -24
  38. package/src/localForage.ts +0 -21
  39. package/src/path.ts +0 -86
  40. package/src/promise.ts +0 -21
  41. package/src/stega.ts +0 -134
  42. package/src/types/semaphore.d.ts +0 -5
  43. package/src/types.ts +0 -9
  44. package/src/unsentRequest.js +0 -133
  45. package/webpack.config.js +0 -3
package/CHANGELOG.md DELETED
@@ -1,382 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [3.2.0](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@3.1.0...decap-cms-lib-util@3.2.0) (2025-01-29)
7
-
8
- ### Features
9
-
10
- - visual editing (click-to-edit) ([#7374](https://github.com/decaporg/decap-cms/issues/7374)) ([989c2dd](https://github.com/decaporg/decap-cms/commit/989c2dd6ed80f69b572b8b73c4e37b5106ae04fb))
11
-
12
- # [3.1.0](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@3.0.4...decap-cms-lib-util@3.1.0) (2024-08-07)
13
-
14
- ### Bug Fixes
15
-
16
- - **backend:** allow a custom API root for backend ([#7214](https://github.com/decaporg/decap-cms/issues/7214)) ([fae3e05](https://github.com/decaporg/decap-cms/commit/fae3e057f898f60fdbe80091acc833d6ac92696e)), closes [#7168](https://github.com/decaporg/decap-cms/issues/7168)
17
-
18
- ## [3.0.4](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@3.0.3...decap-cms-lib-util@3.0.4) (2024-04-03)
19
-
20
- **Note:** Version bump only for package decap-cms-lib-util
21
-
22
- ## [3.0.3](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@3.0.2...decap-cms-lib-util@3.0.3) (2024-03-21)
23
-
24
- **Note:** Version bump only for package decap-cms-lib-util
25
-
26
- ## [3.0.2](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@3.0.2-beta.0...decap-cms-lib-util@3.0.2) (2024-02-01)
27
-
28
- **Note:** Version bump only for package decap-cms-lib-util
29
-
30
- ## [3.0.2-beta.0](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@3.0.1...decap-cms-lib-util@3.0.2-beta.0) (2024-01-31)
31
-
32
- **Note:** Version bump only for package decap-cms-lib-util
33
-
34
- ## [3.0.1](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@3.0.0...decap-cms-lib-util@3.0.1) (2023-09-06)
35
-
36
- ### Performance Improvements
37
-
38
- - filter by path when loading collection from github backend ([#6898](https://github.com/decaporg/decap-cms/issues/6898)) ([18ef773](https://github.com/decaporg/decap-cms/commit/18ef773f35db1b7ef3ab5a0f25527d87745b9c73))
39
-
40
- # [3.0.0](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@2.16.0...decap-cms-lib-util@3.0.0) (2023-08-18)
41
-
42
- **Note:** Version bump only for package decap-cms-lib-util
43
-
44
- # [2.16.0](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@2.16.0-beta.0...decap-cms-lib-util@2.16.0) (2023-08-18)
45
-
46
- **Note:** Version bump only for package decap-cms-lib-util
47
-
48
- # 2.16.0-beta.0 (2023-08-18)
49
-
50
- ### Features
51
-
52
- - rename packages ([#6863](https://github.com/decaporg/decap-cms/issues/6863)) ([d515e7b](https://github.com/decaporg/decap-cms/commit/d515e7bd33216a775d96887b08c4f7b1962941bb))
53
-
54
- ## [2.15.2-beta.0](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@2.15.1...decap-cms-lib-util@2.15.2-beta.0) (2023-07-27)
55
-
56
- **Note:** Version bump only for package decap-cms-lib-util
57
-
58
- ## [2.15.1](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@2.15.0...decap-cms-lib-util@2.15.1) (2022-04-13)
59
-
60
- **Note:** Version bump only for package decap-cms-lib-util
61
-
62
- # [2.15.0](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@2.14.0...decap-cms-lib-util@2.15.0) (2021-12-28)
63
-
64
- ### Features
65
-
66
- - **backend-gitlab:** initial GraphQL support ([#6059](https://github.com/decaporg/decap-cms/issues/6059)) ([1523a41](https://github.com/decaporg/decap-cms/commit/1523a4140a3d2f4cc01a1548514ae17bc1ad504e))
67
-
68
- # [2.14.0](https://github.com/decaporg/decap-cms/compare/decap-cms-lib-util@2.13.3...decap-cms-lib-util@2.14.0) (2021-10-18)
69
-
70
- ### Features
71
-
72
- - display author of changes in workflow tab ([#5780](https://github.com/decaporg/decap-cms/issues/5780)) ([3f607e4](https://github.com/decaporg/decap-cms/commit/3f607e41d9c4d8fe5329a9ab6841cada7742825e))
73
-
74
- ## [2.13.3](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.13.2...decap-cms-lib-util@2.13.3) (2021-06-01)
75
-
76
- **Note:** Version bump only for package decap-cms-lib-util
77
-
78
- ## [2.13.2](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.13.1...decap-cms-lib-util@2.13.2) (2021-05-31)
79
-
80
- **Note:** Version bump only for package decap-cms-lib-util
81
-
82
- ## [2.13.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.13.0...decap-cms-lib-util@2.13.1) (2021-05-19)
83
-
84
- **Note:** Version bump only for package decap-cms-lib-util
85
-
86
- # [2.13.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.12.3...decap-cms-lib-util@2.13.0) (2021-04-04)
87
-
88
- ### Features
89
-
90
- - **open-authoring:** add alwaysFork option ([#5204](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/5204)) ([7b19e30](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/7b19e30dd2a310dbc20ccb6fcca45d5cbde1014b))
91
-
92
- ## [2.12.3](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.12.2...decap-cms-lib-util@2.12.3) (2021-02-10)
93
-
94
- **Note:** Version bump only for package decap-cms-lib-util
95
-
96
- ## [2.12.2](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.12.1...decap-cms-lib-util@2.12.2) (2021-02-01)
97
-
98
- ### Bug Fixes
99
-
100
- - **backend:** allow calling 'json' again on 403 failure ([#4880](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/4880)) ([1034086](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/1034086ff603e28e3a37c8157a74cbc625f658f9))
101
-
102
- ## [2.12.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.12.0...decap-cms-lib-util@2.12.1) (2020-12-13)
103
-
104
- ### Bug Fixes
105
-
106
- - **lib-util:** update js-sha256 import ([#4699](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/4699)) ([60f7e0b](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/60f7e0bba67c6555acba3e04039c49f10cf51f6b))
107
-
108
- # [2.12.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.11.5...decap-cms-lib-util@2.12.0) (2020-11-26)
109
-
110
- ### Features
111
-
112
- - add azure devops backend ([#4427](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/4427)) ([4e6dc88](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/4e6dc88efb1dae4cf6137730c3b4fb6d0f75a8cc))
113
-
114
- ## [2.11.5](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.11.4...decap-cms-lib-util@2.11.5) (2020-09-20)
115
-
116
- **Note:** Version bump only for package decap-cms-lib-util
117
-
118
- ## [2.11.4](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.11.3...decap-cms-lib-util@2.11.4) (2020-09-15)
119
-
120
- **Note:** Version bump only for package decap-cms-lib-util
121
-
122
- ## 2.11.3 (2020-09-08)
123
-
124
- ### Reverts
125
-
126
- - Revert "chore(release): publish" ([828bb16](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/828bb16415b8c22a34caa19c50c38b24ffe9ceae))
127
-
128
- ## 2.11.2 (2020-08-20)
129
-
130
- ### Reverts
131
-
132
- - Revert "chore(release): publish" ([8262487](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/82624879ccbcb16610090041db28f00714d924c8))
133
-
134
- ## 2.11.1 (2020-07-27)
135
-
136
- ### Reverts
137
-
138
- - Revert "chore(release): publish" ([118d50a](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/118d50a7a70295f25073e564b5161aa2b9883056))
139
-
140
- # [2.11.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.10.0...decap-cms-lib-util@2.11.0) (2020-06-18)
141
-
142
- ### Bug Fixes
143
-
144
- - handle token expiry ([#3847](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3847)) ([285c940](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/285c940562548d7bc88de244123ba87ff66fba65))
145
-
146
- ### Features
147
-
148
- - add backend status down indicator ([#3889](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3889)) ([a50edc7](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/a50edc70553ad6afa1acee6a51996ad226443f8c))
149
-
150
- # [2.10.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.9.4...decap-cms-lib-util@2.10.0) (2020-06-01)
151
-
152
- ### Features
153
-
154
- - add pre save/ post save hooks ([#3812](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3812)) ([812716e](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/812716e18b09a716547f128b783c8e6f3d54cc5b))
155
-
156
- ## [2.9.4](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.9.3...decap-cms-lib-util@2.9.4) (2020-05-19)
157
-
158
- ### Bug Fixes
159
-
160
- - clear fetch timeout on successful response ([#3768](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3768)) ([088b1a8](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/088b1a8ab626498382d6305fa46d174d4f5ba755))
161
-
162
- ## [2.9.3](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.9.2...decap-cms-lib-util@2.9.3) (2020-04-21)
163
-
164
- **Note:** Version bump only for package decap-cms-lib-util
165
-
166
- ## [2.9.2](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.9.1...decap-cms-lib-util@2.9.2) (2020-04-01)
167
-
168
- ### Bug Fixes
169
-
170
- - move common api functions to a separate file ([#3511](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3511)) ([49098de](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/49098de27f053e51aa3d936d09adae3a7186c6ae))
171
-
172
- ## [2.9.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.9.0...decap-cms-lib-util@2.9.1) (2020-04-01)
173
-
174
- **Note:** Version bump only for package decap-cms-lib-util
175
-
176
- # [2.9.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.8.0...decap-cms-lib-util@2.9.0) (2020-03-12)
177
-
178
- ### Features
179
-
180
- - add media lib virtualization ([#3381](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3381)) ([92e7601](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/92e76011e7a9e8b5370088b0a2c065df66b5f7fb))
181
- - **backend-github:** add pagination ([#3379](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3379)) ([39f1307](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/39f1307e3a36447da8c9b3ca79b1d7db52ea1a19))
182
-
183
- # [2.8.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.7.1...decap-cms-lib-util@2.8.0) (2020-02-25)
184
-
185
- ### Features
186
-
187
- - **core:** align GitHub metadata handling with other backends ([#3316](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3316)) ([7e0a8ad](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/7e0a8ad532012576dc5e40bd4e9d54522e307123)), closes [#3292](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3292)
188
-
189
- ## [2.7.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.7.0...decap-cms-lib-util@2.7.1) (2020-02-14)
190
-
191
- **Note:** Version bump only for package decap-cms-lib-util
192
-
193
- # [2.7.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.6.2...decap-cms-lib-util@2.7.0) (2020-02-10)
194
-
195
- ### Bug Fixes
196
-
197
- - filter paginated results ([#3216](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3216)) ([0a482b1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/0a482b10049bcfa022b81165cabf4512d77e0b88))
198
-
199
- ### Features
200
-
201
- - field based media/public folders ([#3208](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3208)) ([97bc0c8](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/97bc0c8dc489e736f89d748ba832d78400fe4332))
202
-
203
- ### Reverts
204
-
205
- - Revert "chore(release): publish" ([a015d1d](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/a015d1d92a4b1c0130c44fcef1c9ecdb157a0f07))
206
-
207
- ## [2.6.2](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.6.1...decap-cms-lib-util@2.6.2) (2020-01-24)
208
-
209
- ### Bug Fixes
210
-
211
- - **backend-git-gateway:** re-write GitHub pagination links ([#3135](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3135)) ([834f6b9](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/834f6b9e457f3738ce0f240ddd4cc160aff9e2f5))
212
-
213
- ## [2.6.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.6.0...decap-cms-lib-util@2.6.1) (2020-01-22)
214
-
215
- **Note:** Version bump only for package decap-cms-lib-util
216
-
217
- # [2.6.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.5.2...decap-cms-lib-util@2.6.0) (2020-01-21)
218
-
219
- ### Features
220
-
221
- - **backend-bitbucket:** Add Git-LFS support ([#3118](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3118)) ([a48c02d](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/a48c02d852ca5e11055da3a14cefae8d17a68498))
222
-
223
- ## [2.5.2](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.5.1...decap-cms-lib-util@2.5.2) (2020-01-16)
224
-
225
- ### Bug Fixes
226
-
227
- - use string endsWith to filter by extension ([#3097](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/3097)) ([6a13a85](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/6a13a85e269c8f299f71b3f5ee45fc5d34f75822))
228
-
229
- ## [2.5.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.5.0...decap-cms-lib-util@2.5.1) (2020-01-14)
230
-
231
- **Note:** Version bump only for package decap-cms-lib-util
232
-
233
- # [2.5.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.5.0-beta.0...decap-cms-lib-util@2.5.0) (2020-01-07)
234
-
235
- **Note:** Version bump only for package decap-cms-lib-util
236
-
237
- # [2.5.0-beta.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.4.0...decap-cms-lib-util@2.5.0-beta.0) (2019-12-18)
238
-
239
- ### Features
240
-
241
- - bundle assets with content ([#2958](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2958)) ([2b41d8a](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/2b41d8a838a9c8a6b21cde2ddd16b9288334e298))
242
-
243
- # [2.4.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.4.0-beta.5...decap-cms-lib-util@2.4.0) (2019-12-18)
244
-
245
- **Note:** Version bump only for package decap-cms-lib-util
246
-
247
- # [2.4.0-beta.5](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.4.0-beta.4...decap-cms-lib-util@2.4.0-beta.5) (2019-11-26)
248
-
249
- ### Bug Fixes
250
-
251
- - **backend-github:** editorial workflow commits ([#2867](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2867)) ([86adca3](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/86adca3a18f25ab74d1c6702bafab250f005ceec))
252
- - **backend-github:** prepend collection name ([#2878](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2878)) ([465f463](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/465f4639597f258d5aa2c1b65e9d2c16023ee7ae))
253
-
254
- # [2.4.0-beta.4](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.4.0-beta.3...decap-cms-lib-util@2.4.0-beta.4) (2019-09-26)
255
-
256
- ### Bug Fixes
257
-
258
- - **github-backend:** handle race condition in editorial workflow ([#2658](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2658)) ([97f1f84](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/97f1f84))
259
-
260
- # [2.4.0-beta.3](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.4.0-beta.2...decap-cms-lib-util@2.4.0-beta.3) (2019-09-04)
261
-
262
- ### Features
263
-
264
- - **backend-github:** GitHub GraphQL API support ([#2456](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2456)) ([ece136c](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/ece136c))
265
-
266
- # [2.4.0-beta.2](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.4.0-beta.1...decap-cms-lib-util@2.4.0-beta.2) (2019-08-24)
267
-
268
- **Note:** Version bump only for package decap-cms-lib-util
269
-
270
- # [2.4.0-beta.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.4.0-beta.0...decap-cms-lib-util@2.4.0-beta.1) (2019-08-24)
271
-
272
- **Note:** Version bump only for package decap-cms-lib-util
273
-
274
- # [2.4.0-beta.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.3.3...decap-cms-lib-util@2.4.0-beta.0) (2019-07-24)
275
-
276
- ### Features
277
-
278
- - **backend-github:** Open Authoring ([#2430](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2430)) ([edf0a3a](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/edf0a3a))
279
-
280
- ## [2.3.3](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.3.2...decap-cms-lib-util@2.3.3) (2019-07-24)
281
-
282
- **Note:** Version bump only for package decap-cms-lib-util
283
-
284
- ## [2.3.2](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.3.2-beta.0...decap-cms-lib-util@2.3.2) (2019-04-10)
285
-
286
- **Note:** Version bump only for package decap-cms-lib-util
287
-
288
- ## [2.3.2-beta.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.3.1...decap-cms-lib-util@2.3.2-beta.0) (2019-04-05)
289
-
290
- **Note:** Version bump only for package decap-cms-lib-util
291
-
292
- ## [2.3.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.3.1-beta.1...decap-cms-lib-util@2.3.1) (2019-03-29)
293
-
294
- **Note:** Version bump only for package decap-cms-lib-util
295
-
296
- ## [2.3.1-beta.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.3.1-beta.0...decap-cms-lib-util@2.3.1-beta.1) (2019-03-26)
297
-
298
- ### Bug Fixes
299
-
300
- - export on decap-cms and maps on esm ([#2244](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2244)) ([6ffd13b](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/6ffd13b))
301
-
302
- ## [2.3.1-beta.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.3.0...decap-cms-lib-util@2.3.1-beta.0) (2019-03-25)
303
-
304
- **Note:** Version bump only for package decap-cms-lib-util
305
-
306
- # [2.3.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.2.0...decap-cms-lib-util@2.3.0) (2019-03-22)
307
-
308
- ### Features
309
-
310
- - add ES module builds ([#2215](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2215)) ([d142b32](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/d142b32))
311
-
312
- # [2.2.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.2.0-beta.0...decap-cms-lib-util@2.2.0) (2019-03-22)
313
-
314
- **Note:** Version bump only for package decap-cms-lib-util
315
-
316
- # [2.2.0-beta.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.1.3-beta.0...decap-cms-lib-util@2.2.0-beta.0) (2019-03-21)
317
-
318
- ### Features
319
-
320
- - provide usable UMD builds for all packages ([#2141](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2141)) ([82cc794](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/82cc794))
321
-
322
- ## [2.1.3-beta.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.1.2...decap-cms-lib-util@2.1.3-beta.0) (2019-03-15)
323
-
324
- ### Features
325
-
326
- - upgrade to Emotion 10 ([#2166](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/2166)) ([ccef446](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/ccef446))
327
-
328
- ## [2.1.2](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.1.1...decap-cms-lib-util@2.1.2) (2019-02-26)
329
-
330
- **Note:** Version bump only for package decap-cms-lib-util
331
-
332
- ## [2.1.1](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.1.0...decap-cms-lib-util@2.1.1) (2018-11-29)
333
-
334
- **Note:** Version bump only for package decap-cms-lib-util
335
-
336
- <a name="2.1.0"></a>
337
-
338
- # [2.1.0](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.0.5...decap-cms-lib-util@2.1.0) (2018-09-06)
339
-
340
- ### Bug Fixes
341
-
342
- - remove alert modal from localForage error case ([#1676](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/1676)) ([4f3116d](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/4f3116d))
343
-
344
- ### Features
345
-
346
- - **media:** add external media library support, Uploadcare integration ([#1602](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/issues/1602)) ([0596904](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/commit/0596904))
347
-
348
- <a name="2.0.5"></a>
349
-
350
- ## [2.0.5](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.0.4...decap-cms-lib-util@2.0.5) (2018-08-24)
351
-
352
- **Note:** Version bump only for package decap-cms-lib-util
353
-
354
- <a name="2.0.4"></a>
355
-
356
- ## [2.0.4](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.0.3...decap-cms-lib-util@2.0.4) (2018-08-07)
357
-
358
- **Note:** Version bump only for package decap-cms-lib-util
359
-
360
- <a name="2.0.3"></a>
361
-
362
- ## [2.0.3](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.0.2...decap-cms-lib-util@2.0.3) (2018-08-01)
363
-
364
- **Note:** Version bump only for package decap-cms-lib-util
365
-
366
- <a name="2.0.2"></a>
367
-
368
- ## [2.0.2](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/compare/decap-cms-lib-util@2.0.1...decap-cms-lib-util@2.0.2) (2018-07-28)
369
-
370
- **Note:** Version bump only for package decap-cms-lib-util
371
-
372
- <a name="2.0.1"></a>
373
-
374
- ## 2.0.1 (2018-07-26)
375
-
376
- <a name="2.0.0"></a>
377
-
378
- # 2.0.0 (2018-07-26)
379
-
380
- ### Bug Fixes
381
-
382
- - **bitbucket:** fix rebasing mistakes in bitbucket backend and deps ([#1522](https://github.com/decaporg/decap-cms/issues/1522)) ([bdfd944](https://github.com/decaporg/decap-cms/commit/bdfd944))
package/dist/esm/stega.js DELETED
@@ -1,129 +0,0 @@
1
- import { vercelStegaEncode } from '@vercel/stega';
2
- import { isImmutableMap, isImmutableList } from './types';
3
-
4
- /**
5
- * Context passed to encode functions, containing the current state of the encoding process
6
- */
7
-
8
- /**
9
- * Get the fields that should be used for encoding nested values
10
- */
11
- function getNestedFields(f) {
12
- if (f) {
13
- if ('types' in f) {
14
- var _f$types;
15
- return (_f$types = f.types) !== null && _f$types !== void 0 ? _f$types : [];
16
- }
17
- if ('fields' in f) {
18
- var _f$fields;
19
- return (_f$fields = f.fields) !== null && _f$fields !== void 0 ? _f$fields : [];
20
- }
21
- if ('field' in f) {
22
- return f.field ? [f.field] : [];
23
- }
24
- return [f];
25
- }
26
- return [];
27
- }
28
-
29
- /**
30
- * Encode a string value by appending steganographic data
31
- * For markdown fields, encode each paragraph separately
32
- */
33
- function encodeString(value, {
34
- fields,
35
- path
36
- }) {
37
- var _fields$;
38
- const stega = vercelStegaEncode({
39
- decap: path
40
- });
41
- const isMarkdown = ((_fields$ = fields[0]) === null || _fields$ === void 0 ? void 0 : _fields$.widget) === 'markdown';
42
- if (isMarkdown && value.includes('\n\n')) {
43
- const blocks = value.split(/(\n\n+)/);
44
- return blocks.map(block => block.trim() ? block + stega : block).join('');
45
- }
46
- return value + stega;
47
- }
48
-
49
- /**
50
- * Encode a list of values, handling both simple values and nested objects/lists
51
- * For typed lists, use the type field to determine which fields to use
52
- */
53
- function encodeList(list, ctx) {
54
- let newList = list;
55
- for (let i = 0; i < newList.size; i++) {
56
- const item = newList.get(i);
57
- if (isImmutableMap(item)) {
58
- const itemType = item.get('type');
59
- if (typeof itemType === 'string') {
60
- // For typed items, look up fields based on type
61
- const field = ctx.fields.find(f => f.name === itemType);
62
- const newItem = ctx.visit(item, getNestedFields(field), `${ctx.path}.${i}`);
63
- newList = newList.set(i, newItem);
64
- } else {
65
- // For untyped items, use current fields
66
- const newItem = ctx.visit(item, ctx.fields, `${ctx.path}.${i}`);
67
- newList = newList.set(i, newItem);
68
- }
69
- } else {
70
- // For simple values, use first field if available
71
- const field = ctx.fields[0];
72
- const newItem = ctx.visit(item, field ? [field] : [], `${ctx.path}.${i}`);
73
- if (newItem !== item) {
74
- newList = newList.set(i, newItem);
75
- }
76
- }
77
- }
78
- return newList;
79
- }
80
-
81
- /**
82
- * Encode a map of values, looking up the appropriate field for each key
83
- * and recursively encoding nested values
84
- */
85
- function encodeMap(map, ctx) {
86
- let newMap = map;
87
- for (const [key, val] of newMap.entrySeq().toArray()) {
88
- const field = ctx.fields.find(f => f.name === key);
89
- if (field) {
90
- const fields = getNestedFields(field);
91
- const newVal = ctx.visit(val, fields, ctx.path ? `${ctx.path}.${key}` : key);
92
- if (newVal !== val) {
93
- newMap = newMap.set(key, newVal);
94
- }
95
- }
96
- }
97
- return newMap;
98
- }
99
-
100
- /**
101
- * Main entry point for encoding steganographic data into entry values
102
- * Uses a visitor pattern with caching to handle recursive structures
103
- */
104
- export function encodeEntry(value, fields) {
105
- const plainFields = fields.toJS();
106
- const cache = new Map();
107
- function visit(value, fields, path = '') {
108
- const cached = cache.get(path);
109
- if (cached === value) return value;
110
- const ctx = {
111
- fields,
112
- path,
113
- visit
114
- };
115
- let result;
116
- if (isImmutableList(value)) {
117
- result = encodeList(value, ctx);
118
- } else if (isImmutableMap(value)) {
119
- result = encodeMap(value, ctx);
120
- } else if (typeof value === 'string') {
121
- result = encodeString(value, ctx);
122
- } else {
123
- result = value;
124
- }
125
- cache.set(path, result);
126
- return result;
127
- }
128
- return visit(value, plainFields);
129
- }