@crossdelta/platform-sdk 0.25.2 → 0.25.3

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.
@@ -71,10 +71,15 @@ runs:
71
71
  continue
72
72
  fi
73
73
 
74
- # Use npm version if local version isn't published yet (race with publish workflow)
74
+ # Use npm version if local version isn't published yet (race with publish workflow).
75
+ # The manifest is not enough: it lists a version minutes before the tarball is on
76
+ # the CDN, and bun install then gets a 404 for the tarball — and hangs on it instead
77
+ # of failing (2026-09-17, platform-sdk 0.25.2, 36 minutes until the run was cancelled).
78
+ # So the tarball itself has to answer before the local version is trusted.
75
79
  npm_version=$(npm view "$pkg_name" version 2>/dev/null || echo "")
76
- if [ -n "$npm_version" ] && ! npm view "$pkg_name@$pkg_version" version >/dev/null 2>&1; then
77
- echo " $pkg_name@$pkg_version not on npm yet, using ^$npm_version"
80
+ tarball=$(npm view "$pkg_name@$pkg_version" dist.tarball 2>/dev/null || echo "")
81
+ if [ -n "$npm_version" ] && { [ -z "$tarball" ] || ! curl -sfIL --max-time 20 "$tarball" >/dev/null; }; then
82
+ echo " $pkg_name@$pkg_version not downloadable from npm yet, using ^$npm_version"
78
83
  pkg_version="$npm_version"
79
84
  fi
80
85
 
@@ -143,7 +148,11 @@ runs:
143
148
  echo "Regenerating bun.lock for modified workspace..."
144
149
  cp bun.lock bun.lock.bak
145
150
  set +e
146
- NPM_TOKEN="${{ inputs.npm-token }}" bun install --no-progress 2>&1 | tee /tmp/bun-install.log; INSTALL_EXIT=${PIPESTATUS[0]}
151
+ # Bounded: bun install has hung indefinitely after a 404 on a tarball (see above), and an
152
+ # unbounded hang here holds the job until the runner's 6-hour limit. A timeout turns it
153
+ # into the failure path below, which restores the original lockfile.
154
+ NPM_TOKEN="${{ inputs.npm-token }}" timeout 300 bun install --no-progress 2>&1 | tee /tmp/bun-install.log; INSTALL_EXIT=${PIPESTATUS[0]}
155
+ [ "$INSTALL_EXIT" -eq 124 ] && echo "::warning::bun install timed out after 300 s"
147
156
  set -e
148
157
  if [ ! -f bun.lock ] || [ ! -s bun.lock ]; then
149
158
  echo "::warning::bun install (exit $INSTALL_EXIT) produced no valid bun.lock — restoring original so Docker COPY does not fail"
@@ -270,11 +270,16 @@ jobs:
270
270
  group: deploy-job-$\{{ github.ref }}
271
271
  cancel-in-progress: false
272
272
  needs: [gate, build, prepare-scopes]
273
+ # `always()` only so an infrastructure-only run (build skipped) still deploys. A cancelled
274
+ # build must not: its scopes carry no marker, and the marker-less fallback below would then
275
+ # deploy the newest checksum image GHCR holds for them — an older commit, possibly a stage
276
+ # build. That happened on 2026-09-17 (run 35254568199): four app builds cancelled, deploy
277
+ # went ahead on the previous commit's images.
273
278
  if: |
274
279
  always() &&
275
280
  needs.gate.outputs.proceed == 'true' &&
276
281
  needs.prepare-scopes.result == 'success' &&
277
- needs.build.result != 'failure' &&
282
+ (needs.build.result == 'success' || needs.build.result == 'skipped') &&
278
283
  (needs.prepare-scopes.outputs.scope_count != '0' || needs.prepare-scopes.outputs.infrastructure_changed == 'true')
279
284
  name: 🌍 Deploy ($\{{ github.event.inputs.environment || 'stage' }})
280
285
  environment: $\{{ github.event.inputs.environment || 'stage' }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossdelta/platform-sdk",
3
- "version": "0.25.2",
3
+ "version": "0.25.3",
4
4
  "description": "Platform toolkit for event-driven microservices — keeping code and infrastructure in lockstep.",
5
5
  "keywords": [
6
6
  "cli",