@biffo/cli 0.250.2 → 0.250.4
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.
|
@@ -9,6 +9,7 @@ overrides:
|
|
|
9
9
|
sharp@<0.35.0: '>=0.35.0'
|
|
10
10
|
brace-expansion@<5.0.9: '>=5.0.9'
|
|
11
11
|
undici@<7.29.0: '>=7.29.0'
|
|
12
|
+
js-yaml@<4.3.1: '>=4.3.1 <5'
|
|
12
13
|
|
|
13
14
|
importers:
|
|
14
15
|
|
|
@@ -1871,8 +1872,8 @@ packages:
|
|
|
1871
1872
|
js-tokens@4.0.0:
|
|
1872
1873
|
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
|
|
1873
1874
|
|
|
1874
|
-
js-yaml@4.3.
|
|
1875
|
-
resolution: {integrity: sha512-
|
|
1875
|
+
js-yaml@4.3.1:
|
|
1876
|
+
resolution: {integrity: sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==}
|
|
1876
1877
|
hasBin: true
|
|
1877
1878
|
|
|
1878
1879
|
jsdom@30.0.1:
|
|
@@ -2937,7 +2938,7 @@ snapshots:
|
|
|
2937
2938
|
globals: 14.0.0
|
|
2938
2939
|
ignore: 5.3.2
|
|
2939
2940
|
import-fresh: 3.3.1
|
|
2940
|
-
js-yaml: 4.3.
|
|
2941
|
+
js-yaml: 4.3.1
|
|
2941
2942
|
minimatch: 3.1.5
|
|
2942
2943
|
strip-json-comments: 3.1.1
|
|
2943
2944
|
transitivePeerDependencies:
|
|
@@ -3974,8 +3975,8 @@ snapshots:
|
|
|
3974
3975
|
'@typescript-eslint/parser': 8.62.1(eslint@9.39.4)(typescript@5.9.3)
|
|
3975
3976
|
eslint: 9.39.4
|
|
3976
3977
|
eslint-import-resolver-node: 0.3.10
|
|
3977
|
-
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0
|
|
3978
|
-
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1
|
|
3978
|
+
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4)
|
|
3979
|
+
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4)
|
|
3979
3980
|
eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4)
|
|
3980
3981
|
eslint-plugin-react: 7.37.5(eslint@9.39.4)
|
|
3981
3982
|
eslint-plugin-react-hooks: 5.2.0(eslint@9.39.4)
|
|
@@ -3994,7 +3995,7 @@ snapshots:
|
|
|
3994
3995
|
transitivePeerDependencies:
|
|
3995
3996
|
- supports-color
|
|
3996
3997
|
|
|
3997
|
-
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0
|
|
3998
|
+
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4):
|
|
3998
3999
|
dependencies:
|
|
3999
4000
|
'@nolyfill/is-core-module': 1.0.39
|
|
4000
4001
|
debug: 4.4.3
|
|
@@ -4005,22 +4006,22 @@ snapshots:
|
|
|
4005
4006
|
tinyglobby: 0.2.17
|
|
4006
4007
|
unrs-resolver: 1.12.2
|
|
4007
4008
|
optionalDependencies:
|
|
4008
|
-
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1
|
|
4009
|
+
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4)
|
|
4009
4010
|
transitivePeerDependencies:
|
|
4010
4011
|
- supports-color
|
|
4011
4012
|
|
|
4012
|
-
eslint-module-utils@2.14.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1
|
|
4013
|
+
eslint-module-utils@2.14.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4):
|
|
4013
4014
|
dependencies:
|
|
4014
4015
|
debug: 3.2.7
|
|
4015
4016
|
optionalDependencies:
|
|
4016
4017
|
'@typescript-eslint/parser': 8.62.1(eslint@9.39.4)(typescript@5.9.3)
|
|
4017
4018
|
eslint: 9.39.4
|
|
4018
4019
|
eslint-import-resolver-node: 0.3.10
|
|
4019
|
-
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0
|
|
4020
|
+
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4)
|
|
4020
4021
|
transitivePeerDependencies:
|
|
4021
4022
|
- supports-color
|
|
4022
4023
|
|
|
4023
|
-
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1
|
|
4024
|
+
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4):
|
|
4024
4025
|
dependencies:
|
|
4025
4026
|
'@rtsao/scc': 1.1.0
|
|
4026
4027
|
array-includes: 3.1.9
|
|
@@ -4031,7 +4032,7 @@ snapshots:
|
|
|
4031
4032
|
doctrine: 2.1.0
|
|
4032
4033
|
eslint: 9.39.4
|
|
4033
4034
|
eslint-import-resolver-node: 0.3.10
|
|
4034
|
-
eslint-module-utils: 2.14.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1
|
|
4035
|
+
eslint-module-utils: 2.14.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4)
|
|
4035
4036
|
hasown: 2.0.4
|
|
4036
4037
|
is-core-module: 2.16.2
|
|
4037
4038
|
is-glob: 4.0.3
|
|
@@ -4480,7 +4481,7 @@ snapshots:
|
|
|
4480
4481
|
|
|
4481
4482
|
js-tokens@4.0.0: {}
|
|
4482
4483
|
|
|
4483
|
-
js-yaml@4.3.
|
|
4484
|
+
js-yaml@4.3.1:
|
|
4484
4485
|
dependencies:
|
|
4485
4486
|
argparse: 2.0.1
|
|
4486
4487
|
|
package/package.json
CHANGED
package/scripts/pg-test-db.sh
CHANGED
|
@@ -157,6 +157,54 @@ psql_db() { psql -q -h "$HOST" -p "$PORT" -U "$USER_" -d "$DB" "$@"; }
|
|
|
157
157
|
#
|
|
158
158
|
# Started here rather than assumed, because "docker run one yourself" is exactly
|
|
159
159
|
# the tribal knowledge this script replaces. An already-running server is reused.
|
|
160
|
+
# ── Reap abandoned sibling containers ────────────────────────────────────────
|
|
161
|
+
#
|
|
162
|
+
# The container name is keyed to the CHECKOUT (see `CONTAINER` above), which is
|
|
163
|
+
# what makes reuse work -- and also what makes them accumulate: every worktree
|
|
164
|
+
# ever created leaves one behind, running, forever. Nothing ever removed them.
|
|
165
|
+
# Measured on one workstation: 76 live `biffo-pg-test-*` containers holding
|
|
166
|
+
# ~5.4 GiB, the oldest four days old (tabsii-platform#703). That is not merely
|
|
167
|
+
# untidy -- they compete for the same page cache and I/O as the lane being
|
|
168
|
+
# timed, so a leak like this shows up as the pg gate drifting toward its own
|
|
169
|
+
# timeout, which is the failure #703 was actually filed about.
|
|
170
|
+
#
|
|
171
|
+
# Age is the only signal available. Docker records when a container was CREATED,
|
|
172
|
+
# not when it was last used, and `docker ps --filter until=` is a prune filter
|
|
173
|
+
# that this daemon rejects on `ps` -- so the comparison is done here.
|
|
174
|
+
#
|
|
175
|
+
# Reaping something still wanted is cheap and self-correcting: the next run
|
|
176
|
+
# recreates it, which this script's own header prices at ~4s against ~0.3s for
|
|
177
|
+
# reuse. Being wrong therefore costs four seconds, once. Leaving them costs a
|
|
178
|
+
# gigabyte a day.
|
|
179
|
+
#
|
|
180
|
+
# NEVER reaps this checkout's own container, is skipped entirely when the date
|
|
181
|
+
# maths is unavailable rather than guessing, and never fails the run: a
|
|
182
|
+
# housekeeping step that can break a test lane is worse than the mess it clears.
|
|
183
|
+
BIFFO_PG_REAP_HOURS="${BIFFO_PG_REAP_HOURS:-24}"
|
|
184
|
+
if [ "$BIFFO_PG_REAP_HOURS" -gt 0 ] 2>/dev/null && command -v docker >/dev/null 2>&1; then
|
|
185
|
+
# GNU first, then BSD/macOS. If neither answers, say so and skip -- a silent
|
|
186
|
+
# skip here would be the same fail-open this estate keeps finding.
|
|
187
|
+
_reap_cutoff=$(date -u -d "-${BIFFO_PG_REAP_HOURS} hours" +%Y-%m-%dT%H:%M:%S 2>/dev/null) ||
|
|
188
|
+
_reap_cutoff=$(date -u -v-"${BIFFO_PG_REAP_HOURS}"H +%Y-%m-%dT%H:%M:%S 2>/dev/null) || _reap_cutoff=""
|
|
189
|
+
if [ -z "$_reap_cutoff" ]; then
|
|
190
|
+
say "cannot compute a reap cutoff on this date(1); skipping container reaping"
|
|
191
|
+
else
|
|
192
|
+
_reaped=0
|
|
193
|
+
for _c in $(docker ps -a --filter "name=biffo-pg-test-" --format '{{.Names}}' 2>/dev/null); do
|
|
194
|
+
[ "$_c" = "$CONTAINER" ] && continue
|
|
195
|
+
_made=$(docker inspect -f '{{.Created}}' "$_c" 2>/dev/null | cut -c1-19)
|
|
196
|
+
[ -z "$_made" ] && continue
|
|
197
|
+
# Both are UTC ISO-8601 to the second, so a string compare IS a time
|
|
198
|
+
# compare -- no epoch conversion, and portable across date(1) flavours.
|
|
199
|
+
if awk -v a="$_made" -v b="$_reap_cutoff" 'BEGIN { exit !(a < b) }'; then
|
|
200
|
+
docker rm -f "$_c" >/dev/null 2>&1 && _reaped=$((_reaped + 1))
|
|
201
|
+
fi
|
|
202
|
+
done
|
|
203
|
+
[ "$_reaped" -gt 0 ] &&
|
|
204
|
+
say "reaped $_reaped container(s) unused for over ${BIFFO_PG_REAP_HOURS}h (set BIFFO_PG_REAP_HOURS=0 to disable)"
|
|
205
|
+
fi
|
|
206
|
+
fi
|
|
207
|
+
|
|
160
208
|
if ! psql_admin -c 'SELECT 1' >/dev/null 2>&1; then
|
|
161
209
|
if ! command -v docker >/dev/null 2>&1; then
|
|
162
210
|
say "no Postgres at $HOST:$PORT and docker is not installed."
|