@mozole/cli 1.3.1 → 1.4.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/CHANGELOG.md +13 -0
- package/README.md +52 -168
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +31 -45
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +1 -0
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +192 -23
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +312 -271
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +10 -3
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/new.d.ts +7 -4
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +39 -26
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/qa.d.ts.map +1 -1
- package/dist/commands/qa.js +18 -12
- package/dist/commands/qa.js.map +1 -1
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +6 -1
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +12 -8
- package/dist/commands/verify.js.map +1 -1
- package/dist/config/project.d.ts +8 -7
- package/dist/config/project.d.ts.map +1 -1
- package/dist/config/project.js +39 -26
- package/dist/config/project.js.map +1 -1
- package/dist/context/cce.d.ts +0 -7
- package/dist/context/cce.d.ts.map +1 -1
- package/dist/context/cce.js +12 -43
- package/dist/context/cce.js.map +1 -1
- package/dist/governor/fingerprint.d.ts.map +1 -1
- package/dist/governor/fingerprint.js +38 -20
- package/dist/governor/fingerprint.js.map +1 -1
- package/dist/governor/hook.d.ts +2 -1
- package/dist/governor/hook.d.ts.map +1 -1
- package/dist/governor/hook.js +20 -11
- package/dist/governor/hook.js.map +1 -1
- package/dist/platform/executable.d.ts.map +1 -1
- package/dist/platform/executable.js +12 -4
- package/dist/platform/executable.js.map +1 -1
- package/dist/platform/process.d.ts.map +1 -1
- package/dist/platform/process.js +46 -66
- package/dist/platform/process.js.map +1 -1
- package/dist/qa/diff.d.ts +3 -3
- package/dist/qa/diff.d.ts.map +1 -1
- package/dist/qa/diff.js +13 -1
- package/dist/qa/diff.js.map +1 -1
- package/dist/qa/runner.d.ts +9 -9
- package/dist/qa/runner.d.ts.map +1 -1
- package/dist/qa/runner.js +46 -23
- package/dist/qa/runner.js.map +1 -1
- package/dist/qa/server.d.ts.map +1 -1
- package/dist/qa/server.js +6 -1
- package/dist/qa/server.js.map +1 -1
- package/dist/scaffold/backend.d.ts +9 -0
- package/dist/scaffold/backend.d.ts.map +1 -0
- package/dist/scaffold/backend.js +224 -0
- package/dist/scaffold/backend.js.map +1 -0
- package/dist/scaffold/standalone.d.ts +6 -0
- package/dist/scaffold/standalone.d.ts.map +1 -0
- package/dist/scaffold/standalone.js +270 -0
- package/dist/scaffold/standalone.js.map +1 -0
- package/dist/scaffold/templates.d.ts +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +122 -81
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/scaffold/write.d.ts.map +1 -1
- package/dist/scaffold/write.js +19 -5
- package/dist/scaffold/write.js.map +1 -1
- package/dist/telemetry/store.js +7 -3
- package/dist/telemetry/store.js.map +1 -1
- package/dist/verify/runner.d.ts.map +1 -1
- package/dist/verify/runner.js +15 -17
- package/dist/verify/runner.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/docs/agent-audit.md +24 -0
- package/package.json +7 -2
- package/dist/scaffold/admin.d.ts +0 -8
- package/dist/scaffold/admin.d.ts.map +0 -1
- package/dist/scaffold/admin.js +0 -45
- package/dist/scaffold/admin.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
- Make default scaffolds independent of the CLI: no CCE, governor, telemetry, caches, MCP, hooks, or optimization dependency. Environment variables cannot enable integration mode.
|
|
6
|
+
- Keep useful basic AGENTS.md and CLAUDE.md guidance in plain projects. Require explicit integration flags for new/adopt; refresh managed agent blocks and hook definitions while preserving user content.
|
|
7
|
+
- Track CCE retrieval through PostToolUse MCP events and provide a valid reason from the visual QA workflow.
|
|
8
|
+
- Add recursive PHP syntax and minimum-version validation, strict API prefix matching, GET/HEAD handling, and 405/Allow responses.
|
|
9
|
+
- Add `build:deploy` to assemble frontend, PHP API, and .htaccess with rollback on failed replacement. Default PHP configuration to production/debug-off.
|
|
10
|
+
- Preserve failed creation logs before staging cleanup.
|
|
11
|
+
- Add standalone browser QA and integration coverage for plain, PHP, and optimized scaffolds; provision PHP in Windows/Linux CI.
|
|
12
|
+
|
|
13
|
+
Migration: default generated projects use standalone npm scripts rather than a project-local `mozole` executable. Use the globally installed CLI when desired, or pass `--cce-install` to generate the optional integration mode. Plain adoption preserves existing user integrations and requires the flag to update an already optimized project.
|
package/README.md
CHANGED
|
@@ -1,217 +1,99 @@
|
|
|
1
1
|
# Mozole CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Requirements and installation
|
|
6
|
-
|
|
7
|
-
- Node.js 22 or newer
|
|
8
|
-
- npm
|
|
9
|
-
- Windows or Linux (WSL is optional, not required)
|
|
10
|
-
- Git is recommended
|
|
11
|
-
- For CCE: Python 3.11+, a C/C++ build toolchain, and CMake; `mozole cce install` installs the required `uv` runtime and persistent `cce` tool
|
|
3
|
+
Mozole scaffolds React + Vite projects using React Router Framework Mode. It prerenders static HTML and optionally adds a native PHP API. Node.js 22+, npm, and Windows or Linux are supported. PHP projects require PHP 8.0+.
|
|
12
4
|
|
|
13
5
|
```sh
|
|
14
6
|
npm install --global @mozole/cli
|
|
15
|
-
mozole --version
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
The release pins its complete generated-project matrix in `src/version.ts`; generation never requests floating `latest` packages.
|
|
19
|
-
|
|
20
|
-
## Create a project
|
|
21
|
-
|
|
22
|
-
```sh
|
|
23
7
|
mozole new my-site
|
|
24
|
-
|
|
25
|
-
npm run dev
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
For a small runtime-backed admin seam, use `mozole new my-site --with-admin`. Public routes remain prerendered, while `/admin` requires the generated Node server and runtime credentials documented in `docs/architecture.md`; this opt-in project cannot serve its complete route set from pure static hosting.
|
|
29
|
-
|
|
30
|
-
Use `mozole new my-site --scaffold` for a minimal static-first project without CCE, governor, telemetry, generated agent instructions, MCP configuration, or browser provisioning. `mozole verify` still runs lint, typecheck, tests, and build, then identifies this configuration as `SCAFFOLD MODE`.
|
|
31
|
-
|
|
32
|
-
There is no questionnaire. Mozole writes into a sibling staging directory, installs the pinned npm graph, formats every generated file with Biome, provisions Chromium for full-harness projects, then atomically moves the completed project into place. A failed pre-move bootstrap removes the staging directory. CCE initialization is best-effort after the move because it may require machine-level native prerequisites; its full log is kept under `.mozole/logs/`.
|
|
33
|
-
|
|
34
|
-
The generated app follows current React Router Framework Mode conventions:
|
|
35
|
-
|
|
36
|
-
```ts
|
|
37
|
-
// react-router.config.ts
|
|
38
|
-
export default {
|
|
39
|
-
ssr: false,
|
|
40
|
-
prerender: true,
|
|
41
|
-
} satisfies Config;
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
React Router documents this combination as static pre-rendering without a runtime SSR server. Every statically declared route in `app/routes.ts` gets real HTML at build time. The starter emits `/`, `/about`, and `/contact` under `build/client/`, alongside route data and assets. See the official [React Router pre-rendering guide](https://reactrouter.com/how-to/pre-rendering).
|
|
45
|
-
|
|
46
|
-
Deploy `build/client/` to Apache, LiteSpeed, nginx, a CDN, object storage, or shared hosting. Known routes do not need SPA fallback or a production Node process. Build output is disposable and ignored by Git.
|
|
47
|
-
|
|
48
|
-
## Commands
|
|
49
|
-
|
|
50
|
-
```text
|
|
51
|
-
mozole new <name> [--with-admin] [--scaffold]
|
|
52
|
-
mozole adopt <path>
|
|
53
|
-
mozole cce install
|
|
54
|
-
mozole doctor
|
|
55
|
-
mozole verify [--force]
|
|
56
|
-
mozole qa
|
|
57
|
-
mozole qa --interactive
|
|
58
|
-
mozole qa --visual
|
|
59
|
-
mozole qa --visual --diff
|
|
60
|
-
mozole qa --force
|
|
61
|
-
mozole stats
|
|
62
|
-
mozole ui
|
|
63
|
-
mozole logs [name] [--raw]
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Adopt an existing project
|
|
67
|
-
|
|
68
|
-
```sh
|
|
69
|
-
mozole adopt ../existing-app
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Adoption accepts React projects using Vite or React Router, preserves application files, adds missing harness files, and merges only the required package scripts/dependencies. Changed package and existing agent-hook JSON files are backed up under `.mozole/backups/`. Existing hook groups are preserved, and Mozole's advisory group is appended once. Marked instructions, hook settings, ignore rules, and package mutations are idempotent.
|
|
73
|
-
|
|
74
|
-
### Diagnose the environment
|
|
75
|
-
|
|
76
|
-
```sh
|
|
77
|
-
mozole doctor
|
|
8
|
+
mozole new my-app --backend
|
|
78
9
|
```
|
|
79
10
|
|
|
80
|
-
|
|
11
|
+
Creation installs pinned dependencies and Chromium, formats the project, and moves the completed staging directory into place. Failed setup preserves available subprocess logs in a sibling `.mozole-<name>-failure-*` directory before removing staging. Existing target directories are preserved.
|
|
81
12
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```sh
|
|
85
|
-
mozole cce install
|
|
86
|
-
```
|
|
13
|
+
## Default project
|
|
87
14
|
|
|
88
|
-
|
|
15
|
+
The default project has **no CCE, token governor, telemetry, verification cache, MCP registration, or optimization hooks**. It does not depend on `@mozole/cli`, including transitively through its generated package lock. Verification and browser QA run through standalone project scripts. `MOZOLE_INSTALL_CCE` does not enable integrations.
|
|
89
16
|
|
|
90
|
-
|
|
17
|
+
Basic `AGENTS.md` describes actual commands, source layout, and verification policy. `CLAUDE.md` imports it using `@AGENTS.md`. Neither file imposes CCE retrieval or token policies. No `.agents/`, `.codex/hooks.json`, or `.claude/settings.json` is generated by default.
|
|
91
18
|
|
|
92
19
|
```sh
|
|
93
|
-
|
|
94
|
-
|
|
20
|
+
cd my-site
|
|
21
|
+
npm run dev
|
|
95
22
|
npm run verify
|
|
23
|
+
npm run qa
|
|
24
|
+
npm run qa:interactive
|
|
25
|
+
npm run qa:visual
|
|
96
26
|
```
|
|
97
27
|
|
|
98
|
-
|
|
28
|
+
`verify` runs lint, strict TypeScript, tests, and production build every time. PHP projects also run PHP version and recursive syntax checks first. `qa` starts a loopback development server on an available port, checks the configured routes at three viewports, and closes its browser and server. Normal QA never captures screenshots. `qa:visual` explicitly captures screenshots under `.mozole/qa/`. Reinstall Chromium with `npx playwright install chromium` if necessary.
|
|
99
29
|
|
|
100
|
-
|
|
30
|
+
React Router uses `ssr: false` and `prerender: true`. The starter builds real HTML for `/`, `/about`, and `/contact` into `build/client/`, plus `__spa-fallback.html`. Production requires no Node server. See [React Router prerendering](https://reactrouter.com/how-to/pre-rendering).
|
|
101
31
|
|
|
102
|
-
|
|
32
|
+
## PHP backend
|
|
103
33
|
|
|
104
34
|
```sh
|
|
105
|
-
mozole
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
35
|
+
mozole new my-app --backend
|
|
36
|
+
cd my-app
|
|
37
|
+
npm run dev
|
|
38
|
+
# In a separate terminal:
|
|
39
|
+
npm run dev:api
|
|
109
40
|
```
|
|
110
41
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Normal QA and verification contain no screenshot path. Screenshot capture exists only inside the `visual` branch, uses stable `<viewport>-<route>.png` names, and is tested as opt-in.
|
|
114
|
-
|
|
115
|
-
`mozole qa --visual --diff` captures fresh screenshots and compares them with existing baselines before replacing those baselines. First captures establish baselines. Changes above `qa.visualDiffThreshold` in `.mozole/project.json` are reported by route, viewport, and changed-pixel percentage, with `<viewport>-<route>.diff.png` evidence stored beside the baseline. Visual differences are diagnostic only and do not fail QA.
|
|
116
|
-
|
|
117
|
-
Successful normal, interactive, and visual QA evidence is cached separately. Runtime source, routes, server settings, dependencies, and viewport changes invalidate QA; a README-only edit does not. An unchanged repeat returns `QA CURRENT` without launching a server or Chromium. Visual reuse also verifies every screenshot's content hash and existence. `mozole qa --force` and `mozole qa --visual --force` always collect fresh evidence.
|
|
118
|
-
|
|
119
|
-
Viewports, routes, server command/arguments, readiness path, telemetry, and verifier extensions are explicit in `.mozole/project.json`.
|
|
120
|
-
|
|
121
|
-
## CCE, Codex, and Claude Code
|
|
122
|
-
|
|
123
|
-
Mozole integrates Elara Labs' local [Code Context Engine](https://github.com/elara-labs/code-context-engine), currently pinned to `0.4.25`. If `cce` is installed, Mozole runs:
|
|
42
|
+
Vite proxies `/api/` calls to PHP on `127.0.0.1:8000`. The PHP front controller serves `GET` and `HEAD` for `/api/health` and `/api/info`. Unknown endpoints return JSON 404; unsupported methods on known endpoints return JSON 405 with `Allow: GET, HEAD`.
|
|
124
43
|
|
|
125
44
|
```sh
|
|
126
|
-
|
|
45
|
+
npm run check:php
|
|
46
|
+
npm run build:deploy
|
|
127
47
|
```
|
|
128
48
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
When adopting a project with CCE enabled, Mozole requires a runnable CCE runtime before it writes the managed MCP entry or reports success. If neither `cce` nor `uvx` is available, run `mozole cce install` once and repeat adoption. The adopted MCP entry uses the resolved executable, including the persistent `cce` path when a newly opened shell has not refreshed `PATH` yet; a pinned `uvx` fallback remains supported for existing installations.
|
|
132
|
-
|
|
133
|
-
CCE normally writes its own instruction blocks during initialization. Mozole snapshots and restores `AGENTS.md` and `CLAUDE.md` around that operation: the index, hooks, and MCP registrations remain, while the compact shared project guidance stays the sole instruction source.
|
|
49
|
+
`check:php` checks PHP 8.0+ and runs `php -l` on every PHP source file under `api/`. `build:deploy` validates PHP, builds the frontend, and assembles `deploy/` with static output, `api/`, and `.htaccess`. Existing deployment output is replaced with rollback on failed replacement. Upload the **contents** of `deploy/`, including hidden `.htaccess`, to an Apache/LiteSpeed document root with PHP and rewrite support. The supplied configuration assumes domain-root hosting. Nginx needs explicit PHP-FPM configuration; see generated `docs/backend-php.md`.
|
|
134
50
|
|
|
135
|
-
|
|
51
|
+
Environment values come from the process environment using `getenv`; there is no implicit `.env` loader. Production and debug-off are the defaults. Database support is an optional PDO helper; configure `DB_DSN`, `DB_USER`, and `DB_PASS` through your host.
|
|
136
52
|
|
|
137
|
-
##
|
|
53
|
+
## Explicit integrations
|
|
138
54
|
|
|
139
55
|
```sh
|
|
140
|
-
mozole
|
|
56
|
+
mozole cce install
|
|
57
|
+
mozole new agent-site --cce-install
|
|
58
|
+
# --install-cce is an alias; --backend can be combined with either flag.
|
|
59
|
+
mozole adopt existing-site --cce-install
|
|
141
60
|
```
|
|
142
61
|
|
|
143
|
-
|
|
62
|
+
Only explicit `--cce-install`/`--install-cce` enables the CCE runtime integration, Codex/Claude hooks, Antigravity workspace files, token governor, telemetry, and verification/QA evidence reuse. The project then depends on the matching CLI version. `--scaffold` on `new` overrides integration flags.
|
|
144
63
|
|
|
145
|
-
|
|
64
|
+
CCE initialization uses the pinned release in `src/version.ts`. `mozole cce install` installs its runtime; creation reports when an unavailable runtime needs attention. Adoption with integration flags requires a runnable CCE runtime before installing managed integrations. Existing user instructions and unrelated hook/MCP entries are preserved. Managed instruction blocks and hook definitions are refreshed idempotently.
|
|
146
65
|
|
|
147
|
-
`
|
|
66
|
+
Optimized `AGENTS.md` provides the shared CCE-first contract; `CLAUDE.md` imports it and Antigravity rules reference it. Instructions are guidance, not execution proof. Codex discovers `AGENTS.md` by directory scope, with `AGENTS.override.md` taking precedence. Project hooks need host review/trust before execution. See [AGENTS.md discovery](https://learn.chatgpt.com/docs/agent-configuration/agents-md) and [Codex hooks](https://learn.chatgpt.com/docs/hooks).
|
|
148
67
|
|
|
149
|
-
|
|
150
|
-
.agents/
|
|
151
|
-
├── mcp_config.json
|
|
152
|
-
├── rules/mozole.md
|
|
153
|
-
└── workflows/
|
|
154
|
-
├── mozole-verify.md
|
|
155
|
-
├── mozole-qa.md
|
|
156
|
-
├── mozole-qa-interactive.md
|
|
157
|
-
└── mozole-qa-visual.md
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Google documents `.agents/mcp_config.json` as the workspace-local MCP configuration and `.agents/rules/` plus `.agents/workflows/` as workspace customizations ([Antigravity CLI MCP](https://codelabs.developers.google.com/genai-for-dev-antigravity-cli), [Antigravity IDE customization](https://codelabs.developers.google.com/getting-started-agy-ide)). Mozole registers one stdio server named `mozole-cce` using CCE's documented `cce serve` entry point. CCE discovers the project from `.context-engine.yaml`, so no user-specific absolute path or second index is needed. If Mozole is using its pinned `uvx` fallback, the MCP entry uses the same pinned package invocation.
|
|
68
|
+
Read and command policies run on `PreToolUse`. CCE retrieval tracking runs on `PostToolUse`, including MCP tool names, and ignores explicit tool-error responses. The Antigravity visual workflow provides a reason accepted by the visual QA gate. Host-specific agent sessions are not automatically launched by the CLI test suite.
|
|
161
69
|
|
|
162
|
-
|
|
70
|
+
Optimized verification/QA reuses matching successful evidence. Use `--force` for a fresh run. Routine QA is screenshot-free; visual QA uses explicit `--visual` and, after successful routine QA, `--reason` or `--force`. Enabled governors enforce read/command policies and can deny calls; they are not advisory-only. Local telemetry reports measured output compression and tool activity, not model billing savings.
|
|
163
71
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
Troubleshooting:
|
|
72
|
+
## Adopt an existing project
|
|
167
73
|
|
|
168
74
|
```sh
|
|
169
|
-
mozole
|
|
170
|
-
agy # start Antigravity CLI when installed
|
|
171
|
-
# inside Antigravity
|
|
172
|
-
/mcp # inspect mozole-cce connectivity
|
|
173
|
-
cce status # inspect the shared local index
|
|
174
|
-
mozole adopt . # repair/update Mozole-owned workspace files
|
|
75
|
+
mozole adopt ../existing-app
|
|
175
76
|
```
|
|
176
77
|
|
|
177
|
-
|
|
78
|
+
Plain adoption adds standalone verification/QA, basic agent guidance, and missing test tools to a React project using Vite or React Router. Application source and existing user integrations are preserved. It never enables optimization tooling. An already optimized project requires `--cce-install` for managed integration updates rather than silently removing previously enabled integrations. Changed package metadata is backed up under `.mozole/backups/`; managed files are restored on failure.
|
|
178
79
|
|
|
179
|
-
##
|
|
80
|
+
## CLI commands
|
|
180
81
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
Verbose subprocess output remains available progressively:
|
|
191
|
-
|
|
192
|
-
```sh
|
|
193
|
-
mozole logs # list retained logs
|
|
194
|
-
mozole logs verify-tests # final 80 lines
|
|
195
|
-
mozole logs verify-tests --raw
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
## Efficiency telemetry
|
|
199
|
-
|
|
200
|
-
```sh
|
|
82
|
+
```text
|
|
83
|
+
mozole new <name> [--backend] [--cce-install] [--verbose]
|
|
84
|
+
mozole adopt <path> [--cce-install] [--verbose]
|
|
85
|
+
mozole doctor
|
|
86
|
+
mozole verify [--force]
|
|
87
|
+
mozole qa [--interactive | --visual [--diff]] [--force]
|
|
88
|
+
mozole logs [name] [--raw]
|
|
89
|
+
mozole cce install
|
|
201
90
|
mozole stats
|
|
91
|
+
mozole ui
|
|
202
92
|
```
|
|
203
93
|
|
|
204
|
-
|
|
94
|
+
`doctor` checks runtime, project tooling, and optional PHP syntax. CCE probes are omitted for plain projects. `mozole verify` and `mozole qa` can also operate on plain project metadata without reading or writing optimization state. `stats` reports that statistics are disabled in plain projects. Standalone project QA supports normal, interactive, and visual modes; pixel diffing remains in the optional CLI QA runner.
|
|
205
95
|
|
|
206
|
-
##
|
|
207
|
-
|
|
208
|
-
The frontend build is ordinary static output, so `build/client/` can live next to `backend/`, `composer.json`, or existing PHP entry points. Mozole does not install or require PHP. The verifier list is ecosystem-neutral, allowing PHP checks to be added without changing the TypeScript pipeline. CCE can continue indexing the combined repository where its installed grammar set supports the source language.
|
|
209
|
-
|
|
210
|
-
## Windows and Linux
|
|
211
|
-
|
|
212
|
-
All filesystem work uses Node path/fs APIs. Child processes receive structured argument arrays with `shell: false`; Windows uses `.cmd` executable resolution and `taskkill /T`, while POSIX systems use process groups. Paths are never interpolated into shell commands. CI runs lint, strict typecheck, unit/integration tests, compilation, a real project generation, static-route assertions, and screenshot-free browser QA on native Windows and Ubuntu runners.
|
|
213
|
-
|
|
214
|
-
## Development and release
|
|
96
|
+
## Development
|
|
215
97
|
|
|
216
98
|
```sh
|
|
217
99
|
npm ci
|
|
@@ -221,4 +103,6 @@ npm run test:smoke
|
|
|
221
103
|
npm pack --dry-run
|
|
222
104
|
```
|
|
223
105
|
|
|
224
|
-
The
|
|
106
|
+
The CI matrix runs on native Windows and Ubuntu with PHP. It covers real PHP routing, method handling, syntax failures, deployment replacement and rollback, default scaffold isolation, agent-file wiring, conservative adoption, and generated frontend/PHP/optimized projects. The optimized smoke scenario skips CCE initialization; live CCE installation is covered separately with runtime fixtures.
|
|
107
|
+
|
|
108
|
+
Subprocesses use argument arrays and `shell: false`. Persisted configuration, state, and telemetry use temporary files and atomic replacement. Dependency versions are pinned centrally in `src/version.ts`.
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAeA,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,OAAO,CAOT;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAeA,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,OAAO,CAOT;AAqCD,wBAAsB,IAAI,CACxB,IAAI,WAAwB,EAC5B,GAAG,SAAgB,GAClB,OAAO,CAAC,MAAM,CAAC,CAiJjB"}
|
package/dist/cli.js
CHANGED
|
@@ -25,8 +25,8 @@ export function isCliEntrypoint(entryUrl, invokedPath) {
|
|
|
25
25
|
const help = `mozole ${CLI_VERSION}
|
|
26
26
|
|
|
27
27
|
Usage:
|
|
28
|
-
mozole new <name> [--
|
|
29
|
-
mozole adopt <path> [--verbose]
|
|
28
|
+
mozole new <name> [--backend] [--cce-install] [--verbose]
|
|
29
|
+
mozole adopt <path> [--cce-install] [--verbose]
|
|
30
30
|
mozole cce install [--verbose]
|
|
31
31
|
mozole doctor [--verbose]
|
|
32
32
|
mozole verify [--force] [--verbose]
|
|
@@ -34,6 +34,15 @@ Usage:
|
|
|
34
34
|
mozole stats [--verbose]
|
|
35
35
|
mozole ui
|
|
36
36
|
mozole logs [name] [--raw]`;
|
|
37
|
+
function parseCliArgs(args, allowedFlags = [], isAllowedFlag) {
|
|
38
|
+
const clean = args.filter((arg) => Boolean(arg));
|
|
39
|
+
const positional = clean.filter((arg) => !arg.startsWith("-"));
|
|
40
|
+
const flags = clean.filter((arg) => arg.startsWith("-"));
|
|
41
|
+
const verbose = flags.includes("--verbose") || flags.includes("-v");
|
|
42
|
+
const allowed = new Set(["--verbose", "-v", ...allowedFlags]);
|
|
43
|
+
const unknown = flags.filter((flag) => !allowed.has(flag) && !isAllowedFlag?.(flag));
|
|
44
|
+
return { positional, flags, unknown, verbose };
|
|
45
|
+
}
|
|
37
46
|
export async function main(args = process.argv.slice(2), cwd = process.cwd()) {
|
|
38
47
|
const [command, value, ...rest] = args;
|
|
39
48
|
if (!command ||
|
|
@@ -48,79 +57,67 @@ export async function main(args = process.argv.slice(2), cwd = process.cwd()) {
|
|
|
48
57
|
return 0;
|
|
49
58
|
}
|
|
50
59
|
if (command === "new") {
|
|
51
|
-
const flags = [value, ...rest]
|
|
52
|
-
const positional = flags.filter((flag) => !flag.startsWith("-"));
|
|
53
|
-
const unknown = flags.filter((flag) => flag.startsWith("-") &&
|
|
54
|
-
flag !== "--with-admin" &&
|
|
55
|
-
flag !== "--scaffold" &&
|
|
56
|
-
flag !== "--verbose" &&
|
|
57
|
-
flag !== "-v");
|
|
60
|
+
const { positional, flags, unknown, verbose } = parseCliArgs([value, ...rest], ["--backend", "--cce-install", "--install-cce", "--scaffold"]);
|
|
58
61
|
if (unknown.length || positional.length > 1) {
|
|
59
62
|
console.error(`Unknown option: ${unknown[0] ?? positional[1]}`);
|
|
60
63
|
return 2;
|
|
61
64
|
}
|
|
62
|
-
const
|
|
65
|
+
const cceInstall = flags.includes("--cce-install") || flags.includes("--install-cce");
|
|
66
|
+
const backend = flags.includes("--backend");
|
|
67
|
+
const scaffold = flags.includes("--scaffold");
|
|
63
68
|
return newCommand(positional[0], cwd, console, {
|
|
64
|
-
withAdmin: flags.includes("--with-admin"),
|
|
65
|
-
scaffold: flags.includes("--scaffold"),
|
|
66
69
|
verbose,
|
|
70
|
+
cceInstall,
|
|
71
|
+
backend,
|
|
72
|
+
scaffold,
|
|
67
73
|
});
|
|
68
74
|
}
|
|
69
75
|
if (command === "adopt") {
|
|
70
|
-
const flags = [value, ...rest]
|
|
71
|
-
const positional = flags.filter((flag) => !flag.startsWith("-"));
|
|
72
|
-
const unknown = flags.filter((flag) => flag.startsWith("-") && flag !== "--verbose" && flag !== "-v");
|
|
76
|
+
const { positional, unknown, verbose, flags } = parseCliArgs([value, ...rest], ["--cce-install", "--install-cce"]);
|
|
73
77
|
if (unknown.length || positional.length > 1) {
|
|
74
78
|
console.error(`Unknown option: ${unknown[0] ?? positional[1]}`);
|
|
75
79
|
return 2;
|
|
76
80
|
}
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
return adoptCommand(positional[0], cwd, console, {
|
|
82
|
+
verbose,
|
|
83
|
+
cceInstall: flags.includes("--cce-install") || flags.includes("--install-cce"),
|
|
84
|
+
});
|
|
79
85
|
}
|
|
80
86
|
if (command === "cce") {
|
|
81
|
-
const
|
|
82
|
-
const positional = flags.filter((flag) => !flag.startsWith("-"));
|
|
83
|
-
const unknown = flags.filter((flag) => flag.startsWith("-") && flag !== "--verbose" && flag !== "-v");
|
|
87
|
+
const { positional, unknown, verbose } = parseCliArgs([value, ...rest]);
|
|
84
88
|
if (positional[0] !== "install" ||
|
|
85
89
|
positional.length > 1 ||
|
|
86
90
|
unknown.length) {
|
|
87
91
|
console.error("Usage: mozole cce install [--verbose]");
|
|
88
92
|
return 2;
|
|
89
93
|
}
|
|
90
|
-
const verbose = flags.includes("--verbose") || flags.includes("-v");
|
|
91
94
|
return cceInstallCommand(cwd, console, { verbose });
|
|
92
95
|
}
|
|
93
96
|
if (command === "doctor") {
|
|
94
|
-
const
|
|
95
|
-
const unknown = flags.filter((flag) => flag !== "--verbose" && flag !== "-v");
|
|
97
|
+
const { unknown, verbose } = parseCliArgs([value, ...rest]);
|
|
96
98
|
if (unknown.length) {
|
|
97
99
|
console.error(`Unknown doctor option: ${unknown[0]}`);
|
|
98
100
|
return 2;
|
|
99
101
|
}
|
|
100
|
-
const verbose = flags.includes("--verbose") || flags.includes("-v");
|
|
101
102
|
return doctorCommand(cwd, console, { verbose });
|
|
102
103
|
}
|
|
103
104
|
if (command === "verify") {
|
|
104
|
-
const flags = [value, ...rest]
|
|
105
|
-
const unknown = flags.filter((flag) => flag !== "--force" && flag !== "--verbose" && flag !== "-v");
|
|
105
|
+
const { flags, unknown, verbose } = parseCliArgs([value, ...rest], ["--force"]);
|
|
106
106
|
if (unknown.length) {
|
|
107
107
|
console.error(`Unknown verify option: ${unknown[0]}`);
|
|
108
108
|
return 2;
|
|
109
109
|
}
|
|
110
|
-
const verbose = flags.includes("--verbose") || flags.includes("-v");
|
|
111
110
|
return verifyCommand(cwd, console, {
|
|
112
111
|
force: flags.includes("--force"),
|
|
113
112
|
verbose,
|
|
114
113
|
});
|
|
115
114
|
}
|
|
116
115
|
if (command === "stats") {
|
|
117
|
-
const
|
|
118
|
-
const unknown = flags.filter((flag) => flag !== "--verbose" && flag !== "-v");
|
|
116
|
+
const { unknown, verbose } = parseCliArgs([value, ...rest]);
|
|
119
117
|
if (unknown.length) {
|
|
120
118
|
console.error(`Unknown stats option: ${unknown[0]}`);
|
|
121
119
|
return 2;
|
|
122
120
|
}
|
|
123
|
-
const verbose = flags.includes("--verbose") || flags.includes("-v");
|
|
124
121
|
return statsCommand(cwd, console, { verbose });
|
|
125
122
|
}
|
|
126
123
|
if (command === "ui") {
|
|
@@ -131,11 +128,9 @@ export async function main(args = process.argv.slice(2), cwd = process.cwd()) {
|
|
|
131
128
|
return uiCommand(cwd);
|
|
132
129
|
}
|
|
133
130
|
if (command === "logs") {
|
|
134
|
-
const flags = [value, ...rest]
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (unknown || positional.length > 1) {
|
|
138
|
-
console.error(`Unknown logs option: ${unknown ?? positional[1]}`);
|
|
131
|
+
const { positional, flags, unknown } = parseCliArgs([value, ...rest], ["--raw"]);
|
|
132
|
+
if (unknown.length || positional.length > 1) {
|
|
133
|
+
console.error(`Unknown logs option: ${unknown[0] ?? positional[1]}`);
|
|
139
134
|
return 2;
|
|
140
135
|
}
|
|
141
136
|
const name = positional[0];
|
|
@@ -144,15 +139,7 @@ export async function main(args = process.argv.slice(2), cwd = process.cwd()) {
|
|
|
144
139
|
if (command === "governor" && value === "hook")
|
|
145
140
|
return governorHookCommand();
|
|
146
141
|
if (command === "qa") {
|
|
147
|
-
const flags = [value, ...rest]
|
|
148
|
-
const unknown = flags.filter((flag) => ![
|
|
149
|
-
"--interactive",
|
|
150
|
-
"--visual",
|
|
151
|
-
"--diff",
|
|
152
|
-
"--force",
|
|
153
|
-
"--verbose",
|
|
154
|
-
"-v",
|
|
155
|
-
].includes(flag) && !flag.startsWith("--reason="));
|
|
142
|
+
const { flags, unknown, verbose } = parseCliArgs([value, ...rest], ["--interactive", "--visual", "--diff", "--force"], (flag) => flag.startsWith("--reason="));
|
|
156
143
|
if (unknown.length) {
|
|
157
144
|
console.error(`Unknown QA option: ${unknown[0]}`);
|
|
158
145
|
return 2;
|
|
@@ -161,7 +148,6 @@ export async function main(args = process.argv.slice(2), cwd = process.cwd()) {
|
|
|
161
148
|
console.error("QA --diff requires --visual.");
|
|
162
149
|
return 2;
|
|
163
150
|
}
|
|
164
|
-
const verbose = flags.includes("--verbose") || flags.includes("-v");
|
|
165
151
|
const reasonFlag = flags.find((flag) => flag.startsWith("--reason="));
|
|
166
152
|
const reason = reasonFlag
|
|
167
153
|
? reasonFlag.slice("--reason=".length)
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,UAAU,eAAe,CAC7B,QAAgB,EAChB,WAA+B;IAE/B,IAAI,CAAC,WAAW;QAAE,OAAO,KAAK,CAAC;IAC/B,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,YAAY,CAAC,WAAW,CAAC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,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5D,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;YAC9C,OAAO,CAAC,CAAC;QACX,CAAC;QACD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;QACtE,MAAM,MAAM,GAAG,UAAU;YACvB,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;YACtC,CAAC,CAAC,SAAS,CAAC;QACd,OAAO,SAAS,CACd,GAAG,EACH;YACE,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC;YAC5C,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;YAClC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAC9B,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;YAChC,OAAO;YACP,MAAM;SACP,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,OAAO,IAAI,EAAE,CAAC,CAAC;IACxD,OAAO,CAAC,CAAC;AACX,CAAC;AACD,IAAI,eAAe,CAAC,OAAO,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACnD,OAAO,CAAC,QAAQ,GAAG,MAAM,IAAI,EAAE,CAAC"}
|
package/dist/commands/adopt.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Output } from "../output.js";
|
|
|
2
2
|
import { type ProgressState } from "../progress.js";
|
|
3
3
|
export declare function detectRoutes(source: string): string[];
|
|
4
4
|
export declare function adoptCommand(input: string | undefined, cwd: string, output?: Output, options?: {
|
|
5
|
+
cceInstall?: boolean | undefined;
|
|
5
6
|
verbose?: boolean | undefined;
|
|
6
7
|
onProgress?: ((state: ProgressState) => void) | undefined;
|
|
7
8
|
}): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/commands/adopt.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/commands/adopt.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,gBAAgB,CAAC;AAyFlE,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAKrD;AA+KD,wBAAsB,YAAY,CAChC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,GAAG,EAAE,MAAM,EACX,MAAM,GAAE,MAAgB,EACxB,OAAO,GAAE;IACP,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACtD,GACL,OAAO,CAAC,MAAM,CAAC,CA6TjB"}
|