diff --git a/packages/dev-env/package.json b/packages/dev-env/package.json index 28a13b69b1d..80f2b06a747 100644 --- a/packages/dev-env/package.json +++ b/packages/dev-env/package.json @@ -36,6 +36,7 @@ "@atproto/xrpc-server": "workspace:^", "@did-plc/lib": "^0.0.1", "@did-plc/server": "^0.0.1", + "axios": "^0.27.2", "better-sqlite3": "^7.6.2", "chalk": "^5.0.1", "dotenv": "^16.0.3", diff --git a/packages/dev-env/src/util.ts b/packages/dev-env/src/util.ts index 7e3f275ca98..7d6091023f6 100644 --- a/packages/dev-env/src/util.ts +++ b/packages/dev-env/src/util.ts @@ -1,3 +1,4 @@ +import axios from 'axios' import { IdResolver } from '@atproto/identity' import { TestPds } from './pds' import { TestBsky } from './bsky' @@ -39,8 +40,8 @@ export const mockResolvers = (idResolver: IdResolver, pds: TestPds) => { const url = `${pds.url}/.well-known/atproto-did` try { - const res = await fetch(url, { headers: { host: handle } }) - return await res.text() + const res = await axios.get(url, { headers: { host: handle } }) + return res.data } catch (err) { return undefined } diff --git a/packages/dev-infra/_common.sh b/packages/dev-infra/_common.sh index 0d66653c878..818c50a7263 100755 --- a/packages/dev-infra/_common.sh +++ b/packages/dev-infra/_common.sh @@ -8,7 +8,9 @@ get_container_id() { exit 1 fi + # first line of jq normalizes for docker compose breaking change, see docker/compose#10958 docker compose -f $compose_file ps --format json --status running \ + | jq -sc '.[] | if type=="array" then .[] else . end' | jq -s \ | jq -r '.[]? | select(.Service == "'${service}'") | .ID' } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c899913626..d48398fe9cb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -364,6 +364,9 @@ importers: '@did-plc/server': specifier: ^0.0.1 version: 0.0.1 + axios: + specifier: ^0.27.2 + version: 0.27.2 better-sqlite3: specifier: ^7.6.2 version: 7.6.2