@aws/nx-plugin 0.62.0 → 0.62.2
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-THIRD-PARTY +30 -3
- package/package.json +3 -4
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/mcp-server/schema.d.ts +7 -2
- package/src/mcp-server/schema.js +2 -2
- package/src/mcp-server/schema.js.map +1 -1
- package/src/mcp-server/tools/create-workspace-command.js +8 -2
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/mcp-server/tools/general-guidance.js +4 -1
- package/src/mcp-server/tools/general-guidance.js.map +1 -1
- package/src/mcp-server/tools/generator-guide.js +7 -4
- package/src/mcp-server/tools/generator-guide.js.map +1 -1
- package/src/mcp-server/tools/list-generators.js +4 -1
- package/src/mcp-server/tools/list-generators.js.map +1 -1
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/mcp-server/files/resources/sample-guidance.ts.template +1 -1
- package/src/ts/mcp-server/files/tools/add.ts.template +6 -4
- package/src/ts/mcp-server/generator.js +1 -5
- package/src/ts/mcp-server/generator.js.map +1 -1
- package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +35 -20
- package/src/ts/nx-plugin/files/mcp-server/schema.ts.template +1 -1
- package/src/ts/nx-plugin/files/mcp-server/tools/create-workspace-command.ts.template +7 -5
- package/src/ts/nx-plugin/files/mcp-server/tools/general-guidance.ts.template +5 -3
- package/src/ts/nx-plugin/files/mcp-server/tools/generator-guide.ts.template +9 -7
- package/src/ts/nx-plugin/files/mcp-server/tools/list-generators.ts.template +6 -4
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +883 -85
- package/src/ts/react-website/app/files/app/{src → cloudscape/src}/app.tsx.template +1 -1
- package/src/ts/react-website/app/files/app/cloudscape/src/components/alert.tsx.template +3 -0
- package/src/ts/react-website/app/files/app/cloudscape/src/components/spinner.tsx.template +3 -0
- package/src/ts/react-website/app/files/app/{src → common/src}/config.ts.template +1 -1
- package/src/ts/react-website/app/files/app/none/src/app.tsx.template +8 -0
- package/src/ts/react-website/app/files/app/none/src/components/AppLayout/index.tsx.template +124 -0
- package/src/ts/react-website/app/files/app/none/src/components/alert.tsx.template +14 -0
- package/src/ts/react-website/app/files/app/none/src/components/spinner.tsx.template +7 -0
- package/src/ts/react-website/app/files/app/none/src/main.tsx.template +31 -0
- package/src/ts/react-website/app/files/app/none/src/styles.css.template +201 -0
- package/src/ts/react-website/app/files/tanstack-router/common/src/routeTree.gen.ts.template +59 -0
- package/src/ts/react-website/app/files/tanstack-router/none/src/routes/index.tsx.template +14 -0
- package/src/ts/react-website/app/generator.d.ts +2 -0
- package/src/ts/react-website/app/generator.js +30 -16
- package/src/ts/react-website/app/generator.js.map +1 -1
- package/src/ts/react-website/app/schema.d.ts +2 -1
- package/src/ts/react-website/app/schema.json +22 -0
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +348 -185
- package/src/ts/react-website/cognito-auth/files/app/components/CognitoAuth/index.tsx.template +15 -15
- package/src/ts/react-website/cognito-auth/generator.js +14 -40
- package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/utils.d.ts +7 -0
- package/src/ts/react-website/cognito-auth/utils.js +92 -0
- package/src/ts/react-website/cognito-auth/utils.js.map +1 -0
- package/src/ts/react-website/runtime-config/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/react-website/runtime-config/files/app/components/RuntimeConfig/index.tsx.template +1 -1
- package/src/utils/versions.d.ts +9 -10
- package/src/utils/versions.js +9 -12
- package/src/utils/versions.js.map +1 -1
- package/src/ts/react-website/app/files/tanstack-router/src/routeTree.gen.ts.template +0 -111
- /package/src/ts/react-website/app/files/app/{src → cloudscape/src}/components/AppLayout/index.tsx.template +0 -0
- /package/src/ts/react-website/app/files/app/{src → cloudscape/src}/hooks/useAppLayout.tsx.template +0 -0
- /package/src/ts/react-website/app/files/app/{src → cloudscape/src}/main.tsx.template +0 -0
- /package/src/ts/react-website/app/files/app/{src → cloudscape/src}/styles.css.template +0 -0
- /package/src/ts/react-website/app/files/app/{README.md.template → common/README.md.template} +0 -0
- /package/src/ts/react-website/app/files/tanstack-router/{src → cloudscape/src}/routes/index.tsx.template +0 -0
- /package/src/ts/react-website/app/files/tanstack-router/{src → common/src}/routes/__root.tsx.template +0 -0
|
@@ -1,5 +1,825 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/components/AppLayout/index.tsx 1`] = `
|
|
4
|
+
"import * as React from 'react';
|
|
5
|
+
import { createContext, useCallback, useEffect, useState } from 'react';
|
|
6
|
+
import Config from '../../config';
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
BreadcrumbGroup,
|
|
10
|
+
BreadcrumbGroupProps,
|
|
11
|
+
SideNavigation,
|
|
12
|
+
TopNavigation,
|
|
13
|
+
} from '@cloudscape-design/components';
|
|
14
|
+
import CloudscapeAppLayout, {
|
|
15
|
+
AppLayoutProps,
|
|
16
|
+
} from '@cloudscape-design/components/app-layout';
|
|
17
|
+
import {
|
|
18
|
+
useMatchRoute,
|
|
19
|
+
useLocation,
|
|
20
|
+
useNavigate,
|
|
21
|
+
} from '@tanstack/react-router';
|
|
22
|
+
|
|
23
|
+
const getBreadcrumbs = (
|
|
24
|
+
matchRoute: ReturnType<typeof useMatchRoute>,
|
|
25
|
+
pathName: string,
|
|
26
|
+
search: string,
|
|
27
|
+
defaultBreadcrumb: string,
|
|
28
|
+
availableRoutes?: string[],
|
|
29
|
+
) => {
|
|
30
|
+
const segments = [
|
|
31
|
+
defaultBreadcrumb,
|
|
32
|
+
...pathName.split('/').filter((segment) => segment !== ''),
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
return segments.map((segment, i) => {
|
|
36
|
+
const href =
|
|
37
|
+
i === 0
|
|
38
|
+
? '/'
|
|
39
|
+
: \`/\${segments
|
|
40
|
+
.slice(1, i + 1)
|
|
41
|
+
.join('/')
|
|
42
|
+
.replace('//', '/')}\`;
|
|
43
|
+
|
|
44
|
+
const matched =
|
|
45
|
+
!availableRoutes || availableRoutes.find((r) => matchRoute({ to: href }));
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
href: matched ? \`\${href}\${search}\` : '#',
|
|
49
|
+
text: segment,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export interface AppLayoutContext {
|
|
55
|
+
appLayoutProps: AppLayoutProps;
|
|
56
|
+
setAppLayoutProps: (props: AppLayoutProps) => void;
|
|
57
|
+
displayHelpPanel: (helpContent: React.ReactNode) => void;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Context for updating/retrieving the AppLayout.
|
|
62
|
+
*/
|
|
63
|
+
export const AppLayoutContext = createContext({
|
|
64
|
+
appLayoutProps: {},
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
66
|
+
setAppLayoutProps: (_: AppLayoutProps) => {},
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
68
|
+
displayHelpPanel: (_: React.ReactNode) => {},
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Defines the App layout and contains logic for routing.
|
|
73
|
+
*/
|
|
74
|
+
const AppLayout: React.FC<React.PropsWithChildren> = ({ children }) => {
|
|
75
|
+
const appLayout = React.useRef<AppLayoutProps.Ref>(null);
|
|
76
|
+
const [appLayoutProps, setAppLayoutProps] = useState<AppLayoutProps>({});
|
|
77
|
+
const setAppLayoutPropsSafe = useCallback(
|
|
78
|
+
(props: AppLayoutProps) => {
|
|
79
|
+
JSON.stringify(appLayoutProps) !== JSON.stringify(props) &&
|
|
80
|
+
setAppLayoutProps(props);
|
|
81
|
+
},
|
|
82
|
+
[appLayoutProps],
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
const navigate = useNavigate();
|
|
86
|
+
const [activeBreadcrumbs, setActiveBreadcrumbs] = useState<
|
|
87
|
+
BreadcrumbGroupProps.Item[]
|
|
88
|
+
>([{ text: '/', href: '/' }]);
|
|
89
|
+
const matchRoute = useMatchRoute();
|
|
90
|
+
const { pathname, search } = useLocation();
|
|
91
|
+
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
const breadcrumbs = getBreadcrumbs(
|
|
94
|
+
matchRoute,
|
|
95
|
+
pathname,
|
|
96
|
+
Object.entries(search).reduce((p, [k, v]) => p + \`\${k}=\${v}\`, ''),
|
|
97
|
+
'/',
|
|
98
|
+
);
|
|
99
|
+
setActiveBreadcrumbs(breadcrumbs);
|
|
100
|
+
}, [pathname, search]);
|
|
101
|
+
|
|
102
|
+
const onNavigate = useCallback(
|
|
103
|
+
(e: CustomEvent<{ href: string; external?: boolean }>) => {
|
|
104
|
+
if (!e.detail.external) {
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
setAppLayoutPropsSafe({
|
|
107
|
+
contentType: undefined,
|
|
108
|
+
});
|
|
109
|
+
navigate({ to: e.detail.href });
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
[navigate, setAppLayoutPropsSafe],
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<AppLayoutContext.Provider
|
|
117
|
+
value={{
|
|
118
|
+
appLayoutProps,
|
|
119
|
+
setAppLayoutProps: setAppLayoutPropsSafe,
|
|
120
|
+
displayHelpPanel: (helpContent: React.ReactNode) => {
|
|
121
|
+
setAppLayoutPropsSafe({ tools: helpContent, toolsHide: false });
|
|
122
|
+
appLayout.current?.openTools();
|
|
123
|
+
},
|
|
124
|
+
}}
|
|
125
|
+
>
|
|
126
|
+
<TopNavigation
|
|
127
|
+
identity={{
|
|
128
|
+
href: '/',
|
|
129
|
+
title: Config.applicationName,
|
|
130
|
+
logo: {
|
|
131
|
+
src: Config.logo,
|
|
132
|
+
},
|
|
133
|
+
}}
|
|
134
|
+
/>
|
|
135
|
+
<CloudscapeAppLayout
|
|
136
|
+
ref={appLayout}
|
|
137
|
+
breadcrumbs={
|
|
138
|
+
<BreadcrumbGroup onFollow={onNavigate} items={activeBreadcrumbs} />
|
|
139
|
+
}
|
|
140
|
+
navigation={
|
|
141
|
+
<SideNavigation
|
|
142
|
+
header={{ text: Config.applicationName, href: '/' }}
|
|
143
|
+
activeHref={pathname}
|
|
144
|
+
onFollow={onNavigate}
|
|
145
|
+
items={[{ text: 'Home', type: 'link', href: '/' }]}
|
|
146
|
+
/>
|
|
147
|
+
}
|
|
148
|
+
toolsHide
|
|
149
|
+
content={children}
|
|
150
|
+
{...appLayoutProps}
|
|
151
|
+
/>
|
|
152
|
+
</AppLayoutContext.Provider>
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export default AppLayout;
|
|
157
|
+
"
|
|
158
|
+
`;
|
|
159
|
+
|
|
160
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/components/alert.tsx 1`] = `
|
|
161
|
+
"import { Alert as CloudscapeAlert } from '@cloudscape-design/components';
|
|
162
|
+
|
|
163
|
+
export const Alert = CloudscapeAlert;
|
|
164
|
+
"
|
|
165
|
+
`;
|
|
166
|
+
|
|
167
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/components/spinner.tsx 1`] = `
|
|
168
|
+
"import { Spinner as CloudscapeSpinner } from '@cloudscape-design/components';
|
|
169
|
+
|
|
170
|
+
export const Spinner = CloudscapeSpinner;
|
|
171
|
+
"
|
|
172
|
+
`;
|
|
173
|
+
|
|
174
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/config.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0LDAsMCwwLDQwLjIzLTUxLjIsNDc3Ljg0LDQ3Ny44NCwwLDAsMCw2NS0xMC4wNXExLjQ3LDUuOTQsMi42LDExLjY0aDBDMzgzLjgxLDM3Ny41OCwzODQuNSwzOTkuNTYsMzgxLjMyLDQxNi43NVptMTcuNC0xMDIuNjRoMGMtMi42Mi44Ny01LjMyLDEuNzEtOC4wNiwyLjUzYTQ4My4yNiw0ODMuMjYsMCwwLDAtMjQuMzEtNjAuOTQsNDgxLjUyLDQ4MS41MiwwLDAsMCwyMy4zNi02MC4wNmM0LjkxLDEuNDMsOS42OCwyLjkzLDE0LjI3LDQuNTIsNDQuNDIsMTUuMzIsNzEuNTIsMzgsNzEuNTIsNTUuNDNDNDc1LjUsMjc0LjE5LDQ0Ni4yMywyOTguMzMsMzk4LjcyLDMxNC4xMVoiLz4KDTxwYXRoIGQ9Ik0yNTYsMjk4LjU1YTQzLDQzLDAsMSwwLTQyLjg2LTQzQTQyLjkxLDQyLjkxLDAsMCwwLDI1NiwyOTguNTVaIi8+Cg08L2c+Cg08L3N2Zz4=',
|
|
178
|
+
};
|
|
179
|
+
"
|
|
180
|
+
`;
|
|
181
|
+
|
|
182
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/hooks/useAppLayout.tsx 1`] = `
|
|
183
|
+
"import { useContext } from 'react';
|
|
184
|
+
import { AppLayoutContext } from '../components/AppLayout';
|
|
185
|
+
|
|
186
|
+
export const useAppLayout = (): AppLayoutContext =>
|
|
187
|
+
useContext(AppLayoutContext);
|
|
188
|
+
"
|
|
189
|
+
`;
|
|
190
|
+
|
|
191
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/main.tsx 1`] = `
|
|
192
|
+
"import React from 'react';
|
|
193
|
+
import { createRoot } from 'react-dom/client';
|
|
194
|
+
import { I18nProvider } from '@cloudscape-design/components/i18n';
|
|
195
|
+
import messages from '@cloudscape-design/components/i18n/messages/all.en';
|
|
196
|
+
import '@cloudscape-design/global-styles/index.css';
|
|
197
|
+
import { RouterProvider, createRouter } from '@tanstack/react-router';
|
|
198
|
+
import { routeTree } from './routeTree.gen';
|
|
199
|
+
|
|
200
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
201
|
+
export type RouterProviderContext = {};
|
|
202
|
+
|
|
203
|
+
const router = createRouter({
|
|
204
|
+
routeTree,
|
|
205
|
+
context: {},
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
// Register the router instance for type safety
|
|
209
|
+
declare module '@tanstack/react-router' {
|
|
210
|
+
interface Register {
|
|
211
|
+
router: typeof router;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const App = () => {
|
|
216
|
+
return <RouterProvider router={router} context={{}} />;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
const root = document.getElementById('root');
|
|
220
|
+
root &&
|
|
221
|
+
createRoot(root).render(
|
|
222
|
+
<React.StrictMode>
|
|
223
|
+
<I18nProvider locale="en" messages={[messages]}>
|
|
224
|
+
<App />
|
|
225
|
+
</I18nProvider>
|
|
226
|
+
</React.StrictMode>,
|
|
227
|
+
);
|
|
228
|
+
"
|
|
229
|
+
`;
|
|
230
|
+
|
|
231
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/routeTree.gen.ts 1`] = `
|
|
232
|
+
"/* eslint-disable */
|
|
233
|
+
|
|
234
|
+
// @ts-nocheck
|
|
235
|
+
|
|
236
|
+
// noinspection JSUnusedGlobalSymbols
|
|
237
|
+
|
|
238
|
+
// This file was automatically generated by TanStack Router.
|
|
239
|
+
// You should NOT make any changes in this file as it will be overwritten.
|
|
240
|
+
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
241
|
+
|
|
242
|
+
import { Route as rootRouteImport } from './routes/__root';
|
|
243
|
+
import { Route as IndexRouteImport } from './routes/index';
|
|
244
|
+
|
|
245
|
+
const IndexRoute = IndexRouteImport.update({
|
|
246
|
+
id: '/',
|
|
247
|
+
path: '/',
|
|
248
|
+
getParentRoute: () => rootRouteImport,
|
|
249
|
+
} as any);
|
|
250
|
+
|
|
251
|
+
export interface FileRoutesByFullPath {
|
|
252
|
+
'/': typeof IndexRoute;
|
|
253
|
+
}
|
|
254
|
+
export interface FileRoutesByTo {
|
|
255
|
+
'/': typeof IndexRoute;
|
|
256
|
+
}
|
|
257
|
+
export interface FileRoutesById {
|
|
258
|
+
__root__: typeof rootRouteImport;
|
|
259
|
+
'/': typeof IndexRoute;
|
|
260
|
+
}
|
|
261
|
+
export interface FileRouteTypes {
|
|
262
|
+
fileRoutesByFullPath: FileRoutesByFullPath;
|
|
263
|
+
fullPaths: '/';
|
|
264
|
+
fileRoutesByTo: FileRoutesByTo;
|
|
265
|
+
to: '/';
|
|
266
|
+
id: '__root__' | '/';
|
|
267
|
+
fileRoutesById: FileRoutesById;
|
|
268
|
+
}
|
|
269
|
+
export interface RootRouteChildren {
|
|
270
|
+
IndexRoute: typeof IndexRoute;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare module '@tanstack/react-router' {
|
|
274
|
+
interface FileRoutesByPath {
|
|
275
|
+
'/': {
|
|
276
|
+
id: '/';
|
|
277
|
+
path: '/';
|
|
278
|
+
fullPath: '/';
|
|
279
|
+
preLoaderRoute: typeof IndexRouteImport;
|
|
280
|
+
parentRoute: typeof rootRouteImport;
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const rootRouteChildren: RootRouteChildren = {
|
|
286
|
+
IndexRoute: IndexRoute,
|
|
287
|
+
};
|
|
288
|
+
export const routeTree = rootRouteImport
|
|
289
|
+
._addFileChildren(rootRouteChildren)
|
|
290
|
+
._addFileTypes<FileRouteTypes>();
|
|
291
|
+
"
|
|
292
|
+
`;
|
|
293
|
+
|
|
294
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/routes/__root.tsx 1`] = `
|
|
295
|
+
"import { createRootRouteWithContext } from '@tanstack/react-router';
|
|
296
|
+
import AppLayout from '../components/AppLayout';
|
|
297
|
+
import { RouterProviderContext } from '../main';
|
|
298
|
+
import { Outlet } from '@tanstack/react-router';
|
|
299
|
+
|
|
300
|
+
export const Route = createRootRouteWithContext<RouterProviderContext>()({
|
|
301
|
+
component: () => (
|
|
302
|
+
<AppLayout>
|
|
303
|
+
<Outlet />
|
|
304
|
+
</AppLayout>
|
|
305
|
+
),
|
|
306
|
+
});
|
|
307
|
+
"
|
|
308
|
+
`;
|
|
309
|
+
|
|
310
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/routes/index.tsx 1`] = `
|
|
311
|
+
"import {
|
|
312
|
+
ContentLayout,
|
|
313
|
+
Header,
|
|
314
|
+
SpaceBetween,
|
|
315
|
+
Container,
|
|
316
|
+
} from '@cloudscape-design/components';
|
|
317
|
+
import { createFileRoute } from '@tanstack/react-router';
|
|
318
|
+
|
|
319
|
+
export const Route = createFileRoute('/')({
|
|
320
|
+
component: RouteComponent,
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
function RouteComponent() {
|
|
324
|
+
return (
|
|
325
|
+
<ContentLayout header={<Header>Welcome</Header>}>
|
|
326
|
+
<SpaceBetween size="l">
|
|
327
|
+
<Container>Welcome to your new React website!</Container>
|
|
328
|
+
</SpaceBetween>
|
|
329
|
+
</ContentLayout>
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
"
|
|
333
|
+
`;
|
|
334
|
+
|
|
335
|
+
exports[`react-website generator (uxProvider=Cloudscape) > should update package.json with required dependencies > test-app/src/styles.css 1`] = `
|
|
336
|
+
"@import 'tailwindcss';
|
|
337
|
+
/* You can add global styles to this file, and also import other style files */
|
|
338
|
+
"
|
|
339
|
+
`;
|
|
340
|
+
|
|
341
|
+
exports[`react-website generator (uxProvider=None) > should update package.json with required dependencies > test-app/src/components/AppLayout/index.tsx 1`] = `
|
|
342
|
+
"import * as React from 'react';
|
|
343
|
+
|
|
344
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
345
|
+
|
|
346
|
+
import Config from '../../config';
|
|
347
|
+
import { Link, useLocation, useMatchRoute } from '@tanstack/react-router';
|
|
348
|
+
|
|
349
|
+
const getBreadcrumbs = (
|
|
350
|
+
matchRoute: ReturnType<typeof useMatchRoute>,
|
|
351
|
+
pathName: string,
|
|
352
|
+
search: string,
|
|
353
|
+
defaultBreadcrumb: string,
|
|
354
|
+
availableRoutes?: string[],
|
|
355
|
+
) => {
|
|
356
|
+
const segments = [
|
|
357
|
+
defaultBreadcrumb,
|
|
358
|
+
...pathName.split('/').filter((segment) => segment !== ''),
|
|
359
|
+
];
|
|
360
|
+
|
|
361
|
+
return segments.map((segment, i) => {
|
|
362
|
+
const href =
|
|
363
|
+
i === 0
|
|
364
|
+
? '/'
|
|
365
|
+
: \`/\${segments
|
|
366
|
+
.slice(1, i + 1)
|
|
367
|
+
.join('/')
|
|
368
|
+
.replace('//', '/')}\`;
|
|
369
|
+
|
|
370
|
+
const matched =
|
|
371
|
+
!availableRoutes || availableRoutes.find((r) => matchRoute({ to: href }));
|
|
372
|
+
|
|
373
|
+
return {
|
|
374
|
+
href: matched ? \`\${href}\${search}\` : '#',
|
|
375
|
+
text: segment,
|
|
376
|
+
};
|
|
377
|
+
});
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Defines the App layout and contains logic for routing.
|
|
382
|
+
*/
|
|
383
|
+
const AppLayout: React.FC<React.PropsWithChildren> = ({ children }) => {
|
|
384
|
+
const [activeBreadcrumbs, setActiveBreadcrumbs] = useState<
|
|
385
|
+
{ href: string; text: string }[]
|
|
386
|
+
>([{ text: '/', href: '/' }]);
|
|
387
|
+
const matchRoute = useMatchRoute();
|
|
388
|
+
const { pathname, search } = useLocation();
|
|
389
|
+
const navItems = useMemo(() => [{ to: '/', label: 'Home' }], []);
|
|
390
|
+
|
|
391
|
+
useEffect(() => {
|
|
392
|
+
const breadcrumbs = getBreadcrumbs(
|
|
393
|
+
matchRoute,
|
|
394
|
+
pathname,
|
|
395
|
+
Object.entries(search).reduce((p, [k, v]) => p + \`\${k}=\${v}\`, ''),
|
|
396
|
+
'Home',
|
|
397
|
+
);
|
|
398
|
+
setActiveBreadcrumbs(breadcrumbs);
|
|
399
|
+
}, [matchRoute, pathname, search]);
|
|
400
|
+
|
|
401
|
+
return (
|
|
402
|
+
<div className="app-shell">
|
|
403
|
+
<header className="app-header">
|
|
404
|
+
<div className="app-header-inner">
|
|
405
|
+
<div className="brand">
|
|
406
|
+
<a href="/">
|
|
407
|
+
<img
|
|
408
|
+
src={Config.logo}
|
|
409
|
+
alt={\`\${Config.applicationName} logo\`}
|
|
410
|
+
className="brand-logo"
|
|
411
|
+
/>
|
|
412
|
+
<span className="brand-name">{Config.applicationName}</span>
|
|
413
|
+
</a>
|
|
414
|
+
</div>
|
|
415
|
+
|
|
416
|
+
<nav className="app-nav">
|
|
417
|
+
{navItems.map((item) => (
|
|
418
|
+
<Link
|
|
419
|
+
key={item.to}
|
|
420
|
+
to={item.to}
|
|
421
|
+
className={pathname === item.to ? 'active' : undefined}
|
|
422
|
+
>
|
|
423
|
+
{item.label}
|
|
424
|
+
</Link>
|
|
425
|
+
))}
|
|
426
|
+
</nav>
|
|
427
|
+
</div>
|
|
428
|
+
</header>
|
|
429
|
+
<main className="app-main">
|
|
430
|
+
<nav className="breadcrumbs" aria-label="Breadcrumb">
|
|
431
|
+
{activeBreadcrumbs.map((crumb, index) => (
|
|
432
|
+
<span className="breadcrumb-segment" key={crumb.href || index}>
|
|
433
|
+
{index > 0 && <span className="breadcrumb-separator">/</span>}
|
|
434
|
+
{index === activeBreadcrumbs.length - 1 ? (
|
|
435
|
+
<span className="breadcrumb-current">{crumb.text}</span>
|
|
436
|
+
) : (
|
|
437
|
+
<Link to={crumb.href}>{crumb.text}</Link>
|
|
438
|
+
)}
|
|
439
|
+
</span>
|
|
440
|
+
))}
|
|
441
|
+
</nav>
|
|
442
|
+
|
|
443
|
+
<section className="card">{children}</section>
|
|
444
|
+
</main>
|
|
445
|
+
</div>
|
|
446
|
+
);
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
export default AppLayout;
|
|
450
|
+
"
|
|
451
|
+
`;
|
|
452
|
+
|
|
453
|
+
exports[`react-website generator (uxProvider=None) > should update package.json with required dependencies > test-app/src/components/alert.tsx 1`] = `
|
|
454
|
+
"import React from 'react';
|
|
455
|
+
|
|
456
|
+
interface AlertProps {
|
|
457
|
+
type: string;
|
|
458
|
+
header: string;
|
|
459
|
+
children: React.ReactNode;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export const Alert: React.FC<AlertProps> = ({ type, header, children }) => (
|
|
463
|
+
<div className={\`alert alert-\${type}\`} role="alert">
|
|
464
|
+
<div className="alert-header">{header}</div>
|
|
465
|
+
<div className="alert-body">{children}</div>
|
|
466
|
+
</div>
|
|
467
|
+
);
|
|
468
|
+
"
|
|
469
|
+
`;
|
|
470
|
+
|
|
471
|
+
exports[`react-website generator (uxProvider=None) > should update package.json with required dependencies > test-app/src/components/spinner.tsx 1`] = `
|
|
472
|
+
"import React from 'react';
|
|
473
|
+
|
|
474
|
+
export const Spinner: React.FC = () => (
|
|
475
|
+
<div className="spinner" role="status" aria-live="polite" aria-busy="true">
|
|
476
|
+
Loading...
|
|
477
|
+
</div>
|
|
478
|
+
);
|
|
479
|
+
"
|
|
480
|
+
`;
|
|
481
|
+
|
|
482
|
+
exports[`react-website generator (uxProvider=None) > should update package.json with required dependencies > test-app/src/config.ts 1`] = `
|
|
483
|
+
"export default {
|
|
484
|
+
applicationName: 'test-app',
|
|
485
|
+
logo: 'data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4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YTQ4My4yNiw0ODMuMjYsMCwwLDAtMjQuMzEtNjAuOTQsNDgxLjUyLDQ4MS41MiwwLDAsMCwyMy4zNi02MC4wNmM0LjkxLDEuNDMsOS42OCwyLjkzLDE0LjI3LDQuNTIsNDQuNDIsMTUuMzIsNzEuNTIsMzgsNzEuNTIsNTUuNDNDNDc1LjUsMjc0LjE5LDQ0Ni4yMywyOTguMzMsMzk4LjcyLDMxNC4xMVoiLz4KDTxwYXRoIGQ9Ik0yNTYsMjk4LjU1YTQzLDQzLDAsMSwwLTQyLjg2LTQzQTQyLjkxLDQyLjkxLDAsMCwwLDI1NiwyOTguNTVaIi8+Cg08L2c+Cg08L3N2Zz4=',
|
|
486
|
+
};
|
|
487
|
+
"
|
|
488
|
+
`;
|
|
489
|
+
|
|
490
|
+
exports[`react-website generator (uxProvider=None) > should update package.json with required dependencies > test-app/src/main.tsx 1`] = `
|
|
491
|
+
"import React from 'react';
|
|
492
|
+
import { createRoot } from 'react-dom/client';
|
|
493
|
+
import { RouterProvider, createRouter } from '@tanstack/react-router';
|
|
494
|
+
import { routeTree } from './routeTree.gen';
|
|
495
|
+
|
|
496
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
497
|
+
export type RouterProviderContext = {};
|
|
498
|
+
|
|
499
|
+
const router = createRouter({
|
|
500
|
+
routeTree,
|
|
501
|
+
context: {},
|
|
502
|
+
});
|
|
503
|
+
|
|
504
|
+
// Register the router instance for type safety
|
|
505
|
+
declare module '@tanstack/react-router' {
|
|
506
|
+
interface Register {
|
|
507
|
+
router: typeof router;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
const App = () => {
|
|
512
|
+
return <RouterProvider router={router} context={{}} />;
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
const root = document.getElementById('root');
|
|
516
|
+
root &&
|
|
517
|
+
createRoot(root).render(
|
|
518
|
+
<React.StrictMode>
|
|
519
|
+
<App />
|
|
520
|
+
</React.StrictMode>,
|
|
521
|
+
);
|
|
522
|
+
"
|
|
523
|
+
`;
|
|
524
|
+
|
|
525
|
+
exports[`react-website generator (uxProvider=None) > should update package.json with required dependencies > test-app/src/routeTree.gen.ts 1`] = `
|
|
526
|
+
"/* eslint-disable */
|
|
527
|
+
|
|
528
|
+
// @ts-nocheck
|
|
529
|
+
|
|
530
|
+
// noinspection JSUnusedGlobalSymbols
|
|
531
|
+
|
|
532
|
+
// This file was automatically generated by TanStack Router.
|
|
533
|
+
// You should NOT make any changes in this file as it will be overwritten.
|
|
534
|
+
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
535
|
+
|
|
536
|
+
import { Route as rootRouteImport } from './routes/__root';
|
|
537
|
+
import { Route as IndexRouteImport } from './routes/index';
|
|
538
|
+
|
|
539
|
+
const IndexRoute = IndexRouteImport.update({
|
|
540
|
+
id: '/',
|
|
541
|
+
path: '/',
|
|
542
|
+
getParentRoute: () => rootRouteImport,
|
|
543
|
+
} as any);
|
|
544
|
+
|
|
545
|
+
export interface FileRoutesByFullPath {
|
|
546
|
+
'/': typeof IndexRoute;
|
|
547
|
+
}
|
|
548
|
+
export interface FileRoutesByTo {
|
|
549
|
+
'/': typeof IndexRoute;
|
|
550
|
+
}
|
|
551
|
+
export interface FileRoutesById {
|
|
552
|
+
__root__: typeof rootRouteImport;
|
|
553
|
+
'/': typeof IndexRoute;
|
|
554
|
+
}
|
|
555
|
+
export interface FileRouteTypes {
|
|
556
|
+
fileRoutesByFullPath: FileRoutesByFullPath;
|
|
557
|
+
fullPaths: '/';
|
|
558
|
+
fileRoutesByTo: FileRoutesByTo;
|
|
559
|
+
to: '/';
|
|
560
|
+
id: '__root__' | '/';
|
|
561
|
+
fileRoutesById: FileRoutesById;
|
|
562
|
+
}
|
|
563
|
+
export interface RootRouteChildren {
|
|
564
|
+
IndexRoute: typeof IndexRoute;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
declare module '@tanstack/react-router' {
|
|
568
|
+
interface FileRoutesByPath {
|
|
569
|
+
'/': {
|
|
570
|
+
id: '/';
|
|
571
|
+
path: '/';
|
|
572
|
+
fullPath: '/';
|
|
573
|
+
preLoaderRoute: typeof IndexRouteImport;
|
|
574
|
+
parentRoute: typeof rootRouteImport;
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
const rootRouteChildren: RootRouteChildren = {
|
|
580
|
+
IndexRoute: IndexRoute,
|
|
581
|
+
};
|
|
582
|
+
export const routeTree = rootRouteImport
|
|
583
|
+
._addFileChildren(rootRouteChildren)
|
|
584
|
+
._addFileTypes<FileRouteTypes>();
|
|
585
|
+
"
|
|
586
|
+
`;
|
|
587
|
+
|
|
588
|
+
exports[`react-website generator (uxProvider=None) > should update package.json with required dependencies > test-app/src/routes/__root.tsx 1`] = `
|
|
589
|
+
"import { createRootRouteWithContext } from '@tanstack/react-router';
|
|
590
|
+
import AppLayout from '../components/AppLayout';
|
|
591
|
+
import { RouterProviderContext } from '../main';
|
|
592
|
+
import { Outlet } from '@tanstack/react-router';
|
|
593
|
+
|
|
594
|
+
export const Route = createRootRouteWithContext<RouterProviderContext>()({
|
|
595
|
+
component: () => (
|
|
596
|
+
<AppLayout>
|
|
597
|
+
<Outlet />
|
|
598
|
+
</AppLayout>
|
|
599
|
+
),
|
|
600
|
+
});
|
|
601
|
+
"
|
|
602
|
+
`;
|
|
603
|
+
|
|
604
|
+
exports[`react-website generator (uxProvider=None) > should update package.json with required dependencies > test-app/src/routes/index.tsx 1`] = `
|
|
605
|
+
"import { createFileRoute } from '@tanstack/react-router';
|
|
606
|
+
|
|
607
|
+
export const Route = createFileRoute('/')({
|
|
608
|
+
component: RouteComponent,
|
|
609
|
+
});
|
|
610
|
+
|
|
611
|
+
function RouteComponent() {
|
|
612
|
+
return (
|
|
613
|
+
<>
|
|
614
|
+
<h1>Welcome</h1>
|
|
615
|
+
<p>Welcome to your new React website!</p>
|
|
616
|
+
</>
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
"
|
|
620
|
+
`;
|
|
621
|
+
|
|
622
|
+
exports[`react-website generator (uxProvider=None) > should update package.json with required dependencies > test-app/src/styles.css 1`] = `
|
|
623
|
+
"@import 'tailwindcss';
|
|
624
|
+
|
|
625
|
+
:root {
|
|
626
|
+
color-scheme: light;
|
|
627
|
+
font-family:
|
|
628
|
+
system-ui,
|
|
629
|
+
-apple-system,
|
|
630
|
+
BlinkMacSystemFont,
|
|
631
|
+
'Segoe UI',
|
|
632
|
+
sans-serif;
|
|
633
|
+
background-color: #f8fafc;
|
|
634
|
+
color: #0f172a;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
* {
|
|
638
|
+
box-sizing: border-box;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
body {
|
|
642
|
+
margin: 0;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
a {
|
|
646
|
+
color: inherit;
|
|
647
|
+
text-decoration: none;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.app-shell {
|
|
651
|
+
min-height: 100vh;
|
|
652
|
+
display: flex;
|
|
653
|
+
flex-direction: column;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.app-header {
|
|
657
|
+
display: flex;
|
|
658
|
+
align-items: center;
|
|
659
|
+
justify-content: flex-start;
|
|
660
|
+
padding: 1rem 0;
|
|
661
|
+
border-bottom: 1px solid #e2e8f0;
|
|
662
|
+
background: #ffffff;
|
|
663
|
+
position: sticky;
|
|
664
|
+
top: 0;
|
|
665
|
+
z-index: 1;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.app-header-inner {
|
|
669
|
+
display: flex;
|
|
670
|
+
align-items: center;
|
|
671
|
+
gap: 1.25rem;
|
|
672
|
+
width: min(1100px, 100%);
|
|
673
|
+
margin: 0 auto;
|
|
674
|
+
padding: 0 1rem;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.brand {
|
|
678
|
+
display: flex;
|
|
679
|
+
align-items: center;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.brand a {
|
|
683
|
+
display: inline-flex;
|
|
684
|
+
align-items: center;
|
|
685
|
+
gap: 0.5rem;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.brand-logo {
|
|
689
|
+
height: 32px;
|
|
690
|
+
width: auto;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.brand-name {
|
|
694
|
+
font-weight: 700;
|
|
695
|
+
font-size: 1.1rem;
|
|
696
|
+
line-height: 1.1;
|
|
697
|
+
display: inline-flex;
|
|
698
|
+
align-items: center;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.user-greeting {
|
|
702
|
+
margin-left: auto;
|
|
703
|
+
display: flex;
|
|
704
|
+
align-items: center;
|
|
705
|
+
gap: 0.5rem;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
.signout-link {
|
|
709
|
+
border: none;
|
|
710
|
+
background: transparent;
|
|
711
|
+
color: #0ea5e9;
|
|
712
|
+
cursor: pointer;
|
|
713
|
+
font-weight: 600;
|
|
714
|
+
padding: 0.25rem 0.35rem;
|
|
715
|
+
border-radius: 0.35rem;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.signout-link:hover {
|
|
719
|
+
background: #e0f2fe;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.app-main {
|
|
723
|
+
width: min(1100px, 100%);
|
|
724
|
+
margin: 2rem auto;
|
|
725
|
+
padding: 0 1rem 3rem;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.card {
|
|
729
|
+
background: #ffffff;
|
|
730
|
+
border-radius: 0.75rem;
|
|
731
|
+
padding: 1.5rem;
|
|
732
|
+
box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
|
|
733
|
+
border: 1px solid #e2e8f0;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.card h1 {
|
|
737
|
+
margin-top: 0;
|
|
738
|
+
margin-bottom: 0.5rem;
|
|
739
|
+
font-size: 1.5rem;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.card p {
|
|
743
|
+
margin: 0;
|
|
744
|
+
color: #334155;
|
|
745
|
+
line-height: 1.6;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.spinner {
|
|
749
|
+
display: inline-block;
|
|
750
|
+
padding: 0.75rem 1rem;
|
|
751
|
+
border: 1px solid #e2e8f0;
|
|
752
|
+
border-radius: 0.5rem;
|
|
753
|
+
background: #ffffff;
|
|
754
|
+
color: #0f172a;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.alert {
|
|
758
|
+
border-radius: 0.75rem;
|
|
759
|
+
padding: 1rem 1.25rem;
|
|
760
|
+
margin: 1rem 0;
|
|
761
|
+
border: 1px solid #e2e8f0;
|
|
762
|
+
background: #fff;
|
|
763
|
+
color: #0f172a;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.alert-error {
|
|
767
|
+
border-color: #fecdd3;
|
|
768
|
+
background: #fff1f2;
|
|
769
|
+
color: #881337;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
.alert-header {
|
|
773
|
+
font-weight: 700;
|
|
774
|
+
margin-bottom: 0.35rem;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.alert-body {
|
|
778
|
+
margin: 0;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
.app-nav {
|
|
782
|
+
display: flex;
|
|
783
|
+
align-items: center;
|
|
784
|
+
gap: 0.75rem;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
.app-nav a {
|
|
788
|
+
display: inline-flex;
|
|
789
|
+
align-items: center;
|
|
790
|
+
padding: 0.35rem 0.65rem;
|
|
791
|
+
border-radius: 0.375rem;
|
|
792
|
+
line-height: 1.1;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
.app-nav a.active {
|
|
796
|
+
background: #e2e8f0;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.breadcrumbs {
|
|
800
|
+
display: flex;
|
|
801
|
+
align-items: center;
|
|
802
|
+
gap: 0.35rem;
|
|
803
|
+
font-size: 0.95rem;
|
|
804
|
+
color: #475569;
|
|
805
|
+
margin: 0 0 1rem;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
.breadcrumb-segment a {
|
|
809
|
+
color: inherit;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
.breadcrumb-current {
|
|
813
|
+
font-weight: 600;
|
|
814
|
+
color: #0f172a;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
.breadcrumb-separator {
|
|
818
|
+
color: #cbd5e1;
|
|
819
|
+
}
|
|
820
|
+
"
|
|
821
|
+
`;
|
|
822
|
+
|
|
3
823
|
exports[`react-website generator > TailwindCSS integration > should configure vite with TailwindCSS plugin by default > vite.config.mts-with-tailwind 1`] = `
|
|
4
824
|
"import tailwindcss from '@tailwindcss/vite';
|
|
5
825
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
@@ -1055,9 +1875,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1055
1875
|
"name": "@proj/source",
|
|
1056
1876
|
"dependencies": {
|
|
1057
1877
|
"@cloudscape-design/board-components": "3.0.130",
|
|
1058
|
-
"@cloudscape-design/components": "3.0.
|
|
1878
|
+
"@cloudscape-design/components": "3.0.1144",
|
|
1059
1879
|
"@cloudscape-design/global-styles": "1.0.49",
|
|
1060
|
-
"aws-cdk-lib": "2.
|
|
1880
|
+
"aws-cdk-lib": "2.230.0",
|
|
1061
1881
|
"constructs": "10.4.3",
|
|
1062
1882
|
"react": "19.2.0",
|
|
1063
1883
|
"react-dom": "19.2.0",
|
|
@@ -1922,7 +2742,8 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1922
2742
|
}
|
|
1923
2743
|
},
|
|
1924
2744
|
"metadata": {
|
|
1925
|
-
"generator": "ts#react-website"
|
|
2745
|
+
"generator": "ts#react-website",
|
|
2746
|
+
"uxProvider": "Cloudscape"
|
|
1926
2747
|
}
|
|
1927
2748
|
}
|
|
1928
2749
|
"
|
|
@@ -2064,6 +2885,20 @@ export default AppLayout;
|
|
|
2064
2885
|
"
|
|
2065
2886
|
`;
|
|
2066
2887
|
|
|
2888
|
+
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > test-app/src/components/alert.tsx 1`] = `
|
|
2889
|
+
"import { Alert as CloudscapeAlert } from '@cloudscape-design/components';
|
|
2890
|
+
|
|
2891
|
+
export const Alert = CloudscapeAlert;
|
|
2892
|
+
"
|
|
2893
|
+
`;
|
|
2894
|
+
|
|
2895
|
+
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > test-app/src/components/spinner.tsx 1`] = `
|
|
2896
|
+
"import { Spinner as CloudscapeSpinner } from '@cloudscape-design/components';
|
|
2897
|
+
|
|
2898
|
+
export const Spinner = CloudscapeSpinner;
|
|
2899
|
+
"
|
|
2900
|
+
`;
|
|
2901
|
+
|
|
2067
2902
|
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > test-app/src/config.ts 1`] = `
|
|
2068
2903
|
"export default {
|
|
2069
2904
|
applicationName: 'test-app',
|
|
@@ -2460,10 +3295,10 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2460
3295
|
"name": "@proj/source",
|
|
2461
3296
|
"dependencies": {
|
|
2462
3297
|
"@cloudscape-design/board-components": "3.0.130",
|
|
2463
|
-
"@cloudscape-design/components": "3.0.
|
|
3298
|
+
"@cloudscape-design/components": "3.0.1144",
|
|
2464
3299
|
"@cloudscape-design/global-styles": "1.0.49",
|
|
2465
|
-
"@tanstack/react-router": "1.139.
|
|
2466
|
-
"aws-cdk-lib": "2.
|
|
3300
|
+
"@tanstack/react-router": "1.139.7",
|
|
3301
|
+
"aws-cdk-lib": "2.230.0",
|
|
2467
3302
|
"constructs": "10.4.3",
|
|
2468
3303
|
"react": "19.2.0",
|
|
2469
3304
|
"react-dom": "19.2.0",
|
|
@@ -2483,8 +3318,8 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2483
3318
|
"@swc/core": "~1.5.7",
|
|
2484
3319
|
"@swc/helpers": "~0.5.11",
|
|
2485
3320
|
"@tailwindcss/vite": "4.1.17",
|
|
2486
|
-
"@tanstack/router-generator": "1.139.
|
|
2487
|
-
"@tanstack/router-plugin": "1.139.
|
|
3321
|
+
"@tanstack/router-generator": "1.139.7",
|
|
3322
|
+
"@tanstack/router-plugin": "1.139.7",
|
|
2488
3323
|
"@tanstack/router-utils": "1.139.0",
|
|
2489
3324
|
"@tanstack/virtual-file-routes": "1.139.0",
|
|
2490
3325
|
"@testing-library/dom": "10.4.0",
|
|
@@ -3332,7 +4167,8 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
3332
4167
|
}
|
|
3333
4168
|
},
|
|
3334
4169
|
"metadata": {
|
|
3335
|
-
"generator": "ts#react-website"
|
|
4170
|
+
"generator": "ts#react-website",
|
|
4171
|
+
"uxProvider": "Cloudscape"
|
|
3336
4172
|
}
|
|
3337
4173
|
}
|
|
3338
4174
|
"
|
|
@@ -3534,6 +4370,20 @@ export default AppLayout;
|
|
|
3534
4370
|
"
|
|
3535
4371
|
`;
|
|
3536
4372
|
|
|
4373
|
+
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > test-app/src/components/alert.tsx 1`] = `
|
|
4374
|
+
"import { Alert as CloudscapeAlert } from '@cloudscape-design/components';
|
|
4375
|
+
|
|
4376
|
+
export const Alert = CloudscapeAlert;
|
|
4377
|
+
"
|
|
4378
|
+
`;
|
|
4379
|
+
|
|
4380
|
+
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > test-app/src/components/spinner.tsx 1`] = `
|
|
4381
|
+
"import { Spinner as CloudscapeSpinner } from '@cloudscape-design/components';
|
|
4382
|
+
|
|
4383
|
+
export const Spinner = CloudscapeSpinner;
|
|
4384
|
+
"
|
|
4385
|
+
`;
|
|
4386
|
+
|
|
3537
4387
|
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > test-app/src/config.ts 1`] = `
|
|
3538
4388
|
"export default {
|
|
3539
4389
|
applicationName: 'test-app',
|
|
@@ -3602,107 +4452,55 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
3602
4452
|
// You should NOT make any changes in this file as it will be overwritten.
|
|
3603
4453
|
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
3604
4454
|
|
|
3605
|
-
|
|
4455
|
+
import { Route as rootRouteImport } from './routes/__root';
|
|
4456
|
+
import { Route as IndexRouteImport } from './routes/index';
|
|
3606
4457
|
|
|
3607
|
-
|
|
3608
|
-
import { Route as IndexImport } from './routes/index';
|
|
3609
|
-
import { Route as WelcomeIndexImport } from './routes/welcome/index';
|
|
3610
|
-
|
|
3611
|
-
// Create/Update Routes
|
|
3612
|
-
|
|
3613
|
-
const IndexRoute = IndexImport.update({
|
|
4458
|
+
const IndexRoute = IndexRouteImport.update({
|
|
3614
4459
|
id: '/',
|
|
3615
4460
|
path: '/',
|
|
3616
|
-
getParentRoute: () =>
|
|
3617
|
-
} as any);
|
|
3618
|
-
|
|
3619
|
-
const WelcomeIndexRoute = WelcomeIndexImport.update({
|
|
3620
|
-
id: '/welcome/',
|
|
3621
|
-
path: '/welcome/',
|
|
3622
|
-
getParentRoute: () => rootRoute,
|
|
4461
|
+
getParentRoute: () => rootRouteImport,
|
|
3623
4462
|
} as any);
|
|
3624
4463
|
|
|
3625
|
-
// Populate the FileRoutesByPath interface
|
|
3626
|
-
|
|
3627
|
-
declare module '@tanstack/react-router' {
|
|
3628
|
-
interface FileRoutesByPath {
|
|
3629
|
-
'/': {
|
|
3630
|
-
id: '/';
|
|
3631
|
-
path: '/';
|
|
3632
|
-
fullPath: '/';
|
|
3633
|
-
preLoaderRoute: typeof IndexImport;
|
|
3634
|
-
parentRoute: typeof rootRoute;
|
|
3635
|
-
};
|
|
3636
|
-
'/welcome/': {
|
|
3637
|
-
id: '/welcome/';
|
|
3638
|
-
path: '/welcome';
|
|
3639
|
-
fullPath: '/welcome';
|
|
3640
|
-
preLoaderRoute: typeof WelcomeIndexImport;
|
|
3641
|
-
parentRoute: typeof rootRoute;
|
|
3642
|
-
};
|
|
3643
|
-
}
|
|
3644
|
-
}
|
|
3645
|
-
|
|
3646
|
-
// Create and export the route tree
|
|
3647
|
-
|
|
3648
4464
|
export interface FileRoutesByFullPath {
|
|
3649
4465
|
'/': typeof IndexRoute;
|
|
3650
|
-
'/welcome': typeof WelcomeIndexRoute;
|
|
3651
4466
|
}
|
|
3652
|
-
|
|
3653
4467
|
export interface FileRoutesByTo {
|
|
3654
4468
|
'/': typeof IndexRoute;
|
|
3655
|
-
'/welcome': typeof WelcomeIndexRoute;
|
|
3656
4469
|
}
|
|
3657
|
-
|
|
3658
4470
|
export interface FileRoutesById {
|
|
3659
|
-
__root__: typeof
|
|
4471
|
+
__root__: typeof rootRouteImport;
|
|
3660
4472
|
'/': typeof IndexRoute;
|
|
3661
|
-
'/welcome/': typeof WelcomeIndexRoute;
|
|
3662
4473
|
}
|
|
3663
|
-
|
|
3664
4474
|
export interface FileRouteTypes {
|
|
3665
4475
|
fileRoutesByFullPath: FileRoutesByFullPath;
|
|
3666
|
-
fullPaths: '/'
|
|
4476
|
+
fullPaths: '/';
|
|
3667
4477
|
fileRoutesByTo: FileRoutesByTo;
|
|
3668
|
-
to: '/'
|
|
3669
|
-
id: '__root__' | '/'
|
|
4478
|
+
to: '/';
|
|
4479
|
+
id: '__root__' | '/';
|
|
3670
4480
|
fileRoutesById: FileRoutesById;
|
|
3671
4481
|
}
|
|
3672
|
-
|
|
3673
4482
|
export interface RootRouteChildren {
|
|
3674
4483
|
IndexRoute: typeof IndexRoute;
|
|
3675
|
-
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4486
|
+
declare module '@tanstack/react-router' {
|
|
4487
|
+
interface FileRoutesByPath {
|
|
4488
|
+
'/': {
|
|
4489
|
+
id: '/';
|
|
4490
|
+
path: '/';
|
|
4491
|
+
fullPath: '/';
|
|
4492
|
+
preLoaderRoute: typeof IndexRouteImport;
|
|
4493
|
+
parentRoute: typeof rootRouteImport;
|
|
4494
|
+
};
|
|
4495
|
+
}
|
|
3676
4496
|
}
|
|
3677
4497
|
|
|
3678
4498
|
const rootRouteChildren: RootRouteChildren = {
|
|
3679
4499
|
IndexRoute: IndexRoute,
|
|
3680
|
-
WelcomeIndexRoute: WelcomeIndexRoute,
|
|
3681
4500
|
};
|
|
3682
|
-
|
|
3683
|
-
export const routeTree = rootRoute
|
|
4501
|
+
export const routeTree = rootRouteImport
|
|
3684
4502
|
._addFileChildren(rootRouteChildren)
|
|
3685
4503
|
._addFileTypes<FileRouteTypes>();
|
|
3686
|
-
|
|
3687
|
-
/* ROUTE_MANIFEST_START
|
|
3688
|
-
{
|
|
3689
|
-
"routes": {
|
|
3690
|
-
"__root__": {
|
|
3691
|
-
"filePath": "__root.tsx",
|
|
3692
|
-
"children": [
|
|
3693
|
-
"/",
|
|
3694
|
-
"/welcome/"
|
|
3695
|
-
]
|
|
3696
|
-
},
|
|
3697
|
-
"/": {
|
|
3698
|
-
"filePath": "index.tsx"
|
|
3699
|
-
},
|
|
3700
|
-
"/welcome/": {
|
|
3701
|
-
"filePath": "welcome/index.tsx"
|
|
3702
|
-
}
|
|
3703
|
-
}
|
|
3704
|
-
}
|
|
3705
|
-
ROUTE_MANIFEST_END */
|
|
3706
4504
|
"
|
|
3707
4505
|
`;
|
|
3708
4506
|
|
|
@@ -4562,10 +5360,10 @@ root &&
|
|
|
4562
5360
|
exports[`react-website generator > should handle npm scope prefix correctly > scoped-dependencies 1`] = `
|
|
4563
5361
|
{
|
|
4564
5362
|
"@cloudscape-design/board-components": "3.0.130",
|
|
4565
|
-
"@cloudscape-design/components": "3.0.
|
|
5363
|
+
"@cloudscape-design/components": "3.0.1144",
|
|
4566
5364
|
"@cloudscape-design/global-styles": "1.0.49",
|
|
4567
|
-
"@tanstack/react-router": "1.139.
|
|
4568
|
-
"aws-cdk-lib": "2.
|
|
5365
|
+
"@tanstack/react-router": "1.139.7",
|
|
5366
|
+
"aws-cdk-lib": "2.230.0",
|
|
4569
5367
|
"constructs": "10.4.3",
|
|
4570
5368
|
"react": "19.2.0",
|
|
4571
5369
|
"react-dom": "19.2.0",
|