mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
The socket the app's pages call over (/zap) opened only for a session, so a recipient signing by their link, who has no account, could not reach the routes that sign a field or complete a document: every field they clicked failed with "An error occurred while signing the field". tRPC had served those as public procedures; the port to ZAP kept their bodies and lost the door. A connection from the app's own pages with no session now opens as anonymous and reaches only the routes tRPC served publicly, each authorised by the token it carries; every other route answers it 401 before its handler runs. The operation API still refuses a request without a token.
54 lines
2.7 KiB
YAML
54 lines
2.7 KiB
YAML
# Hanzo eSign — a turborepo whose deployable artifact is the remix app.
|
|
#
|
|
# GitHub runs .github/workflows/cicd.yml (hanzoai/ci build.yml@v2) against this
|
|
# file on every push to main, tag v* and pull request. `test:` gates; `images:`
|
|
# builds docker/Dockerfile and publishes ghcr.io/hanzoai/esign as
|
|
# sha-<short7>-amd64 plus the semver the pin in hanzoai/universe
|
|
# (charts/app/values/hanzo/esign.yaml) names.
|
|
#
|
|
# The gate is the real build of the app the cluster runs: npm ci against the
|
|
# committed lockfile (postinstall generates the Prisma client), then turbo's
|
|
# build of @hanzo/esign-remix, which type-checks every workspace package it
|
|
# depends on. A type error anywhere under packages/ fails here.
|
|
#
|
|
# `lint:paths` runs before install: it needs no dependencies and fails the gate
|
|
# the moment a first-party /api path is served or called (every route is /v1).
|
|
#
|
|
# `lint:tx` runs after install because it takes seconds and answers a question the build
|
|
# cannot: whether anything inside a `$transaction` reaches the global Prisma
|
|
# client. Base SQLite serves one write connection, so such a call waits on a
|
|
# lock the transaction holds and the transaction dies (`P2028`) — at runtime,
|
|
# with a green build. See packages/eslint-config/transaction.cjs.
|
|
|
|
# The image series. bin/imgver publishes max(this, the highest semver already on
|
|
# ghcr.io/hanzoai/esign) plus a patch, and exactly this when it is the higher. It
|
|
# is stated here because package.json carries 2.7.1, the upstream Documenso
|
|
# release, which is not this image's series.
|
|
version: 0.2.0
|
|
|
|
test:
|
|
- name: build
|
|
run: |
|
|
set -euo pipefail
|
|
node scripts/lint-paths.mjs
|
|
# The gate runs no browser, and the runner's shared Playwright cache is not
|
|
# ours to write, so the browser packages install without downloading one.
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm ci --no-audit --no-fund
|
|
npm run lint:tx
|
|
npx turbo run build --filter=@hanzo/esign-remix
|
|
# The unit suites of auth and lib run last, after the build generates the
|
|
# Prisma client they import: who IAM sign-in admits and what keeps working
|
|
# for them, where a sign-in may return, and the rest of lib. The migration
|
|
# test runs the real 0_init and 1_iam_only_sign_in against SQLite. The
|
|
# trpc suite holds an anonymous socket (a recipient signing by their link)
|
|
# to the public routes.
|
|
npx tsx --test packages/auth/__tests__/*.test.ts packages/lib/__tests__/*.test.ts packages/trpc/__tests__/*.test.ts packages/prisma/__tests__/iam-only-migration.test.ts
|
|
|
|
images:
|
|
- name: sign
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
repo: ghcr.io/hanzoai/esign
|
|
# One architecture: the live image and its pin are amd64.
|
|
platforms: [linux/amd64]
|