@supacloud/admin 0.14.0 → 0.14.1

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.
package/README.md CHANGED
@@ -157,8 +157,9 @@ upload-drop paths for reconciliation. Inspect that evidence before retrying and
157
157
  do not retry blindly while the remote transaction may still be running.
158
158
 
159
159
  `--artifact_transport local` accepts only `--github_proxy direct` or `none` and
160
- clears proxy environment variables on both hosts. The legacy server-download
161
- path remains available as `--artifact_transport remote`.
160
+ clears proxy environment variables on both hosts. The server-download path
161
+ remains available as `--artifact_transport remote`; it verifies and executes
162
+ the target Management release as the runner even for Management-only upgrades.
162
163
 
163
164
  With `--artifact_transport remote` (the default), omitting
164
165
  `--edge_runtime_version` retains the Management and Web Console-only upgrade
@@ -175,14 +176,10 @@ command may finish later and then run its own cleanup. Reconcile the reported
175
176
  helper and trusted-root paths and read back deployed versions before deciding
176
177
  whether to retry.
177
178
 
178
- After a capable Management release is active, an exact rollback can use that
179
- active upgrader with explicit older targets, for example:
180
-
181
- ```bash
182
- npx @supacloud/admin ssh upgrade \
183
- --version 0.50.26 \
184
- --edge_runtime_version 0.16.6
185
- ```
179
+ Targets predating the target-bound systemd-unit helper identity command are
180
+ rejected before mutation. A failed transaction still restores its exact frozen
181
+ prior Management/helper/Web identities; an intentional downgrade to a legacy
182
+ release requires a separately reviewed compatibility procedure.
186
183
 
187
184
  Project commands owned by this CLI:
188
185
 
package/dist/index.js CHANGED
@@ -4759,7 +4759,7 @@ var require_utils = __commonJS((exports, module) => {
4759
4759
 
4760
4760
  // node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node
4761
4761
  var require_sshcrypto = __commonJS((exports, module) => {
4762
- module.exports = __require("./sshcrypto-8m50vnmb.node");
4762
+ module.exports = __require("./sshcrypto-vd2k5hq9.node");
4763
4763
  });
4764
4764
 
4765
4765
  // node_modules/ssh2/lib/protocol/crypto/poly1305.js
@@ -27474,6 +27474,7 @@ function upgradeScriptExecution(paths, bundle, request) {
27474
27474
  'install -m 0755 "$RUNNER_ASSET" "$RUNNER"',
27475
27475
  `test "$(sha256sum "$RUNNER"|awk '{print $1}')" = "$(sha256sum "$RUNNER_ASSET"|awk '{print $1}')"`,
27476
27476
  '"$RUNNER" --version | grep -Eq "(^|[^0-9])${MANAGEMENT_VERSION//./\\.}([^0-9]|$)"',
27477
+ `timeout 5s "$RUNNER" --systemd-unit-helper-sha256 | grep -Eq 'SupaCloud systemd-unit helper SHA-256: [0-9a-f]{64}'`,
27477
27478
  `env PATH="$VERIFIER_PATH:$PATH" "$RUNNER" upgrade --yes --target-version ${quoteShell2(request.managementVersion)} --edge-runtime-version ${quoteShell2(request.edgeRuntimeVersion)} --asset-bundle-dir "$BUNDLE"`
27478
27479
  ];
27479
27480
  }
@@ -28060,30 +28061,27 @@ function assertExactStableVersion2(value, fieldName) {
28060
28061
  }
28061
28062
  return value;
28062
28063
  }
