@lob-ox/core-darwin-x64 0.0.10 → 0.0.11

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/core.cjs +21 -3
  2. package/package.json +1 -1
package/core.cjs CHANGED
@@ -1471,7 +1471,7 @@ var require_version = __commonJS({
1471
1471
  var fs2 = require("node:fs");
1472
1472
  var path2 = require("node:path");
1473
1473
  function guardVersion() {
1474
- if (true) return String("0.0.10");
1474
+ if (true) return String("0.0.11");
1475
1475
  try {
1476
1476
  return JSON.parse(fs2.readFileSync(path2.join(__dirname, "..", "..", "package.json"), "utf8")).version || "unknown";
1477
1477
  } catch {
@@ -8407,7 +8407,13 @@ var require_bootstrap = __commonJS({
8407
8407
  const isBare = policies.isBareCommand(cur);
8408
8408
  if (!isBare) return;
8409
8409
  const d = execPath.resolveDsh();
8410
- if (!d || !d.bin) return;
8410
+ if (!d || !d.bin) {
8411
+ try {
8412
+ host.logger.warn && host.logger.warn("\u539F\u751F DSH \u542F\u52A8\u671F\u7ED1\u5B9A\u8DF3\u8FC7\uFF1A\u672A\u89E3\u6790\u5230\u5165\u53E3\uFF08PATH \u53EF\u80FD\u5C1A\u672A\u767B\u8BB0\uFF09\uFF1Bspawn \u671F\u4F1A\u518D\u6B21\u89E3\u6790");
8413
+ } catch {
8414
+ }
8415
+ return;
8416
+ }
8411
8417
  host.config.command = d.isJs ? [d.runtime || process.execPath, d.bin, ...cmd2.slice(2)] : [d.bin, ...cmd2.slice(2)];
8412
8418
  try {
8413
8419
  host.events && host.events.append(BRAND2.EVENT_HARNESS_COMMAND_BOUND, { from: cur || null, to: host.config.command[1] });
@@ -10761,8 +10767,20 @@ var require_command = __commonJS({
10761
10767
  "use strict";
10762
10768
  var fs2 = require("node:fs");
10763
10769
  var dshCli = require_dsh_cli();
10770
+ var execPath = require_exec_path();
10771
+ var policies = require_policies();
10772
+ function resolveBareCommand(command) {
10773
+ if (!Array.isArray(command) || command.length === 0) return command;
10774
+ const idx = command.length > 1 ? 1 : 0;
10775
+ const cur = command[idx];
10776
+ if (!policies.isBareCommand(cur)) return command;
10777
+ const d = execPath.resolveDsh();
10778
+ if (!d || !d.bin) return command;
10779
+ const rest = command.slice(idx + 1);
10780
+ return d.isJs ? [d.runtime || process.execPath, d.bin, ...rest] : [d.bin, ...rest];
10781
+ }
10764
10782
  function nativeCommand(config, pluginManager) {
10765
- const command = config.command || [];
10783
+ const command = resolveBareCommand(config.command || []);
10766
10784
  const patchFile = pluginManager && pluginManager.overlayFile && fs2.existsSync(pluginManager.overlayFile) ? pluginManager.overlayFile : null;
10767
10785
  const out = [];
10768
10786
  let portSet = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lob-ox/core-darwin-x64",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "DSH lifecycle guard core (Node launcher) for darwin-x64 — requires Node >=18.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {