@clearlydev/nx-archweave 0.6.0 → 0.7.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/README.md +34 -3
- package/dist/bin/review-verdict.js +2 -2
- package/dist/eslint/index.js +1 -1
- package/dist/generators/_chunks/{chunk-MQNQJOWA.js → chunk-22FVJUNE.js} +4 -2
- package/dist/generators/_chunks/{chunk-JNYQTW7S.js → chunk-2ADC6RKP.js} +2 -2
- package/dist/generators/_chunks/{chunk-XSALM2IR.js → chunk-6PKKKQMD.js} +55 -11
- package/dist/generators/_chunks/chunk-72D3GWHO.js +269 -0
- package/dist/generators/_chunks/{chunk-C2WELXMV.js → chunk-736LFDT4.js} +33 -9
- package/dist/generators/_chunks/{chunk-VCLVE4EQ.js → chunk-7RTT5NBN.js} +4 -4
- package/dist/generators/_chunks/chunk-AOKTOS3U.js +294 -0
- package/dist/generators/_chunks/chunk-B6RBCUIL.js +325 -0
- package/dist/generators/_chunks/chunk-BDLK2IID.js +10 -0
- package/dist/generators/_chunks/{chunk-M7UBCSYL.js → chunk-CHZPA6OE.js} +5 -3
- package/dist/generators/_chunks/{chunk-3HSNM6AS.js → chunk-DAXD47YO.js} +9 -7
- package/dist/generators/_chunks/{chunk-LJRFVE6B.js → chunk-F5C5HUSI.js} +10 -9
- package/dist/generators/_chunks/chunk-GN76UMTK.js +28 -0
- package/dist/generators/_chunks/{chunk-ZRHIFPUC.js → chunk-J24X4EOB.js} +1 -1
- package/dist/generators/_chunks/{chunk-23NN76E3.js → chunk-JSHZ6VSW.js} +1 -1
- package/dist/generators/_chunks/chunk-KNVBFTH4.js +64 -0
- package/dist/generators/_chunks/chunk-MF75SQM6.js +98 -0
- package/dist/generators/_chunks/chunk-N6SPEKJB.js +106 -0
- package/dist/generators/_chunks/chunk-OX7W4SJ2.js +214 -0
- package/dist/generators/_chunks/chunk-R2VEJGNP.js +84 -0
- package/dist/generators/_chunks/chunk-SBOQHME6.js +140 -0
- package/dist/generators/_chunks/{chunk-7EDJKUY4.js → chunk-STGNMZLM.js} +1 -1
- package/dist/generators/_chunks/{chunk-XXXON43Z.js → chunk-SZRBDQCU.js} +4 -51
- package/dist/generators/_chunks/{chunk-FBCIELXS.js → chunk-W2BBF5MS.js} +5 -86
- package/dist/generators/_chunks/{chunk-2WXAGWAJ.js → chunk-YVISD736.js} +3 -1
- package/dist/generators/add-agent-rules/generator.js +4 -3
- package/dist/generators/add-backend/generator.js +3 -2
- package/dist/generators/add-fsd-lite/generator.js +8 -5
- package/dist/generators/add-github-templates/generator.js +3 -2
- package/dist/generators/add-integration/generator.js +6 -3
- package/dist/generators/add-review/generator.js +4 -3
- package/dist/generators/add-storybook/files/example/button/button.stories.tsx.template +13 -0
- package/dist/generators/add-storybook/files/example/button/button.tsx.template +7 -0
- package/dist/generators/add-storybook/files/example/index.ts.template +1 -0
- package/dist/generators/add-storybook/files/library/tailwind.css.template +2 -0
- package/dist/generators/add-storybook/generator.js +28 -0
- package/dist/generators/add-tailwind/files/next/postcss.config.mjs.template +7 -0
- package/dist/generators/add-tailwind/files/react-vite/index.css.template +2 -0
- package/dist/generators/add-tailwind/generator.js +26 -0
- package/dist/generators/allow-builds/generator.js +11 -208
- package/dist/generators/doctor/generator.js +444 -61
- package/dist/generators/entity/generator.js +5 -3
- package/dist/generators/feature/generator.js +5 -3
- package/dist/generators/init/generator.js +81 -20
- package/dist/generators/install-integration/generator.js +6 -3
- package/dist/generators/page/generator.js +5 -3
- package/dist/generators/record-integration/generator.js +4 -1
- package/dist/generators/shared/generator.js +5 -3
- package/dist/generators/widget/generator.js +5 -3
- package/dist/migrations/update-0.5.3/add-toolkit-config-lint-input.js +9 -4
- package/generators.json +10 -0
- package/package.json +6 -1
- package/src/generators/add-agent-rules/schema.json +2 -2
- package/src/generators/add-storybook/schema.json +33 -0
- package/src/generators/add-tailwind/schema.json +18 -0
- package/src/generators/init/schema.json +8 -0
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
} from "../_chunks/chunk-H222FPLK.js";
|
|
4
4
|
import {
|
|
5
5
|
runFsdSlice
|
|
6
|
-
} from "../_chunks/chunk-
|
|
7
|
-
import "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-CHZPA6OE.js";
|
|
7
|
+
import "../_chunks/chunk-R2VEJGNP.js";
|
|
8
|
+
import "../_chunks/chunk-W2BBF5MS.js";
|
|
8
9
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
10
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
11
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +14,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
14
|
import {
|
|
14
15
|
resolveDryRun
|
|
15
16
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
17
|
+
import "../_chunks/chunk-736LFDT4.js";
|
|
17
18
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
19
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
20
|
|
|
19
21
|
// src/generators/entity/generator.ts
|
|
20
22
|
async function entityGenerator(tree, options) {
|
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
} from "../_chunks/chunk-H222FPLK.js";
|
|
4
4
|
import {
|
|
5
5
|
runFsdSlice
|
|
6
|
-
} from "../_chunks/chunk-
|
|
7
|
-
import "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-CHZPA6OE.js";
|
|
7
|
+
import "../_chunks/chunk-R2VEJGNP.js";
|
|
8
|
+
import "../_chunks/chunk-W2BBF5MS.js";
|
|
8
9
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
10
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
11
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +14,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
14
|
import {
|
|
14
15
|
resolveDryRun
|
|
15
16
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
17
|
+
import "../_chunks/chunk-736LFDT4.js";
|
|
17
18
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
19
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
20
|
|
|
19
21
|
// src/generators/feature/generator.ts
|
|
20
22
|
async function featureGenerator(tree, options) {
|
|
@@ -3,37 +3,51 @@ import {
|
|
|
3
3
|
failedSections,
|
|
4
4
|
leftForYou,
|
|
5
5
|
renderInitReport
|
|
6
|
-
} from "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-6PKKKQMD.js";
|
|
7
7
|
import {
|
|
8
8
|
recordedReview,
|
|
9
9
|
runAddReview
|
|
10
|
-
} from "../_chunks/chunk-
|
|
10
|
+
} from "../_chunks/chunk-2ADC6RKP.js";
|
|
11
|
+
import {
|
|
12
|
+
runAddStorybook
|
|
13
|
+
} from "../_chunks/chunk-AOKTOS3U.js";
|
|
14
|
+
import "../_chunks/chunk-SBOQHME6.js";
|
|
15
|
+
import {
|
|
16
|
+
runAddTailwind
|
|
17
|
+
} from "../_chunks/chunk-72D3GWHO.js";
|
|
18
|
+
import "../_chunks/chunk-N6SPEKJB.js";
|
|
19
|
+
import "../_chunks/chunk-MF75SQM6.js";
|
|
20
|
+
import "../_chunks/chunk-GN76UMTK.js";
|
|
21
|
+
import "../_chunks/chunk-OX7W4SJ2.js";
|
|
22
|
+
import "../_chunks/chunk-B6RBCUIL.js";
|
|
11
23
|
import "../_chunks/chunk-ASY3CK5L.js";
|
|
12
24
|
import {
|
|
13
25
|
DEFAULT_MAX_ROUNDS,
|
|
14
26
|
REVIEW_PROVIDERS,
|
|
15
27
|
buildReviewConfigSnippet
|
|
16
|
-
} from "../_chunks/chunk-
|
|
28
|
+
} from "../_chunks/chunk-YVISD736.js";
|
|
17
29
|
import {
|
|
18
30
|
runAddAgentRules
|
|
19
|
-
} from "../_chunks/chunk-
|
|
20
|
-
import "../_chunks/chunk-
|
|
31
|
+
} from "../_chunks/chunk-DAXD47YO.js";
|
|
32
|
+
import "../_chunks/chunk-F5C5HUSI.js";
|
|
21
33
|
import "../_chunks/chunk-CSJZ4PP3.js";
|
|
22
34
|
import "../_chunks/chunk-5MI3O4VZ.js";
|
|
23
35
|
import {
|
|
24
36
|
runAddBackend
|
|
25
|
-
} from "../_chunks/chunk-
|
|
37
|
+
} from "../_chunks/chunk-STGNMZLM.js";
|
|
26
38
|
import "../_chunks/chunk-SHKQSTV2.js";
|
|
27
39
|
import "../_chunks/chunk-WNO3ZGBB.js";
|
|
28
40
|
import {
|
|
29
41
|
DEFAULT_CONFLICT_POLICY,
|
|
30
42
|
runAddFsdLite
|
|
31
|
-
} from "../_chunks/chunk-
|
|
43
|
+
} from "../_chunks/chunk-7RTT5NBN.js";
|
|
32
44
|
import "../_chunks/chunk-AMOOSD5Q.js";
|
|
33
|
-
import "../_chunks/chunk-
|
|
45
|
+
import "../_chunks/chunk-SZRBDQCU.js";
|
|
46
|
+
import "../_chunks/chunk-KNVBFTH4.js";
|
|
47
|
+
import "../_chunks/chunk-R2VEJGNP.js";
|
|
34
48
|
import {
|
|
35
49
|
resolveFrontendApp
|
|
36
|
-
} from "../_chunks/chunk-
|
|
50
|
+
} from "../_chunks/chunk-W2BBF5MS.js";
|
|
37
51
|
import {
|
|
38
52
|
allFrameworkProfiles
|
|
39
53
|
} from "../_chunks/chunk-YEMQFSL6.js";
|
|
@@ -43,7 +57,7 @@ import {
|
|
|
43
57
|
} from "../_chunks/chunk-6ZTIUBB2.js";
|
|
44
58
|
import {
|
|
45
59
|
runAddGithubTemplates
|
|
46
|
-
} from "../_chunks/chunk-
|
|
60
|
+
} from "../_chunks/chunk-J24X4EOB.js";
|
|
47
61
|
import "../_chunks/chunk-FZGN5NEP.js";
|
|
48
62
|
import "../_chunks/chunk-YNMLB4DL.js";
|
|
49
63
|
import "../_chunks/chunk-JPS6XKYK.js";
|
|
@@ -53,7 +67,7 @@ import {
|
|
|
53
67
|
import {
|
|
54
68
|
spawnableCommand
|
|
55
69
|
} from "../_chunks/chunk-34V6HAJT.js";
|
|
56
|
-
import "../_chunks/chunk-
|
|
70
|
+
import "../_chunks/chunk-JSHZ6VSW.js";
|
|
57
71
|
import {
|
|
58
72
|
DEFAULT_AI_HOSTS,
|
|
59
73
|
RECORDED_BACKENDS,
|
|
@@ -61,19 +75,22 @@ import {
|
|
|
61
75
|
RECORDED_PRESETS,
|
|
62
76
|
TOOLKIT_CONFIG_PATH,
|
|
63
77
|
applyJsonEdits,
|
|
64
|
-
messageOnlyError,
|
|
65
78
|
readToolkitConfigFile,
|
|
66
79
|
recordedChoice,
|
|
67
80
|
recordedFrontends,
|
|
81
|
+
recordedToolProjects,
|
|
68
82
|
resolveAiHostsOption,
|
|
69
83
|
resolveInitFrontend,
|
|
70
84
|
resolveLocaleOption,
|
|
71
85
|
reviewProviderFor,
|
|
72
86
|
treePackageManager
|
|
73
|
-
} from "../_chunks/chunk-
|
|
87
|
+
} from "../_chunks/chunk-736LFDT4.js";
|
|
74
88
|
import {
|
|
75
89
|
runNxCommand
|
|
76
90
|
} from "../_chunks/chunk-5Z7VZPES.js";
|
|
91
|
+
import {
|
|
92
|
+
messageOnlyError
|
|
93
|
+
} from "../_chunks/chunk-BDLK2IID.js";
|
|
77
94
|
|
|
78
95
|
// src/generators/init/generator.ts
|
|
79
96
|
import { execFileSync } from "node:child_process";
|
|
@@ -354,7 +371,7 @@ function runInit(tree, options, deps) {
|
|
|
354
371
|
},
|
|
355
372
|
// init records aiHosts below, with its other choices; the FSD section follows this run's
|
|
356
373
|
// frontend axis, the Module Boundaries section its backend axis
|
|
357
|
-
{
|
|
374
|
+
{ recordChoices: false, fsdStructure: fsdEnabled, moduleBoundaries: backend === "none" ? null : readBoundaryTags(recorded) }
|
|
358
375
|
);
|
|
359
376
|
sections.push({ id: "agentRules", enabled: true, report: { kind: "agentRules", report } });
|
|
360
377
|
} else {
|
|
@@ -385,6 +402,30 @@ function runInit(tree, options, deps) {
|
|
|
385
402
|
} else {
|
|
386
403
|
sections.push({ id: "backend", enabled: false, report: null });
|
|
387
404
|
}
|
|
405
|
+
const toolTargets = (option, key) => {
|
|
406
|
+
if (option === false) return null;
|
|
407
|
+
if (option === true) return projects.length > 0 ? projects : [void 0];
|
|
408
|
+
const recordedProjects = recordedToolProjects(recorded, key);
|
|
409
|
+
return recordedProjects.length > 0 ? recordedProjects : null;
|
|
410
|
+
};
|
|
411
|
+
const tailwindTargets = toolTargets(options.tailwind, "tailwind");
|
|
412
|
+
if (tailwindTargets !== null && frontend === "none") {
|
|
413
|
+
sections.push({ id: "tailwind", enabled: false, report: null, skippedBecause: "backend-only workspace \u2014 no app for Tailwind" });
|
|
414
|
+
} else if (tailwindTargets !== null) {
|
|
415
|
+
for (const project of tailwindTargets) {
|
|
416
|
+
const report = runAddTailwind(tree, { dryRun, ...project === void 0 ? {} : { project } });
|
|
417
|
+
sections.push({ id: "tailwind", enabled: true, report: { kind: "tailwind", report } });
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
const storybookTargets = toolTargets(options.storybook, "storybook");
|
|
421
|
+
if (storybookTargets !== null && frontend === "none") {
|
|
422
|
+
sections.push({ id: "storybook", enabled: false, report: null, skippedBecause: "backend-only workspace \u2014 no app for Storybook" });
|
|
423
|
+
} else if (storybookTargets !== null) {
|
|
424
|
+
for (const project of storybookTargets) {
|
|
425
|
+
const report = runAddStorybook(tree, { dryRun, applyEslint: options.applyEslint ?? false, ...project === void 0 ? {} : { project } });
|
|
426
|
+
sections.push({ id: "storybook", enabled: true, report: { kind: "storybook", report } });
|
|
427
|
+
}
|
|
428
|
+
}
|
|
388
429
|
if (config.review.enabled) {
|
|
389
430
|
const report = runAddReview(tree, {
|
|
390
431
|
mode: config.review.mode,
|
|
@@ -414,14 +455,34 @@ function runInit(tree, options, deps) {
|
|
|
414
455
|
const anyChoiceApplied = fsdApplied || agentRulesApplied || reviewApplied;
|
|
415
456
|
const notRecorded = [];
|
|
416
457
|
if (fsdRan && !fsdApplied) {
|
|
417
|
-
notRecorded.push({ field: "fsd.enforcement", rerun: `add-fsd-lite --enforcement=${config.fsd.enforcement}` });
|
|
418
|
-
}
|
|
419
|
-
if (agentRulesRan && !agentRulesApplied) {
|
|
420
458
|
notRecorded.push({
|
|
421
|
-
|
|
422
|
-
|
|
459
|
+
fields: ["fsd.enforcement"],
|
|
460
|
+
reason: "the FSD section aborted",
|
|
461
|
+
reruns: [{ note: null, rerun: `add-fsd-lite --enforcement=${config.fsd.enforcement}` }]
|
|
423
462
|
});
|
|
424
|
-
|
|
463
|
+
}
|
|
464
|
+
if (agentRulesRan && !agentRulesApplied) {
|
|
465
|
+
const rerun = `add-agent-rules ${config.agentRules.teamRules ? "--teamRules" : "--teamRules=false"} --hosts=${config.aiHosts.join(",")}`;
|
|
466
|
+
const files = agentRulesSection?.report?.kind === "agentRules" ? agentRulesSection.report.report.files : [];
|
|
467
|
+
const named = (action) => files.filter((file) => file.action === action).map((file) => file.filePath).join(", ");
|
|
468
|
+
const unplaced = named("unrecognized");
|
|
469
|
+
notRecorded.push(
|
|
470
|
+
unplaced !== "" ? {
|
|
471
|
+
fields: ["agentRules.teamRules", "aiHosts"],
|
|
472
|
+
reason: `the agent rules markers in ${unplaced} could not be placed`,
|
|
473
|
+
reruns: [{ note: "fix the markers, then", rerun }]
|
|
474
|
+
} : (
|
|
475
|
+
// A kept edit: matching the block first keeps the user's work, so it comes first.
|
|
476
|
+
{
|
|
477
|
+
fields: ["agentRules.teamRules", "aiHosts"],
|
|
478
|
+
reason: `the agent rules block in ${named("user-modified")} was edited by hand and kept`,
|
|
479
|
+
reruns: [
|
|
480
|
+
{ note: "make the block match the generated one, then", rerun },
|
|
481
|
+
{ note: "or replace the block (your edits to it are lost)", rerun: `${rerun} --overwriteBlock` }
|
|
482
|
+
]
|
|
483
|
+
}
|
|
484
|
+
)
|
|
485
|
+
);
|
|
425
486
|
}
|
|
426
487
|
const lintInputs = fsdApplied ? applyLintInputs(tree, {
|
|
427
488
|
firstRun,
|
|
@@ -18,9 +18,12 @@ import {
|
|
|
18
18
|
import "../_chunks/chunk-34V6HAJT.js";
|
|
19
19
|
import {
|
|
20
20
|
diskRunNx
|
|
21
|
-
} from "../_chunks/chunk-
|
|
22
|
-
import "../_chunks/chunk-
|
|
21
|
+
} from "../_chunks/chunk-JSHZ6VSW.js";
|
|
22
|
+
import "../_chunks/chunk-736LFDT4.js";
|
|
23
23
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
24
|
+
import {
|
|
25
|
+
messageOnlyError
|
|
26
|
+
} from "../_chunks/chunk-BDLK2IID.js";
|
|
24
27
|
|
|
25
28
|
// ../integrations/dist/config/declare-enabled-integration.js
|
|
26
29
|
import { existsSync, lstatSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -237,7 +240,7 @@ async function runInstallIntegration(tree, options, deps = {}) {
|
|
|
237
240
|
const entry = getCatalogEntry(options.tool);
|
|
238
241
|
const pluginId = entry?.hosts["claude-code"]?.pluginId;
|
|
239
242
|
if (!integration || !entry || pluginId === void 0) {
|
|
240
|
-
throw
|
|
243
|
+
throw messageOnlyError(`Unsupported integration "${options.tool}". Supported: ${PLUGIN_IDS.join(", ")}.`);
|
|
241
244
|
}
|
|
242
245
|
const name = entry.displayName;
|
|
243
246
|
const plan = await integration.plan({
|
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
} from "../_chunks/chunk-H222FPLK.js";
|
|
4
4
|
import {
|
|
5
5
|
runFsdSlice
|
|
6
|
-
} from "../_chunks/chunk-
|
|
7
|
-
import "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-CHZPA6OE.js";
|
|
7
|
+
import "../_chunks/chunk-R2VEJGNP.js";
|
|
8
|
+
import "../_chunks/chunk-W2BBF5MS.js";
|
|
8
9
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
10
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
11
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +14,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
14
|
import {
|
|
14
15
|
resolveDryRun
|
|
15
16
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
17
|
+
import "../_chunks/chunk-736LFDT4.js";
|
|
17
18
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
19
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
20
|
|
|
19
21
|
// src/generators/page/generator.ts
|
|
20
22
|
async function pageGenerator(tree, options) {
|
|
@@ -9,6 +9,9 @@ import {
|
|
|
9
9
|
recordMetadataFor
|
|
10
10
|
} from "../_chunks/chunk-AQHV7DJS.js";
|
|
11
11
|
import "../_chunks/chunk-34V6HAJT.js";
|
|
12
|
+
import {
|
|
13
|
+
messageOnlyError
|
|
14
|
+
} from "../_chunks/chunk-BDLK2IID.js";
|
|
12
15
|
|
|
13
16
|
// src/generators/record-integration/render.ts
|
|
14
17
|
function renderRecordIntegrationView(view) {
|
|
@@ -54,7 +57,7 @@ async function recordIntegrationGenerator(tree, options, deps = {}) {
|
|
|
54
57
|
const apply = (options.apply ?? false) && process.env["NX_DRY_RUN"] !== "true";
|
|
55
58
|
const integration = root.getIntegration(options.tool);
|
|
56
59
|
if (!integration) {
|
|
57
|
-
throw
|
|
60
|
+
throw messageOnlyError(`Unsupported integration "${options.tool}". Supported: ${PLUGIN_IDS.join(", ")}.`);
|
|
58
61
|
}
|
|
59
62
|
const entry = getCatalogEntry(options.tool);
|
|
60
63
|
const metadata = entry === void 0 ? void 0 : recordMetadataFor(entry);
|
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
} from "../_chunks/chunk-H222FPLK.js";
|
|
4
4
|
import {
|
|
5
5
|
runFsdSlice
|
|
6
|
-
} from "../_chunks/chunk-
|
|
7
|
-
import "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-CHZPA6OE.js";
|
|
7
|
+
import "../_chunks/chunk-R2VEJGNP.js";
|
|
8
|
+
import "../_chunks/chunk-W2BBF5MS.js";
|
|
8
9
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
10
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
11
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +14,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
14
|
import {
|
|
14
15
|
resolveDryRun
|
|
15
16
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
17
|
+
import "../_chunks/chunk-736LFDT4.js";
|
|
17
18
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
19
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
20
|
|
|
19
21
|
// src/generators/shared/generator.ts
|
|
20
22
|
async function sharedGenerator(tree, options) {
|
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
} from "../_chunks/chunk-H222FPLK.js";
|
|
4
4
|
import {
|
|
5
5
|
runFsdSlice
|
|
6
|
-
} from "../_chunks/chunk-
|
|
7
|
-
import "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-CHZPA6OE.js";
|
|
7
|
+
import "../_chunks/chunk-R2VEJGNP.js";
|
|
8
|
+
import "../_chunks/chunk-W2BBF5MS.js";
|
|
8
9
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
10
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
11
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +14,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
14
|
import {
|
|
14
15
|
resolveDryRun
|
|
15
16
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
17
|
+
import "../_chunks/chunk-736LFDT4.js";
|
|
17
18
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
19
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
20
|
|
|
19
21
|
// src/generators/widget/generator.ts
|
|
20
22
|
async function widgetGenerator(tree, options) {
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyLintInputs,
|
|
3
3
|
renderLintInputs
|
|
4
|
-
} from "../../generators/_chunks/chunk-
|
|
5
|
-
import "../../generators/_chunks/chunk-
|
|
4
|
+
} from "../../generators/_chunks/chunk-6PKKKQMD.js";
|
|
5
|
+
import "../../generators/_chunks/chunk-SBOQHME6.js";
|
|
6
|
+
import "../../generators/_chunks/chunk-N6SPEKJB.js";
|
|
7
|
+
import "../../generators/_chunks/chunk-GN76UMTK.js";
|
|
8
|
+
import "../../generators/_chunks/chunk-F5C5HUSI.js";
|
|
6
9
|
import "../../generators/_chunks/chunk-CSJZ4PP3.js";
|
|
7
10
|
import "../../generators/_chunks/chunk-SHKQSTV2.js";
|
|
8
11
|
import "../../generators/_chunks/chunk-AMOOSD5Q.js";
|
|
9
12
|
import {
|
|
10
13
|
classifyFsdEslintConfig
|
|
11
|
-
} from "../../generators/_chunks/chunk-
|
|
14
|
+
} from "../../generators/_chunks/chunk-SZRBDQCU.js";
|
|
15
|
+
import "../../generators/_chunks/chunk-KNVBFTH4.js";
|
|
12
16
|
import "../../generators/_chunks/chunk-YEMQFSL6.js";
|
|
13
17
|
import {
|
|
14
18
|
ESLINT_CONFIG_CANDIDATES
|
|
@@ -18,10 +22,11 @@ import "../../generators/_chunks/chunk-JPS6XKYK.js";
|
|
|
18
22
|
import {
|
|
19
23
|
readToolkitConfig,
|
|
20
24
|
treePackageManager
|
|
21
|
-
} from "../../generators/_chunks/chunk-
|
|
25
|
+
} from "../../generators/_chunks/chunk-736LFDT4.js";
|
|
22
26
|
import {
|
|
23
27
|
runNxCommand
|
|
24
28
|
} from "../../generators/_chunks/chunk-5Z7VZPES.js";
|
|
29
|
+
import "../../generators/_chunks/chunk-BDLK2IID.js";
|
|
25
30
|
|
|
26
31
|
// src/migrations/update-0.5.3/add-toolkit-config-lint-input.ts
|
|
27
32
|
import { getProjects } from "@nx/devkit";
|
package/generators.json
CHANGED
|
@@ -36,6 +36,16 @@
|
|
|
36
36
|
"schema": "./src/generators/add-github-templates/schema.json",
|
|
37
37
|
"description": "Install GitHub Issue/PR templates and CODEOWNERS"
|
|
38
38
|
},
|
|
39
|
+
"add-tailwind": {
|
|
40
|
+
"factory": "./dist/generators/add-tailwind/generator",
|
|
41
|
+
"schema": "./src/generators/add-tailwind/schema.json",
|
|
42
|
+
"description": "Add Tailwind CSS v4 to a React (Vite) or Next.js app, wired to the FSD layers"
|
|
43
|
+
},
|
|
44
|
+
"add-storybook": {
|
|
45
|
+
"factory": "./dist/generators/add-storybook/generator",
|
|
46
|
+
"schema": "./src/generators/add-storybook/schema.json",
|
|
47
|
+
"description": "Finish an app's or a library's Nx Storybook setup for FSD: stories under src/, ESLint, Tailwind in the preview, an optional shared/ui example"
|
|
48
|
+
},
|
|
39
49
|
"add-fsd-lite": {
|
|
40
50
|
"factory": "./dist/generators/add-fsd-lite/generator",
|
|
41
51
|
"schema": "./src/generators/add-fsd-lite/schema.json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clearlydev/nx-archweave",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Nx plugin and CLI that set up Feature-Sliced Design (FSD) import linting, frontend/backend module boundaries and AI agent rule files. AI PR review is optional (beta).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "clearlydev (https://github.com/clearlydev)",
|
|
@@ -101,6 +101,11 @@
|
|
|
101
101
|
"outputs": [
|
|
102
102
|
"{projectRoot}/dist"
|
|
103
103
|
]
|
|
104
|
+
},
|
|
105
|
+
"lint": {
|
|
106
|
+
"dependsOn": [
|
|
107
|
+
"^generate-pins"
|
|
108
|
+
]
|
|
104
109
|
}
|
|
105
110
|
}
|
|
106
111
|
},
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "string",
|
|
12
12
|
"enum": ["claude-code", "codex", "cursor", "gemini-cli"]
|
|
13
13
|
},
|
|
14
|
-
"description": "The AI coding tools you use. Claude Code reads CLAUDE.md; Codex, Cursor and Gemini CLI read AGENTS.md. Defaults to toolkit.config.json's aiHosts, else Claude Code.",
|
|
14
|
+
"description": "The AI coding tools you use. Claude Code reads CLAUDE.md; Codex, Cursor and Gemini CLI read AGENTS.md. Defaults to toolkit.config.json's aiHosts, else Claude Code. When passed, recorded there once every file gets the block.",
|
|
15
15
|
"x-prompt": {
|
|
16
16
|
"message": "Which AI coding tools do you use? (space to select, enter to confirm; none selected = toolkit.config.json's aiHosts, else Claude Code)",
|
|
17
17
|
"type": "list",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"teamRules": {
|
|
33
33
|
"type": "boolean",
|
|
34
|
-
"description": "Include the Team Rules section (collaboration rules for a shared repository). Defaults to toolkit.config.json's agentRules.teamRules, else false"
|
|
34
|
+
"description": "Include the Team Rules section (collaboration rules for a shared repository). Defaults to toolkit.config.json's agentRules.teamRules, else false. When passed, recorded there once every file gets the block"
|
|
35
35
|
},
|
|
36
36
|
"overwriteBlock": {
|
|
37
37
|
"type": "boolean",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "AddStorybook",
|
|
5
|
+
"title": "Finish an app's or a library's Nx Storybook setup for FSD: stories under src/, ESLint, Tailwind in the preview, an optional shared/ui example",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"project": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The frontend app, or a React (Vite) library, whose Storybook to finish. Omitted: the workspace's one frontend app (or the one toolkit.config.json's frontends records); with more than one, the run is refused with the candidates listed"
|
|
11
|
+
},
|
|
12
|
+
"example": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"default": false,
|
|
15
|
+
"description": "Also add an example Button with its story under shared/ui"
|
|
16
|
+
},
|
|
17
|
+
"tailwind": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": false,
|
|
20
|
+
"description": "For a library: load Tailwind in its Storybook (apps follow add-tailwind's record)"
|
|
21
|
+
},
|
|
22
|
+
"applyEslint": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"default": false,
|
|
25
|
+
"description": "Write the Storybook lines into the app's ESLint config; without it they are shown to paste"
|
|
26
|
+
},
|
|
27
|
+
"dryRun": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": false,
|
|
30
|
+
"description": "Print the report without writing anything"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "AddTailwind",
|
|
5
|
+
"title": "Add Tailwind CSS v4 to a React (Vite) or Next.js app, wired to the FSD layers",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"project": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The frontend app to add Tailwind to. Omitted: the workspace's one frontend app (or the one toolkit.config.json's frontends records); with more than one, the run is refused with the candidates listed"
|
|
11
|
+
},
|
|
12
|
+
"dryRun": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"default": false,
|
|
15
|
+
"description": "Print the report without writing anything"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -75,6 +75,14 @@
|
|
|
75
75
|
"type": "boolean",
|
|
76
76
|
"description": "With review on, passed to add-review. false: no .github/dependabot.yml for the review workflow's pinned actions (an existing one is left alone), recorded as review.dependabot in toolkit.config.json. true clears that record. Omitted: the record, else true"
|
|
77
77
|
},
|
|
78
|
+
"tailwind": {
|
|
79
|
+
"type": "boolean",
|
|
80
|
+
"description": "Run add-tailwind (Tailwind CSS v4) for the frontend app — every app --project names. Omitted: the apps toolkit.config.json's tailwind.projects records (a rerun keeps them set up); false skips it and removes nothing. Never passed to add-storybook."
|
|
81
|
+
},
|
|
82
|
+
"storybook": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"description": "Run add-storybook for the frontend app — every app --project names — once Nx's Storybook setup has run on it (without it, the report lists Nx's setup steps). Omitted: the projects toolkit.config.json's storybook.projects records; false skips it and removes nothing. add-storybook gets --applyEslint when init does, never --tailwind or --example."
|
|
85
|
+
},
|
|
78
86
|
"dryRun": {
|
|
79
87
|
"type": "boolean",
|
|
80
88
|
"default": false,
|