@webda/core 2.2.0 → 2.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 (82) hide show
  1. package/lib/application.d.ts +51 -9
  2. package/lib/application.js +18 -1
  3. package/lib/application.js.map +1 -1
  4. package/lib/application.spec.js +4 -2
  5. package/lib/application.spec.js.map +1 -1
  6. package/lib/core.d.ts +31 -5
  7. package/lib/core.js +62 -2
  8. package/lib/core.js.map +1 -1
  9. package/lib/core.spec.js +49 -1
  10. package/lib/core.spec.js.map +1 -1
  11. package/lib/index.d.ts +2 -0
  12. package/lib/index.js +2 -0
  13. package/lib/index.js.map +1 -1
  14. package/lib/models/aclmodel.d.ts +1 -1
  15. package/lib/models/aclmodel.spec.js +10 -10
  16. package/lib/models/aclmodel.spec.js.map +1 -1
  17. package/lib/models/coremodel.d.ts +103 -25
  18. package/lib/models/coremodel.js +162 -18
  19. package/lib/models/coremodel.js.map +1 -1
  20. package/lib/models/coremodel.spec.js +89 -2
  21. package/lib/models/coremodel.spec.js.map +1 -1
  22. package/lib/models/user.d.ts +3 -3
  23. package/lib/models/user.js.map +1 -1
  24. package/lib/models/user.spec.js +1 -0
  25. package/lib/models/user.spec.js.map +1 -1
  26. package/lib/router.d.ts +1 -1
  27. package/lib/services/authentication.d.ts +1 -1
  28. package/lib/services/binary.d.ts +2 -2
  29. package/lib/services/cloudbinary.spec.js +1 -0
  30. package/lib/services/cloudbinary.spec.js.map +1 -1
  31. package/lib/services/configuration.d.ts +1 -1
  32. package/lib/services/oauth.d.ts +1 -1
  33. package/lib/services/service.d.ts +3 -3
  34. package/lib/stores/aliasstore.d.ts +108 -0
  35. package/lib/stores/aliasstore.js +153 -0
  36. package/lib/stores/aliasstore.js.map +1 -0
  37. package/lib/stores/aliasstore.spec.d.ts +11 -0
  38. package/lib/stores/aliasstore.spec.js +87 -0
  39. package/lib/stores/aliasstore.spec.js.map +1 -0
  40. package/lib/stores/file.spec.js +20 -113
  41. package/lib/stores/file.spec.js.map +1 -1
  42. package/lib/stores/mapper.d.ts +1 -1
  43. package/lib/stores/mapper.js +1 -1
  44. package/lib/stores/mapper.js.map +1 -1
  45. package/lib/stores/memory.spec.js +4 -2
  46. package/lib/stores/memory.spec.js.map +1 -1
  47. package/lib/stores/store.d.ts +58 -5
  48. package/lib/stores/store.js +104 -9
  49. package/lib/stores/store.js.map +1 -1
  50. package/lib/stores/store.spec.d.ts +2 -0
  51. package/lib/stores/store.spec.js +125 -0
  52. package/lib/stores/store.spec.js.map +1 -1
  53. package/lib/stores/webdaql/WebdaQLLexer.js +5 -5
  54. package/lib/stores/webdaql/WebdaQLLexer.js.map +1 -1
  55. package/lib/stores/webdaql/WebdaQLParserLexer.js +5 -5
  56. package/lib/stores/webdaql/WebdaQLParserLexer.js.map +1 -1
  57. package/lib/stores/webdaql/WebdaQLParserParser.js +4 -4
  58. package/lib/stores/webdaql/WebdaQLParserParser.js.map +1 -1
  59. package/lib/stores/webdaql/query.d.ts +16 -1
  60. package/lib/stores/webdaql/query.js +50 -1
  61. package/lib/stores/webdaql/query.js.map +1 -1
  62. package/lib/stores/webdaql/query.spec.js +20 -0
  63. package/lib/stores/webdaql/query.spec.js.map +1 -1
  64. package/lib/utils/context.d.ts +2 -2
  65. package/lib/utils/context.js +22 -22
  66. package/lib/utils/context.js.map +1 -1
  67. package/lib/utils/cookie.js +1 -1
  68. package/lib/utils/cookie.js.map +1 -1
  69. package/lib/utils/cookie.spec.js +5 -189
  70. package/lib/utils/cookie.spec.js.map +1 -1
  71. package/lib/utils/httpcontext.d.ts +2 -2
  72. package/lib/utils/serializers.spec.js +8 -0
  73. package/lib/utils/serializers.spec.js.map +1 -1
  74. package/lib/utils/throttler.d.ts +82 -0
  75. package/lib/utils/throttler.js +136 -0
  76. package/lib/utils/throttler.js.map +1 -0
  77. package/lib/utils/throttler.spec.d.ts +1 -0
  78. package/lib/utils/throttler.spec.js +47 -0
  79. package/lib/utils/throttler.spec.js.map +1 -0
  80. package/lib/utils/waiter.d.ts +2 -2
  81. package/package.json +3 -3
  82. package/webda.module.json +56 -2
