vela 0.11.0 → 0.11.2
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 +1 -0
- package/dist/bin.js +771 -512
- package/dist/bin.js.map +4 -4
- package/package.json +2 -1
- package/templates/minimal/template.json +2 -1
- package/templates/server/provision.sh +43 -5
- package/templates/static/template.json +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vela",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI for creating and updating SvelteKit projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"pocketbase-server": "^0.39.11",
|
|
51
51
|
"stripe": "^19.3.0",
|
|
52
52
|
"svelte": "^5.56.10",
|
|
53
|
+
"tar": "^7.5.22",
|
|
53
54
|
"tinyexec": "^1.3.0",
|
|
54
55
|
"ts-morph": "^28.0.0",
|
|
55
56
|
"valibot": "^1.4.2"
|
|
@@ -34,10 +34,47 @@ case "${ID:-}" in
|
|
|
34
34
|
esac
|
|
35
35
|
|
|
36
36
|
export DEBIAN_FRONTEND=noninteractive
|
|
37
|
+
# Ubuntu's needrestart hook prints several paragraphs of "Restarting services"
|
|
38
|
+
# chatter to stderr after every install. Nothing vela installs needs a service
|
|
39
|
+
# restart mid-provision, so skip it.
|
|
40
|
+
export NEEDRESTART_SUSPEND=1
|
|
41
|
+
|
|
42
|
+
# A freshly created cloud box is usually still busy on first boot: cloud-init
|
|
43
|
+
# runs its package step and unattended-upgrades kicks off, both holding the
|
|
44
|
+
# dpkg lock. Provisioning that races them fails with "Could not get lock", so
|
|
45
|
+
# wait for first boot to settle before touching apt.
|
|
46
|
+
if command -v cloud-init >/dev/null 2>&1; then
|
|
47
|
+
log "waiting for cloud-init to finish"
|
|
48
|
+
cloud-init status --wait >/dev/null 2>&1 || true
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
APT_LOCK_TIMEOUT=${APT_LOCK_TIMEOUT:-600}
|
|
52
|
+
# Block until no other process holds an apt/dpkg lock, up to APT_LOCK_TIMEOUT
|
|
53
|
+
# seconds. Covers callers that invoke apt-get themselves (the nodesource setup
|
|
54
|
+
# script) and older apt without DPkg::Lock::Timeout support.
|
|
55
|
+
wait_for_apt() {
|
|
56
|
+
local waited=0 announced=0
|
|
57
|
+
command -v fuser >/dev/null 2>&1 || return 0
|
|
58
|
+
while fuser /var/lib/dpkg/lock-frontend /var/lib/dpkg/lock /var/lib/apt/lists/lock >/dev/null 2>&1; do
|
|
59
|
+
[ "$announced" -eq 1 ] || { log "waiting for another apt process to finish"; announced=1; }
|
|
60
|
+
[ "$waited" -lt "$APT_LOCK_TIMEOUT" ] \
|
|
61
|
+
|| die "gave up waiting for the apt lock after ${APT_LOCK_TIMEOUT}s - is unattended-upgrades still running?"
|
|
62
|
+
sleep 2
|
|
63
|
+
waited=$((waited + 2))
|
|
64
|
+
done
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
# Every apt-get call goes through here so a lock held by unattended-upgrades
|
|
68
|
+
# waits instead of failing the whole provision.
|
|
69
|
+
apt_get() {
|
|
70
|
+
wait_for_apt
|
|
71
|
+
apt-get -o DPkg::Lock::Timeout="$APT_LOCK_TIMEOUT" "$@"
|
|
72
|
+
}
|
|
73
|
+
|
|
37
74
|
APT_UPDATED=0
|
|
38
75
|
apt_update_once() {
|
|
39
76
|
[ "$APT_UPDATED" -eq 1 ] && return 0
|
|
40
|
-
|
|
77
|
+
apt_get update -qq
|
|
41
78
|
APT_UPDATED=1
|
|
42
79
|
}
|
|
43
80
|
|
|
@@ -49,7 +86,7 @@ ensure_packages() {
|
|
|
49
86
|
[ ${#missing[@]} -eq 0 ] && return 0
|
|
50
87
|
log "installing ${missing[*]}"
|
|
51
88
|
apt_update_once
|
|
52
|
-
|
|
89
|
+
apt_get install -y -qq --no-install-recommends "${missing[@]}" >/dev/null
|
|
53
90
|
}
|
|
54
91
|
|
|
55
92
|
log "checking base packages"
|
|
@@ -70,9 +107,10 @@ install_node() {
|
|
|
70
107
|
fi
|
|
71
108
|
log "installing Node.js $NODE_MAJOR"
|
|
72
109
|
curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" -o /tmp/nodesource_setup.sh
|
|
110
|
+
wait_for_apt
|
|
73
111
|
bash /tmp/nodesource_setup.sh >/dev/null
|
|
74
112
|
rm -f /tmp/nodesource_setup.sh
|
|
75
|
-
|
|
113
|
+
apt_get install -y -qq nodejs >/dev/null
|
|
76
114
|
}
|
|
77
115
|
install_node
|
|
78
116
|
|
|
@@ -86,8 +124,8 @@ install_caddy() {
|
|
|
86
124
|
| gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
|
|
87
125
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' \
|
|
88
126
|
> /etc/apt/sources.list.d/caddy-stable.list
|
|
89
|
-
|
|
90
|
-
|
|
127
|
+
apt_get update -qq
|
|
128
|
+
apt_get install -y -qq caddy >/dev/null
|
|
91
129
|
APT_UPDATED=1
|
|
92
130
|
}
|
|
93
131
|
install_caddy
|