@gasket/preset-api 7.0.0-next.23 → 7.0.0-next.26

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.
@@ -14,9 +14,14 @@ import pluginLint from '@gasket/plugin-lint';
14
14
  * @returns {Promise<CreateContext.presetConfig>} config
15
15
  */
16
16
  export default async function presetConfig(gasket, context) {
17
- let testPlugin, typescriptPlugin;
18
- if ('testPlugin' in context) {
19
- testPlugin = await import(context.testPlugin);
17
+ let typescriptPlugin;
18
+ let testPlugins = [];
19
+
20
+ if ('testPlugins' in context && context.testPlugins.length > 0) {
21
+ await Promise.all(context.testPlugins.map(async (testPlugin) => {
22
+ const plugin = await import(testPlugin);
23
+ testPlugins.push(plugin ? plugin.default || plugin : null);
24
+ }));
20
25
  }
21
26
 
22
27
  if (context.typescript) {
@@ -34,7 +39,7 @@ export default async function presetConfig(gasket, context) {
34
39
  pluginSwagger,
35
40
  pluginLint,
36
41
  typescriptPlugin ? typescriptPlugin.default || typescriptPlugin : null,
37
- testPlugin ? testPlugin.default || testPlugin : null
42
+ ...testPlugins
38
43
  ].filter(Boolean)
39
44
  };
40
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gasket/preset-api",
3
- "version": "7.0.0-next.23",
3
+ "version": "7.0.0-next.26",
4
4
  "description": "Create Express-based API with Gasket",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -30,18 +30,18 @@
30
30
  "url": "https://github.com/godaddy/gasket/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@gasket/plugin-cypress": "^7.0.0-next.23",
34
- "@gasket/plugin-docs": "^7.0.0-next.23",
35
- "@gasket/plugin-docusaurus": "^7.0.0-next.23",
36
- "@gasket/plugin-express": "^7.0.0-next.23",
37
- "@gasket/plugin-https": "^7.0.0-next.23",
38
- "@gasket/plugin-jest": "^7.0.0-next.23",
39
- "@gasket/plugin-lint": "^7.0.0-next.23",
40
- "@gasket/plugin-mocha": "^7.0.0-next.23",
41
- "@gasket/plugin-response-data": "^7.0.0-next.23",
42
- "@gasket/plugin-swagger": "^7.0.0-next.23",
43
- "@gasket/plugin-typescript": "^7.0.0-next.23",
44
- "@gasket/plugin-winston": "^7.0.0-next.23"
33
+ "@gasket/plugin-cypress": "^7.0.0-next.26",
34
+ "@gasket/plugin-docs": "^7.0.0-next.26",
35
+ "@gasket/plugin-docusaurus": "^7.0.0-next.26",
36
+ "@gasket/plugin-express": "^7.0.0-next.26",
37
+ "@gasket/plugin-https": "^7.0.0-next.26",
38
+ "@gasket/plugin-jest": "^7.0.0-next.26",
39
+ "@gasket/plugin-lint": "^7.0.0-next.26",
40
+ "@gasket/plugin-mocha": "^7.0.0-next.26",
41
+ "@gasket/plugin-response-data": "^7.0.0-next.26",
42
+ "@gasket/plugin-swagger": "^7.0.0-next.26",
43
+ "@gasket/plugin-typescript": "^7.0.0-next.26",
44
+ "@gasket/plugin-winston": "^7.0.0-next.26"
45
45
  },
46
46
  "devDependencies": {
47
47
  "cross-env": "^7.0.3",
@@ -70,5 +70,5 @@
70
70
  "jest": {
71
71
  "transform": {}
72
72
  },
73
- "gitHead": "0ba753c8764138e300be1c464065280bcc801239"
73
+ "gitHead": "b885d3f60fc68f944186105b1c4adb6440817581"
74
74
  }