@webda/core 4.0.0-beta.8 → 4.0.0-beta.9

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 (64) hide show
  1. package/lib/application/application.d.ts +1 -0
  2. package/lib/application/application.d.ts.map +1 -1
  3. package/lib/application/application.js +9 -3
  4. package/lib/application/application.js.map +1 -1
  5. package/lib/application/model-types.d.ts +63 -0
  6. package/lib/application/model-types.d.ts.map +1 -0
  7. package/lib/application/model-types.js +59 -0
  8. package/lib/application/model-types.js.map +1 -0
  9. package/lib/bin/cli.d.ts +18 -0
  10. package/lib/bin/cli.d.ts.map +1 -1
  11. package/lib/bin/cli.js +38 -3
  12. package/lib/bin/cli.js.map +1 -1
  13. package/lib/core/operations.d.ts +17 -0
  14. package/lib/core/operations.d.ts.map +1 -1
  15. package/lib/core/operations.js +1 -1
  16. package/lib/core/operations.js.map +1 -1
  17. package/lib/index.d.ts +5 -2
  18. package/lib/index.d.ts.map +1 -1
  19. package/lib/index.js +4 -1
  20. package/lib/index.js.map +1 -1
  21. package/lib/models/decorator.d.ts +21 -0
  22. package/lib/models/decorator.d.ts.map +1 -1
  23. package/lib/models/decorator.js +18 -0
  24. package/lib/models/decorator.js.map +1 -1
  25. package/lib/rest/restoperationstransport.service.d.ts +6 -0
  26. package/lib/rest/restoperationstransport.service.d.ts.map +1 -1
  27. package/lib/rest/restoperationstransport.service.js +19 -1
  28. package/lib/rest/restoperationstransport.service.js.map +1 -1
  29. package/lib/services/service.d.ts.map +1 -1
  30. package/lib/services/service.js +4 -1
  31. package/lib/services/service.js.map +1 -1
  32. package/lib/services/servicecommands.d.ts.map +1 -1
  33. package/lib/services/servicecommands.js +14 -1
  34. package/lib/services/servicecommands.js.map +1 -1
  35. package/lib/stores/capability.d.ts +16 -0
  36. package/lib/stores/capability.d.ts.map +1 -0
  37. package/lib/stores/capability.js +5 -0
  38. package/lib/stores/capability.js.map +1 -0
  39. package/lib/stores/memory.service.d.ts +30 -1
  40. package/lib/stores/memory.service.d.ts.map +1 -1
  41. package/lib/stores/memory.service.js +47 -1
  42. package/lib/stores/memory.service.js.map +1 -1
  43. package/lib/stores/migration.d.ts +306 -0
  44. package/lib/stores/migration.d.ts.map +1 -0
  45. package/lib/stores/migration.js +280 -0
  46. package/lib/stores/migration.js.map +1 -0
  47. package/lib/stores/store.d.ts +151 -17
  48. package/lib/stores/store.d.ts.map +1 -1
  49. package/lib/stores/store.js +421 -21
  50. package/lib/stores/store.js.map +1 -1
  51. package/lib/test/index.d.ts +2 -0
  52. package/lib/test/index.d.ts.map +1 -1
  53. package/lib/test/index.js +3 -0
  54. package/lib/test/index.js.map +1 -1
  55. package/lib/test/legacy-types.d.ts +146 -0
  56. package/lib/test/legacy-types.d.ts.map +1 -0
  57. package/lib/test/legacy-types.fixture.model.d.ts +38 -0
  58. package/lib/test/legacy-types.fixture.model.d.ts.map +1 -0
  59. package/lib/test/legacy-types.fixture.model.js +38 -0
  60. package/lib/test/legacy-types.fixture.model.js.map +1 -0
  61. package/lib/test/legacy-types.js +481 -0
  62. package/lib/test/legacy-types.js.map +1 -0
  63. package/package.json +8 -8
  64. package/webda.module.json +48 -22
package/webda.module.json CHANGED
@@ -1283,13 +1283,6 @@
1283
1283
  "$schema": "http://json-schema.org/draft-07/schema#",
1284
1284
  "additionalProperties": false,
