create-kide-app 0.3.6 → 0.4.0

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 (2) hide show
  1. package/index.js +25 -16
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -477,6 +477,10 @@ async function main() {
477
477
  pkg.dependencies["@kidecms/core"] = `^${coreVersion}`;
478
478
  delete pkg.scripts["verify:pack"];
479
479
  delete pkg.scripts["verify:package"];
480
+ // Package-mode upgrades are `pnpm add @kidecms/core@latest` — the patch
481
+ // flow (and its .kide-version stamp) only exists after `kide eject`.
482
+ delete pkg.scripts["cms:upgrade"];
483
+ delete pkg.scripts["cms:restore"];
480
484
  // The runtime (and its worker tests + Cloudflare type profile) now lives in
481
485
  // node_modules — keep check/test scoped to project code, and let vitest pass
482
486
  // until the project has tests of its own.
@@ -564,22 +568,27 @@ async function main() {
564
568
  } catch {
565
569
  // best-effort
566
570
  }
567
- const versionStamp = {
568
- template: REPO.replace(/\.git$/, ""),
569
- kideVersion: coreVersion ?? pkg.version ?? null,
570
- ref: templateRef ?? "HEAD",
571
- commit: templateCommit,
572
- target,
573
- mode,
574
- starter: starter ?? null,
575
- corePath: "src/cms",
576
- scaffoldedAt: new Date().toISOString(),
577
- createKideApp: cliVersion,
578
- };
579
- writeFileSync(
580
- path.join(projectDir, ".kide-version"),
581
- `${JSON.stringify(versionStamp, null, 2)}\n`,
582
- );
571
+ // Package mode gets no version stamp: the installed @kidecms/core version is
572
+ // the only baseline that matters, and `kide eject` writes the stamp when the
573
+ // patch-upgrade flow starts existing.
574
+ if (mode === "embedded") {
575
+ const versionStamp = {
576
+ template: REPO.replace(/\.git$/, ""),
577
+ kideVersion: coreVersion ?? pkg.version ?? null,
578
+ ref: templateRef ?? "HEAD",
579
+ commit: templateCommit,
580
+ target,
581
+ mode,
582
+ starter: starter ?? null,
583
+ corePath: "src/cms",
584
+ scaffoldedAt: new Date().toISOString(),
585
+ createKideApp: cliVersion,
586
+ };
587
+ writeFileSync(
588
+ path.join(projectDir, ".kide-version"),
589
+ `${JSON.stringify(versionStamp, null, 2)}\n`,
590
+ );
591
+ }
583
592
 
584
593
  // Wire up the local MCP server so Claude Code (and other MCP clients that read
585
594
  // a project-scoped `.mcp.json`) discover it automatically — no manual
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-kide-app",
3
- "version": "0.3.6",
3
+ "version": "0.4.0",
4
4
  "description": "Scaffold a new Kide CMS project",
5
5
  "author": "Matti Hernesniemi",
6
6
  "license": "MIT",