@balena/pinejs 15.0.0-build-renovate-node-20-x-74a72cbe8a4965e32762ac3eb5a13a9720d8740c-1 → 15.0.0-build-15-x-cefa3a481a667c40b8e5dcacdc5699b37977b8d4-1
Sign up to get free protection for your applications and to get access to all the features.
- package/.pinejs-cache.json +1 -1
- package/.versionbot/CHANGELOG.yml +362 -5
- package/CHANGELOG.md +78 -2
- package/Dockerfile +1 -1
- package/build/browser.ts +0 -1
- package/out/config-loader/config-loader.js +3 -6
- package/out/config-loader/config-loader.js.map +1 -1
- package/out/config-loader/env.js +4 -4
- package/out/config-loader/env.js.map +1 -1
- package/out/data-server/sbvr-server.d.ts +1 -13
- package/out/data-server/sbvr-server.js +17 -1
- package/out/data-server/sbvr-server.js.map +1 -1
- package/out/database-layer/db.js +12 -15
- package/out/database-layer/db.js.map +1 -1
- package/out/express-emulator/express.js +4 -4
- package/out/express-emulator/express.js.map +1 -1
- package/out/http-transactions/transactions.d.ts +1 -12
- package/out/http-transactions/transactions.js +18 -0
- package/out/http-transactions/transactions.js.map +1 -1
- package/out/migrator/async.js +14 -22
- package/out/migrator/async.js.map +1 -1
- package/out/migrator/sync.js +6 -12
- package/out/migrator/sync.js.map +1 -1
- package/out/migrator/utils.d.ts +7 -9
- package/out/migrator/utils.js +44 -20
- package/out/migrator/utils.js.map +1 -1
- package/out/pinejs-session-store/pinejs-session-store.js +18 -3
- package/out/pinejs-session-store/pinejs-session-store.js.map +1 -1
- package/out/sbvr-api/abstract-sql.d.ts +2 -1
- package/out/sbvr-api/abstract-sql.js +2 -3
- package/out/sbvr-api/abstract-sql.js.map +1 -1
- package/out/sbvr-api/cached-compile.js +1 -1
- package/out/sbvr-api/cached-compile.js.map +1 -1
- package/out/sbvr-api/hooks.d.ts +0 -3
- package/out/sbvr-api/hooks.js +4 -5
- package/out/sbvr-api/hooks.js.map +1 -1
- package/out/sbvr-api/odata-response.js +4 -5
- package/out/sbvr-api/odata-response.js.map +1 -1
- package/out/sbvr-api/permissions.js +23 -64
- package/out/sbvr-api/permissions.js.map +1 -1
- package/out/sbvr-api/sbvr-utils.d.ts +4 -4
- package/out/sbvr-api/sbvr-utils.js +47 -32
- package/out/sbvr-api/sbvr-utils.js.map +1 -1
- package/out/sbvr-api/translations.js +3 -4
- package/out/sbvr-api/translations.js.map +1 -1
- package/out/sbvr-api/uri-parser.d.ts +2 -1
- package/out/sbvr-api/uri-parser.js +4 -9
- package/out/sbvr-api/uri-parser.js.map +1 -1
- package/package.json +10 -10
- package/src/config-loader/env.ts +3 -7
- package/src/data-server/sbvr-server.js +17 -1
- package/src/database-layer/db.ts +1 -1
- package/src/express-emulator/express.js +4 -4
- package/src/http-transactions/transactions.js +18 -0
- package/src/migrator/async.ts +1 -5
- package/src/migrator/utils.ts +48 -33
- package/src/pinejs-session-store/pinejs-session-store.ts +15 -0
- package/src/sbvr-api/hooks.ts +0 -2
- package/src/sbvr-api/odata-response.ts +1 -2
- package/src/sbvr-api/permissions.ts +17 -59
- package/src/sbvr-api/sbvr-utils.ts +41 -19
- package/tsconfig.json +1 -1
@@ -1,16 +1,373 @@
|
|
1
1
|
- commits:
|
2
|
-
- subject:
|
3
|
-
hash:
|
2
|
+
- subject: Stop re-exporting `ODataRequest` as `HookRequest`
|
3
|
+
hash: cefa3a481a667c40b8e5dcacdc5699b37977b8d4
|
4
|
+
body: ""
|
5
|
+
footer:
|
6
|
+
Change-type: major
|
7
|
+
change-type: major
|
8
|
+
author: Pagan Gazzard
|
9
|
+
nested: []
|
10
|
+
- subject: Don't add a returning clause to requests if affectedIds has been
|
11
|
+
populated
|
12
|
+
hash: 5eeb4cc05bedc08bf1d350d324270ec9ee38613f
|
4
13
|
body: |
|
5
|
-
|
14
|
+
This avoids unnecessary work/db traffic in the case it is not necessary
|
15
|
+
footer:
|
16
|
+
Change-type: patch
|
17
|
+
change-type: patch
|
18
|
+
author: Pagan Gazzard
|
19
|
+
nested: []
|
20
|
+
- subject: Remove the deprecated `data` property from `PRERESPOND` hooks
|
21
|
+
hash: 244b55ca51b75f36e91c4c2ac449bad40b487598
|
22
|
+
body: ""
|
6
23
|
footer:
|
7
24
|
Change-type: major
|
8
25
|
change-type: major
|
9
|
-
author:
|
26
|
+
author: Pagan Gazzard
|
10
27
|
nested: []
|
28
|
+
- subject: Remove support for the deprecated db result form of async migrations
|
29
|
+
hash: 02624cba7900fb124dd5d46282c275d95d4dc9c2
|
30
|
+
body: ""
|
31
|
+
footer:
|
32
|
+
Change-type: major
|
33
|
+
change-type: major
|
34
|
+
author: Pagan Gazzard
|
35
|
+
nested: []
|
36
|
+
- subject: Update grunt
|
37
|
+
hash: dd60b17a7aa8fe0feee4a6dd137c1c21e71ea9e5
|
38
|
+
body: |
|
39
|
+
Update grunt from 1.5.3 to 1.6.0
|
40
|
+
|
41
|
+
Grunt 1.6.0 bumps node to 16 and internally rimraf to node14 what was
|
42
|
+
a major change.
|
43
|
+
footer:
|
44
|
+
Change-type: patch
|
45
|
+
change-type: patch
|
46
|
+
Signed-off-by: Harald Fischer <harald@balena.io>
|
47
|
+
signed-off-by: Harald Fischer <harald@balena.io>
|
48
|
+
author: Harald Fischer
|
49
|
+
nested: []
|
50
|
+
- subject: Do not convert `null` to the default value in `customApiKeyMiddleware`
|
51
|
+
hash: 4de294fea7f11f0f64035e8fecb83a4819ebdf9f
|
52
|
+
body: ""
|
53
|
+
footer:
|
54
|
+
Change-type: major
|
55
|
+
change-type: major
|
56
|
+
author: Pagan Gazzard
|
57
|
+
nested: []
|
58
|
+
- subject: "Use `{ value: modelValue }` for se and odataMetadata model entries"
|
59
|
+
hash: 59df2a98a015ddc50ef88ffe9c6fef33c6cc5dac
|
60
|
+
body: |
|
61
|
+
This avoids putting strings directly into a JSON field
|
62
|
+
footer:
|
63
|
+
Change-type: major
|
64
|
+
change-type: major
|
65
|
+
author: Pagan Gazzard
|
66
|
+
nested: []
|
67
|
+
- subject: Switch mysql `sql_mode` from `ANSI_QUOTES` to `ANSI`
|
68
|
+
hash: 865fdbf8db50b803daa1fc70b4a3001ce30f3839
|
69
|
+
body: ""
|
70
|
+
footer:
|
71
|
+
Change-type: major
|
72
|
+
change-type: major
|
73
|
+
author: Pagan Gazzard
|
74
|
+
nested: []
|
75
|
+
- subject: Make `actor` a required property of the req.apiKey object
|
76
|
+
hash: 2b95a8e439a9dba02c5cc6d92037d5becfa20c2e
|
77
|
+
body: ""
|
78
|
+
footer:
|
79
|
+
Change-type: major
|
80
|
+
change-type: major
|
81
|
+
author: Pagan Gazzard
|
82
|
+
nested: []
|
83
|
+
- subject: Change `resolveAuthHeader`/`resolveApiKey` to throw on invalid api keys
|
84
|
+
hash: ded89b65ee9200441859d4701fba585fbe772cd3
|
85
|
+
body: ""
|
86
|
+
footer:
|
87
|
+
Change-type: major
|
88
|
+
change-type: major
|
89
|
+
author: Pagan Gazzard
|
90
|
+
nested: []
|
91
|
+
- subject: Do not bail in `resolveAuthHeader` if there is an existing api key
|
92
|
+
hash: d3a68d1b091e1c8ec5b7724779d6289f055e233d
|
93
|
+
body: ""
|
94
|
+
footer:
|
95
|
+
Change-type: major
|
96
|
+
change-type: major
|
97
|
+
author: Pagan Gazzard
|
98
|
+
nested: []
|
99
|
+
- subject: Do not bail in `resolveApiKey` if there is an existing api key
|
100
|
+
hash: ce989bd01e29f0833aedc254e820f53c3cc74690
|
101
|
+
body: ""
|
102
|
+
footer:
|
103
|
+
Change-type: major
|
104
|
+
change-type: major
|
105
|
+
author: Pagan Gazzard
|
106
|
+
nested: []
|
107
|
+
- subject: Treat ConceptType fields as expandable/foreign key fields as they are
|
108
|
+
hash: 69860883581f87215fb8431e7bf18d2bf43a6e17
|
109
|
+
body: ""
|
110
|
+
footer:
|
111
|
+
Change-type: major
|
112
|
+
change-type: major
|
113
|
+
author: Pagan Gazzard
|
114
|
+
nested: []
|
115
|
+
- subject: Throw rather than warn on invalid value for `PINEJS_DEBUG`
|
116
|
+
hash: 95e1bd8df2a4846c5fab8418efdb5bd4a8b4b94e
|
117
|
+
body: ""
|
118
|
+
footer:
|
119
|
+
Change-type: major
|
120
|
+
change-type: major
|
121
|
+
author: Pagan Gazzard
|
122
|
+
nested: []
|
123
|
+
- subject: Remove support for `DEBUG` env var in favor of only `PINEJS_DEBUG`
|
124
|
+
hash: 0f186c4987820a126eeff434d3affd23aeb98779
|
125
|
+
body: ""
|
126
|
+
footer:
|
127
|
+
Change-type: major
|
128
|
+
change-type: major
|
129
|
+
author: Pagan Gazzard
|
130
|
+
nested: []
|
131
|
+
- subject: Set minimum supported nodejs version to 16.13.0 and tsconfig to es2021
|
132
|
+
hash: d1f01a08e114cdeae416e7a210d385d668bde4d5
|
133
|
+
body: ""
|
134
|
+
footer:
|
135
|
+
Change-type: major
|
136
|
+
change-type: major
|
137
|
+
author: Pagan Gazzard
|
138
|
+
nested: []
|
139
|
+
- subject: Reflect the usage of BOOLEAN/JSON database types
|
140
|
+
hash: 3fc9968c4358bef0e4656f9009dfb38d9725e87c
|
141
|
+
body: ""
|
142
|
+
footer:
|
143
|
+
Change-type: major
|
144
|
+
change-type: major
|
145
|
+
author: Pagan Gazzard
|
146
|
+
nested: []
|
147
|
+
- subject: Update dependencies
|
148
|
+
hash: ac8e93d0f22ee16dc176f235ee60d1bbdd8038d6
|
149
|
+
body: |
|
150
|
+
Update @balena/abstract-sql-compiler from 8.5.0 to 9.0.0
|
151
|
+
Update @balena/abstract-sql-to-typescript from 1.5.1 to 2.0.0
|
152
|
+
Update @balena/odata-parser from 2.5.0 to 3.0.0
|
153
|
+
Update @balena/odata-to-abstract-sql from 5.9.6 to 6.0.1
|
154
|
+
Update @balena/sbvr-types from 3.5.0 to 4.0.0
|
155
|
+
footer:
|
156
|
+
Change-type: major
|
157
|
+
change-type: major
|
158
|
+
author: Pagan Gazzard
|
159
|
+
nested:
|
160
|
+
- commits:
|
161
|
+
- subject: Use optional chaining operator
|
162
|
+
hash: 1fb39ef2497b964af0f2cbc953a3f0843936fe02
|
163
|
+
body: ""
|
164
|
+
footer:
|
165
|
+
Change-type: major
|
166
|
+
change-type: major
|
167
|
+
author: Pagan Gazzard
|
168
|
+
- subject: Set minimum supported nodejs version to 16.13.0
|
169
|
+
hash: 91b8f51691a9649e99f2dc64253cc5ce9b59035a
|
170
|
+
body: ""
|
171
|
+
footer:
|
172
|
+
Change-type: major
|
173
|
+
change-type: major
|
174
|
+
author: Pagan Gazzard
|
175
|
+
version: odata-parser-3.0.0
|
176
|
+
title: ""
|
177
|
+
date: 2023-04-26T14:57:49.416Z
|
178
|
+
- commits:
|
179
|
+
- subject: Update dependencies
|
180
|
+
hash: d749289e311ad22e2b09793ad1dd472762bdf402
|
181
|
+
body: |
|
182
|
+
Update @balena/odata-parser from 2.4.6 to 3.0.0
|
183
|
+
Update @balena/sbvr-types from 3.5.0 to 4.0.0
|
184
|
+
footer:
|
185
|
+
Change-type: patch
|
186
|
+
change-type: patch
|
187
|
+
author: Pagan Gazzard
|
188
|
+
nested:
|
189
|
+
- commits:
|
190
|
+
- subject: Use optional chaining operator
|
191
|
+
hash: 1fb39ef2497b964af0f2cbc953a3f0843936fe02
|
192
|
+
body: ""
|
193
|
+
footer:
|
194
|
+
Change-type: major
|
195
|
+
change-type: major
|
196
|
+
author: Pagan Gazzard
|
197
|
+
- subject: Set minimum supported nodejs version to 16.13.0
|
198
|
+
hash: 91b8f51691a9649e99f2dc64253cc5ce9b59035a
|
199
|
+
body: ""
|
200
|
+
footer:
|
201
|
+
Change-type: major
|
202
|
+
change-type: major
|
203
|
+
author: Pagan Gazzard
|
204
|
+
version: odata-parser-3.0.0
|
205
|
+
title: ""
|
206
|
+
date: 2023-04-26T14:57:49.416Z
|
207
|
+
- commits:
|
208
|
+
- subject: Update to peggy 3 and make us of the repetition operator
|
209
|
+
hash: 3d091133ca54dfba71c2bc0d17e60780fb1bda22
|
210
|
+
body: ""
|
211
|
+
footer:
|
212
|
+
Change-type: minor
|
213
|
+
change-type: minor
|
214
|
+
author: Pagan Gazzard
|
215
|
+
version: odata-parser-2.5.0
|
216
|
+
title: ""
|
217
|
+
date: 2023-04-26T11:09:24.513Z
|
218
|
+
- commits:
|
219
|
+
- subject: Add test cases for Objects in JSON validate
|
220
|
+
hash: be8fc31c3754186dd4c43ca8d4c056b0def7ffbd
|
221
|
+
body: >
|
222
|
+
As balena-lint rejects `new Boolean()`, `new Number()`
|
223
|
+
and `new String()` constructor usage, test cases double
|
224
|
+
check that they are not instantiated as object but
|
225
|
+
primitive type.
|
226
|
+
footer:
|
227
|
+
Change-type: patch
|
228
|
+
change-type: patch
|
229
|
+
Signed-off-by: fisehara <harald@balena.io>
|
230
|
+
signed-off-by: fisehara <harald@balena.io>
|
231
|
+
author: fisehara
|
232
|
+
- subject: Drop `require-npm4-to-publish` devDependency
|
233
|
+
hash: 46a369117c9d1222089498a8794c32d14edef85b
|
234
|
+
body: >
|
235
|
+
As engine and npm is now required as part of
|
236
|
+
package.json we can drop this dependency
|
237
|
+
footer:
|
238
|
+
Change-type: patch
|
239
|
+
change-type: patch
|
240
|
+
Signed-off-by: fisehara <harald@balena.io>
|
241
|
+
signed-off-by: fisehara <harald@balena.io>
|
242
|
+
author: fisehara
|
243
|
+
- subject: Set minimum supported nodejs version to 16.13.0 and tsconfig to es2021
|
244
|
+
hash: 54920d701a7aa4890c27801fc5cc6b9d74ece21c
|
245
|
+
body: ""
|
246
|
+
footer:
|
247
|
+
Change-type: major
|
248
|
+
change-type: major
|
249
|
+
author: Pagan Gazzard
|
250
|
+
- subject: Switch `JSON` to use `JSON` db type instead of `TEXT`
|
251
|
+
hash: 0d3561364ad018f59466c0dae9b3adb4390d9496
|
252
|
+
body: ""
|
253
|
+
footer:
|
254
|
+
Change-type: major
|
255
|
+
change-type: major
|
256
|
+
author: Pagan Gazzard
|
257
|
+
- subject: Switch `Boolean` to use `BOOLEAN` db type instead of `INTEGER`
|
258
|
+
hash: 5af2bd476a9032ab5d60c163a3940e0dd8e81cc6
|
259
|
+
body: ""
|
260
|
+
footer:
|
261
|
+
Change-type: major
|
262
|
+
change-type: major
|
263
|
+
author: Pagan Gazzard
|
264
|
+
- subject: Assert that JSON input typeof is object
|
265
|
+
hash: 1819ee97811e20da93c6e0f227db6a62ada8c00e
|
266
|
+
body: >
|
267
|
+
Ensure that the input passed in for JSON types is either
|
268
|
+
an object or
|
269
|
+
|
270
|
+
an array (typeof returns 'object' for arrays as well). This change is
|
271
|
+
|
272
|
+
mainly to prevent primitives from being stored as JSON.
|
273
|
+
footer:
|
274
|
+
Change-type: major
|
275
|
+
change-type: major
|
276
|
+
Signed-off-by: Josh Bowling <josh@monarci.com>
|
277
|
+
signed-off-by: Josh Bowling <josh@monarci.com>
|
278
|
+
author: Josh Bowling
|
279
|
+
version: sbvr-types-4.0.0
|
280
|
+
title: ""
|
281
|
+
date: 2023-04-26T15:00:16.169Z
|
282
|
+
version: odata-to-abstract-sql-6.0.1
|
283
|
+
title: ""
|
284
|
+
date: 2023-04-27T08:45:33.841Z
|
285
|
+
- commits:
|
286
|
+
- subject: Set minimum supported nodejs version to 16.13.0 and tsconfig to es2021
|
287
|
+
hash: 7f6f98637339f43b34ae7faa8e868129efe6d754
|
288
|
+
body: ""
|
289
|
+
footer:
|
290
|
+
Change-type: major
|
291
|
+
change-type: major
|
292
|
+
author: Pagan Gazzard
|
293
|
+
nested: []
|
294
|
+
- subject: Switch `AggregateJSON` to use the newer `ReferencedField` format
|
295
|
+
hash: e8038b15c471d801b21f39cec2c95ff6689b0595
|
296
|
+
body: ""
|
297
|
+
footer:
|
298
|
+
Change-type: major
|
299
|
+
change-type: major
|
300
|
+
author: Pagan Gazzard
|
301
|
+
nested: []
|
302
|
+
version: odata-to-abstract-sql-6.0.0
|
303
|
+
title: ""
|
304
|
+
date: 2023-04-26T13:50:25.845Z
|
305
|
+
- commits:
|
306
|
+
- subject: Add test cases for Objects in JSON validate
|
307
|
+
hash: be8fc31c3754186dd4c43ca8d4c056b0def7ffbd
|
308
|
+
body: >
|
309
|
+
As balena-lint rejects `new Boolean()`, `new Number()` and `new
|
310
|
+
String()` constructor usage, test cases double check that they
|
311
|
+
are not instantiated as object but primitive type.
|
312
|
+
footer:
|
313
|
+
Change-type: patch
|
314
|
+
change-type: patch
|
315
|
+
Signed-off-by: fisehara <harald@balena.io>
|
316
|
+
signed-off-by: fisehara <harald@balena.io>
|
317
|
+
author: fisehara
|
318
|
+
- subject: Drop `require-npm4-to-publish` devDependency
|
319
|
+
hash: 46a369117c9d1222089498a8794c32d14edef85b
|
320
|
+
body: >
|
321
|
+
As engine and npm is now required as part of package.json we can
|
322
|
+
drop this dependency
|
323
|
+
footer:
|
324
|
+
Change-type: patch
|
325
|
+
change-type: patch
|
326
|
+
Signed-off-by: fisehara <harald@balena.io>
|
327
|
+
signed-off-by: fisehara <harald@balena.io>
|
328
|
+
author: fisehara
|
329
|
+
- subject: Set minimum supported nodejs version to 16.13.0 and tsconfig to es2021
|
330
|
+
hash: 54920d701a7aa4890c27801fc5cc6b9d74ece21c
|
331
|
+
body: ""
|
332
|
+
footer:
|
333
|
+
Change-type: major
|
334
|
+
change-type: major
|
335
|
+
author: Pagan Gazzard
|
336
|
+
- subject: Switch `JSON` to use `JSON` db type instead of `TEXT`
|
337
|
+
hash: 0d3561364ad018f59466c0dae9b3adb4390d9496
|
338
|
+
body: ""
|
339
|
+
footer:
|
340
|
+
Change-type: major
|
341
|
+
change-type: major
|
342
|
+
author: Pagan Gazzard
|
343
|
+
- subject: Switch `Boolean` to use `BOOLEAN` db type instead of `INTEGER`
|
344
|
+
hash: 5af2bd476a9032ab5d60c163a3940e0dd8e81cc6
|
345
|
+
body: ""
|
346
|
+
footer:
|
347
|
+
Change-type: major
|
348
|
+
change-type: major
|
349
|
+
author: Pagan Gazzard
|
350
|
+
- subject: Assert that JSON input typeof is object
|
351
|
+
hash: 1819ee97811e20da93c6e0f227db6a62ada8c00e
|
352
|
+
body: >
|
353
|
+
Ensure that the input passed in for JSON types is either an
|
354
|
+
object or
|
355
|
+
|
356
|
+
an array (typeof returns 'object' for arrays as well). This change is
|
357
|
+
|
358
|
+
mainly to prevent primitives from being stored as JSON.
|
359
|
+
footer:
|
360
|
+
Change-type: major
|
361
|
+
change-type: major
|
362
|
+
Signed-off-by: Josh Bowling <josh@monarci.com>
|
363
|
+
signed-off-by: Josh Bowling <josh@monarci.com>
|
364
|
+
author: Josh Bowling
|
365
|
+
version: sbvr-types-4.0.0
|
366
|
+
title: ""
|
367
|
+
date: 2023-04-26T15:00:16.169Z
|
11
368
|
version: 15.0.0
|
12
369
|
title: ""
|
13
|
-
date: 2023-04-
|
370
|
+
date: 2023-04-28T12:30:53.557Z
|
14
371
|
- commits:
|
15
372
|
- subject: Update async migration function typing to also accept `Promise<number>`
|
16
373
|
hash: dc2bd3ac16550009cf9732913ad0cfbb64ad92f2
|
package/CHANGELOG.md
CHANGED
@@ -5,9 +5,85 @@ automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
7
|
# v15.0.0
|
8
|
-
## (2023-04-
|
8
|
+
## (2023-04-28)
|
9
|
+
|
10
|
+
* Stop re-exporting `ODataRequest` as `HookRequest` [Pagan Gazzard]
|
11
|
+
* Don't add a returning clause to requests if affectedIds has been populated [Pagan Gazzard]
|
12
|
+
* Remove the deprecated `data` property from `PRERESPOND` hooks [Pagan Gazzard]
|
13
|
+
* Remove support for the deprecated db result form of async migrations [Pagan Gazzard]
|
14
|
+
* Update grunt [Harald Fischer]
|
15
|
+
* Do not convert `null` to the default value in `customApiKeyMiddleware` [Pagan Gazzard]
|
16
|
+
* Use `{ value: modelValue }` for se and odataMetadata model entries [Pagan Gazzard]
|
17
|
+
* Switch mysql `sql_mode` from `ANSI_QUOTES` to `ANSI` [Pagan Gazzard]
|
18
|
+
* Make `actor` a required property of the req.apiKey object [Pagan Gazzard]
|
19
|
+
* Change `resolveAuthHeader`/`resolveApiKey` to throw on invalid api keys [Pagan Gazzard]
|
20
|
+
* Do not bail in `resolveAuthHeader` if there is an existing api key [Pagan Gazzard]
|
21
|
+
* Do not bail in `resolveApiKey` if there is an existing api key [Pagan Gazzard]
|
22
|
+
* Treat ConceptType fields as expandable/foreign key fields as they are [Pagan Gazzard]
|
23
|
+
* Throw rather than warn on invalid value for `PINEJS_DEBUG` [Pagan Gazzard]
|
24
|
+
* Remove support for `DEBUG` env var in favor of only `PINEJS_DEBUG` [Pagan Gazzard]
|
25
|
+
* Set minimum supported nodejs version to 16.13.0 and tsconfig to es2021 [Pagan Gazzard]
|
26
|
+
* Reflect the usage of BOOLEAN/JSON database types [Pagan Gazzard]
|
27
|
+
|
28
|
+
<details>
|
29
|
+
<summary> Update dependencies [Pagan Gazzard] </summary>
|
9
30
|
|
10
|
-
|
31
|
+
> ## odata-parser-3.0.0
|
32
|
+
> ### (2023-04-26)
|
33
|
+
>
|
34
|
+
> * Use optional chaining operator [Pagan Gazzard]
|
35
|
+
> * Set minimum supported nodejs version to 16.13.0 [Pagan Gazzard]
|
36
|
+
>
|
37
|
+
> ## odata-to-abstract-sql-6.0.1
|
38
|
+
> ### (2023-04-27)
|
39
|
+
>
|
40
|
+
>
|
41
|
+
> <details>
|
42
|
+
> <summary> Update dependencies [Pagan Gazzard] </summary>
|
43
|
+
>
|
44
|
+
>> ### odata-parser-3.0.0
|
45
|
+
>> #### (2023-04-26)
|
46
|
+
>>
|
47
|
+
>> * Use optional chaining operator [Pagan Gazzard]
|
48
|
+
>> * Set minimum supported nodejs version to 16.13.0 [Pagan Gazzard]
|
49
|
+
>>
|
50
|
+
>> ### odata-parser-2.5.0
|
51
|
+
>> #### (2023-04-26)
|
52
|
+
>>
|
53
|
+
>> * Update to peggy 3 and make us of the repetition operator [Pagan Gazzard]
|
54
|
+
>>
|
55
|
+
>> ### sbvr-types-4.0.0
|
56
|
+
>> #### (2023-04-26)
|
57
|
+
>>
|
58
|
+
>> * Add test cases for Objects in JSON validate [fisehara]
|
59
|
+
>> * Drop `require-npm4-to-publish` devDependency [fisehara]
|
60
|
+
>> * Set minimum supported nodejs version to 16.13.0 and tsconfig to es2021 [Pagan Gazzard]
|
61
|
+
>> * Switch `JSON` to use `JSON` db type instead of `TEXT` [Pagan Gazzard]
|
62
|
+
>> * Switch `Boolean` to use `BOOLEAN` db type instead of `INTEGER` [Pagan Gazzard]
|
63
|
+
>> * Assert that JSON input typeof is object [Josh Bowling]
|
64
|
+
>>
|
65
|
+
>
|
66
|
+
> </details>
|
67
|
+
>
|
68
|
+
>
|
69
|
+
> ## odata-to-abstract-sql-6.0.0
|
70
|
+
> ### (2023-04-26)
|
71
|
+
>
|
72
|
+
> * Set minimum supported nodejs version to 16.13.0 and tsconfig to es2021 [Pagan Gazzard]
|
73
|
+
> * Switch `AggregateJSON` to use the newer `ReferencedField` format [Pagan Gazzard]
|
74
|
+
>
|
75
|
+
> ## sbvr-types-4.0.0
|
76
|
+
> ### (2023-04-26)
|
77
|
+
>
|
78
|
+
> * Add test cases for Objects in JSON validate [fisehara]
|
79
|
+
> * Drop `require-npm4-to-publish` devDependency [fisehara]
|
80
|
+
> * Set minimum supported nodejs version to 16.13.0 and tsconfig to es2021 [Pagan Gazzard]
|
81
|
+
> * Switch `JSON` to use `JSON` db type instead of `TEXT` [Pagan Gazzard]
|
82
|
+
> * Switch `Boolean` to use `BOOLEAN` db type instead of `INTEGER` [Pagan Gazzard]
|
83
|
+
> * Assert that JSON input typeof is object [Josh Bowling]
|
84
|
+
>
|
85
|
+
|
86
|
+
</details>
|
11
87
|
|
12
88
|
# v14.64.1
|
13
89
|
## (2023-04-27)
|
package/Dockerfile
CHANGED
package/build/browser.ts
CHANGED
@@ -18,7 +18,6 @@ config.plugins = config.plugins.concat(
|
|
18
18
|
new webpack.DefinePlugin({
|
19
19
|
'process.browser': true,
|
20
20
|
'process.env.CONFIG_LOADER_DISABLED': true,
|
21
|
-
'process.env.DEBUG': true,
|
22
21
|
'process.env.PINEJS_DEBUG': true,
|
23
22
|
'process.env.SBVR_SERVER_ENABLED': true,
|
24
23
|
}),
|
@@ -37,7 +37,6 @@ const getOrCreatePermission = async (authApiTx, permissionName) => {
|
|
37
37
|
const setup = (app) => {
|
38
38
|
const loadConfig = async (data) => {
|
39
39
|
await sbvrUtils.db.transaction(async (tx) => {
|
40
|
-
var _a;
|
41
40
|
const authApiTx = sbvrUtils.api.Auth.clone({
|
42
41
|
passthrough: {
|
43
42
|
tx,
|
@@ -52,7 +51,7 @@ const setup = (app) => {
|
|
52
51
|
continue;
|
53
52
|
}
|
54
53
|
for (const permissionName of user.permissions) {
|
55
|
-
|
54
|
+
permissionsCache[permissionName] ??= getOrCreatePermission(authApiTx, permissionName);
|
56
55
|
}
|
57
56
|
}
|
58
57
|
await Promise.all(users.map(async (user) => {
|
@@ -176,20 +175,18 @@ const setup = (app) => {
|
|
176
175
|
return path.join(root, s);
|
177
176
|
};
|
178
177
|
await Promise.all(configObj.models.map(async (model) => {
|
179
|
-
var _a;
|
180
178
|
if (model.modelFile != null) {
|
181
179
|
model.modelText = await fs.promises.readFile(resolvePath(model.modelFile), 'utf8');
|
182
180
|
}
|
183
181
|
if (typeof model.customServerCode === 'string') {
|
184
182
|
model.customServerCode = resolvePath(model.customServerCode);
|
185
183
|
}
|
186
|
-
|
184
|
+
model.migrations ??= {};
|
187
185
|
const { migrations } = model;
|
188
186
|
if (model.migrationsPath) {
|
189
187
|
const migrationsPath = resolvePath(model.migrationsPath);
|
190
188
|
const fileNames = await fs.promises.readdir(migrationsPath);
|
191
189
|
await Promise.all(fileNames.map(async (filename) => {
|
192
|
-
var _a;
|
193
190
|
const filePath = path.join(migrationsPath, filename);
|
194
191
|
const fileNameParts = filename.split('.', 3);
|
195
192
|
const fileExtension = path.extname(filename);
|
@@ -222,7 +219,7 @@ const setup = (app) => {
|
|
222
219
|
case '.ts':
|
223
220
|
case '.js':
|
224
221
|
const loadeMigration = nodeRequire(filePath);
|
225
|
-
const migration =
|
222
|
+
const migration = loadeMigration.default ?? loadeMigration;
|
226
223
|
if (!(0, utils_1.isAsyncMigration)(migration) &&
|
227
224
|
!(0, utils_1.isSyncMigration)(migration)) {
|
228
225
|
throw new Error(`loaded migraton file at ${filePath} is neither a synchron nor a asyncron migration definition`);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config-loader.js","sourceRoot":"","sources":["../../src/config-loader/config-loader.ts"],"names":[],"mappings":";;;AAaA,6CAO2B;AAE3B,yBAAyB;AACzB,4BAA4B;AAC5B,6BAA6B;AAE7B,oDAAoD;AAEpD,uDAAuD;AAwCvD,MAAM,WAAW,GAAG,KAAK,EACxB,SAAiC,EACjC,QAAgB,EAChB,YAAuB,EACvB,WAAuB,EACtB,EAAE;IACH,MAAM,MAAM,GAAG,CAAC,MAAM,SAAS,CAAC,GAAG,CAAC;QACnC,QAAQ;QACR,EAAE,EAAE,YAAY;QAChB,OAAO,EAAE;YACR,OAAO,EAAE,IAAI;SACb;KACD,CAAC,CAA+B,CAAC;IAClC,IAAI,MAAM,IAAI,IAAI,EAAE;QACnB,OAAO,MAAM,CAAC,EAAE,CAAC;KACjB;IACD,MAAM,EAAE,EAAE,EAAE,GAAG,CAAC,MAAM,SAAS,CAAC,IAAI,CAAC;QACpC,QAAQ;QACR,IAAI,EAAE,EAAE,GAAG,YAAY,EAAE,GAAG,WAAW,EAAE;QACzC,OAAO,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE;KAClC,CAAC,CAAmB,CAAC;IACtB,OAAO,EAAE,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,KAAK,EAClC,SAAiC,EACjC,cAAsB,EACrB,EAAE;IACH,IAAI;QACH,OAAO,MAAM,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;KAC5E;IAAC,OAAO,CAAM,EAAE;QAChB,CAAC,CAAC,OAAO,GAAG,wCAAwC,cAAc,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;QACpF,MAAM,CAAC,CAAC;KACR;AACF,CAAC,CAAC;AAGK,MAAM,KAAK,GAAG,CAAC,GAAwB,EAAE,EAAE;IACjD,MAAM,UAAU,GAAG,KAAK,EAAE,IAAY,EAAiB,EAAE;QACxD,MAAM,SAAS,CAAC,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE
|
1
|
+
{"version":3,"file":"config-loader.js","sourceRoot":"","sources":["../../src/config-loader/config-loader.ts"],"names":[],"mappings":";;;AAaA,6CAO2B;AAE3B,yBAAyB;AACzB,4BAA4B;AAC5B,6BAA6B;AAE7B,oDAAoD;AAEpD,uDAAuD;AAwCvD,MAAM,WAAW,GAAG,KAAK,EACxB,SAAiC,EACjC,QAAgB,EAChB,YAAuB,EACvB,WAAuB,EACtB,EAAE;IACH,MAAM,MAAM,GAAG,CAAC,MAAM,SAAS,CAAC,GAAG,CAAC;QACnC,QAAQ;QACR,EAAE,EAAE,YAAY;QAChB,OAAO,EAAE;YACR,OAAO,EAAE,IAAI;SACb;KACD,CAAC,CAA+B,CAAC;IAClC,IAAI,MAAM,IAAI,IAAI,EAAE;QACnB,OAAO,MAAM,CAAC,EAAE,CAAC;KACjB;IACD,MAAM,EAAE,EAAE,EAAE,GAAG,CAAC,MAAM,SAAS,CAAC,IAAI,CAAC;QACpC,QAAQ;QACR,IAAI,EAAE,EAAE,GAAG,YAAY,EAAE,GAAG,WAAW,EAAE;QACzC,OAAO,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE;KAClC,CAAC,CAAmB,CAAC;IACtB,OAAO,EAAE,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,KAAK,EAClC,SAAiC,EACjC,cAAsB,EACrB,EAAE;IACH,IAAI;QACH,OAAO,MAAM,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;KAC5E;IAAC,OAAO,CAAM,EAAE;QAChB,CAAC,CAAC,OAAO,GAAG,wCAAwC,cAAc,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;QACpF,MAAM,CAAC,CAAC;KACR;AACF,CAAC,CAAC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,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;iBAChE;YACF,CAAC,CAAC,CACF,CAAC;YACF,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC;SAC5B;QAAC,OAAO,GAAQ,EAAE;YAClB,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAC;YACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAChB;IACF,CAAC,CAAC;IAEF,OAAO;QACN,UAAU;QACV,qBAAqB;KACrB,CAAC;AACH,CAAC,CAAC;AA/SW,QAAA,KAAK,SA+ShB"}
|
package/out/config-loader/env.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.migrator = exports.booleanToEnabledString = exports.PINEJS_ADVISORY_LOCK = exports.db = exports.createCache = exports.cache = exports.DEBUG = void 0;
|
4
|
-
const {
|
4
|
+
const { PINEJS_DEBUG } = process.env;
|
5
5
|
if (![undefined, '', '0', '1'].includes(PINEJS_DEBUG)) {
|
6
|
-
|
6
|
+
throw new Error(`Invalid value for PINEJS_DEBUG '${PINEJS_DEBUG}'`);
|
7
7
|
}
|
8
|
-
exports.DEBUG = PINEJS_DEBUG === '1'
|
8
|
+
exports.DEBUG = PINEJS_DEBUG === '1';
|
9
9
|
exports.cache = {
|
10
10
|
permissionsLookup: {
|
11
11
|
max: 5000,
|
@@ -37,7 +37,7 @@ const createCache = (cacheName, fn, opts) => {
|
|
37
37
|
if (typeof cacheOpts === 'function') {
|
38
38
|
return cacheOpts(fn, opts);
|
39
39
|
}
|
40
|
-
if (
|
40
|
+
if (opts?.weak === true) {
|
41
41
|
return memoizeWeak(fn, {
|
42
42
|
...cacheOpts,
|
43
43
|
...opts,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/config-loader/env.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,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;IAiBpC,uBAAuB,EAAE,IAAA,qBAAO,EAAC,gCAAgC,EAAE,IAAI,CAAC;CACxE,CAAC"}
|
@@ -1,14 +1,2 @@
|
|
1
1
|
export function setup(app: import("express").Application, sbvrUtilsInstance: typeof import("../sbvr-api/sbvr-utils"), db: import("../database-layer/db").Database): import("../sbvr-api/common-types").Resolvable<void>;
|
2
|
-
export
|
3
|
-
const models: {
|
4
|
-
modelName: string;
|
5
|
-
modelText: string;
|
6
|
-
apiRoot: string;
|
7
|
-
customServerCode: {
|
8
|
-
setup: typeof setup;
|
9
|
-
};
|
10
|
-
migrations: {
|
11
|
-
'11.0.0-modified-at': string;
|
12
|
-
};
|
13
|
-
}[];
|
14
|
-
}
|
2
|
+
export let config: import('../config-loader/config-loader').Config;
|
@@ -47,6 +47,7 @@ const serverIsOnAir = async (_req, _res, next) => {
|
|
47
47
|
}
|
48
48
|
};
|
49
49
|
|
50
|
+
/** @type {import('../config-loader/config-loader').Config} */
|
50
51
|
export let config = {
|
51
52
|
models: [
|
52
53
|
{
|
@@ -59,6 +60,21 @@ export let config = {
|
|
59
60
|
ALTER TABLE "textarea"
|
60
61
|
ADD COLUMN IF NOT EXISTS "modified at" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL;\
|
61
62
|
`,
|
63
|
+
'15.0.0-data-types': async (tx, sbvrUtils) => {
|
64
|
+
switch (sbvrUtils.db.engine) {
|
65
|
+
case 'mysql':
|
66
|
+
await tx.executeSql(`\
|
67
|
+
ALTER TABLE "textarea"
|
68
|
+
MODIFY "is disabled" BOOLEAN NOT NULL;`);
|
69
|
+
break;
|
70
|
+
case 'postgres':
|
71
|
+
await tx.executeSql(`\
|
72
|
+
ALTER TABLE "textarea"
|
73
|
+
ALTER COLUMN "is disabled" SET DATA TYPE BOOLEAN USING b::BOOLEAN;`);
|
74
|
+
break;
|
75
|
+
// No need to migrate for websql
|
76
|
+
}
|
77
|
+
},
|
62
78
|
},
|
63
79
|
},
|
64
80
|
],
|
@@ -122,7 +138,7 @@ export async function setup(app, sbvrUtils, db) {
|
|
122
138
|
const instance = result[0];
|
123
139
|
await sbvrUtils.executeModel(tx, {
|
124
140
|
apiRoot: instance.is_of__vocabulary,
|
125
|
-
modelText: instance.model_value,
|
141
|
+
modelText: instance.model_value.value,
|
126
142
|
});
|
127
143
|
});
|
128
144
|
await isServerOnAir(true);
|