From 9108362ca7fca47191d63fe441236e7d44b4c4ad Mon Sep 17 00:00:00 2001 From: dholms Date: Thu, 19 Oct 2023 14:51:21 -0400 Subject: [PATCH] rebase on main --- .github/workflows/repo.yaml | 3 +++ packages/bsky/package.json | 4 ++-- packages/dev-env/package.json | 1 + packages/dev-env/src/util.ts | 5 +++-- packages/dev-infra/_common.sh | 2 ++ packages/pds/package.json | 6 ++--- packages/xrpc-server/package.json | 6 ++--- pnpm-lock.yaml | 37 +++++++++++++++++-------------- 8 files changed, 37 insertions(+), 27 deletions(-) diff --git a/.github/workflows/repo.yaml b/.github/workflows/repo.yaml index 8380fff8a63..b781c895b4f 100644 --- a/.github/workflows/repo.yaml +++ b/.github/workflows/repo.yaml @@ -15,6 +15,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: | + sudo apt-get update + sudo apt-get install jq - uses: pnpm/action-setup@v2 with: version: 8 diff --git a/packages/bsky/package.json b/packages/bsky/package.json index 77fe28c7bf6..de10db6f40c 100644 --- a/packages/bsky/package.json +++ b/packages/bsky/package.json @@ -43,7 +43,7 @@ "@isaacs/ttlcache": "^1.4.1", "compression": "^1.7.4", "cors": "^2.8.5", - "express": "^4.17.2", + "express": "^4.18.2", "express-async-errors": "^3.1.1", "form-data": "^4.0.0", "http-errors": "^2.0.0", @@ -67,7 +67,7 @@ "@atproto/xrpc": "workspace:^", "@did-plc/server": "^0.0.1", "@types/cors": "^2.8.12", - "@types/express": "^4.17.13", + "@types/express": "^4.17.20", "@types/express-serve-static-core": "^4.17.36", "@types/pg": "^8.6.6", "@types/qs": "^6.9.7", 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..ea9ddb1cbfe 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/packages/pds/package.json b/packages/pds/package.json index 4c22a61133b..cb0dc978c9a 100644 --- a/packages/pds/package.json +++ b/packages/pds/package.json @@ -48,7 +48,7 @@ "compression": "^1.7.4", "cors": "^2.8.5", "disposable-email": "^0.2.3", - "express": "^4.17.2", + "express": "^4.18.2", "express-async-errors": "^3.1.1", "file-type": "^16.5.4", "form-data": "^4.0.0", @@ -78,7 +78,7 @@ "@did-plc/server": "^0.0.1", "@types/cors": "^2.8.12", "@types/disposable-email": "^0.2.0", - "@types/express": "^4.17.13", + "@types/express": "^4.17.20", "@types/express-serve-static-core": "^4.17.36", "@types/jsonwebtoken": "^8.5.9", "@types/nodemailer": "^6.4.6", @@ -86,6 +86,6 @@ "@types/qs": "^6.9.7", "@types/sharp": "^0.31.0", "axios": "^0.27.2", - "ws": "^8.12.0" + "ws": "^8.14.2" } } diff --git a/packages/xrpc-server/package.json b/packages/xrpc-server/package.json index ef3c56b3bc0..1bbe4eea43f 100644 --- a/packages/xrpc-server/package.json +++ b/packages/xrpc-server/package.json @@ -29,18 +29,18 @@ "@atproto/crypto": "workspace:^", "@atproto/lexicon": "workspace:^", "cbor-x": "^1.5.1", - "express": "^4.17.2", + "express": "^4.18.2", "http-errors": "^2.0.0", "mime-types": "^2.1.35", "rate-limiter-flexible": "^2.4.1", "uint8arrays": "3.0.0", - "ws": "^8.12.0", + "ws": "^8.14.2", "zod": "^3.21.4" }, "devDependencies": { "@atproto/crypto": "workspace:^", "@atproto/xrpc": "workspace:^", - "@types/express": "^4.17.13", + "@types/express": "^4.17.20", "@types/express-serve-static-core": "^4.17.36", "@types/http-errors": "^2.0.1", "@types/ws": "^8.5.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c899913626..f63669b2170 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -196,7 +196,7 @@ importers: specifier: ^2.8.5 version: 2.8.5 express: - specifier: ^4.17.2 + specifier: ^4.18.2 version: 4.18.2 express-async-errors: specifier: ^3.1.1 @@ -260,8 +260,8 @@ importers: specifier: ^2.8.12 version: 2.8.12 '@types/express': - specifier: ^4.17.13 - version: 4.17.13 + specifier: ^4.17.20 + version: 4.17.20 '@types/express-serve-static-core': specifier: ^4.17.36 version: 4.17.36 @@ -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 @@ -517,7 +520,7 @@ importers: specifier: ^0.2.3 version: 0.2.3 express: - specifier: ^4.17.2 + specifier: ^4.18.2 version: 4.18.2 express-async-errors: specifier: ^3.1.1 @@ -599,8 +602,8 @@ importers: specifier: ^0.2.0 version: 0.2.0 '@types/express': - specifier: ^4.17.13 - version: 4.17.13 + specifier: ^4.17.20 + version: 4.17.20 '@types/express-serve-static-core': specifier: ^4.17.36 version: 4.17.36 @@ -623,8 +626,8 @@ importers: specifier: ^0.27.2 version: 0.27.2 ws: - specifier: ^8.12.0 - version: 8.12.0 + specifier: ^8.14.2 + version: 8.14.2 packages/repo: dependencies: @@ -692,7 +695,7 @@ importers: specifier: ^1.5.1 version: 1.5.1 express: - specifier: ^4.17.2 + specifier: ^4.18.2 version: 4.18.2 http-errors: specifier: ^2.0.0 @@ -707,8 +710,8 @@ importers: specifier: 3.0.0 version: 3.0.0 ws: - specifier: ^8.12.0 - version: 8.12.0 + specifier: ^8.14.2 + version: 8.14.2 zod: specifier: ^3.21.4 version: 3.21.4 @@ -717,8 +720,8 @@ importers: specifier: workspace:^ version: link:../xrpc '@types/express': - specifier: ^4.17.13 - version: 4.17.13 + specifier: ^4.17.20 + version: 4.17.20 '@types/express-serve-static-core': specifier: ^4.17.36 version: 4.17.36 @@ -5329,8 +5332,8 @@ packages: '@types/send': 0.17.1 dev: true - /@types/express@4.17.13: - resolution: {integrity: sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==} + /@types/express@4.17.20: + resolution: {integrity: sha512-rOaqlkgEvOW495xErXMsmyX3WKBInbhG5eqojXYi3cGUaLoRDlXa5d52fkfWZT963AZ3v2eZ4MbKE6WpDAGVsw==} dependencies: '@types/body-parser': 1.19.2 '@types/express-serve-static-core': 4.17.36 @@ -11201,8 +11204,8 @@ packages: signal-exit: 3.0.7 dev: true - /ws@8.12.0: - resolution: {integrity: sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==} + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1