@supacloud/admin 0.7.10 → 0.7.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.
- package/dist/index.js +9 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26400,6 +26400,7 @@ var REMOTE_STAGE_ROOT = "/var/lib/supacloud/upgrade-staging";
|
|
|
26400
26400
|
var REMOTE_RUN_ROOT = "/var/lib/supacloud/upgrade-runs";
|
|
26401
26401
|
var REMOTE_LOG_ROOT = "/var/log/supacloud";
|
|
26402
26402
|
var REMOTE_UPLOAD_ROOT = "/var/tmp";
|
|
26403
|
+
var REMOTE_COMMAND_PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
|
|
26403
26404
|
var POLL_INTERVAL_MS = 2000;
|
|
26404
26405
|
var STATE_READ_ATTEMPTS = 3;
|
|
26405
26406
|
var REMOTE_STATE_READ_TIMEOUT_MS = 15000;
|
|
@@ -26458,11 +26459,12 @@ function buildRemotePreflightScript() {
|
|
|
26458
26459
|
const capabilityFlags = STRICT_GITHUB_CAPABILITY_FLAGS.join(" ");
|
|
26459
26460
|
return [
|
|
26460
26461
|
"set -euo pipefail",
|
|
26461
|
-
|
|
26462
|
+
`PATH=${REMOTE_COMMAND_PATH}`,
|
|
26462
26463
|
"export PATH",
|
|
26463
26464
|
trustedInstalledGithubFunction(),
|
|
26464
26465
|
"test -d /run/systemd/system || { echo 'systemd is not the active init system' >&2; exit 1; }",
|
|
26465
|
-
'for tool in systemctl systemd-run sha256sum stat realpath tar file find sort awk grep timeout flock; do command -v "$tool" >/dev/null 2>&1 || { echo "Required local-upgrade tool is missing: $tool" >&2; exit 127; }; done',
|
|
26466
|
+
'for tool in systemctl systemd-run sha256sum stat realpath tar file find sort awk grep tail timeout flock; do command -v "$tool" >/dev/null 2>&1 || { echo "Required local-upgrade tool is missing: $tool" >&2; exit 127; }; done',
|
|
26467
|
+
"tail -n 0 -- /dev/null >/dev/null 2>&1 || { echo 'A tail implementation with -n and -- support is required' >&2; exit 1; }",
|
|
26466
26468
|
"systemd-run --help | grep -Eq -- '(^|[[:space:]])--collect([=[:space:]]|$)' || { echo 'systemd-run --collect is required' >&2; exit 1; }",
|
|
26467
26469
|
"test -d /run/lock || { echo '/run/lock is unavailable' >&2; exit 1; }",
|
|
26468
26470
|
"test -d /var/lib/supacloud || { echo '/var/lib/supacloud is unavailable' >&2; exit 1; }",
|
|
@@ -26586,7 +26588,7 @@ function upgradeScriptSetup(paths) {
|
|
|
26586
26588
|
"#!/usr/bin/env bash",
|
|
26587
26589
|
"set -euo pipefail",
|
|
26588
26590
|
"umask 077",
|
|
26589
|
-
|
|
26591
|
+
`PATH=${REMOTE_COMMAND_PATH}`,
|
|
26590
26592
|
"export PATH",
|
|
26591
26593
|
`STAGE=${quoteShell2(paths.stage)}`,
|
|
26592
26594
|
`STATUS=${quoteShell2(paths.status)}`,
|
|
@@ -26889,9 +26891,11 @@ async function observeRemoteState(ssh, paths, observation) {
|
|
|
26889
26891
|
}
|
|
26890
26892
|
async function remoteLogTail(ssh, paths) {
|
|
26891
26893
|
const script = [
|
|
26894
|
+
`PATH=${REMOTE_COMMAND_PATH}`,
|
|
26895
|
+
"export PATH",
|
|
26892
26896
|
`LOG=${quoteShell2(paths.log)}`,
|
|
26893
26897
|
`test -f "$LOG" && test ! -L "$LOG" || { echo 'Remote upgrade log is not a regular file' >&2; exit 1; }`,
|
|
26894
|
-
'tail -80 -- "$LOG"'
|
|
26898
|
+
'tail -n 80 -- "$LOG"'
|
|
26895
26899
|
].join(`
|
|
26896
26900
|
`);
|
|
26897
26901
|
const output = await ssh.exec(rootCommand(script), 15000);
|
|
@@ -28980,7 +28984,7 @@ Actions: routes, upsert_route, update_route, delete_route, config, get_certifica
|
|
|
28980
28984
|
// package.json
|
|
28981
28985
|
var package_default = {
|
|
28982
28986
|
name: "@supacloud/admin",
|
|
28983
|
-
version: "0.7.
|
|
28987
|
+
version: "0.7.11",
|
|
28984
28988
|
description: "Platform administration CLI for SupaCloud operators",
|
|
28985
28989
|
type: "module",
|
|
28986
28990
|
main: "./dist/index.js",
|