@clearlydev/nx-archweave 0.4.5 → 0.5.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.
Files changed (32) hide show
  1. package/README.md +13 -13
  2. package/dist/bin/review-verdict.js +1 -1
  3. package/dist/generators/_chunks/{chunk-EGVFXXPE.js → chunk-2WXAGWAJ.js} +14 -14
  4. package/dist/generators/_chunks/{chunk-FNSOLEVB.js → chunk-3ZHRZK5M.js} +1 -1
  5. package/dist/generators/_chunks/{chunk-FQHFT5IH.js → chunk-5Z7VZPES.js} +8 -1
  6. package/dist/generators/_chunks/{chunk-LRJVAOZ2.js → chunk-624F6DEP.js} +10 -5
  7. package/dist/generators/_chunks/{chunk-FKABQJTB.js → chunk-ERCX7F6K.js} +2 -2
  8. package/dist/generators/_chunks/{chunk-GPZEZVPN.js → chunk-ILICA6LC.js} +5 -4
  9. package/dist/generators/_chunks/{chunk-AFAORV5O.js → chunk-M7OQWSNF.js} +1 -1
  10. package/dist/generators/_chunks/{chunk-L2RZ2LBO.js → chunk-N6B6VBHG.js} +32 -8
  11. package/dist/generators/_chunks/{chunk-KXPL6AJW.js → chunk-Q7IYHKT3.js} +2 -2
  12. package/dist/generators/_chunks/{chunk-SKM3CM5G.js → chunk-TJ6SCQLI.js} +17 -9
  13. package/dist/generators/_chunks/{chunk-B55SAIUS.js → chunk-WVMTOWLM.js} +1 -1
  14. package/dist/generators/_chunks/{chunk-XSXOQ2EE.js → chunk-ZNTGYYLU.js} +6 -5
  15. package/dist/generators/add-agent-rules/generator.js +3 -3
  16. package/dist/generators/add-backend/generator.js +3 -3
  17. package/dist/generators/add-fsd-lite/generator.js +6 -5
  18. package/dist/generators/add-github-templates/generator.js +3 -3
  19. package/dist/generators/add-integration/generator.js +5 -5
  20. package/dist/generators/add-review/generator.js +4 -4
  21. package/dist/generators/allow-builds/generator.js +1 -1
  22. package/dist/generators/doctor/generator.js +233 -29
  23. package/dist/generators/entity/generator.js +4 -4
  24. package/dist/generators/feature/generator.js +4 -4
  25. package/dist/generators/init/generator.js +303 -61
  26. package/dist/generators/install-integration/generator.js +5 -5
  27. package/dist/generators/page/generator.js +4 -4
  28. package/dist/generators/shared/generator.js +4 -4
  29. package/dist/generators/widget/generator.js +4 -4
  30. package/package.json +1 -1
  31. package/src/generators/add-fsd-lite/schema.json +1 -1
  32. package/src/generators/init/schema.json +3 -3
package/README.md CHANGED
@@ -44,20 +44,20 @@ bun nx g @clearlydev/nx-archweave:doctor # bun
44
44
  Preview the full run first. This writes nothing:
45
45
 
46
46
  ```bash
47
- pnpm nx g @clearlydev/nx-archweave:init --preset=solo --frontend=next --review=false --applyEslint --dryRun
47
+ pnpm nx g @clearlydev/nx-archweave:init --preset=quick-start --frontend=next --applyEslint --dryRun
48
48
  ```
49
49
 
50
50
  Then run it for real:
51
51
 
52
52
  ```bash
53
- pnpm nx g @clearlydev/nx-archweave:init --preset=solo --frontend=next --review=false --applyEslint
53
+ pnpm nx g @clearlydev/nx-archweave:init --preset=quick-start --frontend=next --applyEslint
54
54
  ```
55
55
 
