@omniharmonic/openspace-cli 0.1.5 → 0.1.7

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 (53) hide show
  1. package/dist/{agents-md-PVK5NBFF.js → agents-md-A4JWPOMG.js} +2 -2
  2. package/dist/bin.js +2 -2
  3. package/dist/{chunk-RG7S2MUH.js → chunk-ANGZMFLZ.js} +139 -24
  4. package/dist/chunk-ANGZMFLZ.js.map +1 -0
  5. package/dist/{chunk-UQXJVMUV.js → chunk-KAJOS2YV.js} +590 -66
  6. package/dist/chunk-KAJOS2YV.js.map +1 -0
  7. package/dist/index.js +2 -2
  8. package/dist/templates/atelier/content/pages/home.json +11 -11
  9. package/dist/templates/beacon/content/collections/news/2026-09-12-heat-map-2026.mdoc +2 -2
  10. package/dist/templates/beacon/content/collections/news/2026-09-30-school-gardens-harvest.mdoc +2 -2
  11. package/dist/templates/beacon/content/collections/news/2026-10-14-planting-season-begins.mdoc +2 -2
  12. package/dist/templates/beacon/content/pages/home.json +1 -1
  13. package/dist/templates/beacon/media/LICENSES.json +33 -0
  14. package/dist/templates/commons/content/pages/home.json +4 -4
  15. package/dist/templates/commons/content/site.json +1 -1
  16. package/dist/templates/commons/media/LICENSES.json +11 -11
  17. package/dist/templates/darkroom/content/collections/work/after-hours.mdoc +7 -4
  18. package/dist/templates/darkroom/content/collections/work/faces-of-the-guild.mdoc +10 -7
  19. package/dist/templates/darkroom/content/collections/work/first-light.mdoc +34 -0
  20. package/dist/templates/darkroom/content/pages/home.json +27 -15
  21. package/dist/templates/darkroom/media/LICENSES.json +82 -49
  22. package/dist/templates/encore/content/pages/home.json +8 -4
  23. package/dist/templates/encore/media/LICENSES.json +11 -0
  24. package/dist/templates/field-notes/content/collections/essays/a-year-of-apples.mdoc +2 -2
  25. package/dist/templates/field-notes/content/collections/essays/in-praise-of-dirt-roads.mdoc +27 -0
  26. package/dist/templates/field-notes/content/collections/essays/learning-a-field.mdoc +2 -2
  27. package/dist/templates/field-notes/content/collections/essays/the-barn-that-leans.mdoc +29 -0
  28. package/dist/templates/field-notes/content/collections/essays/the-wall-builders.mdoc +2 -2
  29. package/dist/templates/field-notes/content/pages/home.json +3 -3
  30. package/dist/templates/field-notes/media/LICENSES.json +55 -33
  31. package/dist/templates/gather/content/pages/home.json +25 -11
  32. package/dist/templates/harbor/content/collections/news/2026-09-15-meet-the-repair-crew.mdoc +2 -2
  33. package/dist/templates/harbor/content/pages/get-involved.json +1 -1
  34. package/dist/templates/harbor/content/pages/home.json +9 -5
  35. package/dist/templates/harbor/content/pages/programs.json +2 -2
  36. package/dist/templates/harbor/media/LICENSES.json +22 -0
  37. package/dist/templates/hearth/content/pages/home.json +17 -22
  38. package/dist/templates/hearth/media/LICENSES.json +22 -11
  39. package/dist/templates/kiln/content/collections/classes/glaze-day-march.mdoc +2 -2
  40. package/dist/templates/kiln/content/collections/classes/hand-building-february.mdoc +2 -2
  41. package/dist/templates/kiln/content/collections/classes/wheel-weekend-january.mdoc +2 -2
  42. package/dist/templates/kiln/content/pages/home.json +5 -5
  43. package/dist/templates/kiln/media/LICENSES.json +55 -0
  44. package/dist/templates/link/content/pages/home.json +35 -31
  45. package/dist/templates/link/media/LICENSES.json +25 -25
  46. package/dist/templates/meadow/content/collections/workshops/breath-and-rest-workshop.mdoc +2 -2
  47. package/dist/templates/meadow/media/LICENSES.json +11 -0
  48. package/dist/templates/orbit/content/pages/home.json +25 -11
  49. package/package.json +6 -6
  50. package/dist/chunk-RG7S2MUH.js.map +0 -1
  51. package/dist/chunk-UQXJVMUV.js.map +0 -1
  52. package/dist/templates/darkroom/content/collections/work/dry-season.mdoc +0 -28
  53. /package/dist/{agents-md-PVK5NBFF.js.map → agents-md-A4JWPOMG.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import { createRequire as __osCreateRequire } from "node:module"; const require = __osCreateRequire(import.meta.url);
2
2
  import {
3
3
  generateAgentsMd
4
- } from "./chunk-UQXJVMUV.js";
4
+ } from "./chunk-KAJOS2YV.js";
5
5
  import "./chunk-26AZCID5.js";
