@datarails-ai/dr-appspace-cli 0.12.9 → 0.12.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/dist/cli.js +13 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import { fileURLToPath as fileURLToPath6 } from "url";
13
13
  // package.json
14
14
  var package_default = {
15
15
  name: "@datarails-ai/dr-appspace-cli",
16
- version: "0.12.9",
16
+ version: "0.12.11",
17
17
  description: "Datarails App Space CLI \u2014 build, try, push and publish App Space apps",
18
18
  type: "module",
19
19
  engines: {
@@ -57,7 +57,7 @@ var package_default = {
57
57
  };
58
58
 
59
59
  // src/buildInfo.ts
60
- var BUILD_TIME = "2026-10-14T12:00:52.784Z";
60
+ var BUILD_TIME = "2026-10-14T19:55:58.887Z";
61
61
  function formatBuildTime(iso) {
62
62
  if (iso === "") return "";
63
63
  const d = new Date(iso);
@@ -28379,8 +28379,7 @@ async function runShipOntoLive(dir, opts) {
28379
28379
  if (!hasServer(opts)) {
28380
28380
  return refuse("needs a server: pass -s <server> (or set DR_APP_SPACE_HOST), or log in so a stored session supplies one.");
28381
28381
  }
28382
- let createGuarded = true;
28383
- for (let attempt = 1; attempt <= ONTO_LIVE_ATTEMPTS; attempt += 1) {
28382
+ return landWithRetries(async (createGuarded) => {
28384
28383
  for (const name of ONTO_LIVE_OWNED) await rm4(join15(dir, name), { recursive: true, force: true });
28385
28384
  const client = await connect(opts);
28386
28385
  let pulled;
@@ -28402,9 +28401,15 @@ async function runShipOntoLive(dir, opts) {
28402
28401
  );
28403
28402
  }
28404
28403
  const code = await runCompile(dir, { ...opts, check: false, push: true, updateBlock: true, ontoLive: true });
28405
- const refused = code === 3 ? await lostRaceOf(dir) : null;
28406
- if (refused === null) return code;
28407
- if (pulled === null && createGuarded && refused.race === "stale" && refused.current === null) {
28404
+ return { code, lost: code === 3 ? await lostRaceOf(dir) : null, creating: pulled === null };
28405
+ }, opts);
28406
+ }
28407
+ async function landWithRetries(tryOnce, opts, sleep2 = (ms) => new Promise((done) => setTimeout(done, ms))) {
28408
+ let createGuarded = true;
28409
+ for (let attempt = 1; attempt <= ONTO_LIVE_ATTEMPTS; attempt += 1) {
28410
+ const { code, lost, creating } = await tryOnce(createGuarded);
28411
+ if (lost === null) return code;
28412
+ if (creating && createGuarded && lost.race === "stale" && lost.current === null) {
28408
28413
  createGuarded = false;
28409
28414
  if (opts.json !== true) {
28410
28415
  process.stdout.write(
@@ -28420,7 +28425,7 @@ async function runShipOntoLive(dir, opts) {
28420
28425
  `
28421
28426
  );
28422
28427
  }
28423
- await new Promise((done) => setTimeout(done, ontoLiveBackoff(attempt)));
28428
+ await sleep2(ontoLiveBackoff(attempt));
28424
28429
  }
28425
28430
  process.stderr.write(
28426
28431
  `ship --onto-live: ${String(ONTO_LIVE_ATTEMPTS)} attempts, and another landing got there first every time. Nothing of this pass is live; run the same command again.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarails-ai/dr-appspace-cli",
3
- "version": "0.12.9",
3
+ "version": "0.12.11",
4
4
  "description": "Datarails App Space CLI — build, try, push and publish App Space apps",
5
5
  "type": "module",
6
6
  "engines": {