- consolidate the package manifest into deno.json (name/version/exports/publish) so `deno publish` works; delete jsr.json; include apps/reference/deno.json in the published files (the template ships it) - add .github/workflows/publish.yml: on a v#.#.# tag, verify the tag matches the manifest version, run the suite, and `deno publish` to JSR via OIDC - remove the Deno Deploy site tasks and the reference-only deploy field (a testing artifact), and the now-dead deploy-field strip in the generator - point create_core_test at the consolidated manifest; refresh the snapshot
- commit
- 02f2e8c760e2f20155952cb2aa68257044ee079a
- parent
- fa85672e13176f8f9654005fb7db7e2cdc04c42b
- author
- Dami <dami.etoile@gmail.com>
| A | .github/ | 36 | ++++++++++++++++++++++++++++++ |
| M | apps/ | 21 | ++---------------- |
| M | apps/ | 6 | ----- |
| M | deno.json | 33 | +++++++++++++++++++++++++++- |
| D | jsr.json | 32 | --------------------------- |
| M | package/ | 3 | --- |
| M | package/ | 2 | +- |
| M | package/ | 2 | +- |
@@ -0,0 +1,36 @@
1+name: Publish to JSR2+3+# Tag a release (e.g. `git tag v0.1.0 && git push origin v0.1.0`) to publish4+# @nzip/lofi to JSR. The tag version must match the "version" in deno.json.5+on:6+ push:7+ tags:8+ - "v*.*.*"9+10+jobs:11+ publish:12+ runs-on: ubuntu-latest13+ permissions:14+ contents: read15+ id-token: write # required for JSR OIDC authentication16+ steps:17+ - uses: actions/checkout@v418+19+ - uses: denoland/setup-deno@v220+ with:21+ deno-version: v2.x22+23+ - name: Verify tag matches deno.json version24+ run: |25+ tag="${GITHUB_REF_NAME#v}"26+ manifest="$(deno eval 'console.log(JSON.parse(Deno.readTextFileSync("deno.json")).version)')"27+ if [ "$tag" != "$manifest" ]; then28+ echo "::error::tag v$tag does not match deno.json version $manifest"29+ exit 130+ fi31+32+ - name: Test33+ run: deno task test:unit34+35+ - name: Publish to JSR36+ run: deno publish@@ -30,26 +30,9 @@ offline and converge after reconnecting. The normal `deno task test` skips it (a
3030 Chromium); run it against a synced deployment with3131 `LOFI_E2E_BASE_URL=http://127.0.0.1:4321/ deno test -A tests/convergence_e2e_test.ts`.3232 33-## Deploy34-3533 `deno task build` produces a self-contained static PWA in `dist/` (the Preact islands compile to36-`dist/_astro/*.js`). The deploy tasks build locally, then push `dist/` **as the deploy root** to37-Deno Deploy's static hosting:38-39-- `deno task deploy:create --org <org> --app <app>` — one-time: create the app from the built40- `dist/` as a static site (`--runtime-mode static --static-dir .`).41-- `deno task deploy` — ongoing: build, then `deno deploy --prod dist`.42-43-Pushing `dist/` as the root is deliberate. If you deploy the project directory instead, Deno44-Deploy's framework detection sees `src/app.ts` and the `@nzip/lofi` imports and runs a **remote45-build** of the whole app — which fails here, because those imports are monorepo-relative46-(`../../package`) and don't exist on the build machine (`Module not found file:///tmp/package/...`).47-Deploying the prebuilt `dist/` has nothing to build and nothing to misdetect, so it serves as pure48-static assets.49-50-Supply the org/app once with `deno deploy switch` (or the `--org/--app` flags above); the `deploy`51-field in `deno.json` records this app's target for reference. The generator strips that field so a52-new project records its own association on first deploy.34+`dist/_astro/*.js`), and `deno task preview` serves it locally. Hosting the built site is left to35+the author's platform of choice; this repository ships no site-deploy pipeline.5336 5437 Passkey backup and recovery are intentionally absent. The pinned Jazz alpha exposes a rejected5538 credential design, so this reference uses a device-local identity and does not imply recoverability.@@ -32,8 +32,6 @@
3232 "test": "deno run -A @nzip/lofi/test",3333 "build": "deno run -A @nzip/lofi/build",3434 "preview": "deno run -A @nzip/lofi/preview",35- "deploy": "deno task build && deno deploy --prod dist",36- "deploy:create": "deno task build && deno deploy create dist --source local --do-not-use-detected-build-config --runtime-mode static --static-dir . --region us",3735 "schema:validate": "deno run -A npm:jazz-tools@2.0.0-alpha.53 validate",3836 "schema:deploy": "deno run --env-file=.env -A npm:jazz-tools@2.0.0-alpha.53 deploy --migrations-dir src/migrations",3937 "migrations:create": "deno run -A npm:jazz-tools@2.0.0-alpha.53 migrations create --migrations-dir src/migrations",@@ -48,9 +46,5 @@
4846 "rules": {4947 "tags": ["recommended"]5048 }51- },52- "deploy": {53- "org": "felinestatemachine",54- "app": "lofi-dev"5549 }5650 }@@ -1,4 +1,16 @@
11 {2+ "name": "@nzip/lofi",3+ "version": "0.1.0",4+ "license": "MIT",5+ "exports": {6+ "./build": "./package/commands/build.ts",7+ "./create": "./package/create.ts",8+ "./dev": "./package/commands/dev.ts",9+ "./doctor": "./package/commands/doctor.ts",10+ "./preview": "./package/commands/preview.ts",11+ "./testing": "./package/testing/mod.ts",12+ "./test": "./package/commands/run_tests.ts"13+ },214 "imports": {315 "@astrojs/check": "npm:@astrojs/check@0.9.9",416 "@astrojs/preact": "npm:@astrojs/preact@6.0.1",@@ -25,7 +37,8 @@
2537 "test:unit": "deno test --allow-env=LOFI_UPDATE_SNAPSHOT --allow-net=127.0.0.1 --allow-read --allow-write=. --allow-run tools package apps/reference/src/_lofi apps/reference/tests",2638 "test:update:create": "LOFI_UPDATE_SNAPSHOT=1 deno test --allow-env=LOFI_UPDATE_SNAPSHOT --allow-read --allow-write=. --allow-run package/create_core_test.ts",2739 "test": "deno task test:unit",28- "test:browser:install": "deno run -A npm:playwright@1.61.1 install chromium"40+ "test:browser:install": "deno run -A npm:playwright@1.61.1 install chromium",41+ "publish:dry": "deno publish --dry-run"2942 },3043 "fmt": {3144 "lineWidth": 100,@@ -36,5 +49,23 @@
3649 "rules": {3750 "tags": ["recommended"]3851 }52+ },53+ "publish": {54+ "include": [55+ "LICENSE",56+ "README.md",57+ "apps/reference/astro.config.ts",58+ "apps/reference/deno.json",59+ "apps/reference/public",60+ "apps/reference/src",61+ "apps/reference/tests",62+ "apps/reference/tsconfig.json",63+ "package"64+ ],65+ "exclude": [66+ "package/**/*_test.ts",67+ "package/testing/fixture_integration.ts",68+ "package/testdata"69+ ]3970 }4071 }@@ -1,32 +0,0 @@
1-{2- "$schema": "https://jsr.io/schema/config-file.v1.json",3- "name": "@nzip/lofi",4- "version": "0.1.0",5- "license": "MIT",6- "exports": {7- "./build": "./package/commands/build.ts",8- "./create": "./package/create.ts",9- "./dev": "./package/commands/dev.ts",10- "./doctor": "./package/commands/doctor.ts",11- "./preview": "./package/commands/preview.ts",12- "./testing": "./package/testing/mod.ts",13- "./test": "./package/commands/run_tests.ts"14- },15- "publish": {16- "include": [17- "LICENSE",18- "README.md",19- "apps/reference/astro.config.ts",20- "apps/reference/public",21- "apps/reference/src",22- "apps/reference/tests",23- "apps/reference/tsconfig.json",24- "package"25- ],26- "exclude": [27- "package/**/*_test.ts",28- "package/testing/fixture_integration.ts",29- "package/testdata"30- ]31- }32-}@@ -87,9 +87,6 @@ async function rewritePortableDenoConfig(root: string, packagePrefix: string): P
8787 }8888 imports[key] = isFileOverride ? `${packagePrefix}${localPath}` : `${packagePrefix}${subpath}`;8989 }90- // The `deploy` field pins the reference app's own Deno Deploy org/app; a91- // generated project records its own association on first `deno task deploy`.92- delete config.deploy;9390 await Deno.writeTextFile(path, `${JSON.stringify(config, null, 2)}\n`);9491 }9592 @@ -2,7 +2,7 @@
22 ".env.example": "c22aed73c7089168ac777fd4f68ad504f9b826ea7185b705514a4ac5505918b1",33 ".gitignore": "9efb15c6a9bfc20f296ed712e74273b6015a0dd9a40f7e861b8711dcf61825f1",44 "astro.config.ts": "8a19cae348af7fcbd9db119d2423dd2e464f0e5ace6e5723d06cd3a1cc9a0d4b",5- "deno.json": "679b5f2a8da16e060c2423ae159af5fba9a60d4435b5a3696425978010cbd2b7",5+ "deno.json": "050a8f96f1176db717f14af677a604ddd9925c6459f413d9d77e282c0353720d",66 "public/favicon.svg": "23efdb888dae688715faafe3ef94f7b5ad1976afcc715c0a742218b54732c6ad",77 "public/manifest.webmanifest": "7d492285fd982e6e68fa04f12d78cd4f0bef4343f0408e314f1582029f3ea407",88 "public/sw.js": "d816161fd5a35f2c477ca72eaa5ba58eb8d94795a4399d29a19838e886dafa31",