@gasket/preset-nextjs 7.0.0-next.45 → 7.0.0-next.47

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.
@@ -13,33 +13,38 @@ import pluginWinston from '@gasket/plugin-winston';
13
13
  */
14
14
  export default async function presetConfig(gasket, context) {
15
15
  let typescriptPlugin;
16
- const testPlugins = [];
17
- const frameworkPlugin = context.server === 'express'
18
- ? await import('@gasket/plugin-express')
19
- : await import('@gasket/plugin-fastify');
16
+
17
+ const plugins = [
18
+ pluginHttps,
19
+ pluginNext,
20
+ pluginIntl,
21
+ pluginWebpack,
22
+ pluginRedux,
23
+ pluginWinston
24
+ ];
25
+
26
+ if ('server' in context) {
27
+ const frameworkPlugin = context.server === 'express'
28
+ ? await import('@gasket/plugin-express')
29
+ : await import('@gasket/plugin-fastify');
30
+
31
+ plugins.push(frameworkPlugin.default || frameworkPlugin);
32
+ }
20
33
 
21
34
  if ('testPlugins' in context && context.testPlugins.length > 0) {
22
35
  await Promise.all(context.testPlugins.map(async (testPlugin) => {
23
36
  const plugin = await import(testPlugin);
24
- testPlugins.push(plugin ? plugin.default || plugin : null);
37
+ plugins.push(plugin ? plugin.default || plugin : null);
25
38
  }));
26
39
  }
27
40
 
28
41
  if (context.typescript) {
29
42
  typescriptPlugin = await import('@gasket/plugin-typescript');
43
+
44
+ plugins.push(typescriptPlugin.default || typescriptPlugin);
30
45
  }
31
46
 
32
47
  return {
33
- plugins: [
34
- pluginWebpack,
35
- pluginHttps,
36
- pluginNext,
37
- pluginIntl,
38
- pluginRedux,
39
- pluginWinston,
40
- frameworkPlugin.default || frameworkPlugin,
41
- typescriptPlugin ? typescriptPlugin.default || typescriptPlugin : null,
42
- ...testPlugins
43
- ].filter(Boolean)
48
+ plugins: plugins.filter(Boolean)
44
49
  };
45
50
  }
@@ -10,7 +10,6 @@ import typescriptPrompts from '@gasket/plugin-typescript/prompts';
10
10
  */
11
11
  export default async function presetPrompt(gasket, context, { prompt }) {
12
12
  await typescriptPrompts.promptTypescript(context, prompt);
13
- await nextJsPrompts.promptAppRouter(context, prompt);
14
13
  await nextJsPrompts.promptNextServerType(context, prompt);
15
14
  await nextJsPrompts.promptNextDevProxy(context, prompt);
16
15
 
@@ -18,7 +17,7 @@ export default async function presetPrompt(gasket, context, { prompt }) {
18
17
  const { server } = await prompt([
19
18
  {
20
19
  name: 'server',
21
- message: 'Which server framework would you like to use?',
20
+ message: 'Which custom server framework would you like to use?',
22
21
  type: 'list',
23
22
  choices: [
24
23
  { name: 'Express', value: 'express' },
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@gasket/preset-nextjs",
3
- "version": "7.0.0-next.45",
3
+ "version": "7.0.0-next.47",
4
4
  "description": "Basic NextJS Framework",
5
+ "type": "module",
5
6
  "main": "lib/index.js",
6
7
  "types": "lib/index.d.ts",
7
8
  "files": [
8
9
  "lib"
9
10
  ],
10
- "type": "module",
11
11
  "scripts": {
12
12
  "lint": "eslint .",
13
13
  "lint:fix": "npm run lint -- --fix",
@@ -29,27 +29,27 @@
29
29
  "url": "https://github.com/godaddy/gasket/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@gasket/plugin-cypress": "^7.0.0-next.45",
33
- "@gasket/plugin-express": "^7.0.0-next.45",
34
- "@gasket/plugin-fastify": "^7.0.0-next.45",
35
- "@gasket/plugin-https": "^7.0.0-next.45",
36
- "@gasket/plugin-intl": "^7.0.0-next.45",
37
- "@gasket/plugin-jest": "^7.0.0-next.45",
38
- "@gasket/plugin-lint": "^7.0.0-next.45",
39
- "@gasket/plugin-mocha": "^7.0.0-next.45",
40
- "@gasket/plugin-nextjs": "^7.0.0-next.45",
41
- "@gasket/plugin-redux": "^7.0.0-next.45",
42
- "@gasket/plugin-typescript": "^7.0.0-next.45",
43
- "@gasket/plugin-webpack": "^7.0.0-next.45",
44
- "@gasket/plugin-winston": "^7.0.0-next.45",
45
- "@gasket/utils": "^7.0.0-next.45"
32
+ "@gasket/plugin-cypress": "^7.0.0-next.47",
33
+ "@gasket/plugin-express": "^7.0.0-next.47",
34
+ "@gasket/plugin-fastify": "^7.0.0-next.47",
35
+ "@gasket/plugin-https": "^7.0.0-next.47",
36
+ "@gasket/plugin-intl": "^7.0.0-next.47",
37
+ "@gasket/plugin-jest": "^7.0.0-next.47",
38
+ "@gasket/plugin-lint": "^7.0.0-next.47",
39
+ "@gasket/plugin-mocha": "^7.0.0-next.47",
40
+ "@gasket/plugin-nextjs": "^7.0.0-next.47",
41
+ "@gasket/plugin-redux": "^7.0.0-next.47",
42
+ "@gasket/plugin-typescript": "^7.0.0-next.47",
43
+ "@gasket/plugin-webpack": "^7.0.0-next.47",
44
+ "@gasket/plugin-winston": "^7.0.0-next.47",
45
+ "@gasket/utils": "^7.0.0-next.47"
46
46
  },
47
47
  "devDependencies": {
48
48
  "cross-env": "^7.0.3",
49
49
  "eslint": "^8.56.0",
50
- "eslint-config-godaddy": "^7.0.2",
51
- "eslint-plugin-jest": "^27.6.3",
52
- "eslint-plugin-unicorn": "^44.0.0",
50
+ "eslint-config-godaddy": "^7.1.1",
51
+ "eslint-plugin-jest": "^28.6.0",
52
+ "eslint-plugin-unicorn": "^55.0.0",
53
53
  "jest": "^29.7.0"
54
54
  },
55
55
  "eslintConfig": {
@@ -70,5 +70,5 @@
70
70
  "jest": {
71
71
  "transform": {}
72
72
  },
73
- "gitHead": "cca9f460bdf2859d000443b25a76927251560f48"
73
+ "gitHead": "6d09bed3cc54db25d0c71ea587ad278a99ef356d"
74
74
  }