diff --git a/.changeset/badge-award-total-count.md b/.changeset/badge-award-total-count.md deleted file mode 100644 index 0335964..0000000 --- a/.changeset/badge-award-total-count.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@hypercerts-org/happyview-modules': minor -'@hypercerts-org/api': minor ---- - -- `app.certified.badge.listBadgeAwards` accepts `includeTotal`. When it is `true`, the output includes `totalCount`: the number of award records matching all filters, before cursor and limit, not deduplicated. It is also returned on empty pages. diff --git a/.changeset/batch-comment-counts.md b/.changeset/batch-comment-counts.md deleted file mode 100644 index a8a2121..0000000 --- a/.changeset/batch-comment-counts.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@hypercerts-org/happyview-modules': minor -'@hypercerts-org/api': minor ---- - -Add `org.hypercerts.context.getCommentCounts`, which returns comment counts for up to 100 subject records in one call. - -`getEntityFollows` and `getActorReactions` now reject subject URIs whose DID has a malformed `%` escape, as `getReactionCounts` already did, instead of returning null for them. diff --git a/.changeset/batch-follower-counts.md b/.changeset/batch-follower-counts.md deleted file mode 100644 index 81457f9..0000000 --- a/.changeset/batch-follower-counts.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@hypercerts-org/happyview-modules': minor -'@hypercerts-org/api': minor ---- - -Add `app.certified.graph.getFollowerCounts`, which returns follower counts for up to 100 account DIDs and entity AT-URIs in one call. diff --git a/.changeset/license-mit-or-apache.md b/.changeset/license-mit-or-apache.md deleted file mode 100644 index a930fdf..0000000 --- a/.changeset/license-mit-or-apache.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hypercerts-org/happyview-modules': patch ---- - -License: the bundle is now licensed under either MIT or Apache-2.0, at your option. It was MIT only; earlier releases stay MIT. diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..36500f7 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,44 @@ +name: Deploy + +on: + push: + # Each branch deploys to the GitHub environment with the same name. + branches: [staging, production] + +permissions: + contents: read + +concurrency: + group: deploy-${{ github.ref_name }} + cancel-in-progress: false + +jobs: + deploy: + name: Install HappyView modules (${{ github.ref_name }}) + runs-on: ubuntu-latest + environment: ${{ github.ref_name }} + steps: + - name: Check out repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Set up pnpm + uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + + - name: Set up Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version-file: .nvmrc + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Install API modules into HappyView + env: + HAPPYVIEW_BASE_URL: ${{ vars.HAPPYVIEW_BASE_URL }} + HAPPYVIEW_ADMIN_TOKEN: ${{ secrets.HAPPYVIEW_ADMIN_TOKEN }} + HYPERCERTS_HANDLE_RESOLVER_URL: ${{ vars.HYPERCERTS_HANDLE_RESOLVER_URL }} + # The repo is the source of truth: replace any differing installed assets. + run: pnpm --filter @hypercerts-org/happyview-modules install:api --override diff --git a/happyview-modules/CHANGELOG.md b/happyview-modules/CHANGELOG.md index 3f87c47..acd2952 100644 --- a/happyview-modules/CHANGELOG.md +++ b/happyview-modules/CHANGELOG.md @@ -1,5 +1,21 @@ # @hypercerts-org/happyview-modules +## 0.4.0 + +### Minor Changes + +- [#57](https://github.com/hypercerts-org/api/pull/57) [`3848180`](https://github.com/hypercerts-org/api/commit/384818048e536f72a7e74f83d06aa44b2dafe8ba) Thanks [@Kzoeps](https://github.com/Kzoeps)! - - `app.certified.badge.listBadgeAwards` accepts `includeTotal`. When it is `true`, the output includes `totalCount`: the number of award records matching all filters, before cursor and limit, not deduplicated. It is also returned on empty pages. + +- [#54](https://github.com/hypercerts-org/api/pull/54) [`97c2d98`](https://github.com/hypercerts-org/api/commit/97c2d989e1ac5dcda17bd0b3399e0860135bf639) Thanks [@Kzoeps](https://github.com/Kzoeps)! - Add `org.hypercerts.context.getCommentCounts`, which returns comment counts for up to 100 subject records in one call. + + `getEntityFollows` and `getActorReactions` now reject subject URIs whose DID has a malformed `%` escape, as `getReactionCounts` already did, instead of returning null for them. + +- [#58](https://github.com/hypercerts-org/api/pull/58) [`45137f2`](https://github.com/hypercerts-org/api/commit/45137f271c07db3ca20ad06d051f66d0d1178033) Thanks [@Kzoeps](https://github.com/Kzoeps)! - Add `app.certified.graph.getFollowerCounts`, which returns follower counts for up to 100 account DIDs and entity AT-URIs in one call. + +### Patch Changes + +- [#51](https://github.com/hypercerts-org/api/pull/51) [`53cfff5`](https://github.com/hypercerts-org/api/commit/53cfff59afc0fb0a32f7e081b187e3b0d55a0084) Thanks [@holkexyz](https://github.com/holkexyz)! - License: the bundle is now licensed under either MIT or Apache-2.0, at your option. It was MIT only; earlier releases stay MIT. + ## 0.3.0 ### Minor Changes diff --git a/happyview-modules/README.md b/happyview-modules/README.md index 81de3da..16d3dd3 100644 --- a/happyview-modules/README.md +++ b/happyview-modules/README.md @@ -53,3 +53,13 @@ pnpm install:api ``` For bundles that register `app.certified.actor.getProfile`, handle lookups require `HYPERCERTS_HANDLE_RESOLVER_URL` to be an HTTPS origin without credentials, path, query, or fragment. Interactive installs prompt when it is absent; noninteractive installs must set it. The admin token needs `script-variables:read`, and `script-variables:create` if the installer must create the setting. Existing settings are retained; HappyView exposes only a masked preview, so the installer cannot verify the configured value. See [CONTRIBUTING.md](../CONTRIBUTING.md) for release-note requirements and installer safety details. + +## Deploys + +Pushing to the `staging` or `production` branch runs [`.github/workflows/deploy.yml`](../.github/workflows/deploy.yml), which installs this bundle into that environment's HappyView with `pnpm install:api --override`, so assets that differ from this repository are replaced (the repository is the source of truth). Each branch uses the GitHub environment of the same name (`staging` or `production`), and each environment must define its own values; never reuse the production token for staging: + +- variable `HAPPYVIEW_BASE_URL`: that environment's HappyView origin +- secret `HAPPYVIEW_ADMIN_TOKEN`: a scoped admin token for that HappyView, including `script-variables:read` +- variable `HYPERCERTS_HANDLE_RESOLVER_URL`: needed only if that HappyView does not already have this setting; the token then also needs `script-variables:create` + +Deploys to each environment run one at a time and are never cancelled midway; staging and production deploys do not block each other. diff --git a/happyview-modules/package.json b/happyview-modules/package.json index 002f72a..cce663c 100644 --- a/happyview-modules/package.json +++ b/happyview-modules/package.json @@ -1,6 +1,6 @@ { "name": "@hypercerts-org/happyview-modules", - "version": "0.3.0", + "version": "0.4.0", "license": "MIT OR Apache-2.0", "private": true, "type": "module", diff --git a/package.json b/package.json index ccd3218..635e30f 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "client:generate": "pnpm --filter @hypercerts-org/api generate", "changeset": "changeset", "changeset:status": "changeset status", - "version:packages": "changeset version && pnpm install --lockfile-only" + "version:packages": "changeset version && biome format --write . && pnpm install --lockfile-only" }, "devDependencies": { "@biomejs/biome": "2.6.4", diff --git a/packages/api/CHANGELOG.md b/packages/api/CHANGELOG.md index 824c568..ddbf0ba 100644 --- a/packages/api/CHANGELOG.md +++ b/packages/api/CHANGELOG.md @@ -1,5 +1,17 @@ # @hypercerts-org/api +## 0.2.0 + +### Minor Changes + +- [#57](https://github.com/hypercerts-org/api/pull/57) [`3848180`](https://github.com/hypercerts-org/api/commit/384818048e536f72a7e74f83d06aa44b2dafe8ba) Thanks [@Kzoeps](https://github.com/Kzoeps)! - - `app.certified.badge.listBadgeAwards` accepts `includeTotal`. When it is `true`, the output includes `totalCount`: the number of award records matching all filters, before cursor and limit, not deduplicated. It is also returned on empty pages. + +- [#54](https://github.com/hypercerts-org/api/pull/54) [`97c2d98`](https://github.com/hypercerts-org/api/commit/97c2d989e1ac5dcda17bd0b3399e0860135bf639) Thanks [@Kzoeps](https://github.com/Kzoeps)! - Add `org.hypercerts.context.getCommentCounts`, which returns comment counts for up to 100 subject records in one call. + + `getEntityFollows` and `getActorReactions` now reject subject URIs whose DID has a malformed `%` escape, as `getReactionCounts` already did, instead of returning null for them. + +- [#58](https://github.com/hypercerts-org/api/pull/58) [`45137f2`](https://github.com/hypercerts-org/api/commit/45137f271c07db3ca20ad06d051f66d0d1178033) Thanks [@Kzoeps](https://github.com/Kzoeps)! - Add `app.certified.graph.getFollowerCounts`, which returns follower counts for up to 100 account DIDs and entity AT-URIs in one call. + ## 0.1.0 ### Minor Changes diff --git a/packages/api/package.json b/packages/api/package.json index 3a82c36..7cda7e2 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@hypercerts-org/api", - "version": "0.1.0", + "version": "0.2.0", "description": "TypeScript query definitions and types for the Hypercerts API, for use with @atproto/lex", "license": "MIT OR Apache-2.0", "repository": {