@vendure/harden-plugin 1.9.5 → 2.0.0-beta.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.
package/lib/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,8CAA4B;AAC5B,2EAAyD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,8CAA4B;AAC5B,2EAAyD"}
@@ -82,7 +82,8 @@ import { HardenPluginOptions } from './types';
82
82
  * - The requirements of your storefront and other clients using the Shop API
83
83
  * - The resources available to your server
84
84
  *
85
- * You should aim to set the maximum as low as possible while still being able to service all the requests required. This will take some manual tuning.
85
+ * You should aim to set the maximum as low as possible while still being able to service all the requests required.
86
+ * This will take some manual tuning.
86
87
  * While tuning the max, you can turn on the `logComplexityScore` to get a detailed breakdown of the complexity of each query, as well as how
87
88
  * that total score is derived from its child fields:
88
89
  *
@@ -95,7 +95,8 @@ const query_complexity_plugin_1 = require("./middleware/query-complexity-plugin"
95
95
  * - The requirements of your storefront and other clients using the Shop API
96
96
  * - The resources available to your server
97
97
  *
98
- * You should aim to set the maximum as low as possible while still being able to service all the requests required. This will take some manual tuning.
98
+ * You should aim to set the maximum as low as possible while still being able to service all the requests required.
99
+ * This will take some manual tuning.
99
100
  * While tuning the max, you can turn on the `logComplexityScore` to get a detailed breakdown of the complexity of each query, as well as how
100
101
  * that total score is derived from its child fields:
101
102
  *
@@ -152,7 +153,7 @@ let HardenPlugin = HardenPlugin_1 = class HardenPlugin {
152
153
  }
153
154
  };