package/webda.module.json CHANGED
@@ -1617,6 +1617,13 @@
1617
1617
  "description": "Webda model to use within the Store",
1618
1618
  "default": "Webda/CoreModel"
1619
1619
  },
1620
+ "models": {
1621
+ "type": "array",
1622
+ "items": {
1623
+ "type": "string"
1624
+ },
1625
+ "description": "Different models managed by this store"
1626
+ },
1620
1627
  "asyncDelete": {
1621
1628
  "type": "boolean",
1622
1629
  "description": "async delete"
@@ -1627,7 +1634,7 @@
1627
1634
  },
1628
1635
  "strict": {
1629
1636
  "type": "boolean",
1630
- "description": "Allow to load object that does not have the type data",
1637
+ "description": "Allow to load object that does not have the type data\n\nIf set to true, then the Store will only managed the defined _model and no model extending this one",
1631
1638
  "default": false
1632
1639
  },
1633
1640
  "defaultModel": {
@@ -1645,6 +1652,26 @@
1645
1652
  "description": "Slow query threshold",
1646
1653
  "default": 30000
1647
1654
  },
1655
+ "parent": {
1656
+ "type": "object",
1657
+ "properties": {
1658
+ "name": {
1659
+ "type": "string"
1660
+ },
1661
+ "condition": {
1662
+ "type": "string"
1663
+ }
1664
+ },
1665
+ "required": [
1666
+ "name",
1667
+ "condition"
1668
+ ],
1669
+ "description": "Parent of the store\n\nIf parent is specified the url route is relative to it"
1670
+ },
1671
+ "graphql": {
1672
+ "type": "boolean",
1673
+ "description": "For future use in our GraphQL api\n\nExpose this store in the graphql"
1674
+ },
1648
1675
  "persistence": {
1649
1676
  "type": "object",
1650
1677
  "properties": {
@@ -1749,6 +1776,13 @@
1749
1776
  "description": "Webda model to use within the Store",
1750
1777
  "default": "Webda/CoreModel"
1751
1778
  },
1779
+ "models": {
1780
+ "type": "array",
1781
+ "items": {
1782
+ "type": "string"
1783
+ },
1784
+ "description": "Different models managed by this store"
1785
+ },
1752
1786
  "asyncDelete": {
1753
1787
  "type": "boolean",
1754
1788
  "description": "async delete"
@@ -1759,7 +1793,7 @@
1759
1793
  },
1760
1794
  "strict": {
1761
1795
  "type": "boolean",
1762
- "description": "Allow to load object that does not have the type data",
1796
+ "description": "Allow to load object that does not have the type data\n\nIf set to true, then the Store will only managed the defined _model and no model extending this one",
1763
1797
  "default": false
1764
1798
  },
1765
1799
  "defaultModel": {
@@ -1777,6 +1811,26 @@
1777
1811
  "description": "Slow query threshold",
1778
1812
  "default": 30000
1779
1813
  },
1814
+ "parent": {
1815
+ "type": "object",
1816
+ "properties": {
1817
+ "name": {
1818
+ "type": "string"
1819
+ },
1820
+ "condition": {
1821
+ "type": "string"
1822
+ }
1823
+ },
1824
+ "required": [
1825
+ "name",
1826
+ "condition"
1827
+ ],
1828
+ "description": "Parent of the store\n\nIf parent is specified the url route is relative to it"
1829
+ },
1830
+ "graphql": {
1831
+ "type": "boolean",
1832
+ "description": "For future use in our GraphQL api\n\nExpose this store in the graphql"
1833
+ },
1780
1834
  "folder": {
1781
1835
  "type": "string",
1782
1836
  "description": "Local path where to store all `json` files"