basalt-ui 2.7.2 → 2.8.0
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/AGENTS.md +1 -1
- package/CHANGELOG.md +33 -0
- package/MIGRATING.md +101 -15
- package/agent/rules/basalt-batteries.md +1 -1
- package/agent/rules/basalt-controls.md +1 -1
- package/agent/rules/basalt-mantine.md +1 -1
- package/agent/skills/basalt-app/SKILL.md +7 -7
- package/agent/templates/AGENTS-block.md.tpl +1 -1
- package/dist/charts/BandStrip.d.ts +13 -0
- package/dist/charts/BandStrip.d.ts.map +1 -1
- package/dist/charts/BandStrip.js +142 -44
- package/dist/cli/doctor-upgrade.d.ts +11 -0
- package/dist/cli/doctor-upgrade.d.ts.map +1 -1
- package/dist/cli/doctor-upgrade.js +122 -10
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +4 -0
- package/dist/cli/help.js +1 -1
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +12 -0
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +7 -4
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +27 -2
- package/dist/content/toc.d.ts +5 -0
- package/dist/content/toc.d.ts.map +1 -1
- package/dist/provider/index.d.ts +22 -4
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +21 -6
- package/dist/provider/test-router.d.ts +2 -1
- package/dist/provider/test-router.d.ts.map +1 -1
- package/dist/provider/test-router.js +6 -7
- package/dist/surfaces.d.ts +1 -1
- package/dist/surfaces.js +1 -1
- package/llms.txt +36 -4
- package/package.json +1 -1
- package/src/charts/BandStrip.tsx +223 -48
- package/src/cli/doctor-upgrade.ts +171 -15
- package/src/cli/doctor.ts +4 -0
- package/src/cli/help.ts +1 -1
- package/src/cli/index.ts +16 -0
- package/src/cli/init.ts +7 -6
- package/src/cli/sync.ts +29 -2
- package/src/content/toc.tsx +5 -0
- package/src/provider/index.tsx +65 -15
- package/src/provider/test-router.tsx +9 -9
- package/src/surfaces.ts +1 -1
package/dist/charts/BandStrip.js
CHANGED
|
@@ -3,7 +3,7 @@ import { barY } from "@tanstack/charts/bar";
|
|
|
3
3
|
import { decorative } from "@tanstack/charts/mark/decorative";
|
|
4
4
|
import { rect } from "@tanstack/charts/rect";
|
|
5
5
|
import { useCallback, useMemo } from "react";
|
|
6
|
-
import { oneOf } from "../common/errors.js";
|
|
6
|
+
import { oneOf, requiredProp } from "../common/errors.js";
|
|
7
7
|
import { NON_FINITE } from "../format/shared.js";
|
|
8
8
|
import { VX, alpha } from "../tokens/index.js";
|
|
9
9
|
import { CartesianRung } from "./CartesianChart.js";
|
|
@@ -34,51 +34,107 @@ function paintInto(layers, fill, opacity, cell) {
|
|
|
34
34
|
if (layer) layer.cells.push(cell);
|
|
35
35
|
else layers.set(key, { fill, opacity, cells: [cell] });
|
|
36
36
|
}
|
|
37
|
+
const clampFraction = (f) => f === void 0 || Number.isNaN(f) ? 0 : Math.min(1, Math.max(0, f));
|
|
38
|
+
function absentShareOf(span, absentKey) {
|
|
39
|
+
return absentKey === void 0 || span.state === absentKey ? 0 : clampFraction(span.absentFraction);
|
|
40
|
+
}
|
|
41
|
+
function resolveAbsent(span, absentKey, isVisible) {
|
|
42
|
+
const share = absentKey !== void 0 && isVisible(absentKey) ? absentShareOf(span, absentKey) : 0;
|
|
43
|
+
return { share, primaryShown: share < 1 && isVisible(span.state) };
|
|
44
|
+
}
|
|
45
|
+
const stateValue = (s, d) => s.formatValue ? s.formatValue(d) ?? NON_FINITE : "";
|
|
37
46
|
const unknownState = (prop, got, known) => new Error(oneOf("BandStrip", prop, [...known], got));
|
|
47
|
+
function paintSpan(ctx, span, cell) {
|
|
48
|
+
const { states, visible, absentKey } = ctx;
|
|
49
|
+
const state = states.get(span.state);
|
|
50
|
+
if (!state && process.env.NODE_ENV !== "production")
|
|
51
|
+
throw unknownState("BandSpan.state", span.state, states.keys());
|
|
52
|
+
if (absentKey === void 0 && clampFraction(span.absentFraction) > 0 && process.env.NODE_ENV !== "production")
|
|
53
|
+
throw new Error(
|
|
54
|
+
requiredProp("BandStrip", "absentState", "a BandSpan carries an absentFraction")
|
|
55
|
+
);
|
|
56
|
+
const { share, primaryShown } = resolveAbsent(span, absentKey, (k) => visible.has(k));
|
|
57
|
+
const primary = state ? primaryShown : share < 1;
|
|
58
|
+
const absentStyle = absentKey === void 0 ? void 0 : states.get(absentKey);
|
|
59
|
+
const split = cell.f1 - (cell.f1 - cell.f0) * share;
|
|
60
|
+
if (primary)
|
|
61
|
+
paintInto(
|
|
62
|
+
ctx.base,
|
|
63
|
+
span.fill ?? (state ? alpha(state.color, state.fillOpacity ?? 1) : UNKNOWN_FILL),
|
|
64
|
+
ctx.emphasis(span.state),
|
|
65
|
+
{ ...cell, f1: split, y0: 0, y1: 1 }
|
|
66
|
+
);
|
|
67
|
+
if (share > 0 && absentStyle && absentKey !== void 0)
|
|
68
|
+
paintInto(
|
|
69
|
+
ctx.base,
|
|
70
|
+
alpha(absentStyle.color, absentStyle.fillOpacity ?? 1),
|
|
71
|
+
ctx.emphasis(absentKey),
|
|
72
|
+
{ f0: split, f1: cell.f1, y0: 0, y1: 1 }
|
|
73
|
+
);
|
|
74
|
+
if (span.marker && primary) {
|
|
75
|
+
const markerKey = span.marker.state ?? span.state;
|
|
76
|
+
const markerState = states.get(markerKey);
|
|
77
|
+
if (!markerState && process.env.NODE_ENV !== "production")
|
|
78
|
+
throw unknownState("BandSpan.marker.state", markerKey, states.keys());
|
|
79
|
+
if (!markerState || visible.has(markerKey)) {
|
|
80
|
+
const inset = (span.marker.inset ?? DEFAULT_MARKER_INSET) / Math.max(ctx.height, 1);
|
|
81
|
+
paintInto(ctx.markers, markerState?.color ?? UNKNOWN_FILL, ctx.emphasis(markerKey), {
|
|
82
|
+
...cell,
|
|
83
|
+
f1: split,
|
|
84
|
+
y0: inset,
|
|
85
|
+
y1: 1 - inset
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return { primary: primary && state !== void 0, absent: share > 0 };
|
|
90
|
+
}
|
|
38
91
|
function layoutBands(input) {
|
|
39
|
-
const { data, getBand, fold,
|
|
92
|
+
const { data, getBand, fold, absentState: absentKey } = input;
|
|
40
93
|
const cap = Math.floor(input.width / (fold?.minBandPx ?? DEFAULT_MIN_BAND_PX));
|
|
41
94
|
const groups = fold && data.length > cap ? groupsOf(data, cap) : data.map((d, start) => ({ start, items: [d] }));
|
|
42
|
-
const
|
|
43
|
-
|
|
95
|
+
const ctx = {
|
|
96
|
+
base: /* @__PURE__ */ new Map(),
|
|
97
|
+
markers: /* @__PURE__ */ new Map(),
|
|
98
|
+
states: input.states,
|
|
99
|
+
visible: input.visible,
|
|
100
|
+
height: input.height,
|
|
101
|
+
emphasis: input.emphasis,
|
|
102
|
+
absentKey
|
|
103
|
+
};
|
|
44
104
|
const hits = [];
|
|
45
105
|
for (const g of groups) {
|
|
46
106
|
const datum = fold && g.items.length > 1 ? fold.merge(g.items) : g.items[0];
|
|
47
107
|
if (datum === void 0) continue;
|
|
48
108
|
const span = getBand(datum);
|
|
49
|
-
const state = states.get(span.state);
|
|
50
|
-
if (!state && process.env.NODE_ENV !== "production")
|
|
51
|
-
throw unknownState("BandSpan.state", span.state, states.keys());
|
|
52
|
-
if (state && !visible.has(span.state)) continue;
|
|
53
109
|
const cell = { f0: g.start / data.length, f1: (g.start + g.items.length) / data.length };
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
);
|
|
61
|
-
if (span.marker) {
|
|
62
|
-
const markerKey = span.marker.state ?? span.state;
|
|
63
|
-
const markerState = states.get(markerKey);
|
|
64
|
-
if (!markerState && process.env.NODE_ENV !== "production")
|
|
65
|
-
throw unknownState("BandSpan.marker.state", markerKey, states.keys());
|
|
66
|
-
if (!markerState || visible.has(markerKey)) {
|
|
67
|
-
const inset = (span.marker.inset ?? DEFAULT_MARKER_INSET) / Math.max(input.height, 1);
|
|
68
|
-
paintInto(markers, markerState?.color ?? UNKNOWN_FILL, input.emphasis(markerKey), {
|
|
69
|
-
...cell,
|
|
70
|
-
y0: inset,
|
|
71
|
-
y1: 1 - inset
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (state) for (const source of g.items) hits.push({ source, state: span.state, datum });
|
|
110
|
+
const answers = paintSpan(ctx, span, cell);
|
|
111
|
+
g.items.forEach((source, i) => {
|
|
112
|
+
const slot = g.start + i;
|
|
113
|
+
if (answers.primary) hits.push({ slot, source, state: span.state, datum });
|
|
114
|
+
if (answers.absent && absentKey !== void 0)
|
|
115
|
+
hits.push({ slot, source, state: absentKey, datum });
|
|
116
|
+
});
|
|
76
117
|
}
|
|
77
|
-
return { base: [...base.values()], markers: [...markers.values()], hits };
|
|
118
|
+
return { base: [...ctx.base.values()], markers: [...ctx.markers.values()], hits };
|
|
78
119
|
}
|
|
79
120
|
function BandStrip(props) {
|
|
80
|
-
const {
|
|
121
|
+
const {
|
|
122
|
+
states,
|
|
123
|
+
getBand,
|
|
124
|
+
fold,
|
|
125
|
+
absentState,
|
|
126
|
+
cursorResolution = "leading",
|
|
127
|
+
tooltip,
|
|
128
|
+
...rest
|
|
129
|
+
} = props;
|
|
81
130
|
const { data, x } = rest;
|
|
131
|
+
const absentKey = absentState !== void 0 && states.some((s) => s.key === absentState) ? absentState : void 0;
|
|
132
|
+
if (absentState !== void 0 && absentKey === void 0 && process.env.NODE_ENV !== "production")
|
|
133
|
+
throw unknownState(
|
|
134
|
+
"BandStrip.absentState",
|
|
135
|
+
absentState,
|
|
136
|
+
states.map((s) => s.key)
|
|
137
|
+
);
|
|
82
138
|
const series = useMemo(
|
|
83
139
|
() => states.map((s) => ({
|
|
84
140
|
key: s.key,
|
|
@@ -88,10 +144,15 @@ function BandStrip(props) {
|
|
|
88
144
|
...s.tooltip !== void 0 && { tooltip: s.tooltip },
|
|
89
145
|
...s.legend !== void 0 && { legend: s.legend },
|
|
90
146
|
...s.note !== void 0 && { note: s.note },
|
|
91
|
-
getValue: (d) =>
|
|
92
|
-
|
|
147
|
+
getValue: (d) => {
|
|
148
|
+
const span = getBand(d);
|
|
149
|
+
const share = absentShareOf(span, absentKey);
|
|
150
|
+
if (span.state === s.key) return share < 1 ? 1 : null;
|
|
151
|
+
return s.key === absentKey && share > 0 ? 1 : null;
|
|
152
|
+
},
|
|
153
|
+
formatValue: (_v, d) => stateValue(s, d)
|
|
93
154
|
})),
|
|
94
|
-
[states, getBand]
|
|
155
|
+
[states, getBand, absentKey]
|
|
95
156
|
);
|
|
96
157
|
const marks = useCallback(
|
|
97
158
|
(plot) => {
|
|
@@ -99,18 +160,19 @@ function BandStrip(props) {
|
|
|
99
160
|
data,
|
|
100
161
|
getBand,
|
|
101
162
|
fold,
|
|
163
|
+
absentState: absentKey,
|
|
102
164
|
states: new Map(states.map((s) => [s.key, s])),
|
|
103
165
|
visible: new Set(plot.visible.map((s) => s.key)),
|
|
104
166
|
width: plot.width,
|
|
105
167
|
height: plot.height,
|
|
106
168
|
emphasis: (key) => emphasis(plot.highlighted, { key })
|
|
107
169
|
});
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
y: 1,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
})
|
|
170
|
+
const rowKeys = /* @__PURE__ */ new Map();
|
|
171
|
+
const rows = hits.map((h) => {
|
|
172
|
+
const row = { x: x(h.source), y: 1, series: h.state, datum: h.datum };
|
|
173
|
+
rowKeys.set(row, `${h.slot}|${h.state}`);
|
|
174
|
+
return row;
|
|
175
|
+
});
|
|
114
176
|
return [
|
|
115
177
|
...[...base, ...markers].map(
|
|
116
178
|
({ fill, opacity, cells }, i) => decorative(
|
|
@@ -127,11 +189,47 @@ function BandStrip(props) {
|
|
|
127
189
|
})
|
|
128
190
|
)
|
|
129
191
|
),
|
|
130
|
-
...rows.length > 0 ? [
|
|
192
|
+
...rows.length > 0 ? [
|
|
193
|
+
barY(rows, {
|
|
194
|
+
id: "hit",
|
|
195
|
+
// One row per source slot and state, whatever the x values look like.
|
|
196
|
+
key: (r) => rowKeys.get(r) ?? "",
|
|
197
|
+
x: rowX,
|
|
198
|
+
y1: 0,
|
|
199
|
+
y2: 1,
|
|
200
|
+
fill: "transparent"
|
|
201
|
+
})
|
|
202
|
+
] : []
|
|
131
203
|
];
|
|
132
204
|
},
|
|
133
|
-
[states, getBand, fold, data, x]
|
|
205
|
+
[states, getBand, fold, absentKey, data, x]
|
|
134
206
|
);
|
|
207
|
+
const tooltipWithPrimary = useMemo(() => {
|
|
208
|
+
if (tooltip === false || absentKey === void 0) return tooltip;
|
|
209
|
+
return {
|
|
210
|
+
...tooltip,
|
|
211
|
+
rows: (d, ctx) => {
|
|
212
|
+
const span = getBand(d);
|
|
213
|
+
const primary = states.find((s) => s.key === span.state);
|
|
214
|
+
const { primaryShown } = resolveAbsent(
|
|
215
|
+
span,
|
|
216
|
+
absentKey,
|
|
217
|
+
(k) => ctx.visible.some((s) => s.key === k)
|
|
218
|
+
);
|
|
219
|
+
const readdPrimary = primary?.tooltip !== false && primary && primaryShown && absentShareOf(span, absentKey) === 1;
|
|
220
|
+
return [
|
|
221
|
+
...readdPrimary ? [
|
|
222
|
+
{
|
|
223
|
+
label: primary.note === void 0 ? primary.label : `${primary.label} \xB7 ${primary.note}`,
|
|
224
|
+
value: stateValue(primary, d),
|
|
225
|
+
color: primary.color
|
|
226
|
+
}
|
|
227
|
+
] : [],
|
|
228
|
+
...tooltip?.rows?.(d, ctx) ?? []
|
|
229
|
+
];
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
}, [tooltip, absentKey, getBand, states]);
|
|
135
233
|
return /* @__PURE__ */ jsx(
|
|
136
234
|
CartesianRung,
|
|
137
235
|
{
|
|
@@ -142,7 +240,7 @@ function BandStrip(props) {
|
|
|
142
240
|
y: STRIP_AXIS,
|
|
143
241
|
xZones: ZX_ANCHOR,
|
|
144
242
|
cursorResolution,
|
|
145
|
-
...
|
|
243
|
+
...tooltipWithPrimary !== void 0 && { tooltip: tooltipWithPrimary }
|
|
146
244
|
}
|
|
147
245
|
);
|
|
148
246
|
}
|
|
@@ -13,6 +13,11 @@ export declare function tsconfigBaseCheck(cwd: string): Check;
|
|
|
13
13
|
export declare function retiredLintRulesCheck(cwd: string, install: BasaltInstall): Check;
|
|
14
14
|
/** `dropped-subpaths`: `basalt-ui/<subpath>` imports the installed `exports` map does not have. */
|
|
15
15
|
export declare function droppedSubpathsCheck(cwd: string, cfg: BasaltConfig, install: BasaltInstall): Check;
|
|
16
|
+
/**
|
|
17
|
+
* `oxlint-floor`: fails when the nearest installed oxlint is older than {@link OXLINT_FLOOR}, which
|
|
18
|
+
* cannot parse the preset. Reads `cwd`, as `oxlint-preset` does; a missing oxlint is that check's job.
|
|
19
|
+
*/
|
|
20
|
+
export declare function oxlintFloorCheck(cwd: string): Check;
|
|
16
21
|
/**
|
|
17
22
|
* `init`'s tsconfig step: make the tsconfig that covers `src` (`tsconfig.json`, or the reference that
|
|
18
23
|
* includes `src` in a stock Vite app) extend the preset, by inserting the key textually (the file is
|
|
@@ -20,6 +25,12 @@ export declare function droppedSubpathsCheck(cwd: string, cfg: BasaltConfig, ins
|
|
|
20
25
|
* needs saying.
|
|
21
26
|
*/
|
|
22
27
|
export declare function seedTsconfigExtends(cwd: string): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Warnings for a Start app's embedded provider; heuristics, not proofs. A `{...spread}` on the tag
|
|
30
|
+
* could carry a `router`; `src/router.tsx` never mentioning `queryClient` means the embedded
|
|
31
|
+
* provider will find no `context.queryClient`. Empty when there is nothing to judge.
|
|
32
|
+
*/
|
|
33
|
+
export declare function startWiringWarnings(cwd: string): string[];
|
|
23
34
|
/**
|
|
24
35
|
* `app-wiring`: the entry module `index.html` loads (default src/main.tsx) mounts `BasaltProvider`
|
|
25
36
|
* on a `createBasaltRouter` router (called in the entry or a module it imports), and the router tree is generated: the vite config calls a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-upgrade.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-upgrade.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"doctor-upgrade.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-upgrade.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAS5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,MAAM,MAAM,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAA;AA6B9D,wEAAwE;AACxE,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,KAAG,MACc,CAAA;AA+CvD,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAqBpD;AA+CD,4FAA4F;AAC5F,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK,CAsBhF;AAqFD,mGAAmG;AACnG,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,YAAY,EACjB,OAAO,EAAE,aAAa,GACrB,KAAK,CAyBP;AAiBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAUnD;AAUD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkC9D;AA0JD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBzD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAmCjD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAczD;AAkBD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK,CAgB1E;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAQ9E,CAAA;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK,CAsB/F"}
|
|
@@ -2,7 +2,14 @@ import { existsSync, writeFileSync } from "node:fs";
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { dirname, relative, resolve } from "node:path";
|
|
4
4
|
import { BASALT_CONFIG_KEYS, RETIRED_CONFIG_KEYS } from "./config.js";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
isStartApp,
|
|
7
|
+
parseJsonc,
|
|
8
|
+
readIfExists,
|
|
9
|
+
readPackageJson,
|
|
10
|
+
routerSeedDest,
|
|
11
|
+
scannableFiles
|
|
12
|
+
} from "./index.js";
|
|
6
13
|
const guarded = (id, run) => {
|
|
7
14
|
try {
|
|
8
15
|
return run();
|
|
@@ -147,11 +154,36 @@ function basaltImports(src) {
|
|
|
147
154
|
const { code, inLiteral } = tokenize(src);
|
|
148
155
|
return [...code.matchAll(SUBPATH_IMPORT)].filter((m) => !inLiteral(m.index)).map((m) => [m[2], code.slice(0, m.index + m[0].length).split("\n").length]);
|
|
149
156
|
}
|
|
150
|
-
const
|
|
151
|
-
|
|
157
|
+
const CSS_SUBPATH_IMPORT = /(?:^|[;{}])\s*@import\s+(?:url\(\s*)?(['"]?)basalt-ui\/([^'")\s;]+)\1/g;
|
|
158
|
+
function cssImports(src) {
|
|
159
|
+
const blank = (m) => m.replace(/[^\n]/g, " ");
|
|
160
|
+
const code = src.replace(/\/\*[\s\S]*?\*\//g, blank).replace(
|
|
161
|
+
/(@import\s+|url\(\s*)?(["'])(?:\\.|(?!\2)[^\\\n])*\2/g,
|
|
162
|
+
(m, target) => target === void 0 ? blank(m) : m
|
|
163
|
+
);
|
|
164
|
+
return [...code.matchAll(CSS_SUBPATH_IMPORT)].map((m) => [
|
|
165
|
+
m[2],
|
|
166
|
+
code.slice(0, m.index + m[0].length).split("\n").length
|
|
167
|
+
]);
|
|
168
|
+
}
|
|
169
|
+
const appImports = (cwd, cfg) => scannableFiles(cwd, cfg).flatMap((rel) => {
|
|
170
|
+
const isCode = /\.(?:[cm]?[jt]sx?|vue|astro)$/.test(rel);
|
|
171
|
+
if (!isCode && !rel.endsWith(".css")) return [];
|
|
172
|
+
const src = readIfExists(resolve(cwd, rel)) ?? "";
|
|
173
|
+
return (isCode ? basaltImports(src) : cssImports(src)).map(
|
|
152
174
|
([sub, line]) => [sub, rel, line]
|
|
153
|
-
)
|
|
154
|
-
);
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
const DROPPED_FIXES = /* @__PURE__ */ new Map([
|
|
178
|
+
[
|
|
179
|
+
"tokens.css",
|
|
180
|
+
"commit the emit instead: `basalt-ui tokens:css --out src/tokens.css` and import that file"
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
"router-tanstack",
|
|
184
|
+
"nav symbols (`defineNav`, `navTarget`, \u2026) now import from `basalt-ui`, stores (`createSearchStore`, `field`, \u2026) from `basalt-ui/state`"
|
|
185
|
+
]
|
|
186
|
+
]);
|
|
155
187
|
function droppedSubpathsCheck(cwd, cfg, install) {
|
|
156
188
|
const id = "dropped-subpaths";
|
|
157
189
|
return withInstall(id, install, "exports", (dir) => {
|
|
@@ -160,14 +192,40 @@ function droppedSubpathsCheck(cwd, cfg, install) {
|
|
|
160
192
|
const exportsMap = pkg.exports;
|
|
161
193
|
if (exportsMap === void 0) return null;
|
|
162
194
|
const keys = Object.keys(exportsMap);
|
|
163
|
-
const
|
|
195
|
+
const hasExport = (sub) => keys.some(
|
|
164
196
|
(k) => k === `./${sub}` || k.endsWith("*") && `./${sub}`.startsWith(k.slice(0, -1))
|
|
165
197
|
);
|
|
166
|
-
const
|
|
167
|
-
|
|
198
|
+
const isDropped = (sub) => DROPPED_FIXES.has(sub) || !hasExport(sub);
|
|
199
|
+
const found = appImports(cwd, cfg).filter(([sub]) => isDropped(sub));
|
|
200
|
+
if (found.length === 0) return null;
|
|
201
|
+
const hits = found.map(([sub, rel, line]) => `${rel}:${line} imports basalt-ui/${sub}`);
|
|
168
202
|
const more = hits.length > 10 ? ` (+${hits.length - 10} more)` : "";
|
|
203
|
+
const fixes = [...new Set(found.map(([sub]) => sub))].flatMap((sub) => {
|
|
204
|
+
const fix = DROPPED_FIXES.get(sub);
|
|
205
|
+
return fix === void 0 ? [] : [`basalt-ui/${sub}: ${fix}`];
|
|
206
|
+
});
|
|
207
|
+
fixes.push("see MIGRATING.md \xA7 2.0 for each subpath's replacement");
|
|
208
|
+
return { fail: `${id}: ${hits.slice(0, 10).join("; ")}${more}. Fix: ${fixes.join("; ")}.` };
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
const OXLINT_FLOOR = "1.79.0";
|
|
212
|
+
const SEMVER = /^(\d+)\.(\d+)\.(\d+)(-[^+]+)?(?:\+.*)?$/;
|
|
213
|
+
function isBelowFloor(version, floor) {
|
|
214
|
+
const [v, f] = [SEMVER.exec(version), SEMVER.exec(floor)];
|
|
215
|
+
if (v === null || f === null) return false;
|
|
216
|
+
for (const i of [1, 2, 3]) {
|
|
217
|
+
if (Number(v[i]) !== Number(f[i])) return Number(v[i]) < Number(f[i]);
|
|
218
|
+
}
|
|
219
|
+
return v[4] !== void 0;
|
|
220
|
+
}
|
|
221
|
+
function oxlintFloorCheck(cwd) {
|
|
222
|
+
const id = "oxlint-floor";
|
|
223
|
+
return guarded(id, () => {
|
|
224
|
+
if (readIfExists(resolve(cwd, ".oxlintrc.json")) === null) return null;
|
|
225
|
+
const version = installedVersion(cwd, "oxlint");
|
|
226
|
+
if (version === null || !isBelowFloor(version, OXLINT_FLOOR)) return null;
|
|
169
227
|
return {
|
|
170
|
-
fail: `${id}: ${
|
|
228
|
+
fail: `${id}: oxlint ${version} is installed, but the shipped preset needs >= ${OXLINT_FLOOR} (older versions reject its react/* rules). Fix: \`bun add -D oxlint@^${OXLINT_FLOOR}\`.`
|
|
171
229
|
};
|
|
172
230
|
});
|
|
173
231
|
}
|
|
@@ -265,8 +323,60 @@ function routerCreatedInImports(cwd, entry) {
|
|
|
265
323
|
}
|
|
266
324
|
return false;
|
|
267
325
|
}
|
|
326
|
+
function isSpreadAt(code, i) {
|
|
327
|
+
const spread = /\{\s*\.\.\./y;
|
|
328
|
+
spread.lastIndex = i;
|
|
329
|
+
return spread.test(code);
|
|
330
|
+
}
|
|
331
|
+
function providerTags(src) {
|
|
332
|
+
const { code, inLiteral } = tokenize(src);
|
|
333
|
+
return [...code.matchAll(/<BasaltProvider\b/g)].filter((m) => !inLiteral(m.index)).map((m) => {
|
|
334
|
+
const tag = { attrs: "", spread: false };
|
|
335
|
+
let depth = 0;
|
|
336
|
+
for (let i = m.index + m[0].length; i < code.length; i++) {
|
|
337
|
+
const ch = code[i];
|
|
338
|
+
if (inLiteral(i)) continue;
|
|
339
|
+
if (ch === "{") {
|
|
340
|
+
if (depth++ === 0 && isSpreadAt(code, i)) tag.spread = true;
|
|
341
|
+
} else if (ch === "}") depth--;
|
|
342
|
+
else if (ch === ">" && depth === 0) break;
|
|
343
|
+
else if (depth === 0) tag.attrs += ch;
|
|
344
|
+
}
|
|
345
|
+
return tag;
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
const carriesRouter = (tag) => /(^|\s)router\s*=/.test(tag.attrs);
|
|
349
|
+
function startWiring(cwd) {
|
|
350
|
+
const root = routerSeedDest("", "root");
|
|
351
|
+
const text = readIfExists(resolve(cwd, root));
|
|
352
|
+
const tags = providerTags(text ?? "");
|
|
353
|
+
const mounting = tags.some(carriesRouter);
|
|
354
|
+
if (!mounting && tags.length > 0) return null;
|
|
355
|
+
const problem = text === null ? "does not exist" : mounting ? "passes router= to BasaltProvider, which mounts a second router inside Start" : "does not render <BasaltProvider>";
|
|
356
|
+
return {
|
|
357
|
+
fail: `app-wiring: ${root} ${problem} (TanStack Start app). Fix: render <BasaltProvider><Outlet /></BasaltProvider> in the root route component.`
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
function startWiringWarnings(cwd) {
|
|
361
|
+
if (!isStartApp(cwd, "")) return [];
|
|
362
|
+
const out = [];
|
|
363
|
+
const root = readIfExists(resolve(cwd, routerSeedDest("", "root")));
|
|
364
|
+
if (root !== null && providerTags(root).some((t) => t.spread)) {
|
|
365
|
+
out.push(
|
|
366
|
+
"app-wiring: <BasaltProvider {...spread}> in the root route could pass router=, which mounts a second router inside Start (heuristic: the spread is not followed)."
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
const router = readIfExists(resolve(cwd, "src/router.tsx"));
|
|
370
|
+
if (router !== null && !/queryClient/.test(router)) {
|
|
371
|
+
out.push(
|
|
372
|
+
"app-wiring: src/router.tsx never mentions queryClient \u2014 embedded BasaltProvider needs context.queryClient on the Start router (heuristic text check; ignore if you build it elsewhere)."
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
return out;
|
|
376
|
+
}
|
|
268
377
|
function appWiringCheck(cwd) {
|
|
269
378
|
return guarded("app-wiring", () => {
|
|
379
|
+
if (isStartApp(cwd, "")) return startWiring(cwd);
|
|
270
380
|
const entry = (htmlEntry(readIfExists(resolve(cwd, "index.html")) ?? "") ?? "src/main.tsx").replace(/^\//, "");
|
|
271
381
|
const text = readIfExists(resolve(cwd, entry));
|
|
272
382
|
if (text === null) {
|
|
@@ -315,7 +425,7 @@ const EXACT_VERSION = /^\d+\.\d+\.\d+$/;
|
|
|
315
425
|
function installedVersion(cwd, pkg) {
|
|
316
426
|
for (let dir = cwd; ; dir = dirname(dir)) {
|
|
317
427
|
const manifest = readPackageJson(resolve(dir, "node_modules", pkg));
|
|
318
|
-
if (manifest !== null) return manifest.version
|
|
428
|
+
if (manifest !== null) return typeof manifest.version === "string" ? manifest.version : null;
|
|
319
429
|
if (dirname(dir) === dir) return null;
|
|
320
430
|
}
|
|
321
431
|
}
|
|
@@ -367,8 +477,10 @@ export {
|
|
|
367
477
|
appWiringCheck,
|
|
368
478
|
droppedSubpathsCheck,
|
|
369
479
|
exactPeersCheck,
|
|
480
|
+
oxlintFloorCheck,
|
|
370
481
|
retiredLintRulesCheck,
|
|
371
482
|
seedTsconfigExtends,
|
|
483
|
+
startWiringWarnings,
|
|
372
484
|
subpathPeersCheck,
|
|
373
485
|
tsconfigBaseCheck,
|
|
374
486
|
tsconfigFile,
|
package/dist/cli/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AA4DA,MAAM,MAAM,YAAY,GAAG;IACzB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAA;IACpB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AA2BD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,aAAa,GAAE,MAAsB,EAAE,KAAK,GAAE,MAAM,EAAO,GAAG,MAAM,CAoU1F"}
|
package/dist/cli/doctor.js
CHANGED
|
@@ -31,8 +31,10 @@ import {
|
|
|
31
31
|
import { resolveRoots } from "./config.js";
|
|
32
32
|
import {
|
|
33
33
|
appWiringCheck,
|
|
34
|
+
startWiringWarnings,
|
|
34
35
|
droppedSubpathsCheck,
|
|
35
36
|
exactPeersCheck,
|
|
37
|
+
oxlintFloorCheck,
|
|
36
38
|
retiredLintRulesCheck,
|
|
37
39
|
subpathPeersCheck,
|
|
38
40
|
tsconfigBaseCheck,
|
|
@@ -268,6 +270,7 @@ basalt-ui doctor \u2014 ${cwd}
|
|
|
268
270
|
"dropped-subpaths: no import of a basalt-ui subpath the install lacks",
|
|
269
271
|
droppedSubpathsCheck(appDir, cfg, install)
|
|
270
272
|
],
|
|
273
|
+
["oxlint-floor: the installed oxlint parses the shipped preset", oxlintFloorCheck(cwd)],
|
|
271
274
|
[
|
|
272
275
|
"app-wiring: the entry mounts BasaltProvider and the router tree is generated",
|
|
273
276
|
appWiringCheck(appDir)
|
|
@@ -287,6 +290,7 @@ basalt-ui doctor \u2014 ${cwd}
|
|
|
287
290
|
else if ("fail" in check) fail(check.fail);
|
|
288
291
|
else skip(check.skip);
|
|
289
292
|
}
|
|
293
|
+
for (const line of startWiringWarnings(appDir)) warn(line);
|
|
290
294
|
}
|
|
291
295
|
lines.push("");
|
|
292
296
|
if (result.hardFailures === 0 && result.warnings === 0 && result.skipped === 0) {
|
package/dist/cli/help.js
CHANGED
|
@@ -44,7 +44,7 @@ function unknownFlag(cmd, flags) {
|
|
|
44
44
|
return match?.[1] ?? flags.find((f) => f.startsWith("-")) ?? flags[0] ?? null;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
const USAGE = "Usage: basalt-ui <--version | init [--no-merge-lint] |\n sync [--force] [--check] [--verbose] [--tokens-only|--framework] |\n check-theme [--audit-allows] |\n doctor [--tokens-only|--framework] | guard-hook | tokens:css | fonts:css | help>\n\ncheck-theme [--tokens-only|--framework] [--audit-allows]\n --audit-allows reports instead of scanning: every `theme-allow` annotation and every\n `basalt.exemptRules` entry, with what each one still suppresses \u2014 proved by re-running the\n guard with that one waiver neutralized, not by reading its text. Exits 1 on a waiver that\n suppresses nothing (dead), which is what makes it usable as a CI gate.\n\ntokens:css [--out <path>] [--check] [--selector-attribute <attr> | --selector-class <class>]\n [--light-class <class>] [--dark-value <v>] [--light-value <v>]\n [--default-scheme <dark|light|none>] [--media-fallback] [--only <core|all>]\n [--no-legacy-aliases]\n Emit the --vx-* stylesheet (stdout unless --out). Defaults
|
|
47
|
+
const USAGE = "Usage: basalt-ui <--version | init [--no-merge-lint] |\n sync [--force] [--check] [--verbose] [--tokens-only|--framework] |\n check-theme [--audit-allows] |\n doctor [--tokens-only|--framework] | guard-hook | tokens:css | fonts:css | help>\n\ncheck-theme [--tokens-only|--framework] [--audit-allows]\n --audit-allows reports instead of scanning: every `theme-allow` annotation and every\n `basalt.exemptRules` entry, with what each one still suppresses \u2014 proved by re-running the\n guard with that one waiver neutralized, not by reading its text. Exits 1 on a waiver that\n suppresses nothing (dead), which is what makes it usable as a CI gate.\n\ntokens:css [--out <path>] [--check] [--selector-attribute <attr> | --selector-class <class>]\n [--light-class <class>] [--dark-value <v>] [--light-value <v>]\n [--default-scheme <dark|light|none>] [--media-fallback] [--only <core|all>]\n [--no-legacy-aliases]\n Emit the --vx-* stylesheet (stdout unless --out). Defaults emit the stock identity; commit the output as your tokens file.\n --selector-class emits `:root.dark` instead of an attribute selector (the Tailwind convention).\n --check writes nothing and exits 1 when --out differs from what would be emitted (a CI gate).\n --no-legacy-aliases drops the deprecated camelCase spellings (--vx-accentFill and friends),\n which are emitted by default as aliases of the canonical kebab-case names.\n\nfonts:css [--out <path>] [--check]\n Emit the shipped --basalt-font-* stacks as plain CSS \u2014 the typeface half of the token layer,\n otherwise reachable only by importing styles.css.\n\ndoctor [--tokens-only|--framework]\n Checks THIS project only: the manifest exists, the oxlint preset is wired, the pre-commit\n hook runs check-theme (via `lefthook dump`), and the ai package major is consistent within\n this package.json. Profile is DECLARED, same as check-theme \u2014 never inferred.\n\nsync [--force] [--check] [--verbose] [--tokens-only|--framework]\n Refreshes an EXISTING install; it never creates one (that is init). A tokens-only consumer\n has no scaffold to reconcile, so sync reports n/a and exits 0 there \u2014 as doctor does.\n --check prints the permanent placement skips as a COUNT; --verbose spells them out again.\n\ncheck-theme / doctor / sync all resolve their project the same way: BASALT_CWD, else the\ninvocation cwd \u2014 nothing inferred, nothing ascended or descended into.\n--tokens-only and --framework are alternatives; passing both is an error.\n\nEvery subcommand accepts --help / -h to print this message and exit without running.\n--version / -v prints the resolved package version and exits 0 \u2014 the one command that proves\nWHICH basalt-ui ran, which a `bunx` cache can otherwise make a lie. An unknown command or an\nunrecognized flag exits 1 and names what it did not understand; neither is ever ignored.";
|
|
48
48
|
export {
|
|
49
49
|
COMMAND_OPTIONS,
|
|
50
50
|
USAGE,
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -211,6 +211,11 @@ export declare const ROUTER_SEED_DESTS: {
|
|
|
211
211
|
};
|
|
212
212
|
/** A router seed's dest, relative to the install root: under the app dir when it is not the root. */
|
|
213
213
|
export declare function routerSeedDest(appRel: string, seed: keyof typeof ROUTER_SEED_DESTS): string;
|
|
214
|
+
/** The router seeds' dests for an app dir (`main.tsx`, `nav.tsx`, `__root.tsx`). */
|
|
215
|
+
export declare function routerSeedDests(appRel: string): string[];
|
|
216
|
+
/** A TanStack Start app owns its router, so its router seeds give way to an in-tree `<BasaltProvider>`. */
|
|
217
|
+
export declare function isStartApp(cwd: string, appRel: string): boolean;
|
|
218
|
+
export declare const START_APP_NOTE: string;
|
|
214
219
|
/** The app directory a command's app-scoped half targets: `rel` is '' when it is the install root. */
|
|
215
220
|
export type AppResolution = {
|
|
216
221
|
dir: string;
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,WAAW,EAA4B,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CA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TS[seed]}`;
|
|
357
357
|
}
|
|
358
|
+
function routerSeedDests(appRel) {
|
|
359
|
+
return Object.keys(ROUTER_SEED_DESTS).map(
|
|
360
|
+
(seed) => routerSeedDest(appRel, seed)
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
function isStartApp(cwd, appRel) {
|
|
364
|
+
return hasDependency(resolve(cwd, appRel), "@tanstack/react-start");
|
|
365
|
+
}
|
|
366
|
+
const START_APP_NOTE = "TanStack Start app \u2014 no main.tsx/nav.tsx/__root.tsx seeded (Start owns the router); render <BasaltProvider><Outlet /></BasaltProvider> in your root route component.";
|
|
358
367
|
const appRelative = (root, dir) => relativePosix(root, dir).replace(/^\.\/?/, "");
|
|
359
368
|
const hasViteEntry = (dir) => existsSync(resolve(dir, "src/main.tsx")) || existsSync(resolve(dir, "index.html"));
|
|
360
369
|
function resolveAppDir(root) {
|
|
@@ -982,6 +991,7 @@ export {
|
|
|
982
991
|
SERIES_MODULE_HINT_RE,
|
|
983
992
|
SKILL_NAMES,
|
|
984
993
|
SKIP,
|
|
994
|
+
START_APP_NOTE,
|
|
985
995
|
basaltBinCommand,
|
|
986
996
|
basaltPresetEntry,
|
|
987
997
|
checkTheme,
|
|
@@ -1002,6 +1012,7 @@ export {
|
|
|
1002
1012
|
init,
|
|
1003
1013
|
inspectLefthookGate,
|
|
1004
1014
|
isAgentsImportLine,
|
|
1015
|
+
isStartApp,
|
|
1005
1016
|
isStringArray,
|
|
1006
1017
|
managedFiles,
|
|
1007
1018
|
mergeOxlintExtends,
|
|
@@ -1032,6 +1043,7 @@ export {
|
|
|
1032
1043
|
retiredManagedDests,
|
|
1033
1044
|
rootsNotices,
|
|
1034
1045
|
routerSeedDest,
|
|
1046
|
+
routerSeedDests,
|
|
1035
1047
|
run,
|
|
1036
1048
|
sameFile,
|
|
1037
1049
|
scanBlock,
|
package/dist/cli/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,SAAS,CAAA;AA8D7D,yGAAyG;AACzG,wBAAgB,IAAI,CAAC,GAAG,GAAE,MAAsB,EAAE,aAAa,GAAE,aAAkB,GAAG,MAAM,CA0L3F"}
|
package/dist/cli/init.js
CHANGED
|
@@ -4,9 +4,10 @@ import { deriveSpacing } from "../tokens/core.js";
|
|
|
4
4
|
import {
|
|
5
5
|
MANIFEST_PATH,
|
|
6
6
|
declaredProfile,
|
|
7
|
+
isStartApp,
|
|
8
|
+
routerSeedDests,
|
|
9
|
+
START_APP_NOTE,
|
|
7
10
|
readBasaltConfig,
|
|
8
|
-
ROUTER_SEED_DESTS,
|
|
9
|
-
routerSeedDest,
|
|
10
11
|
findBasaltInstall,
|
|
11
12
|
managedFiles,
|
|
12
13
|
mergeOxlintExtends,
|
|
@@ -80,8 +81,9 @@ function init(cwd = process.cwd(), scaffoldFlags = {}) {
|
|
|
80
81
|
const manifest = readManifest(cwd);
|
|
81
82
|
const placement = resolvePlacement(cwd);
|
|
82
83
|
const tokensOnly = declaredProfile(readBasaltConfig(cwd), []) === "tokens-only";
|
|
83
|
-
const
|
|
84
|
-
const
|
|
84
|
+
const startApp = isStartApp(cwd, placement.appRel);
|
|
85
|
+
const skippedSeeds = new Set(tokensOnly || startApp ? routerSeedDests(placement.appRel) : []);
|
|
86
|
+
const files = managedFiles(placement).filter((f) => !skippedSeeds.has(f.dest));
|
|
85
87
|
const writtenFiles = [];
|
|
86
88
|
const keptFiles = [];
|
|
87
89
|
const missingSources = [];
|
|
@@ -134,6 +136,7 @@ Kept (already present \u2014 basalt did not touch them):`);
|
|
|
134
136
|
const tsconfigLine = tokensOnly ? null : seedTsconfigExtends(cwd);
|
|
135
137
|
if (tsconfigLine !== null) console.log(`basalt-ui init: ${tsconfigLine}`);
|
|
136
138
|
if (buildNote !== null) console.log(`basalt-ui init: ${buildNote}`);
|
|
139
|
+
if (startApp && !tokensOnly) console.log(`basalt-ui init: ${START_APP_NOTE}`);
|
|
137
140
|
const rootsMessages = rootsNotices(rootsState);
|
|
138
141
|
for (const line of rootsMessages.log) console.log(`basalt-ui init: ${line}`);
|
|
139
142
|
for (const line of rootsMessages.error) console.error(`\u26A0 basalt-ui init: ${line}`);
|