@clearlydev/nx-archweave 0.6.0 → 0.6.1
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/dist/bin/review-verdict.js +2 -2
- package/dist/generators/_chunks/{chunk-XSALM2IR.js → chunk-2K4JADTK.js} +10 -9
- package/dist/generators/_chunks/{chunk-C2WELXMV.js → chunk-2TQWFUMC.js} +12 -8
- package/dist/generators/_chunks/chunk-BDLK2IID.js +10 -0
- package/dist/generators/_chunks/{chunk-JNYQTW7S.js → chunk-CH5AF5S2.js} +2 -2
- package/dist/generators/_chunks/{chunk-VCLVE4EQ.js → chunk-D7J7HTND.js} +3 -3
- package/dist/generators/_chunks/{chunk-23NN76E3.js → chunk-EHYC6FUR.js} +1 -1
- package/dist/generators/_chunks/{chunk-LJRFVE6B.js → chunk-F5C5HUSI.js} +10 -9
- package/dist/generators/_chunks/{chunk-ZRHIFPUC.js → chunk-L52OUT5T.js} +1 -1
- package/dist/generators/_chunks/{chunk-FBCIELXS.js → chunk-LKXSS5E2.js} +3 -1
- package/dist/generators/_chunks/{chunk-3HSNM6AS.js → chunk-UAPIAMRL.js} +9 -7
- package/dist/generators/_chunks/{chunk-7EDJKUY4.js → chunk-WD2HL2RE.js} +1 -1
- package/dist/generators/_chunks/{chunk-M7UBCSYL.js → chunk-XZM354ZH.js} +2 -2
- 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 +5 -4
- 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/allow-builds/generator.js +4 -1
- package/dist/generators/doctor/generator.js +78 -54
- package/dist/generators/entity/generator.js +4 -3
- package/dist/generators/feature/generator.js +4 -3
- package/dist/generators/init/generator.js +41 -19
- package/dist/generators/install-integration/generator.js +6 -3
- package/dist/generators/page/generator.js +4 -3
- package/dist/generators/record-integration/generator.js +4 -1
- package/dist/generators/shared/generator.js +4 -3
- package/dist/generators/widget/generator.js +4 -3
- package/dist/migrations/update-0.5.3/add-toolkit-config-lint-input.js +4 -3
- package/package.json +6 -1
- package/src/generators/add-agent-rules/schema.json +2 -2
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
REVIEW_WORKFLOW_CONTRACT,
|
|
5
5
|
VERDICT_MARKER,
|
|
6
6
|
runVerdictGate
|
|
7
|
-
} from "../generators/_chunks/chunk-
|
|
7
|
+
} from "../generators/_chunks/chunk-YVISD736.js";
|
|
8
8
|
import "../generators/_chunks/chunk-JPS6XKYK.js";
|
|
9
9
|
|
|
10
10
|
// src/bin/review-verdict.ts
|
|
@@ -155,7 +155,7 @@ function splitConcatenatedJson(stdout) {
|
|
|
155
155
|
if (depth !== 0 || text.slice(start).trim() !== "") return null;
|
|
156
156
|
return values;
|
|
157
157
|
}
|
|
158
|
-
var invokedAsBin
|
|
158
|
+
var invokedAsBin;
|
|
159
159
|
try {
|
|
160
160
|
invokedAsBin = process.argv[1] !== void 0 && realpathSync(process.argv[1]).endsWith("review-verdict.js");
|
|
161
161
|
} catch {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderAddAgentRulesReport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F5C5HUSI.js";
|
|
4
4
|
import {
|
|
5
5
|
renderAddReviewReport
|
|
6
6
|
} from "./chunk-CSJZ4PP3.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-FZGN5NEP.js";
|
|
28
28
|
import {
|
|
29
29
|
applyJsonEdits
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-2TQWFUMC.js";
|
|
31
31
|
import {
|
|
32
32
|
packageManagerCommands,
|
|
33
33
|
runNxCommand
|
|
@@ -306,11 +306,11 @@ function renderInitReport(report) {
|
|
|
306
306
|
case "skipped":
|
|
307
307
|
break;
|
|
308
308
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
for (const
|
|
309
|
+
const runNx = report.runNx ?? runNxCommand(report.packageManager);
|
|
310
|
+
for (const entry of report.config.notRecorded) {
|
|
311
|
+
const how = entry.reruns.every((rerun) => rerun.note === null) ? `Once resolved, record ${entry.fields.length > 1 ? "them" : "it"} with:` : `Record ${entry.fields.length > 1 ? "them" : "it"} with:`;
|
|
312
|
+
lines.push(` not recorded: ${entry.fields.join(", ")} \u2014 ${entry.reason}. ${how}`);
|
|
313
|
+
for (const { note, rerun } of entry.reruns) lines.push(` ${note === null ? "" : `${note}: `}${runNx} g @clearlydev/nx-archweave:${rerun}`);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
if (report.lintInputs !== void 0) lines.push("", "## nx.json", ...renderLintInputs(report.lintInputs, report.dryRun));
|
|
@@ -350,8 +350,9 @@ function renderLintInputs(outcome, dryRun) {
|
|
|
350
350
|
"no-plugin": "@nx/eslint/plugin is not registered, so targetDefaults would replace the lint targets' inputs",
|
|
351
351
|
"several-plugins": `@nx/eslint/plugin is registered more than once, so which ${outcome.target} targets it infers is up to each registration`,
|
|
352
352
|
"own-targets": `${(outcome.ownTargets ?? []).join(", ")} write their own ${outcome.target} target, which keeps only what targetDefaults lists`,
|
|
353
|
-
|
|
354
|
-
"
|
|
353
|
+
// The snippet below says why that entry wins; the reason only names it.
|
|
354
|
+
"run-commands-defaults": `targetDefaults["nx:run-commands"] decides the ${outcome.target} targets' inputs (below)`,
|
|
355
|
+
"other-key": `a glob key in targetDefaults decides the ${outcome.target} targets' inputs (below)`,
|
|
355
356
|
"list-defaults": `targetDefaults.${outcome.target} is a list of entries, and the input belongs in each one that covers an FSD project`,
|
|
356
357
|
"unreadable-defaults": `targetDefaults.${outcome.target} is neither an object nor a list of entries`,
|
|
357
358
|
"existing-inputs": `targetDefaults already gives ${outcome.target} inputs of its own`
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectWorkspacePackageManager
|
|
3
3
|
} from "./chunk-5Z7VZPES.js";
|
|
4
|
+
import {
|
|
5
|
+
messageOnlyError
|
|
6
|
+
} from "./chunk-BDLK2IID.js";
|
|
4
7
|
|
|
5
8
|
// ../template-engine/dist/ai-hosts/ai-hosts.js
|
|
6
9
|
var AI_HOSTS = [
|
|
@@ -129,13 +132,6 @@ function applyJsonEdits(raw, edits) {
|
|
|
129
132
|
return edits.reduce((text, [path, value]) => setJsonValue(text, path, value), raw);
|
|
130
133
|
}
|
|
131
134
|
|
|
132
|
-
// src/generators/shared/message-only-error.ts
|
|
133
|
-
function messageOnlyError(message) {
|
|
134
|
-
const error = new Error(message);
|
|
135
|
-
error.stack = "";
|
|
136
|
-
return error;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
135
|
// src/generators/shared/toolkit-config-file.ts
|
|
140
136
|
var TOOLKIT_CONFIG_PATH = "toolkit.config.json";
|
|
141
137
|
function readToolkitConfigFile(tree) {
|
|
@@ -209,6 +205,14 @@ function recordAiHosts(tree, hosts, write) {
|
|
|
209
205
|
if (write) tree.write(TOOLKIT_CONFIG_PATH, applyJsonEdits(raw, [[["aiHosts"], [...hosts]]]));
|
|
210
206
|
return raw === null ? "created" : "updated";
|
|
211
207
|
}
|
|
208
|
+
function recordTeamRules(tree, teamRules, write) {
|
|
209
|
+
const { raw, parsed } = readToolkitConfigFile(tree);
|
|
210
|
+
if (raw !== null && parsed === null) return "unrecognized";
|
|
211
|
+
const agentRules = parsed?.["agentRules"];
|
|
212
|
+
if (typeof agentRules === "object" && agentRules !== null && agentRules["teamRules"] === teamRules) return "unchanged";
|
|
213
|
+
if (write) tree.write(TOOLKIT_CONFIG_PATH, applyJsonEdits(raw, [[["agentRules", "teamRules"], teamRules]]));
|
|
214
|
+
return raw === null ? "created" : "updated";
|
|
215
|
+
}
|
|
212
216
|
function recordedFrontends(config) {
|
|
213
217
|
const frontends = config?.["frontends"];
|
|
214
218
|
if (!Array.isArray(frontends)) return [];
|
|
@@ -224,7 +228,6 @@ export {
|
|
|
224
228
|
setJsonValue,
|
|
225
229
|
appendJsonArrayItem,
|
|
226
230
|
applyJsonEdits,
|
|
227
|
-
messageOnlyError,
|
|
228
231
|
TOOLKIT_CONFIG_PATH,
|
|
229
232
|
readToolkitConfigFile,
|
|
230
233
|
readToolkitConfig,
|
|
@@ -239,5 +242,6 @@ export {
|
|
|
239
242
|
treePackageManager,
|
|
240
243
|
resolveAiHostsOption,
|
|
241
244
|
recordAiHosts,
|
|
245
|
+
recordTeamRules,
|
|
242
246
|
recordedFrontends
|
|
243
247
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
composeReviewSetup,
|
|
3
3
|
judgeReviewFileConflict
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YVISD736.js";
|
|
5
5
|
import {
|
|
6
6
|
DEPENDABOT_PATH,
|
|
7
7
|
renderAddReviewReport,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
applyJsonEdits,
|
|
19
19
|
treePackageManager
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2TQWFUMC.js";
|
|
21
21
|
|
|
22
22
|
// src/generators/add-review/generator.ts
|
|
23
23
|
var CONFIG_PATH = "toolkit.config.json";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-XXXON43Z.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveFrontendApp
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LKXSS5E2.js";
|
|
12
12
|
import {
|
|
13
13
|
profileById
|
|
14
14
|
} from "./chunk-YEMQFSL6.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-TUN34LAQ.js";
|
|
24
24
|
import {
|
|
25
25
|
runNxFor
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EHYC6FUR.js";
|
|
27
27
|
import {
|
|
28
28
|
applyJsonEdits,
|
|
29
29
|
readToolkitConfig,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
resolveLocaleOption,
|
|
32
32
|
setJsonValue,
|
|
33
33
|
treePackageManager
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2TQWFUMC.js";
|
|
35
35
|
import {
|
|
36
36
|
detectYarnFlavor,
|
|
37
37
|
packageManagerCommands,
|
|
@@ -22,16 +22,17 @@ function renderAddAgentRulesReport(report) {
|
|
|
22
22
|
lines.push(" Rerun with --overwriteBlock to replace the block with the generated one.");
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
created:
|
|
27
|
-
updated:
|
|
28
|
-
unchanged:
|
|
29
|
-
unrecognized:
|
|
30
|
-
"not-applied":
|
|
25
|
+
const recordLine = (field, outcome) => ({
|
|
26
|
+
created: `toolkit.config.json: ${field} recorded (file created)`,
|
|
27
|
+
updated: `toolkit.config.json: ${field} recorded`,
|
|
28
|
+
unchanged: `toolkit.config.json: ${field} already recorded`,
|
|
29
|
+
unrecognized: `toolkit.config.json: not a JSON object \u2014 ${field} not recorded (fix the file, then rerun)`,
|
|
30
|
+
"not-applied": `toolkit.config.json: ${field} not recorded \u2014 a block above was kept or not written`,
|
|
31
31
|
"not-requested": null
|
|
32
|
-
};
|
|
33
|
-
const
|
|
34
|
-
|
|
32
|
+
})[outcome];
|
|
33
|
+
for (const line of [recordLine("aiHosts", report.hostsRecord), recordLine("agentRules.teamRules", report.teamRulesRecord)]) {
|
|
34
|
+
if (line !== null) lines.push(` ${line}`);
|
|
35
|
+
}
|
|
35
36
|
if (report.files.some((file) => file.action === "unrecognized")) {
|
|
36
37
|
lines.push("");
|
|
37
38
|
lines.push('Manual fix needed: keep exactly one "<!-- nx-archweave:agent-rules start \u2026 -->" \u2026 "<!-- nx-archweave:agent-rules end -->"');
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-6ZTIUBB2.js";
|
|
10
10
|
import {
|
|
11
11
|
readToolkitConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2TQWFUMC.js";
|
|
13
13
|
|
|
14
14
|
// src/generators/shared/frontend-app.ts
|
|
15
15
|
import { getProjects } from "@nx/devkit";
|
|
@@ -180,6 +180,8 @@ export {
|
|
|
180
180
|
isUsableSliceApiName,
|
|
181
181
|
isEssenceSegmentName,
|
|
182
182
|
SEGMENT_NAME_PATTERN,
|
|
183
|
+
isEndToEnd,
|
|
184
|
+
isBackend,
|
|
183
185
|
sourceRootOf,
|
|
184
186
|
resolveFrontendApp
|
|
185
187
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderAddAgentRulesReport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F5C5HUSI.js";
|
|
4
4
|
import {
|
|
5
5
|
renderLineDiff
|
|
6
6
|
} from "./chunk-CSJZ4PP3.js";
|
|
@@ -16,10 +16,11 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
readToolkitConfig,
|
|
18
18
|
recordAiHosts,
|
|
19
|
+
recordTeamRules,
|
|
19
20
|
resolveAiHostsOption,
|
|
20
21
|
resolveLocaleOption,
|
|
21
22
|
rulesFilesFor
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2TQWFUMC.js";
|
|
23
24
|
|
|
24
25
|
// ../templates/dist/agents/agent-sections.js
|
|
25
26
|
var UNIVERSAL_AGENT_SECTION_IDS = [
|
|
@@ -504,7 +505,7 @@ function resolveFsdPolicyNotes(config) {
|
|
|
504
505
|
const policy = resolveFsdPolicy(fsd);
|
|
505
506
|
return { sliceGroups: policy.sliceGroups !== false, sharedPublicApi: policy.sharedPublicApi, testFiles: policy.testFiles !== false };
|
|
506
507
|
}
|
|
507
|
-
function runAddAgentRules(tree, options, {
|
|
508
|
+
function runAddAgentRules(tree, options, { recordChoices = true, fsdStructure, moduleBoundaries } = {}) {
|
|
508
509
|
const config = readToolkitConfig(tree);
|
|
509
510
|
const hosts = resolveAiHostsOption(options.hosts, config);
|
|
510
511
|
const files = rulesFilesFor(hosts);
|
|
@@ -550,10 +551,11 @@ function runAddAgentRules(tree, options, { recordHosts = true, fsdStructure, mod
|
|
|
550
551
|
}
|
|
551
552
|
}
|
|
552
553
|
});
|
|
553
|
-
const
|
|
554
|
-
const
|
|
555
|
-
const hostsRecord =
|
|
556
|
-
|
|
554
|
+
const allApplied = results.every((file) => file.action !== "unrecognized" && file.action !== "user-modified");
|
|
555
|
+
const record = (given, write) => given && recordChoices ? allApplied ? write() : "not-applied" : "not-requested";
|
|
556
|
+
const hostsRecord = record(options.hosts !== void 0 && options.hosts.length > 0, () => recordAiHosts(tree, hosts, !dryRun));
|
|
557
|
+
const teamRulesRecord = record(options.teamRules !== void 0, () => recordTeamRules(tree, teamRules, !dryRun));
|
|
558
|
+
return { dryRun, locale, hosts, teamRules, files: results, hostsRecord, teamRulesRecord };
|
|
557
559
|
}
|
|
558
560
|
async function addAgentRulesGenerator(tree, options) {
|
|
559
561
|
console.log(renderAddAgentRulesReport(runAddAgentRules(tree, { ...options, dryRun: resolveDryRun(options) })));
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
isUsableSliceApiName,
|
|
5
5
|
resolveFrontendApp,
|
|
6
6
|
resolveSlicePublicApiName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LKXSS5E2.js";
|
|
8
8
|
import {
|
|
9
9
|
profileById
|
|
10
10
|
} from "./chunk-YEMQFSL6.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
readToolkitConfig,
|
|
21
21
|
recordedFrontends,
|
|
22
22
|
resolveLocaleOption
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2TQWFUMC.js";
|
|
24
24
|
|
|
25
25
|
// src/generators/slice/core.ts
|
|
26
26
|
import { join } from "node:path";
|
|
@@ -465,7 +465,7 @@ function buildOverEngineeringPrompt(locale) {
|
|
|
465
465
|
return [...body, "", renderFindingSchemaInstruction(locale, OVER_ENGINEERING_PRIORITIES), "", renderDedupInstruction(locale)].join("\n");
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
// ../template-engine/dist/review/action-pins.js
|
|
468
|
+
// ../template-engine/dist/review/action-pins.generated.js
|
|
469
469
|
var ACTION_PINS = {
|
|
470
470
|
"actions/checkout": "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1",
|
|
471
471
|
"actions/setup-node": "actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0",
|
|
@@ -475,6 +475,8 @@ var ACTION_PINS = {
|
|
|
475
475
|
"google-github-actions/run-gemini-cli": "google-github-actions/run-gemini-cli@f77273f4c914e4bf38440cf36a0369cb64a37489 # v0.1.22",
|
|
476
476
|
"openai/codex-action": "openai/codex-action@306c6a196a99dcc6582530c396a19d2672d5e9ec # v1.14"
|
|
477
477
|
};
|
|
478
|
+
|
|
479
|
+
// ../template-engine/dist/review/action-pins.js
|
|
478
480
|
function pinnedUses(action) {
|
|
479
481
|
return ACTION_PINS[action];
|
|
480
482
|
}
|
|
@@ -2,15 +2,16 @@ import {
|
|
|
2
2
|
addAgentRulesGenerator,
|
|
3
3
|
generator_default,
|
|
4
4
|
runAddAgentRules
|
|
5
|
-
} from "../_chunks/chunk-
|
|
6
|
-
import "../_chunks/chunk-
|
|
5
|
+
} from "../_chunks/chunk-UAPIAMRL.js";
|
|
6
|
+
import "../_chunks/chunk-F5C5HUSI.js";
|
|
7
7
|
import "../_chunks/chunk-CSJZ4PP3.js";
|
|
8
8
|
import "../_chunks/chunk-5MI3O4VZ.js";
|
|
9
9
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
10
10
|
import "../_chunks/chunk-JPS6XKYK.js";
|
|
11
11
|
import "../_chunks/chunk-TUN34LAQ.js";
|
|
12
|
-
import "../_chunks/chunk-
|
|
12
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
13
13
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
14
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
14
15
|
export {
|
|
15
16
|
addAgentRulesGenerator,
|
|
16
17
|
generator_default as default,
|
|
@@ -2,14 +2,15 @@ import {
|
|
|
2
2
|
addBackendGenerator,
|
|
3
3
|
generator_default,
|
|
4
4
|
runAddBackend
|
|
5
|
-
} from "../_chunks/chunk-
|
|
5
|
+
} from "../_chunks/chunk-WD2HL2RE.js";
|
|
6
6
|
import "../_chunks/chunk-SHKQSTV2.js";
|
|
7
7
|
import "../_chunks/chunk-WNO3ZGBB.js";
|
|
8
8
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
9
9
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
10
10
|
import "../_chunks/chunk-TUN34LAQ.js";
|
|
11
|
-
import "../_chunks/chunk-
|
|
11
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
12
12
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
13
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
13
14
|
export {
|
|
14
15
|
addBackendGenerator,
|
|
15
16
|
generator_default as default,
|
|
@@ -2,18 +2,19 @@ import {
|
|
|
2
2
|
addFsdLiteGenerator,
|
|
3
3
|
generator_default,
|
|
4
4
|
runAddFsdLite
|
|
5
|
-
} from "../_chunks/chunk-
|
|
5
|
+
} from "../_chunks/chunk-D7J7HTND.js";
|
|
6
6
|
import "../_chunks/chunk-AMOOSD5Q.js";
|
|
7
7
|
import "../_chunks/chunk-XXXON43Z.js";
|
|
8
|
-
import "../_chunks/chunk-
|
|
8
|
+
import "../_chunks/chunk-LKXSS5E2.js";
|
|
9
9
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
10
10
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
11
11
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
12
12
|
import "../_chunks/chunk-JPS6XKYK.js";
|
|
13
13
|
import "../_chunks/chunk-TUN34LAQ.js";
|
|
14
|
-
import "../_chunks/chunk-
|
|
15
|
-
import "../_chunks/chunk-
|
|
14
|
+
import "../_chunks/chunk-EHYC6FUR.js";
|
|
15
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
16
16
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
17
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
17
18
|
export {
|
|
18
19
|
addFsdLiteGenerator,
|
|
19
20
|
generator_default as default,
|
|
@@ -6,13 +6,14 @@ import {
|
|
|
6
6
|
addGithubTemplatesGenerator,
|
|
7
7
|
generator_default,
|
|
8
8
|
runAddGithubTemplates
|
|
9
|
-
} from "../_chunks/chunk-
|
|
9
|
+
} from "../_chunks/chunk-L52OUT5T.js";
|
|
10
10
|
import "../_chunks/chunk-FZGN5NEP.js";
|
|
11
11
|
import "../_chunks/chunk-YNMLB4DL.js";
|
|
12
12
|
import "../_chunks/chunk-JPS6XKYK.js";
|
|
13
13
|
import "../_chunks/chunk-TUN34LAQ.js";
|
|
14
|
-
import "../_chunks/chunk-
|
|
14
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
15
15
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
16
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
16
17
|
export {
|
|
17
18
|
BUG_REPORT_PATH,
|
|
18
19
|
CODEOWNERS_PATH,
|
|
@@ -10,9 +10,12 @@ import {
|
|
|
10
10
|
import "../_chunks/chunk-34V6HAJT.js";
|
|
11
11
|
import {
|
|
12
12
|
diskRunNx
|
|
13
|
-
} from "../_chunks/chunk-
|
|
14
|
-
import "../_chunks/chunk-
|
|
13
|
+
} from "../_chunks/chunk-EHYC6FUR.js";
|
|
14
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
15
15
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
16
|
+
import {
|
|
17
|
+
messageOnlyError
|
|
18
|
+
} from "../_chunks/chunk-BDLK2IID.js";
|
|
16
19
|
|
|
17
20
|
// src/generators/add-integration/render.ts
|
|
18
21
|
function renderIntegrationPlan(view) {
|
|
@@ -52,7 +55,7 @@ async function addIntegrationGenerator(tree, options, deps = {}) {
|
|
|
52
55
|
const integration = root.getIntegration(options.tool);
|
|
53
56
|
const entry = getCatalogEntry(options.tool);
|
|
54
57
|
if (!integration || !entry) {
|
|
55
|
-
throw
|
|
58
|
+
throw messageOnlyError(`Unsupported integration "${options.tool}". Supported: ${PLUGIN_IDS.join(", ")}.`);
|
|
56
59
|
}
|
|
57
60
|
const scope = options.scope ?? DEFAULT_PLUGIN_SCOPE;
|
|
58
61
|
const teamCommand = scope === "project" ? projectMarketplaceCommand(entry) : null;
|
|
@@ -3,14 +3,15 @@ import {
|
|
|
3
3
|
generator_default,
|
|
4
4
|
recordedReview,
|
|
5
5
|
runAddReview
|
|
6
|
-
} from "../_chunks/chunk-
|
|
7
|
-
import "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-CH5AF5S2.js";
|
|
7
|
+
import "../_chunks/chunk-YVISD736.js";
|
|
8
8
|
import "../_chunks/chunk-CSJZ4PP3.js";
|
|
9
9
|
import "../_chunks/chunk-YNMLB4DL.js";
|
|
10
10
|
import "../_chunks/chunk-JPS6XKYK.js";
|
|
11
11
|
import "../_chunks/chunk-TUN34LAQ.js";
|
|
12
|
-
import "../_chunks/chunk-
|
|
12
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
13
13
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
14
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
14
15
|
export {
|
|
15
16
|
addReviewGenerator,
|
|
16
17
|
generator_default as default,
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
detectWorkspacePackageManager
|
|
6
6
|
} from "../_chunks/chunk-5Z7VZPES.js";
|
|
7
|
+
import {
|
|
8
|
+
messageOnlyError
|
|
9
|
+
} from "../_chunks/chunk-BDLK2IID.js";
|
|
7
10
|
|
|
8
11
|
// src/generators/allow-builds/generator.ts
|
|
9
12
|
import { spawnSync } from "node:child_process";
|
|
@@ -316,7 +319,7 @@ function runAllowBuilds(tree, options, deps = {}) {
|
|
|
316
319
|
const packages = [...new Set(options.packages.map((name) => name.trim()))];
|
|
317
320
|
const invalid = packages.filter((name) => !isPlainPackageName(name));
|
|
318
321
|
if (packages.length === 0 || invalid.length > 0) {
|
|
319
|
-
throw
|
|
322
|
+
throw messageOnlyError(
|
|
320
323
|
`Expected npm package names (e.g. --packages=sharp,@swc/core)${invalid.length > 0 ? `; not a package name: ${invalid.map((name) => JSON.stringify(name)).join(", ")}` : ""}.`
|
|
321
324
|
);
|
|
322
325
|
}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "../_chunks/chunk-U6LAFHSF.js";
|
|
4
4
|
import {
|
|
5
5
|
detectUnitTestRunner
|
|
6
|
-
} from "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-XZM354ZH.js";
|
|
7
7
|
import "../_chunks/chunk-ASY3CK5L.js";
|
|
8
8
|
import {
|
|
9
9
|
REVIEW_MODES,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
REVIEW_WORKFLOW_CONTRACT,
|
|
12
12
|
ROUND_MARKER,
|
|
13
13
|
judgeReviewFileConflict
|
|
14
|
-
} from "../_chunks/chunk-
|
|
14
|
+
} from "../_chunks/chunk-YVISD736.js";
|
|
15
15
|
import {
|
|
16
16
|
createGroupDetector,
|
|
17
17
|
indexFilePattern
|
|
@@ -31,9 +31,11 @@ import {
|
|
|
31
31
|
resolveTargetDefaults
|
|
32
32
|
} from "../_chunks/chunk-XXXON43Z.js";
|
|
33
33
|
import {
|
|
34
|
+
isBackend,
|
|
35
|
+
isEndToEnd,
|
|
34
36
|
resolveFrontendApp,
|
|
35
37
|
sourceRootOf
|
|
36
|
-
} from "../_chunks/chunk-
|
|
38
|
+
} from "../_chunks/chunk-LKXSS5E2.js";
|
|
37
39
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
38
40
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
39
41
|
import {
|
|
@@ -53,15 +55,16 @@ import {
|
|
|
53
55
|
import "../_chunks/chunk-34V6HAJT.js";
|
|
54
56
|
import {
|
|
55
57
|
diskRunNx
|
|
56
|
-
} from "../_chunks/chunk-
|
|
58
|
+
} from "../_chunks/chunk-EHYC6FUR.js";
|
|
57
59
|
import {
|
|
58
60
|
readToolkitConfig,
|
|
59
61
|
recordedFrontends
|
|
60
|
-
} from "../_chunks/chunk-
|
|
62
|
+
} from "../_chunks/chunk-2TQWFUMC.js";
|
|
61
63
|
import {
|
|
62
64
|
detectWorkspacePackageManager,
|
|
63
65
|
runNxCommand
|
|
64
66
|
} from "../_chunks/chunk-5Z7VZPES.js";
|
|
67
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
65
68
|
|
|
66
69
|
// ../shared/dist/lib/doctor-report.js
|
|
67
70
|
function createDoctorCheck(input) {
|
|
@@ -140,7 +143,7 @@ function detectEnvironment(root) {
|
|
|
140
143
|
|
|
141
144
|
// ../template-engine/dist/doctor/run-doctor-checks.js
|
|
142
145
|
import { existsSync as existsSync7 } from "node:fs";
|
|
143
|
-
import { join as
|
|
146
|
+
import { join as join8 } from "node:path";
|
|
144
147
|
|
|
145
148
|
// ../template-engine/dist/doctor/review-checks.js
|
|
146
149
|
import { existsSync as existsSync2, readdirSync, readFileSync as readFileSync2 } from "node:fs";
|
|
@@ -614,7 +617,7 @@ function buildBackendChecks(root, projects) {
|
|
|
614
617
|
suggestedAction: "Fix the backend field, then re-run doctor."
|
|
615
618
|
}));
|
|
616
619
|
} else {
|
|
617
|
-
let hasDependency
|
|
620
|
+
let hasDependency;
|
|
618
621
|
try {
|
|
619
622
|
const pkg = JSON.parse(readFileSync3(join3(root, "package.json"), "utf-8"));
|
|
620
623
|
const packageName = backend === "nest" ? "@nestjs/core" : "express";
|
|
@@ -726,12 +729,29 @@ function buildUntaggedProjectsCheck(projects, roleTags) {
|
|
|
726
729
|
|
|
727
730
|
// ../template-engine/dist/doctor/fsd-like-check.js
|
|
728
731
|
import { existsSync as existsSync4, readdirSync as readdirSync3 } from "node:fs";
|
|
732
|
+
import { join as join5 } from "node:path";
|
|
733
|
+
|
|
734
|
+
// ../template-engine/dist/doctor/toolkit-managed.js
|
|
735
|
+
import { readFileSync as readFileSync4 } from "node:fs";
|
|
729
736
|
import { join as join4 } from "node:path";
|
|
737
|
+
function isToolkitManaged(root) {
|
|
738
|
+
try {
|
|
739
|
+
const config = JSON.parse(readFileSync4(join4(root, "toolkit.config.json"), "utf-8"));
|
|
740
|
+
if (typeof config !== "object" || config === null || Array.isArray(config))
|
|
741
|
+
return false;
|
|
742
|
+
const preset = config["preset"];
|
|
743
|
+
return typeof preset === "string" && preset !== "";
|
|
744
|
+
} catch {
|
|
745
|
+
return false;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
// ../template-engine/dist/doctor/fsd-like-check.js
|
|
730
750
|
var FSD_LAYERS = ["app", "_app", "pages", "_pages", "widgets", "features", "entities", "shared"];
|
|
731
751
|
function conventionalSourceRoots(root) {
|
|
732
752
|
const scanRoots = ["src"];
|
|
733
753
|
try {
|
|
734
|
-
for (const entry of readdirSync3(
|
|
754
|
+
for (const entry of readdirSync3(join5(root, "apps"), { withFileTypes: true })) {
|
|
735
755
|
if (entry.isDirectory())
|
|
736
756
|
scanRoots.push(`apps/${entry.name}/src`);
|
|
737
757
|
}
|
|
@@ -740,16 +760,16 @@ function conventionalSourceRoots(root) {
|
|
|
740
760
|
return scanRoots;
|
|
741
761
|
}
|
|
742
762
|
function buildFsdLikeCheck(root, projects) {
|
|
743
|
-
const scanRoots = projects === void 0 ? conventionalSourceRoots(root) : [...new Set(projects.map((project) => project.sourceRoot))].sort();
|
|
763
|
+
const scanRoots = projects === void 0 ? conventionalSourceRoots(root) : [...new Set(projects.filter((project) => project.fsdScan !== false).map((project) => project.sourceRoot))].sort();
|
|
744
764
|
let found = [];
|
|
745
765
|
for (const scanRoot of scanRoots) {
|
|
746
766
|
for (const layer of FSD_LAYERS) {
|
|
747
|
-
if (existsSync4(
|
|
767
|
+
if (existsSync4(join5(root, scanRoot, layer)))
|
|
748
768
|
found.push(scanRoot === "." || scanRoot === "" ? layer : `${scanRoot}/${layer}`);
|
|
749
769
|
}
|
|
750
770
|
}
|
|
751
771
|
found = found.sort();
|
|
752
|
-
if (
|
|
772
|
+
if (isToolkitManaged(root)) {
|
|
753
773
|
return createDoctorCheck({
|
|
754
774
|
id: "fsd-like-structure",
|
|
755
775
|
label: "FSD-like structure",
|
|
@@ -778,8 +798,8 @@ function buildFsdLikeCheck(root, projects) {
|
|
|
778
798
|
}
|
|
779
799
|
|
|
780
800
|
// ../template-engine/dist/doctor/fsd-enforcement-check.js
|
|
781
|
-
import { existsSync as existsSync5, readdirSync as readdirSync4, readFileSync as
|
|
782
|
-
import { join as
|
|
801
|
+
import { existsSync as existsSync5, readdirSync as readdirSync4, readFileSync as readFileSync5 } from "node:fs";
|
|
802
|
+
import { join as join6 } from "node:path";
|
|
783
803
|
|
|
784
804
|
// ../template-engine/dist/doctor/doctor-projects.js
|
|
785
805
|
function projectPrefix(root) {
|
|
@@ -788,11 +808,11 @@ function projectPrefix(root) {
|
|
|
788
808
|
|
|
789
809
|
// ../template-engine/dist/doctor/fsd-enforcement-check.js
|
|
790
810
|
function fsdEnabledPerConfig(root) {
|
|
791
|
-
|
|
792
|
-
if (!existsSync5(path))
|
|
811
|
+
if (!isToolkitManaged(root))
|
|
793
812
|
return null;
|
|
813
|
+
const path = join6(root, "toolkit.config.json");
|
|
794
814
|
try {
|
|
795
|
-
const config = JSON.parse(
|
|
815
|
+
const config = JSON.parse(readFileSync5(path, "utf-8"));
|
|
796
816
|
const fsd = config["fsd"];
|
|
797
817
|
if (typeof fsd === "object" && fsd !== null && typeof fsd["enabled"] === "boolean") {
|
|
798
818
|
return fsd["enabled"];
|
|
@@ -805,18 +825,18 @@ function fsdEnabledPerConfig(root) {
|
|
|
805
825
|
function eslintConfigPaths(root, projects) {
|
|
806
826
|
if (projects !== void 0) {
|
|
807
827
|
const dirs2 = ["", ...projects.map((project) => projectPrefix(project.root))];
|
|
808
|
-
return [...new Set(dirs2.flatMap((dir) => ESLINT_CONFIG_CANDIDATES.map((name) => `${dir}${name}`)))].filter((rel) => existsSync5(
|
|
828
|
+
return [...new Set(dirs2.flatMap((dir) => ESLINT_CONFIG_CANDIDATES.map((name) => `${dir}${name}`)))].filter((rel) => existsSync5(join6(root, rel)));
|
|
809
829
|
}
|
|
810
830
|
const dirsIn = (rel) => {
|
|
811
831
|
try {
|
|
812
|
-
return readdirSync4(
|
|
832
|
+
return readdirSync4(join6(root, rel), { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => rel === "" ? entry.name : `${rel}/${entry.name}`);
|
|
813
833
|
} catch {
|
|
814
834
|
return [];
|
|
815
835
|
}
|
|
816
836
|
};
|
|
817
837
|
const apps = dirsIn("apps");
|
|
818
838
|
const dirs = ["", ...apps, ...apps.flatMap((app) => dirsIn(app))];
|
|
819
|
-
return dirs.flatMap((dir) => ESLINT_CONFIG_CANDIDATES.map((name) => dir === "" ? name : `${dir}/${name}`)).filter((rel) => existsSync5(
|
|
839
|
+
return dirs.flatMap((dir) => ESLINT_CONFIG_CANDIDATES.map((name) => dir === "" ? name : `${dir}/${name}`)).filter((rel) => existsSync5(join6(root, rel)));
|
|
820
840
|
}
|
|
821
841
|
function buildFsdEnforcementCheck(root, projects) {
|
|
822
842
|
const id = "fsd-enforcement-applied";
|
|
@@ -845,7 +865,7 @@ function buildFsdEnforcementCheck(root, projects) {
|
|
|
845
865
|
});
|
|
846
866
|
}
|
|
847
867
|
function appliedFsdConfigs(root, projects) {
|
|
848
|
-
return eslintConfigPaths(root, projects).filter((rel) => classifyFsdEslintConfig(
|
|
868
|
+
return eslintConfigPaths(root, projects).filter((rel) => classifyFsdEslintConfig(readFileSync5(join6(root, rel), "utf-8")) === "applied");
|
|
849
869
|
}
|
|
850
870
|
function buildFsdRuleAnchoredCheck(root, projects) {
|
|
851
871
|
const id = "fsd-rule-anchored";
|
|
@@ -854,7 +874,7 @@ function buildFsdRuleAnchoredCheck(root, projects) {
|
|
|
854
874
|
if (applied.length === 0) {
|
|
855
875
|
return createDoctorCheck({ id, label, status: "not-applicable", message: "no ESLint config wires the FSD rule", evidence: [] });
|
|
856
876
|
}
|
|
857
|
-
const unanchored = applied.filter((rel) => !/fsdBoundaries\(\s*\{[^}]*\bcwd\s*:/s.test(maskComments(
|
|
877
|
+
const unanchored = applied.filter((rel) => !/fsdBoundaries\(\s*\{[^}]*\bcwd\s*:/s.test(maskComments(readFileSync5(join6(root, rel), "utf-8"))));
|
|
858
878
|
if (unanchored.length === 0) {
|
|
859
879
|
return createDoctorCheck({ id, label, status: "pass", message: "every FSD rule config passes cwd", evidence: applied });
|
|
860
880
|
}
|
|
@@ -869,21 +889,21 @@ function buildFsdRuleAnchoredCheck(root, projects) {
|
|
|
869
889
|
}
|
|
870
890
|
|
|
871
891
|
// ../template-engine/dist/doctor/lint-cache-check.js
|
|
872
|
-
import { existsSync as existsSync6, readdirSync as readdirSync5, readFileSync as
|
|
873
|
-
import { join as
|
|
892
|
+
import { existsSync as existsSync6, readdirSync as readdirSync5, readFileSync as readFileSync6 } from "node:fs";
|
|
893
|
+
import { join as join7 } from "node:path";
|
|
874
894
|
var ESLINT_PLUGIN = "@nx/eslint/plugin";
|
|
875
895
|
var INFERRED_EXECUTOR = "nx:run-commands";
|
|
876
896
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
877
897
|
function readJson(path) {
|
|
878
898
|
try {
|
|
879
|
-
const parsed = JSON.parse(
|
|
899
|
+
const parsed = JSON.parse(readFileSync6(path, "utf-8"));
|
|
880
900
|
return isObject(parsed) ? parsed : null;
|
|
881
901
|
} catch {
|
|
882
902
|
return null;
|
|
883
903
|
}
|
|
884
904
|
}
|
|
885
905
|
function readLintSetup(root) {
|
|
886
|
-
const nxJson = readJson(
|
|
906
|
+
const nxJson = readJson(join7(root, "nx.json"));
|
|
887
907
|
if (nxJson === null)
|
|
888
908
|
return null;
|
|
889
909
|
const plugins = Array.isArray(nxJson["plugins"]) ? nxJson["plugins"] : [];
|
|
@@ -901,15 +921,15 @@ function projectList(root, projects) {
|
|
|
901
921
|
return projects.map((project) => ({ name: project.name, root: project.root, tags: project.tags }));
|
|
902
922
|
const found = [];
|
|
903
923
|
for (const folder of ["apps", "libs"]) {
|
|
904
|
-
let entries
|
|
924
|
+
let entries;
|
|
905
925
|
try {
|
|
906
|
-
entries = readdirSync5(
|
|
926
|
+
entries = readdirSync5(join7(root, folder), { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
907
927
|
} catch {
|
|
908
928
|
continue;
|
|
909
929
|
}
|
|
910
930
|
for (const name of entries) {
|
|
911
931
|
const dir = `${folder}/${name}`;
|
|
912
|
-
const config = readJson(
|
|
932
|
+
const config = readJson(join7(root, dir, "project.json")) ?? readJson(join7(root, dir, "package.json"));
|
|
913
933
|
if (config === null)
|
|
914
934
|
continue;
|
|
915
935
|
const tags = Array.isArray(config["tags"]) ? config["tags"] : isObject(config["nx"]) && Array.isArray(config["nx"]["tags"]) ? config["nx"]["tags"] : [];
|
|
@@ -925,7 +945,7 @@ function ownLintTarget(root, project, target) {
|
|
|
925
945
|
[`${prefix}package.json`, (config) => isObject(config["nx"]) && isObject(config["nx"]["targets"]) ? config["nx"]["targets"][target] : void 0]
|
|
926
946
|
];
|
|
927
947
|
for (const [file, pick] of candidates) {
|
|
928
|
-
const config = readJson(
|
|
948
|
+
const config = readJson(join7(root, file));
|
|
929
949
|
if (config === null)
|
|
930
950
|
continue;
|
|
931
951
|
const own = pick(config);
|
|
@@ -938,7 +958,7 @@ function ownLintTarget(root, project, target) {
|
|
|
938
958
|
inputs: Array.isArray(own["inputs"]) ? own["inputs"] : void 0
|
|
939
959
|
};
|
|
940
960
|
}
|
|
941
|
-
const pkg = readJson(
|
|
961
|
+
const pkg = readJson(join7(root, `${prefix}package.json`));
|
|
942
962
|
if (pkg !== null && isObject(pkg["scripts"]) && typeof pkg["scripts"][target] === "string") {
|
|
943
963
|
return { project: project.name, file: `${prefix}package.json`, executor: "nx:run-script", inputs: void 0 };
|
|
944
964
|
}
|
|
@@ -946,7 +966,7 @@ function ownLintTarget(root, project, target) {
|
|
|
946
966
|
}
|
|
947
967
|
function configFileOf(root, projectRoot) {
|
|
948
968
|
const prefix = projectPrefix(projectRoot);
|
|
949
|
-
return existsSync6(
|
|
969
|
+
return existsSync6(join7(root, `${prefix}project.json`)) ? `${prefix}project.json` : `${prefix}package.json`;
|
|
950
970
|
}
|
|
951
971
|
function resolveDefaults(setup, project, own) {
|
|
952
972
|
const executor = own === null ? INFERRED_EXECUTOR : own.executor ?? (setup.pluginRegistered ? INFERRED_EXECUTOR : void 0);
|
|
@@ -974,8 +994,8 @@ function namesOwnFiles(inputs) {
|
|
|
974
994
|
}
|
|
975
995
|
function eslintConfigNames(root, projectRoot) {
|
|
976
996
|
const prefix = projectPrefix(projectRoot);
|
|
977
|
-
const own = ESLINT_CONFIG_CANDIDATES.find((name) => existsSync6(
|
|
978
|
-
const workspace = ESLINT_CONFIG_CANDIDATES.find((name) => existsSync6(
|
|
997
|
+
const own = ESLINT_CONFIG_CANDIDATES.find((name) => existsSync6(join7(root, `${prefix}${name}`)));
|
|
998
|
+
const workspace = ESLINT_CONFIG_CANDIDATES.find((name) => existsSync6(join7(root, name)));
|
|
979
999
|
return [
|
|
980
1000
|
...own === void 0 || prefix === "" ? [] : [`{projectRoot}/${own}`],
|
|
981
1001
|
...workspace === void 0 ? [] : [`{workspaceRoot}/${workspace}`]
|
|
@@ -983,8 +1003,8 @@ function eslintConfigNames(root, projectRoot) {
|
|
|
983
1003
|
}
|
|
984
1004
|
var NOT_READ = "nx.json could not be read";
|
|
985
1005
|
function runNxAt(root) {
|
|
986
|
-
const detected = detectWorkspacePackageManager((path) => existsSync6(
|
|
987
|
-
const recorded = readJson(
|
|
1006
|
+
const detected = detectWorkspacePackageManager((path) => existsSync6(join7(root, path)), (path) => existsSync6(join7(root, path)) ? readFileSync6(join7(root, path), "utf-8") : void 0);
|
|
1007
|
+
const recorded = readJson(join7(root, "toolkit.config.json"))?.["packageManager"];
|
|
988
1008
|
const known = ["pnpm", "npm", "yarn", "bun"].includes(recorded) ? recorded : null;
|
|
989
1009
|
return runNxCommand(detected ?? known);
|
|
990
1010
|
}
|
|
@@ -1273,21 +1293,18 @@ function buildFrameworkChecks(env) {
|
|
|
1273
1293
|
})
|
|
1274
1294
|
];
|
|
1275
1295
|
}
|
|
1276
|
-
function isToolkitManaged(root) {
|
|
1277
|
-
return existsSync7(join7(root, "toolkit.config.json"));
|
|
1278
|
-
}
|
|
1279
1296
|
function buildExistingConfigCheck(root) {
|
|
1280
|
-
const exists =
|
|
1297
|
+
const exists = existsSync7(join8(root, "toolkit.config.json"));
|
|
1281
1298
|
return createDoctorCheck({
|
|
1282
1299
|
id: "existing-config",
|
|
1283
1300
|
label: "toolkit.config.json",
|
|
1284
1301
|
status: "pass",
|
|
1285
|
-
message: exists ? "Found \u2014 the workspace is managed by nx-archweave; init and the generators merge into it, changing only their own fields" : "
|
|
1302
|
+
message: !exists ? "Not found \u2014 init creates it" : isToolkitManaged(root) ? "Found \u2014 the workspace is managed by nx-archweave; init and the generators merge into it, changing only their own fields" : "Found \u2014 init hasn't set this workspace up yet (no preset recorded); init and the generators merge into it",
|
|
1286
1303
|
evidence: exists ? ["toolkit.config.json"] : []
|
|
1287
1304
|
});
|
|
1288
1305
|
}
|
|
1289
1306
|
function buildIntegrationManifestCheck(root) {
|
|
1290
|
-
const exists = existsSync7(
|
|
1307
|
+
const exists = existsSync7(join8(root, "archweave-integrations.json"));
|
|
1291
1308
|
return createDoctorCheck({
|
|
1292
1309
|
id: "integration-manifest",
|
|
1293
1310
|
label: "Integration manifest",
|
|
@@ -1297,8 +1314,8 @@ function buildIntegrationManifestCheck(root) {
|
|
|
1297
1314
|
});
|
|
1298
1315
|
}
|
|
1299
1316
|
function buildAgentRulesCheck(root) {
|
|
1300
|
-
const claudeExists = existsSync7(
|
|
1301
|
-
const agentsExists = existsSync7(
|
|
1317
|
+
const claudeExists = existsSync7(join8(root, "CLAUDE.md"));
|
|
1318
|
+
const agentsExists = existsSync7(join8(root, "AGENTS.md"));
|
|
1302
1319
|
const exists = claudeExists || agentsExists;
|
|
1303
1320
|
const evidence = [claudeExists && "CLAUDE.md", agentsExists && "AGENTS.md"].filter(Boolean);
|
|
1304
1321
|
return createDoctorCheck({
|
|
@@ -1310,8 +1327,8 @@ function buildAgentRulesCheck(root) {
|
|
|
1310
1327
|
});
|
|
1311
1328
|
}
|
|
1312
1329
|
function buildGithubTemplatesCheck(root) {
|
|
1313
|
-
const issueTemplateExists = existsSync7(
|
|
1314
|
-
const prTemplateExists = existsSync7(
|
|
1330
|
+
const issueTemplateExists = existsSync7(join8(root, ".github", "ISSUE_TEMPLATE"));
|
|
1331
|
+
const prTemplateExists = existsSync7(join8(root, ".github", "PULL_REQUEST_TEMPLATE.md"));
|
|
1315
1332
|
const exists = issueTemplateExists || prTemplateExists;
|
|
1316
1333
|
const managed = isToolkitManaged(root);
|
|
1317
1334
|
return createDoctorCheck({
|
|
@@ -1448,16 +1465,16 @@ function buildIntegrationDoctorChecks(results) {
|
|
|
1448
1465
|
}
|
|
1449
1466
|
|
|
1450
1467
|
// ../integrations/dist/config/read-enabled-integrations.js
|
|
1451
|
-
import { existsSync as existsSync8, readFileSync as
|
|
1452
|
-
import { join as
|
|
1468
|
+
import { existsSync as existsSync8, readFileSync as readFileSync7 } from "node:fs";
|
|
1469
|
+
import { join as join9 } from "node:path";
|
|
1453
1470
|
var CONFIG_FILENAME = "toolkit.config.json";
|
|
1454
1471
|
function readEnabledIntegrationIds(root) {
|
|
1455
|
-
const configPath =
|
|
1472
|
+
const configPath = join9(root, CONFIG_FILENAME);
|
|
1456
1473
|
if (!existsSync8(configPath)) {
|
|
1457
1474
|
return [];
|
|
1458
1475
|
}
|
|
1459
1476
|
try {
|
|
1460
|
-
const parsed = JSON.parse(
|
|
1477
|
+
const parsed = JSON.parse(readFileSync7(configPath, "utf8"));
|
|
1461
1478
|
const enabled = parsed?.integrations?.enabled;
|
|
1462
1479
|
return Array.isArray(enabled) && enabled.every((id) => typeof id === "string") ? enabled : [];
|
|
1463
1480
|
} catch {
|
|
@@ -1519,7 +1536,14 @@ async function applyLiveVerification(driftResults, ctx) {
|
|
|
1519
1536
|
import { getProjects, joinPathFragments } from "@nx/devkit";
|
|
1520
1537
|
function doctorProjects(tree) {
|
|
1521
1538
|
try {
|
|
1522
|
-
|
|
1539
|
+
const backendTag = readBoundaryTags(readToolkitConfig(tree)).backend;
|
|
1540
|
+
return [...getProjects(tree).entries()].map(([name, config]) => ({
|
|
1541
|
+
name,
|
|
1542
|
+
root: config.root,
|
|
1543
|
+
sourceRoot: sourceRootOf(tree, config),
|
|
1544
|
+
tags: config.tags ?? [],
|
|
1545
|
+
...isEndToEnd(config.root) || isBackend(config.root, config, backendTag) ? { fsdScan: false } : {}
|
|
1546
|
+
})).sort((a, b) => a.name.localeCompare(b.name));
|
|
1523
1547
|
} catch {
|
|
1524
1548
|
return void 0;
|
|
1525
1549
|
}
|
|
@@ -1662,9 +1686,9 @@ function buildPolicySuggestion(tree, sourceRoot, current) {
|
|
|
1662
1686
|
}
|
|
1663
1687
|
|
|
1664
1688
|
// src/generators/doctor/nx-support.ts
|
|
1665
|
-
import { readFileSync as
|
|
1689
|
+
import { readFileSync as readFileSync8 } from "node:fs";
|
|
1666
1690
|
import { createRequire } from "node:module";
|
|
1667
|
-
import { join as
|
|
1691
|
+
import { join as join10 } from "node:path";
|
|
1668
1692
|
var MAJORS_EITHER_SIDE = 1;
|
|
1669
1693
|
function majorOf(version) {
|
|
1670
1694
|
const match = /^(\d+)\./.exec(version.trim());
|
|
@@ -1673,7 +1697,7 @@ function majorOf(version) {
|
|
|
1673
1697
|
function readOwnDevkitVersion() {
|
|
1674
1698
|
try {
|
|
1675
1699
|
const path = createRequire(import.meta.url).resolve("@nx/devkit/package.json");
|
|
1676
|
-
const version = JSON.parse(
|
|
1700
|
+
const version = JSON.parse(readFileSync8(path, "utf-8")).version;
|
|
1677
1701
|
return typeof version === "string" ? version : void 0;
|
|
1678
1702
|
} catch {
|
|
1679
1703
|
return void 0;
|
|
@@ -1681,7 +1705,7 @@ function readOwnDevkitVersion() {
|
|
|
1681
1705
|
}
|
|
1682
1706
|
function readInstalledNx(root) {
|
|
1683
1707
|
try {
|
|
1684
|
-
const version = JSON.parse(
|
|
1708
|
+
const version = JSON.parse(readFileSync8(join10(root, "node_modules", "nx", "package.json"), "utf-8")).version;
|
|
1685
1709
|
return typeof version === "string" ? version : void 0;
|
|
1686
1710
|
} catch {
|
|
1687
1711
|
return void 0;
|
|
@@ -3,8 +3,8 @@ 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-XZM354ZH.js";
|
|
7
|
+
import "../_chunks/chunk-LKXSS5E2.js";
|
|
8
8
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
9
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
10
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +13,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
13
|
import {
|
|
14
14
|
resolveDryRun
|
|
15
15
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
16
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
17
17
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
18
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
19
|
|
|
19
20
|
// src/generators/entity/generator.ts
|
|
20
21
|
async function entityGenerator(tree, options) {
|
|
@@ -3,8 +3,8 @@ 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-XZM354ZH.js";
|
|
7
|
+
import "../_chunks/chunk-LKXSS5E2.js";
|
|
8
8
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
9
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
10
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +13,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
13
|
import {
|
|
14
14
|
resolveDryRun
|
|
15
15
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
16
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
17
17
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
18
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
19
|
|
|
19
20
|
// src/generators/feature/generator.ts
|
|
20
21
|
async function featureGenerator(tree, options) {
|
|
@@ -3,37 +3,37 @@ import {
|
|
|
3
3
|
failedSections,
|
|
4
4
|
leftForYou,
|
|
5
5
|
renderInitReport
|
|
6
|
-
} from "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-2K4JADTK.js";
|
|
7
7
|
import {
|
|
8
8
|
recordedReview,
|
|
9
9
|
runAddReview
|
|
10
|
-
} from "../_chunks/chunk-
|
|
10
|
+
} from "../_chunks/chunk-CH5AF5S2.js";
|
|
11
11
|
import "../_chunks/chunk-ASY3CK5L.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_MAX_ROUNDS,
|
|
14
14
|
REVIEW_PROVIDERS,
|
|
15
15
|
buildReviewConfigSnippet
|
|
16
|
-
} from "../_chunks/chunk-
|
|
16
|
+
} from "../_chunks/chunk-YVISD736.js";
|
|
17
17
|
import {
|
|
18
18
|
runAddAgentRules
|
|
19
|
-
} from "../_chunks/chunk-
|
|
20
|
-
import "../_chunks/chunk-
|
|
19
|
+
} from "../_chunks/chunk-UAPIAMRL.js";
|
|
20
|
+
import "../_chunks/chunk-F5C5HUSI.js";
|
|
21
21
|
import "../_chunks/chunk-CSJZ4PP3.js";
|
|
22
22
|
import "../_chunks/chunk-5MI3O4VZ.js";
|
|
23
23
|
import {
|
|
24
24
|
runAddBackend
|
|
25
|
-
} from "../_chunks/chunk-
|
|
25
|
+
} from "../_chunks/chunk-WD2HL2RE.js";
|
|
26
26
|
import "../_chunks/chunk-SHKQSTV2.js";
|
|
27
27
|
import "../_chunks/chunk-WNO3ZGBB.js";
|
|
28
28
|
import {
|
|
29
29
|
DEFAULT_CONFLICT_POLICY,
|
|
30
30
|
runAddFsdLite
|
|
31
|
-
} from "../_chunks/chunk-
|
|
31
|
+
} from "../_chunks/chunk-D7J7HTND.js";
|
|
32
32
|
import "../_chunks/chunk-AMOOSD5Q.js";
|
|
33
33
|
import "../_chunks/chunk-XXXON43Z.js";
|
|
34
34
|
import {
|
|
35
35
|
resolveFrontendApp
|
|
36
|
-
} from "../_chunks/chunk-
|
|
36
|
+
} from "../_chunks/chunk-LKXSS5E2.js";
|
|
37
37
|
import {
|
|
38
38
|
allFrameworkProfiles
|
|
39
39
|
} from "../_chunks/chunk-YEMQFSL6.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
} from "../_chunks/chunk-6ZTIUBB2.js";
|
|
44
44
|
import {
|
|
45
45
|
runAddGithubTemplates
|
|
46
|
-
} from "../_chunks/chunk-
|
|
46
|
+
} from "../_chunks/chunk-L52OUT5T.js";
|
|
47
47
|
import "../_chunks/chunk-FZGN5NEP.js";
|
|
48
48
|
import "../_chunks/chunk-YNMLB4DL.js";
|
|
49
49
|
import "../_chunks/chunk-JPS6XKYK.js";
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
import {
|
|
54
54
|
spawnableCommand
|
|
55
55
|
} from "../_chunks/chunk-34V6HAJT.js";
|
|
56
|
-
import "../_chunks/chunk-
|
|
56
|
+
import "../_chunks/chunk-EHYC6FUR.js";
|
|
57
57
|
import {
|
|
58
58
|
DEFAULT_AI_HOSTS,
|
|
59
59
|
RECORDED_BACKENDS,
|
|
@@ -61,7 +61,6 @@ import {
|
|
|
61
61
|
RECORDED_PRESETS,
|
|
62
62
|
TOOLKIT_CONFIG_PATH,
|
|
63
63
|
applyJsonEdits,
|
|
64
|
-
messageOnlyError,
|
|
65
64
|
readToolkitConfigFile,
|
|
66
65
|
recordedChoice,
|
|
67
66
|
recordedFrontends,
|
|
@@ -70,10 +69,13 @@ import {
|
|
|
70
69
|
resolveLocaleOption,
|
|
71
70
|
reviewProviderFor,
|
|
72
71
|
treePackageManager
|
|
73
|
-
} from "../_chunks/chunk-
|
|
72
|
+
} from "../_chunks/chunk-2TQWFUMC.js";
|
|
74
73
|
import {
|
|
75
74
|
runNxCommand
|
|
76
75
|
} from "../_chunks/chunk-5Z7VZPES.js";
|
|
76
|
+
import {
|
|
77
|
+
messageOnlyError
|
|
78
|
+
} from "../_chunks/chunk-BDLK2IID.js";
|
|
77
79
|
|
|
78
80
|
// src/generators/init/generator.ts
|
|
79
81
|
import { execFileSync } from "node:child_process";
|
|
@@ -354,7 +356,7 @@ function runInit(tree, options, deps) {
|
|
|
354
356
|
},
|
|
355
357
|
// init records aiHosts below, with its other choices; the FSD section follows this run's
|
|
356
358
|
// frontend axis, the Module Boundaries section its backend axis
|
|
357
|
-
{
|
|
359
|
+
{ recordChoices: false, fsdStructure: fsdEnabled, moduleBoundaries: backend === "none" ? null : readBoundaryTags(recorded) }
|
|
358
360
|
);
|
|
359
361
|
sections.push({ id: "agentRules", enabled: true, report: { kind: "agentRules", report } });
|
|
360
362
|
} else {
|
|
@@ -414,14 +416,34 @@ function runInit(tree, options, deps) {
|
|
|
414
416
|
const anyChoiceApplied = fsdApplied || agentRulesApplied || reviewApplied;
|
|
415
417
|
const notRecorded = [];
|
|
416
418
|
if (fsdRan && !fsdApplied) {
|
|
417
|
-
notRecorded.push({ field: "fsd.enforcement", rerun: `add-fsd-lite --enforcement=${config.fsd.enforcement}` });
|
|
418
|
-
}
|
|
419
|
-
if (agentRulesRan && !agentRulesApplied) {
|
|
420
419
|
notRecorded.push({
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
fields: ["fsd.enforcement"],
|
|
421
|
+
reason: "the FSD section aborted",
|
|
422
|
+
reruns: [{ note: null, rerun: `add-fsd-lite --enforcement=${config.fsd.enforcement}` }]
|
|
423
423
|
});
|
|
424
|
-
|
|
424
|
+
}
|
|
425
|
+
if (agentRulesRan && !agentRulesApplied) {
|
|
426
|
+
const rerun = `add-agent-rules ${config.agentRules.teamRules ? "--teamRules" : "--teamRules=false"} --hosts=${config.aiHosts.join(",")}`;
|
|
427
|
+
const files = agentRulesSection?.report?.kind === "agentRules" ? agentRulesSection.report.report.files : [];
|
|
428
|
+
const named = (action) => files.filter((file) => file.action === action).map((file) => file.filePath).join(", ");
|
|
429
|
+
const unplaced = named("unrecognized");
|
|
430
|
+
notRecorded.push(
|
|
431
|
+
unplaced !== "" ? {
|
|
432
|
+
fields: ["agentRules.teamRules", "aiHosts"],
|
|
433
|
+
reason: `the agent rules markers in ${unplaced} could not be placed`,
|
|
434
|
+
reruns: [{ note: "fix the markers, then", rerun }]
|
|
435
|
+
} : (
|
|
436
|
+
// A kept edit: matching the block first keeps the user's work, so it comes first.
|
|
437
|
+
{
|
|
438
|
+
fields: ["agentRules.teamRules", "aiHosts"],
|
|
439
|
+
reason: `the agent rules block in ${named("user-modified")} was edited by hand and kept`,
|
|
440
|
+
reruns: [
|
|
441
|
+
{ note: "make the block match the generated one, then", rerun },
|
|
442
|
+
{ note: "or replace the block (your edits to it are lost)", rerun: `${rerun} --overwriteBlock` }
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
)
|
|
446
|
+
);
|
|
425
447
|
}
|
|
426
448
|
const lintInputs = fsdApplied ? applyLintInputs(tree, {
|
|
427
449
|
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-EHYC6FUR.js";
|
|
22
|
+
import "../_chunks/chunk-2TQWFUMC.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,8 @@ 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-XZM354ZH.js";
|
|
7
|
+
import "../_chunks/chunk-LKXSS5E2.js";
|
|
8
8
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
9
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
10
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +13,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
13
|
import {
|
|
14
14
|
resolveDryRun
|
|
15
15
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
16
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
17
17
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
18
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
19
|
|
|
19
20
|
// src/generators/page/generator.ts
|
|
20
21
|
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,8 @@ 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-XZM354ZH.js";
|
|
7
|
+
import "../_chunks/chunk-LKXSS5E2.js";
|
|
8
8
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
9
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
10
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +13,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
13
|
import {
|
|
14
14
|
resolveDryRun
|
|
15
15
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
16
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
17
17
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
18
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
19
|
|
|
19
20
|
// src/generators/shared/generator.ts
|
|
20
21
|
async function sharedGenerator(tree, options) {
|
|
@@ -3,8 +3,8 @@ 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-XZM354ZH.js";
|
|
7
|
+
import "../_chunks/chunk-LKXSS5E2.js";
|
|
8
8
|
import "../_chunks/chunk-YEMQFSL6.js";
|
|
9
9
|
import "../_chunks/chunk-TXAQ2GJC.js";
|
|
10
10
|
import "../_chunks/chunk-6ZTIUBB2.js";
|
|
@@ -13,8 +13,9 @@ import "../_chunks/chunk-JPS6XKYK.js";
|
|
|
13
13
|
import {
|
|
14
14
|
resolveDryRun
|
|
15
15
|
} from "../_chunks/chunk-TUN34LAQ.js";
|
|
16
|
-
import "../_chunks/chunk-
|
|
16
|
+
import "../_chunks/chunk-2TQWFUMC.js";
|
|
17
17
|
import "../_chunks/chunk-5Z7VZPES.js";
|
|
18
|
+
import "../_chunks/chunk-BDLK2IID.js";
|
|
18
19
|
|
|
19
20
|
// src/generators/widget/generator.ts
|
|
20
21
|
async function widgetGenerator(tree, options) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyLintInputs,
|
|
3
3
|
renderLintInputs
|
|
4
|
-
} from "../../generators/_chunks/chunk-
|
|
5
|
-
import "../../generators/_chunks/chunk-
|
|
4
|
+
} from "../../generators/_chunks/chunk-2K4JADTK.js";
|
|
5
|
+
import "../../generators/_chunks/chunk-F5C5HUSI.js";
|
|
6
6
|
import "../../generators/_chunks/chunk-CSJZ4PP3.js";
|
|
7
7
|
import "../../generators/_chunks/chunk-SHKQSTV2.js";
|
|
8
8
|
import "../../generators/_chunks/chunk-AMOOSD5Q.js";
|
|
@@ -18,10 +18,11 @@ import "../../generators/_chunks/chunk-JPS6XKYK.js";
|
|
|
18
18
|
import {
|
|
19
19
|
readToolkitConfig,
|
|
20
20
|
treePackageManager
|
|
21
|
-
} from "../../generators/_chunks/chunk-
|
|
21
|
+
} from "../../generators/_chunks/chunk-2TQWFUMC.js";
|
|
22
22
|
import {
|
|
23
23
|
runNxCommand
|
|
24
24
|
} from "../../generators/_chunks/chunk-5Z7VZPES.js";
|
|
25
|
+
import "../../generators/_chunks/chunk-BDLK2IID.js";
|
|
25
26
|
|
|
26
27
|
// src/migrations/update-0.5.3/add-toolkit-config-lint-input.ts
|
|
27
28
|
import { getProjects } from "@nx/devkit";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clearlydev/nx-archweave",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
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",
|