@clearlydev/nx-archweave 0.5.3 → 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-ZFCK3KMO.js → chunk-2K4JADTK.js} +11 -10
- 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-OEEWCZCO.js → chunk-CH5AF5S2.js} +15 -8
- package/dist/generators/_chunks/{chunk-WQDJYSOD.js → chunk-CSJZ4PP3.js} +10 -1
- 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-VI7U5HS5.js → chunk-UAPIAMRL.js} +10 -8
- 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 +5 -4
- 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 +5 -4
- 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 +44 -21
- 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 +5 -4
- package/package.json +7 -2
- package/src/generators/add-agent-rules/schema.json +2 -2
- package/src/generators/add-review/schema.json +4 -0
- package/src/generators/init/schema.json +4 -0
|
@@ -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,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderAddAgentRulesReport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F5C5HUSI.js";
|
|
4
4
|
import {
|
|
5
5
|
renderAddReviewReport
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CSJZ4PP3.js";
|
|
7
7
|
import {
|
|
8
8
|
renderAddBackendBody
|
|
9
9
|
} from "./chunk-SHKQSTV2.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,12 +1,12 @@
|
|
|
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,
|
|
8
8
|
renderLineDiff
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CSJZ4PP3.js";
|
|
10
10
|
import {
|
|
11
11
|
generatorFilesDir,
|
|
12
12
|
renderTemplateFiles
|
|
@@ -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";
|
|
@@ -64,7 +64,8 @@ function recordedReview(config) {
|
|
|
64
64
|
return {
|
|
65
65
|
provider: pick(record["provider"], PROVIDERS),
|
|
66
66
|
mode: pick(record["mode"], MODES),
|
|
67
|
-
maxRounds: rounds === 1 || rounds === 2 || rounds === 3 || rounds === 4 || rounds === 5 ? rounds : void 0
|
|
67
|
+
maxRounds: rounds === 1 || rounds === 2 || rounds === 3 || rounds === 4 || rounds === 5 ? rounds : void 0,
|
|
68
|
+
...record["dependabot"] === false ? { dependabot: false } : {}
|
|
68
69
|
};
|
|
69
70
|
}
|
|
70
71
|
function runAddReview(tree, options) {
|
|
@@ -139,21 +140,23 @@ function runAddReview(tree, options) {
|
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
let configAction;
|
|
143
|
+
const dependabotOn = options.dependabot ?? recordedReview(config.parsed).dependabot !== false;
|
|
144
|
+
const reviewConfig = dependabotOn ? plan.configSnippet : { ...plan.configSnippet, dependabot: false };
|
|
142
145
|
let newConfigContent = null;
|
|
143
146
|
if (!mainFileMatchesOptions) {
|
|
144
147
|
configAction = "not-updated";
|
|
145
148
|
} else {
|
|
146
149
|
const existingReview = config.parsed?.["review"];
|
|
147
|
-
if (deepEqual(existingReview,
|
|
150
|
+
if (deepEqual(existingReview, reviewConfig)) {
|
|
148
151
|
configAction = "unchanged";
|
|
149
152
|
} else {
|
|
150
153
|
configAction = config.raw === null ? "created" : "updated";
|
|
151
|
-
newConfigContent = applyJsonEdits(config.raw, [[["review"],
|
|
154
|
+
newConfigContent = applyJsonEdits(config.raw, [[["review"], reviewConfig]]);
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
157
|
const [dependabotFile] = renderTemplateFiles(generatorFilesDir("add-review", import.meta.url), ".github", {});
|
|
155
158
|
const existingDependabot = tree.read(DEPENDABOT_PATH, "utf-8");
|
|
156
|
-
const dependabot = existingDependabot !== null ? /github-actions/.test(existingDependabot) ? "present" : "proposed" : writeWorkflowTo !== null ? "created" : "withheld";
|
|
159
|
+
const dependabot = existingDependabot !== null ? /github-actions/.test(existingDependabot) ? "present" : dependabotOn ? "proposed" : "off" : !dependabotOn ? "off" : writeWorkflowTo !== null || options.dependabot === true && workflowAction === "unchanged" ? "created" : "withheld";
|
|
157
160
|
const dryRun = options.dryRun ?? false;
|
|
158
161
|
if (!dryRun) {
|
|
159
162
|
if (writeWorkflowTo !== null) tree.write(writeWorkflowTo, plan.workflowYaml);
|
|
@@ -168,10 +171,14 @@ function runAddReview(tree, options) {
|
|
|
168
171
|
requiredSecretName: plan.requiredSecretName,
|
|
169
172
|
diff,
|
|
170
173
|
workflowYaml: dryRun ? plan.workflowYaml : null,
|
|
171
|
-
configSnippetJson: dryRun ? JSON.stringify(
|
|
174
|
+
configSnippetJson: dryRun ? JSON.stringify(reviewConfig, null, 2) : null,
|
|
172
175
|
configError: null,
|
|
173
176
|
dependabot,
|
|
174
177
|
dependabotProposal: dependabot === "proposed" || dependabot === "withheld" ? dependabotFile.content : null,
|
|
178
|
+
...dependabot === "off" ? { dependabotOff: options.dependabot === false ? "option" : "recorded" } : {},
|
|
179
|
+
// An explicit --dependabot goes with the review config, which a run that leaves the main
|
|
180
|
+
// workflow alone doesn't touch: say the option wasn't applied.
|
|
181
|
+
...options.dependabot !== void 0 && !mainFileMatchesOptions ? { dependabotNotApplied: options.dependabot } : {},
|
|
175
182
|
...packageManagerNote !== void 0 ? { packageManagerNote } : {},
|
|
176
183
|
reviewProvider: provider
|
|
177
184
|
};
|
|
@@ -88,7 +88,7 @@ function renderAddReviewReport(report) {
|
|
|
88
88
|
}
|
|
89
89
|
if (report.dependabot === "created") {
|
|
90
90
|
lines.push(` ${DEPENDABOT_PATH}: created \u2014 Dependabot proposes newer pins for the workflow's actions`);
|
|
91
|
-
lines.push(" Delete this file if you don't want those pull requests.");
|
|
91
|
+
lines.push(" Delete this file and pass --dependabot=false from then on if you don't want those pull requests.");
|
|
92
92
|
} else if (report.dependabot === "present") {
|
|
93
93
|
lines.push(` ${DEPENDABOT_PATH}: already updates github-actions`);
|
|
94
94
|
} else if (report.dependabot === "proposed") {
|
|
@@ -96,12 +96,21 @@ function renderAddReviewReport(report) {
|
|
|
96
96
|
lines.push(" to a commit SHA; add this entry under `updates:` so those pins get update pull requests:");
|
|
97
97
|
lines.push("");
|
|
98
98
|
lines.push(report.dependabotProposal ?? "");
|
|
99
|
+
} else if (report.dependabot === "off") {
|
|
100
|
+
lines.push(
|
|
101
|
+
report.dependabotOff === "recorded" ? ` ${DEPENDABOT_PATH}: not created \u2014 review.dependabot is false in toolkit.config.json (--dependabot=true turns it on)` : ` ${DEPENDABOT_PATH}: not created \u2014 Dependabot updates are off (--dependabot=false)`
|
|
102
|
+
);
|
|
99
103
|
} else if (report.dependabot === "withheld") {
|
|
100
104
|
lines.push(` ${DEPENDABOT_PATH}: not created \u2014 the workflow wasn't written this run. To get update pull requests`);
|
|
101
105
|
lines.push(" for its pinned actions, add this file:");
|
|
102
106
|
lines.push("");
|
|
103
107
|
lines.push(report.dependabotProposal ?? "");
|
|
104
108
|
}
|
|
109
|
+
if (report.dependabotNotApplied !== void 0) {
|
|
110
|
+
lines.push(
|
|
111
|
+
report.workflowAction === "alternate" ? ` --dependabot=${report.dependabotNotApplied} was not recorded because the workflow was written under another name; toolkit.config.json keeps its review settings.` : ` --dependabot=${report.dependabotNotApplied} was not applied because the workflow ${report.workflowAction === "skipped" ? "was skipped" : "was only proposed"}; toolkit.config.json keeps its review settings.`
|
|
112
|
+
);
|
|
113
|
+
}
|
|
105
114
|
if (report.workflowAction === "alternate") {
|
|
106
115
|
lines.push("");
|
|
107
116
|
lines.push(" Review the generated file, then replace the main workflow file with it yourself;");
|
|
@@ -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,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderAddAgentRulesReport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F5C5HUSI.js";
|
|
4
4
|
import {
|
|
5
5
|
renderLineDiff
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CSJZ4PP3.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveFsdPolicy
|
|
9
9
|
} from "./chunk-5MI3O4VZ.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-
|
|
7
|
-
import "../_chunks/chunk-
|
|
5
|
+
} from "../_chunks/chunk-UAPIAMRL.js";
|
|
6
|
+
import "../_chunks/chunk-F5C5HUSI.js";
|
|
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-
|
|
8
|
-
import "../_chunks/chunk-
|
|
6
|
+
} from "../_chunks/chunk-CH5AF5S2.js";
|
|
7
|
+
import "../_chunks/chunk-YVISD736.js";
|
|
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
|
}
|