@nx/remix 16.3.1 → 16.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/executors.json +26 -0
- package/generators.json +19 -3
- package/package.json +10 -7
- package/plugins/component-testing/index.d.ts +31 -0
- package/plugins/component-testing/index.js +59 -0
- package/plugins/component-testing/index.js.map +1 -0
- package/src/executors/build/build.impl.d.ts +5 -0
- package/src/executors/build/build.impl.js +84 -0
- package/src/executors/build/build.impl.js.map +1 -0
- package/src/executors/build/compat.d.ts +2 -0
- package/src/executors/build/compat.js +6 -0
- package/src/executors/build/compat.js.map +1 -0
- package/src/executors/build/schema.d.ts +5 -0
- package/src/executors/build/schema.json +31 -0
- package/src/executors/serve/compat.d.ts +2 -0
- package/src/executors/serve/compat.js +6 -0
- package/src/executors/serve/compat.js.map +1 -0
- package/src/executors/serve/schema.d.ts +9 -0
- package/src/executors/serve/schema.json +41 -0
- package/src/executors/serve/serve.impl.d.ts +6 -0
- package/src/executors/serve/serve.impl.js +77 -0
- package/src/executors/serve/serve.impl.js.map +1 -0
- package/src/generators/application/__snapshots__/application.impl.spec.ts.snap +6 -24
- package/src/generators/application/application.impl.js +6 -4
- package/src/generators/application/application.impl.js.map +1 -1
- package/src/generators/application/lib/update-unit-test-config.js +1 -0
- package/src/generators/application/lib/update-unit-test-config.js.map +1 -1
- package/src/generators/cypress/cypress.impl.d.ts +3 -2
- package/src/generators/cypress/cypress.impl.js +26 -4
- package/src/generators/cypress/cypress.impl.js.map +1 -1
- package/src/generators/cypress/schema.d.ts +10 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.d.ts +3 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.js +25 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.js.map +1 -0
- package/src/generators/cypress-component-configuration/files/cypress.config.ts__tmpl__ +6 -0
- package/src/generators/cypress-component-configuration/schema.d.ts +5 -0
- package/src/generators/cypress-component-configuration/schema.json +41 -0
- package/src/generators/library/lib/add-unit-testing.js +1 -0
- package/src/generators/library/lib/add-unit-testing.js.map +1 -1
- package/src/generators/preset/lib/normalize-options.d.ts +3 -0
- package/src/generators/preset/lib/normalize-options.js.map +1 -1
- package/src/generators/preset/preset.impl.js +4 -0
- package/src/generators/preset/preset.impl.js.map +1 -1
- package/src/generators/storybook-configuration/__snapshots__/storybook-configuration.impl.spec.ts.snap +73 -0
- package/src/generators/storybook-configuration/files/vite.config.ts__tpl__ +15 -0
- package/src/generators/storybook-configuration/schema.d.ts +15 -0
- package/src/generators/storybook-configuration/schema.json +96 -0
- package/src/generators/storybook-configuration/storybook-configuration.impl.d.ts +3 -0
- package/src/generators/storybook-configuration/storybook-configuration.impl.js +19 -0
- package/src/generators/storybook-configuration/storybook-configuration.impl.js.map +1 -0
- package/src/index.d.ts +4 -0
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/utils/testing-config-utils.js +28 -15
- package/src/utils/testing-config-utils.js.map +1 -1
package/executors.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"executors": {
|
|
3
|
+
"serve": {
|
|
4
|
+
"implementation": "./src/executors/serve/serve.impl",
|
|
5
|
+
"schema": "./src/executors/serve/schema.json",
|
|
6
|
+
"description": "Serve a Remix application."
|
|
7
|
+
},
|
|
8
|
+
"build": {
|
|
9
|
+
"implementation": "./src/executors/build/build.impl",
|
|
10
|
+
"schema": "./src/executors/build/schema.json",
|
|
11
|
+
"description": "Build a Remix application."
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"builders": {
|
|
15
|
+
"serve": {
|
|
16
|
+
"implementation": "./src/executors/serve/compat",
|
|
17
|
+
"schema": "./src/executors/serve/schema.json",
|
|
18
|
+
"description": "Serve a Remix application."
|
|
19
|
+
},
|
|
20
|
+
"build": {
|
|
21
|
+
"implementation": "./src/executors/build/build.impl",
|
|
22
|
+
"schema": "./src/executors/build/schema.json",
|
|
23
|
+
"description": "Build a Remix application."
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
package/generators.json
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"name": "NxRemix",
|
|
4
4
|
"version": "0.0.1",
|
|
5
|
-
"extends": [
|
|
5
|
+
"extends": [
|
|
6
|
+
"@nx/react"
|
|
7
|
+
],
|
|
6
8
|
"generators": {
|
|
7
9
|
"preset": {
|
|
8
10
|
"implementation": "./src/generators/preset/preset.impl",
|
|
@@ -20,14 +22,23 @@
|
|
|
20
22
|
"implementation": "./src/generators/application/application.impl",
|
|
21
23
|
"schema": "./src/generators/application/schema.json",
|
|
22
24
|
"description": "Generate a new Remix application",
|
|
23
|
-
"aliases": [
|
|
25
|
+
"aliases": [
|
|
26
|
+
"app"
|
|
27
|
+
],
|
|
24
28
|
"x-type": "application"
|
|
25
29
|
},
|
|
30
|
+
"cypress-component-configuration": {
|
|
31
|
+
"implementation": "./src/generators/cypress-component-configuration/cypress-component-configuration.impl",
|
|
32
|
+
"schema": "./src/generators/cypress-component-configuration/schema.json",
|
|
33
|
+
"description": "Generate a Cypress Component Testing configuration for a Remix project"
|
|
34
|
+
},
|
|
26
35
|
"library": {
|
|
27
36
|
"implementation": "./src/generators/library/library.impl",
|
|
28
37
|
"schema": "./src/generators/library/schema.json",
|
|
29
38
|
"description": "Generate a new library",
|
|
30
|
-
"aliases": [
|
|
39
|
+
"aliases": [
|
|
40
|
+
"lib"
|
|
41
|
+
],
|
|
31
42
|
"x-type": "library"
|
|
32
43
|
},
|
|
33
44
|
"route": {
|
|
@@ -60,6 +71,11 @@
|
|
|
60
71
|
"schema": "./src/generators/setup-tailwind/schema.json",
|
|
61
72
|
"description": "Generates a TailwindCSS configuration for the Remix application"
|
|
62
73
|
},
|
|
74
|
+
"storybook-configuration": {
|
|
75
|
+
"implementation": "./src/generators/storybook-configuration/storybook-configuration.impl",
|
|
76
|
+
"schema": "./src/generators/storybook-configuration/schema.json",
|
|
77
|
+
"description": "Generates a Storybook configuration for a Remix application"
|
|
78
|
+
},
|
|
63
79
|
"meta": {
|
|
64
80
|
"implementation": "./src/generators/meta/meta.impl",
|
|
65
81
|
"schema": "./src/generators/meta/schema.json",
|
package/package.json
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/remix",
|
|
3
|
-
"version": "16.
|
|
4
|
-
"main": "src/index.js",
|
|
3
|
+
"version": "16.7.0-beta.1",
|
|
4
|
+
"main": "./src/index.js",
|
|
5
5
|
"generators": "./generators.json",
|
|
6
|
+
"executors": "./executors.json",
|
|
6
7
|
"dependencies": {
|
|
7
|
-
"@nx/devkit": "^16.0.
|
|
8
|
-
"@nx/js": "^16.0.
|
|
9
|
-
"@nx/react": "^16.0.
|
|
8
|
+
"@nx/devkit": "^16.7.0-rc.1",
|
|
9
|
+
"@nx/js": "^16.7.0-rc.1",
|
|
10
|
+
"@nx/react": "^16.7.0-rc.1",
|
|
11
|
+
"@nx/web": "16.7.1",
|
|
10
12
|
"@phenomnomnominal/tsquery": "^5.0.1",
|
|
11
13
|
"tslib": "^2.3.1",
|
|
12
|
-
"
|
|
14
|
+
"vite": "4.3.9",
|
|
15
|
+
"@nrwl/remix": "16.7.0-beta.1"
|
|
13
16
|
},
|
|
14
17
|
"ng-update": {
|
|
15
18
|
"requirements": {},
|
|
16
19
|
"migrations": "./migrations.json"
|
|
17
20
|
},
|
|
18
|
-
"
|
|
21
|
+
"type": "commonjs"
|
|
19
22
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type ViteDevServer = {
|
|
2
|
+
framework: 'react';
|
|
3
|
+
bundler: 'vite';
|
|
4
|
+
viteConfig?: any;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Remix nx preset for Cypress Component Testing
|
|
8
|
+
*
|
|
9
|
+
* This preset contains the base configuration
|
|
10
|
+
* for your component tests that nx recommends.
|
|
11
|
+
* including a devServer that supports nx workspaces.
|
|
12
|
+
* you can easily extend this within your cypress config via spreading the preset
|
|
13
|
+
* @example
|
|
14
|
+
* export default defineConfig({
|
|
15
|
+
* component: {
|
|
16
|
+
* ...nxComponentTestingPreset(__dirname)
|
|
17
|
+
* // add your own config here
|
|
18
|
+
* }
|
|
19
|
+
* })
|
|
20
|
+
*
|
|
21
|
+
* @param pathToConfig will be used for loading project options and to construct the output paths for videos and screenshots
|
|
22
|
+
*/
|
|
23
|
+
export declare function nxComponentTestingPreset(pathToConfig: string): {
|
|
24
|
+
specPattern: string;
|
|
25
|
+
devServer: ViteDevServer;
|
|
26
|
+
videosFolder: string;
|
|
27
|
+
screenshotsFolder: string;
|
|
28
|
+
video: boolean;
|
|
29
|
+
chromeWebSecurity: boolean;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nxComponentTestingPreset = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
/**
|
|
10
|
+
* Remix nx preset for Cypress Component Testing
|
|
11
|
+
*
|
|
12
|
+
* This preset contains the base configuration
|
|
13
|
+
* for your component tests that nx recommends.
|
|
14
|
+
* including a devServer that supports nx workspaces.
|
|
15
|
+
* you can easily extend this within your cypress config via spreading the preset
|
|
16
|
+
* @example
|
|
17
|
+
* export default defineConfig({
|
|
18
|
+
* component: {
|
|
19
|
+
* ...nxComponentTestingPreset(__dirname)
|
|
20
|
+
* // add your own config here
|
|
21
|
+
* }
|
|
22
|
+
* })
|
|
23
|
+
*
|
|
24
|
+
* @param pathToConfig will be used for loading project options and to construct the output paths for videos and screenshots
|
|
25
|
+
*/
|
|
26
|
+
function nxComponentTestingPreset(pathToConfig) {
|
|
27
|
+
const normalizedProjectRootPath = ['.ts', '.js'].some((ext) => pathToConfig.endsWith(ext))
|
|
28
|
+
? pathToConfig
|
|
29
|
+
: (0, path_1.dirname)(pathToConfig);
|
|
30
|
+
return Object.assign(Object.assign({}, (0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig)), { specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}', devServer: Object.assign(Object.assign({}, { framework: 'react', bundler: 'vite' }), { viteConfig: () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const viteConfigPath = findViteConfig(normalizedProjectRootPath);
|
|
32
|
+
const { mergeConfig, loadConfigFromFile, searchForWorkspaceRoot } = yield Promise.resolve().then(() => require('vite'));
|
|
33
|
+
const resolved = yield loadConfigFromFile({
|
|
34
|
+
mode: 'watch',
|
|
35
|
+
command: 'serve',
|
|
36
|
+
}, viteConfigPath);
|
|
37
|
+
return mergeConfig(resolved.config, {
|
|
38
|
+
server: {
|
|
39
|
+
fs: {
|
|
40
|
+
allow: [
|
|
41
|
+
searchForWorkspaceRoot(normalizedProjectRootPath),
|
|
42
|
+
devkit_1.workspaceRoot,
|
|
43
|
+
(0, devkit_1.joinPathFragments)(devkit_1.workspaceRoot, 'node_modules/vite'),
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}) }) });
|
|
49
|
+
}
|
|
50
|
+
exports.nxComponentTestingPreset = nxComponentTestingPreset;
|
|
51
|
+
function findViteConfig(projectRootFullPath) {
|
|
52
|
+
const allowsExt = ['js', 'mjs', 'ts', 'cjs', 'mts', 'cts'];
|
|
53
|
+
for (const ext of allowsExt) {
|
|
54
|
+
if ((0, fs_1.existsSync)((0, path_1.join)(projectRootFullPath, `vite.config.${ext}`))) {
|
|
55
|
+
return (0, path_1.join)(projectRootFullPath, `vite.config.${ext}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/remix/plugins/component-testing/index.ts"],"names":[],"mappings":";;;;AAAA,uEAAyE;AACzE,uCAA8D;AAE9D,2BAAgC;AAChC,+BAAqC;AAQrC;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,wBAAwB,CAAC,YAAoB;IAQ3D,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAC5D,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAC3B;QACC,CAAC,CAAC,YAAY;QACd,CAAC,CAAC,IAAA,cAAO,EAAC,YAAY,CAAC,CAAC;IAE1B,uCACK,IAAA,oCAAmB,EAAC,YAAY,CAAC,KACpC,WAAW,EAAE,6BAA6B,EAC1C,SAAS,kCACH,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAY,KACrD,UAAU,EAAE,GAAS,EAAE;gBACrB,MAAM,cAAc,GAAG,cAAc,CAAC,yBAAyB,CAAC,CAAC;gBAEjE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,GAC/D,2CAAa,MAAM,EAAC,CAAC;gBAEvB,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CACvC;oBACE,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,OAAO;iBACjB,EACD,cAAc,CACf,CAAC;gBACF,OAAO,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE;oBAClC,MAAM,EAAE;wBACN,EAAE,EAAE;4BACF,KAAK,EAAE;gCACL,sBAAsB,CAAC,yBAAyB,CAAC;gCACjD,sBAAa;gCACb,IAAA,0BAAiB,EAAC,sBAAa,EAAE,mBAAmB,CAAC;6BACtD;yBACF;qBACF;iBACF,CAAC,CAAC;YACL,CAAC,CAAA,OAEH;AACJ,CAAC;AA9CD,4DA8CC;AAED,SAAS,cAAc,CAAC,mBAA2B;IACjD,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAE3D,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE;QAC3B,IAAI,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,mBAAmB,EAAE,eAAe,GAAG,EAAE,CAAC,CAAC,EAAE;YAC/D,OAAO,IAAA,WAAI,EAAC,mBAAmB,EAAE,eAAe,GAAG,EAAE,CAAC,CAAC;SACxD;KACF;AACH,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const js_1 = require("@nx/js");
|
|
6
|
+
const fileutils_1 = require("@nx/workspace/src/utilities/fileutils");
|
|
7
|
+
const dev_1 = require("@remix-run/dev");
|
|
8
|
+
const fs_extra_1 = require("fs-extra");
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
function buildExecutor(options, context) {
|
|
11
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
const projectRoot = context.projectGraph.nodes[context.projectName].data.root;
|
|
13
|
+
try {
|
|
14
|
+
yield dev_1.cli.run(['build', projectRoot]);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
devkit_1.logger.error(`Error occurred while trying to build application.`);
|
|
18
|
+
devkit_1.logger.error(error.toString());
|
|
19
|
+
return { success: false };
|
|
20
|
+
}
|
|
21
|
+
if (!(0, fileutils_1.directoryExists)(options.outputPath)) {
|
|
22
|
+
(0, fs_extra_1.mkdir)(options.outputPath);
|
|
23
|
+
}
|
|
24
|
+
const builtPackageJson = (0, js_1.createPackageJson)(context.projectName, context.projectGraph, {
|
|
25
|
+
target: context.targetName,
|
|
26
|
+
root: context.root,
|
|
27
|
+
isProduction: !options.includeDevDependenciesInPackageJson, // By default we remove devDependencies since this is a production build.
|
|
28
|
+
});
|
|
29
|
+
// Update `package.json` to reflect how users should run the build artifacts
|
|
30
|
+
builtPackageJson.scripts = {
|
|
31
|
+
start: 'remix-serve build',
|
|
32
|
+
};
|
|
33
|
+
updatePackageJson(builtPackageJson, context);
|
|
34
|
+
(0, devkit_1.writeJsonFile)(`${options.outputPath}/package.json`, builtPackageJson);
|
|
35
|
+
if (options.generateLockfile) {
|
|
36
|
+
const lockFile = (0, js_1.createLockFile)(builtPackageJson);
|
|
37
|
+
(0, fs_extra_1.writeFileSync)(`${options.outputPath}/${(0, js_1.getLockFileName)()}`, lockFile, {
|
|
38
|
+
encoding: 'utf-8',
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// If output path is different from source path, then copy over the config and public files.
|
|
42
|
+
// This is the default behavior when running `nx build <app>`.
|
|
43
|
+
if (options.outputPath.replace(/\/$/, '') !== projectRoot) {
|
|
44
|
+
(0, fs_extra_1.copySync)((0, path_1.join)(projectRoot, 'public'), (0, path_1.join)(options.outputPath, 'public'), {
|
|
45
|
+
dereference: true,
|
|
46
|
+
});
|
|
47
|
+
(0, fs_extra_1.copySync)((0, path_1.join)(projectRoot, 'build'), (0, path_1.join)(options.outputPath, 'build'), {
|
|
48
|
+
dereference: true,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return { success: true };
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
exports.default = buildExecutor;
|
|
55
|
+
function updatePackageJson(packageJson, context) {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
var _c;
|
|
58
|
+
if (!packageJson.scripts) {
|
|
59
|
+
packageJson.scripts = {};
|
|
60
|
+
}
|
|
61
|
+
if (!packageJson.scripts.start) {
|
|
62
|
+
packageJson.scripts.start = 'remix-serve build';
|
|
63
|
+
}
|
|
64
|
+
(_a = packageJson.dependencies) !== null && _a !== void 0 ? _a : (packageJson.dependencies = {});
|
|
65
|
+
// These are always required for a production Remix app to run.
|
|
66
|
+
const requiredPackages = [
|
|
67
|
+
'react',
|
|
68
|
+
'react-dom',
|
|
69
|
+
'isbot',
|
|
70
|
+
'typescript',
|
|
71
|
+
'@remix-run/css-bundle',
|
|
72
|
+
'@remix-run/node',
|
|
73
|
+
'@remix-run/react',
|
|
74
|
+
'@remix-run/serve',
|
|
75
|
+
'@remix-run/dev',
|
|
76
|
+
];
|
|
77
|
+
for (const pkg of requiredPackages) {
|
|
78
|
+
const externalNode = context.projectGraph.externalNodes[`npm:${pkg}`];
|
|
79
|
+
if (externalNode) {
|
|
80
|
+
(_b = (_c = packageJson.dependencies)[pkg]) !== null && _b !== void 0 ? _b : (_c[pkg] = externalNode.data.version);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=build.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/executors/build/build.impl.ts"],"names":[],"mappings":";;;AAAA,uCAAyE;AACzE,+BAA4E;AAC5E,qEAAwE;AACxE,wCAAiD;AACjD,uCAA0D;AAE1D,+BAA4B;AAG5B,SAA8B,aAAa,CACzC,OAAyB,EACzB,OAAwB;;QAExB,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAE9E,IAAI;YACF,MAAM,SAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;SAC5C;QAAC,OAAO,KAAK,EAAE;YACd,eAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;YAClE,eAAM,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC/B,OAAO,EAAE,OAAO,EAA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E,OAAO,CAAC,EAAE,IAAA,WAAI,EAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE;gBACtE,WAAW,EAAE,IAAI;aAClB,CAAC,CAAC;SACJ;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CAAA;AAvDD,gCAuDC;AAED,SAAS,iBAAiB,CAAC,WAAwB,EAAE,OAAwB;;;IAC3E,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;QACxB,WAAW,CAAC,OAAO,GAAG,EAAE,CAAC;KAC1B;IACD,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE;QAC9B,WAAW,CAAC,OAAO,CAAC,KAAK,GAAG,mBAAmB,CAAC;KACjD;IAED,MAAA,WAAW,CAAC,YAAY,oCAAxB,WAAW,CAAC,YAAY,GAAK,EAAE,EAAC;IAEhC,+DAA+D;IAC/D,MAAM,gBAAgB,GAAG;QACvB,OAAO;QACP,WAAW;QACX,OAAO;QACP,YAAY;QACZ,uBAAuB;QACvB,iBAAiB;QACjB,kBAAkB;QAClB,kBAAkB;QAClB,gBAAgB;KACjB,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,gBAAgB,EAAE;QAClC,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;QACtE,IAAI,YAAY,EAAE;YAChB,YAAA,WAAW,CAAC,YAAY,EAAC,GAAG,wCAAH,GAAG,IAAM,YAAY,CAAC,IAAI,CAAC,OAAO,EAAC;SAC7D;KACF;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const build_impl_1 = require("./build.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(build_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/executors/build/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,6CAAyC;AAEzC,kBAAe,IAAA,0BAAiB,EAAC,oBAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "pipe",
|
|
4
|
+
"$schema": "http://json-schema.org/schema",
|
|
5
|
+
"cli": "nx",
|
|
6
|
+
"title": "Remix Build",
|
|
7
|
+
"description": "Build a Remix app.",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"outputPath": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The output path of the generated files.",
|
|
13
|
+
"x-completion-type": "directory",
|
|
14
|
+
"x-priority": "important"
|
|
15
|
+
},
|
|
16
|
+
"includeDevDependenciesInPackageJson": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"description": "Include `devDependencies` in the generated package.json file. By default only production `dependencies` are included.",
|
|
19
|
+
"default": false
|
|
20
|
+
},
|
|
21
|
+
"generateLockfile": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Generate a lockfile (e.g. package-lock.json) that matches the workspace lockfile to ensure package versions match.",
|
|
24
|
+
"default": false,
|
|
25
|
+
"x-priority": "internal"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": [
|
|
29
|
+
"outputPath"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const serve_impl_1 = require("./serve.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(serve_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/executors/serve/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,6CAAyC;AAEzC,kBAAe,IAAA,0BAAiB,EAAC,oBAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "pipe",
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"title": "Remix Serve",
|
|
6
|
+
"description": "Serve a Remix app.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"port": {
|
|
10
|
+
"type": "number",
|
|
11
|
+
"description": "Set PORT environment variable that can be used to serve the Remix application.",
|
|
12
|
+
"default": 4200
|
|
13
|
+
},
|
|
14
|
+
"devServerPort": {
|
|
15
|
+
"type": "number",
|
|
16
|
+
"description": "Port to start the dev server on."
|
|
17
|
+
},
|
|
18
|
+
"debug": {
|
|
19
|
+
"type": "boolean",
|
|
20
|
+
"description": "Attach a Node.js inspector.",
|
|
21
|
+
"default": false
|
|
22
|
+
},
|
|
23
|
+
"command": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Command used to run your app server."
|
|
26
|
+
},
|
|
27
|
+
"manual": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"description": "Enable manual mode",
|
|
30
|
+
"default": false
|
|
31
|
+
},
|
|
32
|
+
"tlsKey": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Path to TLS key (key.pem)."
|
|
35
|
+
},
|
|
36
|
+
"tlsCert": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "Path to TLS certificate (cert.pem)."
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { type RemixServeSchema } from './schema';
|
|
3
|
+
export default function serveExecutor(schema: RemixServeSchema, context: ExecutorContext): AsyncGenerator<{
|
|
4
|
+
success: boolean;
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
}, void, undefined>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
|
|
6
|
+
const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
function normalizeOptions(schema) {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
return Object.assign(Object.assign({}, schema), { port: (_a = schema.port) !== null && _a !== void 0 ? _a : 4200, debug: (_b = schema.debug) !== null && _b !== void 0 ? _b : false, manual: (_c = schema.manual) !== null && _c !== void 0 ? _c : false });
|
|
12
|
+
}
|
|
13
|
+
function buildRemixDevArgs(options) {
|
|
14
|
+
const args = [];
|
|
15
|
+
if (options.command) {
|
|
16
|
+
args.push(`--command=${options.command}`);
|
|
17
|
+
}
|
|
18
|
+
if (options.devServerPort) {
|
|
19
|
+
args.push(`--port=${options.devServerPort}`);
|
|
20
|
+
}
|
|
21
|
+
if (options.debug) {
|
|
22
|
+
args.push(`--debug`);
|
|
23
|
+
}
|
|
24
|
+
if (options.manual) {
|
|
25
|
+
args.push(`--manual`);
|
|
26
|
+
}
|
|
27
|
+
if (options.tlsKey) {
|
|
28
|
+
args.push(`--tls-key=${options.tlsKey}`);
|
|
29
|
+
}
|
|
30
|
+
if (options.tlsCert) {
|
|
31
|
+
args.push(`--tls-cert=${options.tlsCert}`);
|
|
32
|
+
}
|
|
33
|
+
return args;
|
|
34
|
+
}
|
|
35
|
+
function serveExecutor(schema, context) {
|
|
36
|
+
return tslib_1.__asyncGenerator(this, arguments, function* serveExecutor_1() {
|
|
37
|
+
const options = normalizeOptions(schema);
|
|
38
|
+
const projectRoot = context.workspace.projects[context.projectName].root;
|
|
39
|
+
const remixBin = require.resolve('@remix-run/dev/dist/cli');
|
|
40
|
+
const args = buildRemixDevArgs(options);
|
|
41
|
+
// Cast to any to overwrite NODE_ENV
|
|
42
|
+
process.env.NODE_ENV = process.env.NODE_ENV
|
|
43
|
+
? process.env.NODE_ENV
|
|
44
|
+
: 'development';
|
|
45
|
+
process.env.PORT = `${options.port}`;
|
|
46
|
+
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, async_iterable_1.createAsyncIterable)(({ done, next, error }) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const server = (0, node_child_process_1.fork)(remixBin, ['dev', ...args], {
|
|
48
|
+
cwd: (0, node_path_1.join)(devkit_1.workspaceRoot, projectRoot),
|
|
49
|
+
stdio: 'inherit',
|
|
50
|
+
});
|
|
51
|
+
server.once('exit', (code) => {
|
|
52
|
+
if (code === 0) {
|
|
53
|
+
done();
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
error(new Error(`Remix app exited with code ${code}`));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
const killServer = () => {
|
|
60
|
+
if (server.connected) {
|
|
61
|
+
server.kill('SIGTERM');
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
process.on('exit', () => killServer());
|
|
65
|
+
process.on('SIGINT', () => killServer());
|
|
66
|
+
process.on('SIGTERM', () => killServer());
|
|
67
|
+
process.on('SIGHUP', () => killServer());
|
|
68
|
+
yield (0, wait_for_port_open_1.waitForPortOpen)(options.port);
|
|
69
|
+
next({
|
|
70
|
+
success: true,
|
|
71
|
+
baseUrl: `http://localhost:${options.port}`,
|
|
72
|
+
});
|
|
73
|
+
})))));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
exports.default = serveExecutor;
|
|
77
|
+
//# sourceMappingURL=serve.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/executors/serve/serve.impl.ts"],"names":[],"mappings":";;;AAAA,uCAAiE;AACjE,wEAA0E;AAC1E,6EAAuE;AACvE,2DAA0C;AAC1C,yCAAiC;AAGjC,SAAS,gBAAgB,CAAC,MAAwB;;IAChD,OAAO,gCACF,MAAM,KACT,IAAI,EAAE,MAAA,MAAM,CAAC,IAAI,mCAAI,IAAI,EACzB,KAAK,EAAE,MAAA,MAAM,CAAC,KAAK,mCAAI,KAAK,EAC5B,MAAM,EAAE,MAAA,MAAM,CAAC,MAAM,mCAAI,KAAK,GACX,CAAC;AACxB,CAAC;AAED,SAAS,iBAAiB,CAAC,OAAyB;IAClD,MAAM,IAAI,GAAG,EAAE,CAAC;IAEhB,IAAI,OAAO,CAAC,OAAO,EAAE;QACnB,IAAI,CAAC,IAAI,CAAC,aAAa,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;KAC3C;IAED,IAAI,OAAO,CAAC,aAAa,EAAE;QACzB,IAAI,CAAC,IAAI,CAAC,UAAU,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI,OAAO,CAAC,KAAK,EAAE;QACjB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACtB;IAED,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACvB;IAED,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,IAAI,CAAC,IAAI,CAAC,aAAa,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;KAC1C;IAED,IAAI,OAAO,CAAC,OAAO,EAAE;QACnB,IAAI,CAAC,IAAI,CAAC,cAAc,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;KAC5C;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAA+B,a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AAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACxB;YACH,CAAC,CAAC;YACF,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;YACvC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;YACzC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;YAC1C,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;YAEzC,MAAM,IAAA,oCAAe,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAEpC,IAAI,CAAC;gBACH,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,oBAAoB,OAAO,CAAC,IAAI,EAAE;aAC5C,CAAC,CAAC;QACL,CAAC,CAAA,CACF,CAAA,CAAA,CAAA,CAAC;IACJ,CAAC;CAAA;AAhDD,gCAgDC"}
|
|
@@ -305,27 +305,18 @@ module.exports = {
|
|
|
305
305
|
|
|
306
306
|
exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using vitest 2`] = `
|
|
307
307
|
"/// <reference types=\\"vitest\\" />
|
|
308
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
308
309
|
import react from '@vitejs/plugin-react';
|
|
309
310
|
import { defineConfig } from 'vite';
|
|
310
|
-
import viteTsConfigPaths from 'vite-tsconfig-paths';
|
|
311
311
|
|
|
312
312
|
export default defineConfig({
|
|
313
313
|
cacheDir: '../../node_modules/.vite/test',
|
|
314
314
|
|
|
315
|
-
plugins: [
|
|
316
|
-
react(),
|
|
317
|
-
viteTsConfigPaths({
|
|
318
|
-
root: '../../',
|
|
319
|
-
}),
|
|
320
|
-
],
|
|
315
|
+
plugins: [react(), nxViteTsPaths()],
|
|
321
316
|
|
|
322
317
|
// Uncomment this if you are using workers.
|
|
323
318
|
// worker: {
|
|
324
|
-
// plugins: [
|
|
325
|
-
// viteTsConfigPaths({
|
|
326
|
-
// root: '../../',
|
|
327
|
-
// }),
|
|
328
|
-
// ],
|
|
319
|
+
// plugins: [ nxViteTsPaths() ],
|
|
329
320
|
// },
|
|
330
321
|
|
|
331
322
|
test: {
|
|
@@ -563,27 +554,18 @@ module.exports = {
|
|
|
563
554
|
|
|
564
555
|
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 2`] = `
|
|
565
556
|
"/// <reference types=\\"vitest\\" />
|
|
557
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
566
558
|
import react from '@vitejs/plugin-react';
|
|
567
559
|
import { defineConfig } from 'vite';
|
|
568
|
-
import viteTsConfigPaths from 'vite-tsconfig-paths';
|
|
569
560
|
|
|
570
561
|
export default defineConfig({
|
|
571
562
|
cacheDir: './node_modules/.vite/test',
|
|
572
563
|
|
|
573
|
-
plugins: [
|
|
574
|
-
react(),
|
|
575
|
-
viteTsConfigPaths({
|
|
576
|
-
root: './',
|
|
577
|
-
}),
|
|
578
|
-
],
|
|
564
|
+
plugins: [react(), nxViteTsPaths()],
|
|
579
565
|
|
|
580
566
|
// Uncomment this if you are using workers.
|
|
581
567
|
// worker: {
|
|
582
|
-
// plugins: [
|
|
583
|
-
// viteTsConfigPaths({
|
|
584
|
-
// root: './',
|
|
585
|
-
// }),
|
|
586
|
-
// ],
|
|
568
|
+
// plugins: [ nxViteTsPaths() ],
|
|
587
569
|
// },
|
|
588
570
|
|
|
589
571
|
test: {
|
|
@@ -17,15 +17,16 @@ function default_1(tree, _options) {
|
|
|
17
17
|
tags: options.parsedTags,
|
|
18
18
|
targets: {
|
|
19
19
|
build: {
|
|
20
|
-
|
|
20
|
+
executor: '@nx/remix:build',
|
|
21
|
+
outputs: ['{options.outputPath}'],
|
|
21
22
|
options: {
|
|
22
|
-
|
|
23
|
+
outputPath: (0, devkit_1.joinPathFragments)('dist', options.projectRoot),
|
|
23
24
|
},
|
|
24
25
|
},
|
|
25
26
|
serve: {
|
|
26
|
-
|
|
27
|
+
executor: `@nx/remix:serve`,
|
|
27
28
|
options: {
|
|
28
|
-
|
|
29
|
+
port: 4200,
|
|
29
30
|
},
|
|
30
31
|
},
|
|
31
32
|
start: {
|
|
@@ -84,6 +85,7 @@ function default_1(tree, _options) {
|
|
|
84
85
|
coverageProvider: 'c8',
|
|
85
86
|
inSourceTests: false,
|
|
86
87
|
skipFormat: true,
|
|
88
|
+
testEnvironment: 'jsdom',
|
|
87
89
|
});
|
|
88
90
|
tasks.push(vitestTask);
|
|
89
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":";;;AAAA,uCAcoB;AACpB,mFAAmF;AACnF,mDAU8B;AAC9B,0DAAuD;AACvD,+BAA+D;AAG/D,mBAA+B,IAAU,EAAE,QAAgC;;QACzE,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,IAAA,gCAAuB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE;YACjD,IAAI,EAAE,OAAO,CAAC,WAAW;YACzB,UAAU,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE;YACpC,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,OAAO,CAAC,UAAU;YACxB,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"application.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":";;;AAAA,uCAcoB;AACpB,mFAAmF;AACnF,mDAU8B;AAC9B,0DAAuD;AACvD,+BAA+D;AAG/D,mBAA+B,IAAU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est-dom': versions_1.testingLibraryJestDomVersion,
|
|
24
24
|
'@testing-library/react': versions_1.testingLibraryReactVersion,
|
|
25
25
|
'@testing-library/user-event': versions_1.testingLibraryUserEventsVersion,
|
|
26
|
+
'@remix-run/node': (0, versions_1.getRemixVersion)(tree),
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
exports.updateUnitTestConfig = updateUnitTestConfig;
|