@mnci/cli 4.44.0 → 4.46.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 +31 -0
- package/dist/cli.js +668 -229
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -514,6 +514,9 @@ packages under mnci (the plan is #383). So far it is **report mode only and chan
|
|
|
514
514
|
mnci adopt # what was found, what blocks, what clears each
|
|
515
515
|
mnci adopt --json # the same, as one document
|
|
516
516
|
mnci adopt --tags # step (#379): create the baseline release tags, locally
|
|
517
|
+
mnci adopt --toolchain [--nx <version>] # step (#380): retire old tooling, align Nx, pass the audit
|
|
518
|
+
mnci adopt --overlay --scope @org --registry npm --agent ubuntu-latest # step (#381): the overlay and pipeline
|
|
519
|
+
mnci adopt --kinds [--kind apps/api=node-app] # step (#378): record each project's kind
|
|
517
520
|
```
|
|
518
521
|
|
|
519
522
|
It reads git and the filesystem (no Nx, no install, no network) and reports the package manager, the
|
|
@@ -529,6 +532,34 @@ disk version. `mnci adopt --tags` creates, for each such project, a lightweight
|
|
|
529
532
|
commit of the old one (`@auto/mysql@1.12.11` on `mysql@1.12.11`). It is local and idempotent, never moves a tag,
|
|
530
533
|
and prints the `git push` for you to run: publishing tags changes the remote, so that stays your decision.
|
|
531
534
|
|
|
535
|
+
**`--toolchain`** brings the root toolchain to what mnci supports, as one diff to review. It refuses a directory
|
|
536
|
+
that is not a clean git work tree and leaves its changes uncommitted, as `mnci upgrade` does. It removes the
|
|
537
|
+
retired formatter configs and dependencies (Prettier, oxfmt, oxlint), the root scripts that call them (a
|
|
538
|
+
`format:check` running `oxfmt` fails once the dependency is gone), and the local-registry scaffolding
|
|
539
|
+
(`.verdaccio`, `verdaccio`, the `local-registry` target); pins `nx` and every `@nx/*` to one exact version, by
|
|
540
|
+
default the newest published in the major already in use (`--nx <version>` overrides it); installs; and runs
|
|
541
|
+
`npm audit fix` (never `--force`) until `mnci ci audit` passes, up to four passes. Run on a copy of a real
|
|
542
|
+
hand-built workspace it moved Nx 23.1.1 to 23.3.0 and the audit gate passed after one pass.
|
|
543
|
+
|
|
544
|
+
**`--kinds`** records each project's mnci kind as a `type:<kind>` tag, in its `project.json` or the `nx.tags` of
|
|
545
|
+
its `package.json` (`mnci projects` shows it). The kind is read from the project itself: an `index.html` next to
|
|
546
|
+
React, an `engines.vscode`, an `OutputType` of `Exe`, a `package main`, `lib/main.dart`. Where two kinds fit (a
|
|
547
|
+
library that is internal or published, a script that is an app or a library) the project is listed with the
|
|
548
|
+
guess and why, and **not** tagged; name it with `--kind <dir>=<kind>` (repeatable) to accept or change the
|
|
549
|
+
guess, and the step exits non-zero until every project has a kind. A project that already has a `type:*` tag
|
|
550
|
+
keeps it, even one that is not an mnci kind name. Nothing is regenerated and no target is written: Nx infers an
|
|
551
|
+
npm project's targets from its scripts. Needs a clean git tree.
|
|
552
|
+
|
|
553
|
+
**`--overlay`** applies the mnci overlay (release config, `.npmrc`, commitlint, the curated root scripts and the
|
|
554
|
+
CI pipeline) to a repository that has an `nx.json`. It is `mnci upgrade` behind adoption's guard rails: it
|
|
555
|
+
refuses an unclean git tree, takes the same flags (`--scope`, `--registry`, `--organization`, `--project`,
|
|
556
|
+
`--artifacts-feed`, `--agent`, `--variable-group`, `--npm-auth`, `--ci`, `--test-runner`) and fills `--ci` and
|
|
557
|
+
`--test-runner` from what the repository already has (its pipeline files, `jest` or `vitest` in the root
|
|
558
|
+
manifest). The existing pipeline goes through the legacy migration: steps mnci does not recognise are kept in
|
|
559
|
+
the three `# mnci:slot` blocks, the ones it does are replaced by `mnci ci <phase>`, and what cannot be carried
|
|
560
|
+
over is listed. Scope, registry and agent have no safe guess, so they are asked for by flag. Adopt does not
|
|
561
|
+
install Nx: a repository with no `nx.json` is told to run `npx nx@latest init` first.
|
|
562
|
+
|
|
532
563
|
## `mnci upgrade`: re-applying the overlay to an existing workspace
|
|
533
564
|
|
|
534
565
|
Every fix to `workspace-overlay/overlay.use-case.ts` — a release-config correction, a CI guard rewritten,
|