@icebreakers/monorepo 5.6.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/baseline-DPfotf4y.mjs +146 -0
- package/dist/bundle-B9vRch4R.mjs +49 -0
- package/dist/catalog-CDEyc1uA.mjs +299 -0
- package/dist/cli.mjs +1487 -156
- package/dist/commands-TS8ABFdP.mjs +13820 -0
- package/dist/config-C38c_Q8L.mjs +66 -0
- package/dist/{create-flow-CXRhfGbb.mjs → create-flow-CCr2hfSY.mjs} +90 -24
- package/dist/deps-CUdI2DaB.mjs +47 -0
- package/dist/execute-PX1hT0qv.mjs +68 -0
- package/dist/execute-Vi4qHe-D.mjs +663 -0
- package/dist/format-DZ7L34rf.mjs +28 -0
- package/dist/index-CoCTFWZJ.d.mts +2150 -0
- package/dist/index.d.mts +1738 -112
- package/dist/index.mjs +60 -7
- package/dist/inputs-_xIVONmB.mjs +50 -0
- package/dist/npm-B25nrSyz.mjs +82 -0
- package/dist/plan-B5aE_WNF.mjs +75 -0
- package/dist/run-Lu7y1bNf.mjs +165 -0
- package/dist/save-CdCf630Z.mjs +79 -0
- package/dist/scan-4nboHNXP.mjs +293 -0
- package/dist/template-drift-BBhnrHY1.mjs +2740 -0
- package/dist/tooling-entry.d.mts +1 -1
- package/dist/tooling-entry.mjs +2 -2
- package/dist/transaction-DAhY8EpG.mjs +168 -0
- package/dist/tsconfig-CGntrzBM.mjs +1483 -0
- package/dist/{vitest-Blzbh8xZ.mjs → vitest-DkGh4Ygo.mjs} +1 -1
- package/dist/workspace-tasks-CnB8kkS0.mjs +4435 -0
- package/package.json +22 -4
- package/resources/api-report/runner.cjs +76 -0
- package/resources/devcontainer/setup.mjs +36 -0
- package/resources/knip/reporter.mjs +46 -0
- package/resources/maintenance/migration-lanes.mjs +141 -0
- package/resources/maintenance/migration-lock.mjs +119 -0
- package/resources/maintenance/migrations.mjs +215 -0
- package/resources/maintenance/presets.mjs +130 -0
- package/resources/maintenance/validate.mjs +233 -0
- package/resources/maintenance/workflow.yml +151 -0
- package/resources/skills/repoctl/SKILL.md +2 -0
- package/resources/skills/repoctl/references/commands.md +224 -13
- package/resources/skills/repoctl/references/config.md +70 -6
- package/resources/skills/repoctl/references/dependencies.md +37 -0
- package/resources/skills/repoctl/references/knip.md +34 -0
- package/resources/skills/repoctl/references/templates.md +23 -0
- package/dist/commands-D4xZQ5t-.mjs +0 -5685
- package/dist/config-p842Knhq.mjs +0 -114
- package/dist/index-Bl_PB2Ch.d.mts +0 -1039
- package/dist/tsconfig-BrjI_5yI.mjs +0 -75
- package/dist/types-MAUIQpfp.mjs +0 -499
- package/dist/workspace-MCKewElu.mjs +0 -123
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Optional Knip checks
|
|
2
|
+
|
|
3
|
+
Use `pnpm exec repo check knip` only when unused code/dependency analysis is requested.
|
|
4
|
+
Ordinary check modes do not enable it. A workspace-root installation of Knip
|
|
5
|
+
`>=6.39.0 <7` is required; missing-tool guidance is `pnpm add -Dw knip@^6.39.0`.
|
|
6
|
+
repoctl does not download it, fall back to global/parent tools or run native fixes.
|
|
7
|
+
|
|
8
|
+
1. Inspect `repo check knip --recommend-config` and merge useful native settings manually.
|
|
9
|
+
Preserve existing JSON/JS/TS configuration, plugins and intentional dynamic entries.
|
|
10
|
+
Generated outputs have suggested exclusions; review example/fixture exclusions explicitly.
|
|
11
|
+
2. Preview with `repo check knip --dry-run --json`, then run `repo check knip --json`.
|
|
12
|
+
JSON means an actual report on this subcommand. Put all options after `knip`.
|
|
13
|
+
3. Use `--production` or `--strict` only after reviewing native production entries.
|
|
14
|
+
Strict mode implies production and checks direct dependency declarations per workspace.
|
|
15
|
+
4. Review findings before explicitly saving with `--save-baseline knip-baseline.json`.
|
|
16
|
+
Saving preserves the current exit code and cannot overwrite arbitrary files.
|
|
17
|
+
5. Compare with `--baseline knip-baseline.json --new-only` for incremental adoption.
|
|
18
|
+
Do not refresh a baseline silently to hide failures. Baseline errors fail closed.
|
|
19
|
+
|
|
20
|
+
Reports preserve workspace, source location, native category/reason and warn/error severity.
|
|
21
|
+
Exit 0 means the policy passes, 1 means blocking findings, and 2 means incomplete analysis
|
|
22
|
+
or invalid baseline. Baseline comparison reports existing, added and fixed findings.
|
|
23
|
+
Source line shifts do not create new findings; severity escalation does.
|
|
24
|
+
|
|
25
|
+
Baseline scope binds the exact tool version, modes, root name, native workspace set,
|
|
26
|
+
primary config hashes, categories and enabled plugins. Source/dependency fixes are allowed.
|
|
27
|
+
Imported config helpers, environment changes and every plugin auxiliary config are not fully
|
|
28
|
+
fingerprinted: review and explicitly rebaseline after changing those policies.
|
|
29
|
+
Config paths are relative to invocation cwd; baseline paths are relative to the workspace root.
|
|
30
|
+
Review retained temporary paths after interrupted saves or cleanup failures.
|
|
31
|
+
|
|
32
|
+
Public APIs: `planKnipCheck`, `runKnipCheck`, `getKnipConfigurationSuggestions`,
|
|
33
|
+
`saveKnipBaseline`, with exported plan/report/baseline types. Timeout and cancellation fail
|
|
34
|
+
closed. Neither repoctl configuration recommendations nor its analyzer runs edit user config.
|
|
@@ -36,6 +36,7 @@ Built-in template map:
|
|
|
36
36
|
- vue-lib -> templates/vue-lib => packages/vue-lib
|
|
37
37
|
- hono-server -> templates/server => apps/server
|
|
38
38
|
- vue-hono -> templates/client => apps/client
|
|
39
|
+
- next -> templates/next => apps/next (Next.js App Router, server page, client state and health route)
|
|
39
40
|
- nimbus -> templates/nimbus => apps/docs (default documentation template)
|
|
40
41
|
- vitepress -> templates/vitepress => apps/website (explicit alternative)
|
|
41
42
|
- cli -> templates/cli => apps/cli
|
|
@@ -45,3 +46,25 @@ Notes:
|
|
|
45
46
|
- The command prompts for template selection unless defaults are set in
|
|
46
47
|
repoctl.config.ts or monorepo.config.ts.
|
|
47
48
|
- Override mappings with `commands.create.templateMap` and `commands.create.templatesDir`.
|
|
49
|
+
|
|
50
|
+
For `next`, run `typecheck` to generate Next route types before `tsc`. Its local Turbo config caches production output and excludes `.next/cache`. Compiled workspace libraries use public package exports and `^build`; source-exporting libraries must be named in `transpilePackages`. Never copy `.next`, `next-env.d.ts` or an independent pnpm lockfile into the template.
|
|
51
|
+
|
|
52
|
+
## Custom catalog
|
|
53
|
+
|
|
54
|
+
Creation, list/detail, interactive choices and `repo templates --check` share `resolveTemplateCatalog({ cwd })`. Object entries in `commands.create.templateMap` accept `source`, `target`, optional `label`, `description`, and `category` (`app`, `docs`, `library`, `service`, `tool`); string entries still map the same source and target. Absolute sources coexist with installed templates. `templatesDir` replaces the root for all relative sources, including built-ins, and is relative to the configuration file, including when invoked in a nested workspace package. A non-empty `choices` array preserves explicit ordering/inclusion and supplies the same labels/descriptions shown by discovery.
|
|
55
|
+
|
|
56
|
+
Detail/JSON include `origin`, `overridesBuiltin`, `sourceDir`, `configFile` and `configPath`; create JSON includes `templateInfo`. Health checks report invalid declarations, duplicate choices, sources and targets, missing directories/manifests and metadata. Checks are read-only and do not execute template code. Prefer `--check --json` for diagnostic locations; listing JSON keeps the array shape.
|
|
57
|
+
|
|
58
|
+
## Author validation
|
|
59
|
+
|
|
60
|
+
Use `repo templates validate <key> --fixture <workspace-skeleton> --json` for explicit generated-project validation. `--dry-run` inspects required scripts without executing them; repeated `--name` validates renamed samples. `--parameter-matrix matrix.json` reads a JSON array of typed parameter objects and crosses it with names (at most 20 samples). The public helper uses `parameterSets`. Each combination inspects its rendered files and conditional scripts before execution. Sensitive values are redacted, and sensitive combinations hide child output and diagnostic messages while retaining stages, exit codes and diagnostic codes; retained generated files can still contain those inputs. Execution order is install → build → lint/Stylelint → typecheck → tsd for typed libraries → built-artifact tests and declared E2E. Library samples additionally pack, analyze and consume actual tarballs. Default cleanup removes samples; `--keep-failed` retains failure diagnostics and `--keep-temp` retains every sample. `--timeout` bounds each child command, and interruption stops only the validation process tree. Ordinary template discovery/check never executes scripts.
|
|
61
|
+
|
|
62
|
+
## Remote assets
|
|
63
|
+
|
|
64
|
+
A custom entry can add `remote: { kind: 'npm', packageName, version, registry? }` or `remote: { kind: 'git', repository, ref }`; `source` is a relative archive directory, including `.` for its root. npm requires an exact version; prefer a full Git commit for reproducibility across fresh caches. `repo templates fetch <key> --json` prepares verified assets. Actual creation/validation may fetch, while listing, health and previews remain read-only and need a previously fetched cache. `--offline` refuses a miss; `--cache-dir` or `commands.create.cacheDir` overrides the cache relative to invocation cwd.
|
|
65
|
+
|
|
66
|
+
npm configuration supplies scoped registry/authentication. Never put credentials in the remote declaration. Fetching runs no lifecycle scripts, hooks, submodules or dependency installs. Cache hits recheck original archives against extracted asset contents; corruption is an error, not an automatic refresh. A Git ref stays pinned to its first cached commit. Instances record resolved provenance and retained baselines; remote upgrades are explicitly unsupported by the built-in-version `templates upgrade` command. The exported `resolveRemoteTemplateSource` helper is the same acquisition boundary used by the CLI.
|
|
67
|
+
|
|
68
|
+
## Existing-package generators
|
|
69
|
+
|
|
70
|
+
Use `repo generate <vue-component|react-component|hono-route> <kebab-name> --package <exact-name-or-relative-dir> --json` to inspect source and behavior-test files before writing. Run without `--json` to apply; `--export` explicitly adds a named export to `src/index.ts` (or `--barrel`). `--directory` stays inside the selected package. Strict parameters, framework requirements, stale plans, symlinks and conflicting files fail before writes. Repeated identical generation is unchanged. Hono route registration remains an explicit printed next step. Validate generated output with build, ESLint/Stylelint, tsc/vue-tsc and tests. Keep `repo new` for whole new packages; it never overwrites existing directories.
|