@declaro/data 2.0.0-beta.94 → 2.0.0-beta.96
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@declaro/data",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.96",
|
|
4
4
|
"description": "A data-mapper framework for managing application data across integrated systems.",
|
|
5
5
|
"main": "dist/node/index.cjs",
|
|
6
6
|
"module": "dist/node/index.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"@declaro/zod": "^2.0.0-beta.51"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@declaro/auth": "^2.0.0-beta.
|
|
26
|
-
"@declaro/core": "^2.0.0-beta.
|
|
27
|
-
"@declaro/zod": "^2.0.0-beta.
|
|
25
|
+
"@declaro/auth": "^2.0.0-beta.96",
|
|
26
|
+
"@declaro/core": "^2.0.0-beta.96",
|
|
27
|
+
"@declaro/zod": "^2.0.0-beta.96",
|
|
28
28
|
"crypto-browserify": "^3.12.1",
|
|
29
29
|
"typescript": "^5.8.3",
|
|
30
30
|
"uuid": "^11.1.0",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"require": "./dist/node/index.cjs",
|
|
44
44
|
"browser": "./dist/browser/index.js"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "8403f2a99358e7cc3e8b79f3be0972ee48178f5a"
|
|
47
47
|
}
|
|
@@ -23,18 +23,21 @@ describe('ModelController', () => {
|
|
|
23
23
|
getMockAuthSession({
|
|
24
24
|
claims: ['books::book.write:all'],
|
|
25
25
|
}),
|
|
26
|
+
null,
|
|
26
27
|
authService,
|
|
27
28
|
)
|
|
28
29
|
invalidAuthValidator = new AuthValidator(
|
|
29
30
|
getMockAuthSession({
|
|
30
31
|
claims: ['authors::author.write:all'],
|
|
31
32
|
}),
|
|
33
|
+
null,
|
|
32
34
|
authService,
|
|
33
35
|
)
|
|
34
36
|
readAuthValidator = new AuthValidator(
|
|
35
37
|
getMockAuthSession({
|
|
36
38
|
claims: ['books::book.read:all'],
|
|
37
39
|
}),
|
|
40
|
+
null,
|
|
38
41
|
authService,
|
|
39
42
|
)
|
|
40
43
|
service = new ModelService({
|
|
@@ -274,6 +277,7 @@ describe('ModelController', () => {
|
|
|
274
277
|
getMockAuthSession({
|
|
275
278
|
claims: ['books::book.create:all', 'books::book.update:all'],
|
|
276
279
|
}),
|
|
280
|
+
null,
|
|
277
281
|
authService,
|
|
278
282
|
)
|
|
279
283
|
const controller = new ModelController(service, createUpdateValidator)
|
|
@@ -289,6 +293,7 @@ describe('ModelController', () => {
|
|
|
289
293
|
getMockAuthSession({
|
|
290
294
|
claims: ['books::book.create:all', 'books::book.update:all'],
|
|
291
295
|
}),
|
|
296
|
+
null,
|
|
292
297
|
authService,
|
|
293
298
|
)
|
|
294
299
|
const controller = new ModelController(service, createUpdateValidator)
|
|
@@ -308,6 +313,7 @@ describe('ModelController', () => {
|
|
|
308
313
|
getMockAuthSession({
|
|
309
314
|
claims: ['books::book.create:all'],
|
|
310
315
|
}),
|
|
316
|
+
null,
|
|
311
317
|
authService,
|
|
312
318
|
)
|
|
313
319
|
const controller = new ModelController(service, createOnlyValidator)
|
|
@@ -322,6 +328,7 @@ describe('ModelController', () => {
|
|
|
322
328
|
getMockAuthSession({
|
|
323
329
|
claims: ['books::book.update:all'],
|
|
324
330
|
}),
|
|
331
|
+
null,
|
|
325
332
|
authService,
|
|
326
333
|
)
|
|
327
334
|
const controller = new ModelController(service, updateOnlyValidator)
|
|
@@ -336,6 +343,7 @@ describe('ModelController', () => {
|
|
|
336
343
|
getMockAuthSession({
|
|
337
344
|
claims: ['books::book.create:all'],
|
|
338
345
|
}),
|
|
346
|
+
null,
|
|
339
347
|
authService,
|
|
340
348
|
)
|
|
341
349
|
const controller = new ModelController(service, createOnlyValidator)
|
|
@@ -353,6 +361,7 @@ describe('ModelController', () => {
|
|
|
353
361
|
getMockAuthSession({
|
|
354
362
|
claims: ['books::book.update:all'],
|
|
355
363
|
}),
|
|
364
|
+
null,
|
|
356
365
|
authService,
|
|
357
366
|
)
|
|
358
367
|
const controller = new ModelController(service, updateOnlyValidator)
|
|
@@ -390,6 +399,7 @@ describe('ModelController', () => {
|
|
|
390
399
|
getMockAuthSession({
|
|
391
400
|
claims: ['books::book.create:all'],
|
|
392
401
|
}),
|
|
402
|
+
null,
|
|
393
403
|
authService,
|
|
394
404
|
)
|
|
395
405
|
const controller = new ModelController(service, createOnlyValidator)
|
|
@@ -405,6 +415,7 @@ describe('ModelController', () => {
|
|
|
405
415
|
getMockAuthSession({
|
|
406
416
|
claims: ['books::book.update:all'],
|
|
407
417
|
}),
|
|
418
|
+
null,
|
|
408
419
|
authService,
|
|
409
420
|
)
|
|
410
421
|
const controller = new ModelController(service, updateOnlyValidator)
|
|
@@ -423,6 +434,7 @@ describe('ModelController', () => {
|
|
|
423
434
|
getMockAuthSession({
|
|
424
435
|
claims: ['books::book.remove:all'],
|
|
425
436
|
}),
|
|
437
|
+
null,
|
|
426
438
|
authService,
|
|
427
439
|
)
|
|
428
440
|
const controller = new ModelController(service, removeOnlyValidator)
|
|
@@ -440,6 +452,7 @@ describe('ModelController', () => {
|
|
|
440
452
|
getMockAuthSession({
|
|
441
453
|
claims: ['books::book.restore:all'],
|
|
442
454
|
}),
|
|
455
|
+
null,
|
|
443
456
|
authService,
|
|
444
457
|
)
|
|
445
458
|
const controller = new ModelController(service, restoreOnlyValidator)
|
|
@@ -458,6 +471,7 @@ describe('ModelController', () => {
|
|
|
458
471
|
getMockAuthSession({
|
|
459
472
|
claims: ['users::user.write:all'], // Wrong namespace
|
|
460
473
|
}),
|
|
474
|
+
null,
|
|
461
475
|
authService,
|
|
462
476
|
)
|
|
463
477
|
const controller = new ModelController(service, wrongNamespaceValidator)
|
|
@@ -474,6 +488,7 @@ describe('ModelController', () => {
|
|
|
474
488
|
getMockAuthSession({
|
|
475
489
|
claims: ['books::author.write:all'], // Wrong resource
|
|
476
490
|
}),
|
|
491
|
+
null,
|
|
477
492
|
authService,
|
|
478
493
|
)
|
|
479
494
|
const controller = new ModelController(service, wrongResourceValidator)
|
|
@@ -22,12 +22,14 @@ describe('ReadOnlyModelController', () => {
|
|
|
22
22
|
getMockAuthSession({
|
|
23
23
|
claims: ['books::book.read:all'],
|
|
24
24
|
}),
|
|
25
|
+
null,
|
|
25
26
|
authService,
|
|
26
27
|
)
|
|
27
28
|
invalidAuthValidator = new AuthValidator(
|
|
28
29
|
getMockAuthSession({
|
|
29
30
|
claims: ['authors::author.read:all'],
|
|
30
31
|
}),
|
|
32
|
+
null,
|
|
31
33
|
authService,
|
|
32
34
|
)
|
|
33
35
|
service = new ReadOnlyModelService({
|
|
@@ -203,6 +205,7 @@ describe('ReadOnlyModelController', () => {
|
|
|
203
205
|
getMockAuthSession({
|
|
204
206
|
claims: ['books::book.load:all'],
|
|
205
207
|
}),
|
|
208
|
+
null,
|
|
206
209
|
authService,
|
|
207
210
|
)
|
|
208
211
|
const controller = new ReadOnlyModelController(service, loadOnlyValidator)
|
|
@@ -220,6 +223,7 @@ describe('ReadOnlyModelController', () => {
|
|
|
220
223
|
getMockAuthSession({
|
|
221
224
|
claims: ['books::book.loadMany:all'],
|
|
222
225
|
}),
|
|
226
|
+
null,
|
|
223
227
|
authService,
|
|
224
228
|
)
|
|
225
229
|
const controller = new ReadOnlyModelController(service, loadManyOnlyValidator)
|
|
@@ -239,6 +243,7 @@ describe('ReadOnlyModelController', () => {
|
|
|
239
243
|
getMockAuthSession({
|
|
240
244
|
claims: ['books::book.search:all'],
|
|
241
245
|
}),
|
|
246
|
+
null,
|
|
242
247
|
authService,
|
|
243
248
|
)
|
|
244
249
|
const controller = new ReadOnlyModelController(service, searchOnlyValidator)
|
|
@@ -259,6 +264,7 @@ describe('ReadOnlyModelController', () => {
|
|
|
259
264
|
getMockAuthSession({
|
|
260
265
|
claims: ['books::book.count:all'],
|
|
261
266
|
}),
|
|
267
|
+
null,
|
|
262
268
|
authService,
|
|
263
269
|
)
|
|
264
270
|
const controller = new ReadOnlyModelController(service, countOnlyValidator)
|
|
@@ -278,6 +284,7 @@ describe('ReadOnlyModelController', () => {
|
|
|
278
284
|
getMockAuthSession({
|
|
279
285
|
claims: ['users::user.read:all'], // Wrong namespace
|
|
280
286
|
}),
|
|
287
|
+
null,
|
|
281
288
|
authService,
|
|
282
289
|
)
|
|
283
290
|
const controller = new ReadOnlyModelController(service, wrongNamespaceValidator)
|
|
@@ -293,6 +300,7 @@ describe('ReadOnlyModelController', () => {
|
|
|
293
300
|
getMockAuthSession({
|
|
294
301
|
claims: ['books::author.read:all'], // Wrong resource
|
|
295
302
|
}),
|
|
303
|
+
null,
|
|
296
304
|
authService,
|
|
297
305
|
)
|
|
298
306
|
const controller = new ReadOnlyModelController(service, wrongResourceValidator)
|