@deltrace/cli 0.1.5 → 0.1.6
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/cli.js +49 -14
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const child_process_1 = require("child_process");
|
|
3
39
|
const [cmd, sub] = process.argv.slice(2);
|
|
4
40
|
const help = `
|
|
5
41
|
Deltrace — codebase context compression for AI coding agents
|
|
@@ -14,27 +50,26 @@ const help = `
|
|
|
14
50
|
|
|
15
51
|
docs: deltrace.com
|
|
16
52
|
`;
|
|
53
|
+
function run(script) {
|
|
54
|
+
const result = (0, child_process_1.spawnSync)(process.execPath, [path.join(__dirname, script)], { stdio: 'inherit' });
|
|
55
|
+
process.exit(result.status ?? 0);
|
|
56
|
+
}
|
|
17
57
|
if (!cmd || cmd === 'help' || cmd === '--help' || cmd === '-h') {
|
|
18
58
|
console.log(help);
|
|
19
59
|
process.exit(0);
|
|
20
60
|
}
|
|
21
61
|
if (cmd === 'setup') {
|
|
22
|
-
if (sub === 'claude')
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
require('./login-codex');
|
|
27
|
-
}
|
|
62
|
+
if (sub === 'claude')
|
|
63
|
+
run('login.js');
|
|
64
|
+
else if (sub === 'codex')
|
|
65
|
+
run('login-codex.js');
|
|
28
66
|
else {
|
|
29
|
-
console.error(`
|
|
67
|
+
console.error(` Usage: deltrace setup claude|codex`);
|
|
30
68
|
process.exit(1);
|
|
31
69
|
}
|
|
32
70
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
require('./teardown-codex');
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
console.error(` Unknown command: ${cmd}\n${help}`);
|
|
39
|
-
process.exit(1);
|
|
71
|
+
if (cmd === 'teardown') {
|
|
72
|
+
run('teardown.js');
|
|
40
73
|
}
|
|
74
|
+
console.error(` Unknown command: ${cmd}\n${help}`);
|
|
75
|
+
process.exit(1);
|