56
- - This sets up the `solo` preset (the FSD rule as `warn`, agent rules, a PR template) without AI review.
56
+ - This sets up the `quick-start` preset (the FSD rule as `warn`, agent rules, a PR template) without AI review.
57
57
  - `--applyEslint` writes the FSD rule into the app's `eslint.config.mjs`. Without it, `init` leaves your ESLint config alone and prints the two lines to paste, so the rule isn't on until you add them. `--preset=team` is for a team repository: the FSD rule as `error`, issue templates, and AI review on (see [Presets](#presets)).
58
58
  - Only the FSD rule: add `--agentRules=false --githubTemplates=false --review=false`.
59
59
 
60
- - `init` runs the content generators below according to the preset (`quick-start` | `solo` | `team`).
60
+ - `init` runs the content generators below according to the preset (`quick-start` | `team`; `solo` is an alias of `quick-start`).
61
61
  - `init` requires a clean git working tree, so a partial run can be undone exactly: the report lists the files it modified (`git restore -- …`) and the files it created.
62
62
  - `--allowDirty` opts out of the clean-tree check. The report then warns you that the rollback scope is wider.
63
63
  - `--locale=ko|en` sets the language of generated content. Reports are always in English.
@@ -200,16 +200,16 @@ Options: `--packages`\*, `--apply`
200
200
 
201
201
  ## Presets
202
202
 
203
- | | `quick-start` | `solo` | `team` |
204
- | --- | --- | --- | --- |
205
- | FSD Lite | on | on | on |
206
- | FSD rule severity | `warn` | `warn` | `error` |
207
- | Agent rules | the AI hosts' files | the AI hosts' files | the AI hosts' files + Team Rules section |
208
- | GitHub templates | PR only | PR only | Issue + PR |
209
- | Review default | off (opt-in) | on | on |
210
- | Review mode | `fast` | `fast` | `standard` |
203
+ | | `quick-start` | `team` |
204
+ | --- | --- | --- |
205
+ | FSD Lite | on | on |
206
+ | FSD rule severity | `warn` | `error` |
207
+ | Agent rules | the AI hosts' files | the AI hosts' files + Team Rules section |
208
+ | GitHub templates | PR only | Issue + PR |
209
+ | Review default | off (opt-in) | on |
210
+ | Review mode | `fast` | `standard` |
211
211
 
212
- Explicit flags always win over preset defaults. create-nx-archweave passes `--review=false` for `quick-start` and `solo` unless you pass `--review`, so from the CLI only `team` starts with review on.
212
+ Explicit flags always win over preset defaults. `solo` is an alias of `quick-start`: it still works and gets quick-start's defaults. Turning review off never removes a review workflow a workspace already has; update it with `add-review`.
213
213
 
214
214
  ## AI PR review (optional)
215
215
 
@@ -4,7 +4,7 @@ import {
4
4
  REVIEW_WORKFLOW_CONTRACT,
5
5
  VERDICT_MARKER,
6
6
  runVerdictGate
7
- } from "../generators/_chunks/chunk-EGVFXXPE.js";
7
+ } from "../generators/_chunks/chunk-2WXAGWAJ.js";
8
8
  import "../generators/_chunks/chunk-JPS6XKYK.js";
9
9
 
10
10
  // src/bin/review-verdict.ts
@@ -471,9 +471,9 @@ var ACTION_PINS = {
471
471
  "actions/setup-node": "actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0",
472
472
  "pnpm/action-setup": "pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0",
473
473
  "oven-sh/setup-bun": "oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0",
474
- "anthropics/claude-code-action": "anthropics/claude-code-action@4fa93a88de49bbef68b10eb15aabedf28ca0e1ed # v1.0.271",
474
+ "anthropics/claude-code-action": "anthropics/claude-code-action@4411a9e9b0283becf4b924f7bce360fd7756c78c # v1.0.290",
475
475
  "google-github-actions/run-gemini-cli": "google-github-actions/run-gemini-cli@f77273f4c914e4bf38440cf36a0369cb64a37489 # v0.1.22",
476
- "openai/codex-action": "openai/codex-action@bdf19a4a223ec2549a3e2274a0cf61556bc07675 # v1.13"
476
+ "openai/codex-action": "openai/codex-action@306c6a196a99dcc6582530c396a19d2672d5e9ec # v1.14"
477
477
  };
478
478
  function pinnedUses(action) {
479
479
  return ACTION_PINS[action];
@@ -897,18 +897,6 @@ function renderReviewWorkflow(input, parts) {
897
897
  ].join("\n");
898
898
  }
899
899
 
900
- // ../template-engine/dist/review/config-snippet.js
901
- function buildReviewConfigSnippet(input) {
902
- return {
903
- enabled: true,
904
- provider: input.provider,
905
- mode: input.mode,
906
- locale: input.locale,
907
- maxRounds: input.maxRounds,
908
- blockingPriorities: ["P0", "P1"]
909
- };
910
- }
911
-
912
900
  // ../template-engine/dist/review/claude/claude-provider.js
913
901
  var SECRET_NAME = "CLAUDE_CODE_OAUTH_TOKEN";
914
902
  var ALLOWED_TOOLS = "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment ${{ github.event.pull_request.number }} --body-file -),Bash(gh pr diff:*),Bash(gh pr view:*)";
@@ -1239,6 +1227,18 @@ var REVIEW_PROVIDERS = {
1239
1227
  cursor: cursorProvider
1240
1228
  };
1241
1229
 
1230
+ // ../template-engine/dist/review/config-snippet.js
1231
+ function buildReviewConfigSnippet(input) {
1232
+ return {
1233
+ enabled: true,
1234
+ provider: input.provider,
1235
+ mode: input.mode,
1236
+ locale: input.locale,
1237
+ maxRounds: input.maxRounds,
1238
+ blockingPriorities: ["P0", "P1"]
1239
+ };
1240
+ }
1241
+
1242
1242
  // ../template-engine/dist/review/compose-review-setup.js
1243
1243
  function composeReviewSetup(input) {
1244
1244
  if (!input.enabled)
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  readToolkitConfig,
13
13
  resolveLocaleOption
14
- } from "./chunk-AFAORV5O.js";
14
+ } from "./chunk-M7OQWSNF.js";
15
15
 
