1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
| /**
| * TanStack Start registry entry.
| *
| * Detection and the apply/remove pair are the existing adapter's
| * (`../tanstack-adapter.mjs`); this file only declares them to the registry
| * and names the artifacts the journal has to be able to heal.
| */
|
| import {
| TANSTACK_MARKER_OPEN,
| applyTanStackLiveAdapter,
| detectTanStackStartProject,
| removeTanStackLiveAdapter,
| unpatchTanStackRoot,
| } from '../tanstack-adapter.mjs';
|
| export const tanstackStart = {
| name: 'tanstack-start',
|
| detect(cwd) {
| return detectTanStackStartProject(cwd);
| },
|
| inject: {
| kind: 'adapter',
|
| apply({ cwd, port, token, project }) {
| return applyTanStackLiveAdapter({ cwd, port, token, project });
| },
|
| remove({ cwd, project }) {
| return removeTanStackLiveAdapter({ cwd, project });
| },
|
| // The mount component's extension follows the root route's, so the path
| // cannot live in the static ignore list.
| ignorePatterns(project) {
| return project?.componentFile ? [project.componentFile] : [];
| },
|
| artifacts({ project }) {
| if (!project) return [];
| return [
| {
| kind: 'created',
| path: project.componentFile,
| marker: 'impeccable-live-tanstack',
| pruneTo: 'src',
| },
| {
| kind: 'patched',
| path: project.rootRoute,
| patch: 'tanstack-root',
| markers: [TANSTACK_MARKER_OPEN],
| },
| ];
| },
|
| unpatch: {
| 'tanstack-root': unpatchTanStackRoot,
| },
| },
|
| source: {
| extensions: ['.tsx', '.jsx'],
| preview: 'source',
| styleMode: 'scoped',
| commentSyntax: 'jsx',
| },
| };
|
|