@iebh/tera-fy 1.2.1 → 1.2.2

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,5 +1,7 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.2](https://github.com/IEBH/TERA-fy/compare/v1.2.1...v1.2.2) (2024-04-11)
4
+
3
5
  ## [1.2.1](https://github.com/IEBH/TERA-fy/compare/v1.2.0...v1.2.1) (2024-04-11)
4
6
 
5
7
 
@@ -7,3 +9,331 @@
7
9
 
8
10
  * Handle file meta data where created/modified/accessed dates are omitted for some reason ([1544723](https://github.com/IEBH/TERA-fy/commit/1544723ec6ce4478541a07baa0e44cb120f7e929))
9
11
  * Handle nullish errors on RPC calls ([f873029](https://github.com/IEBH/TERA-fy/commit/f8730294e8a7dbf08602edf87ce2926695238592))
12
+
13
+
14
+
15
+ # [1.2.0](https://github.com/IEBH/TERA-fy/compare/v1.1.0...v1.2.0) (2024-04-11)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * Wrong inherited argument when running setProjectLibrary() ([aaaca64](https://github.com/IEBH/TERA-fy/commit/aaaca641847aae9e7a72b4423282002e3b125e70))
21
+
22
+
23
+ ### Features
24
+
25
+ * <tera-file-select> now supports save functionality ([e60b63e](https://github.com/IEBH/TERA-fy/commit/e60b63e36a5f757fec74922577ec701ae2f42d5e))
26
+ * More fixes and UX for file saving UI/UX ([7c4e1af](https://github.com/IEBH/TERA-fy/commit/7c4e1af0b5569af7a1c1aa1df29f47b24d464dc8))
27
+ * setProjectLibrary() can now prompt for a file path if none is specified ([62a5f03](https://github.com/IEBH/TERA-fy/commit/62a5f031c0b6ef9f8b72dfee335e4fa79fdffdfb))
28
+
29
+
30
+
31
+ # [1.1.0](https://github.com/IEBH/TERA-fy/compare/v1.0.24...v1.1.0) (2024-04-09)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * Yet more files added to prerelease step ([399c6f8](https://github.com/IEBH/TERA-fy/commit/399c6f8d6c5080238c079c12b16add7eebeb1d7e))
37
+
38
+
39
+ ### Features
40
+
41
+ * File saving UI ([b2f8809](https://github.com/IEBH/TERA-fy/commit/b2f8809a960880b951072127d7492b31aa29b03a))
42
+
43
+
44
+
45
+ ## [1.0.24](https://github.com/IEBH/TERA-fy/compare/v1.0.23...v1.0.24) (2024-04-05)
46
+
47
+
48
+ ### Bug Fixes
49
+
50
+ * Yet another fix for setProjectState() throwing when trying to save + remove defunct {sync:Boolean} option ([4e320ec](https://github.com/IEBH/TERA-fy/commit/4e320ec8f171237387db7404a7209b4ca51898c8))
51
+
52
+
53
+
54
+ ## [1.0.23](https://github.com/IEBH/TERA-fy/compare/v1.0.22...v1.0.23) (2024-04-04)
55
+
56
+
57
+
58
+ ## [1.0.22](https://github.com/IEBH/TERA-fy/compare/v1.0.21...v1.0.22) (2024-04-04)
59
+
60
+
61
+ ### Bug Fixes
62
+
63
+ * Missing Promise chain response during setProjectState() ([1fb7f29](https://github.com/IEBH/TERA-fy/commit/1fb7f29d01103f2396f89dd31928dabb48150328))
64
+
65
+
66
+
67
+ ## [1.0.21](https://github.com/IEBH/TERA-fy/compare/v1.0.20...v1.0.21) (2024-04-03)
68
+
69
+
70
+ ### Bug Fixes
71
+
72
+ * Added projectFile class build to frontend scripts ([b21fe29](https://github.com/IEBH/TERA-fy/commit/b21fe29cdb20c67307e0c5cd6d4d73d945a33b8e))
73
+ * Missing dep ([9bf58e4](https://github.com/IEBH/TERA-fy/commit/9bf58e467a89886ca5c17c3209a503df2c7dba26))
74
+
75
+
76
+ ### Features
77
+
78
+ * More edits to <tera-file-select/> ([efc49f7](https://github.com/IEBH/TERA-fy/commit/efc49f7fc81d02081cfd4cb17fe6dfec9a12969b))
79
+ * Moved ProjectLibrary file into its own classdef + added more file setter methods ([6c8eac3](https://github.com/IEBH/TERA-fy/commit/6c8eac3c9c853f5f5cf367dea82062b236163f9f))
80
+ * Stash + retrieve login data from LocalStorage when using embed + popup window workaround method ([e9ec32c](https://github.com/IEBH/TERA-fy/commit/e9ec32c253c2cb3bd7c8312cd2ad61432b24542a))
81
+
82
+
83
+
84
+ ## [1.0.20](https://github.com/IEBH/TERA-fy/compare/v1.0.19...v1.0.20) (2024-04-02)
85
+
86
+
87
+ ### Bug Fixes
88
+
89
+ * Yet more $auth screw-around with window.opener magic ([d140da1](https://github.com/IEBH/TERA-fy/commit/d140da1d7760713b35ffca58a688c638f094869e))
90
+
91
+
92
+
93
+ ## [1.0.19](https://github.com/IEBH/TERA-fy/compare/v1.0.18...v1.0.19) (2024-04-02)
94
+
95
+
96
+ ### Features
97
+
98
+ * Start on <tera-library-select/> Vue component ([aa42855](https://github.com/IEBH/TERA-fy/commit/aa42855df0b4e32b0b3a08e4e86021faf3ac8ca6))
99
+
100
+
101
+
102
+ ## [1.0.18](https://github.com/IEBH/TERA-fy/compare/v1.0.17...v1.0.18) (2024-04-02)
103
+
104
+
105
+ ### Bug Fixes
106
+
107
+ * Auto call to requireProject() in Vue2 mode ([f592cfb](https://github.com/IEBH/TERA-fy/commit/f592cfbd0c2f9373b1fb95203684ebb3b2acf81b))
108
+ * Dont rely on server auth populating $auth.user.id ([73f8c85](https://github.com/IEBH/TERA-fy/commit/73f8c85c17d6e79184ecc5b9929739da33b57786))
109
+ * Logic error when setting project state ([7fcd826](https://github.com/IEBH/TERA-fy/commit/7fcd8265d2f15f28df99b0271396e9467ab91a20))
110
+ * Subclass _pathSet() when in Vue2 mode ([ea5537e](https://github.com/IEBH/TERA-fy/commit/ea5537e34d11170b3296d75861425a0db162f0ba))
111
+
112
+
113
+ ### Features
114
+
115
+ * Added method to try authenticating locally via a popup when in embedded mode ([7286958](https://github.com/IEBH/TERA-fy/commit/72869585c7f203f330815c9dba5f4b0f36a350e8))
116
+ * Added prototype window mode for client ([9241854](https://github.com/IEBH/TERA-fy/commit/92418548dfd213396acb082acf9dae08b441a374))
117
+ * Added subclassable {has,get,set}Path methods to client for state setting ([a4acedf](https://github.com/IEBH/TERA-fy/commit/a4acedf214af3cc612b2a1a1975070dc6ee87015))
118
+ * Button selection when using uiAlert() ([118223f](https://github.com/IEBH/TERA-fy/commit/118223fb3407b5c58c79aeeb37053b4fab9a6d0f))
119
+ * getUser({forceRetry:Boolean}) ([15b8efd](https://github.com/IEBH/TERA-fy/commit/15b8efd521486326652afb692dd816f10a30940b))
120
+ * uiSplat() + uiWindow() ([a72fc33](https://github.com/IEBH/TERA-fy/commit/a72fc33e05c64d4428ef4c747684504edc51bd09))
121
+
122
+
123
+
124
+ ## [1.0.17](https://github.com/IEBH/TERA-fy/compare/v1.0.16...v1.0.17) (2024-03-14)
125
+
126
+
127
+ ### Bug Fixes
128
+
129
+ * Typo ([98fad09](https://github.com/IEBH/TERA-fy/commit/98fad09c2c875b2b6b7158afb5d77ae41ecb6e65))
130
+
131
+
132
+ ### Features
133
+
134
+ * Filled out stubs for {get,set,select}ProjectLibrary() ([0bdbfd9](https://github.com/IEBH/TERA-fy/commit/0bdbfd943e2613d917be8c64e22893ab8fcb1b86))
135
+
136
+
137
+
138
+ ## [1.0.16](https://github.com/IEBH/TERA-fy/compare/v1.0.15...v1.0.16) (2024-03-06)
139
+
140
+
141
+ ### Bug Fixes
142
+
143
+ * Dont try to inject undef values when devmode is enabled but the site URL isnt a string ([47598b2](https://github.com/IEBH/TERA-fy/commit/47598b25ad82e6e7cd9eb11fa304bce94595073f))
144
+
145
+
146
+ ### Features
147
+
148
+ * getLibraryFile() now supports multiple file transforms before handing contents to requester ([e413bd9](https://github.com/IEBH/TERA-fy/commit/e413bd9e91f3e152ecf334f96d276d6a89d6ea66))
149
+
150
+
151
+
152
+ ## [1.0.15](https://github.com/IEBH/TERA-fy/compare/v1.0.14...v1.0.15) (2024-02-29)
153
+
154
+
155
+ ### Features
156
+
157
+ * requireUser() + call to it from requireProject() ([d4eedfa](https://github.com/IEBH/TERA-fy/commit/d4eedfa97fb744298db9c8c04fcb79834c86ad4d))
158
+ * uiAlert() ([09da928](https://github.com/IEBH/TERA-fy/commit/09da9282beb00fc644bcde34a583b4b16f9f2854))
159
+
160
+
161
+
162
+ ## [1.0.14](https://github.com/IEBH/TERA-fy/compare/v1.0.13...v1.0.14) (2024-02-27)
163
+
164
+
165
+ ### Bug Fixes
166
+
167
+ * yet more fixes to Live version of TERA-fy deployed to Live TERA ([f72fb8d](https://github.com/IEBH/TERA-fy/commit/f72fb8de2329d63aa1cacc2e6c962f9370a2c75a))
168
+
169
+
170
+
171
+ ## [1.0.13](https://github.com/IEBH/TERA-fy/compare/v1.0.12...v1.0.13) (2024-02-27)
172
+
173
+
174
+ ### Bug Fixes
175
+
176
+ * Wrong DOM reference when searching for external iFrame from top-level TERA window ([51a0ab8](https://github.com/IEBH/TERA-fy/commit/51a0ab8df52de8a4822dc62e3b3318187cd94dcb))
177
+ * Wrong external referencing for Vue2 plugin ([ddd7068](https://github.com/IEBH/TERA-fy/commit/ddd7068fb0e00fa6d203cf5d4650f4138595aaa6))
178
+
179
+
180
+ ### Features
181
+
182
+ * Added @vue/cli-service compatible version (ESM + ES2019 spec) ([56501c9](https://github.com/IEBH/TERA-fy/commit/56501c97d4f2f30d908d2d1db7d847495183bf99))
183
+ * TERA-fy client can now opt-in to sandbox overrides in dev mode ([550ac9c](https://github.com/IEBH/TERA-fy/commit/550ac9c953cdcf1b47c834dcd9b59de3235663d6))
184
+
185
+
186
+
187
+ ## [1.0.12](https://github.com/IEBH/TERA-fy/compare/v1.0.11...v1.0.12) (2024-02-22)
188
+
189
+
190
+ ### Bug Fixes
191
+
192
+ * Tweaks to what is included in the NPM tarball ([e2cf7e0](https://github.com/IEBH/TERA-fy/commit/e2cf7e0cf8c23c55cf7b02c209046e368efa88c5))
193
+
194
+
195
+ ### Features
196
+
197
+ * Added setProjectStateDefaults() to make priming defaults easier ([55a6ce8](https://github.com/IEBH/TERA-fy/commit/55a6ce8ecad1ed43a27bd41664ad031e1fc62997))
198
+
199
+
200
+
201
+ ## [1.0.11](https://github.com/IEBH/TERA-fy/compare/v1.0.10...v1.0.11) (2024-02-21)
202
+
203
+
204
+ ### Bug Fixes
205
+
206
+ * Added @mfdc/supabase-reactive as a dep for the Vue plugins ([2f7900d](https://github.com/IEBH/TERA-fy/commit/2f7900d86bc45c556b383756a0b1af30d35d43e5))
207
+
208
+
209
+ ### Features
210
+
211
+ * Added events / EventEmitter pattern to accept flushed updates from server ([458ce79](https://github.com/IEBH/TERA-fy/commit/458ce799ad9acf68732489efed56da5a0917cd95))
212
+ * Client can now tell server where its loaded from via setServerMode() ([b7c5fc0](https://github.com/IEBH/TERA-fy/commit/b7c5fc0cb18df2c9d39a4f63a32dd93da28e89fa))
213
+ * Updated Vue plugins (2+3) to handle remote project state changes ([0abf7b4](https://github.com/IEBH/TERA-fy/commit/0abf7b44fff25530af6430856850c5743172df2e))
214
+
215
+
216
+
217
+ ## [1.0.10](https://github.com/IEBH/TERA-fy/compare/v1.0.9...v1.0.10) (2024-02-18)
218
+
219
+
220
+ ### Bug Fixes
221
+
222
+ * Better reaction when there is no active user login ([48bd61f](https://github.com/IEBH/TERA-fy/commit/48bd61fe71509e6c68ea8fcba90f6f2297b721bf))
223
+ * Debugging artefacts ([61d559b](https://github.com/IEBH/TERA-fy/commit/61d559b62f1d9cbc1d12ff4b9f65b71af7d48429))
224
+ * Dont allow plugins to override the main init() function - instead call them after that function has done its work ([7db3ba0](https://github.com/IEBH/TERA-fy/commit/7db3ba09a13dc87b70df192f55585d2fc09a3931))
225
+ * Plugins init() functions are now called AFTER all other init functionaly has finished + they are called with the outer object context ([4757597](https://github.com/IEBH/TERA-fy/commit/4757597324873c953e4d93994776eff4030b985c))
226
+ * **plugins/vue2:** Handle Vue2 giving us a broken diff on Observable write ([d72a143](https://github.com/IEBH/TERA-fy/commit/d72a143cda01478d46a86a0bf9863cf9203b903a))
227
+
228
+
229
+ ### Features
230
+
231
+ * createProjectStatePatch() to avoid having to do this manually in each plugin ([5414a22](https://github.com/IEBH/TERA-fy/commit/5414a227bba8968108f0b6d65c766dc2a642acc9))
232
+ * init() can now accept an options object ([0ee55b7](https://github.com/IEBH/TERA-fy/commit/0ee55b77ff1178b73c4d749db509d06315da1afc))
233
+ * Prototype project subscription process (untested) ([f13b957](https://github.com/IEBH/TERA-fy/commit/f13b9578d9e725b3d4d886120d28365893da9bcb))
234
+ * Various project-state patch handling functionality now implemented ([8260808](https://github.com/IEBH/TERA-fy/commit/8260808f67c1c3149db487ce61edb4e75d9a3661))
235
+ * **vue2:** Largish refactor to support Vue2 + Vue3 plugins ([2abcecc](https://github.com/IEBH/TERA-fy/commit/2abcecc1c95e68a7680a13ae54bebcb70d61d930))
236
+
237
+
238
+
239
+ ## [1.0.9](https://github.com/IEBH/TERA-fy/compare/v1.0.8...v1.0.9) (2023-11-09)
240
+
241
+
242
+ ### Features
243
+
244
+ * **getProjectFiles:** Added getProjectFiles() ([b3804a5](https://github.com/IEBH/TERA-fy/commit/b3804a5433610943cc46b1e5fba68558bbed77b9))
245
+ * getProjectLibrary() now working ([019dacd](https://github.com/IEBH/TERA-fy/commit/019dacd1c677564e66688acf0b6bea2d39dca5e3))
246
+
247
+
248
+
249
+ ## [1.0.8](https://github.com/IEBH/TERA-fy/compare/v1.0.7...v1.0.8) (2023-11-02)
250
+
251
+
252
+ ### Bug Fixes
253
+
254
+ * **plugins/vue:** Various load race conditions for the Vue loader ([aa9c77c](https://github.com/IEBH/TERA-fy/commit/aa9c77cb896d5cba70a59295796b10d6b27cb52e))
255
+
256
+
257
+ ### Features
258
+
259
+ * Tera-Fy can now communicate upwards (window.parent) or downwards (via iFrame) depending on its active context ([0c8d30d](https://github.com/IEBH/TERA-fy/commit/0c8d30dcf6398578a535a04e70ff2c481683ff46))
260
+
261
+
262
+
263
+ ## [1.0.7](https://github.com/IEBH/TERA-fy/compare/v1.0.6...v1.0.7) (2023-11-02)
264
+
265
+
266
+ ### Bug Fixes
267
+
268
+ * Misc fixes ([2bd5e03](https://github.com/IEBH/TERA-fy/commit/2bd5e035dd861e7baa8203d3dc5fb206b78aefbc))
269
+
270
+
271
+ ### Features
272
+
273
+ * **plugins/vue:** Better project + project list binding ([2d46189](https://github.com/IEBH/TERA-fy/commit/2d4618956cf8c7201a8e39f8bf0dc33513f726a5))
274
+
275
+
276
+
277
+ ## [1.0.6](https://github.com/IEBH/TERA-fy/compare/v1.0.5...v1.0.6) (2023-11-01)
278
+
279
+
280
+ ### Bug Fixes
281
+
282
+ * Better error tracking methods with CLIENT|SERVER.debug() + try barriers around sendRaw() ([b4062b3](https://github.com/IEBH/TERA-fy/commit/b4062b30075403708427b1c58d308d34777997e9))
283
+ * client.init() now returns its own instance in the promise payload so it can be awaited ([05d6611](https://github.com/IEBH/TERA-fy/commit/05d66117bf7578f076472bc4d59be1df10e85cb3))
284
+ * Minor typo in package when generating docs ([626a7fc](https://github.com/IEBH/TERA-fy/commit/626a7fc6f3867f95dd7efa4cf1ca6875ae25c1f6))
285
+ * Placehoder in Vue plugin to load basic project skeleton ([f530e51](https://github.com/IEBH/TERA-fy/commit/f530e5116e1a51652038df3a81a1e629d84755f7))
286
+
287
+
288
+
289
+ ## [1.0.5](https://github.com/IEBH/TERA-fy/compare/v1.0.4...v1.0.5) (2023-10-31)
290
+
291
+
292
+ ### Bug Fixes
293
+
294
+ * Change default tera-tools endpoint to live site ([ca4a595](https://github.com/IEBH/TERA-fy/commit/ca4a59548751f1afdb1a6309868de73b2dda81d6))
295
+ * Various fixes to the mixin infrastructure ([27ce126](https://github.com/IEBH/TERA-fy/commit/27ce126225f3b5faa06700efa9e6c87b38da33ef))
296
+
297
+
298
+
299
+ ## [1.0.4](https://github.com/IEBH/TERA-fy/compare/v1.0.3...v1.0.4) (2023-10-27)
300
+
301
+
302
+ ### Features
303
+
304
+ * Added TeraFy.set() + minor fixes ([ccf2221](https://github.com/IEBH/TERA-fy/commit/ccf222160aeb23b98c619f75da31099026df8544))
305
+ * Implemented prototype plugin structure ([4a35743](https://github.com/IEBH/TERA-fy/commit/4a357434606e0491b3626eacfbd3ff2307a341f0))
306
+
307
+
308
+
309
+ ## [1.0.3](https://github.com/IEBH/TERA-fy/compare/v1.0.2...v1.0.3) (2023-10-26)
310
+
311
+
312
+ ### Bug Fixes
313
+
314
+ * getProjectStateSnapshot() wasnt actually returning a result ([db1c572](https://github.com/IEBH/TERA-fy/commit/db1c572116c73f8dfdff8ace23f486afb9b8953c))
315
+
316
+
317
+
318
+ ## [1.0.2](https://github.com/IEBH/TERA-fy/compare/v1.0.1...v1.0.2) (2023-10-26)
319
+
320
+
321
+ ### Features
322
+
323
+ * Ping-pong RPC support with server<->client, added support for contexts to carry messages on server side ([15b970d](https://github.com/IEBH/TERA-fy/commit/15b970d0fa187c935f0dd7c2aba2d630e9e59b98))
324
+ * setActiveProject() ([c24158a](https://github.com/IEBH/TERA-fy/commit/c24158acca0cb7fc9e50b817e60a0644bbadf16e))
325
+
326
+
327
+
328
+ ## [1.0.1](https://github.com/IEBH/TERA-fy/compare/74610c8b8347cb9e5e9b198d2caa0e9b1c6259f4...v1.0.1) (2023-10-26)
329
+
330
+
331
+ ### Bug Fixes
332
+
333
+ * Comms now working ([74610c8](https://github.com/IEBH/TERA-fy/commit/74610c8b8347cb9e5e9b198d2caa0e9b1c6259f4))
334
+ * Misc fixes ([8826eb4](https://github.com/IEBH/TERA-fy/commit/8826eb4f134ed921becdeb6fdc48a9d5b1cb716e))
335
+
336
+
337
+ ### Features
338
+
339
+ * DevMode toggling + better stylesheet handling + toggleFullscreen() ([cc96e76](https://github.com/IEBH/TERA-fy/commit/cc96e7659e02bee4410a07f319d34a1acdb001ec))
@@ -682,7 +682,7 @@ export default class TeraFyServer {
682
682
 
683
683
  // }}}
684
684
 
685
- // Project State - getProjectState(), setProjectState(), saveProjectState(), replaceProjectState(), applyProjectStatePatch() {{{
685
+ // Project State - getProjectState(), setProjectState(), saveProjectStateDefaults(), replaceProjectState(), applyProjectStatePatch() {{{
686
686
 
687
687
  /**
688
688
  * Return the current, full snapshot state of the active project
@@ -790,16 +790,16 @@ export default class TeraFyServer {
790
790
  * @param {*} value The value to set
791
791
  * @param {Object} [options] Additional options to mutate behaviour, see setProjectState() for the full list of supported options
792
792
  *
793
- * @returns {Promise<Boolean>} A promise which resolves to whether any changes were made - True if defaults were applied, false otherwise
793
+ * @returns {Promise<*>} A promise which resolves to the eventual input value
794
794
  */
795
795
  setProjectStateDefaults(path, value, options) {
796
796
  if (!app.service('$projects').active) throw new Error('No active project');
797
797
 
798
798
  if (!this._pathHas(app.service('$projects').active, path)) {
799
799
  return this.setProjectState(path, value, options)
800
- .then(()=> true)
800
+ .then(()=> value)
801
801
  } else {
802
- return Promise.resolve(false);
802
+ return Promise.resolve(value);
803
803
  }
804
804
  }
805
805
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iebh/tera-fy",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "TERA website worker",
5
5
  "scripts": {
6
6
  "dev": "esbuild --platform=browser --format=esm --bundle lib/terafy.client.js --outfile=dist/terafy.js --minify --serve --servedir=.",