smoodly 0.0.1 → 0.0.3

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 (3) hide show
  1. package/README.md +3 -3
  2. package/dist/sql.js +4 -0
  3. package/package.json +27 -8
package/README.md CHANGED
@@ -168,11 +168,11 @@ locale switcher — examples/site is single-locale so it stays hidden).
168
168
 
169
169
  Both packages move together. From the repo root:
170
170
 
171
- npm version 0.0.2 -w smoodly -w create-smoodly-app --no-git-tag-version
171
+ npm version 0.0.3 -w smoodly -w create-smoodly-app --no-git-tag-version
172
172
  npm run build
173
173
  npm publish -w smoodly --access public
174
174
  npm publish -w create-smoodly-app --access public
175
- git commit -am "release: 0.0.2" && git tag v0.0.2 && git push --tags origin main
175
+ git commit -am "release: 0.0.3" && git tag v0.0.3 && git push --tags origin main
176
176
 
177
177
  `prepublishOnly` rebuilds each package; the CLI's template is regenerated from
178
178
  `examples/site` in that build, so the template always matches the example
@@ -191,7 +191,7 @@ site at the tagged commit.
191
191
  - A malformed `space_id`/`key_id` claim raises `22P02` inside the policy: fails closed but surfaces as a 500. Only reachable from a validly-signed key, so it is a cloud key-minting guard, not a request-path one.
192
192
  - Authorization trusts the JWT claims alone; `smoodly_space_key_revoked()` checks only `revoked_at`. When cloud key-minting exists, make it a full key check (the claims must match the `space_keys` row).
193
193
  - `isEditor` reads `editors` with no space filter: under a cloud write key RLS scopes it, but a service-role client bypasses RLS and would admit an editor of any space. Harmless in self-host (one space); never use a service-role client against the shared content project.
194
- - The `sb_secret_` branch of `clientOptions` is unit-tested for shape only; the local stack uses legacy JWT keys, so a new-format secret key has not been exercised live against PostgREST and the GoTrue admin API.
194
+ - The `sb_secret_` branch of `clientOptions` (secret key as the sole `apikey`, no bearer) was exercised live on 2026-09-05 against a hosted project: PostgREST reads with the service-role template and the GoTrue admin API (`listUsers`, `createUser`) both accept it; a password sign-in with the matching `sb_publishable_` key returns a session. Unit tests still cover the shape only; the local stack stays on legacy JWT keys.
195
195
  - The migration is not re-appliable to a pre-rename (`project_id`) database: `create table if not exists` leaves it untouched and the `space_id` policies then fail. No installs predate the rename; fold into DESIGN.md OQ #2 (schema upgrades).
196
196
  - `examples/site/lib/smoodly/index.ts` should carry `import "server-only"` now that it also exports `publicAuth` — a client-side import would fail loudly at build instead of at runtime.
197
197
  - `exports` has no `"./package.json"` entry, so tooling that reads a dependency's `package.json` through the exports map cannot. One line to add when something needs it.
package/dist/sql.js CHANGED
@@ -54,6 +54,10 @@ export function collectionSQL(collection) {
54
54
  }
55
55
  export function coreTablesSQL() {
56
56
  return [
57
+ // The trigger/policy blocks below drop-before-create so the migration is
58
+ // re-appliable; on a fresh database every drop would otherwise NOTICE
59
+ // "does not exist, skipping" in the installer's output.
60
+ `set client_min_messages = warning;`,
57
61
  currentSpaceSQL(),
58
62
  `
59
63
  create table if not exists "pages" (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smoodly",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Open-source, code-first CMS for Next.js on Supabase: define a component once, it becomes a typed, editable building block.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -12,13 +12,30 @@
12
12
  "main": "./dist/index.js",
13
13
  "types": "./dist/index.d.ts",
14
14
  "exports": {
15
- ".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
16
- "./next": { "types": "./dist/next/index.d.ts", "default": "./dist/next/index.js" },
17
- "./admin": { "types": "./dist/admin/index.d.ts", "default": "./dist/admin/index.js" },
18
- "./admin/next": { "types": "./dist/admin/next/index.d.ts", "default": "./dist/admin/next/index.js" },
19
- "./bridge": { "types": "./dist/admin/next/bridge.d.ts", "default": "./dist/admin/next/bridge.js" }
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./next": {
20
+ "types": "./dist/next/index.d.ts",
21
+ "default": "./dist/next/index.js"
22
+ },
23
+ "./admin": {
24
+ "types": "./dist/admin/index.d.ts",
25
+ "default": "./dist/admin/index.js"
26
+ },
27
+ "./admin/next": {
28
+ "types": "./dist/admin/next/index.d.ts",
29
+ "default": "./dist/admin/next/index.js"
30
+ },
31
+ "./bridge": {
32
+ "types": "./dist/admin/next/bridge.d.ts",
33
+ "default": "./dist/admin/next/bridge.js"
34
+ }
20
35
  },
21
- "files": ["dist"],
36
+ "files": [
37
+ "dist"
38
+ ],
22
39
  "scripts": {
23
40
  "build": "rm -rf dist && tsc -p tsconfig.build.json",
24
41
  "prepublishOnly": "npm run build",
@@ -32,7 +49,9 @@
32
49
  "next": ">=15"
33
50
  },
34
51
  "peerDependenciesMeta": {
35
- "next": { "optional": true }
52
+ "next": {
53
+ "optional": true
54
+ }
36
55
  },
37
56
  "devDependencies": {
38
57
  "@types/node": "^26.4.1",