@lunora/config 1.0.0-alpha.392 → 1.0.0-alpha.394
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.d.mts +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/BUILD_ROOT_ENV-Dg4MV3wY.mjs +1 -0
- package/dist/packem_shared/{POLICY_SCAFFOLD_ENDPOINT-CDGx3u-a.mjs → POLICY_SCAFFOLD_ENDPOINT-eNqjov6d.mjs} +1 -1
- package/dist/packem_shared/{SCHEMA_EDIT_ENDPOINT-D7s2SlLi.mjs → SCHEMA_EDIT_ENDPOINT-Cgpy_347.mjs} +1 -1
- package/dist/packem_shared/{STUDIO_PATH-Dq0LWvYT.mjs → STUDIO_PATH-B93PUAsG.mjs} +1 -1
- package/dist/packem_shared/assertBuildTargetMatches-Bw7uURKp.mjs +1 -0
- package/dist/packem_shared/canonicalPath-DrfMiT3U.mjs +1 -0
- package/dist/packem_shared/write-atomic-D0PdxcE3.mjs +1 -0
- package/dist/studio-host/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/packem_shared/CODEGEN_ENV-CI9GQHkz.mjs +0 -1
- package/dist/packem_shared/interpretRemote-DJ0sEk1j.mjs +0 -1
- package/dist/packem_shared/write-atomic-DDF6wDCM.mjs +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -76,6 +76,11 @@ declare const readApiSpecMarker: (projectRoot: string) => MarkedApiSpec | undefi
|
|
|
76
76
|
* target refuses: a run that is about to build creates that output and defers the check to after its build.
|
|
77
77
|
*/
|
|
78
78
|
declare class MissingBuildOutputError extends Error {}
|
|
79
|
+
/**
|
|
80
|
+
* The absolute path with symlinks resolved, so two spellings of one directory compare equal. A path that does not exist yet
|
|
81
|
+
* resolves through its nearest existing ancestor, since the CLI and the plugin often name a `.lunora` directory before creating it.
|
|
82
|
+
*/
|
|
83
|
+
declare const canonicalPath: (path: string) => string;
|
|
79
84
|
/** Spawns the process — injectable so tests run without the binary. */
|
|
80
85
|
type DevProcessSpawner = (command: string, args: ReadonlyArray<string>, options: {
|
|
81
86
|
cwd: string;
|
|
@@ -169,6 +174,21 @@ declare const CODEGEN_ENV = "LUNORA_CODEGEN";
|
|
|
169
174
|
declare const STRICT_ADVISORIES_ENV = "LUNORA_STRICT_ADVISORIES";
|
|
170
175
|
/** Env var that enables lazy function imports for codegen when it spells `1` / `true`. */
|
|
171
176
|
declare const LAZY_FUNCTIONS_ENV = "LUNORA_LAZY_FUNCTIONS";
|
|
177
|
+
/** The project root the CLI started a client build for. Only that root's plugin checks {@link BUILD_TARGET_ENV} against itself. */
|
|
178
|
+
declare const BUILD_ROOT_ENV = "LUNORA_BUILD_ROOT";
|
|
179
|
+
/**
|
|
180
|
+
* Env var the CLI sets on the client build it spawns (`lunora build` and `lunora deploy`): the target it resolved for this run.
|
|
181
|
+
* A plugin whose own `target` option names another one refuses to build, so the artifact cannot
|
|
182
|
+
* describe a target the deploy will not ship to.
|
|
183
|
+
*/
|
|
184
|
+
declare const BUILD_TARGET_ENV = "LUNORA_BUILD_TARGET";
|
|
185
|
+
/** Env var the CLI sets to the path the Vite plugin writes its server metafile to. Unset means the default under `.lunora/`. */
|
|
186
|
+
declare const BUNDLE_META_PATH_ENV = "LUNORA_BUNDLE_META_PATH";
|
|
187
|
+
/**
|
|
188
|
+
* Where a plain `vite build` (no {@link BUNDLE_META_PATH_ENV}) writes the server metafile. Only a prebuilt worker
|
|
189
|
+
* (`frameworkBuild: false`) reads it back, so the CLI clears it before its own client build.
|
|
190
|
+
*/
|
|
191
|
+
declare const DEFAULT_BUNDLE_META_PATH: string;
|
|
172
192
|
/**
|
|
173
193
|
* Whether a {@link CODEGEN_ENV} value spells an explicit "off".
|
|
174
194
|
*
|
|
@@ -824,6 +844,15 @@ declare const resolveProjectTarget: (projectRoot: string, explicit?: string) =>
|
|
|
824
844
|
* @returns the resolved, registered target id.
|
|
825
845
|
*/
|
|
826
846
|
declare const resolveTargetOrThrow: (projectRoot: string, explicit?: string) => string;
|
|
847
|
+
/**
|
|
848
|
+
* Refuse a plugin-resolved target that differs from the one the CLI resolved
|
|
849
|
+
* for this run. The CLI's `--target` guard only sees the config file, so a target set
|
|
850
|
+
* in a plugin's options would otherwise slip past it. A no-op outside a CLI build,
|
|
851
|
+
* where {@link BUILD_TARGET_ENV} is unset.
|
|
852
|
+
* @param target The target the plugin resolved.
|
|
853
|
+
* @throws when the CLI resolved a different target.
|
|
854
|
+
*/
|
|
855
|
+
declare const assertBuildTargetMatches: (target: string, projectRoot: string) => void;
|
|
827
856
|
/**
|
|
828
857
|
* Whether we can interactively prompt — stdin must be a TTY. In CI / piped
|
|
829
858
|
* contexts this is false, and callers should fall back to a non-interactive
|
|
@@ -1211,4 +1240,4 @@ type ParseSchemaResult = {
|
|
|
1211
1240
|
* message per failure mode without throwing.
|
|
1212
1241
|
*/
|
|
1213
1242
|
declare const parseSchema: (source: string) => ParseSchemaResult;
|
|
1214
|
-
export { AGENT_MODE_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LAZY_FUNCTIONS_ENV, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, type MarkedApiSpec, MissingBuildOutputError, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, STRICT_ADVISORIES_ENV, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, blockingFindingsMessage, buildPackageSecretsBlock, claimDevServerState, classifyEdit, clearApiSpecMarker, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isLazyFunctionsEnabled, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readApiSpecMarker, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveLazyFunctions, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeApiSpecMarker, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
|
1243
|
+
export { AGENT_MODE_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BUILD_ROOT_ENV, BUILD_TARGET_ENV, BUNDLE_META_PATH_ENV, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_BUNDLE_META_PATH, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LAZY_FUNCTIONS_ENV, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, type MarkedApiSpec, MissingBuildOutputError, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, STRICT_ADVISORIES_ENV, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, assertBuildTargetMatches, blockingFindingsMessage, buildPackageSecretsBlock, canonicalPath, claimDevServerState, classifyEdit, clearApiSpecMarker, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isLazyFunctionsEnabled, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readApiSpecMarker, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveLazyFunctions, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeApiSpecMarker, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
package/dist/index.d.ts
CHANGED
|
@@ -76,6 +76,11 @@ declare const readApiSpecMarker: (projectRoot: string) => MarkedApiSpec | undefi
|
|
|
76
76
|
* target refuses: a run that is about to build creates that output and defers the check to after its build.
|
|
77
77
|
*/
|
|
78
78
|
declare class MissingBuildOutputError extends Error {}
|
|
79
|
+
/**
|
|
80
|
+
* The absolute path with symlinks resolved, so two spellings of one directory compare equal. A path that does not exist yet
|
|
81
|
+
* resolves through its nearest existing ancestor, since the CLI and the plugin often name a `.lunora` directory before creating it.
|
|
82
|
+
*/
|
|
83
|
+
declare const canonicalPath: (path: string) => string;
|
|
79
84
|
/** Spawns the process — injectable so tests run without the binary. */
|
|
80
85
|
type DevProcessSpawner = (command: string, args: ReadonlyArray<string>, options: {
|
|
81
86
|
cwd: string;
|
|
@@ -169,6 +174,21 @@ declare const CODEGEN_ENV = "LUNORA_CODEGEN";
|
|
|
169
174
|
declare const STRICT_ADVISORIES_ENV = "LUNORA_STRICT_ADVISORIES";
|
|
170
175
|
/** Env var that enables lazy function imports for codegen when it spells `1` / `true`. */
|
|
171
176
|
declare const LAZY_FUNCTIONS_ENV = "LUNORA_LAZY_FUNCTIONS";
|
|
177
|
+
/** The project root the CLI started a client build for. Only that root's plugin checks {@link BUILD_TARGET_ENV} against itself. */
|
|
178
|
+
declare const BUILD_ROOT_ENV = "LUNORA_BUILD_ROOT";
|
|
179
|
+
/**
|
|
180
|
+
* Env var the CLI sets on the client build it spawns (`lunora build` and `lunora deploy`): the target it resolved for this run.
|
|
181
|
+
* A plugin whose own `target` option names another one refuses to build, so the artifact cannot
|
|
182
|
+
* describe a target the deploy will not ship to.
|
|
183
|
+
*/
|
|
184
|
+
declare const BUILD_TARGET_ENV = "LUNORA_BUILD_TARGET";
|
|
185
|
+
/** Env var the CLI sets to the path the Vite plugin writes its server metafile to. Unset means the default under `.lunora/`. */
|
|
186
|
+
declare const BUNDLE_META_PATH_ENV = "LUNORA_BUNDLE_META_PATH";
|
|
187
|
+
/**
|
|
188
|
+
* Where a plain `vite build` (no {@link BUNDLE_META_PATH_ENV}) writes the server metafile. Only a prebuilt worker
|
|
189
|
+
* (`frameworkBuild: false`) reads it back, so the CLI clears it before its own client build.
|
|
190
|
+
*/
|
|
191
|
+
declare const DEFAULT_BUNDLE_META_PATH: string;
|
|
172
192
|
/**
|
|
173
193
|
* Whether a {@link CODEGEN_ENV} value spells an explicit "off".
|
|
174
194
|
*
|
|
@@ -824,6 +844,15 @@ declare const resolveProjectTarget: (projectRoot: string, explicit?: string) =>
|
|
|
824
844
|
* @returns the resolved, registered target id.
|
|
825
845
|
*/
|
|
826
846
|
declare const resolveTargetOrThrow: (projectRoot: string, explicit?: string) => string;
|
|
847
|
+
/**
|
|
848
|
+
* Refuse a plugin-resolved target that differs from the one the CLI resolved
|
|
849
|
+
* for this run. The CLI's `--target` guard only sees the config file, so a target set
|
|
850
|
+
* in a plugin's options would otherwise slip past it. A no-op outside a CLI build,
|
|
851
|
+
* where {@link BUILD_TARGET_ENV} is unset.
|
|
852
|
+
* @param target The target the plugin resolved.
|
|
853
|
+
* @throws when the CLI resolved a different target.
|
|
854
|
+
*/
|
|
855
|
+
declare const assertBuildTargetMatches: (target: string, projectRoot: string) => void;
|
|
827
856
|
/**
|
|
828
857
|
* Whether we can interactively prompt — stdin must be a TTY. In CI / piped
|
|
829
858
|
* contexts this is false, and callers should fall back to a non-interactive
|
|
@@ -1211,4 +1240,4 @@ type ParseSchemaResult = {
|
|
|
1211
1240
|
* message per failure mode without throwing.
|
|
1212
1241
|
*/
|
|
1213
1242
|
declare const parseSchema: (source: string) => ParseSchemaResult;
|
|
1214
|
-
export { AGENT_MODE_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LAZY_FUNCTIONS_ENV, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, type MarkedApiSpec, MissingBuildOutputError, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, STRICT_ADVISORIES_ENV, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, blockingFindingsMessage, buildPackageSecretsBlock, claimDevServerState, classifyEdit, clearApiSpecMarker, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isLazyFunctionsEnabled, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readApiSpecMarker, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveLazyFunctions, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeApiSpecMarker, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
|
1243
|
+
export { AGENT_MODE_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BUILD_ROOT_ENV, BUILD_TARGET_ENV, BUNDLE_META_PATH_ENV, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_BUNDLE_META_PATH, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LAZY_FUNCTIONS_ENV, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, type MarkedApiSpec, MissingBuildOutputError, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, STRICT_ADVISORIES_ENV, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, assertBuildTargetMatches, blockingFindingsMessage, buildPackageSecretsBlock, canonicalPath, claimDevServerState, classifyEdit, clearApiSpecMarker, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isLazyFunctionsEnabled, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readApiSpecMarker, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveLazyFunctions, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeApiSpecMarker, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AGENT_MODE_ENV as o,detectAiAgent as t}from"./packem_shared/AGENT_MODE_ENV-D8MvSwPE.mjs";import{discoverAgentInfo as E}from"./packem_shared/discoverAgentInfo-pqFMJBtJ.mjs";import{AGENT_RULES_DIR as i,AGENT_RULES_HINT as n,AGENT_RULES_HINT_ENV as
|
|
1
|
+
import{AGENT_MODE_ENV as o,detectAiAgent as t}from"./packem_shared/AGENT_MODE_ENV-D8MvSwPE.mjs";import{discoverAgentInfo as E}from"./packem_shared/discoverAgentInfo-pqFMJBtJ.mjs";import{AGENT_RULES_DIR as i,AGENT_RULES_HINT as n,AGENT_RULES_HINT_ENV as _,LUNORA_SKILL_NAMES as c,ROOT_SKILL_NAME as p,claimAgentRulesHint as l,detectAgentRules as D}from"./packem_shared/AGENT_RULES_DIR-Bd6JPtNa.mjs";import{clearApiSpecMarker as A,readApiSpecMarker as S,writeApiSpecMarker as m}from"./packem_shared/clearApiSpecMarker-DMGpP41V.mjs";import{MissingBuildOutputError as f}from"./packem_shared/MissingBuildOutputError-BAyekzof.mjs";import{default as T}from"./packem_shared/canonicalPath-DrfMiT3U.mjs";import{startCelldDevSession as v}from"./packem_shared/startCelldDevSession-PHdbwtI5.mjs";import{BUILD_ROOT_ENV as g,BUILD_TARGET_ENV as V,BUNDLE_META_PATH_ENV as I,CODEGEN_ENV as u,DEFAULT_BUNDLE_META_PATH as O,LAZY_FUNCTIONS_ENV as P,STRICT_ADVISORIES_ENV as M,isCodegenDisabled as U,isLazyFunctionsEnabled as F,resolveLazyFunctions as C}from"./packem_shared/BUILD_ROOT_ENV-Dg4MV3wY.mjs";import{discoverContainerInfo as G}from"./packem_shared/discoverContainerInfo-DzXr7Vm3.mjs";import{streamContainerLogs as y}from"./packem_shared/streamContainerLogs-0nko1qpv.mjs";import{detectFramework as h,projectUsesUmbrella as j}from"./packem_shared/detectFramework-Dfpvu6rD.mjs";import{acceptsConnection as K,startDevProcess as H}from"./packem_shared/acceptsConnection-DHhUYGjT.mjs";import{DEV_BINDINGS_FILE as Y,DEV_DAEMON_ENV as J,DEV_HANDOFF_ENV as z,DEV_LOG_FILE as q,DEV_LOG_FILE_ENV as X,DEV_STATE_DIR as Z,DEV_STATE_FILE as Q,claimDevServerState as $,clearDevServerState as ee,isDevServerReady as re,isProcessAlive as oe,isRecordedProcessCurrent as te,readDevServerState as ae,readLiveDevServerState as Ee,updateDevServerState as se,writeDevServerState as ie}from"./packem_shared/DEV_BINDINGS_FILE-C0ZN_XlP.mjs";import{DEV_VARS_EXAMPLE_FILE as _e,DEV_VARS_FILE as ce,DEV_VARS_KEY_PATTERN as pe,escapeRegExp as le,parseDevVariableEntries as De,removeDevVariableLine as de,upsertDevVariableLine as Ae}from"./packem_shared/DEV_VARS_EXAMPLE_FILE-CqLorAxT.mjs";import{DEV_WORKER_ENV_VALUE as me,DEV_WORKER_ENV_VAR as Le,ensureDevWorkerEnv as fe}from"./packem_shared/DEV_WORKER_ENV_VALUE-CARjGoAv.mjs";import{createDiscoveryCache as Te}from"./packem_shared/createDiscoveryCache-npJI4uej.mjs";import{DEFAULT_DEPLOY_TARGET as ve,deployTargetIds as xe,isRunnableTarget as ge,planToolchainInvocation as Ve,resolveDeployDriver as Ie,runnableTargetIds as ue,targetRunsOwnDevServer as Oe}from"./packem_shared/DEFAULT_DEPLOY_TARGET-CnovxJid.mjs";import{inferLunoraBindings as Me,secretSourcesFromBindings as Ue}from"./packem_shared/inferLunoraBindings-BT4-fwiQ.mjs";import{LINKED_PROJECT_DIR as Ce,LINKED_PROJECT_FILE as Be,readLinkedProject as Ge,writeLinkedProject as be}from"./packem_shared/LINKED_PROJECT_DIR-Ba5qPEwo.mjs";import{LUNORA_IGNORED_PATHS as ke,applyLintIgnores as he,detectLintTools as je}from"./packem_shared/LUNORA_IGNORED_PATHS-U93uPxrW.mjs";import{blockingFindingsMessage as Ke,reportCodegenFindings as He}from"./packem_shared/blockingFindingsMessage-CRbg1sla.mjs";import{LUNORA_EVENT_SOURCE as Ye,formatLunoraEvent as Je}from"./packem_shared/LUNORA_EVENT_SOURCE-B9ZVohjO.mjs";import{LUNORA_TAG as qe,advisoryLine as Xe,lunoraLine as Ze}from"./packem_shared/LUNORA_TAG-DQTGPqcJ.mjs";import{default as $e}from"./packem_shared/LunoraReporter-f277GLNT.mjs";import{addArgsFor as rr,detectInstalledManagers as or,detectPackageManager as tr,execArgsFor as ar,installArgsFor as Er,runScriptArgsFor as sr,runScriptCommand as ir,toolchainExecArgs as nr}from"./packem_shared/addArgsFor-CYZKhNIo.mjs";import{P as cr,s as pr}from"./packem_shared/package-secrets-registry-BEJELdls.mjs";import{runPostCodegenHook as Dr}from"./packem_shared/runPostCodegenHook-Dx3yTsYZ.mjs";import{assertBuildTargetMatches as Ar,interpretRemote as Sr,readProjectRemotePreference as mr,readProjectTarget as Lr,resolveProjectTarget as fr,resolveTargetOrThrow as Nr}from"./packem_shared/assertBuildTargetMatches-Bw7uURKp.mjs";import{readProjectDependencies as Rr,readProjectDependencyNames as vr,readProjectManifest as xr}from"./packem_shared/readProjectDependencies-l3uhUKjo.mjs";import{createConfirm as Vr,isInteractive as Ir,promptMultiSelect as ur,promptSelect as Or,promptText as Pr,promptYesNo as Mr}from"./packem_shared/createConfirm-D5mKTMHj.mjs";import{default as Fr}from"./packem_shared/resolveSchemaDirectory-Ca5P6KuP.mjs";import{buildPackageSecretsBlock as Br,ensureDevVariables as Gr,ensureDevVarsExample as br,fillDevSecrets as yr,generateSecretValue as kr,isMintableSecretKey as hr,isPlaceholderValue as jr,planDevSecretsFill as wr,planDevVariablesAugment as Kr,planDevVariablesScaffold as Hr,requiredSecrets as Wr,writeDevVariablesFileAtomically as Yr}from"./packem_shared/buildPackageSecretsBlock-C5WZfMwe.mjs";import{applyAdditiveEdit as zr,classifyEdit as qr}from"./packem_shared/applyAdditiveEdit-CH0VhMJ2.mjs";import{parseSchema as Zr}from"./packem_shared/parseSchema-D1Wbr1qv.mjs";import{classifyPolicyEdit as $r,resolveServerModule as eo,scaffoldPolicyFile as ro,wireRlsIntoProcedure as oo}from"./packem_shared/classifyPolicyEdit-DJi9Fk8G.mjs";import{discoverSchemaInfo as ao}from"./packem_shared/discoverSchemaInfo-BBRlXZop.mjs";import{ACCENT as so,BADGES as io,BADGE_COLUMN_WIDTH as no,LUNA_ART as _o,LUNA_BUNNY as co,LUNA_NAME as po,LUNA_SIGNOFF as lo,STEP_BADGE_NAMES as Do,badgeLead as Ao,badgeWidth as So,padBadge as mo,paintAnswer as Lo,paintBadge as fo}from"./packem_shared/ACCENT-CotPTfv7.mjs";import{COMPOSED_WORKER_ENTRY as To,DURABLE_OBJECT_BINDINGS as Ro,GENERATED_CLASS_MODULES as vo,GENERATED_MODULE_DURABLE_OBJECTS as xo,MERGED_DURABLE_OBJECTS_MODULE as go,isMergedProject as Vo,isMergedRoleModule as Io}from"./packem_shared/COMPOSED_WORKER_ENTRY-Ciiba5g_.mjs";import{discoverWorkflowInfo as Oo}from"./packem_shared/discoverWorkflowInfo-zW7Tt0Tn.mjs";export{so as ACCENT,o as AGENT_MODE_ENV,i as AGENT_RULES_DIR,n as AGENT_RULES_HINT,_ as AGENT_RULES_HINT_ENV,io as BADGES,no as BADGE_COLUMN_WIDTH,g as BUILD_ROOT_ENV,V as BUILD_TARGET_ENV,I as BUNDLE_META_PATH_ENV,u as CODEGEN_ENV,To as COMPOSED_WORKER_ENTRY,O as DEFAULT_BUNDLE_META_PATH,ve as DEFAULT_DEPLOY_TARGET,Y as DEV_BINDINGS_FILE,J as DEV_DAEMON_ENV,z as DEV_HANDOFF_ENV,q as DEV_LOG_FILE,X as DEV_LOG_FILE_ENV,Z as DEV_STATE_DIR,Q as DEV_STATE_FILE,_e as DEV_VARS_EXAMPLE_FILE,ce as DEV_VARS_FILE,pe as DEV_VARS_KEY_PATTERN,me as DEV_WORKER_ENV_VALUE,Le as DEV_WORKER_ENV_VAR,Ro as DURABLE_OBJECT_BINDINGS,vo as GENERATED_CLASS_MODULES,xo as GENERATED_MODULE_DURABLE_OBJECTS,P as LAZY_FUNCTIONS_ENV,Ce as LINKED_PROJECT_DIR,Be as LINKED_PROJECT_FILE,_o as LUNA_ART,co as LUNA_BUNNY,po as LUNA_NAME,lo as LUNA_SIGNOFF,Ye as LUNORA_EVENT_SOURCE,ke as LUNORA_IGNORED_PATHS,c as LUNORA_SKILL_NAMES,qe as LUNORA_TAG,$e as LunoraReporter,go as MERGED_DURABLE_OBJECTS_MODULE,f as MissingBuildOutputError,cr as PACKAGE_SECRETS_REGISTRY,p as ROOT_SKILL_NAME,Do as STEP_BADGE_NAMES,M as STRICT_ADVISORIES_ENV,K as acceptsConnection,rr as addArgsFor,Xe as advisoryLine,zr as applyAdditiveEdit,he as applyLintIgnores,Ar as assertBuildTargetMatches,Ao as badgeLead,So as badgeWidth,Ke as blockingFindingsMessage,Br as buildPackageSecretsBlock,T as canonicalPath,l as claimAgentRulesHint,$ as claimDevServerState,qr as classifyEdit,$r as classifyPolicyEdit,A as clearApiSpecMarker,ee as clearDevServerState,Vr as createConfirm,Te as createDiscoveryCache,xe as deployTargetIds,D as detectAgentRules,t as detectAiAgent,h as detectFramework,or as detectInstalledManagers,je as detectLintTools,tr as detectPackageManager,E as discoverAgentInfo,G as discoverContainerInfo,ao as discoverSchemaInfo,Oo as discoverWorkflowInfo,Gr as ensureDevVariables,br as ensureDevVarsExample,fe as ensureDevWorkerEnv,le as escapeRegExp,ar as execArgsFor,yr as fillDevSecrets,Je as formatLunoraEvent,kr as generateSecretValue,Me as inferLunoraBindings,Er as installArgsFor,Sr as interpretRemote,U as isCodegenDisabled,re as isDevServerReady,Ir as isInteractive,F as isLazyFunctionsEnabled,Vo as isMergedProject,Io as isMergedRoleModule,hr as isMintableSecretKey,jr as isPlaceholderValue,oe as isProcessAlive,te as isRecordedProcessCurrent,ge as isRunnableTarget,Ze as lunoraLine,mo as padBadge,Lo as paintAnswer,fo as paintBadge,De as parseDevVariableEntries,Zr as parseSchema,wr as planDevSecretsFill,Kr as planDevVariablesAugment,Hr as planDevVariablesScaffold,Ve as planToolchainInvocation,j as projectUsesUmbrella,ur as promptMultiSelect,Or as promptSelect,Pr as promptText,Mr as promptYesNo,S as readApiSpecMarker,ae as readDevServerState,Ge as readLinkedProject,Ee as readLiveDevServerState,Rr as readProjectDependencies,vr as readProjectDependencyNames,xr as readProjectManifest,mr as readProjectRemotePreference,Lr as readProjectTarget,de as removeDevVariableLine,He as reportCodegenFindings,Wr as requiredSecrets,Ie as resolveDeployDriver,C as resolveLazyFunctions,fr as resolveProjectTarget,Fr as resolveSchemaDirectory,eo as resolveServerModule,Nr as resolveTargetOrThrow,Dr as runPostCodegenHook,sr as runScriptArgsFor,ir as runScriptCommand,ue as runnableTargetIds,ro as scaffoldPolicyFile,Ue as secretSourcesFromBindings,pr as secretsForPackages,v as startCelldDevSession,H as startDevProcess,y as streamContainerLogs,Oe as targetRunsOwnDevServer,nr as toolchainExecArgs,se as updateDevServerState,Ae as upsertDevVariableLine,oo as wireRlsIntoProcedure,m as writeApiSpecMarker,ie as writeDevServerState,Yr as writeDevVariablesFileAtomically,be as writeLinkedProject};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{join as _}from"node:path";const E="LUNORA_CODEGEN",N="LUNORA_STRICT_ADVISORIES",t="LUNORA_LAZY_FUNCTIONS",L="LUNORA_BUILD_ROOT",A="LUNORA_BUILD_TARGET",T="LUNORA_BUNDLE_META_PATH",r=_(".lunora","vite-bundle-meta.json"),O=o=>{const n=o?.trim().toLowerCase();return n==="0"||n==="false"},s=o=>{const n=o?.trim().toLowerCase();return n==="1"||n==="true"},U=o=>o===!0||s(process.env[t]);export{L as BUILD_ROOT_ENV,A as BUILD_TARGET_ENV,T as BUNDLE_META_PATH_ENV,E as CODEGEN_ENV,r as DEFAULT_BUNDLE_META_PATH,t as LAZY_FUNCTIONS_ENV,N as STRICT_ADVISORIES_ENV,O as isCodegenDisabled,s as isLazyFunctionsEnabled,U as resolveLazyFunctions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as d,readFileSync as y}from"node:fs";import{join as s,isAbsolute as a,relative as m}from"node:path";import{LunoraError as p}from"@lunora/errors";import{classifyPolicyEdit as k,scaffoldPolicyFile as v,resolveServerModule as l,wireRlsIntoProcedure as b}from"./classifyPolicyEdit-DJi9Fk8G.mjs";import{w as c,r as h}from"./write-atomic-
|
|
1
|
+
import{existsSync as d,readFileSync as y}from"node:fs";import{join as s,isAbsolute as a,relative as m}from"node:path";import{LunoraError as p}from"@lunora/errors";import{classifyPolicyEdit as k,scaffoldPolicyFile as v,resolveServerModule as l,wireRlsIntoProcedure as b}from"./classifyPolicyEdit-DJi9Fk8G.mjs";import{w as c,r as h}from"./write-atomic-D0PdxcE3.mjs";const D="/__lunora/policy-scaffold",u=e=>e==="unknown-procedure"?404:e==="already-wired"||e==="destructive"?409:422,f=(e,o)=>{let r;try{r=h(e)}catch(t){return{body:{error:t instanceof Error?t.message:String(t),ok:!1},status:500}}return{body:{...o,diagnostics:r,ok:!0},status:200}},g=e=>({body:{edit:e,message:"Rewriting an existing policy predicate changes evaluation semantics and must be done by hand. The scaffolder only adds new, deny-by-default rules.",needsManualEdit:!0,ok:!1},status:409}),w=(e,o)=>{const r=v(o,l(e.projectRoot));if(!r.ok)return{body:{error:r.reason,ok:!1},status:u(r.reason)};const t=e.schemaDirectory??"lunora",n=s(e.projectRoot,t,r.fileName);return d(n)?{body:{error:"file-exists",fileName:r.fileName,ok:!1},status:409}:(c(n,r.source),f(e,{fileName:r.fileName}))},R=(e,o,r)=>{if(typeof r!="string"||r.length===0||a(r)||r.includes("\\"))return;const t=s(e,o),n=s(t,`${r}.ts`),i=m(t,n);if(!(i.startsWith("..")||a(i)))return n},N=(e,o)=>{const r=R(e.projectRoot,e.schemaDirectory??"lunora",o.filePath);if(r===void 0||!d(r))return{body:{error:"unknown-procedure",ok:!1},status:404};const t=b(y(r,"utf8"),o,l(e.projectRoot));return t.ok?(c(r,t.text),f(e,{exportName:o.exportName})):{body:{error:t.reason,ok:!1},status:u(t.reason)}},E=e=>{if(e.method!=="POST")return{body:{error:"method-not-allowed",ok:!1},status:405};const{body:o}=e;if(o==null||typeof o!="object"||typeof o.kind!="string")return{body:{error:"invalid-edit",ok:!1},status:400};const r=o;if(k(r)==="destructive")return g(r);if(r.kind==="scaffoldPolicy")return w(e,r);if(r.kind==="wireRls")return N(e,r);throw new p("INTERNAL",`unhandled additive policy edit kind: ${String(r.kind)}`)};export{D as POLICY_SCAFFOLD_ENDPOINT,E as handlePolicyScaffoldRequest};
|
package/dist/packem_shared/{SCHEMA_EDIT_ENDPOINT-D7s2SlLi.mjs → SCHEMA_EDIT_ENDPOINT-Cgpy_347.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as a,readFileSync as d}from"node:fs";import{classifyEdit as l,applyAdditiveEdit as c}from"./applyAdditiveEdit-CH0VhMJ2.mjs";import{parseSchema as u}from"./parseSchema-D1Wbr1qv.mjs";import{w as f,r as p}from"./write-atomic-
|
|
1
|
+
import{existsSync as a,readFileSync as d}from"node:fs";import{classifyEdit as l,applyAdditiveEdit as c}from"./applyAdditiveEdit-CH0VhMJ2.mjs";import{parseSchema as u}from"./parseSchema-D1Wbr1qv.mjs";import{w as f,r as p}from"./write-atomic-D0PdxcE3.mjs";import{join as m}from"node:path";const F="/__lunora/schema-edit",b=t=>t==="destructive"||t==="duplicate-table"||t==="duplicate-column"||t==="duplicate-index"?409:t==="unknown-table"?404:t==="invalid-identifier"||t==="invalid-validator"?400:422,y=t=>({body:{error:t.reason,ok:!1},status:422}),h=t=>{if(!a(t))return{response:{body:{error:"no-schema-file",ok:!1},status:404}};const r=u(d(t,"utf8"));return r.ok?{tables:r.tables}:{response:y(r)}},k=t=>({body:{edit:t,message:"This edit changes stored data and must go through a migration. Review the migration before applying.",needsMigration:!0,ok:!1},status:409}),g=(t,r)=>{const e=t.body;if(e==null||typeof e!="object"||typeof e.kind!="string")return{body:{error:"invalid-edit",ok:!1},status:400};if(l(e)==="destructive")return k(e);if(!a(r))return{body:{error:"no-schema-file",ok:!1},status:404};const o=c(d(r,"utf8"),e);if(!o.ok)return{body:{error:o.reason,ok:!1},status:b(o.reason)};f(r,o.text);let i;try{i=p(t)}catch(s){return{body:{error:s instanceof Error?s.message:String(s),ok:!1},status:500}}const n=u(o.text);return{body:{diagnostics:i,ok:!0,tables:n.ok?n.tables:[]},status:200}},R=t=>{const r=m(t.projectRoot,t.schemaDirectory??"lunora","schema.ts");if(t.method==="GET"){const e=h(r);return"response"in e?e.response:{body:{ok:!0,tables:e.tables},status:200}}return t.method==="POST"?g(t,r):{body:{error:"method-not-allowed",ok:!1},status:405}};export{F as SCHEMA_EDIT_ENDPOINT,R as handleSchemaEditRequest};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveAdminToken as A}from"./parseDevVariable-teAAahVD.mjs";import{sendStudioDocument as I,applyStudioAssetCache as O}from"./applyStudioAssetCache-DHQEJuuv.mjs";import{isStandaloneModulePath as _,studioAssetsStamp as H,loadStudioAssets as N,readStandaloneAsset as C,assetContentType as D}from"./assetContentType-CUb5bpbI.mjs";import{detectAgentRules as E}from"./AGENT_RULES_DIR-Bd6JPtNa.mjs";import{handlePolicyScaffoldRequest as v,POLICY_SCAFFOLD_ENDPOINT as L}from"./POLICY_SCAFFOLD_ENDPOINT-
|
|
1
|
+
import{resolveAdminToken as A}from"./parseDevVariable-teAAahVD.mjs";import{sendStudioDocument as I,applyStudioAssetCache as O}from"./applyStudioAssetCache-DHQEJuuv.mjs";import{isStandaloneModulePath as _,studioAssetsStamp as H,loadStudioAssets as N,readStandaloneAsset as C,assetContentType as D}from"./assetContentType-CUb5bpbI.mjs";import{detectAgentRules as E}from"./AGENT_RULES_DIR-Bd6JPtNa.mjs";import{handlePolicyScaffoldRequest as v,POLICY_SCAFFOLD_ENDPOINT as L}from"./POLICY_SCAFFOLD_ENDPOINT-eNqjov6d.mjs";import R from"./renderStudioHtml-ByowDtMl.mjs";import{handleSchemaEditRequest as b,SCHEMA_EDIT_ENDPOINT as x}from"./SCHEMA_EDIT_ENDPOINT-Cgpy_347.mjs";import{handleSeedRequest as k,SEED_ENDPOINT as $}from"./SEED_ENDPOINT-2B56PN_H.mjs";import{serveJsonHandler as g}from"./serveJsonHandler-Dv0EdCb9.mjs";import{transportRejectionReason as j}from"./ALLOW_FORWARDED_ENV-BUndghJx.mjs";const d="/__lunora",F=`${d}/studio.js`,m=`${d}/styles.css`,y=/\/$/,M={[L]:v,[x]:b,[$]:k},U=new Set(["127.0.0.1","::1","localhost"]),X=t=>t!==void 0&&t!==!1&&!U.has(t),P=t=>t===void 0||t==="/"?"":t.replace(y,""),Z=t=>`${P(t)}${d}`,T=(t,a,c)=>{t.statusCode=200,t.setHeader("Content-Type",c),t.end(a)},q=t=>{try{return new URL(t,"http://localhost").pathname}catch{const a=t.indexOf("?");return a===-1?t:t.slice(0,a)}},tt=t=>{const{logger:a,projectRoot:c}=t,u=P(t.base);let l,f,S;const p=(o,n,e)=>{const i=H();if((l===void 0||i!==f)&&(l=N(a),f=i),l===void 0){e.statusCode=501,e.setHeader("Content-Type","text/plain"),e.end("Lunora studio assets not found — install and build @lunora/studio.");return}const s=o===m,r=o.slice(o.lastIndexOf("/")+1);if(O(n,e,r,i))return;if(s){T(e,l.styles,"text/css; charset=utf-8");return}const h=C(r);if(h===void 0){e.statusCode=404,e.setHeader("Content-Type","text/plain"),e.end("Not found");return}T(e,h,D(r))};return(o,n,e)=>{const i=q(o.url??"").replace(y,""),s=u!==""&&i.startsWith(u)?i.slice(u.length):i;if(s!==d&&!s.startsWith(`${d}/`)){e();return}if(t.isNonLoopbackBind||j(o,a)!==void 0){n.statusCode=403,n.setHeader("Content-Type","text/plain"),n.end("Lunora studio is only available on loopback hosts in dev.");return}const r=M[s];if(r!==void 0){g(o,n,r,c,{apiSpec:t.apiSpec,lazyFunctions:t.lazyFunctions,schemaDirectory:t.schemaDirectory});return}if(s===m||_(s)){p(s,o,n);return}S??=R({adminToken:A(c),basePath:d,dataEditable:!0,rulesInstalled:E(c).installed,runAsIdentity:!0,schemaEditable:!0,scriptSrc:F,styleHref:m}),I(n,S)}};export{d as STUDIO_PATH,F as STUDIO_SCRIPT_PATH,m as STUDIO_STYLE_PATH,tt as createStudioMiddleware,X as isNonLoopbackHost,q as requestPathname,Z as studioMountPath};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readProjectConfigLiterals as s,readProjectTarget as c}from"@lunora/codegen";import n from"./canonicalPath-DrfMiT3U.mjs";import{BUILD_TARGET_ENV as i,BUILD_ROOT_ENV as a}from"./BUILD_ROOT_ENV-Dg4MV3wY.mjs";import{DEFAULT_DEPLOY_TARGET as p,resolveDeployDriver as f}from"./DEFAULT_DEPLOY_TARGET-CnovxJid.mjs";const d=e=>{if(typeof e=="boolean")return e;if(e!==null&&typeof e=="object")return!0},P=e=>d(s(e).remote),T=e=>c(e),g=(e,t)=>t??T(e)??p,j=(e,t)=>{const r=g(e,t);return f(r),r},v=(e,t)=>{const r=process.env[i],o=process.env[a];if(!(o===void 0||o===""||n(o)!==n(t))&&r!==void 0&&r!==""&&r!==e)throw new Error(`the plugin resolves target "${e}" but the CLI resolved "${r}" for this run; set the same target in the plugin options and the project config`)};export{v as assertBuildTargetMatches,d as interpretRemote,P as readProjectRemotePreference,T as readProjectTarget,g as resolveProjectTarget,j as resolveTargetOrThrow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{realpathSync as e}from"node:fs";import{resolve as n,dirname as o,join as c,basename as s}from"node:path";const i=r=>{const t=n(r);try{return e.native(t)}catch{const a=o(t);return a===t?t:c(i(a),s(t))}};export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{runCodegen as c,CodegenDiagnosticError as i}from"@lunora/codegen";import{wranglerCodegenInputs as a}from"./wranglerCodegenInputs-UqO5e_qJ.mjs";import{isCodegenDisabled as s,CODEGEN_ENV as t}from"./BUILD_ROOT_ENV-Dg4MV3wY.mjs";import{writeFileSync as p,renameSync as m,rmSync as u}from"node:fs";const d=r=>({apiSpec:r.apiSpec,lazyFunctions:r.lazyFunctions,lunoraDirectory:r.schemaDirectory??"lunora",projectRoot:r.projectRoot,...a(r.projectRoot)}),w=r=>{if(s(process.env[t]))return[`codegen is off (${t}=0 / \`lunora dev --no-codegen\`) — the source was written but \`_generated/\` was NOT regenerated`];try{c(d(r))}catch(o){if(o instanceof i)return[o.message];throw o}return[]},C=(r,o)=>{const e=`${r}.lunora-tmp`;try{p(e,o,"utf8"),m(e,r)}catch(n){throw u(e,{force:!0}),n}};export{w as r,C as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseDevVariable as t,resolveAdminToken as r}from"../packem_shared/parseDevVariable-teAAahVD.mjs";import{applyStudioAssetCache as s,sendStudioDocument as d}from"../packem_shared/applyStudioAssetCache-DHQEJuuv.mjs";import{assetContentType as S,isStandaloneModulePath as l,loadStudioAssets as p,readStandaloneAsset as i,resolveStandaloneDirectory as m,studioAssetsStamp as u}from"../packem_shared/assetContentType-CUb5bpbI.mjs";import{STUDIO_PATH as T,STUDIO_SCRIPT_PATH as f,STUDIO_STYLE_PATH as A,createStudioMiddleware as P,isNonLoopbackHost as _,requestPathname as E,studioMountPath as c}from"../packem_shared/STUDIO_PATH-
|
|
1
|
+
import{parseDevVariable as t,resolveAdminToken as r}from"../packem_shared/parseDevVariable-teAAahVD.mjs";import{applyStudioAssetCache as s,sendStudioDocument as d}from"../packem_shared/applyStudioAssetCache-DHQEJuuv.mjs";import{assetContentType as S,isStandaloneModulePath as l,loadStudioAssets as p,readStandaloneAsset as i,resolveStandaloneDirectory as m,studioAssetsStamp as u}from"../packem_shared/assetContentType-CUb5bpbI.mjs";import{STUDIO_PATH as T,STUDIO_SCRIPT_PATH as f,STUDIO_STYLE_PATH as A,createStudioMiddleware as P,isNonLoopbackHost as _,requestPathname as E,studioMountPath as c}from"../packem_shared/STUDIO_PATH-B93PUAsG.mjs";import{POLICY_SCAFFOLD_ENDPOINT as O,handlePolicyScaffoldRequest as h}from"../packem_shared/POLICY_SCAFFOLD_ENDPOINT-eNqjov6d.mjs";import{default as N}from"../packem_shared/renderStudioHtml-ByowDtMl.mjs";import{SCHEMA_EDIT_ENDPOINT as H,handleSchemaEditRequest as L}from"../packem_shared/SCHEMA_EDIT_ENDPOINT-Cgpy_347.mjs";import{SEED_ENDPOINT as q,handleSeedRequest as v}from"../packem_shared/SEED_ENDPOINT-2B56PN_H.mjs";import{serveJsonHandler as M}from"../packem_shared/serveJsonHandler-Dv0EdCb9.mjs";import{ALLOW_FORWARDED_ENV as k,headerValue as F,isLoopbackAddress as U,transportRejectionReason as V}from"../packem_shared/ALLOW_FORWARDED_ENV-BUndghJx.mjs";export{k as ALLOW_FORWARDED_ENV,O as POLICY_SCAFFOLD_ENDPOINT,H as SCHEMA_EDIT_ENDPOINT,q as SEED_ENDPOINT,T as STUDIO_PATH,f as STUDIO_SCRIPT_PATH,A as STUDIO_STYLE_PATH,s as applyStudioAssetCache,S as assetContentType,P as createStudioMiddleware,h as handlePolicyScaffoldRequest,L as handleSchemaEditRequest,v as handleSeedRequest,F as headerValue,U as isLoopbackAddress,_ as isNonLoopbackHost,l as isStandaloneModulePath,p as loadStudioAssets,t as parseDevVariable,i as readStandaloneAsset,N as renderStudioHtml,E as requestPathname,r as resolveAdminToken,m as resolveStandaloneDirectory,d as sendStudioDocument,M as serveJsonHandler,u as studioAssetsStamp,c as studioMountPath,V as transportRejectionReason};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/config",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.394",
|
|
4
4
|
"description": "Internal shared CLI + Vite config layer for Lunora: wrangler.jsonc validation, binding inference, and .dev.vars scaffolding",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bindings",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@lunora/codegen": "1.0.0-alpha.
|
|
61
|
+
"@lunora/codegen": "1.0.0-alpha.343",
|
|
62
62
|
"@lunora/container": "1.0.0-alpha.89",
|
|
63
63
|
"@lunora/errors": ">=1.0.0-alpha.51 <2.0.0-0",
|
|
64
|
-
"@lunora/seed": "1.0.0-alpha.
|
|
64
|
+
"@lunora/seed": "1.0.0-alpha.247",
|
|
65
65
|
"@visulima/colorize": "2.1.1",
|
|
66
66
|
"@visulima/find-ai-runner": "1.0.2",
|
|
67
67
|
"@visulima/fs": "6.0.29",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t="LUNORA_CODEGEN",r="LUNORA_STRICT_ADVISORIES",n="LUNORA_LAZY_FUNCTIONS",N=e=>{const o=e?.trim().toLowerCase();return o==="0"||o==="false"},s=e=>{const o=e?.trim().toLowerCase();return o==="1"||o==="true"},c=e=>e===!0||s(process.env[n]);export{t as CODEGEN_ENV,n as LAZY_FUNCTIONS_ENV,r as STRICT_ADVISORIES_ENV,N as isCodegenDisabled,s as isLazyFunctionsEnabled,c as resolveLazyFunctions};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{readProjectConfigLiterals as o,readProjectTarget as n}from"@lunora/codegen";import{DEFAULT_DEPLOY_TARGET as c,resolveDeployDriver as a}from"./DEFAULT_DEPLOY_TARGET-CnovxJid.mjs";const s=e=>{if(typeof e=="boolean")return e;if(e!==null&&typeof e=="object")return!0},g=e=>s(o(e).remote),i=e=>n(e),T=(e,r)=>r??i(e)??c,j=(e,r)=>{const t=T(e,r);return a(t),t};export{s as interpretRemote,g as readProjectRemotePreference,i as readProjectTarget,T as resolveProjectTarget,j as resolveTargetOrThrow};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{runCodegen as c,CodegenDiagnosticError as i}from"@lunora/codegen";import{wranglerCodegenInputs as a}from"./wranglerCodegenInputs-UqO5e_qJ.mjs";import{isCodegenDisabled as s,CODEGEN_ENV as t}from"./CODEGEN_ENV-CI9GQHkz.mjs";import{writeFileSync as p,renameSync as m,rmSync as u}from"node:fs";const d=r=>({apiSpec:r.apiSpec,lazyFunctions:r.lazyFunctions,lunoraDirectory:r.schemaDirectory??"lunora",projectRoot:r.projectRoot,...a(r.projectRoot)}),w=r=>{if(s(process.env[t]))return[`codegen is off (${t}=0 / \`lunora dev --no-codegen\`) — the source was written but \`_generated/\` was NOT regenerated`];try{c(d(r))}catch(o){if(o instanceof i)return[o.message];throw o}return[]},C=(r,o)=>{const e=`${r}.lunora-tmp`;try{p(e,o,"utf8"),m(e,r)}catch(n){throw u(e,{force:!0}),n}};export{w as r,C as w};
|