@lunora/cli 1.0.0-alpha.15 → 1.0.0-alpha.17

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.
@@ -12,7 +12,7 @@ import MagicString from 'magic-string';
12
12
  import { Project, SyntaxKind } from 'ts-morph';
13
13
  import { c as resolveTagVersions, d as resolveSourceRef, e as resolveDistTag, r as runAddCommand } from '../packem_shared/commands-hl0mRqqg.mjs';
14
14
  import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
15
- import { d as tuiMascot, e as tuiStep, P as PromptCancelledError, f as tuiMoonrise, t as tuiText, g as tuiHeadline, h as tuiInfo, a as tuiSelect, w as withTuiSpinner, b as tuiConfirm, i as tuiNextSteps, j as tuiTasks, k as tuiMultiSelect, l as withTuiBadgeProgress } from '../packem_shared/tui-prompts-M6OWsuyw.mjs';
15
+ import { d as tuiMascot, e as tuiStep, P as PromptCancelledError, f as tuiMoonrise, t as tuiText, g as tuiHeadline, h as tuiInfo, a as tuiSelect, b as tuiConfirm, w as withTuiSpinner, i as tuiNextSteps, j as tuiTasks, k as tuiMultiSelect, l as withTuiBadgeProgress } from '../packem_shared/tui-prompts-M6OWsuyw.mjs';
16
16
  import { logStep } from '../packem_shared/createLogger-B40gPzQo.mjs';
17
17
  import { E as EMAIL_ITEM, p as promptBucketName, w as withStorageBucketName, M as MAIL_DESTINATION_PROMPT, r as resolveTypedDestination, f as withMailDestination, e as promptAuthProvider, c as promptDatabaseName, g as withAuthDatabaseName } from '../packem_shared/storage-B7hHSTZP.mjs';
18
18
  import dns from 'node:dns/promises';
@@ -612,6 +612,7 @@ const patchPackageJson = async (target, name, adapter, distTag) => {
612
612
  dependencies = withDependency(dependencies, depName, range, distTag);
613
613
  }
614
614
  let devDependencies = withDependency(parsed.devDependencies ?? {}, "@lunora/vite", distTag, distTag);
615
+ devDependencies = withDependency(devDependencies, "@lunora/studio", distTag, distTag);
615
616
  for (const [depName, range] of Object.entries(COMMON_DEV_DEPENDENCIES)) {
616
617
  devDependencies = withDependency(devDependencies, depName, range, distTag);
617
618
  }
@@ -643,6 +644,12 @@ const applyLunoraOverlay = async (options) => {
643
644
  writeFile(target, join$1("src", "server.ts"), SERVER_ENTRY, written);
644
645
  writeFile(target, "wrangler.jsonc", WRANGLER.replaceAll("__NAME__", name), written);
645
646
  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
+ );
646
653
  for (const file of adapter.files) {
647
654
  writeFile(target, file.path, file.contents, written);
648
655
  }
@@ -834,6 +841,15 @@ const stampLunoraDeps = (packageJsonText, distTag, versions) => {
834
841
  }
835
842
  return text;
836
843
  };
844
+ const PNPM_BUILT_DEPENDENCIES = ["esbuild", "sharp", "workerd"];
845
+ const PNPM_WORKSPACE_FILENAME = "pnpm-workspace.yaml";
846
+ const pnpmWorkspaceYaml = () => [
847
+ "# 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}`),
851
+ ""
852
+ ].join("\n");
837
853
  const collectFiles = (directory) => {
838
854
  const out = [];
839
855
  for (const entry of walkSync(directory, { includeDirs: false, includeFiles: true })) {
@@ -862,6 +878,11 @@ const copyTemplate = async (sourceDirectory, target, name) => {
862
878
  }
863
879
  written.push(destination);
864
880
  }
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
+ }
865
886
  return written;
866
887
  };
867
888
  const resolveTemplateSource = (templateType, source, ref) => {
@@ -1006,7 +1027,8 @@ const maybeOfferInstall = async (options, target) => {
1006
1027
  }
1007
1028
  const spawner = options.spawner ?? defaultSpawner;
1008
1029
  const { args, command } = installArgsFor(manager);
1009
- const result = await withTuiSpinner(`Installing dependencies with ${manager}…`, () => spawner({ args, command, cwd: target }));
1030
+ await emitStep("deps", `Installing dependencies with ${manager}…`);
1031
+ const result = await spawner({ args, command, cwd: target });
1010
1032
  if (result.code !== 0) {
1011
1033
  options.logger.warn(`\`${command} install\` exited with code ${String(result.code)} — run it yourself in ${basename(target)}/.`);
1012
1034
  return void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/cli",
3
- "version": "1.0.0-alpha.15",
3
+ "version": "1.0.0-alpha.17",
4
4
  "description": "The Lunora CLI: init, dev, deploy, codegen, run, reset, and migrate commands",
5
5
  "keywords": [
6
6
  "agent-skills",
@@ -52,8 +52,8 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@bomb.sh/tab": "0.0.16",
55
- "@lunora/codegen": "1.0.0-alpha.6",
56
- "@lunora/config": "1.0.0-alpha.8",
55
+ "@lunora/codegen": "1.0.0-alpha.7",
56
+ "@lunora/config": "1.0.0-alpha.9",
57
57
  "@lunora/container": "1.0.0-alpha.1",
58
58
  "@lunora/d1": "1.0.0-alpha.4",
59
59
  "@lunora/seed": "1.0.0-alpha.2",