Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .changeset/badge-award-total-count.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/batch-comment-counts.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/batch-follower-counts.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/license-mit-or-apache.md

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions happyview-modules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 10 additions & 0 deletions happyview-modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion happyview-modules/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 12 additions & 0 deletions packages/api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
Loading