@vendure/harden-plugin 2.0.2 → 2.0.3
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/README.md
CHANGED
|
@@ -4,4 +4,4 @@ Hardens your Vendure GraphQL APIs against attacks.
|
|
|
4
4
|
|
|
5
5
|
`npm install @vendure/harden-plugin`
|
|
6
6
|
|
|
7
|
-
For documentation, see [
|
|
7
|
+
For documentation, see [docs.vendure.io/typescript-api/core-plugins/harden-plugin/](https://docs.vendure.io/typescript-api/core-plugins/harden-plugin/)
|
|
@@ -77,6 +77,10 @@ import { HardenPluginOptions } from './types';
|
|
|
77
77
|
* The complexity score is calculated by the [graphql-query-complexity library](https://www.npmjs.com/package/graphql-query-complexity),
|
|
78
78
|
* and by default uses the {@link defaultVendureComplexityEstimator}, which is tuned specifically to the Vendure Shop API.
|
|
79
79
|
*
|
|
80
|
+
* {{% alert "warning" %}}
|
|
81
|
+
* Note: By default, if the "take" argument is omitted from a list query (e.g. the `products` or `collections` query), a default factor of 1000 is applied.
|
|
82
|
+
* {{% /alert %}}
|
|
83
|
+
*
|
|
80
84
|
* The optimal max complexity score will vary depending on:
|
|
81
85
|
*
|
|
82
86
|
* - The requirements of your storefront and other clients using the Shop API
|
package/lib/src/harden.plugin.js
CHANGED
|
@@ -90,6 +90,10 @@ const query_complexity_plugin_1 = require("./middleware/query-complexity-plugin"
|
|
|
90
90
|
* The complexity score is calculated by the [graphql-query-complexity library](https://www.npmjs.com/package/graphql-query-complexity),
|
|
91
91
|
* and by default uses the {@link defaultVendureComplexityEstimator}, which is tuned specifically to the Vendure Shop API.
|
|
92
92
|
*
|
|
93
|
+
* {{% alert "warning" %}}
|
|
94
|
+
* Note: By default, if the "take" argument is omitted from a list query (e.g. the `products` or `collections` query), a default factor of 1000 is applied.
|
|
95
|
+
* {{% /alert %}}
|
|
96
|
+
*
|
|
93
97
|
* The optimal max complexity score will vary depending on:
|
|
94
98
|
*
|
|
95
99
|
* - The requirements of your storefront and other clients using the Shop API
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harden.plugin.js","sourceRoot":"","sources":["../../src/harden.plugin.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wCAAsD;AAEtD,2CAA+D;AAC/D,8FAAwF;AACxF,kFAA6E;AAG7E
|
|
1
|
+
{"version":3,"file":"harden.plugin.js","sourceRoot":"","sources":["../../src/harden.plugin.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wCAAsD;AAEtD,2CAA+D;AAC/D,8FAAwF;AACxF,kFAA6E;AAG7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyIG;AAwBI,IAAM,YAAY,oBAAlB,MAAM,YAAY;IAGrB,MAAM,CAAC,IAAI,CAAC,OAA4B;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,cAAY,CAAC;IACxB,CAAC;CACJ,CAAA;AAPY,YAAY;IAvBxB,IAAA,oBAAa,EAAC;QACX,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,iCAAqB;gBAC9B,UAAU,EAAE,GAAG,EAAE,CAAC,cAAY,CAAC,OAAO;aACzC;SACJ;QACD,aAAa,EAAE,MAAM,CAAC,EAAE;YACpB,IAAI,cAAY,CAAC,OAAO,CAAC,oBAAoB,KAAK,KAAK,EAAE;gBACrD,aAAM,CAAC,OAAO,CAAC,wCAAwC,EAAE,qBAAS,CAAC,CAAC;gBACpE,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,0DAA0B,EAAE,CAAC,CAAC;aAChF;YACD,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,+CAAqB,CAAC,cAAY,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5F,IAAI,cAAY,CAAC,OAAO,CAAC,OAAO,KAAK,KAAK,EAAE;gBACxC,MAAM,CAAC,UAAU,CAAC,aAAa,GAAG,KAAK,CAAC;gBACxC,MAAM,CAAC,UAAU,CAAC,YAAY,GAAG,KAAK,CAAC;gBACvC,MAAM,CAAC,UAAU,CAAC,aAAa,GAAG,KAAK,CAAC;aAC3C;YAED,OAAO,MAAM,CAAC;QAClB,CAAC;QACD,aAAa,EAAE,QAAQ;KAC1B,CAAC;GACW,YAAY,CAOxB;AAPY,oCAAY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/harden-plugin",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"graphql-query-complexity": "^0.12.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@vendure/common": "^2.0.
|
|
25
|
-
"@vendure/core": "^2.0.
|
|
24
|
+
"@vendure/common": "^2.0.3",
|
|
25
|
+
"@vendure/core": "^2.0.3"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "8aa6c352fffffba82b6116dbbc6d6090db92ac0f"
|
|
28
28
|
}
|