create-smoodly-app 0.0.26 → 0.0.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-smoodly-app",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "Create a Smoodly site: a fresh Next.js app with the admin mounted, a Supabase schema, an env file and a first editor.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -14,7 +14,7 @@
14
14
  "next": "^16.3.4",
15
15
  "react": "^19",
16
16
  "react-dom": "^19",
17
- "smoodly": "0.0.26"
17
+ "smoodly": "0.0.27"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@next/env": "^16.3.4",
@@ -0,0 +1,38 @@
1
+ -- Smoodly core schema, version 3 (docs/superpowers/specs/2026-09-26-security-pass-design.md).
2
+ -- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
3
+ -- Never edit a published file: the next change is the next file.
4
+ -- The delta over version 2: the presence channel admits a signed-in
5
+ -- member of the topic's space (a definer lookup in members by the session
6
+ -- token's user), the five unpinned functions get a search_path, and the
7
+ -- three mutation RPCs are no longer executable by anon or public.
8
+
9
+ set client_min_messages = warning;
10
+
11
+ create or replace function "smoodly_presence_member"() returns boolean
12
+ language sql stable security definer set search_path = public as $$
13
+ select exists (select 1 from "members" m
14
+ where m."user_id" = auth.uid()
15
+ and realtime.topic() = 'space:' || m."space_id"::text);
16
+ $$;
17
+
18
+ drop policy if exists "smoodly_presence_read" on "realtime"."messages";
19
+ create policy "smoodly_presence_read" on "realtime"."messages" for select
20
+ using ((select public."smoodly_presence_member"()));
21
+
22
+ drop policy if exists "smoodly_presence_write" on "realtime"."messages";
23
+ create policy "smoodly_presence_write" on "realtime"."messages" for insert
24
+ with check ((select public."smoodly_presence_member"()));
25
+
26
+ alter function "smoodly_current_space"() set search_path = '';
27
+ alter function "smoodly_key_kind"() set search_path = '';
28
+ alter function "smoodly_set_space"() set search_path = '';
29
+ alter function "smoodly_reorder"(text, uuid[]) set search_path = public;
30
+ alter function "smoodly_reorder_pages"(uuid[]) set search_path = public;
31
+ alter function "smoodly_rewrite_paths"(jsonb, jsonb) set search_path = public;
32
+
33
+ revoke execute on function "smoodly_reorder"(text, uuid[]) from public, anon;
34
+ revoke execute on function "smoodly_reorder_pages"(uuid[]) from public, anon;
35
+ revoke execute on function "smoodly_rewrite_paths"(jsonb, jsonb) from public, anon;
36
+
37
+ insert into "smoodly_meta" ("key", "value") values ('schema_version', '3')
38
+ on conflict ("key") do update set "value" = excluded."value";
@@ -1,5 +1,5 @@
1
1
  -- Smoodly: read views and order indexes for this app's collections, written by `npx smoodly migrate`
