@lunora/vite 1.0.0-alpha.172 → 1.0.0-alpha.173
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as u}from"node:module";import{cloudflare as c}from"@cloudflare/vite-plugin";import{detectAgentRules as m,claimAgentRulesHint as f,AGENT_RULES_HINT as d,detectFramework as p,resolveTargetOrThrow as g}from"@lunora/config";import{detectFramework as sr}from"@lunora/config";import R from"@visulima/vite-overlay";import{l}from"./packem_shared/log-DE48L4Oz.mjs";import S from"./packem_shared/codegenPlugin-BIAKVRnd.mjs";import v from"./packem_shared/containerLogsPlugin-CWkqSCL3.mjs";import k from"./packem_shared/devStatePlugin-
|
|
1
|
+
import{createRequire as u}from"node:module";import{cloudflare as c}from"@cloudflare/vite-plugin";import{detectAgentRules as m,claimAgentRulesHint as f,AGENT_RULES_HINT as d,detectFramework as p,resolveTargetOrThrow as g}from"@lunora/config";import{detectFramework as sr}from"@lunora/config";import R from"@visulima/vite-overlay";import{l}from"./packem_shared/log-DE48L4Oz.mjs";import S from"./packem_shared/codegenPlugin-BIAKVRnd.mjs";import v from"./packem_shared/containerLogsPlugin-CWkqSCL3.mjs";import k from"./packem_shared/devStatePlugin-CcFV-eBl.mjs";import h from"./packem_shared/devVariablesPlugin-DDvQh3l6.mjs";import{createCommandProbe as w,withDevWorkerEnv as P}from"./packem_shared/DEV_WORKER_ENV_VALUE-CaO3rUSk.mjs";import{DEV_WORKER_ENV_VALUE as cr,DEV_WORKER_ENV_VAR as mr}from"./packem_shared/DEV_WORKER_ENV_VALUE-CaO3rUSk.mjs";import{frameworkComposePlugin as E}from"./packem_shared/CLASS_A_WIRING-CBEvhsXt.mjs";import{CLASS_A_WIRING as dr,LUNORA_WORKER_VIRTUAL_ID as pr,buildWorkerEntrySource as gr,isAutoComposable as Rr}from"./packem_shared/CLASS_A_WIRING-CBEvhsXt.mjs";import A from"./packem_shared/logStreamPlugin-DFdSz0AO.mjs";import{proxyCheckPlugin as _}from"./packem_shared/checkLunoraProxy-C9M8c5eS.mjs";import{checkLunoraProxy as vr}from"./packem_shared/checkLunoraProxy-C9M8c5eS.mjs";import{planViteRemoteBindings as x,remoteBindingsCleanupPlugin as O,remoteBindingsConfigPlugin as W}from"./packem_shared/planViteRemoteBindings-BKGgYFk4.mjs";import{withRemoteBindings as hr}from"./packem_shared/planViteRemoteBindings-BKGgYFk4.mjs";import{lunoraSolutionFinders as D}from"./packem_shared/lunoraSolutionFinder--J0x2mAM.mjs";import{lunoraSolutionFinder as Pr}from"./packem_shared/lunoraSolutionFinder--J0x2mAM.mjs";import{studioPlugin as T}from"./packem_shared/STUDIO_PATH-xwt4m9UW.mjs";import{STUDIO_PATH as Ar,buildStudioUrl as _r}from"./packem_shared/STUDIO_PATH-xwt4m9UW.mjs";import{withWorkerStartupHint as V}from"./packem_shared/WORKER_STARTUP_HINT-COlRTY32.mjs";import{WORKER_STARTUP_HINT as Or,augmentWorkerStartupError as Wr,isWorkerEntryEvalError as Dr}from"./packem_shared/WORKER_STARTUP_HINT-COlRTY32.mjs";import{wranglerValidatorPlugin as C}from"./packem_shared/wranglerValidatorPlugin-Dma0xUy2.mjs";import{default as Vr}from"./packem_shared/LUNORA_API_UPDATED_EVENT-CO2Rv2re.mjs";import{reconcileWranglerCrons as Lr}from"@lunora/config/cloudflare";const L=e=>({apply:"serve",configureServer(r){return()=>{m(e.projectRoot).installed||!f()||r.config.logger.warn(`
|
|
2
2
|
${l(d)}
|
|
3
3
|
`)}},name:"lunora:agent-rules-hint"}),N=()=>({}),y={astro:"Astro",none:"standalone (SPA / SSR-less)",nuxt:"Nuxt","react-router":"React Router","solid-start":"SolidStart",sveltekit:"SvelteKit","tanstack-start":"TanStack Start","tanstack-start-solid":"TanStack Start (Solid)",vinext:"Next.js on Vite (vinext)"},U=e=>{const r=y[e.framework];return e.framework==="none"?l("no meta-framework detected — running standalone."):e.class==="B"?l(`detected ${r} — composition is handled by the framework adapter.`):l(`detected ${r} — composing the Lunora worker into one Cloudflare Worker.`)},b=(e,r)=>{let t=!1;const o=()=>{r.framework??=p(e.projectRoot)};return{config(){o()},configResolved(){o()},configureServer(){o(),!t&&r.framework!==void 0&&(t=!0,console.info(U(r.framework)))},name:"lunora:framework-detect"}},I=e=>{if(e===!1)return!1;const r=e===!0||e===void 0?{}:e;return{...r,forwardedConsoleMethods:r.forwardedConsoleMethods??["error","warn"],solutionFinders:[...D,...r.solutionFinders??[]]}},j=e=>{const r=e??{},t=r.schemaDir??"lunora";let o;r.cloudflare===!1?o=!1:r.cloudflare===!0||r.cloudflare===void 0?o={}:o=r.cloudflare;const a=r.projectRoot??process.cwd();return{allowUnauthenticatedShardAccess:r.allowUnauthenticatedShardAccess??!1,apiSpec:r.apiSpec??"openapi",cloudflare:o,studio:r.studio??!0,generatedDir:r.generatedDir??`${t}/_generated`,overlay:I(r.overlay),projectRoot:a,schemaDir:t,target:g(a,r.target),validateWrangler:r.validateWrangler??!0}},nr=e=>{const r=j(e),t=N(),{isServe:o,plugin:a}=w(),n=[a,b(r,t),E(r,t),h(r),S(r),A(),k(r),L(r),_()];if(r.studio&&n.push(T()),r.validateWrangler&&n.push(C(r)),r.overlay!==!1&&n.push(R(r.overlay)),r.cloudflare!==!1){n.push(v(r));const i=x({projectRoot:r.projectRoot}),s=P(r.cloudflare,o);i.enabled&&(i.configPath!==void 0&&n.push(O(i.cleanup)),n.push(W(s,i))),n.push(...V(c(s)))}return n},ar=u(import.meta.url)("../package.json").version;export{dr as CLASS_A_WIRING,cr as DEV_WORKER_ENV_VALUE,mr as DEV_WORKER_ENV_VAR,Vr as LUNORA_API_UPDATED_EVENT,pr as LUNORA_WORKER_VIRTUAL_ID,Ar as STUDIO_PATH,ar as VERSION,Or as WORKER_STARTUP_HINT,Wr as augmentWorkerStartupError,_r as buildStudioUrl,gr as buildWorkerEntrySource,vr as checkLunoraProxy,S as codegenPlugin,v as containerLogsPlugin,w as createCommandProbe,sr as detectFramework,k as devStatePlugin,h as devVariablesPlugin,E as frameworkComposePlugin,Rr as isAutoComposable,Dr as isWorkerEntryEvalError,A as logStreamPlugin,nr as lunora,Pr as lunoraSolutionFinder,D as lunoraSolutionFinders,x as planViteRemoteBindings,_ as proxyCheckPlugin,Lr as reconcileWranglerCrons,O as remoteBindingsCleanupPlugin,W as remoteBindingsConfigPlugin,I as resolveOverlayOption,T as studioPlugin,P as withDevWorkerEnv,hr as withRemoteBindings,V as withWorkerStartupHint,C as wranglerValidatorPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DEV_HANDOFF_ENV as d,claimDevServerState as c,DEV_LOG_FILE_ENV as p,DEV_DAEMON_ENV as u,clearDevServerState as f}from"@lunora/config";import{l as v}from"./log-DE48L4Oz.mjs";import{r as g,a as S}from"./server-close-Qoh4i6Ay.mjs";const m=/\/$/,D=o=>{const r=o.resolvedUrls?.local[0];if(r!==void 0)return r.replace(m,"");const t=o.httpServer?.address();if(t!==null&&typeof t=="object")return`http://localhost:${String(t.port)}`},O=o=>{let r=!1;const t=new Map;return{apply:"serve",configureServer(e){const l=o.projectRoot,a=()=>{if(r)return;const n=D(e);if(n===void 0)return;const s=Number(process.env[d]),i=c(l,{background:process.env[u]==="1",logFile:process.env[p],mode:"vite",pid:process.pid,readyAt:new Date().toISOString(),startedAt:new Date().toISOString(),url:n},Number.isInteger(s)&&s>0?{supersedePid:s}:void 0);if(!i.ok){i.existing!==void 0&&e.config.logger.warn(v(`another dev server is already recorded at ${i.existing.url} (pid ${String(i.existing.pid)}) — leaving .lunora/dev.json untouched`));return}r=!0};return S(e,t,()=>{r&&(f(l,process.pid),r=!1)}),()=>{if(typeof e.printUrls=="function"){const n=e.printUrls.bind(e);e.printUrls=()=>{n(),a()}}e.httpServer?.once("listening",()=>{setTimeout(a,0)})}},buildEnd(){g(t,this.environment)},name:"lunora:dev-state"}};export{O as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/vite",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.173",
|
|
4
4
|
"description": "The Lunora Vite plugin: codegen, type sync, wrangler validation, and an error overlay over @cloudflare/vite-plugin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -46,11 +46,10 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@cloudflare/vite-plugin": "1.51.2",
|
|
49
|
-
"@lunora/codegen": "1.0.0-alpha.
|
|
50
|
-
"@lunora/config": "1.0.0-alpha.
|
|
51
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
52
|
-
"@visulima/vite-overlay": "2.0.12"
|
|
53
|
-
"ts-morph": "^28.0.0"
|
|
49
|
+
"@lunora/codegen": "1.0.0-alpha.140",
|
|
50
|
+
"@lunora/config": "1.0.0-alpha.173",
|
|
51
|
+
"@lunora/errors": "1.0.0-alpha.26",
|
|
52
|
+
"@visulima/vite-overlay": "2.0.12"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|
|
56
55
|
"@lunora/studio": ">=1.0.0-alpha.50 <2.0.0-0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DEV_HANDOFF_ENV as a,claimDevServerState as c,DEV_LOG_FILE_ENV as p,DEV_DAEMON_ENV as u,clearDevServerState as f}from"@lunora/config";import{l as v}from"./log-DE48L4Oz.mjs";import{r as g,a as S}from"./server-close-Qoh4i6Ay.mjs";const m=/\/$/,D=o=>{const r=o.resolvedUrls?.local[0];if(r!==void 0)return r.replace(m,"");const t=o.httpServer?.address();if(t!==null&&typeof t=="object")return`http://localhost:${String(t.port)}`},b=o=>{let r=!1;const t=new Map;return{apply:"serve",configureServer(e){const l=o.projectRoot,d=()=>{if(r)return;const n=D(e);if(n===void 0)return;const s=Number(process.env[a]),i=c(l,{background:process.env[u]==="1",logFile:process.env[p],mode:"vite",pid:process.pid,startedAt:new Date().toISOString(),url:n},Number.isInteger(s)&&s>0?{supersedePid:s}:void 0);if(!i.ok){i.existing!==void 0&&e.config.logger.warn(v(`another dev server is already recorded at ${i.existing.url} (pid ${String(i.existing.pid)}) — leaving .lunora/dev.json untouched`));return}r=!0};return S(e,t,()=>{r&&(f(l,process.pid),r=!1)}),()=>{if(typeof e.printUrls=="function"){const n=e.printUrls.bind(e);e.printUrls=()=>{n(),d()}}e.httpServer?.once("listening",()=>{setTimeout(d,0)})}},buildEnd(){g(t,this.environment)},name:"lunora:dev-state"}};export{b as default};
|