@lunora/cli 1.0.0-alpha.13 → 1.0.0-alpha.14
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/index.mjs +1 -1
- package/dist/packem_chunks/handler.mjs +2 -2
- package/dist/packem_chunks/handler16.mjs +1 -1
- package/dist/packem_chunks/runInitCommand.mjs +15 -22
- package/dist/packem_shared/{commands-DGo2VAsr.mjs → commands-hl0mRqqg.mjs} +13 -1
- package/dist/packem_shared/{runAddCommand-4TpVekdC.mjs → runAddCommand-vJdgiR5t.mjs} +1 -1
- package/dist/packem_shared/{storage-CaFkHfqA.mjs → storage-B7hHSTZP.mjs} +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -16,4 +16,4 @@ export { createRecordingSpawner, defaultSpawner } from './packem_shared/createRe
|
|
|
16
16
|
export { default as parseManifest } from './packem_shared/parseManifest--vZf2FY1.mjs';
|
|
17
17
|
export { REQUIRED_COMPATIBILITY_DATE, REQUIRED_FLAG, validateWranglerProject as validateWrangler, validateWranglerConfig } from '@lunora/config';
|
|
18
18
|
export { buildRegistryIndex } from './packem_shared/buildRegistryIndex-BcYe607_.mjs';
|
|
19
|
-
export { r as runAddCommand, a as runBuildIndexCommand, b as runRegistryViewCommand } from './packem_shared/commands-
|
|
19
|
+
export { r as runAddCommand, a as runBuildIndexCommand, b as runRegistryViewCommand } from './packem_shared/commands-hl0mRqqg.mjs';
|
|
@@ -3,8 +3,8 @@ import { findWranglerFile } from '@lunora/config';
|
|
|
3
3
|
import { join, basename } from '@visulima/path';
|
|
4
4
|
import { d as defineHandler } from '../packem_shared/command-BC30oSBW.mjs';
|
|
5
5
|
import { t as tuiText, a as tuiSelect } from '../packem_shared/tui-prompts-M6OWsuyw.mjs';
|
|
6
|
-
import { n as normalizeFeature, E as EMAIL_ITEM, s as sanitizeBucketName, d as deriveBucketName, p as promptBucketName, r as resolveTypedDestination, M as MAIL_DESTINATION_PROMPT, a as sanitizeDatabaseName, b as deriveDatabaseName, c as promptDatabaseName, D as DEFAULT_AUTH_ITEM, e as promptAuthProvider, A as AUTH_PROVIDER_OPTIONS, w as withStorageBucketName, f as withMailDestination, g as withAuthDatabaseName } from '../packem_shared/storage-
|
|
7
|
-
import { r as runAddCommand } from '../packem_shared/commands-
|
|
6
|
+
import { n as normalizeFeature, E as EMAIL_ITEM, s as sanitizeBucketName, d as deriveBucketName, p as promptBucketName, r as resolveTypedDestination, M as MAIL_DESTINATION_PROMPT, a as sanitizeDatabaseName, b as deriveDatabaseName, c as promptDatabaseName, D as DEFAULT_AUTH_ITEM, e as promptAuthProvider, A as AUTH_PROVIDER_OPTIONS, w as withStorageBucketName, f as withMailDestination, g as withAuthDatabaseName } from '../packem_shared/storage-B7hHSTZP.mjs';
|
|
7
|
+
import { r as runAddCommand } from '../packem_shared/commands-hl0mRqqg.mjs';
|
|
8
8
|
|
|
9
9
|
const providerToItem = (provider) => {
|
|
10
10
|
const value = provider.trim().toLowerCase();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as defineHandler } from '../packem_shared/command-BC30oSBW.mjs';
|
|
2
|
-
import { r as runAddCommand, b as runRegistryViewCommand, a as runBuildIndexCommand } from '../packem_shared/commands-
|
|
2
|
+
import { r as runAddCommand, b as runRegistryViewCommand, a as runBuildIndexCommand } from '../packem_shared/commands-hl0mRqqg.mjs';
|
|
3
3
|
|
|
4
4
|
const execute = defineHandler(({ argument, cwd, logger, options }) => {
|
|
5
5
|
const subcommand = argument[0];
|
|
@@ -10,11 +10,11 @@ import { d as defineHandler } from '../packem_shared/command-BC30oSBW.mjs';
|
|
|
10
10
|
import { a as detectInstalledManagers, i as installArgsFor } from '../packem_shared/detect-package-manager-DYp7n3mJ.mjs';
|
|
11
11
|
import MagicString from 'magic-string';
|
|
12
12
|
import { Project, SyntaxKind } from 'ts-morph';
|
|
13
|
-
import { c as
|
|
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
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';
|
|
16
16
|
import { logStep } from '../packem_shared/createLogger-B40gPzQo.mjs';
|
|
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-
|
|
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';
|
|
19
19
|
|
|
20
20
|
const GITHUB_CONTENT = `name: Deploy
|
|
@@ -595,12 +595,13 @@ const ensureGitignore = (target) => {
|
|
|
595
595
|
${missing.join("\n")}
|
|
596
596
|
`, "utf8");
|
|
597
597
|
};
|
|
598
|
-
const
|
|
598
|
+
const isLunoraDep$1 = (name) => name === "lunorash" || name.startsWith("@lunora/");
|
|
599
|
+
const stampRange = (name, range, distTag, versions) => isLunoraDep$1(name) ? versions?.get(name) ?? distTag : range;
|
|
599
600
|
const withDependency = (map, name, range, distTag) => {
|
|
600
601
|
return { ...map, [name]: stampRange(name, range, distTag) };
|
|
601
602
|
};
|
|
602
|
-
const restampLunora = (map, distTag) => Object.fromEntries(Object.entries(map).map(([name, range]) => [name, stampRange(name, range, distTag)]));
|
|
603
|
-
const patchPackageJson = (target, name, adapter, distTag) => {
|
|
603
|
+
const restampLunora = (map, distTag, versions) => Object.fromEntries(Object.entries(map).map(([name, range]) => [name, stampRange(name, range, distTag, versions)]));
|
|
604
|
+
const patchPackageJson = async (target, name, adapter, distTag) => {
|
|
604
605
|
const path = join$1(target, "package.json");
|
|
605
606
|
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
606
607
|
let dependencies = withDependency(parsed.dependencies ?? {}, "lunorash", distTag, distTag);
|
|
@@ -614,9 +615,11 @@ const patchPackageJson = (target, name, adapter, distTag) => {
|
|
|
614
615
|
for (const [depName, range] of Object.entries(COMMON_DEV_DEPENDENCIES)) {
|
|
615
616
|
devDependencies = withDependency(devDependencies, depName, range, distTag);
|
|
616
617
|
}
|
|
618
|
+
const lunoraNames = [...Object.keys(dependencies), ...Object.keys(devDependencies)].filter((depName) => isLunoraDep$1(depName));
|
|
619
|
+
const versions = await resolveTagVersions(lunoraNames, distTag);
|
|
617
620
|
parsed.name = name;
|
|
618
|
-
parsed.dependencies = restampLunora(dependencies, distTag);
|
|
619
|
-
parsed.devDependencies = restampLunora(devDependencies, distTag);
|
|
621
|
+
parsed.dependencies = restampLunora(dependencies, distTag, versions);
|
|
622
|
+
parsed.devDependencies = restampLunora(devDependencies, distTag, versions);
|
|
620
623
|
parsed.scripts = { ...parsed.scripts, codegen: "lunora codegen", deploy: "vite build && lunora deploy" };
|
|
621
624
|
writeFileSync(path, `${JSON.stringify(parsed, void 0, 4)}
|
|
622
625
|
`, "utf8");
|
|
@@ -632,7 +635,7 @@ const patchBaseViteConfig = (target, logger) => {
|
|
|
632
635
|
writeFileSync(candidate, result.code, "utf8");
|
|
633
636
|
}
|
|
634
637
|
};
|
|
635
|
-
const applyLunoraOverlay = (options) => {
|
|
638
|
+
const applyLunoraOverlay = async (options) => {
|
|
636
639
|
const { adapter, distTag, logger, name, target } = options;
|
|
637
640
|
const written = [];
|
|
638
641
|
writeFile(target, join$1("lunora", "schema.ts"), LUNORA_SCHEMA, written);
|
|
@@ -644,7 +647,7 @@ const applyLunoraOverlay = (options) => {
|
|
|
644
647
|
writeFile(target, file.path, file.contents, written);
|
|
645
648
|
}
|
|
646
649
|
patchBaseViteConfig(target, logger);
|
|
647
|
-
patchPackageJson(target, name, adapter, distTag);
|
|
650
|
+
await patchPackageJson(target, name, adapter, distTag);
|
|
648
651
|
ensureGitignore(target);
|
|
649
652
|
return written;
|
|
650
653
|
};
|
|
@@ -809,16 +812,7 @@ const resolveLunoraVersions = async (files, distTag) => {
|
|
|
809
812
|
} catch {
|
|
810
813
|
}
|
|
811
814
|
}
|
|
812
|
-
|
|
813
|
-
await Promise.all(
|
|
814
|
-
[...names].map(async (name) => {
|
|
815
|
-
const version = await resolveTagVersion(name, distTag);
|
|
816
|
-
if (version !== void 0) {
|
|
817
|
-
resolved.set(name, version);
|
|
818
|
-
}
|
|
819
|
-
})
|
|
820
|
-
);
|
|
821
|
-
return resolved;
|
|
815
|
+
return resolveTagVersions(names, distTag);
|
|
822
816
|
};
|
|
823
817
|
const stampLunoraDeps = (packageJsonText, distTag, versions) => {
|
|
824
818
|
let parsed;
|
|
@@ -1119,9 +1113,8 @@ const scaffoldViteOverlay = async (options) => {
|
|
|
1119
1113
|
{ label: `create-vite (${adapter.label}) base ready`, run: copyBase },
|
|
1120
1114
|
{
|
|
1121
1115
|
label: `Lunora overlay applied (${adapter.label})`,
|
|
1122
|
-
run: () => {
|
|
1123
|
-
written = applyLunoraOverlay({ adapter, distTag: resolveDistTag(), logger, name, target });
|
|
1124
|
-
return Promise.resolve();
|
|
1116
|
+
run: async () => {
|
|
1117
|
+
written = await applyLunoraOverlay({ adapter, distTag: resolveDistTag(), logger, name, target });
|
|
1125
1118
|
}
|
|
1126
1119
|
}
|
|
1127
1120
|
],
|
|
@@ -86,6 +86,18 @@ const resolveTagVersion = async (packageName, tag) => {
|
|
|
86
86
|
return void 0;
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
+
const resolveTagVersions = async (names, tag) => {
|
|
90
|
+
const resolved = /* @__PURE__ */ new Map();
|
|
91
|
+
await Promise.all(
|
|
92
|
+
[...new Set(names)].map(async (name) => {
|
|
93
|
+
const version = await resolveTagVersion(name, tag);
|
|
94
|
+
if (version !== void 0) {
|
|
95
|
+
resolved.set(name, version);
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
);
|
|
99
|
+
return resolved;
|
|
100
|
+
};
|
|
89
101
|
|
|
90
102
|
const resolveDepRange = (range) => {
|
|
91
103
|
if (!range.startsWith("workspace:")) {
|
|
@@ -830,4 +842,4 @@ const runBuildIndexCommand = async (options) => {
|
|
|
830
842
|
return empty;
|
|
831
843
|
};
|
|
832
844
|
|
|
833
|
-
export { runBuildIndexCommand as a, runRegistryViewCommand as b,
|
|
845
|
+
export { runBuildIndexCommand as a, runRegistryViewCommand as b, resolveTagVersions as c, resolveSourceRef as d, resolveDistTag as e, runListCommand as f, runAddCommand as r, setBindingField as s };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'node:fs';
|
|
2
2
|
import '@visulima/path';
|
|
3
|
-
export { r as runAddCommand, a as runBuildIndexCommand, f as runListCommand, b as runRegistryViewCommand } from './commands-
|
|
3
|
+
export { r as runAddCommand, a as runBuildIndexCommand, f as runListCommand, b as runRegistryViewCommand } from './commands-hl0mRqqg.mjs';
|
|
4
4
|
import './buildRegistryIndex-BcYe607_.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/cli",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.14",
|
|
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.
|
|
56
|
-
"@lunora/config": "1.0.0-alpha.
|
|
55
|
+
"@lunora/codegen": "1.0.0-alpha.5",
|
|
56
|
+
"@lunora/config": "1.0.0-alpha.7",
|
|
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",
|