@lunora/config 1.0.0-alpha.366 → 1.0.0-alpha.368
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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/CODEGEN_ENV-CMu0nUIG.mjs +1 -0
- package/dist/packem_shared/{POLICY_SCAFFOLD_ENDPOINT-BmJYwAy2.mjs → POLICY_SCAFFOLD_ENDPOINT-PC-k2_lO.mjs} +1 -1
- package/dist/packem_shared/{SCHEMA_EDIT_ENDPOINT-BeTxqCuQ.mjs → SCHEMA_EDIT_ENDPOINT-U51x5SXZ.mjs} +1 -1
- package/dist/packem_shared/STUDIO_PATH-BsbWY3l7.mjs +1 -0
- package/dist/packem_shared/write-atomic-CCYfLkMC.mjs +1 -0
- package/dist/studio-host/index.d.mts +6 -0
- package/dist/studio-host/index.d.ts +6 -0
- package/dist/studio-host/index.mjs +1 -1
- package/package.json +4 -4
- package/dist/packem_shared/CODEGEN_ENV-ZsCxV1kP.mjs +0 -1
- package/dist/packem_shared/STUDIO_PATH-CSx_psKS.mjs +0 -1
- package/dist/packem_shared/write-atomic-CK6VZaPI.mjs +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -148,6 +148,8 @@ declare const startCelldDevSession: (options: CelldDevSessionOptions) => Promise
|
|
|
148
148
|
*/
|
|
149
149
|
/** Env var that turns codegen off when it spells `0` / `false`. Unset means on. */
|
|
150
150
|
declare const CODEGEN_ENV = "LUNORA_CODEGEN";
|
|
151
|
+
/** Env var that enables lazy function imports for codegen when it spells `1` / `true`. */
|
|
152
|
+
declare const LAZY_FUNCTIONS_ENV = "LUNORA_LAZY_FUNCTIONS";
|
|
151
153
|
/**
|
|
152
154
|
* Whether a {@link CODEGEN_ENV} value spells an explicit "off".
|
|
153
155
|
*
|
|
@@ -156,6 +158,8 @@ declare const CODEGEN_ENV = "LUNORA_CODEGEN";
|
|
|
156
158
|
* question, with the opposite polarity.
|
|
157
159
|
*/
|
|
158
160
|
declare const isCodegenDisabled: (value: string | undefined) => boolean;
|
|
161
|
+
/** Whether a {@link LAZY_FUNCTIONS_ENV} value explicitly opts into lazy imports. */
|
|
162
|
+
declare const isLazyFunctionsEnabled: (value: string | undefined) => boolean;
|
|
159
163
|
/** Severity a container output line is surfaced at: `stderr` → `error`, `stdout` → `info`. */
|
|
160
164
|
type ContainerLogLevel = "error" | "info";
|
|
161
165
|
/** One declared container to follow, identified by the names codegen lifts from `defineContainer`. */
|
|
@@ -1184,4 +1188,4 @@ type ParseSchemaResult = {
|
|
|
1184
1188
|
* message per failure mode without throwing.
|
|
1185
1189
|
*/
|
|
1186
1190
|
declare const parseSchema: (source: string) => ParseSchemaResult;
|
|
1187
|
-
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, 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 MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, blockingFindingsMessage, buildPackageSecretsBlock, claimDevServerState, classifyEdit, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
|
1191
|
+
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 MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, blockingFindingsMessage, buildPackageSecretsBlock, claimDevServerState, classifyEdit, 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, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
package/dist/index.d.ts
CHANGED
|
@@ -148,6 +148,8 @@ declare const startCelldDevSession: (options: CelldDevSessionOptions) => Promise
|
|
|
148
148
|
*/
|
|
149
149
|
/** Env var that turns codegen off when it spells `0` / `false`. Unset means on. */
|
|
150
150
|
declare const CODEGEN_ENV = "LUNORA_CODEGEN";
|
|
151
|
+
/** Env var that enables lazy function imports for codegen when it spells `1` / `true`. */
|
|
152
|
+
declare const LAZY_FUNCTIONS_ENV = "LUNORA_LAZY_FUNCTIONS";
|
|
151
153
|
/**
|
|
152
154
|
* Whether a {@link CODEGEN_ENV} value spells an explicit "off".
|
|
153
155
|
*
|
|
@@ -156,6 +158,8 @@ declare const CODEGEN_ENV = "LUNORA_CODEGEN";
|
|
|
156
158
|
* question, with the opposite polarity.
|
|
157
159
|
*/
|
|
158
160
|
declare const isCodegenDisabled: (value: string | undefined) => boolean;
|
|
161
|
+
/** Whether a {@link LAZY_FUNCTIONS_ENV} value explicitly opts into lazy imports. */
|
|
162
|
+
declare const isLazyFunctionsEnabled: (value: string | undefined) => boolean;
|
|
159
163
|
/** Severity a container output line is surfaced at: `stderr` → `error`, `stdout` → `info`. */
|
|
160
164
|
type ContainerLogLevel = "error" | "info";
|
|
161
165
|
/** One declared container to follow, identified by the names codegen lifts from `defineContainer`. */
|
|
@@ -1184,4 +1188,4 @@ type ParseSchemaResult = {
|
|
|
1184
1188
|
* message per failure mode without throwing.
|
|
1185
1189
|
*/
|
|
1186
1190
|
declare const parseSchema: (source: string) => ParseSchemaResult;
|
|
1187
|
-
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, 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 MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, blockingFindingsMessage, buildPackageSecretsBlock, claimDevServerState, classifyEdit, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
|
1191
|
+
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 MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, blockingFindingsMessage, buildPackageSecretsBlock, claimDevServerState, classifyEdit, 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, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, 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 s}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 l,claimAgentRulesHint as p,detectAgentRules as
|
|
1
|
+
import{AGENT_MODE_ENV as o,detectAiAgent as t}from"./packem_shared/AGENT_MODE_ENV-D8MvSwPE.mjs";import{discoverAgentInfo as s}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 l,claimAgentRulesHint as p,detectAgentRules as d}from"./packem_shared/AGENT_RULES_DIR-HrrbNZPy.mjs";import{startCelldDevSession as m}from"./packem_shared/startCelldDevSession-BLFsd6jG.mjs";import{CODEGEN_ENV as S,LAZY_FUNCTIONS_ENV as f,isCodegenDisabled as L,isLazyFunctionsEnabled as N}from"./packem_shared/CODEGEN_ENV-CMu0nUIG.mjs";import{discoverContainerInfo as R}from"./packem_shared/discoverContainerInfo-DzXr7Vm3.mjs";import{streamContainerLogs as g}from"./packem_shared/streamContainerLogs-0nko1qpv.mjs";import{detectFramework as V,projectUsesUmbrella as I}from"./packem_shared/detectFramework-Dfpvu6rD.mjs";import{acceptsConnection as u,startDevProcess as P}from"./packem_shared/acceptsConnection-DHhUYGjT.mjs";import{DEV_BINDINGS_FILE as F,DEV_DAEMON_ENV as U,DEV_HANDOFF_ENV as M,DEV_LOG_FILE as G,DEV_LOG_FILE_ENV as b,DEV_STATE_DIR as B,DEV_STATE_FILE as y,claimDevServerState as k,clearDevServerState as j,isDevServerReady as K,isProcessAlive as h,isRecordedProcessCurrent as w,readDevServerState as H,readLiveDevServerState as W,updateDevServerState as Y,writeDevServerState as J}from"./packem_shared/DEV_BINDINGS_FILE-C0ZN_XlP.mjs";import{DEV_VARS_EXAMPLE_FILE as z,DEV_VARS_FILE as X,DEV_VARS_KEY_PATTERN as Z,escapeRegExp as Q,parseDevVariableEntries as $,removeDevVariableLine as ee,upsertDevVariableLine as re}from"./packem_shared/DEV_VARS_EXAMPLE_FILE-CqLorAxT.mjs";import{DEV_WORKER_ENV_VALUE as te,DEV_WORKER_ENV_VAR as ae,ensureDevWorkerEnv as se}from"./packem_shared/DEV_WORKER_ENV_VALUE-2XFXmRrP.mjs";import{createDiscoveryCache as ie}from"./packem_shared/createDiscoveryCache-npJI4uej.mjs";import{DEFAULT_DEPLOY_TARGET as _e,deployTargetIds as ce,isRunnableTarget as le,planToolchainInvocation as pe,resolveDeployDriver as de,runnableTargetIds as De,targetRunsOwnDevServer as me}from"./packem_shared/DEFAULT_DEPLOY_TARGET-rR7buNQw.mjs";import{i as Se,s as fe}from"./packem_shared/infer-bindings-C1NFOdMi.mjs";import{LINKED_PROJECT_DIR as Ne,LINKED_PROJECT_FILE as ve,readLinkedProject as Re,writeLinkedProject as Te}from"./packem_shared/LINKED_PROJECT_DIR-Ba5qPEwo.mjs";import{LUNORA_IGNORED_PATHS as xe,applyLintIgnores as Ve,detectLintTools as Ie}from"./packem_shared/LUNORA_IGNORED_PATHS-U93uPxrW.mjs";import{blockingFindingsMessage as ue,reportCodegenFindings as Pe}from"./packem_shared/blockingFindingsMessage-BVbijPdn.mjs";import{LUNORA_EVENT_SOURCE as Fe,formatLunoraEvent as Ue}from"./packem_shared/LUNORA_EVENT_SOURCE-B9ZVohjO.mjs";import{LUNORA_TAG as Ge,advisoryLine as be,lunoraLine as Be}from"./packem_shared/LUNORA_TAG-DQTGPqcJ.mjs";import{default as ke}from"./packem_shared/LunoraReporter-f277GLNT.mjs";import{addArgsFor as Ke,detectInstalledManagers as he,detectPackageManager as we,execArgsFor as He,installArgsFor as We,runScriptArgsFor as Ye,runScriptCommand as Je,toolchainExecArgs as qe}from"./packem_shared/addArgsFor-CYZKhNIo.mjs";import{P as Xe,s as Ze}from"./packem_shared/package-secrets-registry-BeheNwsP.mjs";import{runPostCodegenHook as $e}from"./packem_shared/runPostCodegenHook-Dx3yTsYZ.mjs";import{interpretRemote as rr,readProjectRemotePreference as or,readProjectTarget as tr,resolveProjectTarget as ar,resolveTargetOrThrow as sr}from"./packem_shared/interpretRemote-CcmGeGZ_.mjs";import{readProjectDependencies as ir,readProjectDependencyNames as nr,readProjectManifest as _r}from"./packem_shared/readProjectDependencies-l3uhUKjo.mjs";import{createConfirm as lr,isInteractive as pr,promptMultiSelect as dr,promptSelect as Dr,promptText as mr,promptYesNo as Ar}from"./packem_shared/createConfirm-D5mKTMHj.mjs";import{default as fr}from"./packem_shared/resolveSchemaDirectory-Ca5P6KuP.mjs";import{buildPackageSecretsBlock as Nr,ensureDevVariables as vr,ensureDevVarsExample as Rr,fillDevSecrets as Tr,generateSecretValue as gr,isMintableSecretKey as xr,isPlaceholderValue as Vr,planDevSecretsFill as Ir,planDevVariablesAugment as Or,planDevVariablesScaffold as ur,requiredSecrets as Pr,writeDevVariablesFileAtomically as Cr}from"./packem_shared/buildPackageSecretsBlock-BWV_VxqV.mjs";import{applyAdditiveEdit as Ur,classifyEdit as Mr}from"./packem_shared/applyAdditiveEdit-CH0VhMJ2.mjs";import{parseSchema as br}from"./packem_shared/parseSchema-D1Wbr1qv.mjs";import{classifyPolicyEdit as yr,resolveServerModule as kr,scaffoldPolicyFile as jr,wireRlsIntoProcedure as Kr}from"./packem_shared/classifyPolicyEdit-DJi9Fk8G.mjs";import{discoverSchemaInfo as wr}from"./packem_shared/discoverSchemaInfo-BBRlXZop.mjs";import{ACCENT as Wr,BADGES as Yr,BADGE_COLUMN_WIDTH as Jr,LUNA_ART as qr,LUNA_BUNNY as zr,LUNA_NAME as Xr,LUNA_SIGNOFF as Zr,STEP_BADGE_NAMES as Qr,badgeLead as $r,badgeWidth as eo,padBadge as ro,paintAnswer as oo,paintBadge as to}from"./packem_shared/ACCENT-CotPTfv7.mjs";import{COMPOSED_WORKER_ENTRY as so,DURABLE_OBJECT_BINDINGS as Eo,GENERATED_CLASS_MODULES as io,GENERATED_MODULE_DURABLE_OBJECTS as no,MERGED_DURABLE_OBJECTS_MODULE as _o,isMergedProject as co,isMergedRoleModule as lo}from"./packem_shared/COMPOSED_WORKER_ENTRY-Ciiba5g_.mjs";import{discoverWorkflowInfo as Do}from"./packem_shared/discoverWorkflowInfo-zW7Tt0Tn.mjs";export{Wr as ACCENT,o as AGENT_MODE_ENV,i as AGENT_RULES_DIR,n as AGENT_RULES_HINT,_ as AGENT_RULES_HINT_ENV,Yr as BADGES,Jr as BADGE_COLUMN_WIDTH,S as CODEGEN_ENV,so as COMPOSED_WORKER_ENTRY,_e as DEFAULT_DEPLOY_TARGET,F as DEV_BINDINGS_FILE,U as DEV_DAEMON_ENV,M as DEV_HANDOFF_ENV,G as DEV_LOG_FILE,b as DEV_LOG_FILE_ENV,B as DEV_STATE_DIR,y as DEV_STATE_FILE,z as DEV_VARS_EXAMPLE_FILE,X as DEV_VARS_FILE,Z as DEV_VARS_KEY_PATTERN,te as DEV_WORKER_ENV_VALUE,ae as DEV_WORKER_ENV_VAR,Eo as DURABLE_OBJECT_BINDINGS,io as GENERATED_CLASS_MODULES,no as GENERATED_MODULE_DURABLE_OBJECTS,f as LAZY_FUNCTIONS_ENV,Ne as LINKED_PROJECT_DIR,ve as LINKED_PROJECT_FILE,qr as LUNA_ART,zr as LUNA_BUNNY,Xr as LUNA_NAME,Zr as LUNA_SIGNOFF,Fe as LUNORA_EVENT_SOURCE,xe as LUNORA_IGNORED_PATHS,c as LUNORA_SKILL_NAMES,Ge as LUNORA_TAG,ke as LunoraReporter,_o as MERGED_DURABLE_OBJECTS_MODULE,Xe as PACKAGE_SECRETS_REGISTRY,l as ROOT_SKILL_NAME,Qr as STEP_BADGE_NAMES,u as acceptsConnection,Ke as addArgsFor,be as advisoryLine,Ur as applyAdditiveEdit,Ve as applyLintIgnores,$r as badgeLead,eo as badgeWidth,ue as blockingFindingsMessage,Nr as buildPackageSecretsBlock,p as claimAgentRulesHint,k as claimDevServerState,Mr as classifyEdit,yr as classifyPolicyEdit,j as clearDevServerState,lr as createConfirm,ie as createDiscoveryCache,ce as deployTargetIds,d as detectAgentRules,t as detectAiAgent,V as detectFramework,he as detectInstalledManagers,Ie as detectLintTools,we as detectPackageManager,s as discoverAgentInfo,R as discoverContainerInfo,wr as discoverSchemaInfo,Do as discoverWorkflowInfo,vr as ensureDevVariables,Rr as ensureDevVarsExample,se as ensureDevWorkerEnv,Q as escapeRegExp,He as execArgsFor,Tr as fillDevSecrets,Ue as formatLunoraEvent,gr as generateSecretValue,Se as inferLunoraBindings,We as installArgsFor,rr as interpretRemote,L as isCodegenDisabled,K as isDevServerReady,pr as isInteractive,N as isLazyFunctionsEnabled,co as isMergedProject,lo as isMergedRoleModule,xr as isMintableSecretKey,Vr as isPlaceholderValue,h as isProcessAlive,w as isRecordedProcessCurrent,le as isRunnableTarget,Be as lunoraLine,ro as padBadge,oo as paintAnswer,to as paintBadge,$ as parseDevVariableEntries,br as parseSchema,Ir as planDevSecretsFill,Or as planDevVariablesAugment,ur as planDevVariablesScaffold,pe as planToolchainInvocation,I as projectUsesUmbrella,dr as promptMultiSelect,Dr as promptSelect,mr as promptText,Ar as promptYesNo,H as readDevServerState,Re as readLinkedProject,W as readLiveDevServerState,ir as readProjectDependencies,nr as readProjectDependencyNames,_r as readProjectManifest,or as readProjectRemotePreference,tr as readProjectTarget,ee as removeDevVariableLine,Pe as reportCodegenFindings,Pr as requiredSecrets,de as resolveDeployDriver,ar as resolveProjectTarget,fr as resolveSchemaDirectory,kr as resolveServerModule,sr as resolveTargetOrThrow,$e as runPostCodegenHook,Ye as runScriptArgsFor,Je as runScriptCommand,De as runnableTargetIds,jr as scaffoldPolicyFile,fe as secretSourcesFromBindings,Ze as secretsForPackages,m as startCelldDevSession,P as startDevProcess,g as streamContainerLogs,me as targetRunsOwnDevServer,qe as toolchainExecArgs,Y as updateDevServerState,re as upsertDevVariableLine,Kr as wireRlsIntoProcedure,J as writeDevServerState,Cr as writeDevVariablesFileAtomically,Te as writeLinkedProject};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="LUNORA_CODEGEN",n="LUNORA_LAZY_FUNCTIONS",s=o=>{const e=o?.trim().toLowerCase();return e==="0"||e==="false"},r=o=>{const e=o?.trim().toLowerCase();return e==="1"||e==="true"};export{t as CODEGEN_ENV,n as LAZY_FUNCTIONS_ENV,s as isCodegenDisabled,r as isLazyFunctionsEnabled};
|
|
@@ -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-CCYfLkMC.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-BeTxqCuQ.mjs → SCHEMA_EDIT_ENDPOINT-U51x5SXZ.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-CCYfLkMC.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};
|
|
@@ -0,0 +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-HrrbNZPy.mjs";import{handlePolicyScaffoldRequest as v,POLICY_SCAFFOLD_ENDPOINT as L}from"./POLICY_SCAFFOLD_ENDPOINT-PC-k2_lO.mjs";import R from"./renderStudioHtml-ByowDtMl.mjs";import{handleSchemaEditRequest as b,SCHEMA_EDIT_ENDPOINT as x}from"./SCHEMA_EDIT_ENDPOINT-U51x5SXZ.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{runCodegen as c,CodegenDiagnosticError as i}from"@lunora/codegen";import{wranglerCodegenInputs as a}from"./wranglerCodegenInputs-CbisphsH.mjs";import{isCodegenDisabled as s,CODEGEN_ENV as t}from"./CODEGEN_ENV-CMu0nUIG.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};
|
|
@@ -158,6 +158,8 @@ declare const assetContentType: (fileName: string) => string;
|
|
|
158
158
|
interface LocalEndpointContext {
|
|
159
159
|
/** API-spec mode the host runs codegen with, so a studio edit regenerates the same spec files. */
|
|
160
160
|
readonly apiSpec?: CodegenOptions["apiSpec"];
|
|
161
|
+
/** Lazy function mode the host runs codegen with, so a studio edit preserves the generated registry. */
|
|
162
|
+
readonly lazyFunctions?: CodegenOptions["lazyFunctions"];
|
|
161
163
|
/** Override the lunora subdirectory name. Defaults to `"lunora"`. */
|
|
162
164
|
readonly schemaDirectory?: string;
|
|
163
165
|
}
|
|
@@ -256,6 +258,8 @@ interface PolicyScaffoldRequest {
|
|
|
256
258
|
readonly apiSpec?: CodegenOptions["apiSpec"];
|
|
257
259
|
/** Parsed JSON body of the `POST`. */
|
|
258
260
|
readonly body?: unknown;
|
|
261
|
+
/** Lazy function mode the host runs codegen with; forwarded to the regeneration. */
|
|
262
|
+
readonly lazyFunctions?: CodegenOptions["lazyFunctions"];
|
|
259
263
|
/** HTTP method — only `POST` is handled. */
|
|
260
264
|
readonly method: string;
|
|
261
265
|
/** Project root containing the `lunora/` directory. */
|
|
@@ -296,6 +300,8 @@ interface SchemaEditRequest {
|
|
|
296
300
|
readonly apiSpec?: CodegenOptions["apiSpec"];
|
|
297
301
|
/** Parsed JSON body for a `POST`; ignored for `GET`. */
|
|
298
302
|
readonly body?: unknown;
|
|
303
|
+
/** Lazy function mode the host runs codegen with; forwarded to the regeneration. */
|
|
304
|
+
readonly lazyFunctions?: CodegenOptions["lazyFunctions"];
|
|
299
305
|
/** HTTP method (`GET` / `POST`). */
|
|
300
306
|
readonly method: string;
|
|
301
307
|
/** Project root containing the `lunora/` directory. */
|
|
@@ -158,6 +158,8 @@ declare const assetContentType: (fileName: string) => string;
|
|
|
158
158
|
interface LocalEndpointContext {
|
|
159
159
|
/** API-spec mode the host runs codegen with, so a studio edit regenerates the same spec files. */
|
|
160
160
|
readonly apiSpec?: CodegenOptions["apiSpec"];
|
|
161
|
+
/** Lazy function mode the host runs codegen with, so a studio edit preserves the generated registry. */
|
|
162
|
+
readonly lazyFunctions?: CodegenOptions["lazyFunctions"];
|
|
161
163
|
/** Override the lunora subdirectory name. Defaults to `"lunora"`. */
|
|
162
164
|
readonly schemaDirectory?: string;
|
|
163
165
|
}
|
|
@@ -256,6 +258,8 @@ interface PolicyScaffoldRequest {
|
|
|
256
258
|
readonly apiSpec?: CodegenOptions["apiSpec"];
|
|
257
259
|
/** Parsed JSON body of the `POST`. */
|
|
258
260
|
readonly body?: unknown;
|
|
261
|
+
/** Lazy function mode the host runs codegen with; forwarded to the regeneration. */
|
|
262
|
+
readonly lazyFunctions?: CodegenOptions["lazyFunctions"];
|
|
259
263
|
/** HTTP method — only `POST` is handled. */
|
|
260
264
|
readonly method: string;
|
|
261
265
|
/** Project root containing the `lunora/` directory. */
|
|
@@ -296,6 +300,8 @@ interface SchemaEditRequest {
|
|
|
296
300
|
readonly apiSpec?: CodegenOptions["apiSpec"];
|
|
297
301
|
/** Parsed JSON body for a `POST`; ignored for `GET`. */
|
|
298
302
|
readonly body?: unknown;
|
|
303
|
+
/** Lazy function mode the host runs codegen with; forwarded to the regeneration. */
|
|
304
|
+
readonly lazyFunctions?: CodegenOptions["lazyFunctions"];
|
|
299
305
|
/** HTTP method (`GET` / `POST`). */
|
|
300
306
|
readonly method: string;
|
|
301
307
|
/** Project root containing the `lunora/` directory. */
|
|
@@ -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-BsbWY3l7.mjs";import{POLICY_SCAFFOLD_ENDPOINT as O,handlePolicyScaffoldRequest as h}from"../packem_shared/POLICY_SCAFFOLD_ENDPOINT-PC-k2_lO.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-U51x5SXZ.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.368",
|
|
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.
|
|
62
|
-
"@lunora/container": "1.0.0-alpha.
|
|
61
|
+
"@lunora/codegen": "1.0.0-alpha.320",
|
|
62
|
+
"@lunora/container": "1.0.0-alpha.79",
|
|
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.231",
|
|
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 s="LUNORA_CODEGEN",t=o=>{const e=o?.trim().toLowerCase();return e==="0"||e==="false"};export{s as CODEGEN_ENV,t as isCodegenDisabled};
|
|
@@ -1 +0,0 @@
|
|
|
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-HrrbNZPy.mjs";import{handlePolicyScaffoldRequest as v,POLICY_SCAFFOLD_ENDPOINT as L}from"./POLICY_SCAFFOLD_ENDPOINT-BmJYwAy2.mjs";import R from"./renderStudioHtml-ByowDtMl.mjs";import{handleSchemaEditRequest as b,SCHEMA_EDIT_ENDPOINT as x}from"./SCHEMA_EDIT_ENDPOINT-BeTxqCuQ.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",M=`${d}/studio.js`,m=`${d}/styles.css`,p=/\/$/,U={[L]:v,[x]:b,[$]:k},q=new Set(["127.0.0.1","::1","localhost"]),X=t=>t!==void 0&&t!==!1&&!q.has(t),y=t=>t===void 0||t==="/"?"":t.replace(p,""),Z=t=>`${y(t)}${d}`,T=(t,n,c)=>{t.statusCode=200,t.setHeader("Content-Type",c),t.end(n)},w=t=>{try{return new URL(t,"http://localhost").pathname}catch{const n=t.indexOf("?");return n===-1?t:t.slice(0,n)}},tt=t=>{const{logger:n,projectRoot:c}=t,u=y(t.base);let l,f,S;const P=(o,s,e)=>{const i=H();if((l===void 0||i!==f)&&(l=N(n),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 a=o===m,r=o.slice(o.lastIndexOf("/")+1);if(O(s,e,r,i))return;if(a){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,s,e)=>{const i=w(o.url??"").replace(p,""),a=u!==""&&i.startsWith(u)?i.slice(u.length):i;if(a!==d&&!a.startsWith(`${d}/`)){e();return}if(t.isNonLoopbackBind||j(o,n)!==void 0){s.statusCode=403,s.setHeader("Content-Type","text/plain"),s.end("Lunora studio is only available on loopback hosts in dev.");return}const r=U[a];if(r!==void 0){g(o,s,r,c,{apiSpec:t.apiSpec,schemaDirectory:t.schemaDirectory});return}if(a===m||_(a)){P(a,o,s);return}S??=R({adminToken:A(c),basePath:d,dataEditable:!0,rulesInstalled:E(c).installed,runAsIdentity:!0,schemaEditable:!0,scriptSrc:M,styleHref:m}),I(s,S)}};export{d as STUDIO_PATH,M as STUDIO_SCRIPT_PATH,m as STUDIO_STYLE_PATH,tt as createStudioMiddleware,X as isNonLoopbackHost,w as requestPathname,Z as studioMountPath};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{runCodegen as c,CodegenDiagnosticError as i}from"@lunora/codegen";import{wranglerCodegenInputs as a}from"./wranglerCodegenInputs-CbisphsH.mjs";import{isCodegenDisabled as s,CODEGEN_ENV as t}from"./CODEGEN_ENV-ZsCxV1kP.mjs";import{writeFileSync as p,renameSync as m,rmSync as d}from"node:fs";const u=r=>({apiSpec:r.apiSpec,lunoraDirectory:r.schemaDirectory??"lunora",projectRoot:r.projectRoot,...a(r.projectRoot)}),y=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(u(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 d(e,{force:!0}),n}};export{y as r,C as w};
|