smoodly 0.0.2 → 0.0.4
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.
- package/README.md +3 -3
- package/dist/sql.js +4 -0
- package/package.json +1 -1
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.
|
|
171
|
+
npm version 0.0.4 -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.
|
|
175
|
+
git commit -am "release: 0.0.4" && git tag v0.0.4 && 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`
|
|
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