@mmnto/cli 1.43.4 → 1.43.5
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.
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import * as os from 'node:os';
|
|
2
4
|
import * as path from 'node:path';
|
|
3
|
-
import { describe, expect, it } from 'vitest';
|
|
5
|
+
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
|
6
|
+
import { cleanTmpDir } from '../test-utils.js';
|
|
4
7
|
/**
|
|
5
8
|
* Integration tests for the `review` command registration and
|
|
6
9
|
* the deprecated `shield` alias. Uses the built CLI dist output.
|
|
10
|
+
*
|
|
11
|
+
* The spawn cwd is a freshly-created tmp directory outside the totem repo so
|
|
12
|
+
* `shieldCommand`'s silent `upgradePrePushHookIfNeeded` resolves a null git
|
|
13
|
+
* root and short-circuits — without that isolation the test mutates the real
|
|
14
|
+
* `.git/hooks/pre-push` mid-run (mmnto-ai/totem#1942).
|
|
7
15
|
*/
|
|
8
16
|
describe('review command alias', () => {
|
|
17
|
+
// Resolve dist path against the test's working directory BEFORE we switch
|
|
18
|
+
// spawn cwd — `path.resolve` snapshots cwd, so the absolute dist path
|
|
19
|
+
// remains stable even when child processes run from elsewhere.
|
|
9
20
|
const distEntry = path.resolve(process.cwd(), 'dist/index.js');
|
|
21
|
+
let isolatedCwd;
|
|
22
|
+
beforeAll(() => {
|
|
23
|
+
isolatedCwd = fs.mkdtempSync(path.join(os.tmpdir(), 'totem-review-alias-'));
|
|
24
|
+
});
|
|
25
|
+
afterAll(() => {
|
|
26
|
+
cleanTmpDir(isolatedCwd);
|
|
27
|
+
});
|
|
10
28
|
const cli = (args) => {
|
|
11
29
|
// totem-context: test helper — args are hardcoded test strings, not user input
|
|
12
30
|
const result = spawnSync('node', [distEntry, ...args.split(' ')], {
|
|
13
|
-
cwd:
|
|
31
|
+
cwd: isolatedCwd,
|
|
14
32
|
encoding: 'utf-8',
|
|
15
33
|
timeout: 10_000,
|
|
16
34
|
env: { ...process.env, NODE_NO_WARNINGS: '1' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-alias.test.js","sourceRoot":"","sources":["../../src/commands/review-alias.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"review-alias.test.js","sourceRoot":"","sources":["../../src/commands/review-alias.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;;GAQG;AACH,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,0EAA0E;IAC1E,sEAAsE;IACtE,+DAA+D;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,eAAe,CAAC,CAAC;IAE/D,IAAI,WAAmB,CAAC;IAExB,SAAS,CAAC,GAAG,EAAE;QACb,WAAW,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,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G,CAAC,eAAe,CAAC,CAAC;QACxC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QAC7C,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,iEAAiE;QACjE,+DAA+D;QAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC;QACjC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC;QACzD,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mmnto/cli",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.5",
|
|
4
4
|
"description": "CLI for Totem — AI persistent memory and context layer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"smol-toml": "^1.6.1",
|
|
25
25
|
"yaml": "^2.4.0",
|
|
26
26
|
"zod": "^3.24.0",
|
|
27
|
-
"@mmnto/totem": "1.43.
|
|
27
|
+
"@mmnto/totem": "1.43.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@anthropic-ai/sdk": "^0.78.0",
|