@lunora/cli 1.0.0-alpha.23 → 1.0.0-alpha.25
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/__assets__/package-og.svg +1 -1
- package/dist/bin.mjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/packem_chunks/handler.mjs +15 -5
- package/dist/packem_chunks/handler10.mjs +1 -1
- package/dist/packem_chunks/handler11.mjs +1 -1
- package/dist/packem_chunks/handler12.mjs +1 -1
- package/dist/packem_chunks/handler13.mjs +1 -1
- package/dist/packem_chunks/handler14.mjs +1 -1
- package/dist/packem_chunks/handler15.mjs +1 -1
- package/dist/packem_chunks/handler16.mjs +1 -1
- package/dist/packem_chunks/handler17.mjs +2 -2
- package/dist/packem_chunks/handler18.mjs +1 -1
- package/dist/packem_chunks/handler19.mjs +2 -2
- package/dist/packem_chunks/handler2.mjs +1 -1
- package/dist/packem_chunks/handler20.mjs +1 -1
- package/dist/packem_chunks/handler21.mjs +1 -1
- package/dist/packem_chunks/handler3.mjs +1 -1
- package/dist/packem_chunks/handler4.mjs +1 -1
- package/dist/packem_chunks/handler5.mjs +1 -1
- package/dist/packem_chunks/handler6.mjs +1 -1
- package/dist/packem_chunks/handler7.mjs +1 -1
- package/dist/packem_chunks/handler8.mjs +1 -1
- package/dist/packem_chunks/handler9.mjs +1 -1
- package/dist/packem_chunks/planDevCommand.mjs +2 -2
- package/dist/packem_chunks/runCodegenCommand.mjs +1 -1
- package/dist/packem_chunks/runDeployCommand.mjs +2 -2
- package/dist/packem_chunks/runInitCommand.mjs +44 -6
- package/dist/packem_chunks/runMigrateGenerateCommand.mjs +1 -1
- package/dist/packem_chunks/runResetCommand.mjs +2 -2
- package/dist/packem_chunks/runRpcCommand.mjs +1 -1
- package/dist/packem_shared/{COMMANDS-Dwo9q7Bt.mjs → COMMANDS-B0ftFD_3.mjs} +2 -1
- package/dist/packem_shared/{command-BC30oSBW.mjs → command-D3lB_4Az.mjs} +5 -0
- package/dist/packem_shared/{commands-hl0mRqqg.mjs → commands-B-gR09Z_.mjs} +1 -1
- package/dist/packem_shared/prompt-cancelled-APzX1Im-.mjs +9 -0
- package/dist/packem_shared/{runAddCommand-vJdgiR5t.mjs → runAddCommand-bnY6-HKb.mjs} +1 -1
- package/dist/packem_shared/{storage-B7hHSTZP.mjs → storage-BIsph-Vk.mjs} +1 -1
- package/dist/packem_shared/{tui-prompts-M6OWsuyw.mjs → tui-prompts-BjEN8XgP.mjs} +2 -7
- package/package.json +5 -5
package/dist/bin.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { COMMANDS, VERSION, runCli } from './packem_shared/COMMANDS-
|
|
1
|
+
export { COMMANDS, VERSION, runCli } from './packem_shared/COMMANDS-B0ftFD_3.mjs';
|
|
2
2
|
export { runCodegenCommand } from './packem_chunks/runCodegenCommand.mjs';
|
|
3
3
|
export { DEFAULT_IMPORT_BATCH_SIZE, runExportCommand, runImportCommand } from './packem_shared/DEFAULT_IMPORT_BATCH_SIZE-Ck-2bU08.mjs';
|
|
4
4
|
export { runDeployCommand } from './packem_chunks/runDeployCommand.mjs';
|
|
@@ -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-B-gR09Z_.mjs';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { findWranglerFile } from '@lunora/config';
|
|
3
3
|
import { join, basename } from '@visulima/path';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { r as
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
5
|
+
import { v as validateOutputFormat, i as isJsonFormat, p as printJson, l as loggerForFormat } from '../packem_shared/output-format-wUvAN6AL.mjs';
|
|
6
|
+
import { t as tuiText, a as tuiSelect } from '../packem_shared/tui-prompts-BjEN8XgP.mjs';
|
|
7
|
+
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-BIsph-Vk.mjs';
|
|
8
|
+
import { r as runAddCommand } from '../packem_shared/commands-B-gR09Z_.mjs';
|
|
8
9
|
|
|
9
10
|
const providerToItem = (provider) => {
|
|
10
11
|
const value = provider.trim().toLowerCase();
|
|
@@ -130,6 +131,12 @@ const runAddFeature = async (options) => {
|
|
|
130
131
|
return { code: result.code, items };
|
|
131
132
|
};
|
|
132
133
|
const execute = defineHandler(async ({ argument, cwd, logger, options }) => {
|
|
134
|
+
const formatError = validateOutputFormat("add", options.format);
|
|
135
|
+
if (formatError !== void 0) {
|
|
136
|
+
logger.error(formatError);
|
|
137
|
+
return { code: 1 };
|
|
138
|
+
}
|
|
139
|
+
const effectiveLogger = loggerForFormat(options.format, logger);
|
|
133
140
|
const result = await runAddFeature({
|
|
134
141
|
allowUnsafeSource: options.allowUnsafeSource === true,
|
|
135
142
|
bucket: options.bucket,
|
|
@@ -137,13 +144,16 @@ const execute = defineHandler(async ({ argument, cwd, logger, options }) => {
|
|
|
137
144
|
db: options.db,
|
|
138
145
|
feature: argument[0],
|
|
139
146
|
from: options.from,
|
|
140
|
-
logger,
|
|
147
|
+
logger: effectiveLogger,
|
|
141
148
|
mailTo: options.mailTo,
|
|
142
149
|
provider: options.provider,
|
|
143
150
|
ref: options.ref,
|
|
144
151
|
source: options.source,
|
|
145
152
|
yes: options.yes === true
|
|
146
153
|
});
|
|
154
|
+
if (isJsonFormat(options.format)) {
|
|
155
|
+
printJson({ code: result.code, items: result.items });
|
|
156
|
+
}
|
|
147
157
|
return { code: result.code };
|
|
148
158
|
});
|
|
149
159
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
2
2
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
3
3
|
import { runExportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-Ck-2bU08.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
2
2
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
3
3
|
import { runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-Ck-2bU08.mjs';
|
|
4
4
|
|
|
@@ -4,7 +4,7 @@ import { discoverSchema } from '@lunora/codegen';
|
|
|
4
4
|
import { readLinkedProject } from '@lunora/config';
|
|
5
5
|
import { parse } from 'jsonc-parser';
|
|
6
6
|
import { Project } from 'ts-morph';
|
|
7
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
7
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
8
8
|
|
|
9
9
|
const findWranglerFile = (projectRoot) => {
|
|
10
10
|
for (const candidate of ["wrangler.jsonc", "wrangler.json"]) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as resolveAdminBaseUrl } from '../packem_shared/admin-url-4UzT-CI4.mjs';
|
|
2
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
2
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
3
3
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
4
4
|
|
|
5
5
|
const GET_FUNCTION_STATS_OP = "__lunora_admin__:getFunctionStats";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, rmSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { writeLinkedProject, LINKED_PROJECT_FILE } from '@lunora/config';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
5
5
|
import { r as readWranglerName } from '../packem_shared/wrangler-name-cy4yhm9j.mjs';
|
|
6
6
|
|
|
7
7
|
const isValidWorkerUrl = (value) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readLinkedProject } from '@lunora/config';
|
|
2
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
2
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
3
3
|
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
4
4
|
|
|
5
5
|
const LOG_FORMATS = /* @__PURE__ */ new Set(["json", "pretty"]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { runCodegen } from '@lunora/codegen';
|
|
2
2
|
import { validateWranglerProject, inferLunoraBindings, reconcileWranglerBindings } from '@lunora/config';
|
|
3
3
|
import { p as parseApiSpec } from '../packem_shared/api-spec-CtA6ilu4.mjs';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
5
5
|
import { r as runSchemaDriftGate } from '../packem_shared/schema-drift-gate-BtBt0as0.mjs';
|
|
6
6
|
|
|
7
7
|
const provisionBindings = async (cwd, logger) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
2
|
-
import { r as runAddCommand, b as runRegistryViewCommand, a as runBuildIndexCommand } from '../packem_shared/commands-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
2
|
+
import { r as runAddCommand, b as runRegistryViewCommand, a as runBuildIndexCommand } from '../packem_shared/commands-B-gR09Z_.mjs';
|
|
3
3
|
|
|
4
4
|
const execute = defineHandler(({ argument, cwd, logger, options }) => {
|
|
5
5
|
const subcommand = argument[0];
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, writeFileSy
|
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { AGENT_RULES_DIR, detectAgentRules, LUNORA_SKILL_NAMES } from '@lunora/config';
|
|
4
4
|
import { join, relative, dirname } from '@visulima/path';
|
|
5
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
5
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
6
6
|
|
|
7
7
|
const resolveBundledSkillsDirectory = (startDirectory = dirname(fileURLToPath(import.meta.url))) => {
|
|
8
8
|
let directory = startDirectory;
|
|
@@ -5,9 +5,9 @@ import { discoverSchema, schemaFromIr } from '@lunora/codegen';
|
|
|
5
5
|
import { seedPlan } from '@lunora/seed';
|
|
6
6
|
import { join } from '@visulima/path';
|
|
7
7
|
import { Project } from 'ts-morph';
|
|
8
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
8
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
9
9
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
10
|
-
import { b as tuiConfirm } from '../packem_shared/tui-prompts-
|
|
10
|
+
import { b as tuiConfirm } from '../packem_shared/tui-prompts-BjEN8XgP.mjs';
|
|
11
11
|
import { runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-Ck-2bU08.mjs';
|
|
12
12
|
import { runResetCommand } from './runResetCommand.mjs';
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdtempSync, rmSync, existsSync, readdirSync, statSync } from 'node:fs';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join, relative } from 'node:path';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
5
5
|
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
6
6
|
|
|
7
7
|
const walk = (root) => {
|
|
@@ -2,7 +2,7 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { runCodegen } from '@lunora/codegen';
|
|
4
4
|
import { p as parseApiSpec } from '../packem_shared/api-spec-CtA6ilu4.mjs';
|
|
5
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
5
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
6
6
|
import { v as validateOutputFormat, i as isJsonFormat, p as printJson, l as loggerForFormat } from '../packem_shared/output-format-wUvAN6AL.mjs';
|
|
7
7
|
import { r as runSchemaDriftGate } from '../packem_shared/schema-drift-gate-BtBt0as0.mjs';
|
|
8
8
|
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync, existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { parse } from 'jsonc-parser';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
5
5
|
import { o as openUrl } from '../packem_shared/open-url-Dfq6fAyT.mjs';
|
|
6
6
|
|
|
7
7
|
const DEFAULT_DEV_PORT = 8787;
|
|
@@ -2,7 +2,7 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { r as resolveAdminBaseUrl } from '../packem_shared/admin-url-4UzT-CI4.mjs';
|
|
5
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
5
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
6
6
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
7
7
|
import { runExportCommand, runImportCommand } from '../packem_shared/DEFAULT_IMPORT_BATCH_SIZE-Ck-2bU08.mjs';
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as parseApiSpec } from '../packem_shared/api-spec-CtA6ilu4.mjs';
|
|
2
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
2
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
3
3
|
import { runDeployCommand } from './runDeployCommand.mjs';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_OUT_DIR = ".lunora/build";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
2
2
|
import { i as isDockerAvailable } from '../packem_shared/docker-hMQ97KSQ.mjs';
|
|
3
3
|
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
2
2
|
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
3
3
|
|
|
4
4
|
const withEnv = (args, env) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
2
2
|
import { o as openUrl } from '../packem_shared/open-url-Dfq6fAyT.mjs';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_DOCS_URL = "https://lunora.anolilab.dev/docs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { findWranglerFile, readWranglerJsonc, validateWranglerConfig, isPlaceholderValue, DEV_VARS_FILE, parseDevVariableEntries, inferLunoraBindings } from '@lunora/config';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
5
5
|
|
|
6
6
|
const SECRET_KEY_PATTERN = /(?:KEY|PASSWORD|SECRET|TOKEN)$/u;
|
|
7
7
|
const isD1PlaceholderId = (databaseId) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { writeFileSync, existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, generateSecretValue, DEV_VARS_EXAMPLE_FILE, parseDevVariableEntries, isPlaceholderValue, packageNamesFromBindings, inferLunoraBindings, requiredSecrets, isMintableSecretKey } from '@lunora/config';
|
|
4
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
5
5
|
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
6
6
|
import { l as listRemoteSecrets } from '../packem_shared/wrangler-secrets-P2_ZUR-k.mjs';
|
|
7
7
|
|
|
@@ -4,12 +4,12 @@ import { p as parseApiSpec } from '../packem_shared/api-spec-CtA6ilu4.mjs';
|
|
|
4
4
|
import { existsSync, watch } from 'node:fs';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { runCodegen } from '@lunora/codegen';
|
|
7
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
7
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
8
8
|
import { d as detectPackageManager, e as execArgsFor } from '../packem_shared/detect-package-manager-DYp7n3mJ.mjs';
|
|
9
9
|
import { createServer, request } from 'node:http';
|
|
10
10
|
import { connect } from 'node:net';
|
|
11
11
|
import { loadStudioAssets, studioAssetsStamp, renderStudioHtml, resolveAdminToken, SCHEMA_EDIT_ENDPOINT, POLICY_SCAFFOLD_ENDPOINT, SEED_ENDPOINT, serveJsonHandler, handleSchemaEditRequest, handlePolicyScaffoldRequest, handleSeedRequest } from '@lunora/config/studio-host';
|
|
12
|
-
import { c as createTuiConfirm } from '../packem_shared/tui-prompts-
|
|
12
|
+
import { c as createTuiConfirm } from '../packem_shared/tui-prompts-BjEN8XgP.mjs';
|
|
13
13
|
|
|
14
14
|
const DEFAULT_DEBOUNCE_MS = 100;
|
|
15
15
|
const PATH_SEGMENT_SEPARATOR = /[/\\]/u;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { runCodegen } from '@lunora/codegen';
|
|
2
2
|
import { p as parseApiSpec } from '../packem_shared/api-spec-CtA6ilu4.mjs';
|
|
3
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
3
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
4
4
|
import { v as validateOutputFormat, p as printJson, l as loggerForFormat, i as isJsonFormat } from '../packem_shared/output-format-wUvAN6AL.mjs';
|
|
5
5
|
|
|
6
6
|
const CRON_TRIGGER_LIMIT = 3;
|
|
@@ -6,14 +6,14 @@ import { Spinner } from '@visulima/spinner';
|
|
|
6
6
|
import { Project } from 'ts-morph';
|
|
7
7
|
import { p as parseApiSpec } from '../packem_shared/api-spec-CtA6ilu4.mjs';
|
|
8
8
|
import { r as readWranglerName } from '../packem_shared/wrangler-name-cy4yhm9j.mjs';
|
|
9
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
9
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
10
10
|
import { a as isRailpackAvailable, i as isDockerAvailable } from '../packem_shared/docker-hMQ97KSQ.mjs';
|
|
11
11
|
import { v as validateOutputFormat, i as isJsonFormat, p as printJson, l as loggerForFormat } from '../packem_shared/output-format-wUvAN6AL.mjs';
|
|
12
12
|
import { containerBuildTag } from '@lunora/container';
|
|
13
13
|
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
14
14
|
import { r as resolveWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
15
15
|
import { r as runSchemaDriftGate } from '../packem_shared/schema-drift-gate-BtBt0as0.mjs';
|
|
16
|
-
import { c as createTuiConfirm } from '../packem_shared/tui-prompts-
|
|
16
|
+
import { c as createTuiConfirm } from '../packem_shared/tui-prompts-BjEN8XgP.mjs';
|
|
17
17
|
import { l as listRemoteSecrets } from '../packem_shared/wrangler-secrets-P2_ZUR-k.mjs';
|
|
18
18
|
import { runMigrateDataCommand } from './runMigrateGenerateCommand.mjs';
|
|
19
19
|
|
|
@@ -6,15 +6,16 @@ import { join as join$1, dirname as dirname$1, basename, resolve, relative } fro
|
|
|
6
6
|
import { downloadTemplate } from 'giget';
|
|
7
7
|
import { modify, applyEdits } from 'jsonc-parser';
|
|
8
8
|
import { join, dirname } from 'node:path';
|
|
9
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
9
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.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 {
|
|
13
|
+
import { P as PromptCancelledError } from '../packem_shared/prompt-cancelled-APzX1Im-.mjs';
|
|
14
|
+
import { c as resolveTagVersions, d as resolveSourceRef, e as resolveDistTag, r as runAddCommand } from '../packem_shared/commands-B-gR09Z_.mjs';
|
|
14
15
|
import { defaultSpawner } from '../packem_shared/createRecordingSpawner-DxI3mebw.mjs';
|
|
15
|
-
import { d as tuiMascot, e as tuiStep,
|
|
16
|
+
import { d as tuiMascot, e as tuiStep, 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-BjEN8XgP.mjs';
|
|
16
17
|
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-
|
|
18
|
+
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-BIsph-Vk.mjs';
|
|
18
19
|
import dns from 'node:dns/promises';
|
|
19
20
|
|
|
20
21
|
const GITHUB_CONTENT = `name: Deploy
|
|
@@ -287,6 +288,36 @@ const patchViteConfig = (source) => {
|
|
|
287
288
|
return { changed: true, code: ms.toString() };
|
|
288
289
|
};
|
|
289
290
|
|
|
291
|
+
const NETWORK_ERROR_PATTERN = /enotfound|eai_again|econnrefused|etimedout|network|fetch failed|getaddrinfo/u;
|
|
292
|
+
const NOT_FOUND_ERROR_PATTERN = /404|not found|could not find|no such/u;
|
|
293
|
+
const describeDownloadFailure = (error, context) => {
|
|
294
|
+
const raw = error instanceof Error ? error.message : String(error);
|
|
295
|
+
const lower = raw.toLowerCase();
|
|
296
|
+
const genericMessage = `failed to download template "${context.templateType}" from ${context.remote}: ${raw}`;
|
|
297
|
+
if (NOT_FOUND_ERROR_PATTERN.test(lower)) {
|
|
298
|
+
return {
|
|
299
|
+
hints: [
|
|
300
|
+
`Check the template name "${context.templateType}" and the ref "${context.ref}".`,
|
|
301
|
+
"List/inspect available templates, or target a branch/tag with `--ref <branch>`."
|
|
302
|
+
],
|
|
303
|
+
message: `template "${context.templateType}" not found at ${context.remote}: ${raw}`
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
if (NETWORK_ERROR_PATTERN.test(lower)) {
|
|
307
|
+
return {
|
|
308
|
+
hints: [
|
|
309
|
+
"You appear to be offline or unable to reach GitHub.",
|
|
310
|
+
"To scaffold without a network, point at a local template root: `lunora init --from <dir>`."
|
|
311
|
+
],
|
|
312
|
+
message: genericMessage
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
return {
|
|
316
|
+
hints: ["If this is a network/offline issue, scaffold from a local root with `lunora init --from <dir>`."],
|
|
317
|
+
message: genericMessage
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
|
|
290
321
|
const emitStep = async (type, message, answer) => {
|
|
291
322
|
if (isInteractive()) {
|
|
292
323
|
await tuiStep(BADGES[type], message, answer);
|
|
@@ -2036,8 +2067,15 @@ const scaffoldFromRemote = async (options) => {
|
|
|
2036
2067
|
if (error instanceof PromptCancelledError) {
|
|
2037
2068
|
throw error;
|
|
2038
2069
|
}
|
|
2039
|
-
const
|
|
2040
|
-
|
|
2070
|
+
const { hints, message } = describeDownloadFailure(error, {
|
|
2071
|
+
ref: resolveSourceRef(ref),
|
|
2072
|
+
remote: resolveTemplateSource(templateType, source, ref),
|
|
2073
|
+
templateType
|
|
2074
|
+
});
|
|
2075
|
+
logger.error(message);
|
|
2076
|
+
for (const hint of hints) {
|
|
2077
|
+
logger.warn(hint);
|
|
2078
|
+
}
|
|
2041
2079
|
return { code: 1, files: [], target };
|
|
2042
2080
|
} finally {
|
|
2043
2081
|
rmSync(stagingRoot, { force: true, recursive: true });
|
|
@@ -4,7 +4,7 @@ import { discoverSchema, discoverMigrations } from '@lunora/codegen';
|
|
|
4
4
|
import { join } from '@visulima/path';
|
|
5
5
|
import { Project } from 'ts-morph';
|
|
6
6
|
import { r as resolveAdminBaseUrl } from '../packem_shared/admin-url-4UzT-CI4.mjs';
|
|
7
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
7
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
8
8
|
import { diffSnapshots, renderMigrationFile } from '../packem_shared/diffSnapshots-BeDvvNiF.mjs';
|
|
9
9
|
import { a as resolveProductionWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
10
10
|
import schemaIrToSnapshot from '../packem_shared/schemaIrToSnapshot-DdsljJT-.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, rmSync } from 'node:fs';
|
|
2
2
|
import { join } from '@visulima/path';
|
|
3
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
4
|
-
import { b as tuiConfirm } from '../packem_shared/tui-prompts-
|
|
3
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
4
|
+
import { b as tuiConfirm } from '../packem_shared/tui-prompts-BjEN8XgP.mjs';
|
|
5
5
|
|
|
6
6
|
const runResetCommand = async (options) => {
|
|
7
7
|
const cwd = options.cwd ?? process.cwd();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineHandler } from '../packem_shared/command-
|
|
1
|
+
import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
2
2
|
import { r as resolveWorkerUrl } from '../packem_shared/resolve-target-qbsJ_5sF.mjs';
|
|
3
3
|
|
|
4
4
|
const parseArgsJson = (raw) => {
|
|
@@ -37,7 +37,8 @@ const addCommand = {
|
|
|
37
37
|
name: "ref",
|
|
38
38
|
type: String
|
|
39
39
|
},
|
|
40
|
-
{ description: "Permit --source values outside gh:/github:/https://", name: "allow-unsafe-source", type: Boolean }
|
|
40
|
+
{ description: "Permit --source values outside gh:/github:/https://", name: "allow-unsafe-source", type: Boolean },
|
|
41
|
+
{ description: "Output format: pretty (default) or json", name: "format", type: String }
|
|
41
42
|
]
|
|
42
43
|
};
|
|
43
44
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createLogger } from './createLogger-B40gPzQo.mjs';
|
|
2
|
+
import { P as PromptCancelledError, a as PROMPT_CANCEL_EXIT_CODE } from './prompt-cancelled-APzX1Im-.mjs';
|
|
2
3
|
|
|
3
4
|
const defineHandler = (body) => async (toolbox) => {
|
|
4
5
|
const logger = createLogger();
|
|
@@ -6,6 +7,10 @@ const defineHandler = (body) => async (toolbox) => {
|
|
|
6
7
|
const { code } = await body({ argument: toolbox.argument, cwd: toolbox.process.cwd, logger, options: toolbox.options });
|
|
7
8
|
toolbox.process.exit(code);
|
|
8
9
|
} catch (error) {
|
|
10
|
+
if (error instanceof PromptCancelledError) {
|
|
11
|
+
toolbox.process.exit(PROMPT_CANCEL_EXIT_CODE);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
9
14
|
logger.error(error instanceof Error ? error.message : String(error));
|
|
10
15
|
toolbox.process.exit(1);
|
|
11
16
|
}
|
|
@@ -3,7 +3,7 @@ import { dirname, join } from '@visulima/path';
|
|
|
3
3
|
import { DEV_VARS_FILE, parseDevVariableEntries } from '@lunora/config';
|
|
4
4
|
import { modify, applyEdits, parse } from 'jsonc-parser';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import { b as tuiConfirm } from './tui-prompts-
|
|
6
|
+
import { b as tuiConfirm } from './tui-prompts-BjEN8XgP.mjs';
|
|
7
7
|
import { collectCatalog, buildRegistryIndex } from './buildRegistryIndex-BcYe607_.mjs';
|
|
8
8
|
import { insertSchemaExtension } from './insertSchemaExtension-DAqbfr9Z.mjs';
|
|
9
9
|
import { createHash } from 'node:crypto';
|
|
@@ -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-B-gR09Z_.mjs';
|
|
4
4
|
import './buildRegistryIndex-BcYe607_.mjs';
|
|
@@ -13,6 +13,7 @@ import { useApp } from '@visulima/tui/hooks/use-app';
|
|
|
13
13
|
import { useInput } from '@visulima/tui/hooks/use-input';
|
|
14
14
|
import { useInterval } from '@visulima/tui/hooks/use-interval';
|
|
15
15
|
import { useEffect, useState } from 'react';
|
|
16
|
+
import { P as PromptCancelledError } from './prompt-cancelled-APzX1Im-.mjs';
|
|
16
17
|
|
|
17
18
|
let listenerCapRaised = false;
|
|
18
19
|
const raiseListenerCap = () => {
|
|
@@ -24,12 +25,6 @@ const raiseListenerCap = () => {
|
|
|
24
25
|
process.setMaxListeners(64);
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
|
-
class PromptCancelledError extends Error {
|
|
28
|
-
constructor() {
|
|
29
|
-
super("cancelled");
|
|
30
|
-
this.name = "PromptCancelledError";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
28
|
const CtrlCGuard = ({ children, onCancel }) => {
|
|
34
29
|
const { exit } = useApp();
|
|
35
30
|
useInput((input, key) => {
|
|
@@ -660,4 +655,4 @@ const withTuiBadgeProgress = async (badge, steps, done) => {
|
|
|
660
655
|
return outcome.values;
|
|
661
656
|
};
|
|
662
657
|
|
|
663
|
-
export {
|
|
658
|
+
export { tuiSelect as a, tuiConfirm as b, createTuiConfirm as c, tuiMascot as d, tuiStep as e, tuiMoonrise as f, tuiHeadline as g, tuiInfo as h, tuiNextSteps as i, tuiTasks as j, tuiMultiSelect as k, withTuiBadgeProgress as l, tuiText as t, withTuiSpinner as w };
|
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.25",
|
|
4
4
|
"description": "The Lunora CLI: init, dev, deploy, codegen, run, reset, and migrate commands",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
|
@@ -52,11 +52,11 @@
|
|
|
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.9",
|
|
56
|
+
"@lunora/config": "1.0.0-alpha.15",
|
|
57
57
|
"@lunora/container": "1.0.0-alpha.1",
|
|
58
|
-
"@lunora/d1": "1.0.0-alpha.
|
|
59
|
-
"@lunora/seed": "1.0.0-alpha.
|
|
58
|
+
"@lunora/d1": "1.0.0-alpha.5",
|
|
59
|
+
"@lunora/seed": "1.0.0-alpha.3",
|
|
60
60
|
"@visulima/cerebro": "3.0.0-alpha.32",
|
|
61
61
|
"@visulima/fs": "5.0.0-alpha.32",
|
|
62
62
|
"@visulima/pail": "4.0.0-alpha.22",
|