@sunasteriskrnd/takumi 1.0.0-dev.41 → 1.0.0-dev.42
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/index.js +16 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19815,7 +19815,7 @@ var package_default;
|
|
|
19815
19815
|
var init_package = __esm(() => {
|
|
19816
19816
|
package_default = {
|
|
19817
19817
|
name: "@sunasteriskrnd/takumi",
|
|
19818
|
-
version: "1.0.0-dev.
|
|
19818
|
+
version: "1.0.0-dev.42",
|
|
19819
19819
|
description: "CLI tool for bootstrapping and managing Takumi projects",
|
|
19820
19820
|
type: "module",
|
|
19821
19821
|
repository: {
|
|
@@ -70641,19 +70641,30 @@ function sessionDebugLogPath(sessionDir) {
|
|
|
70641
70641
|
return join98(sessionDir, DETACH_DEBUG_LOG_NAME);
|
|
70642
70642
|
}
|
|
70643
70643
|
var BUNFS_PREFIX = "/$bunfs/";
|
|
70644
|
+
var REENTRY_VERBS = ["hooks", "hook-exec"];
|
|
70645
|
+
function findReentryVerbIndex(argv) {
|
|
70646
|
+
for (let i = 1;i < argv.length; i++) {
|
|
70647
|
+
if (REENTRY_VERBS.includes(argv[i]))
|
|
70648
|
+
return i;
|
|
70649
|
+
}
|
|
70650
|
+
return -1;
|
|
70651
|
+
}
|
|
70644
70652
|
function resolveInvocationPrefix() {
|
|
70645
70653
|
const argv = process.argv;
|
|
70646
70654
|
const command = process.execPath;
|
|
70647
70655
|
const entry = argv[1];
|
|
70648
70656
|
const isCompiledBunBinary = typeof entry === "string" && entry.startsWith(BUNFS_PREFIX);
|
|
70649
|
-
const
|
|
70650
|
-
if (
|
|
70651
|
-
|
|
70657
|
+
const verbIdx = findReentryVerbIndex(argv);
|
|
70658
|
+
if (verbIdx === -1) {
|
|
70659
|
+
if (isCompiledBunBinary)
|
|
70660
|
+
return { command, prefixArgs: [] };
|
|
70661
|
+
const isScriptEntry = typeof entry === "string" && (entry.endsWith(".ts") || entry.endsWith(".js"));
|
|
70662
|
+
return { command, prefixArgs: isScriptEntry ? [entry] : [] };
|
|
70652
70663
|
}
|
|
70653
70664
|
if (isCompiledBunBinary) {
|
|
70654
70665
|
return { command, prefixArgs: [] };
|
|
70655
70666
|
}
|
|
70656
|
-
const rest = argv.slice(1,
|
|
70667
|
+
const rest = argv.slice(1, verbIdx);
|
|
70657
70668
|
const isSourceMode = typeof entry === "string" && (entry.endsWith(".ts") || entry.endsWith(".js"));
|
|
70658
70669
|
const overrideConfig = process.env.TKM_CONFIG_OVERRIDE;
|
|
70659
70670
|
if (isSourceMode && overrideConfig) {
|