6
6
  export {
7
7
  generateAgentsMd
8
8
  };
9
- //# sourceMappingURL=agents-md-PVK5NBFF.js.map
9
+ //# sourceMappingURL=agents-md-A4JWPOMG.js.map
package/dist/bin.js CHANGED
@@ -3,9 +3,9 @@ import { createRequire as __osCreateRequire } from "node:module"; const require
3
3
  import {
4
4
  processIo,
5
5
  run
6
- } from "./chunk-RG7S2MUH.js";
6
+ } from "./chunk-ANGZMFLZ.js";
7
7
  import "./chunk-WE4QCL3R.js";
8
- import "./chunk-UQXJVMUV.js";
8
+ import "./chunk-KAJOS2YV.js";
9
9
  import "./chunk-26AZCID5.js";
10
10
 
11
11
  // src/bin.ts
@@ -50,6 +50,7 @@ import {
50
50
  MediaMetaSchema,
51
51
  MediaPathSchema,
52
52
  NavItemSchema,
53
+ PLACEHOLDER_RE,
53
54
  PRESET_CATEGORIES,
54
55
  PageIdSchema,
55
56
  PageSchema,
@@ -92,17 +93,19 @@ import {
92
93
  parseColor,
93
94
  plainText,
94
95
  presetCatalog,
96
+ presetSampleStrings,
95
97
  presetSection,
96
98
  presetsIn,
97
99
  registerAll,
98
100
  renderPageHtml,
99
101
  resolve,
100
102
  responsive,
103
+ sampleMatches,
101
104
  starterRef,
102
105
  toHex,
103
106
  toJsonSchema,
104
107
  toMarkdown
105
- } from "./chunk-UQXJVMUV.js";
108
+ } from "./chunk-KAJOS2YV.js";
106
109
  import {
107
110
  __commonJS,
108
111
  __require,
@@ -8546,7 +8549,7 @@ async function runCheck(root, options = {}) {
8546
8549
  rule: "gating",
8547
8550
  file,
8548
8551
  path: "access",
8549
- message: `Page "${page.title}" is ${kinds}: it is only published with Cloudflare hosting.`
8552
+ message: `Page "${page.title}" is ${kinds}: until you switch on members and password pages (Studio \u2192 Finish setting up), visitors don't see it and the rest of the site publishes as usual.`
8550
8553
  });
8551
8554
  }
8552
8555
  const errors2 = findings.filter((f) => f.severity === "error").length;