2
- -- (2026-09-26T13:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
2
+ -- (2026-09-26T14:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
3
3
  -- Never edit a written file: change the collection and run migrate again.
4
4
 
5
5
  -- smoodly:collection posts sha256:2e648b887b8e7146
@@ -14,7 +14,7 @@
14
14
  "next": "^16.3.4",
15
15
  "react": "^19",
16
16
  "react-dom": "^19",
17
- "smoodly": "0.0.26",
17
+ "smoodly": "0.0.27",
18
18
  "next-intl": "^4.14.2"
19
19
  },
20
20
  "devDependencies": {
@@ -0,0 +1,38 @@
1
+ -- Smoodly core schema, version 3 (docs/superpowers/specs/2026-09-26-security-pass-design.md).
2
+ -- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
3
+ -- Never edit a published file: the next change is the next file.
4
+ -- The delta over version 2: the presence channel admits a signed-in
5
+ -- member of the topic's space (a definer lookup in members by the session
6
+ -- token's user), the five unpinned functions get a search_path, and the
7
+ -- three mutation RPCs are no longer executable by anon or public.
8
+
9
+ set client_min_messages = warning;
10
+
11
+ create or replace function "smoodly_presence_member"() returns boolean
12
+ language sql stable security definer set search_path = public as $$
13
+ select exists (select 1 from "members" m
14
+ where m."user_id" = auth.uid()
15
+ and realtime.topic() = 'space:' || m."space_id"::text);
16
+ $$;
17
+
18
+ drop policy if exists "smoodly_presence_read" on "realtime"."messages";
19
+ create policy "smoodly_presence_read" on "realtime"."messages" for select
20
+ using ((select public."smoodly_presence_member"()));
21
+
22
+ drop policy if exists "smoodly_presence_write" on "realtime"."messages";
23
+ create policy "smoodly_presence_write" on "realtime"."messages" for insert
24
+ with check ((select public."smoodly_presence_member"()));
25
+
26
+ alter function "smoodly_current_space"() set search_path = '';
27
+ alter function "smoodly_key_kind"() set search_path = '';
28
+ alter function "smoodly_set_space"() set search_path = '';
29
+ alter function "smoodly_reorder"(text, uuid[]) set search_path = public;
30
+ alter function "smoodly_reorder_pages"(uuid[]) set search_path = public;
31
+ alter function "smoodly_rewrite_paths"(jsonb, jsonb) set search_path = public;
32
+
33
+ revoke execute on function "smoodly_reorder"(text, uuid[]) from public, anon;
34
+ revoke execute on function "smoodly_reorder_pages"(uuid[]) from public, anon;
35
+ revoke execute on function "smoodly_rewrite_paths"(jsonb, jsonb) from public, anon;
36
+
37
+ insert into "smoodly_meta" ("key", "value") values ('schema_version', '3')
38
+ on conflict ("key") do update set "value" = excluded."value";
@@ -1,5 +1,5 @@
1
1
  -- Smoodly: read views and order indexes for this app's collections, written by `npx smoodly migrate`
2
- -- (2026-09-26T13:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
2
+ -- (2026-09-26T14:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
3
3
  -- Never edit a written file: change the collection and run migrate again.
4
4
 
5
5
  -- smoodly:collection posts sha256:2e648b887b8e7146
@@ -14,7 +14,7 @@
14
14
  "next": "^16.3.4",
15
15
  "react": "^19",
16
16
  "react-dom": "^19",
17
- "smoodly": "0.0.26"
17
+ "smoodly": "0.0.27"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@next/env": "^16.3.4",
@@ -0,0 +1,38 @@
1
+ -- Smoodly core schema, version 3 (docs/superpowers/specs/2026-09-26-security-pass-design.md).
2
+ -- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
3
+ -- Never edit a published file: the next change is the next file.
4
+ -- The delta over version 2: the presence channel admits a signed-in
5
+ -- member of the topic's space (a definer lookup in members by the session
6
+ -- token's user), the five unpinned functions get a search_path, and the
7
+ -- three mutation RPCs are no longer executable by anon or public.
8
+
9
+ set client_min_messages = warning;
10
+
11
+ create or replace function "smoodly_presence_member"() returns boolean
12
+ language sql stable security definer set search_path = public as $$
13
+ select exists (select 1 from "members" m
14
+ where m."user_id" = auth.uid()
15
+ and realtime.topic() = 'space:' || m."space_id"::text);
16
+ $$;
17
+
18
+ drop policy if exists "smoodly_presence_read" on "realtime"."messages";
19
+ create policy "smoodly_presence_read" on "realtime"."messages" for select
20
+ using ((select public."smoodly_presence_member"()));
21
+
22
+ drop policy if exists "smoodly_presence_write" on "realtime"."messages";
23
+ create policy "smoodly_presence_write" on "realtime"."messages" for insert
24
+ with check ((select public."smoodly_presence_member"()));
25
+
26
+ alter function "smoodly_current_space"() set search_path = '';
27
+ alter function "smoodly_key_kind"() set search_path = '';
28
+ alter function "smoodly_set_space"() set search_path = '';
29
+ alter function "smoodly_reorder"(text, uuid[]) set search_path = public;
30
+ alter function "smoodly_reorder_pages"(uuid[]) set search_path = public;
31
+ alter function "smoodly_rewrite_paths"(jsonb, jsonb) set search_path = public;
32
+
33
+ revoke execute on function "smoodly_reorder"(text, uuid[]) from public, anon;
34
+ revoke execute on function "smoodly_reorder_pages"(uuid[]) from public, anon;
35
+ revoke execute on function "smoodly_rewrite_paths"(jsonb, jsonb) from public, anon;
36
+
37
+ insert into "smoodly_meta" ("key", "value") values ('schema_version', '3')
38
+ on conflict ("key") do update set "value" = excluded."value";
@@ -1,5 +1,5 @@
1
1
  -- Smoodly: read views and order indexes for this app's collections, written by `npx smoodly migrate`
2
- -- (2026-09-26T13:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
2
+ -- (2026-09-26T14:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
3
3
  -- Never edit a written file: change the collection and run migrate again.
4
4
 
5
5
  -- smoodly:collection people sha256:929798ebb4fa2bb6
@@ -14,7 +14,7 @@
14
14
  "next": "^16.3.4",
15
15
  "react": "^19",
16
16
  "react-dom": "^19",
17
- "smoodly": "0.0.26",
17
+ "smoodly": "0.0.27",
18
18
  "next-intl": "^4.14.2"
19
19
  },
20
20
  "devDependencies": {
@@ -0,0 +1,38 @@
1
+ -- Smoodly core schema, version 3 (docs/superpowers/specs/2026-09-26-security-pass-design.md).
2
+ -- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
3
+ -- Never edit a published file: the next change is the next file.
4
+ -- The delta over version 2: the presence channel admits a signed-in
5
+ -- member of the topic's space (a definer lookup in members by the session
6
+ -- token's user), the five unpinned functions get a search_path, and the
7
+ -- three mutation RPCs are no longer executable by anon or public.
8
+
9
+ set client_min_messages = warning;
10
+
11
+ create or replace function "smoodly_presence_member"() returns boolean
12
+ language sql stable security definer set search_path = public as $$
13
+ select exists (select 1 from "members" m
14
+ where m."user_id" = auth.uid()
15
+ and realtime.topic() = 'space:' || m."space_id"::text);
16
+ $$;
17
+
18
+ drop policy if exists "smoodly_presence_read" on "realtime"."messages";
19
+ create policy "smoodly_presence_read" on "realtime"."messages" for select
20
+ using ((select public."smoodly_presence_member"()));
21
+
22
+ drop policy if exists "smoodly_presence_write" on "realtime"."messages";
23
+ create policy "smoodly_presence_write" on "realtime"."messages" for insert
24
+ with check ((select public."smoodly_presence_member"()));
25
+
26
+ alter function "smoodly_current_space"() set search_path = '';
27
+ alter function "smoodly_key_kind"() set search_path = '';
28
+ alter function "smoodly_set_space"() set search_path = '';
29
+ alter function "smoodly_reorder"(text, uuid[]) set search_path = public;
30
+ alter function "smoodly_reorder_pages"(uuid[]) set search_path = public;
31
+ alter function "smoodly_rewrite_paths"(jsonb, jsonb) set search_path = public;
32
+
33
+ revoke execute on function "smoodly_reorder"(text, uuid[]) from public, anon;
34
+ revoke execute on function "smoodly_reorder_pages"(uuid[]) from public, anon;
35
+ revoke execute on function "smoodly_rewrite_paths"(jsonb, jsonb) from public, anon;
36
+
37
+ insert into "smoodly_meta" ("key", "value") values ('schema_version', '3')
38
+ on conflict ("key") do update set "value" = excluded."value";
@@ -1,5 +1,5 @@
1
1
  -- Smoodly: read views and order indexes for this app's collections, written by `npx smoodly migrate`
2
- -- (2026-09-26T13:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
2
+ -- (2026-09-26T14:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
3
3
  -- Never edit a written file: change the collection and run migrate again.
4
4
 
5
5
  -- smoodly:collection people sha256:929798ebb4fa2bb6