@lunora/cli 1.0.0-alpha.19 → 1.0.0-alpha.20

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.
@@ -619,6 +619,7 @@ const patchPackageJson = async (target, name, adapter, distTag) => {
619
619
  const lunoraNames = [...Object.keys(dependencies), ...Object.keys(devDependencies)].filter((depName) => isLunoraDep$1(depName));
620
620
  const versions = await resolveTagVersions(lunoraNames, distTag);
621
621
  parsed.name = name;
622
+ parsed.imports = { ...parsed.imports, "#lunora/*": "./lunora/*" };
622
623
  parsed.dependencies = restampLunora(dependencies, distTag, versions);
623
624
  parsed.devDependencies = restampLunora(devDependencies, distTag, versions);
624
625
  parsed.scripts = { ...parsed.scripts, codegen: "lunora codegen", deploy: "vite build && lunora deploy" };
@@ -644,12 +645,6 @@ const applyLunoraOverlay = async (options) => {
644
645
  writeFile(target, join$1("src", "server.ts"), SERVER_ENTRY, written);
645
646
  writeFile(target, "wrangler.jsonc", WRANGLER.replaceAll("__NAME__", name), written);
646
647
  writeFile(target, ".env.example", ENV_EXAMPLE, written);
647
- writeFile(
648
- target,
649
- "pnpm-workspace.yaml",
650
- "# pnpm reads its settings from here (the package.json `pnpm` field is no longer read).\nonlyBuiltDependencies:\n - esbuild\n - sharp\n - workerd\n",
651
- written
652
- );
653
648
  for (const file of adapter.files) {
654
649
  writeFile(target, file.path, file.contents, written);
655
650
  }
@@ -845,9 +840,10 @@ const PNPM_BUILT_DEPENDENCIES = ["esbuild", "sharp", "workerd"];
845
840
  const PNPM_WORKSPACE_FILENAME = "pnpm-workspace.yaml";
846
841
  const pnpmWorkspaceYaml = () => [
847
842
  "# pnpm reads its settings from here (the package.json `pnpm` field is no longer read).",
848
- "# These native-build toolchain deps run their install scripts without `pnpm approve-builds`.",
849
- "onlyBuiltDependencies:",
850
- ...PNPM_BUILT_DEPENDENCIES.map((name) => ` - ${name}`),
843
+ "# Pre-approve the toolchain's native build scripts so `pnpm install` runs them",
844
+ "# without the interactive `pnpm approve-builds` step.",
845
+ "allowBuilds:",
846
+ ...PNPM_BUILT_DEPENDENCIES.map((name) => ` ${name}: true`),
851
847
  ""
852
848
  ].join("\n");
853
849
  const collectFiles = (directory) => {
@@ -878,11 +874,6 @@ const copyTemplate = async (sourceDirectory, target, name) => {
878
874
  }
879
875
  written.push(destination);
880
876
  }
881
- if (!files.some((source) => basename(source) === PNPM_WORKSPACE_FILENAME)) {
882
- const workspacePath = join$1(target, PNPM_WORKSPACE_FILENAME);
883
- writeFileSync(workspacePath, pnpmWorkspaceYaml(), "utf8");
884
- written.push(workspacePath);
885
- }
886
877
  return written;
887
878
  };
888
879
  const resolveTemplateSource = (templateType, source, ref) => {
@@ -1025,6 +1016,12 @@ const maybeOfferInstall = async (options, target) => {
1025
1016
  logWould(options.logger, `install dependencies with ${manager}`);
1026
1017
  return void 0;
1027
1018
  }
1019
+ if (manager === "pnpm") {
1020
+ const workspacePath = join$1(target, PNPM_WORKSPACE_FILENAME);
1021
+ if (!existsSync(workspacePath)) {
1022
+ writeFileSync(workspacePath, pnpmWorkspaceYaml(), "utf8");
1023
+ }
1024
+ }
1028
1025
  const spawner = options.spawner ?? defaultSpawner;
1029
1026
  const { args, command } = installArgsFor(manager);
1030
1027
  await emitStep("deps", `Installing dependencies with ${manager}…`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/cli",
3
- "version": "1.0.0-alpha.19",
3
+ "version": "1.0.0-alpha.20",
4
4
  "description": "The Lunora CLI: init, dev, deploy, codegen, run, reset, and migrate commands",
5
5
  "keywords": [
6
6
  "agent-skills",