@@ -12045,6 +12048,42 @@ var Ctx = class {
12045
12048
  this.primaryActions(page, section);
12046
12049
  this.copyLength(page, section);
12047
12050
  this.background(page, section);
12051
+ this.sampleContent(page, section);
12052
+ this.placeholders(page, section);
12053
+ }
12054
+ }
12055
+ /** Unedited preset sample content: made-up people, quotes, prices and contact details. */
12056
+ sampleContent(page, section) {
12057
+ if (!section.preset) return;
12058
+ const matches = sampleMatches(section, presetSampleStrings(section.preset));
12059
+ const first = matches[0];
12060
+ if (!first) return;
12061
+ const examples = matches.flatMap((m) => m.found).slice(0, 2).map((s2) => `\u201C${s2.length > 48 ? `${s2.slice(0, 47)}\u2026` : s2}\u201D`).join(", ");
12062
+ this.add({
12063
+ rule: "sample-content",
12064
+ severity: "warning",
12065
+ page,
12066
+ section: section.id,
12067
+ block: first.blockId,
12068
+ message: `This section still has sample content from its design (${examples}): people, quotes, prices or details that aren't about your site.`,
12069
+ fix: "Edit it with your own words, people and numbers \u2014 or delete the section. Never publish made-up reviews or names."
12070
+ });
12071
+ }
12072
+ /** Placeholder text left in: "[PLACEHOLDER]", "[Your name]", "Lorem ipsum". */
12073
+ placeholders(page, section) {
12074
+ for (const b of section.blocks) {
12075
+ if (b.hidden) continue;
12076
+ const m = PLACEHOLDER_RE.exec(blockText(b));
12077
+ if (!m) continue;
12078
+ this.add({
12079
+ rule: "placeholder-text",
12080
+ severity: "warning",
12081
+ page,
12082
+ section: section.id,
12083
+ block: b.id,
12084
+ message: `This block still has placeholder text (\u201C${m[0]}\u201D).`,
12085
+ fix: "Edit it to say what you mean, or remove it before publishing."
12086
+ });
12048
12087
  }
12049
12088
  }