154
155
  HardenPlugin = HardenPlugin_1 = __decorate([
155
- core_1.VendurePlugin({
156
+ (0, core_1.VendurePlugin)({
156
157
  providers: [
157
158
  {
158
159
  provide: constants_1.HARDEN_PLUGIN_OPTIONS,
@@ -161,7 +162,7 @@ HardenPlugin = HardenPlugin_1 = __decorate([
161
162
  ],
162
163
  configuration: config => {
163
164
  if (HardenPlugin_1.options.hideFieldSuggestions !== false) {
164
- core_1.Logger.verbose(`Configuring HideValidationErrorsPlugin`, constants_1.loggerCtx);
165
+ core_1.Logger.verbose('Configuring HideValidationErrorsPlugin', constants_1.loggerCtx);
165
166
  config.apiOptions.apolloServerPlugins.push(new hide_validation_errors_plugin_1.HideValidationErrorsPlugin());
166
167
  }
167
168
  config.apiOptions.apolloServerPlugins.push(new query_complexity_plugin_1.QueryComplexityPlugin(HardenPlugin_1.options));
@@ -172,6 +173,7 @@ HardenPlugin = HardenPlugin_1 = __decorate([
172
173
  }
173
174
  return config;
174
175
  },
176
+ compatibility: '^2.0.0-beta.0',
175
177
  })
176
178
  ], HardenPlugin);
177
179
  exports.HardenPlugin = HardenPlugin;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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-plugin
5
5
  * Based on ideas discussed in https://github.com/apollographql/apollo-server/issues/3919
6
6
  */
7
7
  export declare class HideValidationErrorsPlugin implements ApolloServerPlugin {
8
- requestDidStart(): GraphQLRequestListener;
8
+ requestDidStart(): Promise<GraphQLRequestListener>;
9
9
  }
@@ -8,7 +8,7 @@ const apollo_server_core_1 = require("apollo-server-core");
8
8
  * Based on ideas discussed in https://github.com/apollographql/apollo-server/issues/3919
9
9
  */
10
10
  class HideValidationErrorsPlugin {
11
- requestDidStart() {
11
+ async requestDidStart() {
12
12
  return {
13
13
  willSendResponse: async (requestContext) => {
14
14
  const { errors, context } = requestContext;
@@ -1 +1 @@
1
- {"version":3,"file":"hide-validation-errors-plugin.js","sourceRoot":"","sources":["../../../src/middleware/hide-validation-errors-plugin.ts"],"names":[],"mappings":";;;AAAA,2DAAqD;AAGrD;;;;GAIG;AACH,MAAa,0BAA0B;IACnC,eAAe;QACX,OAAO;YACH,gBAAgB,EAAE,KAAK,EAAC,cAAc,EAAC,EAAE;gBACrC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;gBAC3C,IAAI,MAAM,EAAE;oBACP,cAAc,CAAC,QAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;wBACvD,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;4BACtC,OAAO,IAAI,oCAAe,CAAC,iBAAiB,CAAC,CAAC;yBACjD;6BAAM;4BACH,OAAO,GAAG,CAAC;yBACd;oBACL,CAAC,CAAC,CAAC;iBACN;YACL,CAAC;SACJ,CAAC;IACN,CAAC;CACJ;AAjBD,gEAiBC"}
1
+ {"version":3,"file":"hide-validation-errors-plugin.js","sourceRoot":"","sources":["../../../src/middleware/hide-validation-errors-plugin.ts"],"names":[],"mappings":";;;AAAA,2DAAqD;AAGrD;;;;GAIG;AACH,MAAa,0BAA0B;IACnC,KAAK,CAAC,eAAe;QACjB,OAAO;YACH,gBAAgB,EAAE,KAAK,EAAC,cAAc,EAAC,EAAE;gBACrC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;gBAC3C,IAAI,MAAM,EAAE;oBACP,cAAc,CAAC,QAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;wBACvD,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;4BACtC,OAAO,IAAI,oCAAe,CAAC,iBAAiB,CAAC,CAAC;yBACjD;6BAAM;4BACH,OAAO,GAAG,CAAC;yBACd;oBACL,CAAC,CAAC,CAAC;iBACN;YACL,CAAC;SACJ,CAAC;IACN,CAAC;CACJ;AAjBD,gEAiBC"}
@@ -9,7 +9,7 @@ import { HardenPluginOptions } from '../types';
9
9
  export declare class QueryComplexityPlugin implements ApolloServerPlugin {
10
10
  private options;
11
11
  constructor(options: HardenPluginOptions);
12
- requestDidStart({ schema }: GraphQLRequestContext): GraphQLRequestListener;
12
+ requestDidStart({ schema }: GraphQLRequestContext): Promise<GraphQLRequestListener>;
13
13
  }
14
14
  /**
15
15
  * @description
@@ -13,7 +13,7 @@ class QueryComplexityPlugin {
13
13
  constructor(options) {
14
14
  this.options = options;
15
15
  }
16
- requestDidStart({ schema }) {
16
+ async requestDidStart({ schema }) {
17
17
  var _a;
18
18
  const maxQueryComplexity = (_a = this.options.maxQueryComplexity) !== null && _a !== void 0 ? _a : 1000;
19
19
  return {
@@ -26,18 +26,18 @@ class QueryComplexityPlugin {
26
26
  return;
27
27
  }
28
28
  const query = request.operationName
29
- ? graphql_1.separateOperations(document)[request.operationName]
29
+ ? (0, graphql_1.separateOperations)(document)[request.operationName]
30
30
  : document;
31
31
  if (this.options.logComplexityScore === true) {
32
32
  core_1.Logger.debug(`Calculating complexity of "${(_a = request.operationName) !== null && _a !== void 0 ? _a : 'anonymous'}"`, constants_1.loggerCtx);
33
33
  }
34
- const complexity = graphql_query_complexity_1.getComplexity({
34
+ const complexity = (0, graphql_query_complexity_1.getComplexity)({
35
35
  schema,
36
36
  query,
37
37
  variables: request.variables,
38
38
  estimators: (_b = this.options.queryComplexityEstimators) !== null && _b !== void 0 ? _b : [
39
39
  defaultVendureComplexityEstimator((_c = this.options.customComplexityFactors) !== null && _c !== void 0 ? _c : {}, (_d = this.options.logComplexityScore) !== null && _d !== void 0 ? _d : false),
40
- graphql_query_complexity_1.simpleEstimator({ defaultComplexity: 1 }),
40
+ (0, graphql_query_complexity_1.simpleEstimator)({ defaultComplexity: 1 }),
41
41
  ],
42
42
  });
43
43
  if (this.options.logComplexityScore === true) {
@@ -45,7 +45,7 @@ class QueryComplexityPlugin {
45
45
  }
46
46
  if (complexity >= maxQueryComplexity) {
47
47
  core_1.Logger.error(`Query complexity of "${(_f = request.operationName) !== null && _f !== void 0 ? _f : 'anonymous'}" is ${complexity}, which exceeds the maximum of ${maxQueryComplexity}`, constants_1.loggerCtx);
48
- throw new core_1.InternalServerError(`Query is too complex`);
48
+ throw new core_1.InternalServerError('Query is too complex');
49
49
  }
50
50
  },
51
51
  };
@@ -73,7 +73,7 @@ function defaultVendureComplexityEstimator(customComplexityFactors, logFieldScor
73
73
  return (options) => {
74
74
  var _a, _b;
75
75
  const { type, args, childComplexity, field } = options;
76
- const namedType = graphql_1.getNamedType(field.type);
76
+ const namedType = (0, graphql_1.getNamedType)(field.type);
77
77
  const path = `${type.name}.${field.name}`;
78
78
  let result = childComplexity + 1;
79
79
  const customFactor = customComplexityFactors[path];
@@ -81,14 +81,14 @@ function defaultVendureComplexityEstimator(customComplexityFactors, logFieldScor
81
81
  result = Math.max(childComplexity, 1) * customFactor;
82
82
  }
83
83
  else {
84
- if (graphql_1.isObjectType(namedType)) {
84
+ if ((0, graphql_1.isObjectType)(namedType)) {
85
85
  const isPaginatedList = !!namedType.getInterfaces().find(i => i.name === 'PaginatedList');
86
86
  if (isPaginatedList) {
87
87
  const take = (_b = (_a = args.options) === null || _a === void 0 ? void 0 : _a.take) !== null && _b !== void 0 ? _b : 1000;
88
88
  result = childComplexity + Math.round(Math.log(childComplexity) * take);
89
89
  }
90
90
  }
91
- if (graphql_1.isListType(graphql_1.getNullableType(field.type))) {
91
+ if ((0, graphql_1.isListType)((0, graphql_1.getNullableType)(field.type))) {
92
92
  result = childComplexity * 5;
93
93
  }
94
94
  }
@@ -1 +1 @@
1
- {"version":3,"file":"query-complexity-plugin.js","sourceRoot":"","sources":["../../../src/middleware/query-complexity-plugin.ts"],"names":[],"mappings":";;;AAAA,wCAA4D;AAG5D,qCAOiB;AACjB,uEAAmG;AAEnG,4CAAyC;AAGzC;;;GAGG;AACH,MAAa,qBAAqB;IAC9B,YAAoB,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAAG,CAAC;IAEpD,eAAe,CAAC,EAAE,MAAM,EAAyB;;QAC7C,MAAM,kBAAkB,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,kBAAkB,mCAAI,IAAI,CAAC;QACnE,OAAO;YACH,mBAAmB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;;gBACjD,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE;oBACpB,kDAAkD;oBAClD,0DAA0D;oBAC1D,4BAA4B;oBAC5B,OAAO;iBACV;gBACD,MAAM,KAAK,GAAG,OAAO,CAAC,aAAa;oBAC/B,CAAC,CAAC,4BAAkB,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;oBACrD,CAAC,CAAC,QAAQ,CAAC;gBAEf,IAAI,IAAI,CAAC,OAAO,CAAC,kBAAkB,KAAK,IAAI,EAAE;oBAC1C,aAAM,CAAC,KAAK,CACR,8BAA8B,MAAA,OAAO,CAAC,aAAa,mCAAI,WAAW,GAAG,EACrE,qBAAS,CACZ,CAAC;iBACL;gBACD,MAAM,UAAU,GAAG,wCAAa,CAAC;oBAC7B,MAAM;oBACN,KAAK;oBACL,SAAS,EAAE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,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC,GAAG,YAAY,CAAC;SACxD;aAAM;YACH,IAAI,IAAA,sBAAY,EAAC,SAAS,CAAC,EAAE;gBACzB,MAAM,eAAe,GAAG,CAAC,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC;gBAC1F,IAAI,eAAe,EAAE;oBACjB,MAAM,IAAI,GAAG,MAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,mCAAI,IAAI,CAAC;oBACxC,MAAM,GAAG,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,CAAC;iBAC3E;aACJ;YACD,IAAI,IAAA,oBAAU,EAAC,IAAA,yBAAe,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE;gBACzC,MAAM,GAAG,eAAe,GAAG,CAAC,CAAC;aAChC;SACJ;QACD,IAAI,cAAc,EAAE;YAChB,aAAM,CAAC,KAAK,CACR,GAAG,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAsB,eAAe,YAAY,MAAM,EAAE,EAC1F,qBAAS,CACZ,CAAC;SACL;QACD,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC;AAhCD,8EAgCC"}
package/package.json CHANGED
@@ -1,28 +1,28 @@
1
1
  {
2
- "name": "@vendure/harden-plugin",
3
- "version": "1.9.5",
4
- "license": "MIT",
5
- "main": "lib/index.js",
6
- "types": "lib/index.d.ts",
7
- "files": [
8
- "lib/**/*"
9
- ],
10
- "scripts": {
11
- "watch": "tsc -p ./tsconfig.build.json --watch",
12
- "build": "rimraf lib && tsc -p ./tsconfig.build.json",
13
- "lint": "tslint --fix --project ./"
14
- },
15
- "homepage": "https://www.vendure.io/",
16
- "funding": "https://github.com/sponsors/michaelbromley",
17
- "publishConfig": {
18
- "access": "public"
19
- },
20
- "dependencies": {
21
- "graphql-query-complexity": "^0.12.0"
22
- },
23
- "devDependencies": {
24
- "@vendure/common": "^1.9.5",
25
- "@vendure/core": "^1.9.5"
26
- },
27
- "gitHead": "09ae64ec5050d81b500ab7bcff27a92a322098da"
2
+ "name": "@vendure/harden-plugin",
3
+ "version": "2.0.0-beta.1",
4
+ "license": "MIT",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
+ "files": [
8
+ "lib/**/*"
9
+ ],
10
+ "scripts": {
11
+ "watch": "tsc -p ./tsconfig.build.json --watch",
12
+ "build": "rimraf lib && tsc -p ./tsconfig.build.json",
13
+ "lint": "eslint --fix ."
14
+ },
15
+ "homepage": "https://www.vendure.io/",
16
+ "funding": "https://github.com/sponsors/michaelbromley",
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "dependencies": {
21
+ "graphql-query-complexity": "^0.12.0"
22
+ },
23
+ "devDependencies": {
24
+ "@vendure/common": "^2.0.0-beta.1",
25
+ "@vendure/core": "^2.0.0-beta.1"
26
+ },
27
+ "gitHead": "1283d87f0fe171a174507bfa1926520e1fbc97b1"
28
28
  }