@lob-ox/core-darwin-x64 0.0.3 → 0.0.5

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 +41 -4
  2. package/package.json +1 -1
package/core.cjs CHANGED
@@ -222,6 +222,18 @@ var require_exec_path = __commonJS({
222
222
  }
223
223
  return null;
224
224
  }
225
+ var GLOBAL_APP_DIRNAME = "lobox";
226
+ var GLOBAL_BIN_DIRNAME = "bin";
227
+ function globalInstallRoot(platform, home, env) {
228
+ const pl = platform || process.platform;
229
+ const h = home || os2.homedir();
230
+ const e = env || process.env;
231
+ if (pl === "win32") {
232
+ const appdata = e.APPDATA || path2.join(h, "AppData", "Roaming");
233
+ return path2.join(appdata, GLOBAL_APP_DIRNAME, GLOBAL_BIN_DIRNAME);
234
+ }
235
+ return path2.join(h, ".local", GLOBAL_BIN_DIRNAME);
236
+ }
225
237
  function standardDirs(platform, home, env) {
226
238
  const pl = platform || process.platform;
227
239
  const h = home || os2.homedir();
@@ -329,6 +341,11 @@ var require_exec_path = __commonJS({
329
341
  const js = dshJsIn(o.npmRoot);
330
342
  if (isFile(js)) return asJs(js, null);
331
343
  }
344
+ const gRoot = globalInstallRoot(pl, void 0, env);
345
+ {
346
+ const js = dshJsIn(gRoot);
347
+ if (isFile(js)) return asJs(js, null);
348
+ }
332
349
  return null;
333
350
  }
334
351
  function knownDshEntries(opts) {
@@ -416,7 +433,10 @@ var require_exec_path = __commonJS({
416
433
  dshJsIn,
417
434
  knownDshEntries,
418
435
  commandEntryViolation,
419
- isExecutableFile
436
+ isExecutableFile,
437
+ globalInstallRoot,
438
+ GLOBAL_APP_DIRNAME,
439
+ GLOBAL_BIN_DIRNAME
420
440
  };
421
441
  }
422
442
  });
@@ -1101,7 +1121,7 @@ var require_config = __commonJS({
1101
1121
  stopGraceMs: 1e4,
1102
1122
  portReleaseWaitMs: 1e4,
1103
1123
  apiHost: "127.0.0.1",
1104
- apiPort: 36360,
1124
+ apiPort: 37360,
1105
1125
  portPools: null,
1106
1126
  stateFile: path2.join(SUP, "state.json"),
1107
1127
  logFile: path2.join(SUP, "events", "guard.events.log"),
@@ -1149,10 +1169,19 @@ var require_config = __commonJS({
1149
1169
  return out;
1150
1170
  }
1151
1171
  var DEFAULTS = buildDefaults2(null);
1172
+ var DEPRECATED_API_PORTS = [36360];
1173
+ function isDeprecatedApiPort(v) {
1174
+ const n = Number(v);
1175
+ return Number.isInteger(n) && DEPRECATED_API_PORTS.includes(n);
1176
+ }
1152
1177
  function normalize(raw, ext) {
1153
1178
  const extension = normalizeExtension(ext);
1154
1179
  const provided = raw || {};
1155
1180
  const cfg = Object.assign(buildDefaults2(extension), provided);
1181
+ if (isDeprecatedApiPort(provided.apiPort)) {
1182
+ cfg.apiPort = BASE_DEFAULTS.apiPort;
1183
+ cfg.__deprecatedOverridden = ["apiPort"];
1184
+ }
1156
1185
  cfg.stateFile = expandHome(cfg.stateFile);
1157
1186
  cfg.logFile = expandHome(cfg.logFile);
1158
1187
  cfg.supervisorLogFile = expandHome(cfg.supervisorLogFile);
@@ -1200,7 +1229,15 @@ var require_config = __commonJS({
1200
1229
  }
1201
1230
  return null;
1202
1231
  }
1203
- module2.exports = { DEFAULTS, BASE_DEFAULTS, buildDefaults: buildDefaults2, normalize, extractPortFromCommand };
1232
+ module2.exports = {
1233
+ DEFAULTS,
1234
+ BASE_DEFAULTS,
1235
+ buildDefaults: buildDefaults2,
1236
+ normalize,
1237
+ extractPortFromCommand,
1238
+ DEPRECATED_API_PORTS,
1239
+ isDeprecatedApiPort
1240
+ };
1204
1241
  }
1205
1242
  });
1206
1243
 
@@ -1243,7 +1280,7 @@ var require_version = __commonJS({
1243
1280
  var fs2 = require("node:fs");
1244
1281
  var path2 = require("node:path");
1245
1282
  function guardVersion() {
1246
- if (true) return String("0.0.3");
1283
+ if (true) return String("0.0.5");
1247
1284
  try {
1248
1285
  return JSON.parse(fs2.readFileSync(path2.join(__dirname, "..", "..", "package.json"), "utf8")).version || "unknown";
1249
1286
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lob-ox/core-darwin-x64",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "DSH lifecycle guard core (Node launcher) for darwin-x64 — requires Node >=18.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {