@nx/remix 17.0.0 → 17.0.4
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/LICENSE +1 -1
- package/README.md +32 -89
- package/executors.json +0 -12
- package/generators.d.ts +14 -0
- package/generators.js +31 -0
- package/generators.json +14 -19
- package/index.d.ts +1 -0
- package/index.js +5 -0
- package/migrations.json +68 -86
- package/package.json +44 -13
- package/plugin.d.ts +1 -0
- package/plugin.js +6 -0
- package/plugins/component-testing/index.js +11 -6
- package/src/executors/build/build.impl.js +64 -74
- package/src/executors/build/schema.json +1 -1
- package/src/executors/serve/serve.impl.js +43 -43
- package/src/generators/action/action.impl.js +24 -26
- package/src/generators/action/schema.d.ts +7 -1
- package/src/generators/action/schema.json +11 -8
- package/src/generators/application/__snapshots__/application.impl.spec.ts.snap +1119 -305
- package/src/generators/application/application.impl.d.ts +3 -1
- package/src/generators/application/application.impl.js +171 -110
- package/src/generators/application/files/common/app/nx-welcome.tsx__tmpl__ +886 -0
- package/src/generators/application/files/common/app/root.tsx__tmpl__ +3 -3
- package/src/generators/application/files/common/app/routes/_index.tsx__tmpl__ +9 -0
- package/src/generators/application/files/common/remix.config.js__tmpl__ +13 -7
- package/src/generators/application/files/common/tests/routes/_index.spec.tsx__tmpl__ +16 -0
- package/src/generators/application/files/common/tsconfig.app.json__tmpl__ +20 -0
- package/src/generators/application/files/common/tsconfig.json__tmpl__ +20 -14
- package/src/generators/application/files/integrated/package.json__tmpl__ +1 -0
- package/src/generators/application/lib/add-e2e.d.ts +3 -0
- package/src/generators/application/lib/add-e2e.js +68 -0
- package/src/generators/application/lib/index.d.ts +1 -0
- package/src/generators/application/lib/index.js +1 -1
- package/src/generators/application/lib/normalize-options.d.ts +8 -3
- package/src/generators/application/lib/normalize-options.js +52 -14
- package/src/generators/application/lib/update-unit-test-config.d.ts +1 -1
- package/src/generators/application/lib/update-unit-test-config.js +32 -7
- package/src/generators/application/schema.d.ts +7 -1
- package/src/generators/application/schema.json +17 -11
- package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.d.ts +3 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.js +26 -17
- package/src/generators/cypress-component-configuration/schema.d.ts +1 -0
- package/src/generators/error-boundary/__snapshots__/error-boundary.impl.spec.ts.snap +39 -27
- package/src/generators/error-boundary/error-boundary.impl.js +6 -15
- package/src/generators/error-boundary/lib/add-v2-error-boundary.js +11 -16
- package/src/generators/error-boundary/lib/index.d.ts +0 -1
- package/src/generators/error-boundary/lib/index.js +0 -2
- package/src/generators/error-boundary/lib/normalize-options.d.ts +1 -1
- package/src/generators/error-boundary/lib/normalize-options.js +9 -5
- package/src/generators/error-boundary/schema.d.ts +7 -2
- package/src/generators/error-boundary/schema.json +14 -16
- package/src/generators/init/init.d.ts +5 -0
- package/src/generators/init/init.js +60 -0
- package/src/generators/init/schema.d.ts +7 -0
- package/src/generators/init/schema.json +33 -0
- package/src/generators/library/__snapshots__/library.impl.spec.ts.snap +157 -0
- package/src/generators/library/lib/add-tsconfig-entry-points.js +0 -1
- package/src/generators/library/lib/add-unit-testing.js +5 -7
- package/src/generators/library/lib/index.js +0 -1
- package/src/generators/library/lib/normalize-options.d.ts +3 -2
- package/src/generators/library/lib/normalize-options.js +21 -11
- package/src/generators/library/lib/update-buildable-config.js +5 -2
- package/src/generators/library/library.impl.d.ts +3 -1
- package/src/generators/library/library.impl.js +37 -33
- package/src/generators/library/schema.d.ts +3 -0
- package/src/generators/library/schema.json +7 -1
- package/src/generators/loader/loader.impl.js +24 -26
- package/src/generators/loader/schema.d.ts +7 -1
- package/src/generators/loader/schema.json +11 -8
- package/src/generators/meta/lib/v2.impl.js +14 -16
- package/src/generators/meta/meta.impl.js +2 -17
- package/src/generators/meta/schema.d.ts +7 -2
- package/src/generators/meta/schema.json +11 -12
- package/src/generators/preset/lib/normalize-options.js +5 -3
- package/src/generators/preset/preset.impl.js +22 -23
- package/src/generators/preset/schema.json +2 -1
- package/src/generators/resource-route/__snapshots__/resource-route.impl.spec.ts.snap +21 -0
- package/src/generators/resource-route/resource-route.impl.js +32 -26
- package/src/generators/resource-route/schema.d.ts +7 -1
- package/src/generators/resource-route/schema.json +11 -8
- package/src/generators/route/__snapshots__/route.impl.spec.ts.snap +62 -9
- package/src/generators/route/route.impl.js +56 -43
- package/src/generators/route/schema.d.ts +7 -1
- package/src/generators/route/schema.json +12 -9
- package/src/generators/setup/schema.json +2 -1
- package/src/generators/setup/setup.impl.js +23 -23
- package/src/generators/setup-tailwind/__snapshots__/setup-tailwind.impl.spec.ts.snap +51 -33
- package/src/generators/setup-tailwind/lib/index.js +0 -1
- package/src/generators/setup-tailwind/lib/update-remix-config.js +3 -7
- package/src/generators/setup-tailwind/schema.json +2 -1
- package/src/generators/setup-tailwind/setup-tailwind.impl.js +25 -29
- package/src/generators/storybook-configuration/__snapshots__/storybook-configuration.impl.spec.ts.snap +15 -27
- package/src/generators/storybook-configuration/schema.d.ts +2 -1
- package/src/generators/storybook-configuration/schema.json +5 -12
- package/src/generators/storybook-configuration/storybook-configuration.impl.d.ts +2 -1
- package/src/generators/storybook-configuration/storybook-configuration.impl.js +19 -12
- package/src/generators/style/schema.d.ts +7 -1
- package/src/generators/style/schema.json +13 -10
- package/src/generators/style/style.impl.js +32 -24
- package/src/generators/utils/update-dependencies.d.ts +2 -0
- package/src/generators/utils/update-dependencies.js +21 -0
- package/src/plugins/__snapshots__/plugin.spec.ts.snap +113 -0
- package/src/plugins/plugin.d.ts +9 -0
- package/src/plugins/plugin.js +134 -0
- package/src/utils/create-watch-paths.js +8 -13
- package/src/utils/get-default-export-name.js +1 -3
- package/src/utils/get-default-export.js +0 -1
- package/src/utils/insert-import.js +0 -1
- package/src/utils/insert-statement-after-imports.js +0 -1
- package/src/utils/insert-statement-in-default-function.js +0 -1
- package/src/utils/remix-config.d.ts +2 -2
- package/src/utils/remix-config.js +34 -11
- package/src/utils/remix-route-utils.d.ts +2 -2
- package/src/utils/remix-route-utils.js +23 -17
- package/src/utils/testing-config-utils.d.ts +3 -2
- package/src/utils/testing-config-utils.js +24 -10
- package/src/utils/upsert-links-function.js +0 -1
- package/src/utils/versions.d.ts +10 -9
- package/src/utils/versions.js +15 -15
- package/plugins/component-testing/index.js.map +0 -1
- package/src/executors/build/build.impl.js.map +0 -1
- package/src/executors/build/compat.d.ts +0 -2
- package/src/executors/build/compat.js +0 -6
- package/src/executors/build/compat.js.map +0 -1
- package/src/executors/serve/compat.d.ts +0 -2
- package/src/executors/serve/compat.js +0 -6
- package/src/executors/serve/compat.js.map +0 -1
- package/src/executors/serve/serve.impl.js.map +0 -1
- package/src/generators/action/action.impl.js.map +0 -1
- package/src/generators/application/application.impl.js.map +0 -1
- package/src/generators/application/files/common/app/routes/index.tsx__tmpl__ +0 -32
- package/src/generators/application/lib/index.js.map +0 -1
- package/src/generators/application/lib/normalize-options.js.map +0 -1
- package/src/generators/application/lib/update-unit-test-config.js.map +0 -1
- package/src/generators/cypress/cypress.impl.d.ts +0 -3
- package/src/generators/cypress/cypress.impl.js +0 -67
- package/src/generators/cypress/cypress.impl.js.map +0 -1
- package/src/generators/cypress/schema.d.ts +0 -10
- package/src/generators/cypress/schema.json +0 -55
- package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.js.map +0 -1
- package/src/generators/error-boundary/error-boundary.impl.js.map +0 -1
- package/src/generators/error-boundary/lib/add-v1-error-boundary.d.ts +0 -3
- package/src/generators/error-boundary/lib/add-v1-error-boundary.js +0 -21
- package/src/generators/error-boundary/lib/add-v1-error-boundary.js.map +0 -1
- package/src/generators/error-boundary/lib/add-v2-error-boundary.js.map +0 -1
- package/src/generators/error-boundary/lib/index.js.map +0 -1
- package/src/generators/error-boundary/lib/normalize-options.js.map +0 -1
- package/src/generators/library/lib/add-tsconfig-entry-points.js.map +0 -1
- package/src/generators/library/lib/add-unit-testing.js.map +0 -1
- package/src/generators/library/lib/index.js.map +0 -1
- package/src/generators/library/lib/normalize-options.js.map +0 -1
- package/src/generators/library/lib/update-buildable-config.js.map +0 -1
- package/src/generators/library/library.impl.js.map +0 -1
- package/src/generators/loader/loader.impl.js.map +0 -1
- package/src/generators/meta/lib/normalize-options.d.ts +0 -3
- package/src/generators/meta/lib/normalize-options.js +0 -15
- package/src/generators/meta/lib/normalize-options.js.map +0 -1
- package/src/generators/meta/lib/v1.impl.d.ts +0 -3
- package/src/generators/meta/lib/v1.impl.js +0 -30
- package/src/generators/meta/lib/v1.impl.js.map +0 -1
- package/src/generators/meta/lib/v2.impl.js.map +0 -1
- package/src/generators/meta/meta.impl.js.map +0 -1
- package/src/generators/preset/lib/normalize-options.js.map +0 -1
- package/src/generators/preset/preset.impl.js.map +0 -1
- package/src/generators/resource-route/resource-route.impl.js.map +0 -1
- package/src/generators/route/route.impl.js.map +0 -1
- package/src/generators/setup/setup.impl.js.map +0 -1
- package/src/generators/setup-tailwind/lib/index.js.map +0 -1
- package/src/generators/setup-tailwind/lib/update-remix-config.js.map +0 -1
- package/src/generators/setup-tailwind/setup-tailwind.impl.js.map +0 -1
- package/src/generators/storybook-configuration/storybook-configuration.impl.js.map +0 -1
- package/src/generators/style/style.impl.js.map +0 -1
- package/src/index.d.ts +0 -15
- package/src/index.js +0 -21
- package/src/index.js.map +0 -1
- package/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.d.ts +0 -6
- package/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.js +0 -45
- package/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.js.map +0 -1
- package/src/migrations/update-15-8-6/update-remix-env-d.d.ts +0 -6
- package/src/migrations/update-15-8-6/update-remix-env-d.js +0 -27
- package/src/migrations/update-15-8-6/update-remix-env-d.js.map +0 -1
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +0 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -13
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +0 -1
- package/src/utils/create-watch-paths.js.map +0 -1
- package/src/utils/get-default-export-name.js.map +0 -1
- package/src/utils/get-default-export.js.map +0 -1
- package/src/utils/get-remix-projects.d.ts +0 -2
- package/src/utils/get-remix-projects.js +0 -15
- package/src/utils/get-remix-projects.js.map +0 -1
- package/src/utils/insert-import.js.map +0 -1
- package/src/utils/insert-statement-after-imports.js.map +0 -1
- package/src/utils/insert-statement-in-default-function.js.map +0 -1
- package/src/utils/project.d.ts +0 -2
- package/src/utils/project.js +0 -15
- package/src/utils/project.js.map +0 -1
- package/src/utils/remix-config.js.map +0 -1
- package/src/utils/remix-route-utils.js.map +0 -1
- package/src/utils/testing-config-utils.js.map +0 -1
- package/src/utils/upsert-links-function.js.map +0 -1
- package/src/utils/versions.js.map +0 -1
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Remix Application Integrated Repo --directory should create the application correctly 1`] = `
|
|
4
|
-
"
|
|
3
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --directory should create the application correctly 1`] = `
|
|
4
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
5
|
+
import { dirname } from 'path';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
|
|
10
|
+
/**
|
|
5
11
|
* @type {import('@remix-run/dev').AppConfig}
|
|
6
12
|
*/
|
|
7
|
-
|
|
13
|
+
export default {
|
|
8
14
|
ignoredRouteFiles: ['**/.*'],
|
|
9
|
-
// appDirectory:
|
|
10
|
-
// assetsBuildDirectory:
|
|
11
|
-
// serverBuildPath:
|
|
12
|
-
// publicPath:
|
|
13
|
-
watchPaths: () =>
|
|
15
|
+
// appDirectory: "app",
|
|
16
|
+
// assetsBuildDirectory: "public/build",
|
|
17
|
+
// serverBuildPath: "build/index.js",
|
|
18
|
+
// publicPath: "/build/",
|
|
19
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
14
20
|
};
|
|
15
21
|
"
|
|
16
22
|
`;
|
|
17
23
|
|
|
18
|
-
exports[`Remix Application Integrated Repo --directory should create the application correctly 2`] = `
|
|
24
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --directory should create the application correctly 2`] = `
|
|
19
25
|
"import type { MetaFunction } from '@remix-run/node';
|
|
20
26
|
import {
|
|
21
27
|
Links,
|
|
@@ -26,15 +32,17 @@ import {
|
|
|
26
32
|
ScrollRestoration,
|
|
27
33
|
} from '@remix-run/react';
|
|
28
34
|
|
|
29
|
-
export const meta: MetaFunction = () =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
export const meta: MetaFunction = () => [
|
|
36
|
+
{
|
|
37
|
+
charset: 'utf-8',
|
|
38
|
+
title: 'New Remix App',
|
|
39
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
34
42
|
|
|
35
43
|
export default function App() {
|
|
36
44
|
return (
|
|
37
|
-
<html lang
|
|
45
|
+
<html lang="en">
|
|
38
46
|
<head>
|
|
39
47
|
<Meta />
|
|
40
48
|
<Links />
|
|
@@ -51,58 +59,41 @@ export default function App() {
|
|
|
51
59
|
"
|
|
52
60
|
`;
|
|
53
61
|
|
|
54
|
-
exports[`Remix Application Integrated Repo --directory should create the application correctly 3`] = `
|
|
55
|
-
"
|
|
62
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --directory should create the application correctly 3`] = `
|
|
63
|
+
"import NxWelcome from '../nx-welcome';
|
|
64
|
+
|
|
65
|
+
export default function Index() {
|
|
56
66
|
return (
|
|
57
|
-
<div
|
|
58
|
-
<
|
|
59
|
-
<ul>
|
|
60
|
-
<li>
|
|
61
|
-
<a
|
|
62
|
-
target=\\"_blank\\"
|
|
63
|
-
href=\\"https://remix.run/tutorials/blog\\"
|
|
64
|
-
rel=\\"noreferrer\\"
|
|
65
|
-
>
|
|
66
|
-
15m Quickstart Blog Tutorial
|
|
67
|
-
</a>
|
|
68
|
-
</li>
|
|
69
|
-
<li>
|
|
70
|
-
<a
|
|
71
|
-
target=\\"_blank\\"
|
|
72
|
-
href=\\"https://remix.run/tutorials/jokes\\"
|
|
73
|
-
rel=\\"noreferrer\\"
|
|
74
|
-
>
|
|
75
|
-
Deep Dive Jokes App Tutorial
|
|
76
|
-
</a>
|
|
77
|
-
</li>
|
|
78
|
-
<li>
|
|
79
|
-
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
80
|
-
Remix Docs
|
|
81
|
-
</a>
|
|
82
|
-
</li>
|
|
83
|
-
</ul>
|
|
67
|
+
<div>
|
|
68
|
+
<NxWelcome title={'test'} />
|
|
84
69
|
</div>
|
|
85
70
|
);
|
|
86
71
|
}
|
|
87
72
|
"
|
|
88
73
|
`;
|
|
89
74
|
|
|
90
|
-
exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 1`] = `
|
|
91
|
-
"
|
|
75
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --directory should extract the layout directory from the directory options if it exists 1`] = `
|
|
76
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
77
|
+
import { dirname } from 'path';
|
|
78
|
+
import { fileURLToPath } from 'url';
|
|
79
|
+
|
|
80
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
81
|
+
|
|
82
|
+
/**
|
|
92
83
|
* @type {import('@remix-run/dev').AppConfig}
|
|
93
84
|
*/
|
|
94
|
-
|
|
85
|
+
export default {
|
|
95
86
|
ignoredRouteFiles: ['**/.*'],
|
|
96
|
-
// appDirectory:
|
|
97
|
-
// assetsBuildDirectory:
|
|
98
|
-
// serverBuildPath:
|
|
99
|
-
// publicPath:
|
|
100
|
-
watchPaths: () =>
|
|
87
|
+
// appDirectory: "app",
|
|
88
|
+
// assetsBuildDirectory: "public/build",
|
|
89
|
+
// serverBuildPath: "build/index.js",
|
|
90
|
+
// publicPath: "/build/",
|
|
91
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
101
92
|
};
|
|
102
93
|
"
|
|
103
94
|
`;
|
|
104
95
|
|
|
105
|
-
exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 2`] = `
|
|
96
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --directory should extract the layout directory from the directory options if it exists 2`] = `
|
|
106
97
|
"import type { MetaFunction } from '@remix-run/node';
|
|
107
98
|
import {
|
|
108
99
|
Links,
|
|
@@ -113,15 +104,17 @@ import {
|
|
|
113
104
|
ScrollRestoration,
|
|
114
105
|
} from '@remix-run/react';
|
|
115
106
|
|
|
116
|
-
export const meta: MetaFunction = () =>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
107
|
+
export const meta: MetaFunction = () => [
|
|
108
|
+
{
|
|
109
|
+
charset: 'utf-8',
|
|
110
|
+
title: 'New Remix App',
|
|
111
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
112
|
+
},
|
|
113
|
+
];
|
|
121
114
|
|
|
122
115
|
export default function App() {
|
|
123
116
|
return (
|
|
124
|
-
<html lang
|
|
117
|
+
<html lang="en">
|
|
125
118
|
<head>
|
|
126
119
|
<Meta />
|
|
127
120
|
<Links />
|
|
@@ -138,58 +131,131 @@ export default function App() {
|
|
|
138
131
|
"
|
|
139
132
|
`;
|
|
140
133
|
|
|
141
|
-
exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 3`] = `
|
|
142
|
-
"
|
|
134
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --directory should extract the layout directory from the directory options if it exists 3`] = `
|
|
135
|
+
"import NxWelcome from '../nx-welcome';
|
|
136
|
+
|
|
137
|
+
export default function Index() {
|
|
143
138
|
return (
|
|
144
|
-
<div
|
|
145
|
-
<
|
|
146
|
-
<ul>
|
|
147
|
-
<li>
|
|
148
|
-
<a
|
|
149
|
-
target=\\"_blank\\"
|
|
150
|
-
href=\\"https://remix.run/tutorials/blog\\"
|
|
151
|
-
rel=\\"noreferrer\\"
|
|
152
|
-
>
|
|
153
|
-
15m Quickstart Blog Tutorial
|
|
154
|
-
</a>
|
|
155
|
-
</li>
|
|
156
|
-
<li>
|
|
157
|
-
<a
|
|
158
|
-
target=\\"_blank\\"
|
|
159
|
-
href=\\"https://remix.run/tutorials/jokes\\"
|
|
160
|
-
rel=\\"noreferrer\\"
|
|
161
|
-
>
|
|
162
|
-
Deep Dive Jokes App Tutorial
|
|
163
|
-
</a>
|
|
164
|
-
</li>
|
|
165
|
-
<li>
|
|
166
|
-
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
167
|
-
Remix Docs
|
|
168
|
-
</a>
|
|
169
|
-
</li>
|
|
170
|
-
</ul>
|
|
139
|
+
<div>
|
|
140
|
+
<NxWelcome title={'test'} />
|
|
171
141
|
</div>
|
|
172
142
|
);
|
|
173
143
|
}
|
|
174
144
|
"
|
|
175
145
|
`;
|
|
176
146
|
|
|
177
|
-
exports[`Remix Application Integrated Repo --
|
|
178
|
-
"
|
|
147
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --e2eTestRunner should generate a cypress e2e application for the app 1`] = `
|
|
148
|
+
"import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
|
|
149
|
+
|
|
150
|
+
import { defineConfig } from 'cypress';
|
|
151
|
+
|
|
152
|
+
export default defineConfig({
|
|
153
|
+
e2e: {
|
|
154
|
+
...nxE2EPreset(__filename, {
|
|
155
|
+
cypressDir: 'src',
|
|
156
|
+
webServerCommands: { default: 'nx run test:dev:development' },
|
|
157
|
+
}),
|
|
158
|
+
baseUrl: 'http://localhost:3000',
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
"
|
|
162
|
+
`;
|
|
163
|
+
|
|
164
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --e2eTestRunner should generate a playwright e2e application for the app 1`] = `
|
|
165
|
+
"import { defineConfig, devices } from '@playwright/test';
|
|
166
|
+
import { nxE2EPreset } from '@nx/playwright/preset';
|
|
167
|
+
|
|
168
|
+
import { workspaceRoot } from '@nx/devkit';
|
|
169
|
+
|
|
170
|
+
// For CI, you may want to set BASE_URL to the deployed application.
|
|
171
|
+
const baseURL = process.env['BASE_URL'] || 'http://localhost:3000';
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Read environment variables from file.
|
|
175
|
+
* https://github.com/motdotla/dotenv
|
|
176
|
+
*/
|
|
177
|
+
// require('dotenv').config();
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
181
|
+
*/
|
|
182
|
+
export default defineConfig({
|
|
183
|
+
...nxE2EPreset(__filename, { testDir: './src' }),
|
|
184
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
185
|
+
use: {
|
|
186
|
+
baseURL,
|
|
187
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
188
|
+
trace: 'on-first-retry',
|
|
189
|
+
},
|
|
190
|
+
/* Run your local dev server before starting the tests */
|
|
191
|
+
webServer: {
|
|
192
|
+
command: 'pnpm exec nx dev test',
|
|
193
|
+
url: 'http://localhost:3000',
|
|
194
|
+
reuseExistingServer: !process.env.CI,
|
|
195
|
+
cwd: workspaceRoot,
|
|
196
|
+
},
|
|
197
|
+
projects: [
|
|
198
|
+
{
|
|
199
|
+
name: 'chromium',
|
|
200
|
+
use: { ...devices['Desktop Chrome'] },
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
{
|
|
204
|
+
name: 'firefox',
|
|
205
|
+
use: { ...devices['Desktop Firefox'] },
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
{
|
|
209
|
+
name: 'webkit',
|
|
210
|
+
use: { ...devices['Desktop Safari'] },
|
|
211
|
+
},
|
|
212
|
+
|
|
213
|
+
// Uncomment for mobile browsers support
|
|
214
|
+
/* {
|
|
215
|
+
name: 'Mobile Chrome',
|
|
216
|
+
use: { ...devices['Pixel 5'] },
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: 'Mobile Safari',
|
|
220
|
+
use: { ...devices['iPhone 12'] },
|
|
221
|
+
}, */
|
|
222
|
+
|
|
223
|
+
// Uncomment for branded browsers
|
|
224
|
+
/* {
|
|
225
|
+
name: 'Microsoft Edge',
|
|
226
|
+
use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'Google Chrome',
|
|
230
|
+
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
231
|
+
} */
|
|
232
|
+
],
|
|
233
|
+
});
|
|
234
|
+
"
|
|
235
|
+
`;
|
|
236
|
+
|
|
237
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --js should create the application correctly 1`] = `
|
|
238
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
239
|
+
import { dirname } from 'path';
|
|
240
|
+
import { fileURLToPath } from 'url';
|
|
241
|
+
|
|
242
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
243
|
+
|
|
244
|
+
/**
|
|
179
245
|
* @type {import('@remix-run/dev').AppConfig}
|
|
180
246
|
*/
|
|
181
|
-
|
|
247
|
+
export default {
|
|
182
248
|
ignoredRouteFiles: ['**/.*'],
|
|
183
|
-
// appDirectory:
|
|
184
|
-
// assetsBuildDirectory:
|
|
185
|
-
// serverBuildPath:
|
|
186
|
-
// publicPath:
|
|
187
|
-
watchPaths: () =>
|
|
249
|
+
// appDirectory: "app",
|
|
250
|
+
// assetsBuildDirectory: "public/build",
|
|
251
|
+
// serverBuildPath: "build/index.js",
|
|
252
|
+
// publicPath: "/build/",
|
|
253
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
188
254
|
};
|
|
189
255
|
"
|
|
190
256
|
`;
|
|
191
257
|
|
|
192
|
-
exports[`Remix Application Integrated Repo --js should create the application correctly 2`] = `
|
|
258
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --js should create the application correctly 2`] = `
|
|
193
259
|
"import {
|
|
194
260
|
Links,
|
|
195
261
|
LiveReload,
|
|
@@ -198,14 +264,298 @@ exports[`Remix Application Integrated Repo --js should create the application co
|
|
|
198
264
|
Scripts,
|
|
199
265
|
ScrollRestoration,
|
|
200
266
|
} from '@remix-run/react';
|
|
201
|
-
export const meta = () =>
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
267
|
+
export const meta = () => [
|
|
268
|
+
{
|
|
269
|
+
charset: 'utf-8',
|
|
270
|
+
title: 'New Remix App',
|
|
271
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
272
|
+
},
|
|
273
|
+
];
|
|
274
|
+
export default function App() {
|
|
275
|
+
return (
|
|
276
|
+
<html lang="en">
|
|
277
|
+
<head>
|
|
278
|
+
<Meta />
|
|
279
|
+
<Links />
|
|
280
|
+
</head>
|
|
281
|
+
<body>
|
|
282
|
+
<Outlet />
|
|
283
|
+
<ScrollRestoration />
|
|
284
|
+
<Scripts />
|
|
285
|
+
<LiveReload />
|
|
286
|
+
</body>
|
|
287
|
+
</html>
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
"
|
|
291
|
+
`;
|
|
292
|
+
|
|
293
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --js should create the application correctly 3`] = `
|
|
294
|
+
"import NxWelcome from '../nx-welcome';
|
|
295
|
+
export default function Index() {
|
|
296
|
+
return (
|
|
297
|
+
<div>
|
|
298
|
+
<NxWelcome title={'test'} />
|
|
299
|
+
</div>
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
"
|
|
303
|
+
`;
|
|
304
|
+
|
|
305
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --unitTestRunner should generate the correct files for testing using jest 1`] = `
|
|
306
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
307
|
+
import { dirname } from 'path';
|
|
308
|
+
import { fileURLToPath } from 'url';
|
|
309
|
+
|
|
310
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
314
|
+
*/
|
|
315
|
+
export default {
|
|
316
|
+
ignoredRouteFiles: ['**/.*'],
|
|
317
|
+
// appDirectory: "app",
|
|
318
|
+
// assetsBuildDirectory: "public/build",
|
|
319
|
+
// serverBuildPath: "build/index.js",
|
|
320
|
+
// publicPath: "/build/",
|
|
321
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
322
|
+
};
|
|
323
|
+
"
|
|
324
|
+
`;
|
|
325
|
+
|
|
326
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --unitTestRunner should generate the correct files for testing using jest 2`] = `
|
|
327
|
+
"/* eslint-disable */
|
|
328
|
+
export default {
|
|
329
|
+
displayName: 'test',
|
|
330
|
+
preset: '../jest.preset.js',
|
|
331
|
+
transform: {
|
|
332
|
+
'^.+\\\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
|
333
|
+
},
|
|
334
|
+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
335
|
+
coverageDirectory: '../coverage/test',
|
|
336
|
+
};
|
|
337
|
+
"
|
|
338
|
+
`;
|
|
339
|
+
|
|
340
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --unitTestRunner should generate the correct files for testing using jest 3`] = `
|
|
341
|
+
"import { installGlobals } from '@remix-run/node';
|
|
342
|
+
import '@testing-library/jest-dom/matchers';
|
|
343
|
+
installGlobals();
|
|
344
|
+
"
|
|
345
|
+
`;
|
|
346
|
+
|
|
347
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --unitTestRunner should generate the correct files for testing using vitest 1`] = `
|
|
348
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
349
|
+
import { dirname } from 'path';
|
|
350
|
+
import { fileURLToPath } from 'url';
|
|
351
|
+
|
|
352
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
356
|
+
*/
|
|
357
|
+
export default {
|
|
358
|
+
ignoredRouteFiles: ['**/.*'],
|
|
359
|
+
// appDirectory: "app",
|
|
360
|
+
// assetsBuildDirectory: "public/build",
|
|
361
|
+
// serverBuildPath: "build/index.js",
|
|
362
|
+
// publicPath: "/build/",
|
|
363
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
364
|
+
};
|
|
365
|
+
"
|
|
366
|
+
`;
|
|
367
|
+
|
|
368
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --unitTestRunner should generate the correct files for testing using vitest 2`] = `
|
|
369
|
+
"/// <reference types='vitest' />
|
|
370
|
+
import { defineConfig } from 'vite';
|
|
371
|
+
import react from '@vitejs/plugin-react';
|
|
372
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
373
|
+
|
|
374
|
+
export default defineConfig({
|
|
375
|
+
root: __dirname,
|
|
376
|
+
cacheDir: '../node_modules/.vite/test',
|
|
377
|
+
|
|
378
|
+
plugins: [react(), nxViteTsPaths()],
|
|
379
|
+
|
|
380
|
+
// Uncomment this if you are using workers.
|
|
381
|
+
// worker: {
|
|
382
|
+
// plugins: [ nxViteTsPaths() ],
|
|
383
|
+
// },
|
|
384
|
+
|
|
385
|
+
test: {
|
|
386
|
+
setupFiles: ['test-setup.ts'],
|
|
387
|
+
globals: true,
|
|
388
|
+
cache: {
|
|
389
|
+
dir: '../node_modules/.vitest',
|
|
390
|
+
},
|
|
391
|
+
environment: 'jsdom',
|
|
392
|
+
include: ['./tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
393
|
+
|
|
394
|
+
reporters: ['default'],
|
|
395
|
+
coverage: {
|
|
396
|
+
reportsDirectory: '../coverage/test',
|
|
397
|
+
provider: 'v8',
|
|
398
|
+
},
|
|
399
|
+
},
|
|
205
400
|
});
|
|
401
|
+
"
|
|
402
|
+
`;
|
|
403
|
+
|
|
404
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --unitTestRunner should generate the correct files for testing using vitest 3`] = `
|
|
405
|
+
"import { installGlobals } from '@remix-run/node';
|
|
406
|
+
import '@testing-library/jest-dom/matchers';
|
|
407
|
+
installGlobals();
|
|
408
|
+
"
|
|
409
|
+
`;
|
|
410
|
+
|
|
411
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --unitTestRunner should generate the correct files for testing using vitest 4`] = `
|
|
412
|
+
"{
|
|
413
|
+
"extends": "./tsconfig.json",
|
|
414
|
+
"compilerOptions": {
|
|
415
|
+
"outDir": "../dist/out-tsc",
|
|
416
|
+
"types": [
|
|
417
|
+
"vitest/globals",
|
|
418
|
+
"vitest/importMeta",
|
|
419
|
+
"vite/client",
|
|
420
|
+
"node",
|
|
421
|
+
"vitest"
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
"include": [
|
|
425
|
+
"vite.config.ts",
|
|
426
|
+
"vitest.config.ts",
|
|
427
|
+
"app/**/*.ts",
|
|
428
|
+
"app/**/*.tsx",
|
|
429
|
+
"app/**/*.js",
|
|
430
|
+
"app/**/*.jsx",
|
|
431
|
+
"tests/**/*.spec.ts",
|
|
432
|
+
"tests/**/*.test.ts",
|
|
433
|
+
"tests/**/*.spec.tsx",
|
|
434
|
+
"tests/**/*.test.tsx",
|
|
435
|
+
"tests/**/*.spec.js",
|
|
436
|
+
"tests/**/*.test.js",
|
|
437
|
+
"tests/**/*.spec.jsx",
|
|
438
|
+
"tests/**/*.test.jsx"
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
"
|
|
442
|
+
`;
|
|
443
|
+
|
|
444
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided should create the application correctly 1`] = `
|
|
445
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
446
|
+
import { dirname } from 'path';
|
|
447
|
+
import { fileURLToPath } from 'url';
|
|
448
|
+
|
|
449
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
453
|
+
*/
|
|
454
|
+
export default {
|
|
455
|
+
ignoredRouteFiles: ['**/.*'],
|
|
456
|
+
// appDirectory: "app",
|
|
457
|
+
// assetsBuildDirectory: "public/build",
|
|
458
|
+
// serverBuildPath: "build/index.js",
|
|
459
|
+
// publicPath: "/build/",
|
|
460
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
461
|
+
};
|
|
462
|
+
"
|
|
463
|
+
`;
|
|
464
|
+
|
|
465
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided should create the application correctly 2`] = `
|
|
466
|
+
"import type { MetaFunction } from '@remix-run/node';
|
|
467
|
+
import {
|
|
468
|
+
Links,
|
|
469
|
+
LiveReload,
|
|
470
|
+
Meta,
|
|
471
|
+
Outlet,
|
|
472
|
+
Scripts,
|
|
473
|
+
ScrollRestoration,
|
|
474
|
+
} from '@remix-run/react';
|
|
475
|
+
|
|
476
|
+
export const meta: MetaFunction = () => [
|
|
477
|
+
{
|
|
478
|
+
charset: 'utf-8',
|
|
479
|
+
title: 'New Remix App',
|
|
480
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
481
|
+
},
|
|
482
|
+
];
|
|
483
|
+
|
|
484
|
+
export default function App() {
|
|
485
|
+
return (
|
|
486
|
+
<html lang="en">
|
|
487
|
+
<head>
|
|
488
|
+
<Meta />
|
|
489
|
+
<Links />
|
|
490
|
+
</head>
|
|
491
|
+
<body>
|
|
492
|
+
<Outlet />
|
|
493
|
+
<ScrollRestoration />
|
|
494
|
+
<Scripts />
|
|
495
|
+
<LiveReload />
|
|
496
|
+
</body>
|
|
497
|
+
</html>
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
"
|
|
501
|
+
`;
|
|
502
|
+
|
|
503
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided should create the application correctly 3`] = `
|
|
504
|
+
"import NxWelcome from '../nx-welcome';
|
|
505
|
+
|
|
506
|
+
export default function Index() {
|
|
507
|
+
return (
|
|
508
|
+
<div>
|
|
509
|
+
<NxWelcome title={'test'} />
|
|
510
|
+
</div>
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
"
|
|
514
|
+
`;
|
|
515
|
+
|
|
516
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --directory should create the application correctly 1`] = `
|
|
517
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
518
|
+
import { dirname } from 'path';
|
|
519
|
+
import { fileURLToPath } from 'url';
|
|
520
|
+
|
|
521
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
525
|
+
*/
|
|
526
|
+
export default {
|
|
527
|
+
ignoredRouteFiles: ['**/.*'],
|
|
528
|
+
// appDirectory: "app",
|
|
529
|
+
// assetsBuildDirectory: "public/build",
|
|
530
|
+
// serverBuildPath: "build/index.js",
|
|
531
|
+
// publicPath: "/build/",
|
|
532
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
533
|
+
};
|
|
534
|
+
"
|
|
535
|
+
`;
|
|
536
|
+
|
|
537
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --directory should create the application correctly 2`] = `
|
|
538
|
+
"import type { MetaFunction } from '@remix-run/node';
|
|
539
|
+
import {
|
|
540
|
+
Links,
|
|
541
|
+
LiveReload,
|
|
542
|
+
Meta,
|
|
543
|
+
Outlet,
|
|
544
|
+
Scripts,
|
|
545
|
+
ScrollRestoration,
|
|
546
|
+
} from '@remix-run/react';
|
|
547
|
+
|
|
548
|
+
export const meta: MetaFunction = () => [
|
|
549
|
+
{
|
|
550
|
+
charset: 'utf-8',
|
|
551
|
+
title: 'New Remix App',
|
|
552
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
553
|
+
},
|
|
554
|
+
];
|
|
555
|
+
|
|
206
556
|
export default function App() {
|
|
207
557
|
return (
|
|
208
|
-
<html lang
|
|
558
|
+
<html lang="en">
|
|
209
559
|
<head>
|
|
210
560
|
<Meta />
|
|
211
561
|
<Links />
|
|
@@ -222,65 +572,277 @@ export default function App() {
|
|
|
222
572
|
"
|
|
223
573
|
`;
|
|
224
574
|
|
|
225
|
-
exports[`Remix Application Integrated Repo --
|
|
226
|
-
"
|
|
575
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --directory should create the application correctly 3`] = `
|
|
576
|
+
"import NxWelcome from '../nx-welcome';
|
|
577
|
+
|
|
578
|
+
export default function Index() {
|
|
227
579
|
return (
|
|
228
|
-
<div
|
|
229
|
-
<
|
|
230
|
-
<ul>
|
|
231
|
-
<li>
|
|
232
|
-
<a
|
|
233
|
-
target=\\"_blank\\"
|
|
234
|
-
href=\\"https://remix.run/tutorials/blog\\"
|
|
235
|
-
rel=\\"noreferrer\\"
|
|
236
|
-
>
|
|
237
|
-
15m Quickstart Blog Tutorial
|
|
238
|
-
</a>
|
|
239
|
-
</li>
|
|
240
|
-
<li>
|
|
241
|
-
<a
|
|
242
|
-
target=\\"_blank\\"
|
|
243
|
-
href=\\"https://remix.run/tutorials/jokes\\"
|
|
244
|
-
rel=\\"noreferrer\\"
|
|
245
|
-
>
|
|
246
|
-
Deep Dive Jokes App Tutorial
|
|
247
|
-
</a>
|
|
248
|
-
</li>
|
|
249
|
-
<li>
|
|
250
|
-
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
251
|
-
Remix Docs
|
|
252
|
-
</a>
|
|
253
|
-
</li>
|
|
254
|
-
</ul>
|
|
580
|
+
<div>
|
|
581
|
+
<NxWelcome title={'demo-test'} />
|
|
255
582
|
</div>
|
|
256
583
|
);
|
|
257
584
|
}
|
|
258
585
|
"
|
|
259
586
|
`;
|
|
260
587
|
|
|
261
|
-
exports[`Remix Application Integrated Repo --
|
|
262
|
-
"
|
|
588
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --directory should extract the layout directory from the directory options if it exists 1`] = `
|
|
589
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
590
|
+
import { dirname } from 'path';
|
|
591
|
+
import { fileURLToPath } from 'url';
|
|
592
|
+
|
|
593
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
594
|
+
|
|
595
|
+
/**
|
|
263
596
|
* @type {import('@remix-run/dev').AppConfig}
|
|
264
597
|
*/
|
|
265
|
-
|
|
598
|
+
export default {
|
|
266
599
|
ignoredRouteFiles: ['**/.*'],
|
|
267
|
-
// appDirectory:
|
|
268
|
-
// assetsBuildDirectory:
|
|
269
|
-
// serverBuildPath:
|
|
270
|
-
// publicPath:
|
|
271
|
-
watchPaths: () =>
|
|
600
|
+
// appDirectory: "app",
|
|
601
|
+
// assetsBuildDirectory: "public/build",
|
|
602
|
+
// serverBuildPath: "build/index.js",
|
|
603
|
+
// publicPath: "/build/",
|
|
604
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
272
605
|
};
|
|
273
606
|
"
|
|
274
607
|
`;
|
|
275
608
|
|
|
276
|
-
exports[`Remix Application Integrated Repo --
|
|
609
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --directory should extract the layout directory from the directory options if it exists 2`] = `
|
|
610
|
+
"import type { MetaFunction } from '@remix-run/node';
|
|
611
|
+
import {
|
|
612
|
+
Links,
|
|
613
|
+
LiveReload,
|
|
614
|
+
Meta,
|
|
615
|
+
Outlet,
|
|
616
|
+
Scripts,
|
|
617
|
+
ScrollRestoration,
|
|
618
|
+
} from '@remix-run/react';
|
|
619
|
+
|
|
620
|
+
export const meta: MetaFunction = () => [
|
|
621
|
+
{
|
|
622
|
+
charset: 'utf-8',
|
|
623
|
+
title: 'New Remix App',
|
|
624
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
625
|
+
},
|
|
626
|
+
];
|
|
627
|
+
|
|
628
|
+
export default function App() {
|
|
629
|
+
return (
|
|
630
|
+
<html lang="en">
|
|
631
|
+
<head>
|
|
632
|
+
<Meta />
|
|
633
|
+
<Links />
|
|
634
|
+
</head>
|
|
635
|
+
<body>
|
|
636
|
+
<Outlet />
|
|
637
|
+
<ScrollRestoration />
|
|
638
|
+
<Scripts />
|
|
639
|
+
<LiveReload />
|
|
640
|
+
</body>
|
|
641
|
+
</html>
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
"
|
|
645
|
+
`;
|
|
646
|
+
|
|
647
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --directory should extract the layout directory from the directory options if it exists 3`] = `
|
|
648
|
+
"import NxWelcome from '../nx-welcome';
|
|
649
|
+
|
|
650
|
+
export default function Index() {
|
|
651
|
+
return (
|
|
652
|
+
<div>
|
|
653
|
+
<NxWelcome title={'demo-test'} />
|
|
654
|
+
</div>
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
"
|
|
658
|
+
`;
|
|
659
|
+
|
|
660
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --e2eTestRunner should generate a cypress e2e application for the app 1`] = `
|
|
661
|
+
"import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
|
|
662
|
+
|
|
663
|
+
import { defineConfig } from 'cypress';
|
|
664
|
+
|
|
665
|
+
export default defineConfig({
|
|
666
|
+
e2e: {
|
|
667
|
+
...nxE2EPreset(__filename, {
|
|
668
|
+
cypressDir: 'src',
|
|
669
|
+
webServerCommands: { default: 'nx run test:dev:development' },
|
|
670
|
+
}),
|
|
671
|
+
baseUrl: 'http://localhost:3000',
|
|
672
|
+
},
|
|
673
|
+
});
|
|
674
|
+
"
|
|
675
|
+
`;
|
|
676
|
+
|
|
677
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --e2eTestRunner should generate a playwright e2e application for the app 1`] = `
|
|
678
|
+
"import { defineConfig, devices } from '@playwright/test';
|
|
679
|
+
import { nxE2EPreset } from '@nx/playwright/preset';
|
|
680
|
+
|
|
681
|
+
import { workspaceRoot } from '@nx/devkit';
|
|
682
|
+
|
|
683
|
+
// For CI, you may want to set BASE_URL to the deployed application.
|
|
684
|
+
const baseURL = process.env['BASE_URL'] || 'http://localhost:3000';
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Read environment variables from file.
|
|
688
|
+
* https://github.com/motdotla/dotenv
|
|
689
|
+
*/
|
|
690
|
+
// require('dotenv').config();
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
694
|
+
*/
|
|
695
|
+
export default defineConfig({
|
|
696
|
+
...nxE2EPreset(__filename, { testDir: './src' }),
|
|
697
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
698
|
+
use: {
|
|
699
|
+
baseURL,
|
|
700
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
701
|
+
trace: 'on-first-retry',
|
|
702
|
+
},
|
|
703
|
+
/* Run your local dev server before starting the tests */
|
|
704
|
+
webServer: {
|
|
705
|
+
command: 'pnpm exec nx dev test',
|
|
706
|
+
url: 'http://localhost:3000',
|
|
707
|
+
reuseExistingServer: !process.env.CI,
|
|
708
|
+
cwd: workspaceRoot,
|
|
709
|
+
},
|
|
710
|
+
projects: [
|
|
711
|
+
{
|
|
712
|
+
name: 'chromium',
|
|
713
|
+
use: { ...devices['Desktop Chrome'] },
|
|
714
|
+
},
|
|
715
|
+
|
|
716
|
+
{
|
|
717
|
+
name: 'firefox',
|
|
718
|
+
use: { ...devices['Desktop Firefox'] },
|
|
719
|
+
},
|
|
720
|
+
|
|
721
|
+
{
|
|
722
|
+
name: 'webkit',
|
|
723
|
+
use: { ...devices['Desktop Safari'] },
|
|
724
|
+
},
|
|
725
|
+
|
|
726
|
+
// Uncomment for mobile browsers support
|
|
727
|
+
/* {
|
|
728
|
+
name: 'Mobile Chrome',
|
|
729
|
+
use: { ...devices['Pixel 5'] },
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
name: 'Mobile Safari',
|
|
733
|
+
use: { ...devices['iPhone 12'] },
|
|
734
|
+
}, */
|
|
735
|
+
|
|
736
|
+
// Uncomment for branded browsers
|
|
737
|
+
/* {
|
|
738
|
+
name: 'Microsoft Edge',
|
|
739
|
+
use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: 'Google Chrome',
|
|
743
|
+
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
744
|
+
} */
|
|
745
|
+
],
|
|
746
|
+
});
|
|
747
|
+
"
|
|
748
|
+
`;
|
|
749
|
+
|
|
750
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --js should create the application correctly 1`] = `
|
|
751
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
752
|
+
import { dirname } from 'path';
|
|
753
|
+
import { fileURLToPath } from 'url';
|
|
754
|
+
|
|
755
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
759
|
+
*/
|
|
760
|
+
export default {
|
|
761
|
+
ignoredRouteFiles: ['**/.*'],
|
|
762
|
+
// appDirectory: "app",
|
|
763
|
+
// assetsBuildDirectory: "public/build",
|
|
764
|
+
// serverBuildPath: "build/index.js",
|
|
765
|
+
// publicPath: "/build/",
|
|
766
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
767
|
+
};
|
|
768
|
+
"
|
|
769
|
+
`;
|
|
770
|
+
|
|
771
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --js should create the application correctly 2`] = `
|
|
772
|
+
"import {
|
|
773
|
+
Links,
|
|
774
|
+
LiveReload,
|
|
775
|
+
Meta,
|
|
776
|
+
Outlet,
|
|
777
|
+
Scripts,
|
|
778
|
+
ScrollRestoration,
|
|
779
|
+
} from '@remix-run/react';
|
|
780
|
+
export const meta = () => [
|
|
781
|
+
{
|
|
782
|
+
charset: 'utf-8',
|
|
783
|
+
title: 'New Remix App',
|
|
784
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
785
|
+
},
|
|
786
|
+
];
|
|
787
|
+
export default function App() {
|
|
788
|
+
return (
|
|
789
|
+
<html lang="en">
|
|
790
|
+
<head>
|
|
791
|
+
<Meta />
|
|
792
|
+
<Links />
|
|
793
|
+
</head>
|
|
794
|
+
<body>
|
|
795
|
+
<Outlet />
|
|
796
|
+
<ScrollRestoration />
|
|
797
|
+
<Scripts />
|
|
798
|
+
<LiveReload />
|
|
799
|
+
</body>
|
|
800
|
+
</html>
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
"
|
|
804
|
+
`;
|
|
805
|
+
|
|
806
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --js should create the application correctly 3`] = `
|
|
807
|
+
"import NxWelcome from '../nx-welcome';
|
|
808
|
+
export default function Index() {
|
|
809
|
+
return (
|
|
810
|
+
<div>
|
|
811
|
+
<NxWelcome title={'test'} />
|
|
812
|
+
</div>
|
|
813
|
+
);
|
|
814
|
+
}
|
|
815
|
+
"
|
|
816
|
+
`;
|
|
817
|
+
|
|
818
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --unitTestRunner should generate the correct files for testing using jest 1`] = `
|
|
819
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
820
|
+
import { dirname } from 'path';
|
|
821
|
+
import { fileURLToPath } from 'url';
|
|
822
|
+
|
|
823
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
827
|
+
*/
|
|
828
|
+
export default {
|
|
829
|
+
ignoredRouteFiles: ['**/.*'],
|
|
830
|
+
// appDirectory: "app",
|
|
831
|
+
// assetsBuildDirectory: "public/build",
|
|
832
|
+
// serverBuildPath: "build/index.js",
|
|
833
|
+
// publicPath: "/build/",
|
|
834
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
835
|
+
};
|
|
836
|
+
"
|
|
837
|
+
`;
|
|
838
|
+
|
|
839
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --unitTestRunner should generate the correct files for testing using jest 2`] = `
|
|
277
840
|
"/* eslint-disable */
|
|
278
841
|
export default {
|
|
279
|
-
setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
|
|
280
842
|
displayName: 'test',
|
|
281
843
|
preset: '../../jest.preset.js',
|
|
282
844
|
transform: {
|
|
283
|
-
'
|
|
845
|
+
'^.+\\\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
|
284
846
|
},
|
|
285
847
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
286
848
|
coverageDirectory: '../../coverage/apps/test',
|
|
@@ -288,29 +850,43 @@ export default {
|
|
|
288
850
|
"
|
|
289
851
|
`;
|
|
290
852
|
|
|
291
|
-
exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using
|
|
292
|
-
"
|
|
853
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --unitTestRunner should generate the correct files for testing using jest 3`] = `
|
|
854
|
+
"import { installGlobals } from '@remix-run/node';
|
|
855
|
+
import '@testing-library/jest-dom/matchers';
|
|
856
|
+
installGlobals();
|
|
857
|
+
"
|
|
858
|
+
`;
|
|
859
|
+
|
|
860
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --unitTestRunner should generate the correct files for testing using vitest 1`] = `
|
|
861
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
862
|
+
import { dirname } from 'path';
|
|
863
|
+
import { fileURLToPath } from 'url';
|
|
864
|
+
|
|
865
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
866
|
+
|
|
867
|
+
/**
|
|
293
868
|
* @type {import('@remix-run/dev').AppConfig}
|
|
294
869
|
*/
|
|
295
|
-
|
|
870
|
+
export default {
|
|
296
871
|
ignoredRouteFiles: ['**/.*'],
|
|
297
|
-
// appDirectory:
|
|
298
|
-
// assetsBuildDirectory:
|
|
299
|
-
// serverBuildPath:
|
|
300
|
-
// publicPath:
|
|
301
|
-
watchPaths: () =>
|
|
872
|
+
// appDirectory: "app",
|
|
873
|
+
// assetsBuildDirectory: "public/build",
|
|
874
|
+
// serverBuildPath: "build/index.js",
|
|
875
|
+
// publicPath: "/build/",
|
|
876
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
302
877
|
};
|
|
303
878
|
"
|
|
304
879
|
`;
|
|
305
880
|
|
|
306
|
-
exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using vitest 2`] = `
|
|
881
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --unitTestRunner should generate the correct files for testing using vitest 2`] = `
|
|
307
882
|
"/// <reference types='vitest' />
|
|
308
|
-
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
309
|
-
import react from '@vitejs/plugin-react';
|
|
310
883
|
import { defineConfig } from 'vite';
|
|
884
|
+
import react from '@vitejs/plugin-react';
|
|
885
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
311
886
|
|
|
312
887
|
export default defineConfig({
|
|
313
|
-
|
|
888
|
+
root: __dirname,
|
|
889
|
+
cacheDir: '../../node_modules/.vite/apps/test',
|
|
314
890
|
|
|
315
891
|
plugins: [react(), nxViteTsPaths()],
|
|
316
892
|
|
|
@@ -320,34 +896,86 @@ export default defineConfig({
|
|
|
320
896
|
// },
|
|
321
897
|
|
|
322
898
|
test: {
|
|
323
|
-
setupFiles: ['
|
|
899
|
+
setupFiles: ['test-setup.ts'],
|
|
324
900
|
globals: true,
|
|
325
901
|
cache: {
|
|
326
902
|
dir: '../../node_modules/.vitest',
|
|
327
903
|
},
|
|
328
904
|
environment: 'jsdom',
|
|
329
|
-
include: ['./
|
|
905
|
+
include: ['./tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
906
|
+
|
|
907
|
+
reporters: ['default'],
|
|
908
|
+
coverage: {
|
|
909
|
+
reportsDirectory: '../../coverage/apps/test',
|
|
910
|
+
provider: 'v8',
|
|
911
|
+
},
|
|
330
912
|
},
|
|
331
913
|
});
|
|
332
914
|
"
|
|
333
915
|
`;
|
|
334
916
|
|
|
335
|
-
exports[`Remix Application Integrated Repo should
|
|
336
|
-
"
|
|
917
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --unitTestRunner should generate the correct files for testing using vitest 3`] = `
|
|
918
|
+
"import { installGlobals } from '@remix-run/node';
|
|
919
|
+
import '@testing-library/jest-dom/matchers';
|
|
920
|
+
installGlobals();
|
|
921
|
+
"
|
|
922
|
+
`;
|
|
923
|
+
|
|
924
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --unitTestRunner should generate the correct files for testing using vitest 4`] = `
|
|
925
|
+
"{
|
|
926
|
+
"extends": "./tsconfig.json",
|
|
927
|
+
"compilerOptions": {
|
|
928
|
+
"outDir": "../../dist/out-tsc",
|
|
929
|
+
"types": [
|
|
930
|
+
"vitest/globals",
|
|
931
|
+
"vitest/importMeta",
|
|
932
|
+
"vite/client",
|
|
933
|
+
"node",
|
|
934
|
+
"vitest"
|
|
935
|
+
]
|
|
936
|
+
},
|
|
937
|
+
"include": [
|
|
938
|
+
"vite.config.ts",
|
|
939
|
+
"vitest.config.ts",
|
|
940
|
+
"app/**/*.ts",
|
|
941
|
+
"app/**/*.tsx",
|
|
942
|
+
"app/**/*.js",
|
|
943
|
+
"app/**/*.jsx",
|
|
944
|
+
"tests/**/*.spec.ts",
|
|
945
|
+
"tests/**/*.test.ts",
|
|
946
|
+
"tests/**/*.spec.tsx",
|
|
947
|
+
"tests/**/*.test.tsx",
|
|
948
|
+
"tests/**/*.spec.js",
|
|
949
|
+
"tests/**/*.test.js",
|
|
950
|
+
"tests/**/*.spec.jsx",
|
|
951
|
+
"tests/**/*.test.jsx"
|
|
952
|
+
]
|
|
953
|
+
}
|
|
954
|
+
"
|
|
955
|
+
`;
|
|
956
|
+
|
|
957
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived should create the application correctly 1`] = `
|
|
958
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
959
|
+
import { dirname } from 'path';
|
|
960
|
+
import { fileURLToPath } from 'url';
|
|
961
|
+
|
|
962
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
963
|
+
|
|
964
|
+
/**
|
|
337
965
|
* @type {import('@remix-run/dev').AppConfig}
|
|
338
966
|
*/
|
|
339
|
-
|
|
967
|
+
export default {
|
|
340
968
|
ignoredRouteFiles: ['**/.*'],
|
|
341
|
-
// appDirectory:
|
|
342
|
-
// assetsBuildDirectory:
|
|
343
|
-
// serverBuildPath:
|
|
344
|
-
// publicPath:
|
|
345
|
-
watchPaths: () =>
|
|
969
|
+
// appDirectory: "app",
|
|
970
|
+
// assetsBuildDirectory: "public/build",
|
|
971
|
+
// serverBuildPath: "build/index.js",
|
|
972
|
+
// publicPath: "/build/",
|
|
973
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
346
974
|
};
|
|
347
975
|
"
|
|
348
976
|
`;
|
|
349
977
|
|
|
350
|
-
exports[`Remix Application Integrated Repo should create the application correctly 2`] = `
|
|
978
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived should create the application correctly 2`] = `
|
|
351
979
|
"import type { MetaFunction } from '@remix-run/node';
|
|
352
980
|
import {
|
|
353
981
|
Links,
|
|
@@ -358,15 +986,17 @@ import {
|
|
|
358
986
|
ScrollRestoration,
|
|
359
987
|
} from '@remix-run/react';
|
|
360
988
|
|
|
361
|
-
export const meta: MetaFunction = () =>
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
989
|
+
export const meta: MetaFunction = () => [
|
|
990
|
+
{
|
|
991
|
+
charset: 'utf-8',
|
|
992
|
+
title: 'New Remix App',
|
|
993
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
994
|
+
},
|
|
995
|
+
];
|
|
366
996
|
|
|
367
997
|
export default function App() {
|
|
368
998
|
return (
|
|
369
|
-
<html lang
|
|
999
|
+
<html lang="en">
|
|
370
1000
|
<head>
|
|
371
1001
|
<Meta />
|
|
372
1002
|
<Links />
|
|
@@ -383,53 +1013,53 @@ export default function App() {
|
|
|
383
1013
|
"
|
|
384
1014
|
`;
|
|
385
1015
|
|
|
386
|
-
exports[`Remix Application Integrated Repo should create the application correctly 3`] = `
|
|
387
|
-
"
|
|
1016
|
+
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived should create the application correctly 3`] = `
|
|
1017
|
+
"import NxWelcome from '../nx-welcome';
|
|
1018
|
+
|
|
1019
|
+
export default function Index() {
|
|
388
1020
|
return (
|
|
389
|
-
<div
|
|
390
|
-
<
|
|
391
|
-
<ul>
|
|
392
|
-
<li>
|
|
393
|
-
<a
|
|
394
|
-
target=\\"_blank\\"
|
|
395
|
-
href=\\"https://remix.run/tutorials/blog\\"
|
|
396
|
-
rel=\\"noreferrer\\"
|
|
397
|
-
>
|
|
398
|
-
15m Quickstart Blog Tutorial
|
|
399
|
-
</a>
|
|
400
|
-
</li>
|
|
401
|
-
<li>
|
|
402
|
-
<a
|
|
403
|
-
target=\\"_blank\\"
|
|
404
|
-
href=\\"https://remix.run/tutorials/jokes\\"
|
|
405
|
-
rel=\\"noreferrer\\"
|
|
406
|
-
>
|
|
407
|
-
Deep Dive Jokes App Tutorial
|
|
408
|
-
</a>
|
|
409
|
-
</li>
|
|
410
|
-
<li>
|
|
411
|
-
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
412
|
-
Remix Docs
|
|
413
|
-
</a>
|
|
414
|
-
</li>
|
|
415
|
-
</ul>
|
|
1021
|
+
<div>
|
|
1022
|
+
<NxWelcome title={'test'} />
|
|
416
1023
|
</div>
|
|
417
1024
|
);
|
|
418
1025
|
}
|
|
419
1026
|
"
|
|
420
1027
|
`;
|
|
421
1028
|
|
|
1029
|
+
exports[`Remix Application Standalone Project Repo --e2eTestRunner should generate a cypress e2e application for the app 1`] = `
|
|
1030
|
+
"import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
|
|
1031
|
+
|
|
1032
|
+
import { defineConfig } from 'cypress';
|
|
1033
|
+
|
|
1034
|
+
export default defineConfig({
|
|
1035
|
+
e2e: {
|
|
1036
|
+
...nxE2EPreset(__filename, {
|
|
1037
|
+
cypressDir: 'src',
|
|
1038
|
+
webServerCommands: { default: 'nx run test:dev:development' },
|
|
1039
|
+
}),
|
|
1040
|
+
baseUrl: 'http://localhost:3000',
|
|
1041
|
+
},
|
|
1042
|
+
});
|
|
1043
|
+
"
|
|
1044
|
+
`;
|
|
1045
|
+
|
|
422
1046
|
exports[`Remix Application Standalone Project Repo --js should create the application correctly 1`] = `
|
|
423
|
-
"
|
|
1047
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
1048
|
+
import { dirname } from 'path';
|
|
1049
|
+
import { fileURLToPath } from 'url';
|
|
1050
|
+
|
|
1051
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
424
1054
|
* @type {import('@remix-run/dev').AppConfig}
|
|
425
1055
|
*/
|
|
426
|
-
|
|
1056
|
+
export default {
|
|
427
1057
|
ignoredRouteFiles: ['**/.*'],
|
|
428
|
-
// appDirectory:
|
|
429
|
-
// assetsBuildDirectory:
|
|
430
|
-
// serverBuildPath:
|
|
431
|
-
// publicPath:
|
|
432
|
-
watchPaths: () =>
|
|
1058
|
+
// appDirectory: "app",
|
|
1059
|
+
// assetsBuildDirectory: "public/build",
|
|
1060
|
+
// serverBuildPath: "build/index.js",
|
|
1061
|
+
// publicPath: "/build/",
|
|
1062
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
433
1063
|
};
|
|
434
1064
|
"
|
|
435
1065
|
`;
|
|
@@ -443,14 +1073,16 @@ exports[`Remix Application Standalone Project Repo --js should create the applic
|
|
|
443
1073
|
Scripts,
|
|
444
1074
|
ScrollRestoration,
|
|
445
1075
|
} from '@remix-run/react';
|
|
446
|
-
export const meta = () =>
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
1076
|
+
export const meta = () => [
|
|
1077
|
+
{
|
|
1078
|
+
charset: 'utf-8',
|
|
1079
|
+
title: 'New Remix App',
|
|
1080
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
1081
|
+
},
|
|
1082
|
+
];
|
|
451
1083
|
export default function App() {
|
|
452
1084
|
return (
|
|
453
|
-
<html lang
|
|
1085
|
+
<html lang="en">
|
|
454
1086
|
<head>
|
|
455
1087
|
<Meta />
|
|
456
1088
|
<Links />
|
|
@@ -468,35 +1100,11 @@ export default function App() {
|
|
|
468
1100
|
`;
|
|
469
1101
|
|
|
470
1102
|
exports[`Remix Application Standalone Project Repo --js should create the application correctly 3`] = `
|
|
471
|
-
"
|
|
1103
|
+
"import NxWelcome from '../nx-welcome';
|
|
1104
|
+
export default function Index() {
|
|
472
1105
|
return (
|
|
473
|
-
<div
|
|
474
|
-
<
|
|
475
|
-
<ul>
|
|
476
|
-
<li>
|
|
477
|
-
<a
|
|
478
|
-
target=\\"_blank\\"
|
|
479
|
-
href=\\"https://remix.run/tutorials/blog\\"
|
|
480
|
-
rel=\\"noreferrer\\"
|
|
481
|
-
>
|
|
482
|
-
15m Quickstart Blog Tutorial
|
|
483
|
-
</a>
|
|
484
|
-
</li>
|
|
485
|
-
<li>
|
|
486
|
-
<a
|
|
487
|
-
target=\\"_blank\\"
|
|
488
|
-
href=\\"https://remix.run/tutorials/jokes\\"
|
|
489
|
-
rel=\\"noreferrer\\"
|
|
490
|
-
>
|
|
491
|
-
Deep Dive Jokes App Tutorial
|
|
492
|
-
</a>
|
|
493
|
-
</li>
|
|
494
|
-
<li>
|
|
495
|
-
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
496
|
-
Remix Docs
|
|
497
|
-
</a>
|
|
498
|
-
</li>
|
|
499
|
-
</ul>
|
|
1106
|
+
<div>
|
|
1107
|
+
<NxWelcome title={'test'} />
|
|
500
1108
|
</div>
|
|
501
1109
|
);
|
|
502
1110
|
}
|
|
@@ -504,16 +1112,22 @@ exports[`Remix Application Standalone Project Repo --js should create the applic
|
|
|
504
1112
|
`;
|
|
505
1113
|
|
|
506
1114
|
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 1`] = `
|
|
507
|
-
"
|
|
1115
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
1116
|
+
import { dirname } from 'path';
|
|
1117
|
+
import { fileURLToPath } from 'url';
|
|
1118
|
+
|
|
1119
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
508
1122
|
* @type {import('@remix-run/dev').AppConfig}
|
|
509
1123
|
*/
|
|
510
|
-
|
|
1124
|
+
export default {
|
|
511
1125
|
ignoredRouteFiles: ['**/.*'],
|
|
512
|
-
// appDirectory:
|
|
513
|
-
// assetsBuildDirectory:
|
|
514
|
-
// serverBuildPath:
|
|
515
|
-
// publicPath:
|
|
516
|
-
watchPaths: () =>
|
|
1126
|
+
// appDirectory: "app",
|
|
1127
|
+
// assetsBuildDirectory: "public/build",
|
|
1128
|
+
// serverBuildPath: "build/index.js",
|
|
1129
|
+
// publicPath: "/build/",
|
|
1130
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
517
1131
|
};
|
|
518
1132
|
"
|
|
519
1133
|
`;
|
|
@@ -523,43 +1137,76 @@ exports[`Remix Application Standalone Project Repo --unitTestRunner should gener
|
|
|
523
1137
|
export default {
|
|
524
1138
|
setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
|
|
525
1139
|
displayName: 'test',
|
|
526
|
-
preset: './jest.preset.
|
|
1140
|
+
preset: './jest.preset.cjs',
|
|
527
1141
|
transform: {
|
|
528
|
-
'
|
|
1142
|
+
'^.+\\\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
|
529
1143
|
},
|
|
530
1144
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
531
1145
|
coverageDirectory: './coverage/test',
|
|
532
1146
|
testMatch: [
|
|
533
|
-
'<rootDir>/
|
|
534
|
-
'<rootDir>/src/**/*(*.)@(spec|test).[jt]s?(x)',
|
|
1147
|
+
'<rootDir>/tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
535
1148
|
],
|
|
536
1149
|
};
|
|
537
1150
|
"
|
|
538
1151
|
`;
|
|
539
1152
|
|
|
1153
|
+
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 3`] = `
|
|
1154
|
+
"import { installGlobals } from '@remix-run/node';
|
|
1155
|
+
import '@testing-library/jest-dom/matchers';
|
|
1156
|
+
installGlobals();
|
|
1157
|
+
"
|
|
1158
|
+
`;
|
|
1159
|
+
|
|
1160
|
+
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 4`] = `
|
|
1161
|
+
"import { createRemixStub } from '@remix-run/testing';
|
|
1162
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
1163
|
+
import Index from '../../app/routes/_index';
|
|
1164
|
+
|
|
1165
|
+
test('renders loader data', async () => {
|
|
1166
|
+
const RemixStub = createRemixStub([
|
|
1167
|
+
{
|
|
1168
|
+
path: '/',
|
|
1169
|
+
Component: Index,
|
|
1170
|
+
},
|
|
1171
|
+
]);
|
|
1172
|
+
|
|
1173
|
+
render(<RemixStub />);
|
|
1174
|
+
|
|
1175
|
+
await waitFor(() => screen.findByText('Hello there,'));
|
|
1176
|
+
});
|
|
1177
|
+
"
|
|
1178
|
+
`;
|
|
1179
|
+
|
|
540
1180
|
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 1`] = `
|
|
541
|
-
"
|
|
1181
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
1182
|
+
import { dirname } from 'path';
|
|
1183
|
+
import { fileURLToPath } from 'url';
|
|
1184
|
+
|
|
1185
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
542
1188
|
* @type {import('@remix-run/dev').AppConfig}
|
|
543
1189
|
*/
|
|
544
|
-
|
|
1190
|
+
export default {
|
|
545
1191
|
ignoredRouteFiles: ['**/.*'],
|
|
546
|
-
// appDirectory:
|
|
547
|
-
// assetsBuildDirectory:
|
|
548
|
-
// serverBuildPath:
|
|
549
|
-
// publicPath:
|
|
550
|
-
watchPaths: () =>
|
|
1192
|
+
// appDirectory: "app",
|
|
1193
|
+
// assetsBuildDirectory: "public/build",
|
|
1194
|
+
// serverBuildPath: "build/index.js",
|
|
1195
|
+
// publicPath: "/build/",
|
|
1196
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
551
1197
|
};
|
|
552
1198
|
"
|
|
553
1199
|
`;
|
|
554
1200
|
|
|
555
1201
|
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 2`] = `
|
|
556
1202
|
"/// <reference types='vitest' />
|
|
557
|
-
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
558
|
-
import react from '@vitejs/plugin-react';
|
|
559
1203
|
import { defineConfig } from 'vite';
|
|
1204
|
+
import react from '@vitejs/plugin-react';
|
|
1205
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
560
1206
|
|
|
561
1207
|
export default defineConfig({
|
|
562
|
-
|
|
1208
|
+
root: __dirname,
|
|
1209
|
+
cacheDir: './node_modules/.vite/.',
|
|
563
1210
|
|
|
564
1211
|
plugins: [react(), nxViteTsPaths()],
|
|
565
1212
|
|
|
@@ -569,29 +1216,101 @@ export default defineConfig({
|
|
|
569
1216
|
// },
|
|
570
1217
|
|
|
571
1218
|
test: {
|
|
572
|
-
setupFiles: ['
|
|
1219
|
+
setupFiles: ['test-setup.ts'],
|
|
573
1220
|
globals: true,
|
|
574
1221
|
cache: {
|
|
575
1222
|
dir: './node_modules/.vitest',
|
|
576
1223
|
},
|
|
577
1224
|
environment: 'jsdom',
|
|
578
|
-
include: ['./
|
|
1225
|
+
include: ['./tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
1226
|
+
|
|
1227
|
+
reporters: ['default'],
|
|
1228
|
+
coverage: {
|
|
1229
|
+
reportsDirectory: './coverage/test',
|
|
1230
|
+
provider: 'v8',
|
|
1231
|
+
},
|
|
579
1232
|
},
|
|
580
1233
|
});
|
|
581
1234
|
"
|
|
582
1235
|
`;
|
|
583
1236
|
|
|
1237
|
+
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 3`] = `
|
|
1238
|
+
"import { createRemixStub } from '@remix-run/testing';
|
|
1239
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
1240
|
+
import Index from '../../app/routes/_index';
|
|
1241
|
+
|
|
1242
|
+
test('renders loader data', async () => {
|
|
1243
|
+
const RemixStub = createRemixStub([
|
|
1244
|
+
{
|
|
1245
|
+
path: '/',
|
|
1246
|
+
Component: Index,
|
|
1247
|
+
},
|
|
1248
|
+
]);
|
|
1249
|
+
|
|
1250
|
+
render(<RemixStub />);
|
|
1251
|
+
|
|
1252
|
+
await waitFor(() => screen.findByText('Hello there,'));
|
|
1253
|
+
});
|
|
1254
|
+
"
|
|
1255
|
+
`;
|
|
1256
|
+
|
|
1257
|
+
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 4`] = `
|
|
1258
|
+
"{
|
|
1259
|
+
"extends": "./tsconfig.json",
|
|
1260
|
+
"compilerOptions": {
|
|
1261
|
+
"outDir": "./dist/out-tsc",
|
|
1262
|
+
"types": [
|
|
1263
|
+
"vitest/globals",
|
|
1264
|
+
"vitest/importMeta",
|
|
1265
|
+
"vite/client",
|
|
1266
|
+
"node",
|
|
1267
|
+
"vitest"
|
|
1268
|
+
]
|
|
1269
|
+
},
|
|
1270
|
+
"include": [
|
|
1271
|
+
"vite.config.ts",
|
|
1272
|
+
"vitest.config.ts",
|
|
1273
|
+
"app/**/*.ts",
|
|
1274
|
+
"app/**/*.tsx",
|
|
1275
|
+
"app/**/*.js",
|
|
1276
|
+
"app/**/*.jsx",
|
|
1277
|
+
"tests/**/*.spec.ts",
|
|
1278
|
+
"tests/**/*.test.ts",
|
|
1279
|
+
"tests/**/*.spec.tsx",
|
|
1280
|
+
"tests/**/*.test.tsx",
|
|
1281
|
+
"tests/**/*.spec.js",
|
|
1282
|
+
"tests/**/*.test.js",
|
|
1283
|
+
"tests/**/*.spec.jsx",
|
|
1284
|
+
"tests/**/*.test.jsx"
|
|
1285
|
+
]
|
|
1286
|
+
}
|
|
1287
|
+
"
|
|
1288
|
+
`;
|
|
1289
|
+
|
|
1290
|
+
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 5`] = `
|
|
1291
|
+
"import { installGlobals } from '@remix-run/node';
|
|
1292
|
+
import '@testing-library/jest-dom/matchers';
|
|
1293
|
+
installGlobals();
|
|
1294
|
+
"
|
|
1295
|
+
`;
|
|
1296
|
+
|
|
584
1297
|
exports[`Remix Application Standalone Project Repo should create the application correctly 1`] = `
|
|
585
|
-
"
|
|
1298
|
+
"import { createWatchPaths } from '@nx/remix';
|
|
1299
|
+
import { dirname } from 'path';
|
|
1300
|
+
import { fileURLToPath } from 'url';
|
|
1301
|
+
|
|
1302
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
586
1305
|
* @type {import('@remix-run/dev').AppConfig}
|
|
587
1306
|
*/
|
|
588
|
-
|
|
1307
|
+
export default {
|
|
589
1308
|
ignoredRouteFiles: ['**/.*'],
|
|
590
|
-
// appDirectory:
|
|
591
|
-
// assetsBuildDirectory:
|
|
592
|
-
// serverBuildPath:
|
|
593
|
-
// publicPath:
|
|
594
|
-
watchPaths: () =>
|
|
1309
|
+
// appDirectory: "app",
|
|
1310
|
+
// assetsBuildDirectory: "public/build",
|
|
1311
|
+
// serverBuildPath: "build/index.js",
|
|
1312
|
+
// publicPath: "/build/",
|
|
1313
|
+
watchPaths: () => createWatchPaths(__dirname),
|
|
595
1314
|
};
|
|
596
1315
|
"
|
|
597
1316
|
`;
|
|
@@ -607,15 +1326,17 @@ import {
|
|
|
607
1326
|
ScrollRestoration,
|
|
608
1327
|
} from '@remix-run/react';
|
|
609
1328
|
|
|
610
|
-
export const meta: MetaFunction = () =>
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
1329
|
+
export const meta: MetaFunction = () => [
|
|
1330
|
+
{
|
|
1331
|
+
charset: 'utf-8',
|
|
1332
|
+
title: 'New Remix App',
|
|
1333
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
1334
|
+
},
|
|
1335
|
+
];
|
|
615
1336
|
|
|
616
1337
|
export default function App() {
|
|
617
1338
|
return (
|
|
618
|
-
<html lang
|
|
1339
|
+
<html lang="en">
|
|
619
1340
|
<head>
|
|
620
1341
|
<Meta />
|
|
621
1342
|
<Links />
|
|
@@ -633,37 +1354,130 @@ export default function App() {
|
|
|
633
1354
|
`;
|
|
634
1355
|
|
|
635
1356
|
exports[`Remix Application Standalone Project Repo should create the application correctly 3`] = `
|
|
636
|
-
"
|
|
1357
|
+
"import NxWelcome from '../nx-welcome';
|
|
1358
|
+
|
|
1359
|
+
export default function Index() {
|
|
637
1360
|
return (
|
|
638
|
-
<div
|
|
639
|
-
<
|
|
640
|
-
<ul>
|
|
641
|
-
<li>
|
|
642
|
-
<a
|
|
643
|
-
target=\\"_blank\\"
|
|
644
|
-
href=\\"https://remix.run/tutorials/blog\\"
|
|
645
|
-
rel=\\"noreferrer\\"
|
|
646
|
-
>
|
|
647
|
-
15m Quickstart Blog Tutorial
|
|
648
|
-
</a>
|
|
649
|
-
</li>
|
|
650
|
-
<li>
|
|
651
|
-
<a
|
|
652
|
-
target=\\"_blank\\"
|
|
653
|
-
href=\\"https://remix.run/tutorials/jokes\\"
|
|
654
|
-
rel=\\"noreferrer\\"
|
|
655
|
-
>
|
|
656
|
-
Deep Dive Jokes App Tutorial
|
|
657
|
-
</a>
|
|
658
|
-
</li>
|
|
659
|
-
<li>
|
|
660
|
-
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
661
|
-
Remix Docs
|
|
662
|
-
</a>
|
|
663
|
-
</li>
|
|
664
|
-
</ul>
|
|
1361
|
+
<div>
|
|
1362
|
+
<NxWelcome title={'test'} />
|
|
665
1363
|
</div>
|
|
666
1364
|
);
|
|
667
1365
|
}
|
|
668
1366
|
"
|
|
669
1367
|
`;
|
|
1368
|
+
|
|
1369
|
+
exports[`Remix Application Standalone Project Repo should create the application correctly 4`] = `
|
|
1370
|
+
"import { createRemixStub } from '@remix-run/testing';
|
|
1371
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
1372
|
+
import Index from '../../app/routes/_index';
|
|
1373
|
+
|
|
1374
|
+
test('renders loader data', async () => {
|
|
1375
|
+
const RemixStub = createRemixStub([
|
|
1376
|
+
{
|
|
1377
|
+
path: '/',
|
|
1378
|
+
Component: Index,
|
|
1379
|
+
},
|
|
1380
|
+
]);
|
|
1381
|
+
|
|
1382
|
+
render(<RemixStub />);
|
|
1383
|
+
|
|
1384
|
+
await waitFor(() => screen.findByText('Hello there,'));
|
|
1385
|
+
});
|
|
1386
|
+
"
|
|
1387
|
+
`;
|
|
1388
|
+
|
|
1389
|
+
exports[`Remix Application Standalone Project Repo should create the application correctly 5`] = `null`;
|
|
1390
|
+
|
|
1391
|
+
exports[`Remix Application Standalone Project Repo should create the application correctly 6`] = `
|
|
1392
|
+
"{
|
|
1393
|
+
"root": true,
|
|
1394
|
+
"ignorePatterns": ["!**/*"],
|
|
1395
|
+
"plugins": ["@nx"],
|
|
1396
|
+
"overrides": [
|
|
1397
|
+
{
|
|
1398
|
+
"files": ["*.ts", "*.tsx"],
|
|
1399
|
+
"extends": ["plugin:@nx/typescript"],
|
|
1400
|
+
"rules": {}
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"files": ["*.js", "*.jsx"],
|
|
1404
|
+
"extends": ["plugin:@nx/javascript"],
|
|
1405
|
+
"rules": {}
|
|
1406
|
+
}
|
|
1407
|
+
]
|
|
1408
|
+
}
|
|
1409
|
+
"
|
|
1410
|
+
`;
|
|
1411
|
+
|
|
1412
|
+
exports[`Remix Application Standalone Project Repo should generate a playwright e2e application for the app 1`] = `
|
|
1413
|
+
"import { defineConfig, devices } from '@playwright/test';
|
|
1414
|
+
import { nxE2EPreset } from '@nx/playwright/preset';
|
|
1415
|
+
|
|
1416
|
+
import { workspaceRoot } from '@nx/devkit';
|
|
1417
|
+
|
|
1418
|
+
// For CI, you may want to set BASE_URL to the deployed application.
|
|
1419
|
+
const baseURL = process.env['BASE_URL'] || 'http://localhost:3000';
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* Read environment variables from file.
|
|
1423
|
+
* https://github.com/motdotla/dotenv
|
|
1424
|
+
*/
|
|
1425
|
+
// require('dotenv').config();
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
1429
|
+
*/
|
|
1430
|
+
export default defineConfig({
|
|
1431
|
+
...nxE2EPreset(__filename, { testDir: './src' }),
|
|
1432
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
1433
|
+
use: {
|
|
1434
|
+
baseURL,
|
|
1435
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
1436
|
+
trace: 'on-first-retry',
|
|
1437
|
+
},
|
|
1438
|
+
/* Run your local dev server before starting the tests */
|
|
1439
|
+
webServer: {
|
|
1440
|
+
command: 'pnpm exec nx dev test',
|
|
1441
|
+
url: 'http://localhost:3000',
|
|
1442
|
+
reuseExistingServer: !process.env.CI,
|
|
1443
|
+
cwd: workspaceRoot,
|
|
1444
|
+
},
|
|
1445
|
+
projects: [
|
|
1446
|
+
{
|
|
1447
|
+
name: 'chromium',
|
|
1448
|
+
use: { ...devices['Desktop Chrome'] },
|
|
1449
|
+
},
|
|
1450
|
+
|
|
1451
|
+
{
|
|
1452
|
+
name: 'firefox',
|
|
1453
|
+
use: { ...devices['Desktop Firefox'] },
|
|
1454
|
+
},
|
|
1455
|
+
|
|
1456
|
+
{
|
|
1457
|
+
name: 'webkit',
|
|
1458
|
+
use: { ...devices['Desktop Safari'] },
|
|
1459
|
+
},
|
|
1460
|
+
|
|
1461
|
+
// Uncomment for mobile browsers support
|
|
1462
|
+
/* {
|
|
1463
|
+
name: 'Mobile Chrome',
|
|
1464
|
+
use: { ...devices['Pixel 5'] },
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
name: 'Mobile Safari',
|
|
1468
|
+
use: { ...devices['iPhone 12'] },
|
|
1469
|
+
}, */
|
|
1470
|
+
|
|
1471
|
+
// Uncomment for branded browsers
|
|
1472
|
+
/* {
|
|
1473
|
+
name: 'Microsoft Edge',
|
|
1474
|
+
use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
name: 'Google Chrome',
|
|
1478
|
+
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
1479
|
+
} */
|
|
1480
|
+
],
|
|
1481
|
+
});
|
|
1482
|
+
"
|
|
1483
|
+
`;
|