16
16
  // src/generators/add-github-templates/generator.ts
17
17
  import { join } from "node:path";
@@ -42,9 +42,16 @@ function packageManagerCommands(pm, flavor = "classic") {
42
42
  return { addDevAtRoot: (spec) => `npm install -D ${spec}`, addAtRoot: (spec) => `npm install ${spec}`, runNx: "npm exec nx --", install: "npm install", workspaceRegistration: "package.json workspaces" };
43
43
  }
44
44
  }
45
+ var UNKNOWN_PM_RUN_NX = "npx nx";
46
+ function runNxCommand(pm) {
47
+ return pm === null || pm === void 0 ? UNKNOWN_PM_RUN_NX : packageManagerCommands(pm).runNx;
48
+ }
49
+ var INSTALL_ASSUMES_PNPM = "install commands assume pnpm; use your package manager's form";
45
50
 
46
51
  export {
47
52
  detectWorkspacePackageManager,
48
53
  detectYarnFlavor,
49
- packageManagerCommands
54
+ packageManagerCommands,
55
+ runNxCommand,
56
+ INSTALL_ASSUMES_PNPM
50
57
  };
@@ -24,11 +24,13 @@ import {
24
24
  readToolkitConfigFile,
25
25
  setJsonValue,
26
26
  treePackageManager
27
- } from "./chunk-AFAORV5O.js";
27
+ } from "./chunk-M7OQWSNF.js";
28
28
  import {
29
+ INSTALL_ASSUMES_PNPM,
29
30
  detectYarnFlavor,
30
- packageManagerCommands
31
- } from "./chunk-FQHFT5IH.js";
31
+ packageManagerCommands,
32
+ runNxCommand
33
+ } from "./chunk-5Z7VZPES.js";
32
34
 
33
35
  // src/generators/add-backend/generator.ts
34
36
  import { getProjects } from "@nx/devkit";
@@ -66,6 +68,7 @@ function renderAddBackendBody(report) {
66
68
  lines.push(" then re-run add-backend to wire it up:");
67
69
  lines.push("");
68
70
  for (const command of report.commands ?? []) lines.push(` ${command}`);
71
+ if (report.packageManagerNote !== void 0) lines.push(` note: ${report.packageManagerNote}`);
69
72
  if (report.expressRange !== void 0) {
70
73
  lines.push("");
71
74
  lines.push(` The express line declares express@${report.expressRange}, the range this workspace's @nx/react supports \u2014`);
@@ -167,7 +170,8 @@ function runAddBackend(tree, options) {
167
170
  packageManager,
168
171
  packageManager === "yarn" ? detectYarnFlavor((p) => tree.exists(p), (p) => tree.read(p, "utf-8")) : void 0
169
172
  );
170
- const packageManagerNote = detectedPm === null ? "the package manager could not be detected (no pnpm, yarn, bun or npm markers) \u2014 commands below assume pnpm." : void 0;
173
+ const runNx = runNxCommand(detectedPm);
174
+ const packageManagerNote = detectedPm === null ? `the package manager could not be detected (no pnpm, yarn, bun or npm markers) \u2014 nx commands use ${runNx}; ${INSTALL_ASSUMES_PNPM}.` : void 0;
171
175
  const baseNameOf = (root) => root.split("/").pop() ?? root;
172
176
  const entries = [...projects.entries()];
173
177
  const declaredApp = ([, config]) => config.projectType === "application";
@@ -222,8 +226,9 @@ function runAddBackend(tree, options) {
222
226
  commands: [
223
227
  pmCommands.addDevAtRoot(`@nx/${backend}${nxPin}`),
224
228
  ...quotedExpress ? [pmCommands.addAtRoot(quotedExpress)] : [],
225
- `${pmCommands.runNx} g @nx/${backend}:application ${apiDirectory} --frontendProject=${frontendProject}`
229
+ `${runNx} g @nx/${backend}:application ${apiDirectory} --frontendProject=${frontendProject}`
226
230
  ],
231
+ ...packageManagerNote !== void 0 ? { packageManagerNote } : {},
227
232
  ...refusalShape
228
233
  };
229
234
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  composeReviewSetup,
3
3
  judgeReviewFileConflict
4
- } from "./chunk-EGVFXXPE.js";
4
+ } from "./chunk-2WXAGWAJ.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-AFAORV5O.js";
20
+ } from "./chunk-M7OQWSNF.js";
21
21
 
22
22
  // src/generators/add-review/generator.ts
23
23
  var CONFIG_PATH = "toolkit.config.json";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  TOOLKIT_CONFIG_PATH,
3
3
  workspacePackageManager
4
- } from "./chunk-AFAORV5O.js";
4
+ } from "./chunk-M7OQWSNF.js";
5
5
  import {
6
- packageManagerCommands
7
- } from "./chunk-FQHFT5IH.js";
6
+ runNxCommand
7
+ } from "./chunk-5Z7VZPES.js";
8
8
 
