Skip to content

Commit d1ef26f

Browse files
feat(api): api update
1 parent ce7ea60 commit d1ef26f

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 105
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-ed62f3146ecded3abdc0516037fc1582de7f91ed96ef29d9e36f5d92f25780c1.yml
3-
openapi_spec_hash: 6de1359e14433d1110b8ea1ebe46514a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-7997d2aebc04c657a434b6b1114b61de06f0d873868ee376ac82f5c50d20884f.yml
3+
openapi_spec_hash: 08977f6ad1332cbeb03d95dad748f20a
44
config_hash: acdf4142177ed1932c2d82372693f811

scripts/mock

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"
2121

2222
# Run prism mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
24+
# Pre-install the package so the download doesn't eat into the startup timeout
25+
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version
26+
2427
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
2528

26-
# Wait for server to come online
29+
# Wait for server to come online (max 30s)
2730
echo -n "Waiting for server"
31+
attempts=0
2832
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
33+
attempts=$((attempts + 1))
34+
if [ "$attempts" -ge 300 ]; then
35+
echo
36+
echo "Timed out waiting for Prism server to start"
37+
cat .prism.log
38+
exit 1
39+
fi
2940
echo -n "."
3041
sleep 0.1
3142
done

0 commit comments

Comments
 (0)