@webda/core 2.2.0 → 2.3.0
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/lib/application.d.ts +51 -9
- package/lib/application.js +18 -1
- package/lib/application.js.map +1 -1
- package/lib/application.spec.js +4 -2
- package/lib/application.spec.js.map +1 -1
- package/lib/core.d.ts +31 -5
- package/lib/core.js +62 -2
- package/lib/core.js.map +1 -1
- package/lib/core.spec.js +49 -1
- package/lib/core.spec.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/models/aclmodel.d.ts +1 -1
- package/lib/models/aclmodel.spec.js +10 -10
- package/lib/models/aclmodel.spec.js.map +1 -1
- package/lib/models/coremodel.d.ts +79 -24
- package/lib/models/coremodel.js +96 -17
- package/lib/models/coremodel.js.map +1 -1
- package/lib/models/coremodel.spec.js +32 -2
- package/lib/models/coremodel.spec.js.map +1 -1
- package/lib/models/user.d.ts +3 -3
- package/lib/models/user.js.map +1 -1
- package/lib/models/user.spec.js +1 -0
- package/lib/models/user.spec.js.map +1 -1
- package/lib/router.d.ts +1 -1
- package/lib/services/authentication.d.ts +1 -1
- package/lib/services/binary.d.ts +2 -2
- package/lib/services/cloudbinary.spec.js +1 -0
- package/lib/services/cloudbinary.spec.js.map +1 -1
- package/lib/services/configuration.d.ts +1 -1
- package/lib/services/oauth.d.ts +1 -1
- package/lib/services/service.d.ts +3 -3
- package/lib/stores/aliasstore.d.ts +107 -0
- package/lib/stores/aliasstore.js +152 -0
- package/lib/stores/aliasstore.js.map +1 -0
- package/lib/stores/aliasstore.spec.d.ts +11 -0
- package/lib/stores/aliasstore.spec.js +87 -0
- package/lib/stores/aliasstore.spec.js.map +1 -0
- package/lib/stores/file.spec.js +11 -113
- package/lib/stores/file.spec.js.map +1 -1
- package/lib/stores/mapper.d.ts +1 -1
- package/lib/stores/mapper.js +1 -1
- package/lib/stores/mapper.js.map +1 -1
- package/lib/stores/memory.spec.js +2 -0
- package/lib/stores/memory.spec.js.map +1 -1
- package/lib/stores/store.d.ts +58 -5
- package/lib/stores/store.js +85 -3
- package/lib/stores/store.js.map +1 -1
- package/lib/stores/store.spec.d.ts +2 -0
- package/lib/stores/store.spec.js +117 -0
- package/lib/stores/store.spec.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLLexer.js +5 -5
- package/lib/stores/webdaql/WebdaQLLexer.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserLexer.js +5 -5
- package/lib/stores/webdaql/WebdaQLParserLexer.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserParser.js +4 -4
- package/lib/stores/webdaql/WebdaQLParserParser.js.map +1 -1
- package/lib/stores/webdaql/query.d.ts +16 -1
- package/lib/stores/webdaql/query.js +50 -1
- package/lib/stores/webdaql/query.js.map +1 -1
- package/lib/stores/webdaql/query.spec.js +20 -0
- package/lib/stores/webdaql/query.spec.js.map +1 -1
- package/lib/utils/context.d.ts +2 -2
- package/lib/utils/context.js +22 -22
- package/lib/utils/context.js.map +1 -1
- package/lib/utils/cookie.js +1 -1
- package/lib/utils/cookie.js.map +1 -1
- package/lib/utils/cookie.spec.js +5 -189
- package/lib/utils/cookie.spec.js.map +1 -1
- package/lib/utils/httpcontext.d.ts +2 -2
- package/lib/utils/throttler.d.ts +82 -0
- package/lib/utils/throttler.js +136 -0
- package/lib/utils/throttler.js.map +1 -0
- package/lib/utils/throttler.spec.d.ts +1 -0
- package/lib/utils/throttler.spec.js +47 -0
- package/lib/utils/throttler.spec.js.map +1 -0
- package/lib/utils/waiter.d.ts +2 -2
- package/package.json +3 -3
- package/webda.module.json +56 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throttler.spec.js","sourceRoot":"","sources":["../../src/utils/throttler.spec.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,MAAM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ADL,IAAI;yCA6BJ;AA9BG,aAAa;IADlB,KAAK;GACA,aAAa,CA+BlB"}
|
package/lib/utils/waiter.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Logger } from "../index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Function that define the amount of time between calls
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type WaitDelayer = (retries: number) => number;
|
|
6
6
|
/**
|
|
7
7
|
* Return a delayer that always wait for the same amount of time
|
|
8
8
|
* @param pause amount of time to wait
|
|
@@ -18,7 +18,7 @@ export declare function WaitExponentialDelay(pause: number): WaitDelayer;
|
|
|
18
18
|
/**
|
|
19
19
|
* Delayer factory definition
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export type WaitDelayerFactory = (interval: number) => WaitDelayer;
|
|
22
22
|
/**
|
|
23
23
|
* WaitDelayer definition
|
|
24
24
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webda/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Expose API with Lambda",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"global": "^4.4.0",
|
|
39
39
|
"jsonc-parser": "^3.0.0",
|
|
40
40
|
"jsonpath": "^1.1.1",
|
|
41
|
-
"jsonwebtoken": "^
|
|
41
|
+
"jsonwebtoken": "^9.0.0",
|
|
42
42
|
"merge": "^2.1.1",
|
|
43
43
|
"mime-types": "^2.1.31",
|
|
44
44
|
"mustache": "^4.2.0",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"engines": {
|
|
104
104
|
"node": ">=14.6.0"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "fcdb5181ae9353dd8618017fae07ca75203bb1ad"
|
|
107
107
|
}
|
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"
|