28063
- function upgradeEnvAssignments(request) {
28064
+ function upgradeTransactionEnvAssignments(request) {
28064
28065
  return [
28065
- request.version ? `SUPACLOUD_UPGRADE_TAG=${quoteEnvValue(request.version)}` : "",
28066
+ 'SUPACLOUD_UPGRADE_TAG="$TARGET_MANAGEMENT_VERSION"',
28066
28067
  request.edgeRuntimeVersion ? `SUPACLOUD_EDGE_RUNTIME_UPGRADE_TAG=${quoteEnvValue(request.edgeRuntimeVersion)}` : "",
28067
28068
  request.githubProxy ? `SUPACLOUD_GITHUB_PROXY=${quoteEnvValue(request.githubProxy)}` : ""
28068
28069
  ].filter(Boolean).join(" ");
28069
28070
  }
28070
28071
  function componentBootstrapCommands(request) {
28071
- if (!request.edgeRuntimeVersion)
28072
- return [`UPGRADE_RUNNER=${quoteEnvValue("/usr/local/bin/supacloud")}`];
28073
28072
  const managementVersion = request.version || "latest";
28074
28073
  return [
28075
- `ACTIVE_VERSION=$(/usr/local/bin/supacloud --version 2>&1 | grep -Eo '[0-9]+\\.[0-9]+\\.[0-9]+' | head -1 || true)`,
28076
- `UPGRADE_RUNNER=${quoteEnvValue("/usr/local/bin/supacloud")}`,
28077
- `if ! supacloud_version_at_least "$ACTIVE_VERSION" ${quoteEnvValue(MINIMUM_COMPONENT_UPGRADE_VERSION)}; then`,
28078
- ` case "$(uname -m)" in x86_64|amd64) MANAGEMENT_ASSET=supacloud-linux-amd64 ;; aarch64|arm64) MANAGEMENT_ASSET=supacloud-linux-arm64 ;; *) echo 'Unsupported Management architecture' >&2; exit 1 ;; esac`,
28079
- ` STAGED_MANAGEMENT=$(mktemp /tmp/supacloud-management-upgrade.XXXXXX)`,
28080
- ` MANAGEMENT_RELEASE=$(supacloud_fetch_component_release management-api ${quoteEnvValue(managementVersion)} "$MANAGEMENT_ASSET" web-console-build.tar.gz)`,
28081
- ` supacloud_download_release_asset "$MANAGEMENT_RELEASE" "$MANAGEMENT_ASSET" "$STAGED_MANAGEMENT" binary`,
28082
- ` chmod 0755 "$STAGED_MANAGEMENT"`,
28083
- ` STAGED_VERSION=$("$STAGED_MANAGEMENT" --version 2>&1 | grep -Eo '[0-9]+\\.[0-9]+\\.[0-9]+' | head -1 || true)`,
28084
- ` supacloud_version_at_least "$STAGED_VERSION" ${quoteEnvValue(MINIMUM_COMPONENT_UPGRADE_VERSION)} || { echo 'Target Management release lacks Edge Runtime transaction capability' >&2; exit 1; }`,
28085
- ` UPGRADE_RUNNER="$STAGED_MANAGEMENT"`,
28086
- "fi"
28074
+ `case "$(uname -m)" in x86_64|amd64) MANAGEMENT_ASSET=supacloud-linux-amd64 ;; aarch64|arm64) MANAGEMENT_ASSET=supacloud-linux-arm64 ;; *) echo 'Unsupported Management architecture' >&2; exit 1 ;; esac`,
28075
+ `STAGED_MANAGEMENT=$(mktemp /tmp/supacloud-management-upgrade.XXXXXX)`,
28076
+ `MANAGEMENT_RELEASE=$(supacloud_fetch_component_release management-api ${quoteEnvValue(managementVersion)} "$MANAGEMENT_ASSET" web-console-build.tar.gz)`,
28077
+ `supacloud_download_release_asset "$MANAGEMENT_RELEASE" "$MANAGEMENT_ASSET" "$STAGED_MANAGEMENT" binary`,
28078
+ `chmod 0755 "$STAGED_MANAGEMENT"`,
28079
+ `TARGET_MANAGEMENT_VERSION=$(jq -er '.tag_name | capture("^management-api-v(?<version>(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*))$").version' <<< "$MANAGEMENT_RELEASE")`,
28080
+ `STAGED_VERSION=$("$STAGED_MANAGEMENT" --version 2>&1 | grep -Eo '[0-9]+\\.[0-9]+\\.[0-9]+' | head -1 || true)`,
28081
+ `test "$STAGED_VERSION" = "$TARGET_MANAGEMENT_VERSION" || { echo 'Target Management binary version does not match its verified release' >&2; exit 1; }`,
28082
+ `supacloud_version_at_least "$STAGED_VERSION" ${quoteEnvValue(MINIMUM_COMPONENT_UPGRADE_VERSION)} || { echo 'Target Management release lacks component transaction capability' >&2; exit 1; }`,
28083
+ `"$STAGED_MANAGEMENT" --systemd-unit-helper-sha256 >/dev/null 2>&1 || { echo 'Target Management release lacks target-bound systemd-unit helper delivery' >&2; exit 1; }`,
28084
+ `UPGRADE_RUNNER="$STAGED_MANAGEMENT"`
28087
28085
  ];
28088
28086
  }
28089
28087
  function componentPreflightCommands(request) {
@@ -28121,7 +28119,7 @@ function trustedRootPreflightCommands(helperPath) {
28121
28119
  ];
28122
28120
  }
28123
28121
  function buildRootUpgradeScript(request) {
28124
- const envAssignments = upgradeEnvAssignments(request);
28122
+ const envAssignments = upgradeTransactionEnvAssignments(request);
28125
28123
  return [
28126
28124
  "set -euo pipefail",
28127
28125
  "umask 077",
@@ -28142,7 +28140,7 @@ function buildRootUpgradeScript(request) {
28142
28140
  "if ! supacloud_attestation_verifier_available; then supacloud_install_pinned_gh /usr/local/bin/gh; fi",
28143
28141
  "supacloud_attestation_verifier_available || { echo 'Pinned GitHub attestation verifier is unavailable' >&2; exit 1; }",
28144
28142
  ...componentBootstrapCommands(request),
28145
- `${envAssignments ? `env ${envAssignments} ` : ""}"$UPGRADE_RUNNER" upgrade --yes`
28143
+ `env ${envAssignments} "$UPGRADE_RUNNER" upgrade --yes`
28146
28144
  ].join(`
28147
28145
  `);
28148
28146
  }
@@ -31845,7 +31843,7 @@ Actions: list_releases, get_release, upload_release, activate_release`, {
31845
31843
  // package.json
31846
31844
  var package_default = {
31847
31845
  name: "@supacloud/admin",
31848
- version: "0.14.0",
31846
+ version: "0.14.1",
31849
31847
  description: "Platform administration CLI for SupaCloud operators",
31850
31848
  type: "module",
31851
31849
  main: "./dist/index.js",
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/admin",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Platform administration CLI for SupaCloud operators",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
Binary file