@mmnto/cli 1.124.0 → 2.1.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/dist/commands/describe.d.ts +13 -1
- package/dist/commands/describe.d.ts.map +1 -1
- package/dist/commands/describe.js +29 -1
- package/dist/commands/describe.js.map +1 -1
- package/dist/commands/describe.test.js +86 -3
- package/dist/commands/describe.test.js.map +1 -1
- package/dist/commands/doctor.d.ts +16 -10
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +162 -54
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.js +444 -28
- package/dist/commands/doctor.test.js.map +1 -1
- package/dist/commands/hook-totemdir-render.test.js +55 -1
- package/dist/commands/hook-totemdir-render.test.js.map +1 -1
- package/dist/commands/init-templates.d.ts +2 -2
- package/dist/commands/init-templates.d.ts.map +1 -1
- package/dist/commands/init-templates.js +2 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +39 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.test.js +32 -0
- package/dist/commands/init.test.js.map +1 -1
- package/dist/commands/install-hooks-exit-contract.test.js +32 -1
- package/dist/commands/install-hooks-exit-contract.test.js.map +1 -1
- package/dist/commands/install-hooks.d.ts +143 -10
- package/dist/commands/install-hooks.d.ts.map +1 -1
- package/dist/commands/install-hooks.js +596 -92
- package/dist/commands/install-hooks.js.map +1 -1
- package/dist/commands/install-hooks.test.js +1535 -19
- package/dist/commands/install-hooks.test.js.map +1 -1
- package/dist/commands/legs.d.ts +35 -7
- package/dist/commands/legs.d.ts.map +1 -1
- package/dist/commands/legs.js +26 -7
- package/dist/commands/legs.js.map +1 -1
- package/dist/commands/legs.test.js +87 -0
- package/dist/commands/legs.test.js.map +1 -1
- package/dist/commands/release-train-shape.test.d.ts +2 -0
- package/dist/commands/release-train-shape.test.d.ts.map +1 -0
- package/dist/commands/release-train-shape.test.js +226 -0
- package/dist/commands/release-train-shape.test.js.map +1 -0
- package/dist/commands/spec-templates.d.ts +17 -4
- package/dist/commands/spec-templates.d.ts.map +1 -1
- package/dist/commands/spec-templates.js +23 -3
- package/dist/commands/spec-templates.js.map +1 -1
- package/dist/commands/spec.d.ts +57 -8
- package/dist/commands/spec.d.ts.map +1 -1
- package/dist/commands/spec.js +124 -28
- package/dist/commands/spec.js.map +1 -1
- package/dist/commands/spec.test.js +277 -44
- package/dist/commands/spec.test.js.map +1 -1
- package/dist/commands/tools-hook-parity.test.js +200 -0
- package/dist/commands/tools-hook-parity.test.js.map +1 -1
- package/dist/utils.d.ts +5 -3
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/utils.test.js +8 -3
- package/dist/utils.test.js.map +1 -1
- package/package.json +2 -2
|
@@ -1365,6 +1365,38 @@ describe('initCommand non-interactive mode (mmnto-ai/totem#2601)', () => {
|
|
|
1365
1365
|
await initCommand({});
|
|
1366
1366
|
expect(stderr.join('\n')).toContain('coexists with the managed SessionStart.cjs');
|
|
1367
1367
|
}, 60000);
|
|
1368
|
+
// Both rewrite actions were SILENT in init's summary before mmnto-ai/totem#2753:
|
|
1369
|
+
// a stale hook was repaired and nothing said so, which is how a consumer read
|
|
1370
|
+
// "Upgraded reflexes" beside hooks that had not moved (mmnto-ai/liquid-city#1174).
|
|
1371
|
+
it('reports BOTH hook rewrite actions in the summary', async () => {
|
|
1372
|
+
Object.defineProperty(process.stdin, 'isTTY', { value: false, configurable: true });
|
|
1373
|
+
spawnSync('git', ['init'], { cwd: tmpDir, stdio: 'ignore' });
|
|
1374
|
+
const hooksDir = path.join(tmpDir, '.git', 'hooks');
|
|
1375
|
+
fs.mkdirSync(hooksDir, { recursive: true });
|
|
1376
|
+
const { TOTEM_PRECOMMIT_END, TOTEM_PRECOMMIT_MARKER, TOTEM_PREPUSH_END, TOTEM_PREPUSH_MARKER } = await import('./install-hooks.js');
|
|
1377
|
+
// pre-commit: stale block + the liquid-city attested extension → the in-place
|
|
1378
|
+
// rewrite that carries the extension through.
|
|
1379
|
+
const attested = [
|
|
1380
|
+
'',
|
|
1381
|
+
'# [lc] docs-inject extension',
|
|
1382
|
+
'# <!-- totem:fork reason="lc docs-inject pre-commit extension (divergence-census justified fork)" owner="satur8d" attested="2026-06-07" -->',
|
|
1383
|
+
'sh "tools/git-hooks/pre-commit-docs-inject.sh"',
|
|
1384
|
+
'',
|
|
1385
|
+
].join('\n');
|
|
1386
|
+
fs.writeFileSync(path.join(hooksDir, 'pre-commit'), `#!/bin/sh\n# ${TOTEM_PRECOMMIT_MARKER}\nstale body\n# ${TOTEM_PRECOMMIT_END}\n${attested}`);
|
|
1387
|
+
// pre-push: a stale totem-owned whole file → the #2138 whole-file drift-repair.
|
|
1388
|
+
fs.writeFileSync(path.join(hooksDir, 'pre-push'), `#!/bin/sh\n# ${TOTEM_PREPUSH_MARKER}\nstale body\n# ${TOTEM_PREPUSH_END}\n`);
|
|
1389
|
+
const stderr = [];
|
|
1390
|
+
vi.spyOn(console, 'error').mockImplementation((...args) => {
|
|
1391
|
+
stderr.push(args.map(String).join(' '));
|
|
1392
|
+
});
|
|
1393
|
+
await initCommand({});
|
|
1394
|
+
const output = stderr.join('\n');
|
|
1395
|
+
expect(output).toContain('Drift-repaired main-branch protection (managed block rewritten in place; your attested extension after the end marker carried through unchanged)');
|
|
1396
|
+
expect(output).toContain('Drift-repaired deterministic shield gate (totem-owned bounded region)');
|
|
1397
|
+
// The extension itself survived on disk.
|
|
1398
|
+
expect(fs.readFileSync(path.join(hooksDir, 'pre-commit'), 'utf-8')).toContain('sh "tools/git-hooks/pre-commit-docs-inject.sh"');
|
|
1399
|
+
}, 60000);
|
|
1368
1400
|
it('runs to completion with --yes on a TTY', async () => {
|
|
1369
1401
|
Object.defineProperty(process.stdin, 'isTTY', { value: true, configurable: true });
|
|
1370
1402
|
await initCommand({ yes: true });
|