@lunora/cli 1.0.0-alpha.14 → 1.0.0-alpha.16

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
  }
@@ -834,6 +835,17 @@ const stampLunoraDeps = (packageJsonText, distTag, versions) => {
834
835
  }
835
836
  return text;
836
837
  };
838
+ const PNPM_BUILT_DEPENDENCIES = ["esbuild", "sharp", "workerd"];
839
+ const stampPnpmBuildAllowlist = (packageJsonText) => {
840
+ try {
841
+ const parsed = JSON.parse(packageJsonText);
842
+ const merged = [.../* @__PURE__ */ new Set([...parsed.pnpm?.onlyBuiltDependencies ?? [], ...PNPM_BUILT_DEPENDENCIES])].toSorted((a, b) => a.localeCompare(b));
843
+ const edits = modify(packageJsonText, ["pnpm", "onlyBuiltDependencies"], merged, { formattingOptions: { insertSpaces: true, tabSize: 4 } });
844
+ return applyEdits(packageJsonText, edits);
845
+ } catch {
846
+ return packageJsonText;
847
+ }
848
+ };
837
849
  const collectFiles = (directory) => {
838
850
  const out = [];
839
851
  for (const entry of walkSync(directory, { includeDirs: false, includeFiles: true })) {
@@ -853,7 +865,7 @@ const copyTemplate = async (sourceDirectory, target, name) => {
853
865
  const raw = readFileSync(source);
854
866
  let text = isTextFile(source) ? substitute(raw.toString("utf8"), name) : void 0;
855
867
  if (text !== void 0 && basename(source) === "package.json") {
856
- text = stampLunoraDeps(text, distTag, versions);
868
+ text = stampPnpmBuildAllowlist(stampLunoraDeps(text, distTag, versions));
857
869
  }
858
870
  if (text === void 0) {
859
871
  writeFileSync(destination, raw);
@@ -1006,7 +1018,8 @@ const maybeOfferInstall = async (options, target) => {
1006
1018
  }
1007
1019
  const spawner = options.spawner ?? defaultSpawner;
1008
1020
  const { args, command } = installArgsFor(manager);
1009
- const result = await withTuiSpinner(`Installing dependencies with ${manager}…`, () => spawner({ args, command, cwd: target }));
1021
+ await emitStep("deps", `Installing dependencies with ${manager}…`);
1022
+ const result = await spawner({ args, command, cwd: target });
1010
1023
  if (result.code !== 0) {
1011
1024
  options.logger.warn(`\`${command} install\` exited with code ${String(result.code)} — run it yourself in ${basename(target)}/.`);
1012
1025
  return void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/cli",
3
- "version": "1.0.0-alpha.14",
3
+ "version": "1.0.0-alpha.16",
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.5",
56
- "@lunora/config": "1.0.0-alpha.7",
55
+ "@lunora/codegen": "1.0.0-alpha.6",
56
+ "@lunora/config": "1.0.0-alpha.8",
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",