@sunasteriskrnd/takumi 1.0.0-dev.41 → 1.0.0-dev.43

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.
Files changed (2) hide show
  1. package/dist/index.js +26 -10
  2. 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.41",
19818
+ version: "1.0.0-dev.43",
19819
19819
  description: "CLI tool for bootstrapping and managing Takumi projects",
19820
19820
  type: "module",
19821
19821
  repository: {
@@ -37591,6 +37591,13 @@ var init_install_error_handler = __esm(() => {
37591
37591
 
37592
37592
  // src/services/package-installer/skills-installer.ts
37593
37593
  import { join as join38 } from "node:path";
37594
+ function buildSkillsScriptEnv() {
37595
+ return {
37596
+ ...process.env,
37597
+ NON_INTERACTIVE: "1",
37598
+ TAKUMI_CLI_VERSION: getPackageVersion2()
37599
+ };
37600
+ }
37594
37601
  async function installSkillsDependencies(skillsDir, options2 = {}) {
37595
37602
  const { skipConfirm = false, withSudo = false } = options2;
37596
37603
  const displayName = "Skills Dependencies";
@@ -37687,7 +37694,7 @@ async function installSkillsDependencies(skillsDir, options2 = {}) {
37687
37694
  logger.info("Installation cancelled by user");
37688
37695
  logger.info("");
37689
37696
  logger.info("\uD83D\uDCD6 Manual Installation Instructions:");
37690
- logger.info(` ${platform3 === "win32" ? `powershell -File "${scriptPath}"` : `bash ${scriptPath}`}`);
37697
+ logger.info(` ${platform3 === "win32" ? `$env:TKM_SKIP_CLI_VERSION_CHECK=1; powershell -File "${scriptPath}"` : `TKM_SKIP_CLI_VERSION_CHECK=1 bash ${scriptPath}`}`);
37691
37698
  logger.info("");
37692
37699
  logger.info("Or see complete guide:");
37693
37700
  logger.info(` ${join38(skillsDir, "INSTALLATION.md")}`);
@@ -37760,10 +37767,7 @@ async function installSkillsDependencies(skillsDir, options2 = {}) {
37760
37767
  }
37761
37768
  }
37762
37769
  }
37763
- const scriptEnv = {
37764
- ...process.env,
37765
- NON_INTERACTIVE: "1"
37766
- };
37770
+ const scriptEnv = buildSkillsScriptEnv();
37767
37771
  if (platform3 === "win32") {
37768
37772
  await executeInteractiveScript("powershell.exe", ["-NoLogo", "-ExecutionPolicy", "Bypass", "-File", scriptPath, "-Y"], {
37769
37773
  timeout: 600000,
@@ -37847,6 +37851,7 @@ async function handleSkillsInstallation(skillsDir, options2 = {}) {
37847
37851
  }
37848
37852
  }
37849
37853
  var init_skills_installer = __esm(() => {
37854
+ init_version_display();
37850
37855
  init_environment();
37851
37856
  init_logger();
37852
37857
  init_install_error_handler();
@@ -70641,19 +70646,30 @@ function sessionDebugLogPath(sessionDir) {
70641
70646
  return join98(sessionDir, DETACH_DEBUG_LOG_NAME);
70642
70647
  }
70643
70648
  var BUNFS_PREFIX = "/$bunfs/";
70649
+ var REENTRY_VERBS = ["hooks", "hook-exec"];
70650
+ function findReentryVerbIndex(argv) {
70651
+ for (let i = 1;i < argv.length; i++) {
70652
+ if (REENTRY_VERBS.includes(argv[i]))
70653
+ return i;
70654
+ }
70655
+ return -1;
70656
+ }
70644
70657
  function resolveInvocationPrefix() {
70645
70658
  const argv = process.argv;
70646
70659
  const command = process.execPath;
70647
70660
  const entry = argv[1];
70648
70661
  const isCompiledBunBinary = typeof entry === "string" && entry.startsWith(BUNFS_PREFIX);
70649
- const hooksIdx = argv.indexOf("hooks");
70650
- if (hooksIdx <= 0) {
70651
- return { command, prefixArgs: [] };
70662
+ const verbIdx = findReentryVerbIndex(argv);
70663
+ if (verbIdx === -1) {
70664
+ if (isCompiledBunBinary)
70665
+ return { command, prefixArgs: [] };
70666
+ const isScriptEntry = typeof entry === "string" && (entry.endsWith(".ts") || entry.endsWith(".js"));
70667
+ return { command, prefixArgs: isScriptEntry ? [entry] : [] };
70652
70668
  }
70653
70669
  if (isCompiledBunBinary) {
70654
70670
  return { command, prefixArgs: [] };
70655
70671
  }
70656
- const rest = argv.slice(1, hooksIdx);
70672
+ const rest = argv.slice(1, verbIdx);
70657
70673
  const isSourceMode = typeof entry === "string" && (entry.endsWith(".ts") || entry.endsWith(".js"));
70658
70674
  const overrideConfig = process.env.TKM_CONFIG_OVERRIDE;
70659
70675
  if (isSourceMode && overrideConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunasteriskrnd/takumi",
3
- "version": "1.0.0-dev.41",
3
+ "version": "1.0.0-dev.43",
4
4
  "description": "CLI tool for bootstrapping and managing Takumi projects",
5
5
  "type": "module",
6
6
  "repository": {