@hobble-env/cli 3.8.0 → 3.9.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/bin/hobble.js
CHANGED
|
@@ -20,7 +20,7 @@ const program = new Command();
|
|
|
20
20
|
program
|
|
21
21
|
.name("hobble")
|
|
22
22
|
.description("CLI for managing secrets via the secret-management-dash API")
|
|
23
|
-
.version("3.
|
|
23
|
+
.version("3.8.0")
|
|
24
24
|
.enablePositionalOptions()
|
|
25
25
|
.option("-v, --verbose", "Show debug output for troubleshooting");
|
|
26
26
|
program.hook("preAction", (thisCommand) => {
|
package/dist/commands/shell.js
CHANGED
|
@@ -2,6 +2,7 @@ import { Command } from "commander";
|
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { rm } from "node:fs/promises";
|
|
5
|
+
import { dirname, join, resolve } from "node:path";
|
|
5
6
|
import { api } from "../lib/api.js";
|
|
6
7
|
import { resolveContext } from "../lib/project-config.js";
|
|
7
8
|
import { resolveProjectId } from "./list.js";
|
|
@@ -46,9 +47,13 @@ export const shellCommand = new Command("shell")
|
|
|
46
47
|
}
|
|
47
48
|
let binDir = null;
|
|
48
49
|
try {
|
|
50
|
+
const scriptPath = process.argv[1];
|
|
51
|
+
const repoRoot = resolve(dirname(scriptPath), "..", "..");
|
|
52
|
+
const tsxPath = join(repoRoot, "node_modules", ".bin", "tsx");
|
|
49
53
|
const wrapper = await writeHobbleBinDir({
|
|
50
54
|
nodePath: process.execPath,
|
|
51
|
-
scriptPath
|
|
55
|
+
scriptPath,
|
|
56
|
+
tsxPath,
|
|
52
57
|
});
|
|
53
58
|
binDir = wrapper.dir;
|
|
54
59
|
}
|
|
@@ -16,10 +16,12 @@ export interface SpawnPlan {
|
|
|
16
16
|
export declare function buildHobbleWrapperScript(opts: {
|
|
17
17
|
nodePath: string;
|
|
18
18
|
scriptPath: string;
|
|
19
|
+
tsxPath?: string;
|
|
19
20
|
}): string;
|
|
20
21
|
export declare function writeHobbleBinDir(opts: {
|
|
21
22
|
nodePath: string;
|
|
22
23
|
scriptPath: string;
|
|
24
|
+
tsxPath?: string;
|
|
23
25
|
}): Promise<{
|
|
24
26
|
dir: string;
|
|
25
27
|
}>;
|
package/dist/lib/shell-prompt.js
CHANGED
|
@@ -65,7 +65,7 @@ export function buildZshRc(opts) {
|
|
|
65
65
|
export function buildHobbleWrapperScript(opts) {
|
|
66
66
|
const quote = (s) => `'${s.replace(/'/g, "'\\''")}'`;
|
|
67
67
|
const cmd = opts.scriptPath.endsWith(".ts")
|
|
68
|
-
? `exec
|
|
68
|
+
? `exec ${quote(opts.tsxPath ?? "tsx")} ${quote(opts.scriptPath)} "$@"`
|
|
69
69
|
: `exec ${quote(opts.nodePath)} ${quote(opts.scriptPath)} "$@"`;
|
|
70
70
|
return `#!/bin/sh\n${cmd}\n`;
|
|
71
71
|
}
|