gramatr 0.3.46 → 0.3.47
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/bin/gramatr.ts +14 -7
- package/core/version.ts +1 -1
- package/package.json +1 -1
package/bin/gramatr.ts
CHANGED
|
@@ -59,33 +59,40 @@ function renderInstallMenu(): IntegrationTargetId[] {
|
|
|
59
59
|
return rendered.targetIds;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
function runTs(script: string): void {
|
|
62
|
+
function runTs(script: string, extraArgs: string[] = []): void {
|
|
63
63
|
const runner = detectTsRunner();
|
|
64
64
|
if (runner === 'bun') {
|
|
65
|
-
run('bun', [script]);
|
|
65
|
+
run('bun', [script, ...extraArgs]);
|
|
66
66
|
} else {
|
|
67
67
|
// Resolve tsx from this package's node_modules (not CWD)
|
|
68
68
|
try {
|
|
69
69
|
const { dirname, join } = require('path');
|
|
70
70
|
const tsxCli = join(dirname(require.resolve('tsx/package.json')), 'dist', 'cli.mjs');
|
|
71
|
-
run(process.execPath, [tsxCli, script]);
|
|
71
|
+
run(process.execPath, [tsxCli, script, ...extraArgs]);
|
|
72
72
|
} catch {
|
|
73
73
|
// Fallback: hope tsx is globally available
|
|
74
|
-
run('npx', ['tsx', script]);
|
|
74
|
+
run('npx', ['tsx', script, ...extraArgs]);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
// Forward flags like --yes, --name, --timezone to sub-installers
|
|
80
|
+
const forwardedFlags = process.argv.slice(2).filter(a =>
|
|
81
|
+
a === '--yes' || a === '-y' || a === '--name' || a === '--timezone' ||
|
|
82
|
+
(process.argv[process.argv.indexOf(a) - 1] === '--name') ||
|
|
83
|
+
(process.argv[process.argv.indexOf(a) - 1] === '--timezone')
|
|
84
|
+
);
|
|
85
|
+
|
|
79
86
|
function installTarget(targetId: IntegrationTargetId): void {
|
|
80
87
|
switch (targetId) {
|
|
81
88
|
case 'claude-code':
|
|
82
|
-
runTs(join(binDir, 'install.ts'));
|
|
89
|
+
runTs(join(binDir, 'install.ts'), forwardedFlags);
|
|
83
90
|
return;
|
|
84
91
|
case 'codex':
|
|
85
|
-
runTs(join(clientDir, 'codex', 'install.ts'));
|
|
92
|
+
runTs(join(clientDir, 'codex', 'install.ts'), forwardedFlags);
|
|
86
93
|
return;
|
|
87
94
|
case 'gemini-cli':
|
|
88
|
-
runTs(join(clientDir, 'gemini', 'install.ts'));
|
|
95
|
+
runTs(join(clientDir, 'gemini', 'install.ts'), forwardedFlags);
|
|
89
96
|
return;
|
|
90
97
|
case 'remote-mcp':
|
|
91
98
|
case 'claude-web':
|
package/core/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Auto-generated by version-sync.ts — do not edit */
|
|
2
|
-
export const VERSION = '0.3.
|
|
2
|
+
export const VERSION = '0.3.47';
|