siteplane 0.1.56 → 0.1.57
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/dist/bin/siteplane.js +7 -4
- package/package.json +1 -1
package/dist/bin/siteplane.js
CHANGED
|
@@ -5479,8 +5479,8 @@ async function setupPrepareCommand(input) {
|
|
|
5479
5479
|
if (context.status !== "ok")
|
|
5480
5480
|
return context;
|
|
5481
5481
|
const task = context.task;
|
|
5482
|
-
if (task.site?.siteId !== config.siteId || task.run?.runId !== config.runId
|
|
5483
|
-
throw new SetupFailure("setup_contract_conflict", "The local configuration does not match this server task and
|
|
5482
|
+
if (task.site?.siteId !== config.siteId || task.run?.runId !== config.runId) {
|
|
5483
|
+
throw new SetupFailure("setup_contract_conflict", "The local configuration does not match this server task's site and setup run.");
|
|
5484
5484
|
}
|
|
5485
5485
|
if (task.run.status === "completed" || task.run.status === "ready_for_review")
|
|
5486
5486
|
return {
|
|
@@ -5597,7 +5597,8 @@ ${layoutSource.slice(0, point)}<SiteplaneBridge />${layoutSource.slice(point)}`)
|
|
|
5597
5597
|
files.set(nextPath, `import { withSiteplane } from "siteplane/next";
|
|
5598
5598
|
${nextSource.slice(0, expression.getStart(ast))}withSiteplane(${expression.getText(ast)})${nextSource.slice(expression.end)}`);
|
|
5599
5599
|
}
|
|
5600
|
-
|
|
5600
|
+
const guidePath = join10(directory, ".siteplane/setup-guide-v2.md");
|
|
5601
|
+
files.set(guidePath, `# Siteplane setup task v2
|
|
5601
5602
|
|
|
5602
5603
|
${task.goal}
|
|
5603
5604
|
|
|
@@ -5608,11 +5609,13 @@ ${task.discovery.rules.map((rule) => `- ${rule}`).join("\n")}
|
|
|
5608
5609
|
Run setup context for the current user instructions and authorized modules. Keep the user instructions distinct from your selection summary. Use setup deploy --wait for environment transfer and deployment; never read or print credential values. For image fields, withSiteplane prepares the exact Siteplane asset route and the website /siteplane-assets/ path in Next Image and existing img-src policies at build time. This grants no hosting permission. Preserve existing image sources; explicitly resolve custom loaders, redirect dependencies, or CSP written by middleware/proxy/meta tags before deployment. Use the provider-selected public SITEPLANE_SITE_ORIGIN for local builds.
|
|
5609
5610
|
`);
|
|
5610
5611
|
for (const [path, content] of files) {
|
|
5611
|
-
if (path === layoutPath || path === nextPath)
|
|
5612
|
+
if (path === layoutPath || path === nextPath || path === guidePath)
|
|
5612
5613
|
continue;
|
|
5613
5614
|
if (await exists3(path) && await readFile10(path, "utf8") !== content)
|
|
5614
5615
|
throw new SetupFailure("owned_file_conflict", `Preserve the existing ${relative6(directory, path)} and reconcile its integration with the current Siteplane guide before retrying.`);
|
|
5615
5616
|
}
|
|
5617
|
+
files.set(configPath, `${JSON.stringify({ ...config, packages: task.packages }, null, 2)}
|
|
5618
|
+
`);
|
|
5616
5619
|
for (const path of files.keys())
|
|
5617
5620
|
await assertSourcePath(directory, path);
|
|
5618
5621
|
const before = /* @__PURE__ */ new Map();
|