@sovereignfs/create 0.19.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +5 -3
  2. package/dist/create.mjs +354 -88
  3. package/package.json +3 -2
  4. package/template/app/AGENTS.md +36 -3
  5. package/template/app/CONTRIBUTING.md +3 -3
  6. package/template/app/Dockerfile +6 -5
  7. package/template/app/README.md +64 -32
  8. package/template/app/_env.example +11 -1
  9. package/template/app/_githooks/pre-push +2 -2
  10. package/template/app/_github/workflows/ci.yml +5 -4
  11. package/template/app/_github/workflows/publish.yml +8 -6
  12. package/template/app/_gitignore +4 -0
  13. package/template/app/app/actions.ts +34 -8
  14. package/template/app/app/api/auth/[...all]/route.ts +10 -0
  15. package/template/app/app/api/files/[id]/route.ts +4 -6
  16. package/template/app/app/api/files/route.ts +8 -5
  17. package/template/app/app/api/push/subscription/route.ts +23 -0
  18. package/template/app/app/api/sign-in-salt/route.ts +9 -0
  19. package/template/app/app/api/sovereign/account-deleted/route.ts +10 -0
  20. package/template/app/app/api/sovereign/backchannel-logout/route.ts +10 -0
  21. package/template/app/app/api/sovereign/export/route.ts +10 -0
  22. package/template/app/app/notifications.tsx +42 -0
  23. package/template/app/app/page.tsx +21 -9
  24. package/template/app/app/push-actions.ts +41 -0
  25. package/template/app/app/security/actions.ts +45 -0
  26. package/template/app/app/security/page.tsx +33 -0
  27. package/template/app/app/security/panels.tsx +50 -0
  28. package/template/app/app/sign-in/page.tsx +49 -0
  29. package/template/app/app/sign-in/panel.tsx +71 -0
  30. package/template/app/app/sign-out.tsx +19 -0
  31. package/template/app/app/sign-up/page.tsx +39 -0
  32. package/template/app/app/sign-up/panel.tsx +54 -0
  33. package/template/app/app/sw.js/route.ts +10 -2
  34. package/template/app/app/ui.tsx +13 -1
  35. package/template/app/compose.yml +3 -2
  36. package/template/app/instrumentation.ts +9 -1
  37. package/template/app/lib/account.ts +6 -0
  38. package/template/app/lib/crypto.ts +16 -9
  39. package/template/app/lib/csp.ts +5 -3
  40. package/template/app/lib/notices.ts +63 -0
  41. package/template/app/lib/push.ts +227 -0
  42. package/template/app/lib/session.ts +40 -0
  43. package/template/app/lib/sign-in-client.ts +22 -0
  44. package/template/app/lib/sign-in.ts +113 -0
  45. package/template/app/lib/sovereign.ts +7 -6
  46. package/template/app/migrations/002_push.sql +24 -0
  47. package/template/app/sovereign.manifest.json +11 -8
  48. package/template/encryption/_env.example +27 -0
  49. package/template/encryption/_skip +18 -0
  50. package/template/encryption/app/api/files/[id]/route.ts +45 -0
  51. package/template/encryption/app/api/files/route.ts +43 -0
  52. package/template/{app → encryption}/app/auth/[action]/route.ts +2 -1
  53. package/template/encryption/app/page.tsx +7 -2
  54. package/template/encryption/app/sign-out.tsx +21 -0
  55. package/template/encryption/app/ui.tsx +1 -0
  56. package/template/encryption/instrumentation.ts +12 -0
  57. package/template/encryption/lib/account.ts +6 -0
  58. package/template/encryption/lib/auth.ts +36 -0
  59. package/template/encryption/sovereign.manifest.json +4 -3
  60. package/template/pm/yarn/_yarnrc.yml +3 -0
  61. package/template/app/lib/auth.ts +0 -18
package/README.md CHANGED
@@ -3,18 +3,20 @@
3
3
  [![npm](https://img.shields.io/npm/v/@sovereignfs/create?label=npm)](https://www.npmjs.com/package/@sovereignfs/create) [![licence](https://img.shields.io/badge/licence-AGPL--3.0--or--later-blue)](https://github.com/sovereignfs/sovereign/blob/main/LICENSE)
4
4
 
5
5
  `npm create @sovereignfs` makes an instance repository for [Sovereign](https://github.com/sovereignfs/sovereign): a folder with a
6
- `./sv` launcher and a `package.json` that pins `@sovereignfs/cli` of the same version as this package.
6
+ `./sv` launcher, a `package.json` that pins `@sovereignfs/cli` of the same version as this package, and an `AGENTS.md` (with `CLAUDE.md`)
7
+ for an AI agent the operator asks to look after the instance.
7
8
 
8
9
  ```bash
9
10
  npm create @sovereignfs my-instance
10
11
  ```
11
12
 
12
13
  Then `./sv setup`. `npm create @sovereignfs app my-notes` makes a Next.js app that an instance can host as it stands: it signs in through
13
- the instance's core, keeps its data in its own database, and builds into an image whose label is its manifest. With `--encryption`, its
14
+ the instance's core, keeps its data in its own database, and builds into an image whose label is its manifest. It is made with pnpm unless
15
+ `--package-manager npm` or `--package-manager yarn` says otherwise. With `--encryption`, its
14
16
  notes are encrypted in the browser and shared between people of the instance (not yet audited; see its `ENCRYPTION.md`). See [`@sovereignfs/cli`](https://www.npmjs.com/package/@sovereignfs/cli). Licence: AGPL-3.0-or-later.
15
17
 
16
18
  Once an app exists, it keeps the files every app of the suite shares (its release workflows, repository settings, contributing and
17
- release guides, and the shared section of `AGENTS.md`) with the version of this package it pins:
19
+ release guides, its `Dockerfile`, `.dockerignore` and `compose.yml`, and the shared section of `AGENTS.md`) with the version of this package it pins:
18
20
 
19
21
  ```bash
20
22
  npm create @sovereignfs app sync # write them from this version's template