1285
1285
  "definitions": {
1286
- "modelAliases": {
1287
- "additionalProperties": {
1288
- "type": "string"
1289
- },
1290
- "description": "Model Aliases to allow easier rename of Model",
1291
- "type": "object"
1292
- },
1293
1286
  "persistence": {
1294
1287
  "additionalProperties": false,
1295
1288
  "description": "Persist the data in a file",
@@ -1323,6 +1316,22 @@
1323
1316
  "path"
1324
1317
  ],
1325
1318
  "type": "object"
1319
+ },
1320
+ "typeCheck": {
1321
+ "additionalProperties": false,
1322
+ "description": "Startup check of the stored types: one WARN listing the legacy, untyped and unknown types found",
1323
+ "properties": {
1324
+ "enabled": {
1325
+ "default": true,
1326
+ "type": "boolean"
1327
+ },
1328
+ "maxRows": {
1329
+ "default": 10000,
1330
+ "description": "Rows scanned at most by stores without a native count; beyond, the counts are \"at least\"",
1331
+ "type": "number"
1332
+ }
1333
+ },
1334
+ "type": "object"
1326
1335
  }
1327
1336
  },
1328
1337
  "description": "Memory store",
@@ -1337,26 +1346,12 @@
1337
1346
  ],
1338
1347
  "type": "string"
1339
1348
  },
1340
- "defaultModel": {
1341
- "default": true,
1342
- "description": "When __type model not found, use the model\nIf strict is setup this parameter is not used",
1343
- "type": "boolean"
1344
- },
1345
- "forceModel": {
1346
- "default": false,
1347
- "description": "If set, Store will ignore the __type",
1348
- "type": "boolean"
1349
- },
1350
1349
  "maxGroups": {
1351
1350
  "default": 10000,
1352
1351
  "description": "Maximum number of groups an aggregation may produce without LIMIT (or in memory)",
1353
1352
  "minimum": 1,
1354
1353
  "type": "number"
1355
1354
  },
1356
- "modelAliases": {
1357
- "$ref": "#/definitions/modelAliases",
1358
- "description": "Model Aliases to allow easier rename of Model"
1359
- },
1360
1355
  "models": {
1361
1356
  "default": [
1362
1357
  "Webda/RegistryEntry"
@@ -1390,6 +1385,10 @@
1390
1385
  "description": "Type of the service",
1391
1386
  "type": "string"
1392
1387
  },
1388
+ "typeCheck": {
1389
+ "$ref": "#/definitions/typeCheck",
1390
+ "description": "Startup check of the stored types: one WARN listing the legacy, untyped and unknown types found"
1391
+ },
1393
1392
  "openapi": {
1394
1393
  "type": "object",
1395
1394
  "additionalProperties": true
@@ -1401,7 +1400,34 @@
1401
1400
  "type": "object",
1402
1401
  "title": "MemoryStore"
1403
1402
  },
1404
- "Configuration": "lib/stores/memory.service:MemoryStoreParameters"
1403
+ "Configuration": "lib/stores/memory.service:MemoryStoreParameters",
1404
+ "capabilities": [
1405
+ "store"
1406
+ ],
1407
+ "commands": {
1408
+ "migrate": {
1409
+ "description": "Rewrite the Webda 3 types of the stores to their Webda 4 identifiers",
1410
+ "method": "migrate",
1411
+ "args": {
1412
+ "dryRun": {
1413
+ "type": "boolean",
1414
+ "default": false,
1415
+ "description": "Only count the rows to migrate, write nothing"
1416
+ },
1417
+ "batch": {
1418
+ "type": "number",
1419
+ "default": 500,
1420
+ "description": "Rows per page"
1421
+ },
1422
+ "allowUnknown": {
1423
+ "type": "boolean",
1424
+ "default": false,
1425
+ "description": "Exit with 0 even when rows keep an unknown or ambiguous type"
1426
+ }
1427
+ },
1428
+ "phase": "initialized"
1429
+ }
1430
+ }
1405
1431
  },
1406
1432
  "Webda/MultiNotificationService": {
1407
1433
  "Import": "lib/services/notificationservice.service:default",