@nrwl/next 13.9.7 → 13.10.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/executors.json +6 -6
- package/generators.json +9 -9
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/migrations.json +17 -0
- package/package.json +9 -9
- package/plugins/with-less.js +1 -1
- package/plugins/with-less.js.map +1 -1
- package/plugins/with-nx.js +3 -3
- package/plugins/with-nx.js.map +1 -1
- package/plugins/with-stylus.js +1 -1
- package/plugins/with-stylus.js.map +1 -1
- package/src/executors/build/build.impl.js +5 -5
- package/src/executors/build/build.impl.js.map +1 -1
- package/src/executors/build/lib/create-package-json.js +3 -3
- package/src/executors/build/lib/create-package-json.js.map +1 -1
- package/src/executors/build/schema.json +1 -1
- package/src/executors/export/export.impl.js +6 -6
- package/src/executors/export/export.impl.js.map +1 -1
- package/src/executors/export/schema.json +2 -2
- package/src/executors/server/lib/default-server.js +1 -1
- package/src/executors/server/schema.json +3 -3
- package/src/executors/server/server.impl.js +9 -9
- package/src/executors/server/server.impl.js.map +1 -1
- package/src/generators/application/application.d.ts +1 -1
- package/src/generators/application/application.js +1 -1
- package/src/generators/application/lib/add-cypress.js +1 -1
- package/src/generators/application/lib/add-jest.js +1 -1
- package/src/generators/application/lib/add-linting.js +1 -1
- package/src/generators/application/schema.json +9 -9
- package/src/generators/component/component.d.ts +1 -1
- package/src/generators/component/component.js +1 -1
- package/src/generators/component/schema.json +5 -5
- package/src/generators/init/init.d.ts +1 -1
- package/src/generators/init/init.js +1 -1
- package/src/generators/init/schema.json +4 -3
- package/src/generators/library/library.d.ts +1 -1
- package/src/generators/library/library.js +1 -1
- package/src/generators/library/schema.json +10 -9
- package/src/generators/page/page.d.ts +1 -1
- package/src/generators/page/page.js +1 -1
- package/src/generators/page/schema.json +4 -3
- package/src/migrations/update-11-5-0/remove-tsconfig-app-11-5-0.js +1 -1
- package/src/migrations/update-11-5-0/update-babel-config.js +1 -1
- package/src/migrations/update-11-6-0/add-js-include-11-6-0.js +1 -1
- package/src/migrations/update-12-10-0/fix-page-dir-for-eslint.js +1 -1
- package/src/migrations/update-12-6-0/add-next-eslint.js +1 -1
- package/src/migrations/update-12-8-0/remove-styled-jsx-babel-plugin.js +1 -1
- package/src/migrations/update-13-0-0/update-emotion-setup.js +1 -1
- package/src/migrations/update-13-0-0/update-to-webpack-5.js +1 -1
- package/src/migrations/update-13-0-3/fix-less.js +1 -1
- package/src/migrations/update-13-1-1/enable-swc.js +1 -1
- package/src/utils/config.js +1 -1
- package/src/utils/generate-globs.js +3 -3
- package/src/utils/generate-globs.js.map +1 -1
- package/src/utils/versions.d.ts +2 -2
- package/src/utils/versions.js +3 -3
- package/src/utils/versions.js.map +1 -1
package/executors.json
CHANGED
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
"build": {
|
|
4
4
|
"implementation": "./src/executors/build/build.impl",
|
|
5
5
|
"schema": "./src/executors/build/schema.json",
|
|
6
|
-
"description": "Build a Next.js
|
|
6
|
+
"description": "Build a Next.js application."
|
|
7
7
|
},
|
|
8
8
|
"server": {
|
|
9
9
|
"implementation": "./src/executors/server/server.impl",
|
|
10
10
|
"schema": "./src/executors/server/schema.json",
|
|
11
|
-
"description": "Serve a Next.js
|
|
11
|
+
"description": "Serve a Next.js application."
|
|
12
12
|
},
|
|
13
13
|
"export": {
|
|
14
14
|
"implementation": "./src/executors/export/export.impl",
|
|
15
15
|
"schema": "./src/executors/export/schema.json",
|
|
16
|
-
"description": "Export a Next.js
|
|
16
|
+
"description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`."
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"builders": {
|
|
20
20
|
"build": {
|
|
21
21
|
"implementation": "./src/executors/build/compat",
|
|
22
22
|
"schema": "./src/executors/build/schema.json",
|
|
23
|
-
"description": "Build a Next.js
|
|
23
|
+
"description": "Build a Next.js application."
|
|
24
24
|
},
|
|
25
25
|
"server": {
|
|
26
26
|
"implementation": "./src/executors/server/compat",
|
|
27
27
|
"schema": "./src/executors/server/schema.json",
|
|
28
|
-
"description": "Serve a Next.js
|
|
28
|
+
"description": "Serve a Next.js application."
|
|
29
29
|
},
|
|
30
30
|
"export": {
|
|
31
31
|
"implementation": "./src/executors/export/compat",
|
|
32
32
|
"schema": "./src/executors/export/schema.json",
|
|
33
|
-
"description": "Export a Next.js
|
|
33
|
+
"description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`."
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
package/generators.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"init": {
|
|
7
7
|
"factory": "./src/generators/init/init#nextInitSchematic",
|
|
8
8
|
"schema": "./src/generators/init/schema.json",
|
|
9
|
-
"description": "Initialize the
|
|
9
|
+
"description": "Initialize the `@nrwl/next` plugin.",
|
|
10
10
|
"hidden": true
|
|
11
11
|
},
|
|
12
12
|
"application": {
|
|
@@ -14,24 +14,24 @@
|
|
|
14
14
|
"schema": "./src/generators/application/schema.json",
|
|
15
15
|
"aliases": ["app"],
|
|
16
16
|
"x-type": "application",
|
|
17
|
-
"description": "Create a Next.js application"
|
|
17
|
+
"description": "Create a Next.js application."
|
|
18
18
|
},
|
|
19
19
|
"page": {
|
|
20
20
|
"factory": "./src/generators/page/page#pageSchematic",
|
|
21
21
|
"schema": "./src/generators/page/schema.json",
|
|
22
|
-
"description": "Create a Next.js page component"
|
|
22
|
+
"description": "Create a Next.js page component."
|
|
23
23
|
},
|
|
24
24
|
"component": {
|
|
25
25
|
"factory": "./src/generators/component/component#componentSchematic",
|
|
26
26
|
"schema": "./src/generators/component/schema.json",
|
|
27
|
-
"description": "Create a React component"
|
|
27
|
+
"description": "Create a React component."
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"generators": {
|
|
31
31
|
"init": {
|
|
32
32
|
"factory": "./src/generators/init/init#nextInitGenerator",
|
|
33
33
|
"schema": "./src/generators/init/schema.json",
|
|
34
|
-
"description": "Initialize the
|
|
34
|
+
"description": "Initialize the `@nrwl/next` plugin.",
|
|
35
35
|
"hidden": true
|
|
36
36
|
},
|
|
37
37
|
"application": {
|
|
@@ -39,24 +39,24 @@
|
|
|
39
39
|
"schema": "./src/generators/application/schema.json",
|
|
40
40
|
"aliases": ["app"],
|
|
41
41
|
"x-type": "application",
|
|
42
|
-
"description": "Create an application"
|
|
42
|
+
"description": "Create an application."
|
|
43
43
|
},
|
|
44
44
|
"page": {
|
|
45
45
|
"factory": "./src/generators/page/page#pageGenerator",
|
|
46
46
|
"schema": "./src/generators/page/schema.json",
|
|
47
|
-
"description": "Create a page"
|
|
47
|
+
"description": "Create a page."
|
|
48
48
|
},
|
|
49
49
|
"component": {
|
|
50
50
|
"factory": "./src/generators/component/component#componentGenerator",
|
|
51
51
|
"schema": "./src/generators/component/schema.json",
|
|
52
|
-
"description": "Create a component"
|
|
52
|
+
"description": "Create a component."
|
|
53
53
|
},
|
|
54
54
|
"library": {
|
|
55
55
|
"factory": "./src/generators/library/library#libraryGenerator",
|
|
56
56
|
"schema": "./src/generators/library/schema.json",
|
|
57
57
|
"aliases": ["lib"],
|
|
58
58
|
"x-type": "library",
|
|
59
|
-
"description": "Create a library"
|
|
59
|
+
"description": "Create a library."
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.pageGenerator = exports.libraryGenerator = exports.componentGenerator = exports.applicationGenerator = exports.createGlobPatternsOfDependentProjects = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
|
|
5
|
+
tslib_1.__exportStar(require("./src/utils/types"), exports);
|
|
6
6
|
var generate_globs_1 = require("./src/utils/generate-globs");
|
|
7
7
|
Object.defineProperty(exports, "createGlobPatternsOfDependentProjects", { enumerable: true, get: function () { return generate_globs_1.createGlobPatternsOfDependentProjects; } });
|
|
8
8
|
var application_1 = require("./src/generators/application/application");
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/next/index.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/next/index.ts"],"names":[],"mappings":";;;;AAAA,4DAAkC;AAClC,6DAAmF;AAA1E,uIAAA,qCAAqC,OAAA;AAE9C,wEAAgF;AAAvE,mHAAA,oBAAoB,OAAA;AAC7B,kEAA0E;AAAjE,+GAAA,kBAAkB,OAAA;AAC3B,4DAAoE;AAA3D,2GAAA,gBAAgB,OAAA;AACzB,mDAA2D;AAAlD,qGAAA,aAAa,OAAA"}
|
package/migrations.json
CHANGED
|
@@ -220,6 +220,23 @@
|
|
|
220
220
|
"alwaysAddToPackageJson": false
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
+
},
|
|
224
|
+
"13.10.0": {
|
|
225
|
+
"version": "13.10.0-beta.1",
|
|
226
|
+
"packages": {
|
|
227
|
+
"next": {
|
|
228
|
+
"version": "12.1.2",
|
|
229
|
+
"alwaysAddToPackageJson": false
|
|
230
|
+
},
|
|
231
|
+
"eslint-config-next": {
|
|
232
|
+
"version": "12.1.2",
|
|
233
|
+
"alwaysAddToPackageJson": false
|
|
234
|
+
},
|
|
235
|
+
"sass": {
|
|
236
|
+
"version": "1.49.9",
|
|
237
|
+
"alwaysAddToPackageJson": false
|
|
238
|
+
}
|
|
239
|
+
}
|
|
223
240
|
}
|
|
224
241
|
}
|
|
225
242
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/next",
|
|
3
|
-
"version": "13.
|
|
4
|
-
"description": "Next.js
|
|
3
|
+
"version": "13.10.0",
|
|
4
|
+
"description": "When using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.\n\nThe Next.js plugin contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/nrwl/nx.git",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/plugin-proposal-decorators": "^7.14.5",
|
|
37
|
-
"@nrwl/react": "13.
|
|
38
|
-
"@nrwl/cypress": "13.
|
|
39
|
-
"@nrwl/devkit": "13.
|
|
40
|
-
"@nrwl/jest": "13.
|
|
41
|
-
"@nrwl/linter": "13.
|
|
42
|
-
"@nrwl/web": "13.
|
|
43
|
-
"@nrwl/workspace": "13.
|
|
37
|
+
"@nrwl/react": "13.10.0",
|
|
38
|
+
"@nrwl/cypress": "13.10.0",
|
|
39
|
+
"@nrwl/devkit": "13.10.0",
|
|
40
|
+
"@nrwl/jest": "13.10.0",
|
|
41
|
+
"@nrwl/linter": "13.10.0",
|
|
42
|
+
"@nrwl/web": "13.10.0",
|
|
43
|
+
"@nrwl/workspace": "13.10.0",
|
|
44
44
|
"@svgr/webpack": "^6.1.2",
|
|
45
45
|
"chalk": "4.1.0",
|
|
46
46
|
"eslint-config-next": "^12.1.0",
|
package/plugins/with-less.js
CHANGED
|
@@ -9,7 +9,7 @@ function patchNextCSSWithLess(nextCSSModule = require('next/dist/build/webpack/c
|
|
|
9
9
|
}
|
|
10
10
|
patchNextCSSWithLess();
|
|
11
11
|
function withLess(_a) {
|
|
12
|
-
var { lessLoaderOptions = {} } = _a, nextConfig =
|
|
12
|
+
var { lessLoaderOptions = {} } = _a, nextConfig = tslib_1.__rest(_a, ["lessLoaderOptions"]);
|
|
13
13
|
return Object.assign({}, nextConfig, {
|
|
14
14
|
webpack(config, opts) {
|
|
15
15
|
// there are 2 relevant sass rules in next.js - css modules and global css
|
package/plugins/with-less.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-less.js","sourceRoot":"","sources":["../../../../packages/next/plugins/with-less.ts"],"names":[],"mappings":";;;AAAA,wFAAwF;AACxF,iDAAsC;AAEtC,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,CAC7B,IAAI,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AAEjE,SAAS,oBAAoB,CAC3B,gBAAqB,OAAO,CAAC,2CAA2C,CAAC;IAEzE,aAAa,CAAC,YAAY,GAAG,eAAe,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;AAC3E,CAAC;AAED,oBAAoB,EAAE,CAAC;AAEvB,SAAS,QAAQ,CAAC,EAAyC;QAAzC,EAAE,iBAAiB,GAAG,EAAE,OAAiB,EAAZ,UAAU,
|
|
1
|
+
{"version":3,"file":"with-less.js","sourceRoot":"","sources":["../../../../packages/next/plugins/with-less.ts"],"names":[],"mappings":";;;AAAA,wFAAwF;AACxF,iDAAsC;AAEtC,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,CAC7B,IAAI,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AAEjE,SAAS,oBAAoB,CAC3B,gBAAqB,OAAO,CAAC,2CAA2C,CAAC;IAEzE,aAAa,CAAC,YAAY,GAAG,eAAe,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;AAC3E,CAAC;AAED,oBAAoB,EAAE,CAAC;AAEvB,SAAS,QAAQ,CAAC,EAAyC;QAAzC,EAAE,iBAAiB,GAAG,EAAE,OAAiB,EAAZ,UAAU,sBAAvC,qBAAyC,CAAF;IACvD,OAAO,MAAM,CAAC,MAAM,CAAC,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,OAAO,CAAC,KAAK,CAAC,MAAM,CAClB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EACzC,CAAC,EACD,cAAc,CACf,CAAC;aACH;YAED,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,UAAU,EAAE;gBAC5C,OAAO,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aACzC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC1B,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,oBAAoB,CAAC"}
|
package/plugins/with-nx.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const { join } = require('path');
|
|
4
|
-
const {
|
|
5
|
-
const { workspaceLayout } = require('@nrwl/
|
|
4
|
+
const { workspaceRoot } = require('@nrwl/devkit');
|
|
5
|
+
const { workspaceLayout } = require('@nrwl/devkit');
|
|
6
6
|
function regexEqual(x, y) {
|
|
7
7
|
return (x instanceof RegExp &&
|
|
8
8
|
y instanceof RegExp &&
|
|
@@ -26,7 +26,7 @@ function withNx(nextConfig = {}) {
|
|
|
26
26
|
* Note: This would be easier if Next.js exposes css-loader and sass-loader on `defaultLoaders`.
|
|
27
27
|
*/
|
|
28
28
|
// Include workspace libs in css/sass loaders
|
|
29
|
-
const includes = [join(
|
|
29
|
+
const includes = [join(workspaceRoot, workspaceLayout().libsDir)];
|
|
30
30
|
const nextCssLoaders = config.module.rules.find((rule) => typeof rule.oneOf === 'object');
|
|
31
31
|
// webpack config is not as expected
|
|
32
32
|
if (!nextCssLoaders)
|
package/plugins/with-nx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-nx.js","sourceRoot":"","sources":["../../../../packages/next/plugins/with-nx.ts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patchNextCSSWithStylus();
|
|
11
11
|
function withStylus(_a) {
|
|
12
|
-
var { stylusLoaderOptions = {} } = _a, nextConfig =
|
|
12
|
+
var { stylusLoaderOptions = {} } = _a, nextConfig = tslib_1.__rest(_a, ["stylusLoaderOptions"]);
|
|
13
13
|
return Object.assign({}, nextConfig, {
|
|
14
14
|
webpack(config, opts) {
|
|
15
15
|
// there are 2 relevant sass rules in next.js - css modules and global css
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-stylus.js","sourceRoot":"","sources":["../../../../packages/next/plugins/with-stylus.ts"],"names":[],"mappings":";;;AAAA,wFAAwF;AACxF,iDAAsC;AAEtC,MAAM,iBAAiB,GAAG,CAAC,EAAE,EAAE,EAAE,CAC/B,IAAI,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AAEjE,SAAS,sBAAsB,CAC7B,gBAAgB,OAAO,CAAC,2CAA2C,CAAQ;IAE3E,aAAa,CAAC,YAAY,GAAG,iBAAiB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;AAC7E,CAAC;AAED,sBAAsB,EAAE,CAAC;AAEzB,SAAS,UAAU,CAAC,EAAgD;QAAhD,EAAE,mBAAmB,GAAG,EAAE,OAAsB,EAAjB,UAAU,
|
|
1
|
+
{"version":3,"file":"with-stylus.js","sourceRoot":"","sources":["../../../../packages/next/plugins/with-stylus.ts"],"names":[],"mappings":";;;AAAA,wFAAwF;AACxF,iDAAsC;AAEtC,MAAM,iBAAiB,GAAG,CAAC,EAAE,EAAE,EAAE,CAC/B,IAAI,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AAEjE,SAAS,sBAAsB,CAC7B,gBAAgB,OAAO,CAAC,2CAA2C,CAAQ;IAE3E,aAAa,CAAC,YAAY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C,KAAK,CAAC,MAAM,CAClB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EACzC,CAAC,EACD,gBAAgB,CACjB,CAAC;YAEF,IAAI,cAAc,EAAE;gBAClB,IAAI,gBAAgB,GAAG,IAAA,qBAAK,EAAC,EAAE,EAAE,cAAc,CAAC,CAAC;gBACjD,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;gBACtC,OAAO,CAAC,KAAK,CAAC,MAAM,CAClB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EACzC,CAAC,EACD,gBAAgB,CACjB,CAAC;aACH;YAED,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,UAAU,EAAE;gBAC5C,OAAO,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aACzC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC;AAC5B,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,sBAAsB,CAAC"}
|
|
@@ -9,23 +9,23 @@ const config_1 = require("../../utils/config");
|
|
|
9
9
|
const create_package_json_1 = require("./lib/create-package-json");
|
|
10
10
|
const create_next_config_file_1 = require("./lib/create-next-config-file");
|
|
11
11
|
const fileutils_1 = require("@nrwl/workspace/src/utilities/fileutils");
|
|
12
|
-
const
|
|
12
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
13
13
|
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
14
14
|
const check_project_1 = require("./lib/check-project");
|
|
15
15
|
const require_shim_1 = require("../../utils/require-shim");
|
|
16
|
-
const
|
|
16
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
17
17
|
const { PHASE_PRODUCTION_BUILD } = (0, require_shim_1.importConstants)();
|
|
18
18
|
function buildExecutor(options, context) {
|
|
19
19
|
var _a;
|
|
20
|
-
return
|
|
20
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
21
|
// Cast to any to overwrite NODE_ENV
|
|
22
22
|
(_a = process.env).NODE_ENV || (_a.NODE_ENV = 'production');
|
|
23
23
|
let dependencies = [];
|
|
24
24
|
const root = (0, path_1.resolve)(context.root, options.root);
|
|
25
|
-
const libsDir = (0, path_1.join)(context.root, (0,
|
|
25
|
+
const libsDir = (0, path_1.join)(context.root, (0, devkit_2.workspaceLayout)().libsDir);
|
|
26
26
|
(0, check_project_1.checkPublicDirectory)(root);
|
|
27
27
|
if (!options.buildLibsFromSource && context.targetName) {
|
|
28
|
-
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0,
|
|
28
|
+
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_1.readCachedProjectGraph)(), context.root, context.projectName, context.targetName, context.configurationName);
|
|
29
29
|
dependencies = result.dependencies;
|
|
30
30
|
}
|
|
31
31
|
const config = yield (0, config_1.prepareConfig)(PHASE_PRODUCTION_BUILD, options, context, dependencies, libsDir);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.impl.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/build/build.impl.ts"],"names":[],"mappings":";;;AAAA,yBAAuB;AAGvB,2CAAoC;AAEpC,+BAAqC;AACrC,uCAA2C;AAE3C,+CAAmD;AAEnD,mEAA8D;AAC9D,2EAAqE;AACrE,uEAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"build.impl.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/build/build.impl.ts"],"names":[],"mappings":";;;AAAA,yBAAuB;AAGvB,2CAAoC;AAEpC,+BAAqC;AACrC,uCAA2C;AAE3C,+CAAmD;AAEnD,mEAA8D;AAC9D,2EAAqE;AACrE,uEAA0E;AAC1E,yCAAsD;AACtD,6FAG4D;AAC5D,uDAA2D;AAC3D,2DAA2D;AAC3D,yCAA+C;AAE/C,MAAM,EAAE,sBA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IAAI,EAAE,QAAQ,CAAC,EAAE,IAAA,WAAI,EAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;QAEnE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;CAC1B;AA5CD,gCA4CC"}
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createPackageJson = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const
|
|
6
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
7
7
|
const create_package_json_1 = require("@nrwl/workspace/src/utilities/create-package-json");
|
|
8
8
|
function createPackageJson(options, context) {
|
|
9
|
-
return
|
|
10
|
-
const depGraph = (0,
|
|
9
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
const depGraph = (0, devkit_2.readCachedProjectGraph)();
|
|
11
11
|
const packageJson = (0, create_package_json_1.createPackageJson)(context.projectName, depGraph, {
|
|
12
12
|
root: context.root,
|
|
13
13
|
projectRoot: context.workspace.projects[context.projectName].sourceRoot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/executors/build/lib/create-package-json.ts"],"names":[],"mappings":";;;;AACA,yCAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"create-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/executors/build/lib/create-package-json.ts"],"names":[],"mappings":";;;;AACA,yCAA6C;AAC7C,yCAAsD;AACtD,2FAA6G;AAG7G,SAAsB,iBAAiB,CACrC,OAAgC,EAChC,OAAwB;;QAExB,MAAM,QAAQ,GAAG,IAAA,+BAAsB,GAAE,CAAC;QAC1C,MAAM,WAAW,GAAG,IAAA,uCAAmB,EAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE;YACrE,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,UAAU;SACxE,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;YACxB,WAAW,CAAC,OAAO,GAAG,EAAE,CAAC;SAC1B;QACD,WAAW,CAAC,OAAO,CAAC,KAAK,GAAG,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE;YAChC,WAAW,CAAC,eAAe,GAAG,EAAE,CAAC;SAClC;QACD,MAAM,iBAAiB,GAAG,QAAQ,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAEhE,IAAI,iBAAiB,EAAE;YACrB,WAAW,CAAC,YAAY,CAAC,iBAAiB,CAAC;gBACzC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC;SAClC;QAED,MAAM,cAAc,GAAG,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACxD,IAAI,cAAc,EAAE;YAClB,WAAW,CAAC,YAAY,CAAC,YAAY,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC;SACtE;QAED,IAAA,sBAAa,EAAC,GAAG,OAAO,CAAC,UAAU,eAAe,EAAE,WAAW,CAAC,CAAC;IACnE,CAAC;CAAA;AA7BD,8CA6BC"}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"default": []
|
|
35
35
|
},
|
|
36
36
|
"nextConfig": {
|
|
37
|
-
"description": "Path (relative to workspace root) to a function which takes phase, config, and builder options, and returns the resulting config. This is an advanced option and should not be used with a normal Next.js config file (i.e. next.config.js).",
|
|
37
|
+
"description": "Path (relative to workspace root) to a function which takes phase, config, and builder options, and returns the resulting config. This is an advanced option and should not be used with a normal Next.js config file (i.e. `next.config.js`).",
|
|
38
38
|
"type": "string"
|
|
39
39
|
},
|
|
40
40
|
"buildLibsFromSource": {
|
|
@@ -6,26 +6,26 @@ const devkit_1 = require("@nrwl/devkit");
|
|
|
6
6
|
const export_1 = require("next/dist/export");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const config_1 = require("../../utils/config");
|
|
9
|
-
const
|
|
9
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
10
10
|
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
11
11
|
const require_shim_1 = require("../../utils/require-shim");
|
|
12
|
-
const
|
|
12
|
+
const devkit_3 = require("@nrwl/devkit");
|
|
13
13
|
const nextTrace = require("next/dist/trace");
|
|
14
14
|
const { PHASE_EXPORT } = (0, require_shim_1.importConstants)();
|
|
15
15
|
function exportExecutor(options, context) {
|
|
16
16
|
var e_1, _a;
|
|
17
|
-
return
|
|
17
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
18
|
let dependencies = [];
|
|
19
19
|
if (!options.buildLibsFromSource) {
|
|
20
|
-
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0,
|
|
20
|
+
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_2.readCachedProjectGraph)(), context.root, context.projectName, 'build', // this should be generalized
|
|
21
21
|
context.configurationName);
|
|
22
22
|
dependencies = result.dependencies;
|
|
23
23
|
}
|
|
24
|
-
const libsDir = (0, path_1.join)(context.root, (0,
|
|
24
|
+
const libsDir = (0, path_1.join)(context.root, (0, devkit_3.workspaceLayout)().libsDir);
|
|
25
25
|
const buildTarget = (0, devkit_1.parseTargetString)(options.buildTarget);
|
|
26
26
|
const build = yield (0, devkit_1.runExecutor)(buildTarget, {}, context);
|
|
27
27
|
try {
|
|
28
|
-
for (var build_1 =
|
|
28
|
+
for (var build_1 = tslib_1.__asyncValues(build), build_1_1; build_1_1 = yield build_1.next(), !build_1_1.done;) {
|
|
29
29
|
const result = build_1_1.value;
|
|
30
30
|
if (!result.success) {
|
|
31
31
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.impl.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/export/export.impl.ts"],"names":[],"mappings":";;;AAAA,yBAAuB;AACvB,yCAKsB;AACtB,6CAAyC;AACzC,+BAAqC;AAErC,+CAAmD;AAKnD,
|
|
1
|
+
{"version":3,"file":"export.impl.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/export/export.impl.ts"],"names":[],"mappings":";;;AAAA,yBAAuB;AACvB,yCAKsB;AACtB,6CAAyC;AACzC,+BAAqC;AAErC,+CAAmD;AAKnD,yCAAsD;AACtD,6FAG4D;AAC5D,2DAA2D;AAC3D,yCAA+C;AAC/C,6CAA8C;AAE9C,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,8BAAe,GAAE,CAAC;AAE3C,SAA8B,cAAc,CAC1C,OAAiC,EACjC,OAAwB;;;QAExB,IAAI,YAAY,GAAoC,EAAE,CAAC;QACvD,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE;YAChC,MAAM,MAAM,GAAG,IAAA,mDAA4B,EACzC,IAAA,+BAAsB,GAAE,EACxB,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,EACnB,OAAO,EAAE,6BAA6B;YACtC,OAAO,CAAC,iBAAiB,CAC1B,CAAC;YACF,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;SACpC;QAED,MAAM,OAAO,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,IAAA,wBAAe,GAAE,CAAC,OAAO,CAAC,CAAC;QAC9D,MAAM,WAAW,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC3D,MAAM,KAAK,GAAG,MAAM,IAAA,oBAAW,EAAC,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;;YAE1D,KAA2B,IAAA,UAAA,sBAAA,KAAK,CAAA,WAAA;gBAArB,MAAM,MAAM,kBAAA,CAAA;gBACrB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;oBACnB,OAAO,MAAM,CAAC;iBACf;aACF;;;;;;;;;QAED,MAAM,YAAY,GAAG,IAAA,0BAAiB,EACpC,WAAW,EACX,OAAO,CACR,CAAC;QACF,MAAM,IAAI,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAa,EAChC,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,OAAO,CACR,CAAC;QAEF,cAAc;QACd,uHAAuH;QACvH,MAAM,iBAAiB,GAAG,SAAS,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAE7D,MAAM,IAAA,gBAAS,EACb,IAAI,EACJ;YACE,aAAa,EAAE,WAAW;YAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,MAAM,EAAE,GAAG,YAAY,CAAC,UAAU,WAAW;SACvC,EACR,iBAAiB,EACjB,MAAM,CACP,CAAC;QAEF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;CAC1B;AAxDD,iCAwDC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"cli": "nx",
|
|
3
3
|
"title": "Next Export",
|
|
4
|
-
"description": "Export a Next.js
|
|
4
|
+
"description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`.",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"buildTarget": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"silent": {
|
|
12
12
|
"type": "boolean",
|
|
13
|
-
"description": "Hide progress or not (default is false)",
|
|
13
|
+
"description": "Hide progress or not (default is `false`)",
|
|
14
14
|
"default": false
|
|
15
15
|
},
|
|
16
16
|
"threads": {
|
|
@@ -10,7 +10,7 @@ const next_1 = require("next");
|
|
|
10
10
|
* @param settings
|
|
11
11
|
*/
|
|
12
12
|
function defaultServer(settings, proxyConfig) {
|
|
13
|
-
return
|
|
13
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
14
|
const app = (0, next_1.default)(settings);
|
|
15
15
|
const handle = app.getRequestHandler();
|
|
16
16
|
yield app.prepare();
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"dev": {
|
|
8
8
|
"type": "boolean",
|
|
9
|
-
"description": "Serve the application in the dev mode",
|
|
9
|
+
"description": "Serve the application in the dev mode.",
|
|
10
10
|
"default": true
|
|
11
11
|
},
|
|
12
12
|
"buildTarget": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"description": "Target which builds the application"
|
|
14
|
+
"description": "Target which builds the application."
|
|
15
15
|
},
|
|
16
16
|
"port": {
|
|
17
17
|
"type": "number",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"customServerPath": {
|
|
32
32
|
"type": "string",
|
|
33
|
-
"description": "Use a custom server script"
|
|
33
|
+
"description": "Use a custom server script."
|
|
34
34
|
},
|
|
35
35
|
"hostname": {
|
|
36
36
|
"type": "string",
|
|
@@ -9,16 +9,16 @@ const path_1 = require("path");
|
|
|
9
9
|
const config_1 = require("../../utils/config");
|
|
10
10
|
const custom_server_1 = require("./lib/custom-server");
|
|
11
11
|
const default_server_1 = require("./lib/default-server");
|
|
12
|
-
const
|
|
12
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
13
13
|
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
14
14
|
const buildable_libs_1 = require("../../utils/buildable-libs");
|
|
15
15
|
const require_shim_1 = require("../../utils/require-shim");
|
|
16
|
-
const
|
|
16
|
+
const devkit_3 = require("@nrwl/devkit");
|
|
17
17
|
const { PHASE_DEVELOPMENT_SERVER, PHASE_PRODUCTION_SERVER } = (0, require_shim_1.importConstants)();
|
|
18
18
|
const infoPrefix = `[ ${chalk.dim(chalk.cyan('info'))} ] `;
|
|
19
19
|
const readyPrefix = `[ ${chalk.green('ready')} ]`;
|
|
20
20
|
function serveExecutor(options, context) {
|
|
21
|
-
return
|
|
21
|
+
return tslib_1.__asyncGenerator(this, arguments, function* serveExecutor_1() {
|
|
22
22
|
// Cast to any to overwrite NODE_ENV
|
|
23
23
|
process.env.NODE_ENV = process.env.NODE_ENV
|
|
24
24
|
? process.env.NODE_ENV
|
|
@@ -30,14 +30,14 @@ function serveExecutor(options, context) {
|
|
|
30
30
|
const baseUrl = `http://${options.hostname || 'localhost'}:${options.port}`;
|
|
31
31
|
const buildOptions = (0, devkit_1.readTargetOptions)(buildTarget, context);
|
|
32
32
|
const root = (0, path_1.resolve)(context.root, buildOptions.root);
|
|
33
|
-
const libsDir = (0, path_1.join)(context.root, (0,
|
|
33
|
+
const libsDir = (0, path_1.join)(context.root, (0, devkit_3.workspaceLayout)().libsDir);
|
|
34
34
|
if (!options.buildLibsFromSource) {
|
|
35
|
-
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0,
|
|
35
|
+
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_2.readCachedProjectGraph)(), context.root, context.projectName, 'build', // should be generalized
|
|
36
36
|
context.configurationName);
|
|
37
37
|
dependencies = result.dependencies;
|
|
38
38
|
(0, buildable_libs_1.assertDependentProjectsHaveBeenBuilt)(dependencies, context);
|
|
39
39
|
}
|
|
40
|
-
const config = yield
|
|
40
|
+
const config = yield tslib_1.__await((0, config_1.prepareConfig)(options.dev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_SERVER, buildOptions, context, dependencies, libsDir));
|
|
41
41
|
const settings = {
|
|
42
42
|
dev: options.dev,
|
|
43
43
|
dir: root,
|
|
@@ -61,14 +61,14 @@ function serveExecutor(options, context) {
|
|
|
61
61
|
proxyConfig = require(proxyConfigPath);
|
|
62
62
|
}
|
|
63
63
|
try {
|
|
64
|
-
yield
|
|
64
|
+
yield tslib_1.__await(server(settings, proxyConfig));
|
|
65
65
|
devkit_1.logger.info(`${readyPrefix} on ${baseUrl}`);
|
|
66
|
-
yield yield
|
|
66
|
+
yield yield tslib_1.__await({
|
|
67
67
|
baseUrl,
|
|
68
68
|
success: true,
|
|
69
69
|
});
|
|
70
70
|
// This Promise intentionally never resolves, leaving the process running
|
|
71
|
-
yield
|
|
71
|
+
yield tslib_1.__await(new Promise(() => { }));
|
|
72
72
|
}
|
|
73
73
|
catch (e) {
|
|
74
74
|
if (options.dev) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.impl.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/server/server.impl.ts"],"names":[],"mappings":";;;AAAA,yBAAuB;AACvB,yCAKsB;AAEtB,+BAA+B;AAC/B,2BAAgC;AAChC,+BAAqC;AAErC,+CAAmD;AAQnD,uDAAmD;AACnD,yDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"server.impl.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/server/server.impl.ts"],"names":[],"mappings":";;;AAAA,yBAAuB;AACvB,yCAKsB;AAEtB,+BAA+B;AAC/B,2BAAgC;AAChC,+BAAqC;AAErC,+CAAmD;AAQnD,uDAAmD;AACnD,yDAAqD;AACrD,yCAAsD;AACtD,6FAG4D;AAC5D,+DAAkF;AAClF,2DAA2D;AAC3D,yCAA+C;AAE/C,MAAM,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,GAAG,IAAA,8BAAe,GAAE,CAAC;AAEhF,MAAM,UAAU,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC;AAC3D,MAAM,WAAW,GAAG,KAAK,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AAElD,SAA+B,aAAa,CAC1C,OAAgC,EAChC,OAAwB;;QAExB,oCAAoC;QACnC,OAAO,CAAC,GAAW,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ;YAClD,CAAC,CAAC,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FC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Tree } from '@nrwl/devkit';
|
|
2
2
|
import { Schema } from './schema';
|
|
3
3
|
export declare function applicationGenerator(host: Tree, schema: Schema): Promise<import("@nrwl/devkit").GeneratorCallback>;
|
|
4
|
-
export declare const applicationSchematic: (
|
|
4
|
+
export declare const applicationSchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -16,7 +16,7 @@ const styles_1 = require("../../utils/styles");
|
|
|
16
16
|
const add_linting_1 = require("./lib/add-linting");
|
|
17
17
|
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
18
18
|
function applicationGenerator(host, schema) {
|
|
19
|
-
return
|
|
19
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
const options = (0, normalize_options_1.normalizeOptions)(host, schema);
|
|
21
21
|
const nextTask = yield (0, init_1.nextInitGenerator)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
|
|
22
22
|
(0, create_application_files_1.createApplicationFiles)(host, options);
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const cypress_1 = require("@nrwl/cypress");
|
|
6
6
|
const linter_1 = require("@nrwl/linter");
|
|
7
7
|
function addCypress(host, options) {
|
|
8
|
-
return
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
9
|
if (options.e2eTestRunner !== 'cypress') {
|
|
10
10
|
return () => { };
|
|
11
11
|
}
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const jest_1 = require("@nrwl/jest");
|
|
7
7
|
function addJest(host, options) {
|
|
8
|
-
return
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
9
|
if (options.unitTestRunner !== 'jest') {
|
|
10
10
|
return () => { };
|
|
11
11
|
}
|
|
@@ -7,7 +7,7 @@ const devkit_1 = require("@nrwl/devkit");
|
|
|
7
7
|
const react_1 = require("@nrwl/react");
|
|
8
8
|
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
9
9
|
function addLinting(host, options) {
|
|
10
|
-
return
|
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
11
|
const lintTask = yield (0, linter_1.lintProjectGenerator)(host, {
|
|
12
12
|
linter: options.linter,
|
|
13
13
|
project: options.projectName,
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"title": "Create a Next.js Application for Nx",
|
|
6
6
|
"examples": [
|
|
7
7
|
{
|
|
8
|
-
"command": "g app myapp --directory=myorg",
|
|
9
|
-
"description": "Generate apps/myorg/myapp and apps/myorg/myapp-e2e"
|
|
8
|
+
"command": "nx g app myapp --directory=myorg",
|
|
9
|
+
"description": "Generate `apps/myorg/myapp` and `apps/myorg/myapp-e2e`"
|
|
10
10
|
}
|
|
11
11
|
],
|
|
12
12
|
"type": "object",
|
|
@@ -74,30 +74,30 @@
|
|
|
74
74
|
"default": "eslint"
|
|
75
75
|
},
|
|
76
76
|
"skipFormat": {
|
|
77
|
-
"description": "Skip formatting files",
|
|
77
|
+
"description": "Skip formatting files.",
|
|
78
78
|
"type": "boolean",
|
|
79
79
|
"default": false
|
|
80
80
|
},
|
|
81
81
|
"skipWorkspaceJson": {
|
|
82
|
-
"description": "Skip updating workspace.json with default options based on values provided to this app (e.g. babel
|
|
82
|
+
"description": "Skip updating `workspace.json` with default options based on values provided to this app (e.g. `babel`, `style`).",
|
|
83
83
|
"type": "boolean",
|
|
84
84
|
"default": false
|
|
85
85
|
},
|
|
86
86
|
"unitTestRunner": {
|
|
87
87
|
"type": "string",
|
|
88
88
|
"enum": ["jest", "none"],
|
|
89
|
-
"description": "Test runner to use for unit tests",
|
|
89
|
+
"description": "Test runner to use for unit tests.",
|
|
90
90
|
"default": "jest"
|
|
91
91
|
},
|
|
92
92
|
"e2eTestRunner": {
|
|
93
93
|
"type": "string",
|
|
94
94
|
"enum": ["cypress", "none"],
|
|
95
|
-
"description": "Test runner to use for end to end (
|
|
95
|
+
"description": "Test runner to use for end to end (E2E) tests.",
|
|
96
96
|
"default": "cypress"
|
|
97
97
|
},
|
|
98
98
|
"tags": {
|
|
99
99
|
"type": "string",
|
|
100
|
-
"description": "Add tags to the application (used for linting)",
|
|
100
|
+
"description": "Add tags to the application (used for linting).",
|
|
101
101
|
"alias": "t"
|
|
102
102
|
},
|
|
103
103
|
"js": {
|
|
@@ -107,11 +107,11 @@
|
|
|
107
107
|
},
|
|
108
108
|
"setParserOptionsProject": {
|
|
109
109
|
"type": "boolean",
|
|
110
|
-
"description": "Whether or not to configure the ESLint
|
|
110
|
+
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
|
111
111
|
"default": false
|
|
112
112
|
},
|
|
113
113
|
"standaloneConfig": {
|
|
114
|
-
"description": "Split the project configuration into
|
|
114
|
+
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`",
|
|
115
115
|
"type": "boolean"
|
|
116
116
|
},
|
|
117
117
|
"swc": {
|
|
@@ -9,4 +9,4 @@ interface Schema {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function componentGenerator(host: Tree, options: Schema): Promise<import("@nrwl/devkit").GeneratorCallback>;
|
|
11
11
|
export default componentGenerator;
|
|
12
|
-
export declare const componentSchematic: (
|
|
12
|
+
export declare const componentSchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -20,7 +20,7 @@ function getDirectory(host, options) {
|
|
|
20
20
|
* extra dependencies for css, sass, less, styl style options.
|
|
21
21
|
*/
|
|
22
22
|
function componentGenerator(host, options) {
|
|
23
|
-
return
|
|
23
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
24
|
const componentInstall = yield (0, react_1.componentGenerator)(host, Object.assign(Object.assign({}, options), { directory: getDirectory(host, options), pascalCaseFiles: false, export: false, classComponent: false, routing: false }));
|
|
25
25
|
const styledInstall = (0, styles_1.addStyleDependencies)(host, options.style);
|
|
26
26
|
return (0, run_tasks_in_serial_1.runTasksInSerial)(styledInstall, componentInstall);
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"type": "object",
|
|
7
7
|
"examples": [
|
|
8
8
|
{
|
|
9
|
-
"command": "g component my-component --project=mylib",
|
|
10
|
-
"description": "Generate a component in the mylib library"
|
|
9
|
+
"command": "nx g component my-component --project=mylib",
|
|
10
|
+
"description": "Generate a component in the `mylib` library"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
"command": "g component my-component --project=mylib --classComponent",
|
|
14
|
-
"description": "Generate a class component in the mylib library"
|
|
13
|
+
"command": "nx g component my-component --project=mylib --classComponent",
|
|
14
|
+
"description": "Generate a class component in the `mylib` library"
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
17
|
"properties": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"skipTests": {
|
|
74
74
|
"type": "boolean",
|
|
75
|
-
"description": "When true, does not create
|
|
75
|
+
"description": "When true, does not create `spec.ts` test files for the new component.",
|
|
76
76
|
"default": false
|
|
77
77
|
},
|
|
78
78
|
"directory": {
|
|
@@ -2,4 +2,4 @@ import { GeneratorCallback, Tree } from '@nrwl/devkit';
|
|
|
2
2
|
import { InitSchema } from './schema';
|
|
3
3
|
export declare function nextInitGenerator(host: Tree, schema: InitSchema): Promise<GeneratorCallback>;
|
|
4
4
|
export default nextInitGenerator;
|
|
5
|
-
export declare const nextInitSchematic: (
|
|
5
|
+
export declare const nextInitSchematic: (generatorOptions: InitSchema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -21,7 +21,7 @@ function updateDependencies(host) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
function nextInitGenerator(host, schema) {
|
|
24
|
-
return
|
|
24
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
25
|
const tasks = [];
|
|
26
26
|
(0, set_default_collection_1.setDefaultCollection)(host, '@nrwl/next');
|
|
27
27
|
if (!schema.unitTestRunner || schema.unitTestRunner === 'jest') {
|
|
@@ -3,22 +3,23 @@
|
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "NxNextNgInit",
|
|
5
5
|
"title": "Init Next Plugin",
|
|
6
|
+
"description": "Init Next Plugin.",
|
|
6
7
|
"type": "object",
|
|
7
8
|
"properties": {
|
|
8
9
|
"unitTestRunner": {
|
|
9
|
-
"description": "Adds the specified unit test runner",
|
|
10
|
+
"description": "Adds the specified unit test runner.",
|
|
10
11
|
"type": "string",
|
|
11
12
|
"enum": ["jest", "none"],
|
|
12
13
|
"default": "jest"
|
|
13
14
|
},
|
|
14
15
|
"e2eTestRunner": {
|
|
15
|
-
"description": "Adds the specified e2e test runner",
|
|
16
|
+
"description": "Adds the specified e2e test runner.",
|
|
16
17
|
"type": "string",
|
|
17
18
|
"enum": ["cypress", "none"],
|
|
18
19
|
"default": "cypress"
|
|
19
20
|
},
|
|
20
21
|
"skipFormat": {
|
|
21
|
-
"description": "Skip formatting files",
|
|
22
|
+
"description": "Skip formatting files.",
|
|
22
23
|
"type": "boolean",
|
|
23
24
|
"default": false
|
|
24
25
|
}
|
|
@@ -2,4 +2,4 @@ import { GeneratorCallback, Tree } from '@nrwl/devkit';
|
|
|
2
2
|
import { Schema } from './schema';
|
|
3
3
|
export declare function libraryGenerator(host: Tree, options: Schema): Promise<GeneratorCallback>;
|
|
4
4
|
export default libraryGenerator;
|
|
5
|
-
export declare const librarySchematic: (
|
|
5
|
+
export declare const librarySchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -7,7 +7,7 @@ const init_1 = require("../init/init");
|
|
|
7
7
|
const devkit_1 = require("@nrwl/devkit");
|
|
8
8
|
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
9
9
|
function libraryGenerator(host, options) {
|
|
10
|
-
return
|
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
11
|
const name = (0, devkit_1.names)(options.name).fileName;
|
|
12
12
|
const tasks = [];
|
|
13
13
|
const projectDirectory = options.directory
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "NxReactLibrary",
|
|
5
5
|
"title": "Create a React Library for Nx",
|
|
6
|
+
"description": "Create a React Library for an Nx workspace.",
|
|
6
7
|
"type": "object",
|
|
7
8
|
"examples": [
|
|
8
9
|
{
|
|
9
|
-
"command": "g lib mylib --directory=myapp",
|
|
10
|
-
"description": "Generate libs/myapp/mylib"
|
|
10
|
+
"command": "nx g lib mylib --directory=myapp",
|
|
11
|
+
"description": "Generate `libs/myapp/mylib`"
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
|
-
"command": "g lib mylib --appProject=myapp",
|
|
14
|
-
"description": "Generate a library with routes and add them to myapp"
|
|
14
|
+
"command": "nx g lib mylib --appProject=myapp",
|
|
15
|
+
"description": "Generate a library with routes and add them to `myapp`"
|
|
15
16
|
}
|
|
16
17
|
],
|
|
17
18
|
"properties": {
|
|
@@ -100,7 +101,7 @@
|
|
|
100
101
|
},
|
|
101
102
|
"pascalCaseFiles": {
|
|
102
103
|
"type": "boolean",
|
|
103
|
-
"description": "Use pascal case component file name (e.g. App.tsx).",
|
|
104
|
+
"description": "Use pascal case component file name (e.g. `App.tsx`).",
|
|
104
105
|
"alias": "P",
|
|
105
106
|
"default": false
|
|
106
107
|
},
|
|
@@ -124,7 +125,7 @@
|
|
|
124
125
|
},
|
|
125
126
|
"importPath": {
|
|
126
127
|
"type": "string",
|
|
127
|
-
"description": "The library name used to import it, like
|
|
128
|
+
"description": "The library name used to import it, like `@myorg/my-awesome-lib`."
|
|
128
129
|
},
|
|
129
130
|
"component": {
|
|
130
131
|
"type": "boolean",
|
|
@@ -138,7 +139,7 @@
|
|
|
138
139
|
},
|
|
139
140
|
"globalCss": {
|
|
140
141
|
"type": "boolean",
|
|
141
|
-
"description": "When true, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is
|
|
142
|
+
"description": "When true, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).",
|
|
142
143
|
"default": false
|
|
143
144
|
},
|
|
144
145
|
"strict": {
|
|
@@ -148,11 +149,11 @@
|
|
|
148
149
|
},
|
|
149
150
|
"setParserOptionsProject": {
|
|
150
151
|
"type": "boolean",
|
|
151
|
-
"description": "Whether or not to configure the ESLint
|
|
152
|
+
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
|
152
153
|
"default": false
|
|
153
154
|
},
|
|
154
155
|
"standaloneConfig": {
|
|
155
|
-
"description": "Split the project configuration into
|
|
156
|
+
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`",
|
|
156
157
|
"type": "boolean"
|
|
157
158
|
}
|
|
158
159
|
},
|
|
@@ -2,4 +2,4 @@ import { Tree } from '@nrwl/devkit';
|
|
|
2
2
|
import { Schema } from './schema';
|
|
3
3
|
export declare function pageGenerator(host: Tree, options: Schema): Promise<import("@nrwl/devkit").GeneratorCallback>;
|
|
4
4
|
export default pageGenerator;
|
|
5
|
-
export declare const pageSchematic: (
|
|
5
|
+
export declare const pageSchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -12,7 +12,7 @@ const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-i
|
|
|
12
12
|
* it is under `pages` folder.
|
|
13
13
|
*/
|
|
14
14
|
function pageGenerator(host, options) {
|
|
15
|
-
return
|
|
15
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
16
|
const directory = options.directory ? `pages/${options.directory}` : 'pages';
|
|
17
17
|
const componentTask = yield (0, react_1.componentGenerator)(host, Object.assign(Object.assign({}, options), { directory, pascalCaseFiles: false, export: false, classComponent: false, routing: false, skipTests: !options.withTests, flat: !!options.flat, fileName: !options.flat ? 'index' : undefined }));
|
|
18
18
|
const styledTask = (0, styles_1.addStyleDependencies)(host, options.style);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "NxNextReactPage",
|
|
5
5
|
"title": "Create a Page for Next",
|
|
6
|
+
"description": "Create a Page for Next.",
|
|
6
7
|
"type": "object",
|
|
7
8
|
"examples": [
|
|
8
9
|
{
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
},
|
|
32
33
|
"directory": {
|
|
33
34
|
"type": "string",
|
|
34
|
-
"description": "Create the page under this directory (can be nested). Will be created under
|
|
35
|
+
"description": "Create the page under this directory (can be nested). Will be created under `pages/`.",
|
|
35
36
|
"alias": "dir"
|
|
36
37
|
},
|
|
37
38
|
"style": {
|
|
@@ -77,12 +78,12 @@
|
|
|
77
78
|
},
|
|
78
79
|
"withTests": {
|
|
79
80
|
"type": "boolean",
|
|
80
|
-
"description": "When true, creates a
|
|
81
|
+
"description": "When true, creates a `spec.ts` test file for the new page.",
|
|
81
82
|
"default": false
|
|
82
83
|
},
|
|
83
84
|
"export": {
|
|
84
85
|
"type": "boolean",
|
|
85
|
-
"description": "When true, the component is exported from the project index.ts (if it exists).",
|
|
86
|
+
"description": "When true, the component is exported from the project `index.ts` (if it exists).",
|
|
86
87
|
"alias": "e",
|
|
87
88
|
"default": false
|
|
88
89
|
},
|
|
@@ -4,7 +4,7 @@ exports.removeTsconfigApp = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function removeTsconfigApp(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
projects.forEach((project) => {
|
|
10
10
|
var _a, _b;
|
|
@@ -4,7 +4,7 @@ exports.updateBabelConfig = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function updateBabelConfig(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
projects.forEach((p) => {
|
|
10
10
|
const babelrcPath = `${p.root}/.babelrc`;
|
|
@@ -4,7 +4,7 @@ exports.addJsInclude = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function addJsInclude(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
projects.forEach((project) => {
|
|
10
10
|
var _a, _b;
|
|
@@ -4,7 +4,7 @@ exports.fixPageDirForEslint = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function fixPageDirForEslint(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
projects.forEach((project) => {
|
|
10
10
|
var _a, _b;
|
|
@@ -4,7 +4,7 @@ exports.addNextEslint = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function addNextEslint(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
projects.forEach((project) => {
|
|
10
10
|
var _a, _b;
|
|
@@ -4,7 +4,7 @@ exports.removeStyledJsxBabelConfig = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function removeStyledJsxBabelConfig(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
projects.forEach((project) => {
|
|
10
10
|
const babelRcPath = (0, devkit_1.joinPathFragments)(project.root, '.babelrc');
|
|
@@ -4,7 +4,7 @@ exports.updateEmotionSetup = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function updateEmotionSetup(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
projects.forEach((p) => {
|
|
10
10
|
let hasEmotion = false;
|
|
@@ -4,7 +4,7 @@ exports.update = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function update(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
let task = undefined;
|
|
10
10
|
projects.forEach((project) => {
|
|
@@ -4,7 +4,7 @@ exports.update = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function update(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
let task = undefined;
|
|
10
10
|
projects.forEach((project) => {
|
|
@@ -4,7 +4,7 @@ exports.update = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function update(host) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const projects = (0, devkit_1.getProjects)(host);
|
|
9
9
|
projects.forEach((project) => {
|
|
10
10
|
const nextConfigPath = (0, devkit_1.joinPathFragments)(project.root, 'next.config.js');
|
package/src/utils/config.js
CHANGED
|
@@ -90,7 +90,7 @@ function createWebpackConfig(workspaceRoot, projectRoot, fileReplacements = [],
|
|
|
90
90
|
}
|
|
91
91
|
exports.createWebpackConfig = createWebpackConfig;
|
|
92
92
|
function prepareConfig(phase, options, context, dependencies, libsDir) {
|
|
93
|
-
return
|
|
93
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
94
94
|
const config = (yield loadConfig(phase, options.root, null));
|
|
95
95
|
const userWebpack = config.webpack;
|
|
96
96
|
const userNextConfig = getConfigEnhancer(options.nextConfig, context.root);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createGlobPatternsOfDependentProjects = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const
|
|
6
|
-
const project_graph_utils_1 = require("
|
|
5
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
6
|
+
const project_graph_utils_1 = require("nx/src/utils/project-graph-utils");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
/**
|
|
9
9
|
* Use createGlobPatterns instead
|
|
@@ -13,7 +13,7 @@ function createGlobPatternsOfDependentProjects(projectName, fileGlobPattern = '/
|
|
|
13
13
|
devkit_1.logger.warn(`createGlobPatternsOfDependentProjects is deprecated. Use "createGlobPatternsForDependencies(__dirname)" from "@nrwl/next/tailwind" instead`);
|
|
14
14
|
try {
|
|
15
15
|
const projectDirs = (0, project_graph_utils_1.getSourceDirOfDependentProjects)(projectName);
|
|
16
|
-
return projectDirs.map((sourceDir) => (0, path_1.resolve)(
|
|
16
|
+
return projectDirs.map((sourceDir) => (0, path_1.resolve)(devkit_2.workspaceRoot, (0, devkit_1.joinPathFragments)(sourceDir, fileGlobPattern)));
|
|
17
17
|
}
|
|
18
18
|
catch (e) {
|
|
19
19
|
throw new Error(`createGlobPatternsOfDependentProjects: Error when generating globs: ${e === null || e === void 0 ? void 0 : e.message}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-globs.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/generate-globs.ts"],"names":[],"mappings":";;;AAAA,yCAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"generate-globs.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/generate-globs.ts"],"names":[],"mappings":";;;AAAA,yCAAyD;AACzD,yCAA6C;AAC7C,0EAAmF;AACnF,+BAA+B;AAE/B;;;GAGG;AACH,SAAgB,qCAAqC,CACnD,WAAmB,EACnB,kBAA0B,6BAA6B;IAEvD,eAAM,CAAC,IAAI,CACT,4IAA4I,CAC7I,CAAC;IAEF,IAAI;QACF,MAAM,WAAW,GAAG,IAAA,qDAA+B,EAAC,WAAW,CAAC,CAAC;QAEjE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CACnC,IAAA,cAAO,EAAC,sBAAa,EAAE,IAAA,0BAAiB,EAAC,SAAS,EAAE,eAAe,CAAC,CAAC,CACtE,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CACb,uEAAuE,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,OAAO,EAAE,CACpF,CAAC;KACH;AACH,CAAC;AAnBD,sFAmBC"}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const nxVersion = "*";
|
|
2
|
-
export declare const nextVersion = "12.1.
|
|
3
|
-
export declare const eslintConfigNextVersion = "12.1.
|
|
2
|
+
export declare const nextVersion = "12.1.2";
|
|
3
|
+
export declare const eslintConfigNextVersion = "12.1.2";
|
|
4
4
|
export declare const sassVersion = "1.43.2";
|
|
5
5
|
export declare const lessLoader = "10.2.0";
|
|
6
6
|
export declare const stylusLoader = "6.2.0";
|
package/src/utils/versions.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.babelPluginStyledComponentsVersion = exports.emotionServerVersion = exports.stylusLoader = exports.lessLoader = exports.sassVersion = exports.eslintConfigNextVersion = exports.nextVersion = exports.nxVersion = void 0;
|
|
4
|
-
exports.nxVersion = '13.
|
|
5
|
-
exports.nextVersion = '12.1.
|
|
6
|
-
exports.eslintConfigNextVersion = '12.1.
|
|
4
|
+
exports.nxVersion = '13.10.0';
|
|
5
|
+
exports.nextVersion = '12.1.2';
|
|
6
|
+
exports.eslintConfigNextVersion = '12.1.2';
|
|
7
7
|
exports.sassVersion = '1.43.2';
|
|
8
8
|
exports.lessLoader = '10.2.0';
|
|
9
9
|
exports.stylusLoader = '6.2.0';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,GAAG,CAAC;AAEhB,QAAA,WAAW,GAAG,QAAQ,CAAC;AACvB,QAAA,uBAAuB,GAAG,
|
|
1
|
+
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,GAAG,CAAC;AAEhB,QAAA,WAAW,GAAG,QAAQ,CAAC;AACvB,QAAA,uBAAuB,GAAG,QAAQ,CAAC;AACnC,QAAA,WAAW,GAAG,QAAQ,CAAC;AACvB,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,YAAY,GAAG,OAAO,CAAC;AACvB,QAAA,oBAAoB,GAAG,QAAQ,CAAC;AAChC,QAAA,kCAAkC,GAAG,QAAQ,CAAC"}
|