12050
12089
  headings(page, sections) {
@@ -25029,6 +25068,8 @@ var getSite = defineTool({
25029
25068
  media: Object.keys(doc.media).length,
25030
25069
  capabilities: {
25031
25070
  ...ctx.store.capabilities,
25071
+ // Same answer as list_sites: publishing needs both the store and this connection.
25072
+ canPublish: ctx.grant.publish && ctx.store.capabilities.canPublish,
25032
25073
  grantPublish: ctx.grant.publish
25033
25074
  }
25034
25075
  }
@@ -25662,7 +25703,7 @@ var DEVICE_WIDTH = {
25662
25703
  var screenshot = defineTool({
25663
25704
  name: "screenshot",
25664
25705
  title: "Screenshot",
25665
- description: 'PNG screenshot of a draft page or one section at desktop (1440), tablet (834) or mobile (390) width \u2014 or "all" three \u2014 so you can see the design and iterate. Returns the preview URL as well. Needs a screenshot provider (Playwright locally).',
25706
+ description: 'Screenshot of a draft page or one section at desktop (1440), tablet (834) or mobile (390) width \u2014 or "all" three \u2014 so you can see the design and iterate. Tall pages may come back as several images, top to bottom. Returns the preview URL as well. Needs a screenshot provider (Playwright locally, Cloudflare Browser Rendering on the Hub).',
25666
25707
  input: external_exports.object({
25667
25708
  site: siteArg,
25668
25709
  page: external_exports.string(),
@@ -25687,6 +25728,7 @@ var screenshot = defineTool({
25687
25728
  const devices = input.device === "all" ? ["desktop", "tablet", "mobile"] : [input.device ?? "desktop"];
25688
25729
  const images = [];
25689
25730
  const shots = [];
25731
+ const notes = [];
25690
25732
  for (const device of devices) {
25691
25733
  const shot = await ctx.store.screenshot(siteId, {
25692
25734
  pageId: id,
@@ -25701,10 +25743,14 @@ var screenshot = defineTool({
25701
25743
  mimeType: shot.mimeType,
25702
25744
  caption: `${device} ${shot.width}px`
25703
25745
  });
25746
+ for (const [i, part] of (shot.more ?? []).entries())
25747
+ images.push({ ...part, caption: `${device} ${shot.width}px (part ${i + 2})` });
25704
25748
  shots.push({ device, width: shot.width, height: shot.height });
25749
+ if (shot.note) notes.push(`${device}: ${shot.note}`);
25705
25750
  }
25706
25751
  return {
25707
- text: `Screenshot${shots.length > 1 ? "s" : ""} of ${page?.title ?? id}${input.section ? ` (section ${input.section})` : ""}: ${shots.map((s2) => `${s2.device} ${s2.width}\xD7${s2.height ?? "?"}`).join(", ")}.${url ? ` Preview: ${url}` : ""}`,
25752
+ text: `Screenshot${shots.length > 1 ? "s" : ""} of ${page?.title ?? id}${input.section ? ` (section ${input.section})` : ""}: ${shots.map((s2) => `${s2.device} ${s2.width}\xD7${s2.height ?? "?"}`).join(", ")}.${url ? ` Preview: ${url}` : ""}${notes.length ? `
25753
+ ${notes.join("\n")}` : ""}`,
25708
25754
  data: { url, shots },
25709
25755
  images
25710
25756
  };
@@ -26626,7 +26672,7 @@ var publish = defineTool({
26626
26672
  const siteId = await ctx.siteId(input.site);
26627
26673
  if (!ctx.grant.publish)
26628
26674
  throw new ToolError(
26629
- "This connection isn't allowed to publish. The owner can publish from Studio, or allow publishing for this connection.",
26675
+ "This connection isn't allowed to publish. Publish from Studio, or ask the site owner to allow publishing for this connection in Studio \u2192 Settings \u2192 Connect your AI.",
26630
26676
  "forbidden"
26631
26677
  );
26632
26678
  if (!ctx.store.capabilities.canPublish)
@@ -28227,7 +28273,7 @@ async function renderAgentsMd(root, siteTitle) {
28227
28273
  } catch {
28228
28274
  }
28229
28275
  }
28230
- const { generateAgentsMd: generateAgentsMd2 } = await import("./agents-md-PVK5NBFF.js");
28276
+ const { generateAgentsMd: generateAgentsMd2 } = await import("./agents-md-A4JWPOMG.js");
28231
28277
  return generateAgentsMd2(title ? { siteTitle: title } : {});
28232
28278
  }
28233
28279
  async function writeAgentsMd(root, siteTitle) {
@@ -28262,6 +28308,11 @@ function compareVersions(a, b) {
28262
28308
 
28263
28309
  // src/dev.ts
28264
28310
  var ASTRO_MIN_NODE = "22.23.4";
28311
+ function astroNodeProblem(nodeVersion) {
28312
+ if (compareVersions(nodeVersion, ASTRO_MIN_NODE) >= 0) return null;
28313
+ return `Astro needs Node ${ASTRO_MIN_NODE} or newer (Node 24 recommended), but this is Node ${nodeVersion}.
28314
+ Install Node 24 (for example with nvm: "nvm install 24 && nvm use 24").`;
28315
+ }
28265
28316
  function findAstroBin(cwd) {
28266
28317
  try {
28267
28318
  const req = createRequire(join5(cwd, "package.json"));
@@ -28276,11 +28327,9 @@ function findAstroBin(cwd) {
28276
28327
  }
28277
28328
  }
28278
28329
  async function runDev(io, args, spawner = (c, a, o) => spawn(c, a, { ...o, stdio: "inherit" }), findBin = findAstroBin) {
28279
- if (compareVersions(io.nodeVersion, ASTRO_MIN_NODE) < 0)
28280
- throw new CliError(
28281
- `Astro needs Node ${ASTRO_MIN_NODE} or newer, but this is Node ${io.nodeVersion}.
28282
- Install a newer Node 22 (for example with nvm: "nvm install 22 && nvm use 22") and run "openspace dev" again.`
28283
- );
28330
+ const tooOld = astroNodeProblem(io.nodeVersion);
28331
+ if (tooOld) throw new CliError(`${tooOld}
28332
+ Then run "openspace dev" again.`);
28284
28333
  if (!existsSync(join5(io.cwd, "openspace.json")))
28285
28334
  throw new CliError('No openspace.json here. Run "openspace dev" from the root of your site.');
28286
28335
  const bin = findBin(io.cwd);
@@ -28554,7 +28603,7 @@ async function runGatedSync(io, opts = {}, deps = {}) {
28554
28603
  }
28555
28604
  if (config.deploy?.target !== "cloudflare")
28556
28605
  throw new CliError(
28557
- "Members-only and password pages need Cloudflare hosting (Studio \u2192 Settings \u2192 Hosting)."
28606
+ "Members-only and password pages are switched on in Studio \u2192 Finish setting up (it moves the site to Cloudflare for you)."
28558
28607
  );
28559
28608
  const bucket = opts.bucket ?? gatedBucketName(root);
28560
28609
  if (!bucket)
@@ -29267,7 +29316,9 @@ function importSiteTool(opts) {
29267
29316
  exportFile: external_exports.string().optional().describe(
29268
29317
  "Path to a WordPress export (WXR XML): a WordPress site's full export, or Squarespace's blog export."
29269
29318
  ),
29270
- target: external_exports.enum(["github-pages", "cloudflare"]).optional().describe("cloudflare to sell products or gate pages"),
29319
+ target: external_exports.enum(["github-pages"]).optional().describe(
29320
+ "Always github-pages (the default): every import goes live on free GitHub Pages first. Shops, donations, member areas and password pages are switched on afterwards in Studio \u2192 Finish setting up."
29321
+ ),
29271
29322
  confirm: external_exports.boolean().optional().describe("Must be true: the owner agreed to fetch the site and create the folder.")
29272
29323
  }),
29273
29324
  annotations: { openWorldHint: true, destructiveHint: false, idempotentHint: false },
@@ -29448,6 +29499,30 @@ async function loadPlaywright(importer = defaultImporter) {
29448
29499
  error: "Playwright is not installed. Run `npm i -D playwright && npx playwright install chromium` in the site folder and restart `openspace mcp`."
29449
29500
  };
29450
29501
  }
29502
+ function prepareScript(sectionId) {
29503
+ return `(async () => {
29504
+ const imgs = Array.from(document.images);
29505
+ for (const img of imgs) { img.loading = "eager"; img.decoding = "sync"; }
29506
+ const step = Math.max(200, Math.floor(window.innerHeight * 0.8));
29507
+ for (let y = 0; y < document.documentElement.scrollHeight; y += step) {
29508
+ window.scrollTo(0, y);
29509
+ await new Promise((r) => setTimeout(r, 30));
29510
+ }
29511
+ window.scrollTo(0, 0);
29512
+ const done = Promise.all(Array.from(document.images).map((img) => img.complete ? null :
29513
+ new Promise((r) => { img.addEventListener("load", r, { once: true }); img.addEventListener("error", r, { once: true }); })));
29514
+ await Promise.race([done, new Promise((r) => setTimeout(r, 5000))]);
29515
+ const id = ${JSON.stringify(sectionId ?? null)};
29516
+ if (id) {
29517
+ const target = document.querySelector('[data-os-id="' + id + '"]');
29518
+ for (const el of Array.from(document.body.querySelectorAll("*"))) {
29519
+ if (target && (el.contains(target) || target.contains(el))) continue;
29520
+ const pos = getComputedStyle(el).position;
29521
+ if (pos === "fixed" || pos === "sticky") el.style.setProperty("visibility", "hidden", "important");
29522
+ }
29523
+ }
29524
+ })()`;
29525
+ }
29451
29526
  function createScreenshotter(chromium) {
29452
29527
  let browser;
29453
29528
  const launch = async () => {
@@ -29481,6 +29556,7 @@ function createScreenshotter(chromium) {
29481
29556
  await page.goto(url, { waitUntil: "load", timeout: 3e4 });
29482
29557
  await page.waitForLoadState("networkidle", { timeout: 5e3 }).catch(() => void 0);
29483
29558
  await page.evaluate("document.fonts && document.fonts.ready").catch(() => void 0);
29559
+ await page.evaluate(prepareScript(req.sectionId)).catch(() => void 0);
29484
29560
  let png;
29485
29561
  if (req.sectionId) {
29486
29562
  png = await page.locator(`[data-os-id="${req.sectionId}"]`).first().screenshot({ type: "png" });
@@ -29742,7 +29818,11 @@ async function scaffold(templateId, dir, tpl, opts) {
29742
29818
  search: true
29743
29819
  }
29744
29820
  };
29745
- if (opts.title) doc.site = { ...doc.site, title: opts.title };
29821
+ if (opts.title) {
29822
+ const from = doc.site.title.trim();
29823
+ const footer = from && from !== opts.title ? rebrand(doc.site.footer, from, opts.title) : null;
29824
+ doc.site = { ...doc.site, title: opts.title, ...footer ? { footer } : {} };
29825
+ }
29746
29826
  await writeSiteDocument(dir, doc);
29747
29827
  await writeAgentsMd(dir, doc.site.title);
29748
29828
  return {
@@ -29754,6 +29834,32 @@ async function scaffold(templateId, dir, tpl, opts) {
29754
29834
  files: Object.keys(files).length
29755
29835
  };
29756
29836
  }
29837
+ var NOT_TEXT = /^(?:src|url|href|link|id|type|variant|icon|target|kind|style|preset)$/;
29838
+ function rebrand(value, from, to) {
29839
+ let changed = false;
29840
+ const walk5 = (v, key) => {
29841
+ if (typeof v === "string") {
29842
+ if (key && NOT_TEXT.test(key) || !v.includes(from)) return v;
29843
+ changed = true;
29844
+ return v.split(from).join(to);
29845
+ }
29846
+ if (Array.isArray(v)) return v.map((x) => walk5(x));
29847
+ if (v && typeof v === "object")
29848
+ return Object.fromEntries(Object.entries(v).map(([k, x]) => [k, walk5(x, k)]));
29849
+ return v;
29850
+ };
29851
+ const out = walk5(value);
29852
+ return changed ? out : null;
29853
+ }
29854
+
29855
+ // src/wow-first.ts
29856
+ var WOW_FIRST_MESSAGE = "New and imported sites always start on free GitHub Pages, so the first version goes live without any extra accounts. Shops, donations, member areas and password pages show a friendly \u201Copening soon\u201D note until you switch them on in Studio \u2192 Finish setting up (it moves the site to Cloudflare for you, with no downtime).";
29857
+ function assertGitHubPagesStart(target) {
29858
+ if (target && target !== "github-pages")
29859
+ throw new CliError(
29860
+ `--target ${target} isn't available when creating a site. ${WOW_FIRST_MESSAGE}`
29861
+ );
29862
+ }
29757
29863
 
29758
29864
  // src/import.ts
29759
29865
  function defaultFolder(url) {
@@ -29822,7 +29928,8 @@ async function loadRenderer() {
29822
29928
  };
29823
29929
  }
29824
29930
  async function runImportSite(io, url, dirArg, opts = {}) {
29825
- const target = opts.target ?? "github-pages";
29931
+ assertGitHubPagesStart(opts.target);
29932
+ const target = "github-pages";
29826
29933
  const dir = resolve5(io.cwd, dirArg ?? defaultFolder(url));
29827
29934
  if (!await isEmptyDir(dir))
29828
29935
  throw new CliError(`${dir} already exists and is not empty. Choose a new folder.`);
@@ -29978,6 +30085,9 @@ function createProgram(io, setExit, deps = {}) {
29978
30085
  io.out(formatReport(report, (code2, s2) => paint(color, code2, s2)));
29979
30086
  }
29980
30087
  if (!report.ok) setExit(1);
30088
+ const tooOld = astroNodeProblem(io.nodeVersion);
30089
+ if (tooOld && !opts.json) io.err(`Note: ${tooOld}
30090
+ The site won't build until you do.`);
29981
30091
  }
29982
30092
  );
29983
30093
  program.command("dev").description("Start the local preview (astro dev) in this site.").allowUnknownOption().argument("[astroArgs...]", "extra arguments passed to astro dev").action(async (args) => {
@@ -29997,11 +30107,14 @@ function createProgram(io, setExit, deps = {}) {
29997
30107
  for (const f of r.written) io.out(` ${f}`);
29998
30108
  for (const f of r.removed) io.out(` ${opts.dryRun ? "would remove" : "removed"} ${f}`);
29999
30109
  });
30000
- program.command("new").description("Create a new site from a template.").argument("<template>", "template id (for example: meadow)").argument("<dir>", "folder to create").option("--target <target>", "github-pages or cloudflare", "github-pages").option("--repo <owner/name>", "GitHub repository, used for the Pages address").option("--url <url>", "address the site is served from before a custom domain").option("--domain <hostname>", "custom domain").option("--title <title>", "site title").option("--hub <url>", "Hub address").option("--templates-dir <dir>", "folder holding template directories").action(
30110
+ program.command("new").description("Create a new site from a template.").argument("<template>", "template id (for example: meadow)").argument("<dir>", "folder to create").option(
30111
+ "--target <target>",
30112
+ "always github-pages (Cloudflare is switched on later in Studio)",
30113
+ "github-pages"
30114
+ ).option("--repo <owner/name>", "GitHub repository, used for the Pages address").option("--url <url>", "address the site is served from before a custom domain").option("--domain <hostname>", "custom domain").option("--title <title>", "site title").option("--hub <url>", "Hub address").option("--templates-dir <dir>", "folder holding template directories").action(
30001
30115
  async (template, dir, opts) => {
30002
- if (opts.target !== "github-pages" && opts.target !== "cloudflare")
30003
- throw new CliError(`--target must be github-pages or cloudflare, not "${opts.target}".`);
30004
- const r = await runNew(io, template, dir, { ...opts, target: opts.target });
30116
+ assertGitHubPagesStart(opts.target);
30117
+ const r = await runNew(io, template, dir, { ...opts, target: "github-pages" });
30005
30118
  if (r.usedFallback)
30006
30119
  io.out(
30007
30120
  `Note: template "${template}" has no content of its own yet, so the Meadow sample site (${r.contentFrom}) was used instead.`
@@ -30014,6 +30127,9 @@ function createProgram(io, setExit, deps = {}) {
30014
30127
  io.out(" npm install");
30015
30128
  io.out(" npx openspace check");
30016
30129
  io.out(" npx openspace dev");
30130
+ const tooOld = astroNodeProblem(io.nodeVersion);
30131
+ if (tooOld) io.err(`Warning: ${tooOld}
30132
+ The site won't preview or build until you do.`);
30017
30133
  if (opts.url === void 0 && opts.repo === void 0 && !opts.domain)
30018
30134
  io.out("Set deploy.url in openspace.json to where the site will be published.");
30019
30135
  }
@@ -30044,13 +30160,12 @@ function createProgram(io, setExit, deps = {}) {
30044
30160
  );
30045
30161
  return c.option(
30046
30162
  "--target <target>",
30047
- "github-pages or cloudflare (use cloudflare to sell products)",
30163
+ "always github-pages: shops and member areas are switched on later in Studio",
30048
30164
  "github-pages"
30049
30165
  ).option("--repo <owner/name>", "GitHub repository, used for the Pages address").option("--url <url>", "address the new site is served from before a custom domain").option("--domain <hostname>", "custom domain (set it when you move the domain)").option("--title <title>", "site title (default: the original site's title)").option("--hub <url>", "Hub address").option("--max-pages <n>", "most pages and items to read (default 400)", Number).option("--delay <ms>", "pause between requests to the site (default 300)", Number).option("--no-media", "don't download images and files (a quick structural preview)");
30050
30166
  };
30051
30167
  const runImportCommand = async (url, dir, opts, platform) => {
30052
- if (opts.target !== "github-pages" && opts.target !== "cloudflare")
30053
- throw new CliError(`--target must be github-pages or cloudflare, not "${opts.target}".`);
30168
+ assertGitHubPagesStart(opts.target);
30054
30169
  let chosen = platform;
30055
30170
  if (opts.platform) {
30056
30171
  const p = parsePlatform(opts.platform);
@@ -30066,7 +30181,7 @@ function createProgram(io, setExit, deps = {}) {
30066
30181
  const { platform: _p, ...rest } = opts;
30067
30182
  const r = await runImportSite(io, url, dir, {
30068
30183
  ...rest,
30069
- target: opts.target,
30184
+ target: "github-pages",
30070
30185
  platform: chosen,
30071
30186
  ...deps.fetch ? { fetch: deps.fetch } : {}
30072
30187
  });
@@ -30176,4 +30291,4 @@ export {
30176
30291
  createProgram,
30177
30292
  run
30178
30293
  };
30179
- //# sourceMappingURL=chunk-RG7S2MUH.js.map
30294
+ //# sourceMappingURL=chunk-ANGZMFLZ.js.map