Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into vectors-214
Browse files Browse the repository at this point in the history
* main:
  Remove HttpResponse and ErrorResponse from `http-client` types (#124)
  Refactor http client to introduce custom error types (#113)
  Finish validating rfq against provided offering (#120)
  Generates the HTML to publish to GH Pages (#116)
  http-server fixes + some tests (#83)
  • Loading branch information
Diane Huxley committed Jan 4, 2024
2 parents 8b73c30 + 47105ca commit 27f4ffe
Show file tree
Hide file tree
Showing 28 changed files with 1,345 additions and 557 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-mangos-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tbdex/http-client": minor
---

Introduces custom errors types and breaking changes: functions now throw instead of return on failure
5 changes: 5 additions & 0 deletions .changeset/proud-icons-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tbdex/http-server": patch
---

Improve http-server error handling and test coverage
6 changes: 6 additions & 0 deletions .changeset/smooth-keys-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@tbdex/http-client": patch
"@tbdex/http-server": patch
---

Removes HttpResponse and ErrorResponse types from http-client package
5 changes: 5 additions & 0 deletions .changeset/soft-lizards-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tbdex/protocol": patch
---

Adds more checks to validate an RFQ against a provided Offering
13 changes: 10 additions & 3 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,20 @@ jobs:
id: tbdocs-reporter-protocol
uses: TBD54566975/tbdocs@main
with:
group_docs: true
entry_points: |
- file: packages/protocol/src/main.ts
docsReporter: api-extractor
docsGenerator: typedoc-markdown
docsGenerator: typedoc-html
- file: packages/http-client/src/main.ts
docsReporter: api-extractor
docsGenerator: typedoc-markdown
docsGenerator: typedoc-html
- file: packages/http-server/src/main.ts
docsReporter: api-extractor
docsGenerator: typedoc-markdown
docsGenerator: typedoc-html
- name: Upload documentation artifacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
with:
name: tbdocs-reporter-output
path: ./.tbdocs
105 changes: 105 additions & 0 deletions .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Workflow that deploys project documentation to GitHub Pages
name: Publish Docs to GH Pages

on:
workflow_run:
workflows: ["Create GH Release"]
types:
- completed
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-docs:
permissions:
contents: write # to write documentation files to the repo

runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: pnpm install

- name: Build all workspace packages
run: pnpm build

- name: TBDocs Reporter
id: tbdocs-reporter-protocol
uses: TBD54566975/tbdocs@main
with:
group_docs: true
fail_on_error: true
entry_points: |
- file: packages/protocol/src/main.ts
docsReporter: api-extractor
docsGenerator: typedoc-html
- file: packages/http-client/src/main.ts
docsReporter: api-extractor
docsGenerator: typedoc-html
- file: packages/http-server/src/main.ts
docsReporter: api-extractor
docsGenerator: typedoc-html
- name: Upload documentation artifacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
with:
name: tbdocs-output
path: ./.tbdocs

deploy-gh-pages:
# Add a dependency to the build job
needs: build-docs

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read # to read from project repo
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Download TBDocs Artifacts
uses: actions/download-artifact@v3
with:
name: tbdocs-output
path: ./tbdocs

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "./tbdocs/docs"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 2 additions & 1 deletion packages/http-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,17 @@
},
"dependencies": {
"@tbdex/protocol": "workspace:*",
"@web5/common": "0.2.1",
"@web5/crypto": "0.2.2",
"@web5/dids": "0.2.2",
"@web5/common": "0.2.1",
"query-string": "8.1.0"
},
"devDependencies": {
"@playwright/test": "1.34.3",
"@types/chai": "4.3.5",
"@types/eslint": "8.37.0",
"@types/mocha": "10.0.1",
"@types/sinon": "^17.0.2",
"@typescript-eslint/eslint-plugin": "5.59.0",
"@typescript-eslint/parser": "5.59.0",
"chai": "4.3.10",
Expand Down
Loading

0 comments on commit 27f4ffe

Please sign in to comment.