create-astroid 0.7.2 → 0.7.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.
- package/index.mjs +6 -0
- package/package.json +4 -4
- package/template/seed/home.seed.sql +0 -61
package/index.mjs
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
ASTROID_MAP_DEPENDENCIES,
|
|
24
24
|
defineAstroid,
|
|
25
25
|
generateAstroidEnvBindings,
|
|
26
|
+
generateAstroidHomeSeed,
|
|
26
27
|
generateAstroidPortalLocals,
|
|
27
28
|
generateAstroidProject,
|
|
28
29
|
generateAstroidCheckoutEnv,
|
|
@@ -446,6 +447,11 @@ async function main() {
|
|
|
446
447
|
for (const file of generateAstroidProject(config)) write(dir, file.path, file.contents);
|
|
447
448
|
write(dir, "wrangler.jsonc", generateAstroidWrangler(config));
|
|
448
449
|
|
|
450
|
+
// 3a. The home page seed, built from the config's own `sections`. It used to be
|
|
451
|
+
// a fixed template file that seeded the marketing sections for every
|
|
452
|
+
// archetype, and token substitution can't escape a brand name for SQL.
|
|
453
|
+
write(dir, "seed/home.seed.sql", generateAstroidHomeSeed(config));
|
|
454
|
+
|
|
449
455
|
// 3b. Every scaffold-once module file this config implies—the queue seam and
|
|
450
456
|
// webhook receivers, the portfolio gallery page, the PWA service worker +
|
|
451
457
|
// manifest + headers, the map tile route + embed, the portal's second auth
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-astroid",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Scaffold a new Astroid site — an editable, multi-editor Astro app on Cloudflare Workers — in one command.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@better-auth/passkey": "^1.7.2",
|
|
34
|
-
"@louise-toolkit/astro": "^0.2.
|
|
34
|
+
"@louise-toolkit/astro": "^0.2.3",
|
|
35
35
|
"better-auth": "^1.7.2",
|
|
36
|
-
"louise-toolkit": "^0.31.
|
|
37
|
-
"astroidjs": "0.
|
|
36
|
+
"louise-toolkit": "^0.31.1",
|
|
37
|
+
"astroidjs": "0.14.0"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=26.0.0"
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
-- Seed the editable home page (slug `home`) that src/pages/index.astro renders.
|
|
2
|
-
-- Idempotent. Apply once after migrations:
|
|
3
|
-
-- wrangler d1 execute DB --file seed/home.seed.sql --remote
|
|
4
|
-
-- (drop --remote for the local dev D1)
|
|
5
|
-
--
|
|
6
|
-
-- `sections` is the page-builder array — the same shape the on-canvas editor
|
|
7
|
-
-- reads and the server validates against the section catalog on write. Each item
|
|
8
|
-
-- is `{"_type": …, …fields, "_settings": {…}}`, and `_settings` holds TOKENS
|
|
9
|
-
-- (colorway/align), never CSS, so a re-theme needs no content change.
|
|
10
|
-
--
|
|
11
|
-
-- Seeding it is deliberate: an empty array renders an empty page, and a blank
|
|
12
|
-
-- canvas is a worse first run than having something real to click on and edit.
|
|
13
|
-
--
|
|
14
|
-
-- Full-text search (the editor's Pages search) is kept in sync on PUBLISH, so a
|
|
15
|
-
-- row inserted with raw SQL like this is NOT in the index until you either
|
|
16
|
-
-- publish an edit to it or backfill once with `POST /api/louise/pages/reindex`
|
|
17
|
-
-- (signed in). The page renders fine either way — only in-editor search is
|
|
18
|
-
-- affected.
|
|
19
|
-
--
|
|
20
|
-
-- To override just the <head> title/description (not the on-page H1), add
|
|
21
|
-
-- `seo_title` / `seo_description` columns below. `seo_title` is run through the
|
|
22
|
-
-- config's title template, which already appends the brand — so set the page
|
|
23
|
-
-- part only ("Pricing"), not "Pricing | __BRAND_NAME__".
|
|
24
|
-
INSERT OR IGNORE INTO pages (slug, title, body, sections, status, sort_order, created_at, updated_at)
|
|
25
|
-
VALUES (
|
|
26
|
-
'home',
|
|
27
|
-
'__BRAND_NAME__',
|
|
28
|
-
'<p>Welcome to __BRAND_NAME__. Sign in at <code>/login</code>, switch on edit mode, and change this text in place — then hit Publish.</p>',
|
|
29
|
-
json_array(
|
|
30
|
-
json_object(
|
|
31
|
-
'_type', 'hero',
|
|
32
|
-
'heading', '__BRAND_NAME__',
|
|
33
|
-
'subheading', 'Edit this in place — sign in, switch on edit mode, and type.',
|
|
34
|
-
'ctaLabel', 'Get in touch',
|
|
35
|
-
'ctaHref', '/contact',
|
|
36
|
-
'_settings', json_object('colorway', 'base', 'align', 'center')
|
|
37
|
-
),
|
|
38
|
-
json_object(
|
|
39
|
-
'_type', 'featureGrid',
|
|
40
|
-
'heading', 'What we do',
|
|
41
|
-
'items', json_array(
|
|
42
|
-
json_object('title', 'First thing', 'body', 'Describe it here.'),
|
|
43
|
-
json_object('title', 'Second thing', 'body', 'And this one.'),
|
|
44
|
-
json_object('title', 'Third thing', 'body', 'And this one too.')
|
|
45
|
-
),
|
|
46
|
-
'_settings', json_object('colorway', 'base')
|
|
47
|
-
),
|
|
48
|
-
json_object(
|
|
49
|
-
'_type', 'cta',
|
|
50
|
-
'heading', 'Ready when you are',
|
|
51
|
-
'body', 'Swap this copy for your own.',
|
|
52
|
-
'ctaLabel', 'Contact us',
|
|
53
|
-
'ctaHref', '/contact',
|
|
54
|
-
'_settings', json_object('colorway', 'brand', 'align', 'center')
|
|
55
|
-
)
|
|
56
|
-
),
|
|
57
|
-
'published',
|
|
58
|
-
0,
|
|
59
|
-
unixepoch(),
|
|
60
|
-
unixepoch()
|
|
61
|
-
);
|