9
9
  // src/generators/shared/run-nx.ts
10
10
  import { existsSync, readFileSync } from "node:fs";
@@ -16,7 +16,7 @@ function runNxFor(exists, read) {
16
16
  if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) config = parsed;
17
17
  } catch {
18
18
  }
19
- return packageManagerCommands(workspacePackageManager(exists, read, config) ?? "pnpm").runNx;
19
+ return runNxCommand(workspacePackageManager(exists, read, config));
20
20
  }
21
21
  function diskRunNx(root) {
22
22
  return runNxFor(
@@ -26,5 +26,6 @@ function diskRunNx(root) {
26
26
  }
27
27
 
28
28
  export {
29
+ runNxFor,
29
30
  diskRunNx
30
31
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  detectWorkspacePackageManager
3
- } from "./chunk-FQHFT5IH.js";
3
+ } from "./chunk-5Z7VZPES.js";
4
4
 
5
5
  // ../template-engine/dist/ai-hosts/ai-hosts.js
6
6
  var AI_HOSTS = [
@@ -37,20 +37,20 @@ var LAYER_GUIDE_KO = {
37
37
  entities: "\uBE44\uC988\uB2C8\uC2A4 \uAC1D\uCCB4 \uD558\uB098\uB2F9 \uC2AC\uB77C\uC774\uC2A4 \uD558\uB098 (user, product)",
38
38
  shared: "\uC2AC\uB77C\uC774\uC2A4\uAC00 \uC544\uB2C8\uB77C \uC138\uADF8\uBA3C\uD2B8: ui, api, lib, model, config \u2014 \uBAA9\uC801\uC73C\uB85C \uC774\uB984 \uC9D3\uAE30"
39
39
  };
40
- function buildFsdLayerGuide({ layers, directories, sourceRoot, locale }) {
40
+ function buildFsdLayerGuide({ layers, directories, sourceRoot, locale, runNx = "nx" }) {
41
41
  const guide = locale === "ko" ? LAYER_GUIDE_KO : LAYER_GUIDE_EN;
42
42
  const width = Math.max(...directories.map((d) => d.length));
43
43
  const rows = layers.map((layer, index) => ` ${sourceRoot}/${directories[index].padEnd(width)} ${guide[layer] ?? ""}`);
44
44
  const footer = locale === "ko" ? [
45
45
  "\uB808\uC774\uC5B4 \uD3F4\uB354\uB294 \uCCAB \uC2AC\uB77C\uC774\uC2A4\uAC00 \uC0DD\uAE38 \uB54C \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4 (\uC815\uC2DD FSD):",
46
- " nx g @clearlydev/nx-archweave:feature --name=<name> (page, entity, shared\uB3C4 \uAC19\uC740 \uBC29\uC2DD; --segments=ui,api)",
47
- " widgets/ \uB808\uC774\uC5B4\uB294 \uAE30\uBCF8 \uBC94\uC704 \uBC16\uC774\uC9C0\uB9CC nx g @clearlydev/nx-archweave:widget \uC73C\uB85C \uC4F8 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
46
+ ` ${runNx} g @clearlydev/nx-archweave:feature --name=<name> (page, entity, shared\uB3C4 \uAC19\uC740 \uBC29\uC2DD; --segments=ui,api)`,
47
+ ` widgets/ \uB808\uC774\uC5B4\uB294 \uAE30\uBCF8 \uBC94\uC704 \uBC16\uC774\uC9C0\uB9CC ${runNx} g @clearlydev/nx-archweave:widget \uC73C\uB85C \uC4F8 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,
48
48
  "\uC704\uC5D0\uC11C \uC544\uB798\uB85C\uB9CC import\uD560 \uC218 \uC788\uACE0, \uAC19\uC740 \uB808\uC774\uC5B4\uC758 \uC2AC\uB77C\uC774\uC2A4\uB07C\uB9AC\uB294 import\uD558\uC9C0 \uC54A\uC73C\uBA70, \uC2AC\uB77C\uC774\uC2A4\uB294",
49
49
  "index.ts\uB97C \uD1B5\uD574\uC11C\uB9CC import\uD569\uB2C8\uB2E4 \u2014 archweave/fsd-boundaries ESLint \uADDC\uCE59\uC774 \uC704\uBC18\uC744 \uC54C\uB824 \uC90D\uB2C8\uB2E4."
50
50
  ] : [
51
51
  "Layer directories appear with their first slice (canonical FSD):",
52
- " nx g @clearlydev/nx-archweave:feature --name=<name> (page, entity and shared work the same way; --segments=ui,api)",
53
- " widgets/ is outside the default scope but one command away: nx g @clearlydev/nx-archweave:widget",
52
+ ` ${runNx} g @clearlydev/nx-archweave:feature --name=<name> (page, entity and shared work the same way; --segments=ui,api)`,
53
+ ` widgets/ is outside the default scope but one command away: ${runNx} g @clearlydev/nx-archweave:widget`,
54
54
  "Imports go downward only, slices on one layer never import each other, and a slice is",
55
55
  "imported through its index.ts \u2014 the archweave/fsd-boundaries ESLint rule reports violations."
56
56
  ];
@@ -119,14 +119,38 @@ function applyFsdEslintConfig(configText, severity, root = "src", framework = {}
119
119
  function buildFsdEslintPasteSnippet(severity, locale, root = "src", framework = {}) {
120
120
  return buildFsdEslintSnippet({ severity, locale, root, framework });
121
121
  }
122
- function composeFsdLayerGuide({ profile, sourceRoot, locale }) {
122
+ function composeFsdLayerGuide({ profile, sourceRoot, locale, runNx }) {
123
123
  const layers = [...profile.layers];
124
- return buildFsdLayerGuide({ layers, directories: layers.map((layer) => profile.layerDirs[layer] ?? layer), sourceRoot, locale });
124
+ return buildFsdLayerGuide({ layers, directories: layers.map((layer) => profile.layerDirs[layer] ?? layer), sourceRoot, locale, runNx });
125
+ }
126
+
127
+ // ../template-engine/dist/fsd/lint-cache-inputs.js
128
+ var TOOLKIT_CONFIG_INPUT = "{workspaceRoot}/toolkit.config.json";
129
+ function lintInputsTargetDefaultsSnippet(target) {
130
+ return [
131
+ "Add to nx.json:",
132
+ ` "targetDefaults": { "${target}": { "inputs": ["...", "${TOOLKIT_CONFIG_INPUT}"] } }`,
133
+ 'Keep "...": it stands for the inputs @nx/eslint/plugin infers (the sources, the ESLint config). Without it',
134
+ "they are dropped, and lint is served from the cache after a source change."
135
+ ];
136
+ }
137
+ function lintInputsProjectSnippet(input) {
138
+ if (input.ownInputs)
139
+ return [`Add "${TOOLKIT_CONFIG_INPUT}" to the inputs of the ${input.target} target in ${input.file}.`];
140
+ const inputs = ['"default"', '"^default"', ...input.eslintConfigs.map((name) => `"${name}"`), `"${TOOLKIT_CONFIG_INPUT}"`, '{ "externalDependencies": ["eslint"] }'];
141
+ return [
142
+ `Add to the ${input.target} target in ${input.file} (not to targetDefaults: a lint target written in a project file`,
143
+ "keeps only what targetDefaults lists, so its own files would drop out):",
144
+ ` "inputs": [${inputs.join(", ")}]`
145
+ ];
125
146
  }
126
147
 
127
148
  export {
128
149
  classifyFsdEslintConfig,
129
150
  applyFsdEslintConfig,
130
151
  buildFsdEslintPasteSnippet,
131
- composeFsdLayerGuide
152
+ composeFsdLayerGuide,
153
+ TOOLKIT_CONFIG_INPUT,
154
+ lintInputsTargetDefaultsSnippet,
155
+ lintInputsProjectSnippet
132
156
  };
@@ -5,7 +5,7 @@ import {
5
5
  profileById,
6
6
  resolveFrontendApp,
7
7
  resolveSlicePublicApiName
8
- } from "./chunk-B55SAIUS.js";
8
+ } from "./chunk-WVMTOWLM.js";
9
9
  import {
10
10
  generatorFilesDir,
11
11
  renderTemplateFiles
@@ -18,7 +18,7 @@ import {
18
18
  readToolkitConfig,
19
19
  recordedFrontends,
20
20
  resolveLocaleOption
21
- } from "./chunk-AFAORV5O.js";
21
+ } from "./chunk-M7OQWSNF.js";
22
22
 
23
23
  // src/generators/slice/core.ts
24
24
  import { join } from "node:path";
@@ -2,11 +2,11 @@ import {
2
2
  applyFsdEslintConfig,
3
3
  buildFsdEslintPasteSnippet,
4
4
  composeFsdLayerGuide
5
- } from "./chunk-L2RZ2LBO.js";
5
+ } from "./chunk-N6B6VBHG.js";
6
6
  import {
7
7
  profileById,
8
8
  resolveFrontendApp
9
- } from "./chunk-B55SAIUS.js";
9
+ } from "./chunk-WVMTOWLM.js";
10
10
  import {
11
11
  ESLINT_CONFIG_CANDIDATES
12
12
  } from "./chunk-6ZTIUBB2.js";
@@ -16,6 +16,9 @@ import {
16
16
  import {
17
17
  resolveDryRun
18
18
  } from "./chunk-TUN34LAQ.js";
19
+ import {
20
+ runNxFor
21
+ } from "./chunk-ILICA6LC.js";
19
22
  import {
20
23
  applyJsonEdits,
21
24
  readToolkitConfig,
@@ -23,11 +26,13 @@ import {
23
26
  resolveLocaleOption,
24
27
  setJsonValue,
25
28
  treePackageManager
26
- } from "./chunk-AFAORV5O.js";
29
+ } from "./chunk-M7OQWSNF.js";
27
30
  import {
31
+ INSTALL_ASSUMES_PNPM,
28
32
  detectYarnFlavor,
29
- packageManagerCommands
30
- } from "./chunk-FQHFT5IH.js";
33
+ packageManagerCommands,
34
+ runNxCommand
35
+ } from "./chunk-5Z7VZPES.js";
31
36
 
32
37
  // src/generators/add-fsd-lite/generator.ts
33
38
  import { posix } from "node:path";
@@ -141,7 +146,7 @@ function renderAddFsdLiteReport(report) {
141
146
  st.target === "added" ? ` target ${"fsd-check"}: added to ${st.targetPath}` : st.target === "present" ? ` target ${"fsd-check"}: already present in ${st.targetPath}` : " target fsd-check: NOT added \u2014 no parseable project.json / package.json for the app"
142
147
  );
143
148
  lines.push(
144
- st.dependencies === "added" ? ` devDependencies: steiger + @feature-sliced/steiger-plugin added to package.json \u2014 run \`${st.installCommand}\`` : st.dependencies === "present" ? " devDependencies: already present" : " devDependencies: NOT added \u2014 the root package.json could not be parsed"
149
+ st.dependencies === "added" ? ` devDependencies: steiger + @feature-sliced/steiger-plugin added to package.json \u2014 run \`${st.installCommand}\`${st.installAssumed ? ` (${INSTALL_ASSUMES_PNPM})` : ""}` : st.dependencies === "present" ? " devDependencies: already present" : " devDependencies: NOT added \u2014 the root package.json could not be parsed"
145
150
  );
146
151
  lines.push(` run it with: ${st.runCommand} (steiger needs Node >= 22.18)`);
147
152
  }
@@ -197,7 +202,7 @@ function runAddFsdLite(tree, options) {
197
202
  eslint,
198
203
  eslintPath,
199
204
  snippet: eslint === "applied" || eslint === "already-applied" ? null : snippet,
200
- layerGuide: composeFsdLayerGuide({ profile, sourceRoot: app.sourceRoot, locale })
205
+ layerGuide: composeFsdLayerGuide({ profile, sourceRoot: app.sourceRoot, locale, runNx: runNxFor((path) => tree.exists(path), (path) => tree.read(path, "utf-8")) })
201
206
  };
202
207
  }
203
208
  function readJsonObject(tree, path) {
@@ -259,7 +264,8 @@ function addSteiger(tree, input) {
259
264
  if (input.write) tree.write("package.json", edited);
260
265
  }
261
266
  }
262
- const pm = treePackageManager(tree, input.config) ?? "pnpm";
267
+ const known = treePackageManager(tree, input.config);
268
+ const pm = known ?? "pnpm";
263
269
  const commands = packageManagerCommands(pm, pm === "yarn" ? detectYarnFlavor((p) => tree.exists(p), (p) => tree.read(p, "utf-8")) : void 0);
264
270
  return {
265
271
  configPath,
@@ -268,7 +274,9 @@ function addSteiger(tree, input) {
268
274
  target: targetAction,
269
275
  dependencies: dependenciesAction,
270
276
  installCommand: commands.install,
271
- runCommand: `${commands.runNx} run <project>:${FSD_CHECK_TARGET}`
277
+ // nx runs through npx nx when the manager is unknown; the install command keeps pnpm's form
278
+ ...known === null ? { installAssumed: true } : {},
279
+ runCommand: `${runNxCommand(known)} run <project>:${FSD_CHECK_TARGET}`
272
280
  };
273
281
  }
274
282
  async function addFsdLiteGenerator(tree, options) {
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-6ZTIUBB2.js";
7
7
  import {
8
8
  readToolkitConfig
9
- } from "./chunk-AFAORV5O.js";
9
+ } from "./chunk-M7OQWSNF.js";
10
10
 
11
11
  // ../template-engine/dist/frameworks/profiles.js
12
12
  var ALL_LAYERS = ["app", "pages", "features", "entities", "shared"];
@@ -16,7 +16,7 @@ import {
16
16
  resolveAiHostsOption,
17
17
  resolveLocaleOption,
18
18
  rulesFilesFor
19
- } from "./chunk-AFAORV5O.js";
19
+ } from "./chunk-M7OQWSNF.js";
20
20
 
21
21
  // ../templates/dist/agents/agent-sections.js
22
22
  var UNIVERSAL_AGENT_SECTION_IDS = [
@@ -144,8 +144,9 @@ var EN_SECTIONS = {
144
144
  heading: "Frontend Structure (FSD Lite)",
145
145
  body: [
146
146
  'The frontend app follows canonical Feature-Sliced Design. "Lite" means only that the default scope',
147
- "is `app`, `pages`, `features`, `entities` and `shared` (`widgets` only on request) and that Solo",
148
- "workspaces get warnings instead of errors \u2014 the rules themselves are the canonical ones:",
147
+ "is `app`, `pages`, `features`, `entities` and `shared` (`widgets` only on request) and that a",
148
+ "quick-start workspace reports violations as warnings, a team one as errors \u2014 the rules themselves",
149
+ "are the canonical ones:",
149
150
  "- A layer imports only layers below it: app > pages > widgets > features > entities > shared.",
150
151
  "- Slices on one layer (pages, widgets, features, entities) never import each other; move the",
151
152
  " shared part one layer down, or expose it through the other slice's `@x/<consumer>` public API.",
@@ -275,8 +276,8 @@ var KO_SECTIONS = {
275
276
  heading: "\uD504\uB860\uD2B8\uC5D4\uB4DC \uAD6C\uC870 (FSD Lite)",
276
277
  body: [
277
278
  '\uD504\uB860\uD2B8\uC5D4\uB4DC \uC571\uC740 \uC815\uC2DD Feature-Sliced Design\uC744 \uB530\uB978\uB2E4. "Lite"\uB294 \uAE30\uBCF8 \uBC94\uC704\uAC00 `app`, `pages`, `features`,',
278
- "`entities`, `shared`\uC774\uACE0(`widgets`\uB294 \uC694\uCCAD\uD560 \uB54C\uB9CC), Solo \uC6CC\uD06C\uC2A4\uD398\uC774\uC2A4\uC5D0\uC11C\uB294 \uC704\uBC18\uC744 \uC5D0\uB7EC\uAC00 \uC544\uB2CC",
279
- "\uACBD\uACE0\uB85C \uC54C\uB9B0\uB2E4\uB294 \uB73B\uC77C \uBFD0\uC774\uB2E4 \u2014 \uADDC\uCE59 \uC790\uCCB4\uB294 \uC815\uC2DD FSD \uADF8\uB300\uB85C\uB2E4:",
279
+ "`entities`, `shared`\uC774\uACE0(`widgets`\uB294 \uC694\uCCAD\uD560 \uB54C\uB9CC), quick-start \uC6CC\uD06C\uC2A4\uD398\uC774\uC2A4\uB294 \uC704\uBC18\uC744 \uACBD\uACE0\uB85C,",
280
+ "team \uC6CC\uD06C\uC2A4\uD398\uC774\uC2A4\uB294 \uC5D0\uB7EC\uB85C \uC54C\uB9B0\uB2E4\uB294 \uB73B\uC77C \uBFD0\uC774\uB2E4 \u2014 \uADDC\uCE59 \uC790\uCCB4\uB294 \uC815\uC2DD FSD \uADF8\uB300\uB85C\uB2E4:",
280
281
  "- \uB808\uC774\uC5B4\uB294 \uC790\uAE30\uBCF4\uB2E4 \uC544\uB798 \uB808\uC774\uC5B4\uB9CC import\uD55C\uB2E4: app > pages > widgets > features > entities > shared.",
281
282
  "- \uAC19\uC740 \uB808\uC774\uC5B4\uC758 \uC2AC\uB77C\uC774\uC2A4\uB07C\uB9AC(pages, widgets, features, entities)\uB294 import\uD558\uC9C0 \uC54A\uB294\uB2E4. \uACF5\uC720\uD560 \uCF54\uB4DC\uB294",
282
283
  " \uD55C \uB808\uC774\uC5B4 \uC544\uB798\uB85C \uB0B4\uB9AC\uAC70\uB098, \uC0C1\uB300 \uC2AC\uB77C\uC774\uC2A4\uC758 `@x/<consumer>` \uACF5\uAC1C API\uB85C\uB9CC \uB178\uCD9C\uD55C\uB2E4.",
@@ -2,14 +2,14 @@ import {
2
2
  addAgentRulesGenerator,
3
3
  generator_default,
4
4
  runAddAgentRules
5
- } from "../_chunks/chunk-XSXOQ2EE.js";
5
+ } from "../_chunks/chunk-ZNTGYYLU.js";
6
6
  import "../_chunks/chunk-AON4KGZT.js";
7
7
  import "../_chunks/chunk-5MI3O4VZ.js";
8
8
  import "../_chunks/chunk-6ZTIUBB2.js";
9
9
  import "../_chunks/chunk-JPS6XKYK.js";
10
10
  import "../_chunks/chunk-TUN34LAQ.js";
11
- import "../_chunks/chunk-AFAORV5O.js";
12
- import "../_chunks/chunk-FQHFT5IH.js";
11
+ import "../_chunks/chunk-M7OQWSNF.js";
12
+ import "../_chunks/chunk-5Z7VZPES.js";
13
13
  export {
14
14
  addAgentRulesGenerator,
15
15
  generator_default as default,
@@ -2,13 +2,13 @@ import {
2
2
  addBackendGenerator,
3
3
  generator_default,
4
4
  runAddBackend
5
- } from "../_chunks/chunk-LRJVAOZ2.js";
5
+ } from "../_chunks/chunk-624F6DEP.js";
6
6
  import "../_chunks/chunk-WNO3ZGBB.js";
7
7
  import "../_chunks/chunk-TXAQ2GJC.js";
8
8
  import "../_chunks/chunk-6ZTIUBB2.js";
9
9
  import "../_chunks/chunk-TUN34LAQ.js";
10
- import "../_chunks/chunk-AFAORV5O.js";
11
- import "../_chunks/chunk-FQHFT5IH.js";
10
+ import "../_chunks/chunk-M7OQWSNF.js";
11
+ import "../_chunks/chunk-5Z7VZPES.js";
12
12
  export {
13
13
  addBackendGenerator,
14
14
  generator_default as default,
@@ -2,15 +2,16 @@ import {
2
2
  addFsdLiteGenerator,
3
3
  generator_default,
4
4
  runAddFsdLite
5
- } from "../_chunks/chunk-SKM3CM5G.js";
6
- import "../_chunks/chunk-L2RZ2LBO.js";
7
- import "../_chunks/chunk-B55SAIUS.js";
5
+ } from "../_chunks/chunk-TJ6SCQLI.js";
6
+ import "../_chunks/chunk-N6B6VBHG.js";
7
+ import "../_chunks/chunk-WVMTOWLM.js";
8
8
  import "../_chunks/chunk-TXAQ2GJC.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-AFAORV5O.js";
13
- import "../_chunks/chunk-FQHFT5IH.js";
12
+ import "../_chunks/chunk-ILICA6LC.js";
13
+ import "../_chunks/chunk-M7OQWSNF.js";
14
+ import "../_chunks/chunk-5Z7VZPES.js";
14
15
  export {
15
16
  addFsdLiteGenerator,
16
17
  generator_default as default,
@@ -6,12 +6,12 @@ import {
6
6
  addGithubTemplatesGenerator,
7
7
  generator_default,
8
8
  runAddGithubTemplates
9
- } from "../_chunks/chunk-FNSOLEVB.js";
9
+ } from "../_chunks/chunk-3ZHRZK5M.js";
10
10
  import "../_chunks/chunk-YNMLB4DL.js";
11
11
  import "../_chunks/chunk-JPS6XKYK.js";
12
12
  import "../_chunks/chunk-TUN34LAQ.js";
13
- import "../_chunks/chunk-AFAORV5O.js";
14
- import "../_chunks/chunk-FQHFT5IH.js";
13
+ import "../_chunks/chunk-M7OQWSNF.js";
14
+ import "../_chunks/chunk-5Z7VZPES.js";
15
15
  export {
16
16
  BUG_REPORT_PATH,
17
17
  CODEOWNERS_PATH,
@@ -1,6 +1,3 @@
1
- import {
2
- diskRunNx
3
- } from "../_chunks/chunk-GPZEZVPN.js";
4
1
  import {
5
2
  DEFAULT_PLUGIN_SCOPE,
6
3
  PLUGIN_IDS,
@@ -11,8 +8,11 @@ import {
11
8
  renderUserCommand
12
9
  } from "../_chunks/chunk-AQHV7DJS.js";
13
10
  import "../_chunks/chunk-34V6HAJT.js";
14
- import "../_chunks/chunk-AFAORV5O.js";
15
- import "../_chunks/chunk-FQHFT5IH.js";
11
+ import {
12
+ diskRunNx
13
+ } from "../_chunks/chunk-ILICA6LC.js";
14
+ import "../_chunks/chunk-M7OQWSNF.js";
15
+ import "../_chunks/chunk-5Z7VZPES.js";
16
16
 
17
17
  // src/generators/add-integration/render.ts
18
18
  function renderIntegrationPlan(view) {
@@ -3,14 +3,14 @@ import {
3
3
  generator_default,
4
4
  recordedReview,
5
5
  runAddReview
6
- } from "../_chunks/chunk-FKABQJTB.js";
7
- import "../_chunks/chunk-EGVFXXPE.js";
6
+ } from "../_chunks/chunk-ERCX7F6K.js";
7
+ import "../_chunks/chunk-2WXAGWAJ.js";
8
8
  import "../_chunks/chunk-AON4KGZT.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-AFAORV5O.js";
13
- import "../_chunks/chunk-FQHFT5IH.js";
12
+ import "../_chunks/chunk-M7OQWSNF.js";
13
+ import "../_chunks/chunk-5Z7VZPES.js";
14
14
  export {
15
15
  addReviewGenerator,
16
16
  generator_default as default,
@@ -3,7 +3,7 @@ import {
3
3
  } from "../_chunks/chunk-34V6HAJT.js";
4
4
  import {
5
5
  detectWorkspacePackageManager
6
- } from "../_chunks/chunk-FQHFT5IH.js";
6
+ } from "../_chunks/chunk-5Z7VZPES.js";
7
7
 
8
8
  // src/generators/allow-builds/generator.ts
9
9
  import { spawnSync } from "node:child_process";