@lunora/vite 1.0.0-alpha.179 → 1.0.0-alpha.180

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -2
  2. package/package.json +4 -4
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 S from"@visulima/vite-overlay";import{l}from"./packem_shared/log-DE48L4Oz.mjs";import R from"./packem_shared/codegenPlugin-BIAKVRnd.mjs";import v from"./packem_shared/containerLogsPlugin-CWkqSCL3.mjs";import h from"./packem_shared/devStatePlugin-CcFV-eBl.mjs";import k from"./packem_shared/devVariablesPlugin-DDvQh3l6.mjs";import{createCommandProbe as E,withDevWorkerEnv as w}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 P}from"./packem_shared/CLASS_A_WIRING-N5ktvdUV.mjs";import{CLASS_A_WIRING as dr,GENERATED_CLASS_MODULES as pr,LUNORA_WORKER_VIRTUAL_ID as gr,buildWorkerEntrySource as Sr,isAutoComposable as Rr}from"./packem_shared/CLASS_A_WIRING-N5ktvdUV.mjs";import A from"./packem_shared/logStreamPlugin-DtOu5VX8.mjs";import{proxyCheckPlugin as _}from"./packem_shared/checkLunoraProxy-C9M8c5eS.mjs";import{checkLunoraProxy as hr}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 Er}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 _r,buildStudioUrl as xr}from"./packem_shared/STUDIO_PATH-xwt4m9UW.mjs";import{withWorkerStartupHint as L}from"./packem_shared/WORKER_STARTUP_HINT-COlRTY32.mjs";import{WORKER_STARTUP_HINT as Wr,augmentWorkerStartupError as Dr,isWorkerEntryEvalError as Tr}from"./packem_shared/WORKER_STARTUP_HINT-COlRTY32.mjs";import{wranglerValidatorPlugin as C}from"./packem_shared/wranglerValidatorPlugin-Dma0xUy2.mjs";import{default as Cr}from"./packem_shared/LUNORA_API_UPDATED_EVENT-CO2Rv2re.mjs";import{reconcileWranglerCrons as Vr}from"@lunora/config/cloudflare";const N=e=>({apply:"serve",configureServer(r){return()=>{m(e.projectRoot).installed||!f()||r.config.logger.warn(`
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,isRunnableTarget as R,runnableTargetIds as S}from"@lunora/config";import{detectFramework as mr}from"@lunora/config";import h from"@visulima/vite-overlay";import{l}from"./packem_shared/log-DE48L4Oz.mjs";import v from"./packem_shared/codegenPlugin-BIAKVRnd.mjs";import w from"./packem_shared/containerLogsPlugin-CWkqSCL3.mjs";import k from"./packem_shared/devStatePlugin-CcFV-eBl.mjs";import E from"./packem_shared/devVariablesPlugin-DDvQh3l6.mjs";import{createCommandProbe as P,withDevWorkerEnv as A}from"./packem_shared/DEV_WORKER_ENV_VALUE-CaO3rUSk.mjs";import{DEV_WORKER_ENV_VALUE as dr,DEV_WORKER_ENV_VAR as pr}from"./packem_shared/DEV_WORKER_ENV_VALUE-CaO3rUSk.mjs";import{frameworkComposePlugin as _}from"./packem_shared/CLASS_A_WIRING-N5ktvdUV.mjs";import{CLASS_A_WIRING as Rr,GENERATED_CLASS_MODULES as Sr,LUNORA_WORKER_VIRTUAL_ID as hr,buildWorkerEntrySource as vr,isAutoComposable as wr}from"./packem_shared/CLASS_A_WIRING-N5ktvdUV.mjs";import O from"./packem_shared/logStreamPlugin-DtOu5VX8.mjs";import{proxyCheckPlugin as T}from"./packem_shared/checkLunoraProxy-C9M8c5eS.mjs";import{checkLunoraProxy as Er}from"./packem_shared/checkLunoraProxy-C9M8c5eS.mjs";import{planViteRemoteBindings as x,remoteBindingsCleanupPlugin as W,remoteBindingsConfigPlugin as b}from"./packem_shared/planViteRemoteBindings-BKGgYFk4.mjs";import{withRemoteBindings as Ar}from"./packem_shared/planViteRemoteBindings-BKGgYFk4.mjs";import{lunoraSolutionFinders as D}from"./packem_shared/lunoraSolutionFinder--J0x2mAM.mjs";import{lunoraSolutionFinder as Or}from"./packem_shared/lunoraSolutionFinder--J0x2mAM.mjs";import{studioPlugin as L}from"./packem_shared/STUDIO_PATH-xwt4m9UW.mjs";import{STUDIO_PATH as xr,buildStudioUrl as Wr}from"./packem_shared/STUDIO_PATH-xwt4m9UW.mjs";import{withWorkerStartupHint as V}from"./packem_shared/WORKER_STARTUP_HINT-COlRTY32.mjs";import{WORKER_STARTUP_HINT as Dr,augmentWorkerStartupError as Lr,isWorkerEntryEvalError as Vr}from"./packem_shared/WORKER_STARTUP_HINT-COlRTY32.mjs";import{wranglerValidatorPlugin as C}from"./packem_shared/wranglerValidatorPlugin-Dma0xUy2.mjs";import{default as Nr}from"./packem_shared/LUNORA_API_UPDATED_EVENT-CO2Rv2re.mjs";import{reconcileWranglerCrons as Ur}from"@lunora/config/cloudflare";const N=e=>({apply:"serve",configureServer(r){return()=>{m(e.projectRoot).installed||!f()||r.config.logger.warn(`
2
2
  ${l(d)}
3
- `)}},name:"lunora:agent-rules-hint"}),V=()=>({}),U={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)"},y=e=>{const r=U[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(y(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:`${t}/_generated`,overlay:I(r.overlay),projectRoot:a,schemaDir:t,shard:r.shard??{},target:g(a,r.target),validateWrangler:r.validateWrangler??!0}},nr=e=>{const r=j(e),t=V(),{isServe:o,plugin:a}=E(),n=[a,b(r,t),P(r,t),k(r),R(r),A(),h(r),N(r),_()];if(r.studio&&n.push(T()),r.validateWrangler&&n.push(C(r)),r.overlay!==!1&&n.push(S(r.overlay)),r.cloudflare!==!1){n.push(v(r));const i=x({projectRoot:r.projectRoot}),s=w(r.cloudflare,o);i.enabled&&(i.configPath!==void 0&&n.push(O(i.cleanup)),n.push(W(s,i))),n.push(...L(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,pr as GENERATED_CLASS_MODULES,Cr as LUNORA_API_UPDATED_EVENT,gr as LUNORA_WORKER_VIRTUAL_ID,_r as STUDIO_PATH,ar as VERSION,Wr as WORKER_STARTUP_HINT,Dr as augmentWorkerStartupError,xr as buildStudioUrl,Sr as buildWorkerEntrySource,hr as checkLunoraProxy,R as codegenPlugin,v as containerLogsPlugin,E as createCommandProbe,sr as detectFramework,h as devStatePlugin,k as devVariablesPlugin,P as frameworkComposePlugin,Rr as isAutoComposable,Tr as isWorkerEntryEvalError,A as logStreamPlugin,nr as lunora,Pr as lunoraSolutionFinder,D as lunoraSolutionFinders,x as planViteRemoteBindings,_ as proxyCheckPlugin,Vr as reconcileWranglerCrons,O as remoteBindingsCleanupPlugin,W as remoteBindingsConfigPlugin,I as resolveOverlayOption,T as studioPlugin,w as withDevWorkerEnv,Er as withRemoteBindings,L as withWorkerStartupHint,C as wranglerValidatorPlugin};
3
+ `)}},name:"lunora:agent-rules-hint"}),y=()=>({}),U={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)"},I=e=>{const r=U[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.`)},j=(e,r)=>{let o=!1;const t=()=>{r.framework??=p(e.projectRoot)};return{config(){t()},configResolved(){t()},configureServer(){t(),!o&&r.framework!==void 0&&(o=!0,console.info(I(r.framework)))},name:"lunora:framework-detect"}},F=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??[]]}},B=(e,r)=>{const o=g(e,r);if(!R(o)){const t=S();throw new Error(`target "${o}" has no command-line toolchain, so the Lunora Vite plugin cannot build or serve it — it can only generate for it (\`lunora codegen --target ${o}\`). Buildable targets: ${t.join(", ")}`)}return o},$=e=>{const r=e??{},o=r.schemaDir??"lunora";let t;r.cloudflare===!1?t=!1:r.cloudflare===!0||r.cloudflare===void 0?t={}:t=r.cloudflare;const a=r.projectRoot??process.cwd();return{allowUnauthenticatedShardAccess:r.allowUnauthenticatedShardAccess??!1,apiSpec:r.apiSpec??"openapi",cloudflare:t,studio:r.studio??!0,generatedDir:`${o}/_generated`,overlay:F(r.overlay),projectRoot:a,schemaDir:o,shard:r.shard??{},target:B(a,r.target),validateWrangler:r.validateWrangler??!0}},lr=e=>{const r=$(e),o=y(),{isServe:t,plugin:a}=P(),n=[a,j(r,o),_(r,o),E(r),v(r),O(),k(r),N(r),T()];if(r.studio&&n.push(L()),r.validateWrangler&&n.push(C(r)),r.overlay!==!1&&n.push(h(r.overlay)),r.cloudflare!==!1){n.push(w(r));const i=x({projectRoot:r.projectRoot}),s=A(r.cloudflare,t);i.enabled&&(i.configPath!==void 0&&n.push(W(i.cleanup)),n.push(b(s,i))),n.push(...V(c(s)))}return n},sr=u(import.meta.url)("../package.json").version;export{Rr as CLASS_A_WIRING,dr as DEV_WORKER_ENV_VALUE,pr as DEV_WORKER_ENV_VAR,Sr as GENERATED_CLASS_MODULES,Nr as LUNORA_API_UPDATED_EVENT,hr as LUNORA_WORKER_VIRTUAL_ID,xr as STUDIO_PATH,sr as VERSION,Dr as WORKER_STARTUP_HINT,Lr as augmentWorkerStartupError,Wr as buildStudioUrl,vr as buildWorkerEntrySource,Er as checkLunoraProxy,v as codegenPlugin,w as containerLogsPlugin,P as createCommandProbe,mr as detectFramework,k as devStatePlugin,E as devVariablesPlugin,_ as frameworkComposePlugin,wr as isAutoComposable,Vr as isWorkerEntryEvalError,O as logStreamPlugin,lr as lunora,Or as lunoraSolutionFinder,D as lunoraSolutionFinders,x as planViteRemoteBindings,T as proxyCheckPlugin,Ur as reconcileWranglerCrons,W as remoteBindingsCleanupPlugin,b as remoteBindingsConfigPlugin,F as resolveOverlayOption,L as studioPlugin,A as withDevWorkerEnv,Ar as withRemoteBindings,V as withWorkerStartupHint,C as wranglerValidatorPlugin};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/vite",
3
- "version": "1.0.0-alpha.179",
3
+ "version": "1.0.0-alpha.180",
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,9 +46,9 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@cloudflare/vite-plugin": "1.51.2",
49
- "@lunora/codegen": "1.0.0-alpha.145",
50
- "@lunora/config": "1.0.0-alpha.179",
51
- "@lunora/errors": "1.0.0-alpha.26",
49
+ "@lunora/codegen": "1.0.0-alpha.146",
50
+ "@lunora/config": "1.0.0-alpha.180",
51
+ "@lunora/errors": "1.0.0-alpha.27",
52
52
  "@visulima/vite-overlay": "2.0.12"
53
53
  },
54
54
  "peerDependencies": {