create-smoodly-app 0.0.25 → 0.0.26
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 +1 -1
- package/templates/blank/package.json +1 -1
- package/templates/blank/smoodly/admin.tsx +2 -2
- package/templates/blank/smoodly/server.ts +6 -1
- package/templates/blank/supabase/migrations/20260926130000_smoodly_v2.sql +26 -0
- package/templates/blank/supabase/migrations/{20260926120100_smoodly_views.sql → 20260926130100_smoodly_views.sql} +1 -1
- package/templates/blank-intl/package.json +1 -1
- package/templates/blank-intl/smoodly/admin.tsx +2 -2
- package/templates/blank-intl/smoodly/server.ts +6 -1
- package/templates/blank-intl/supabase/migrations/20260926130000_smoodly_v2.sql +26 -0
- package/templates/blank-intl/supabase/migrations/{20260926120100_smoodly_views.sql → 20260926130100_smoodly_views.sql} +1 -1
- package/templates/lorem/package.json +1 -1
- package/templates/lorem/smoodly/admin.tsx +2 -2
- package/templates/lorem/smoodly/server.ts +6 -1
- package/templates/lorem/supabase/migrations/20260926130000_smoodly_v2.sql +26 -0
- package/templates/lorem/supabase/migrations/{20260926120100_smoodly_views.sql → 20260926130100_smoodly_views.sql} +1 -1
- package/templates/lorem-intl/package.json +1 -1
- package/templates/lorem-intl/smoodly/admin.tsx +2 -2
- package/templates/lorem-intl/smoodly/server.ts +6 -1
- package/templates/lorem-intl/supabase/migrations/20260926130000_smoodly_v2.sql +26 -0
- package/templates/lorem-intl/supabase/migrations/{20260926120100_smoodly_views.sql → 20260926130100_smoodly_views.sql} +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSmoodlyAdmin } from "smoodly/admin/next";
|
|
2
2
|
import { config } from "./config";
|
|
3
3
|
import { smoodlyOp } from "./ops";
|
|
4
|
-
import { publicAuth } from "./server";
|
|
4
|
+
import { publicAuth, publicContent } from "./server";
|
|
5
5
|
|
|
6
|
-
export const { AdminPage, AdminLayout } = createSmoodlyAdmin({ config, op: smoodlyOp, auth: publicAuth });
|
|
6
|
+
export const { AdminPage, AdminLayout } = createSmoodlyAdmin({ config, op: smoodlyOp, auth: publicAuth, content: publicContent });
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// admin route enters it from config.ts — so nothing here may read the
|
|
10
10
|
// config at module scope.
|
|
11
11
|
import {
|
|
12
|
-
createSmoodlyClient, createSmoodlySite, smoodlyEnv, SupabaseAssetStore, SupabaseEntryStore, SupabaseMemberStore, SupabasePageStore, SupabasePathIndex, type SmoodlySite,
|
|
12
|
+
createSmoodlyClient, createSmoodlySite, publicContentConfig, smoodlyEnv, SupabaseAssetStore, SupabaseEntryStore, SupabaseMemberStore, SupabasePageStore, SupabasePathIndex, type ContentConfig, type SmoodlySite,
|
|
13
13
|
} from "smoodly";
|
|
14
14
|
import { supabaseAdminAuth, type AdminAuth, type AuthConfig } from "smoodly/admin/next";
|
|
15
15
|
import { createPageRenderer, createSmoodlyQueries, type PageRegistration } from "smoodly/next";
|
|
@@ -81,6 +81,11 @@ export function publicAuth(): AuthConfig {
|
|
|
81
81
|
return { url: env.authUrl, key: env.authKey };
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
/** What the browser needs to join the editing-presence channel — public values only (spec 2026-09-26 concurrency §5). */
|
|
85
|
+
export function publicContent(): ContentConfig {
|
|
86
|
+
return publicContentConfig(smoodlyEnv());
|
|
87
|
+
}
|
|
88
|
+
|
|
84
89
|
/** Locale-relative CMS path → site URL: the one seam for the renderer
|
|
85
90
|
* (metadata alternates, the `page` prop's links) and the admin (canvas,
|
|
86
91
|
* View live). The identity for a single-language site; with next-intl it
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
-- Smoodly core schema, version 2 (docs/superpowers/specs/2026-09-26-concurrency-guard-presence-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 1: the draft pointers become foreign keys (the
|
|
5
|
+
-- token rides every locale row read) and the editing-presence channel
|
|
6
|
+
-- gets its policy on realtime.messages.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
alter table "page_locales" drop constraint if exists "page_locales_draft_version_fkey";
|
|
11
|
+
alter table "page_locales" add constraint "page_locales_draft_version_fkey"
|
|
12
|
+
foreign key ("draft_version_id") references "page_versions" ("id") on delete set null;
|
|
13
|
+
alter table "entry_locales" drop constraint if exists "entry_locales_draft_version_fkey";
|
|
14
|
+
alter table "entry_locales" add constraint "entry_locales_draft_version_fkey"
|
|
15
|
+
foreign key ("draft_version_id") references "entry_versions" ("id") on delete set null;
|
|
16
|
+
|
|
17
|
+
drop policy if exists "smoodly_presence_read" on "realtime"."messages";
|
|
18
|
+
create policy "smoodly_presence_read" on "realtime"."messages" for select
|
|
19
|
+
using ((select realtime.topic()) = 'space:' || (select public."smoodly_current_space"())::text);
|
|
20
|
+
|
|
21
|
+
drop policy if exists "smoodly_presence_write" on "realtime"."messages";
|
|
22
|
+
create policy "smoodly_presence_write" on "realtime"."messages" for insert
|
|
23
|
+
with check ((select realtime.topic()) = 'space:' || (select public."smoodly_current_space"())::text);
|
|
24
|
+
|
|
25
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '2')
|
|
26
|
+
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-
|
|
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.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection posts sha256:2e648b887b8e7146
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSmoodlyAdmin } from "smoodly/admin/next";
|
|
2
2
|
import { config } from "./config";
|
|
3
3
|
import { smoodlyOp } from "./ops";
|
|
4
|
-
import { publicAuth } from "./server";
|
|
4
|
+
import { publicAuth, publicContent } from "./server";
|
|
5
5
|
|
|
6
|
-
export const { AdminPage, AdminLayout } = createSmoodlyAdmin({ config, op: smoodlyOp, auth: publicAuth });
|
|
6
|
+
export const { AdminPage, AdminLayout } = createSmoodlyAdmin({ config, op: smoodlyOp, auth: publicAuth, content: publicContent });
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// admin route enters it from config.ts — so nothing here may read the
|
|
10
10
|
// config at module scope.
|
|
11
11
|
import {
|
|
12
|
-
createSmoodlyClient, createSmoodlySite, smoodlyEnv, SupabaseAssetStore, SupabaseEntryStore, SupabaseMemberStore, SupabasePageStore, SupabasePathIndex, type SmoodlySite,
|
|
12
|
+
createSmoodlyClient, createSmoodlySite, publicContentConfig, smoodlyEnv, SupabaseAssetStore, SupabaseEntryStore, SupabaseMemberStore, SupabasePageStore, SupabasePathIndex, type ContentConfig, type SmoodlySite,
|
|
13
13
|
} from "smoodly";
|
|
14
14
|
import { supabaseAdminAuth, type AdminAuth, type AuthConfig } from "smoodly/admin/next";
|
|
15
15
|
import { createPageRenderer, createSmoodlyQueries, type PageRegistration } from "smoodly/next";
|
|
@@ -82,6 +82,11 @@ export function publicAuth(): AuthConfig {
|
|
|
82
82
|
return { url: env.authUrl, key: env.authKey };
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
/** What the browser needs to join the editing-presence channel — public values only (spec 2026-09-26 concurrency §5). */
|
|
86
|
+
export function publicContent(): ContentConfig {
|
|
87
|
+
return publicContentConfig(smoodlyEnv());
|
|
88
|
+
}
|
|
89
|
+
|
|
85
90
|
/** Locale-relative CMS path → site URL: the one seam for the renderer
|
|
86
91
|
* (metadata alternates, the `page` prop's links) and the admin (canvas,
|
|
87
92
|
* View live). The identity for a single-language site; with next-intl it
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
-- Smoodly core schema, version 2 (docs/superpowers/specs/2026-09-26-concurrency-guard-presence-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 1: the draft pointers become foreign keys (the
|
|
5
|
+
-- token rides every locale row read) and the editing-presence channel
|
|
6
|
+
-- gets its policy on realtime.messages.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
alter table "page_locales" drop constraint if exists "page_locales_draft_version_fkey";
|
|
11
|
+
alter table "page_locales" add constraint "page_locales_draft_version_fkey"
|
|
12
|
+
foreign key ("draft_version_id") references "page_versions" ("id") on delete set null;
|
|
13
|
+
alter table "entry_locales" drop constraint if exists "entry_locales_draft_version_fkey";
|
|
14
|
+
alter table "entry_locales" add constraint "entry_locales_draft_version_fkey"
|
|
15
|
+
foreign key ("draft_version_id") references "entry_versions" ("id") on delete set null;
|
|
16
|
+
|
|
17
|
+
drop policy if exists "smoodly_presence_read" on "realtime"."messages";
|
|
18
|
+
create policy "smoodly_presence_read" on "realtime"."messages" for select
|
|
19
|
+
using ((select realtime.topic()) = 'space:' || (select public."smoodly_current_space"())::text);
|
|
20
|
+
|
|
21
|
+
drop policy if exists "smoodly_presence_write" on "realtime"."messages";
|
|
22
|
+
create policy "smoodly_presence_write" on "realtime"."messages" for insert
|
|
23
|
+
with check ((select realtime.topic()) = 'space:' || (select public."smoodly_current_space"())::text);
|
|
24
|
+
|
|
25
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '2')
|
|
26
|
+
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-
|
|
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.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection posts sha256:2e648b887b8e7146
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSmoodlyAdmin } from "smoodly/admin/next";
|
|
2
2
|
import { config } from "./config";
|
|
3
3
|
import { smoodlyOp } from "./ops";
|
|
4
|
-
import { publicAuth } from "./server";
|
|
4
|
+
import { publicAuth, publicContent } from "./server";
|
|
5
5
|
|
|
6
|
-
export const { AdminPage, AdminLayout } = createSmoodlyAdmin({ config, op: smoodlyOp, auth: publicAuth });
|
|
6
|
+
export const { AdminPage, AdminLayout } = createSmoodlyAdmin({ config, op: smoodlyOp, auth: publicAuth, content: publicContent });
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// admin route enters it from config.ts — so nothing here may read the
|
|
10
10
|
// config at module scope.
|
|
11
11
|
import {
|
|
12
|
-
createSmoodlyClient, createSmoodlySite, smoodlyEnv, SupabaseAssetStore, SupabaseEntryStore, SupabaseMemberStore, SupabasePageStore, SupabasePathIndex, type SmoodlySite,
|
|
12
|
+
createSmoodlyClient, createSmoodlySite, publicContentConfig, smoodlyEnv, SupabaseAssetStore, SupabaseEntryStore, SupabaseMemberStore, SupabasePageStore, SupabasePathIndex, type ContentConfig, type SmoodlySite,
|
|
13
13
|
} from "smoodly";
|
|
14
14
|
import { supabaseAdminAuth, type AdminAuth, type AuthConfig } from "smoodly/admin/next";
|
|
15
15
|
import { createPageRenderer, createSmoodlyQueries, type PageRegistration } from "smoodly/next";
|
|
@@ -81,6 +81,11 @@ export function publicAuth(): AuthConfig {
|
|
|
81
81
|
return { url: env.authUrl, key: env.authKey };
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
/** What the browser needs to join the editing-presence channel — public values only (spec 2026-09-26 concurrency §5). */
|
|
85
|
+
export function publicContent(): ContentConfig {
|
|
86
|
+
return publicContentConfig(smoodlyEnv());
|
|
87
|
+
}
|
|
88
|
+
|
|
84
89
|
/** Locale-relative CMS path → site URL: the one seam for the renderer
|
|
85
90
|
* (metadata alternates, the `page` prop's links) and the admin (canvas,
|
|
86
91
|
* View live). The identity for a single-language site; with next-intl it
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
-- Smoodly core schema, version 2 (docs/superpowers/specs/2026-09-26-concurrency-guard-presence-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 1: the draft pointers become foreign keys (the
|
|
5
|
+
-- token rides every locale row read) and the editing-presence channel
|
|
6
|
+
-- gets its policy on realtime.messages.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
alter table "page_locales" drop constraint if exists "page_locales_draft_version_fkey";
|
|
11
|
+
alter table "page_locales" add constraint "page_locales_draft_version_fkey"
|
|
12
|
+
foreign key ("draft_version_id") references "page_versions" ("id") on delete set null;
|
|
13
|
+
alter table "entry_locales" drop constraint if exists "entry_locales_draft_version_fkey";
|
|
14
|
+
alter table "entry_locales" add constraint "entry_locales_draft_version_fkey"
|
|
15
|
+
foreign key ("draft_version_id") references "entry_versions" ("id") on delete set null;
|
|
16
|
+
|
|
17
|
+
drop policy if exists "smoodly_presence_read" on "realtime"."messages";
|
|
18
|
+
create policy "smoodly_presence_read" on "realtime"."messages" for select
|
|
19
|
+
using ((select realtime.topic()) = 'space:' || (select public."smoodly_current_space"())::text);
|
|
20
|
+
|
|
21
|
+
drop policy if exists "smoodly_presence_write" on "realtime"."messages";
|
|
22
|
+
create policy "smoodly_presence_write" on "realtime"."messages" for insert
|
|
23
|
+
with check ((select realtime.topic()) = 'space:' || (select public."smoodly_current_space"())::text);
|
|
24
|
+
|
|
25
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '2')
|
|
26
|
+
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-
|
|
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.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection people sha256:929798ebb4fa2bb6
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSmoodlyAdmin } from "smoodly/admin/next";
|
|
2
2
|
import { config } from "./config";
|
|
3
3
|
import { smoodlyOp } from "./ops";
|
|
4
|
-
import { publicAuth } from "./server";
|
|
4
|
+
import { publicAuth, publicContent } from "./server";
|
|
5
5
|
|
|
6
|
-
export const { AdminPage, AdminLayout } = createSmoodlyAdmin({ config, op: smoodlyOp, auth: publicAuth });
|
|
6
|
+
export const { AdminPage, AdminLayout } = createSmoodlyAdmin({ config, op: smoodlyOp, auth: publicAuth, content: publicContent });
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// admin route enters it from config.ts — so nothing here may read the
|
|
10
10
|
// config at module scope.
|
|
11
11
|
import {
|
|
12
|
-
createSmoodlyClient, createSmoodlySite, smoodlyEnv, SupabaseAssetStore, SupabaseEntryStore, SupabaseMemberStore, SupabasePageStore, SupabasePathIndex, type SmoodlySite,
|
|
12
|
+
createSmoodlyClient, createSmoodlySite, publicContentConfig, smoodlyEnv, SupabaseAssetStore, SupabaseEntryStore, SupabaseMemberStore, SupabasePageStore, SupabasePathIndex, type ContentConfig, type SmoodlySite,
|
|
13
13
|
} from "smoodly";
|
|
14
14
|
import { supabaseAdminAuth, type AdminAuth, type AuthConfig } from "smoodly/admin/next";
|
|
15
15
|
import { createPageRenderer, createSmoodlyQueries, type PageRegistration } from "smoodly/next";
|
|
@@ -82,6 +82,11 @@ export function publicAuth(): AuthConfig {
|
|
|
82
82
|
return { url: env.authUrl, key: env.authKey };
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
/** What the browser needs to join the editing-presence channel — public values only (spec 2026-09-26 concurrency §5). */
|
|
86
|
+
export function publicContent(): ContentConfig {
|
|
87
|
+
return publicContentConfig(smoodlyEnv());
|
|
88
|
+
}
|
|
89
|
+
|
|
85
90
|
/** Locale-relative CMS path → site URL: the one seam for the renderer
|
|
86
91
|
* (metadata alternates, the `page` prop's links) and the admin (canvas,
|
|
87
92
|
* View live). The identity for a single-language site; with next-intl it
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
-- Smoodly core schema, version 2 (docs/superpowers/specs/2026-09-26-concurrency-guard-presence-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 1: the draft pointers become foreign keys (the
|
|
5
|
+
-- token rides every locale row read) and the editing-presence channel
|
|
6
|
+
-- gets its policy on realtime.messages.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
alter table "page_locales" drop constraint if exists "page_locales_draft_version_fkey";
|
|
11
|
+
alter table "page_locales" add constraint "page_locales_draft_version_fkey"
|
|
12
|
+
foreign key ("draft_version_id") references "page_versions" ("id") on delete set null;
|
|
13
|
+
alter table "entry_locales" drop constraint if exists "entry_locales_draft_version_fkey";
|
|
14
|
+
alter table "entry_locales" add constraint "entry_locales_draft_version_fkey"
|
|
15
|
+
foreign key ("draft_version_id") references "entry_versions" ("id") on delete set null;
|
|
16
|
+
|
|
17
|
+
drop policy if exists "smoodly_presence_read" on "realtime"."messages";
|
|
18
|
+
create policy "smoodly_presence_read" on "realtime"."messages" for select
|
|
19
|
+
using ((select realtime.topic()) = 'space:' || (select public."smoodly_current_space"())::text);
|
|
20
|
+
|
|
21
|
+
drop policy if exists "smoodly_presence_write" on "realtime"."messages";
|
|
22
|
+
create policy "smoodly_presence_write" on "realtime"."messages" for insert
|
|
23
|
+
with check ((select realtime.topic()) = 'space:' || (select public."smoodly_current_space"())::text);
|
|
24
|
+
|
|
25
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '2')
|
|
26
|
+
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-
|
|
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.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection people sha256:929798ebb4fa2bb6
|