@nx/remix 23.0.0-beta.1 → 23.0.0-beta.11
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/generators.d.ts +0 -1
- package/generators.d.ts.map +1 -1
- package/generators.js +1 -3
- package/generators.json +0 -6
- package/package.json +7 -8
- package/src/executors/build/build.impl.d.ts.map +1 -1
- package/src/executors/build/build.impl.js +10 -2
- package/src/executors/build/schema.json +1 -0
- package/src/executors/serve/schema.json +1 -0
- package/src/executors/serve/serve.impl.d.ts.map +1 -1
- package/src/executors/serve/serve.impl.js +4 -2
- package/src/generators/application/application.impl.d.ts.map +1 -1
- package/src/generators/application/application.impl.js +2 -2
- package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
- package/src/generators/application/lib/add-e2e.js +2 -2
- package/src/generators/application/lib/normalize-options.js +3 -3
- package/src/generators/convert-to-inferred/convert-to-inferred.js +4 -5
- package/src/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/build-post-target-transformer.js +2 -2
- package/src/generators/convert-to-inferred/lib/serve-post-target-transformer.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/serve-post-target-transformer.d.ts.map +1 -1
- package/src/generators/init/init.d.ts.map +1 -1
- package/src/generators/init/init.js +2 -2
- package/src/generators/library/lib/normalize-options.js +3 -3
- package/src/generators/resource-route/resource-route.impl.js +2 -2
- package/src/generators/route/route.impl.d.ts.map +1 -1
- package/src/generators/route/route.impl.js +2 -3
- package/src/generators/style/style.impl.d.ts.map +1 -1
- package/src/generators/style/style.impl.js +2 -2
- package/src/plugins/plugin.d.ts.map +1 -1
- package/src/plugins/plugin.js +15 -19
- package/src/utils/deprecation.d.ts +5 -0
- package/src/utils/deprecation.d.ts.map +1 -0
- package/src/utils/deprecation.js +17 -0
- package/src/utils/versions.d.ts +0 -1
- package/src/utils/versions.d.ts.map +1 -1
- package/src/utils/versions.js +1 -2
- package/src/generators/setup-tailwind/files/app/tailwind.css__tpl__ +0 -3
- package/src/generators/setup-tailwind/files/postcss.config.js__tpl__ +0 -6
- package/src/generators/setup-tailwind/files/tailwind.config.ts__tpl__ +0 -13
- package/src/generators/setup-tailwind/schema.d.ts +0 -4
- package/src/generators/setup-tailwind/schema.json +0 -30
- package/src/generators/setup-tailwind/setup-tailwind.impl.d.ts +0 -4
- package/src/generators/setup-tailwind/setup-tailwind.impl.d.ts.map +0 -1
- package/src/generators/setup-tailwind/setup-tailwind.impl.js +0 -26
package/generators.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export { default as metaGenerator } from './src/generators/meta/meta.impl';
|
|
|
8
8
|
export { default as presetGenerator } from './src/generators/preset/preset.impl';
|
|
9
9
|
export { default as resourceRouteGenerator } from './src/generators/resource-route/resource-route.impl';
|
|
10
10
|
export { default as routeGenerator } from './src/generators/route/route.impl';
|
|
11
|
-
export { default as setupTailwindGenerator } from './src/generators/setup-tailwind/setup-tailwind.impl';
|
|
12
11
|
export { default as storybookConfigurationGenerator } from './src/generators/storybook-configuration/storybook-configuration.impl';
|
|
13
12
|
export { default as styleGenerator } from './src/generators/style/style.impl';
|
|
14
13
|
export { default as initGenerator } from './src/generators/init/init';
|
package/generators.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../packages/remix/generators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,sCAAsC,EAAE,MAAM,uFAAuF,CAAC;AAC1J,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI
|
|
1
|
+
{"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../packages/remix/generators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,sCAAsC,EAAE,MAAM,uFAAuF,CAAC;AAC1J,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,uEAAuE,CAAC;AACnI,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC"}
|
package/generators.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initGenerator = exports.styleGenerator = exports.storybookConfigurationGenerator = exports.
|
|
3
|
+
exports.initGenerator = exports.styleGenerator = exports.storybookConfigurationGenerator = exports.routeGenerator = exports.resourceRouteGenerator = exports.presetGenerator = exports.metaGenerator = exports.loaderGenerator = exports.libraryGenerator = exports.errorBoundaryGenerator = exports.cypressComponentConfigurationGenerator = exports.applicationGenerator = exports.actionGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var action_impl_1 = require("./src/generators/action/action.impl");
|
|
6
6
|
Object.defineProperty(exports, "actionGenerator", { enumerable: true, get: function () { return tslib_1.__importDefault(action_impl_1).default; } });
|
|
@@ -22,8 +22,6 @@ var resource_route_impl_1 = require("./src/generators/resource-route/resource-ro
|
|
|
22
22
|
Object.defineProperty(exports, "resourceRouteGenerator", { enumerable: true, get: function () { return tslib_1.__importDefault(resource_route_impl_1).default; } });
|
|
23
23
|
var route_impl_1 = require("./src/generators/route/route.impl");
|
|
24
24
|
Object.defineProperty(exports, "routeGenerator", { enumerable: true, get: function () { return tslib_1.__importDefault(route_impl_1).default; } });
|
|
25
|
-
var setup_tailwind_impl_1 = require("./src/generators/setup-tailwind/setup-tailwind.impl");
|
|
26
|
-
Object.defineProperty(exports, "setupTailwindGenerator", { enumerable: true, get: function () { return tslib_1.__importDefault(setup_tailwind_impl_1).default; } });
|
|
27
25
|
var storybook_configuration_impl_1 = require("./src/generators/storybook-configuration/storybook-configuration.impl");
|
|
28
26
|
Object.defineProperty(exports, "storybookConfigurationGenerator", { enumerable: true, get: function () { return tslib_1.__importDefault(storybook_configuration_impl_1).default; } });
|
|
29
27
|
var style_impl_1 = require("./src/generators/style/style.impl");
|
package/generators.json
CHANGED
|
@@ -66,12 +66,6 @@
|
|
|
66
66
|
"schema": "./src/generators/style/schema.json",
|
|
67
67
|
"description": "Generates a new stylesheet and adds it to an existing route"
|
|
68
68
|
},
|
|
69
|
-
"setup-tailwind": {
|
|
70
|
-
"implementation": "./src/generators/setup-tailwind/setup-tailwind.impl",
|
|
71
|
-
"schema": "./src/generators/setup-tailwind/schema.json",
|
|
72
|
-
"description": "Generates a TailwindCSS configuration for the Remix application",
|
|
73
|
-
"x-deprecated": "Generating Tailwind configuration is no longer maintained. This generator will be removed in Nx 23."
|
|
74
|
-
},
|
|
75
69
|
"storybook-configuration": {
|
|
76
70
|
"implementation": "./src/generators/storybook-configuration/storybook-configuration.impl#remixStorybookConfiguration",
|
|
77
71
|
"schema": "./src/generators/storybook-configuration/schema.json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/remix",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.11",
|
|
4
4
|
"description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,16 +30,15 @@
|
|
|
30
30
|
"migrations": "./migrations.json"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@nx/devkit": "23.0.0-beta.
|
|
34
|
-
"@nx/js": "23.0.0-beta.
|
|
35
|
-
"@nx/react": "23.0.0-beta.
|
|
36
|
-
"@nx/workspace": "23.0.0-beta.1",
|
|
33
|
+
"@nx/devkit": "23.0.0-beta.11",
|
|
34
|
+
"@nx/js": "23.0.0-beta.11",
|
|
35
|
+
"@nx/react": "23.0.0-beta.11",
|
|
37
36
|
"tslib": "^2.3.0",
|
|
38
|
-
"@phenomnomnominal/tsquery": "~6.
|
|
37
|
+
"@phenomnomnominal/tsquery": "~6.2.0"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
|
-
"nx": "23.0.0-beta.
|
|
42
|
-
"@nx/vitest": "23.0.0-beta.
|
|
40
|
+
"nx": "23.0.0-beta.11",
|
|
41
|
+
"@nx/vitest": "23.0.0-beta.11"
|
|
43
42
|
},
|
|
44
43
|
"peerDependencies": {
|
|
45
44
|
"@remix-run/dev": "^2.17.3"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/executors/build/build.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"build.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/executors/build/build.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAgCjD,wBAA8B,aAAa,CACzC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,eAAe;;GAiFzB"}
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = buildExecutor;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const js_1 = require("@nx/js");
|
|
6
|
-
const fileutils_1 = require("@nx/workspace/src/utilities/fileutils");
|
|
7
6
|
const child_process_1 = require("child_process");
|
|
8
7
|
const fs_extra_1 = require("fs-extra");
|
|
9
8
|
const path_1 = require("path");
|
|
9
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
10
10
|
function buildRemixBuildArgs(options) {
|
|
11
11
|
const args = ['build'];
|
|
12
12
|
if (options.sourcemap) {
|
|
@@ -32,6 +32,7 @@ async function runBuild(options, context) {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
async function buildExecutor(options, context) {
|
|
35
|
+
(0, deprecation_1.warnRemixBuildExecutorDeprecation)();
|
|
35
36
|
const projectRoot = context.projectGraph.nodes[context.projectName].data.root;
|
|
36
37
|
try {
|
|
37
38
|
await runBuild(options, context);
|
|
@@ -40,7 +41,14 @@ async function buildExecutor(options, context) {
|
|
|
40
41
|
devkit_1.logger.error(`Error occurred while trying to build application. See above for more details.`);
|
|
41
42
|
return { success: false };
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
let outputIsDirectory = false;
|
|
45
|
+
try {
|
|
46
|
+
outputIsDirectory = (0, fs_extra_1.statSync)(options.outputPath).isDirectory();
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// path does not exist; will be created below
|
|
50
|
+
}
|
|
51
|
+
if (!outputIsDirectory) {
|
|
44
52
|
(0, fs_extra_1.mkdir)(options.outputPath);
|
|
45
53
|
}
|
|
46
54
|
let packageJson;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"title": "Remix Build",
|
|
7
7
|
"description": "Build a Remix app.",
|
|
8
8
|
"type": "object",
|
|
9
|
+
"x-deprecated": "The `@nx/remix:build` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/remix:convert-to-inferred` to migrate to the `@nx/remix/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
9
10
|
"properties": {
|
|
10
11
|
"outputPath": {
|
|
11
12
|
"type": "string",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"title": "Remix Serve",
|
|
7
7
|
"description": "Serve a Remix app.",
|
|
8
8
|
"type": "object",
|
|
9
|
+
"x-deprecated": "The `@nx/remix:serve` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/remix:convert-to-inferred` to migrate to the `@nx/remix/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
9
10
|
"properties": {
|
|
10
11
|
"port": {
|
|
11
12
|
"type": "number",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/executors/serve/serve.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAKjE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"serve.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/executors/serve/serve.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAKjE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AA0CjD,wBAA+B,aAAa,CAC1C,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,eAAe;aAgBc,OAAO;aAAW,MAAM;cAiC/D"}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = serveExecutor;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
|
|
7
7
|
const node_child_process_1 = require("node:child_process");
|
|
8
8
|
const node_path_1 = require("node:path");
|
|
9
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
9
10
|
function normalizeOptions(schema) {
|
|
10
11
|
return {
|
|
11
12
|
...schema,
|
|
@@ -37,6 +38,7 @@ function buildRemixDevArgs(options) {
|
|
|
37
38
|
return args;
|
|
38
39
|
}
|
|
39
40
|
async function* serveExecutor(schema, context) {
|
|
41
|
+
(0, deprecation_1.warnRemixServeExecutorDeprecation)();
|
|
40
42
|
const options = normalizeOptions(schema);
|
|
41
43
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
42
44
|
const remixBin = require.resolve('@remix-run/dev/dist/cli');
|
|
@@ -46,7 +48,7 @@ async function* serveExecutor(schema, context) {
|
|
|
46
48
|
? process.env.NODE_ENV
|
|
47
49
|
: 'development';
|
|
48
50
|
process.env.PORT = `${options.port}`;
|
|
49
|
-
yield* (0,
|
|
51
|
+
yield* (0, internal_1.createAsyncIterable)(async ({ done, next, error }) => {
|
|
50
52
|
const server = (0, node_child_process_1.fork)(remixBin, ['dev', ...args], {
|
|
51
53
|
cwd: (0, node_path_1.join)(devkit_1.workspaceRoot, projectRoot),
|
|
52
54
|
stdio: 'inherit',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AA4BpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAQlD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sBAAsB,8BAOhC;AAED,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,sBAAsB,8BA+SjC;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.remixApplicationGenerator = remixApplicationGenerator;
|
|
4
4
|
exports.remixApplicationGeneratorInternal = remixApplicationGeneratorInternal;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
8
8
|
const js_1 = require("@nx/js");
|
|
9
9
|
const create_ts_config_1 = require("@nx/js/src/utils/typescript/create-ts-config");
|
|
10
10
|
const onboarding_1 = require("nx/src/nx-cloud/utilities/onboarding");
|
|
@@ -225,7 +225,7 @@ export default {...nxPreset};
|
|
|
225
225
|
await (0, devkit_1.formatFiles)(tree);
|
|
226
226
|
}
|
|
227
227
|
tasks.push(() => {
|
|
228
|
-
(0,
|
|
228
|
+
(0, internal_1.logShowProjectCommand)(options.projectName);
|
|
229
229
|
});
|
|
230
230
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
231
231
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAIT,iBAAiB,EAGlB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5D,wBAAsB,MAAM,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAoH5B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addE2E = addE2E;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const versions_1 = require("../../../utils/versions");
|
|
6
|
-
const e2e_web_server_info_utils_1 = require("@nx/devkit/src/generators/e2e-web-server-info-utils");
|
|
7
7
|
async function addE2E(tree, options) {
|
|
8
8
|
const hasRemixPlugin = (0, devkit_1.readNxJson)(tree).plugins?.find((p) => typeof p === 'string'
|
|
9
9
|
? p === '@nx/remix/plugin'
|
|
@@ -102,7 +102,7 @@ async function getRemixE2EWebServerInfo(tree, projectName, configFilePath, isPlu
|
|
|
102
102
|
nxJson.targetDefaults?.[defaultServeTarget].options?.port) {
|
|
103
103
|
e2ePort = nxJson.targetDefaults?.[defaultServeTarget].options?.port;
|
|
104
104
|
}
|
|
105
|
-
return (0,
|
|
105
|
+
return (0, internal_1.getE2EWebServerInfo)(tree, projectName, {
|
|
106
106
|
plugin: '@nx/remix/plugin',
|
|
107
107
|
serveTargetName: 'serveTargetName',
|
|
108
108
|
serveStaticTargetName: 'serveStaticTargetName',
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
7
|
async function normalizeOptions(tree, options) {
|
|
8
|
-
await (0,
|
|
9
|
-
const { projectName, projectRoot, importPath } = await (0,
|
|
8
|
+
await (0, internal_1.ensureRootProjectName)(options, 'application');
|
|
9
|
+
const { projectName, projectRoot, importPath } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
|
|
10
10
|
name: options.name,
|
|
11
11
|
projectType: 'application',
|
|
12
12
|
directory: options.directory,
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.convertToInferred = convertToInferred;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
6
|
-
const executor_to_plugin_migrator_1 = require("@nx/devkit/src/generators/plugin-migrations/executor-to-plugin-migrator");
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
6
|
const plugin_1 = require("../../plugins/plugin");
|
|
8
7
|
const build_post_target_transformer_1 = require("./lib/build-post-target-transformer");
|
|
9
8
|
const serve_post_target_transformer_1 = require("./lib/serve-post-target-transformer");
|
|
10
9
|
async function convertToInferred(tree, options) {
|
|
11
10
|
const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
|
|
12
|
-
const migrationLogs = new
|
|
13
|
-
const migratedProjects = await (0,
|
|
11
|
+
const migrationLogs = new internal_1.AggregatedLog();
|
|
12
|
+
const migratedProjects = await (0, internal_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/remix/plugin', plugin_1.createNodesV2, {
|
|
14
13
|
buildTargetName: 'build',
|
|
15
14
|
devTargetName: 'dev',
|
|
16
15
|
startTargetName: 'start',
|
|
@@ -33,7 +32,7 @@ async function convertToInferred(tree, options) {
|
|
|
33
32
|
},
|
|
34
33
|
], options.project);
|
|
35
34
|
if (migratedProjects.size === 0) {
|
|
36
|
-
throw new
|
|
35
|
+
throw new internal_1.NoTargetsToMigrateError();
|
|
37
36
|
}
|
|
38
37
|
if (!options.skipFormat) {
|
|
39
38
|
await (0, devkit_1.formatFiles)(tree);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Tree, type TargetConfiguration } from '@nx/devkit';
|
|
2
|
-
import { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function buildPostTargetTransformer(migrationLogs: AggregatedLog): (target: TargetConfiguration, tree: Tree, projectDetails: {
|
|
4
4
|
projectName: string;
|
|
5
5
|
root: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/convert-to-inferred/lib/build-post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"build-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/convert-to-inferred/lib/build-post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,aAAa,EAAwB,MAAM,qBAAqB,CAAC;AAG1E,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,aAAa,IAEnE,QAAQ,mBAAmB,EAC3B,MAAM,IAAI,EACV,gBAAgB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,6BAA6B,mBAAmB,8BAqDnD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildPostTargetTransformer = buildPostTargetTransformer;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const utils_1 = require("./utils");
|
|
5
|
-
const plugin_migration_utils_1 = require("@nx/devkit/src/generators/plugin-migrations/plugin-migration-utils");
|
|
6
6
|
function buildPostTargetTransformer(migrationLogs) {
|
|
7
7
|
return (target, tree, projectDetails, inferredTargetConfiguration) => {
|
|
8
8
|
const remixConfigPath = (0, utils_1.getConfigFilePath)(tree, projectDetails.root);
|
|
@@ -27,7 +27,7 @@ function buildPostTargetTransformer(migrationLogs) {
|
|
|
27
27
|
}
|
|
28
28
|
if (target.outputs) {
|
|
29
29
|
target.outputs = target.outputs.filter((out) => !out.includes('options.outputPath'));
|
|
30
|
-
(0,
|
|
30
|
+
(0, internal_1.processTargetOutputs)(target, [], inferredTargetConfiguration, {
|
|
31
31
|
projectName: projectDetails.projectName,
|
|
32
32
|
projectRoot: projectDetails.root,
|
|
33
33
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Tree, type TargetConfiguration } from '@nx/devkit';
|
|
2
|
-
import { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function servePostTargetTransformer(migrationLogs: AggregatedLog): (target: TargetConfiguration, tree: Tree, projectDetails: {
|
|
4
4
|
projectName: string;
|
|
5
5
|
root: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/convert-to-inferred/lib/serve-post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"serve-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/convert-to-inferred/lib/serve-post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,aAAa,IAEnE,QAAQ,mBAAmB,EAC3B,MAAM,IAAI,EACV,gBAAgB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,6BAA6B,mBAAmB,8BAwCnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/init/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAGjB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAE7D;AAED,wBAAsB,0BAA0B,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAgE3E;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.remixInitGenerator = remixInitGenerator;
|
|
4
4
|
exports.remixInitGeneratorInternal = remixInitGeneratorInternal;
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
|
|
7
7
|
const plugin_1 = require("../../plugins/plugin");
|
|
8
8
|
const versions_1 = require("../../utils/versions");
|
|
9
9
|
function remixInitGenerator(tree, options) {
|
|
@@ -25,7 +25,7 @@ async function remixInitGeneratorInternal(tree, options) {
|
|
|
25
25
|
nxJson.useInferencePlugins !== false;
|
|
26
26
|
options.addPlugin ??= addPluginDefault;
|
|
27
27
|
if (options.addPlugin) {
|
|
28
|
-
await (0,
|
|
28
|
+
await (0, internal_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/remix/plugin', plugin_1.createNodesV2, {
|
|
29
29
|
startTargetName: ['start', 'remix:start', 'remix-start'],
|
|
30
30
|
buildTargetName: ['build', 'remix:build', 'remix-build'],
|
|
31
31
|
devTargetName: ['dev', 'remix:dev', 'remix-dev'],
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
7
|
async function normalizeOptions(tree, options) {
|
|
8
|
-
await (0,
|
|
9
|
-
const { projectName, projectRoot, importPath } = await (0,
|
|
8
|
+
await (0, internal_1.ensureRootProjectName)(options, 'application');
|
|
9
|
+
const { projectName, projectRoot, importPath } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
|
|
10
10
|
name: options.name,
|
|
11
11
|
projectType: 'library',
|
|
12
12
|
directory: options.directory,
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = default_1;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
7
|
const remix_route_utils_1 = require("../../utils/remix-route-utils");
|
|
8
8
|
const action_impl_1 = tslib_1.__importDefault(require("../action/action.impl"));
|
|
9
9
|
const loader_impl_1 = tslib_1.__importDefault(require("../loader/loader.impl"));
|
|
10
10
|
async function default_1(tree, options) {
|
|
11
|
-
const { filePath: routeFilePath } = await (0,
|
|
11
|
+
const { filePath: routeFilePath } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
|
12
12
|
path: options.path.replace(/^\//, '').replace(/\/$/, ''),
|
|
13
13
|
allowedFileExtensions: ['ts', 'tsx'],
|
|
14
14
|
fileExtension: 'tsx',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/route/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,IAAI,EAAE,MAAM,YAAY,CAAC;AAQpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,yBAA+B,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"route.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/route/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,IAAI,EAAE,MAAM,YAAY,CAAC;AAQpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,yBAA+B,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,iBAkEnE"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = default_1;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const remix_route_utils_1 = require("../../utils/remix-route-utils");
|
|
9
9
|
const action_impl_1 = tslib_1.__importDefault(require("../action/action.impl"));
|
|
@@ -11,7 +11,7 @@ const loader_impl_1 = tslib_1.__importDefault(require("../loader/loader.impl"));
|
|
|
11
11
|
const meta_impl_1 = tslib_1.__importDefault(require("../meta/meta.impl"));
|
|
12
12
|
const style_impl_1 = tslib_1.__importDefault(require("../style/style.impl"));
|
|
13
13
|
async function default_1(tree, options) {
|
|
14
|
-
const { artifactName: name, filePath: routeFilePath } = await (0,
|
|
14
|
+
const { artifactName: name, filePath: routeFilePath } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
|
15
15
|
path: options.path.replace(/^\//, '').replace(/\/$/, ''),
|
|
16
16
|
allowedFileExtensions: ['ts', 'tsx'],
|
|
17
17
|
fileExtension: 'tsx',
|
|
@@ -24,7 +24,6 @@ async function default_1(tree, options) {
|
|
|
24
24
|
throw new Error(`Path already exists: ${routeFilePath}`);
|
|
25
25
|
tree.write(routeFilePath, (0, devkit_1.stripIndents) `
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
export default function ${componentName}() {
|
|
29
28
|
${options.loader
|
|
30
29
|
? `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/style/style.impl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"style.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/style/style.impl.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAU5C,yBAA+B,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,iBAoEnE"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = default_1;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const insert_import_1 = require("../../utils/insert-import");
|
|
8
8
|
const insert_statement_after_imports_1 = require("../../utils/insert-statement-after-imports");
|
|
9
9
|
const remix_route_utils_1 = require("../../utils/remix-route-utils");
|
|
10
10
|
async function default_1(tree, options) {
|
|
11
|
-
const { project: projectName, directory, fileName, } = await (0,
|
|
11
|
+
const { project: projectName, directory, fileName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
|
12
12
|
path: options.path,
|
|
13
13
|
});
|
|
14
14
|
const project = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/remix/src/plugins/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/remix/src/plugins/plugin.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,kBAAkB,EAGvB,aAAa,EAOd,MAAM,YAAY,CAAC;AASpB,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAID;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,kBAAkB,CA6BzD,CAAC;AAEF,eAAO,MAAM,aAAa,mCAAc,CAAC"}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createNodesV2 = exports.createNodes = exports.createDependencies = void 0;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
5
6
|
const file_hasher_1 = require("nx/src/hasher/file-hasher");
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
|
|
8
|
-
const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
|
|
9
|
-
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
10
8
|
const js_1 = require("@nx/js");
|
|
11
9
|
const path_1 = require("path");
|
|
12
10
|
const fs_1 = require("fs");
|
|
13
11
|
const executor_utils_1 = require("../utils/executor-utils");
|
|
14
12
|
const util_1 = require("@nx/js/src/plugins/typescript/util");
|
|
15
13
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
16
|
-
function readTargetsCache(cachePath) {
|
|
17
|
-
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
18
|
-
}
|
|
19
|
-
function writeTargetsToCache(cachePath, results) {
|
|
20
|
-
(0, devkit_1.writeJsonFile)(cachePath, results);
|
|
21
|
-
}
|
|
22
14
|
/**
|
|
23
15
|
* @deprecated The 'createDependencies' function is now a no-op. This functionality is included in 'createNodesV2'.
|
|
24
16
|
*/
|
|
@@ -32,18 +24,20 @@ exports.createNodes = [
|
|
|
32
24
|
async (configFilePaths, options, context) => {
|
|
33
25
|
const optionsHash = (0, file_hasher_1.hashObject)(options);
|
|
34
26
|
const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `remix-${optionsHash}.hash`);
|
|
35
|
-
const targetsCache =
|
|
36
|
-
const
|
|
27
|
+
const targetsCache = new internal_1.PluginCache(cachePath);
|
|
28
|
+
const packageManager = (0, devkit_1.detectPackageManager)(context.workspaceRoot);
|
|
29
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)(packageManager);
|
|
30
|
+
const lockFileName = (0, js_1.getLockFileName)(packageManager);
|
|
37
31
|
try {
|
|
38
|
-
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, (0, ts_solution_setup_1.isUsingTsSolutionSetup)(), pmc), configFilePaths, options, context);
|
|
32
|
+
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, (0, ts_solution_setup_1.isUsingTsSolutionSetup)(), pmc, lockFileName), configFilePaths, options, context);
|
|
39
33
|
}
|
|
40
34
|
finally {
|
|
41
|
-
|
|
35
|
+
targetsCache.writeToDisk();
|
|
42
36
|
}
|
|
43
37
|
},
|
|
44
38
|
];
|
|
45
39
|
exports.createNodesV2 = exports.createNodes;
|
|
46
|
-
async function createNodesInternal(configFilePath, options, context, targetsCache, isUsingTsSolutionSetup, pmc) {
|
|
40
|
+
async function createNodesInternal(configFilePath, options, context, targetsCache, isUsingTsSolutionSetup, pmc, lockFileName) {
|
|
47
41
|
const projectRoot = (0, path_1.dirname)(configFilePath);
|
|
48
42
|
const fullyQualifiedProjectRoot = (0, path_1.join)(context.workspaceRoot, projectRoot);
|
|
49
43
|
// Do not create a project if package.json and project.json isn't there
|
|
@@ -57,9 +51,11 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
|
|
|
57
51
|
if (remixCompiler === RemixCompiler.IsNotRemix) {
|
|
58
52
|
return {};
|
|
59
53
|
}
|
|
60
|
-
const hash = (await (0,
|
|
61
|
-
targetsCache
|
|
62
|
-
|
|
54
|
+
const hash = (await (0, internal_1.calculateHashForCreateNodes)(projectRoot, { ...options, isUsingTsSolutionSetup }, context, [lockFileName])) + configFilePath;
|
|
55
|
+
if (!targetsCache.has(hash)) {
|
|
56
|
+
targetsCache.set(hash, await buildRemixTargets(configFilePath, projectRoot, options, context, siblingFiles, remixCompiler, isUsingTsSolutionSetup, pmc));
|
|
57
|
+
}
|
|
58
|
+
const { targets, metadata } = targetsCache.get(hash);
|
|
63
59
|
const project = {
|
|
64
60
|
root: projectRoot,
|
|
65
61
|
targets,
|
|
@@ -72,7 +68,7 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
|
|
|
72
68
|
};
|
|
73
69
|
}
|
|
74
70
|
async function buildRemixTargets(configFilePath, projectRoot, options, context, siblingFiles, remixCompiler, isUsingTsSolutionSetup, pmc) {
|
|
75
|
-
const namedInputs = (0,
|
|
71
|
+
const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
|
|
76
72
|
const { buildDirectory, assetsBuildDirectory, serverBuildPath } = await getBuildPaths(configFilePath, projectRoot, context.workspaceRoot, remixCompiler);
|
|
77
73
|
const targets = {};
|
|
78
74
|
targets[options.buildTargetName] = buildTarget(options.buildTargetName, projectRoot, buildDirectory, assetsBuildDirectory, namedInputs, remixCompiler, isUsingTsSolutionSetup);
|
|
@@ -188,7 +184,7 @@ function typecheckTarget(typecheckTargetName, projectRoot, namedInputs, siblingF
|
|
|
188
184
|
async function getBuildPaths(configFilePath, projectRoot, workspaceRoot, remixCompiler) {
|
|
189
185
|
const configPath = (0, path_1.join)(workspaceRoot, configFilePath);
|
|
190
186
|
if (remixCompiler === RemixCompiler.IsClassic) {
|
|
191
|
-
let appConfig = await (0,
|
|
187
|
+
let appConfig = await (0, internal_1.loadConfigFile)(configPath);
|
|
192
188
|
return {
|
|
193
189
|
buildDirectory: 'build',
|
|
194
190
|
serverBuildPath: appConfig.serverBuildPath ?? 'build/index.js',
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const REMIX_BUILD_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/remix:build` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/remix:convert-to-inferred` to migrate to the `@nx/remix/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.";
|
|
2
|
+
export declare const REMIX_SERVE_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/remix:serve` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/remix:convert-to-inferred` to migrate to the `@nx/remix/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.";
|
|
3
|
+
export declare function warnRemixBuildExecutorDeprecation(): void;
|
|
4
|
+
export declare function warnRemixServeExecutorDeprecation(): void;
|
|
5
|
+
//# sourceMappingURL=deprecation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../../../../../packages/remix/src/utils/deprecation.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wCAAwC,+PACyM,CAAC;AAE/P,eAAO,MAAM,wCAAwC,+PACyM,CAAC;AAE/P,wBAAgB,iCAAiC,IAAI,IAAI,CAExD;AAED,wBAAgB,iCAAiC,IAAI,IAAI,CAExD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REMIX_SERVE_EXECUTOR_DEPRECATION_MESSAGE = exports.REMIX_BUILD_EXECUTOR_DEPRECATION_MESSAGE = void 0;
|
|
4
|
+
exports.warnRemixBuildExecutorDeprecation = warnRemixBuildExecutorDeprecation;
|
|
5
|
+
exports.warnRemixServeExecutorDeprecation = warnRemixServeExecutorDeprecation;
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
// TODO(v24): Remove the @nx/remix:build and @nx/remix:serve executors. The
|
|
8
|
+
// inferred plugin (@nx/remix/plugin) and the convert-to-inferred generator
|
|
9
|
+
// stay supported.
|
|
10
|
+
exports.REMIX_BUILD_EXECUTOR_DEPRECATION_MESSAGE = 'The `@nx/remix:build` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/remix:convert-to-inferred` to migrate to the `@nx/remix/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
|
|
11
|
+
exports.REMIX_SERVE_EXECUTOR_DEPRECATION_MESSAGE = 'The `@nx/remix:serve` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/remix:convert-to-inferred` to migrate to the `@nx/remix/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
|
|
12
|
+
function warnRemixBuildExecutorDeprecation() {
|
|
13
|
+
devkit_1.logger.warn(exports.REMIX_BUILD_EXECUTOR_DEPRECATION_MESSAGE);
|
|
14
|
+
}
|
|
15
|
+
function warnRemixServeExecutorDeprecation() {
|
|
16
|
+
devkit_1.logger.warn(exports.REMIX_SERVE_EXECUTOR_DEPRECATION_MESSAGE);
|
|
17
|
+
}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export declare const typesReactVersion = "^18.2.0";
|
|
|
8
8
|
export declare const typesReactDomVersion = "^18.2.0";
|
|
9
9
|
export declare const eslintVersion = "^8.56.0";
|
|
10
10
|
export declare const typescriptVersion = "~5.9.2";
|
|
11
|
-
export declare const tailwindVersion = "^3.3.0";
|
|
12
11
|
export declare const postcssVersion = "^8.4.38";
|
|
13
12
|
export declare const autoprefixerVersion = "^10.4.19";
|
|
14
13
|
export declare const testingLibraryReactVersion = "^14.1.2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/remix/src/utils/versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvE,eAAO,MAAM,SAAS,KAAwC,CAAC;AAE/D,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/remix/src/utils/versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvE,eAAO,MAAM,SAAS,KAAwC,CAAC;AAE/D,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,0BAA0B,YAAY,CAAC;AAEpD,eAAO,MAAM,4BAA4B,UAAU,CAAC;AACpD,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAClD,eAAO,MAAM,+BAA+B,YAAY,CAAC;AACzD,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAIlD"}
|
package/src/utils/versions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.viteVersion = exports.testingLibraryUserEventsVersion = exports.testingLibraryDomVersion = exports.testingLibraryJestDomVersion = exports.testingLibraryReactVersion = exports.autoprefixerVersion = exports.postcssVersion = exports.
|
|
3
|
+
exports.viteVersion = exports.testingLibraryUserEventsVersion = exports.testingLibraryDomVersion = exports.testingLibraryJestDomVersion = exports.testingLibraryReactVersion = exports.autoprefixerVersion = exports.postcssVersion = exports.typescriptVersion = exports.eslintVersion = exports.typesReactDomVersion = exports.typesReactVersion = exports.reactDomVersion = exports.reactVersion = exports.isbotVersion = exports.remixVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.getRemixVersion = getRemixVersion;
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
exports.nxVersion = require('../../package.json').version;
|
|
@@ -12,7 +12,6 @@ exports.typesReactVersion = '^18.2.0';
|
|
|
12
12
|
exports.typesReactDomVersion = '^18.2.0';
|
|
13
13
|
exports.eslintVersion = '^8.56.0';
|
|
14
14
|
exports.typescriptVersion = '~5.9.2';
|
|
15
|
-
exports.tailwindVersion = '^3.3.0';
|
|
16
15
|
exports.postcssVersion = '^8.4.38';
|
|
17
16
|
exports.autoprefixerVersion = '^10.4.19';
|
|
18
17
|
exports.testingLibraryReactVersion = '^14.1.2';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Config } from "tailwindcss";
|
|
2
|
-
import { createGlobPatternsForDependencies } from '@nx/react/tailwind';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
content: [
|
|
6
|
-
"./app/**/*.{js,jsx,ts,tsx}",
|
|
7
|
-
...createGlobPatternsForDependencies(__dirname)
|
|
8
|
-
],
|
|
9
|
-
theme: {
|
|
10
|
-
extend: {},
|
|
11
|
-
},
|
|
12
|
-
plugins: [],
|
|
13
|
-
} satisfies Config;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/schema",
|
|
3
|
-
"$id": "NxRemixTailwind",
|
|
4
|
-
"title": "Add TailwindCSS to a Remix App",
|
|
5
|
-
"description": "Setup tailwindcss for a given project.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"examples": [
|
|
8
|
-
{
|
|
9
|
-
"command": "g setup-tailwind --project=myapp",
|
|
10
|
-
"description": "Generate a TailwindCSS config for your Remix app"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"properties": {
|
|
14
|
-
"project": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "The name of the project to add tailwind to",
|
|
17
|
-
"$default": {
|
|
18
|
-
"$source": "projectName"
|
|
19
|
-
},
|
|
20
|
-
"x-prompt": "What project would you like to add Tailwind to?"
|
|
21
|
-
},
|
|
22
|
-
"skipFormat": {
|
|
23
|
-
"type": "boolean",
|
|
24
|
-
"description": "Skip formatting files after generator runs",
|
|
25
|
-
"default": false,
|
|
26
|
-
"x-priority": "internal"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"required": ["project"]
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup-tailwind.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/setup-tailwind/setup-tailwind.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAOpB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAGpD,wBAA8B,aAAa,CACzC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mBAAmB,uBAqC7B"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = setupTailwind;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const versions_1 = require("../../utils/versions");
|
|
6
|
-
const insert_statement_after_imports_1 = require("../../utils/insert-statement-after-imports");
|
|
7
|
-
async function setupTailwind(tree, options) {
|
|
8
|
-
devkit_1.logger.warn(`The 'setup-tailwind' generator is deprecated. Generating Tailwind configuration is no longer maintained. This generator will be removed in Nx 23.`);
|
|
9
|
-
const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
10
|
-
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files'), project.root, {
|
|
11
|
-
tpl: '',
|
|
12
|
-
});
|
|
13
|
-
const pathToRoot = (0, devkit_1.joinPathFragments)(project.root, 'app/root.tsx');
|
|
14
|
-
(0, insert_statement_after_imports_1.insertStatementAfterImports)(tree, pathToRoot, (0, devkit_1.stripIndents) `import './tailwind.css';`);
|
|
15
|
-
(0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
16
|
-
tailwindcss: versions_1.tailwindVersion,
|
|
17
|
-
postcss: versions_1.postcssVersion,
|
|
18
|
-
autoprefixer: versions_1.autoprefixerVersion,
|
|
19
|
-
}, {});
|
|
20
|
-
if (!options.skipFormat) {
|
|
21
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
22
|
-
}
|
|
23
|
-
return () => {
|
|
24
|
-
(0, devkit_1.installPackagesTask)(tree);
|
|
25
|
-
};
|
|
26
|
-
}
|