@tdk-landscape/tdk-cli-core 1.3.138 → 1.3.139

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.
@@ -201,7 +201,9 @@ export function createPackageJson(name, type, frameworkId, prismaEnabled = false
201
201
  typescript: "^7.0.2",
202
202
  vitest: "^5.0.0",
203
203
  "@biomejs/biome": "^2.5.13",
204
- ...(isFrontend ? { vite: "^5.0.0" } : {}),
204
+ // vitest 5 peers on vite ^6.4.0 || ^7 || ^8; vite 5 makes `vitest run` fail at startup with
205
+ // ERR_PACKAGE_PATH_NOT_EXPORTED ('./module-runner'), in every resource once it is hoisted.
206
+ ...(isFrontend ? { vite: "^6.4.1" } : {}),
205
207
  ...(framework?.devDependencies ?? {}),
206
208
  ...(backendFramework?.devDependencies ?? {}),
207
209
  },
@@ -5,7 +5,7 @@ export const svelteFrontendProvider = {
5
5
  svelte: "^5.0.0",
6
6
  },
7
7
  devDependencies: {
8
- "@sveltejs/vite-plugin-svelte": "^4.0.4",
8
+ "@sveltejs/vite-plugin-svelte": "^5.0.0",
9
9
  },
10
10
  compilerOptions: {},
11
11
  createFiles(name) {
@@ -9,7 +9,7 @@ To create a stack, use:`},services:{singular:"service",command:"tdk resource <na
9
9
  To create a service:`},"stack-services":{singular:"service",command:"tdk resource <name> --stack <stack-name>",context:`
10
10
  To add services to this stack:`}};function gu(e,t){let n=no[e];console.log(t?f.yellow(`No ${n.singular}s found${t}.`):f.yellow(`No ${n.singular}s found.`)),console.log(f.gray(n.context)),console.log(f.gray(` ${n.command}`)),e==="stacks"&&(console.log(f.gray(`
11
11
  Or create a new resource with a stack:`)),console.log(f.gray(" tdk resource <name> --stack <stack-name>")))}function ku(e){console.log(f.yellow(e||"Cancelled."))}function yu(e){console.log(f.blue(`TDK ${e}
12
- `))}function Su(e,t){console.log(f.green(`All ${e} are ${t}!`))}var at=62;function bu(e="\u2500",t=at){return e.repeat(t)}function On(e,t=at-2){let n=Math.max(0,t-e.length),r=Math.floor(n/2),s=n-r;return" ".repeat(r)+e+" ".repeat(s)}function Tu(e,t){return e.length>t?`${e.slice(0,t-1)}\u2026`:e.padEnd(t)}function xu(e,t){return e.length<=t?e:`${e.slice(0,t-3)}...`}function vu(e){console.log(f.green(`\u2713 ${e}`))}function wu(e){console.log(f.blue(e))}function Pu(e,t=2){console.log(f.gray(`${" ".repeat(t)}${e}`))}function $u(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Eu(e,t,n=at){let r=n-2,s="\u2500".repeat(r);console.log(),console.log(f.cyan(`\u256D${s}\u256E`)),console.log(f.cyan("\u2502")+f.bold.white(On(e,r))+f.cyan("\u2502")),t&&(console.log(f.cyan(`\u251C${s}\u2524`)),console.log(f.cyan("\u2502")+f.gray(On(t,r))+f.cyan("\u2502"))),console.log(f.cyan(`\u2570${s}\u256F`))}import{existsSync as so}from"node:fs";import{dirname as oo,join as io,resolve as Nn}from"node:path";import{cwd as ao}from"node:process";var Dn={name:"tdk-cli-internal",private:!0,version:"1.3.138",description:"TDK CLI \u2014 start services on your laptop.",keywords:["tdk","tilt","cli","local-dev","microservices"],homepage:"https://github.com/tdk-landscape/tdk-cli-core#readme",bugs:{url:"https://github.com/tdk-landscape/tdk-cli-core/issues"},repository:{type:"git",url:"git+https://github.com/tdk-landscape/tdk-cli-core.git",directory:"cli"},license:"MIT",author:"TDK Team",type:"module",main:"./dist/index.js",types:"./dist/index.d.ts",bin:{tdk:"bin/tdk.js","tdk-cli":"bin/tdk.js"},files:["dist","dist-bundle","bin","templates","README.md","Tiltfile","engine","discovery","specs","ext","!ext/ide-components/code_executor","shared-platform-engineering/docker-templates"],scripts:{build:"tsc && node scripts/bundle.mjs","build:watch":"tsc --watch",lint:"biome check .","lint:fix":"biome check . --write",typecheck:"tsc --project tsconfig.typecheck.json",clean:"rm -rf dist",dev:"bun run build:watch",test:"vitest run","test:watch":"vitest",prepack:"../scripts/stage-npm-engine.sh && npm run build"},dependencies:{commander:"^15.0.0",handlebars:"^4.7.8"},devDependencies:{"@biomejs/biome":"^2.5.13","@types/node":"^22.0.0","@types/react":"^19.3.0",ajv:"^8.17.1",chalk:"^6.0.1",esbuild:"^0.28.2",ink:"^7.1.1",knip:"^6.38.0",react:"^19.3.0","react-devtools-core":"^8.0.0",typescript:"^7.0.2",vite:"^8.3.1",vitest:"^5.0.0"},engines:{node:">=22.12.0"}};function m(e=ao()){let t=Nn(e),n=Nn("/");for(;t!==n;){if(so(io(t,".tdk","project.json")))return t;let r=oo(t);if(r===t)break;t=r}return null}var _e=null;function co(){if(_e)return _e;let e=Dn;if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Invalid package.json: expected object");let t=e;return _e={name:String(t.name??"@tdk-landscape/tdk-cli-core"),version:String(t.version??"0.0.0"),fullPackage:t},_e}function Cn(){return co().version}import{readFileSync as uo}from"node:fs";import{join as lo}from"node:path";function Ae(){let e=m();if(e)try{let t=uo(lo(e,".tdk","project.json"),"utf-8"),n=JSON.parse(t);if(n?.project?.name)return n.project.name}catch{}return"tdk-project"}function ct(e){let t=Ae(),n=process.env.TDK_SERVICE_BASE_URL??`http://${t}.localhost${e?`:${e}`:""}`;try{let r=new URL(n.includes("://")?n:`http://${n}`),s=r.hostname,o=r.port||(e?String(e):"");if(s==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(s))return{appBase:`${r.protocol}//${s}${o?`:${o}`:""}`,apiBase:`${r.protocol}//${s}${o?`:${o}`:""}`};let i=s.replace(/^(app|api)\./,"");return{appBase:`${r.protocol}//app.${i}${o?`:${o}`:""}`,apiBase:`${r.protocol}//api.${i}${o?`:${o}`:""}`}}catch{return{appBase:`http://app.${t}.localhost`,apiBase:`http://api.${t}.localhost`}}}function po(e){return`${e.replace(/\/+$/,"")}/health`}function ut(e){if(P(e.config?.appType)){let t=e.name.replace(/-api$/,"");return e.config?.apiPath??`/api/${t}`}return e.config?.basePath??`/${e.name}`}function jn(e,t){let{appBase:n,apiBase:r}=ct(t);return e.filter(s=>s.config?.appType==="frontend"||P(s.config?.appType)).map(s=>{let o=P(s.config.appType)?r:n;return{name:s.name,appType:s.config.appType,url:`${o}${po(ut(s))}`}})}async function fo(e,t){try{let n=await fetch(e.url,{method:"GET",redirect:"manual",signal:AbortSignal.timeout(t)});return{...e,ok:n.ok,status:n.status}}catch(n){let r=n instanceof Error&&n.name==="TimeoutError"?`no response within ${t}ms`:n instanceof Error?n.message:String(n);return{...e,ok:!1,error:r}}}async function In(e,t){return Promise.all(e.map(n=>fo(n,t)))}import{existsSync as X,readdirSync as ir,readFileSync as ar,statSync as kt}from"node:fs";import{dirname as Zo,join as W}from"node:path";var le=class{data;options;constructor(t){this.data=new Map,this.options=t}has(t){let n=this.data.get(t);return n?Date.now()-n.timestamp>this.options.ttlMs?(this.data.delete(t),!1):!0:!1}get(t){if(this.has(t))return this.data.get(t)?.value}set(t,n){this.data.set(t,{value:n,timestamp:Date.now()})}delete(t){this.data.delete(t)}clear(){this.data.clear()}keys(){let t=[];for(let n of this.data.keys())this.has(n)&&t.push(n);return t}size(){return this.keys().length}};function Fn(e){let t=0;return{isValid(){return Date.now()-t<e},markUpdated(){t=Date.now()},reset(){t=0}}}import{execFileSync as xo,execSync as vo}from"node:child_process";import{existsSync as yo}from"node:fs";import{delimiter as So,extname as bo,join as To}from"node:path";import{delimiter as Hu,extname as mo}from"node:path";function Oe(){return process.platform==="win32"}function ho(e){return e==="linux"?"linux":e==="darwin"?"darwin":e==="win32"?"windows":null}function go(e){return e==="x64"?"amd64":e==="arm64"?"arm64":null}function ko(e,t){let n=ho(e),r=go(t);if(!n||!r||n==="windows"&&r!=="amd64")return null;let s=`tdk-${n}-${r}`;return n==="windows"?`${s}.exe`:s}function Vu(){return ko(process.platform,process.arch)}function Wu(){return Oe()?"tdk.exe":"tdk"}function Mn(e,t=Oe()){return t?mo(e)?[e]:[e,`${e}.exe`,`${e}.cmd`,`${e}.bat`]:[e]}function $(e){let t=process.env.PATH??process.env.Path??"",n=Oe(),r=Mn(e,n);if(n&&!bo(e))for(let s of(process.env.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";")){let o=s.toLowerCase();o&&!r.includes(`${e}${o}`)&&r.push(`${e}${o}`)}for(let s of t.split(So))if(s)for(let o of r){let i=To(s,o);if(yo(i))return i}return null}var Ln=1e4;function Bn(){let e=!1;if(process.platform==="win32")try{return xo($("docker")??"docker",["ps"],{stdio:"ignore",timeout:Ln,windowsHide:!0}),"running"}catch(t){return t.code==="ETIMEDOUT"?"unresponsive":"missing"}for(let t of["docker ps","colima status","podman ps"])try{return vo(t,{stdio:"ignore",timeout:Ln}),"running"}catch(n){n.code==="ETIMEDOUT"&&(e=!0)}return e?"unresponsive":"missing"}function wo(e,t){let n=Array.from({length:t.length+1},(r,s)=>s);for(let r=1;r<=e.length;r++){let s=[r];for(let o=1;o<=t.length;o++){let i=e[r-1]===t[o-1]?0:1;s[o]=Math.min(s[o-1]+1,n[o]+1,n[o-1]+i)}n=s}return n[t.length]}function Po(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length-1;n++)if(e[n]!==t[n]&&e[n]===t[n+1]&&e[n+1]===t[n]&&e.slice(0,n)===t.slice(0,n)&&e.slice(n+2)===t.slice(n+2))return!0;return!1}function Un(e,t){if(e.length<2||t.length===0||t.includes(e))return;let n=e.toLowerCase(),r,s=Number.POSITIVE_INFINITY;for(let o of t){if(o.length===0)continue;let i=o.toLowerCase(),a=Po(n,i)?1:wo(n,i),c=Math.max(1,Math.min(2,Math.floor(Math.max(n.length,i.length)/3)));a>c||(a<s||a===s&&(r===void 0||o<r))&&(r=o,s=a)}return r}import{spawn as $o}from"node:child_process";import{join as Eo}from"node:path";function Ro(e,t=[],n={}){return new Promise((r,s)=>{let o=[e,...t];n.verbose&&console.log(`Executing: tilt ${o.join(" ")}`);let i=$o($("tilt")??"tilt",o,{stdio:n.inheritStdio?"inherit":"pipe",shell:!1,windowsHide:process.platform==="win32",timeout:n.timeoutMs}),a="",c="";n.inheritStdio||(i.stdout?.on("data",u=>{a+=u.toString()}),i.stderr?.on("data",u=>{c+=u.toString()})),i.on("close",u=>{r({exitCode:u??1,stdout:a,stderr:c})}),i.on("error",u=>{s(new Error(`Failed to spawn tilt: ${u.message}`))})})}async function Hn(){try{return(await Ro("version",[],{inheritStdio:!1,timeoutMs:1e4})).exitCode===0}catch{return!1}}function _o(){let e=m();if(!e)throw L.notInProject();return Eo(e,".tdk",".tdk-out","Tiltfile")}function Vn(e){let t=_o();e.push("-f",t)}function od(e,t={}){let n=[];return Vn(n),t.focusTargets&&t.focusTargets.length>0&&n.push("--",`--focus=${t.focusTargets.join(",")}`),n.push(...e),t.verbose&&!t.quiet&&n.push("--verbose"),t.watch&&n.push("--watch"),n}function id(e={}){let t=[];return Vn(t),e.force&&t.push("--force"),e.focusTargets&&e.focusTargets.length>0&&t.push("--",`--focus=${e.focusTargets.join(",")}`),t}function Wn(e){return e instanceof Error?e.message:String(e)}function md(e,t){if(process.env.TDK_VERBOSE){let n=t!==void 0?`: ${Wn(t)}`:"";console.warn(f.gray(`${e}${n}`))}}var E=class extends Error{suggestions;exitCode;constructor(t,n=[],r=1){super(t),this.name="TdkError",this.suggestions=n,this.exitCode=r}display(){Do(this.message,void 0,this.suggestions)}exit(){this.display(),process.exit(this.exitCode)}};function dt(e,t,n=!1){let r=new Set;for(let s of e){let o=Un(s,t);o&&r.add(n?`Did you mean "${o}" for "${s}"?`:`Did you mean "${o}"?`)}return[...r]}var L={tiltNotInstalled:()=>new E("Tilt CLI is not installed",["Install Tilt: `brew install tilt` (macOS)","Or download from: https://docs.tilt.dev/install.html","Verify with: `tilt version`",`Setup guide: ${rt}`]),dockerNotAvailable:()=>new E("Docker (or a compatible container runtime) is not running",["Start Docker Desktop, then verify with: `docker ps`","Or start Colima: `colima start`","Or start the Docker service on Linux: `sudo systemctl start docker`",`Setup guide: ${rt}`]),dockerNotResponding:()=>new E("Docker is running but not responding (`docker ps` hung for 10s)",["Quit and reopen Docker Desktop, or run `colima restart`","Then verify with: `docker ps`"]),stackNotFound:(e,t=[])=>new E(`Stack "${e}" not found`,[...dt([e],t),"Run `tdk stacks` to see available stacks","Run `tdk stack` to assign resources to a stack"]),resourceNotFound:(e,t=[])=>new E(`Resource "${e}" not found`,[...dt([e],t),"Run `tdk resources` to list all resources","Check the resource name spelling"]),unknownServices:(e,t)=>{let n=dt(e,t,e.length>1);return new E(`Unknown service ${e.join(", ")}. Valid names: ${t.join(", ")}`,n,2)},directoryExists:e=>new E(`Directory already exists: ${e}`,["Use `--path` to specify a different location","Remove the existing directory if no longer needed"]),invalidPath:e=>new E(`Invalid path: ${e}`,["Path must be within the project directory",'Path cannot contain special characters like <>:"|?*']),notInProject:()=>new E("Could not find project root (no .tdk/project.json found)",["Run this from within a TDK project","Run `tdk project --yes` to initialize a new project"])};function hd(){let e=m();return e||L.notInProject().exit()}function Ao(e){e instanceof E&&e.exit(),console.error(f.red(`Error: ${Wn(e)}`)),process.exit(1)}async function Oo(e,t){try{return await e()}catch(n){return t?.verbose&&n instanceof Error&&n.stack&&console.error(f.gray(n.stack)),Ao(n)}}async function gd(e,t){let n=[],r=Bn();return r==="unresponsive"?n.push(L.dockerNotResponding()):r==="missing"&&n.push(L.dockerNotAvailable()),await Hn()||n.push(L.tiltNotInstalled()),n.length>0&&(console.error(f.red(`
12
+ `))}function Su(e,t){console.log(f.green(`All ${e} are ${t}!`))}var at=62;function bu(e="\u2500",t=at){return e.repeat(t)}function On(e,t=at-2){let n=Math.max(0,t-e.length),r=Math.floor(n/2),s=n-r;return" ".repeat(r)+e+" ".repeat(s)}function Tu(e,t){return e.length>t?`${e.slice(0,t-1)}\u2026`:e.padEnd(t)}function xu(e,t){return e.length<=t?e:`${e.slice(0,t-3)}...`}function vu(e){console.log(f.green(`\u2713 ${e}`))}function wu(e){console.log(f.blue(e))}function Pu(e,t=2){console.log(f.gray(`${" ".repeat(t)}${e}`))}function $u(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Eu(e,t,n=at){let r=n-2,s="\u2500".repeat(r);console.log(),console.log(f.cyan(`\u256D${s}\u256E`)),console.log(f.cyan("\u2502")+f.bold.white(On(e,r))+f.cyan("\u2502")),t&&(console.log(f.cyan(`\u251C${s}\u2524`)),console.log(f.cyan("\u2502")+f.gray(On(t,r))+f.cyan("\u2502"))),console.log(f.cyan(`\u2570${s}\u256F`))}import{existsSync as so}from"node:fs";import{dirname as oo,join as io,resolve as Nn}from"node:path";import{cwd as ao}from"node:process";var Dn={name:"tdk-cli-internal",private:!0,version:"1.3.139",description:"TDK CLI \u2014 start services on your laptop.",keywords:["tdk","tilt","cli","local-dev","microservices"],homepage:"https://github.com/tdk-landscape/tdk-cli-core#readme",bugs:{url:"https://github.com/tdk-landscape/tdk-cli-core/issues"},repository:{type:"git",url:"git+https://github.com/tdk-landscape/tdk-cli-core.git",directory:"cli"},license:"MIT",author:"TDK Team",type:"module",main:"./dist/index.js",types:"./dist/index.d.ts",bin:{tdk:"bin/tdk.js","tdk-cli":"bin/tdk.js"},files:["dist","dist-bundle","bin","templates","README.md","Tiltfile","engine","discovery","specs","ext","!ext/ide-components/code_executor","shared-platform-engineering/docker-templates"],scripts:{build:"tsc && node scripts/bundle.mjs","build:watch":"tsc --watch",lint:"biome check .","lint:fix":"biome check . --write",typecheck:"tsc --project tsconfig.typecheck.json",clean:"rm -rf dist",dev:"bun run build:watch",test:"vitest run","test:watch":"vitest",prepack:"../scripts/stage-npm-engine.sh && npm run build"},dependencies:{commander:"^15.0.0",handlebars:"^4.7.8"},devDependencies:{"@biomejs/biome":"^2.5.13","@types/node":"^22.0.0","@types/react":"^19.3.0",ajv:"^8.17.1",chalk:"^6.0.1",esbuild:"^0.28.2",ink:"^7.1.1",knip:"^6.38.0",react:"^19.3.0","react-devtools-core":"^8.0.0",typescript:"^7.0.2",vite:"^8.3.1",vitest:"^5.0.0"},engines:{node:">=22.12.0"}};function m(e=ao()){let t=Nn(e),n=Nn("/");for(;t!==n;){if(so(io(t,".tdk","project.json")))return t;let r=oo(t);if(r===t)break;t=r}return null}var _e=null;function co(){if(_e)return _e;let e=Dn;if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Invalid package.json: expected object");let t=e;return _e={name:String(t.name??"@tdk-landscape/tdk-cli-core"),version:String(t.version??"0.0.0"),fullPackage:t},_e}function Cn(){return co().version}import{readFileSync as uo}from"node:fs";import{join as lo}from"node:path";function Ae(){let e=m();if(e)try{let t=uo(lo(e,".tdk","project.json"),"utf-8"),n=JSON.parse(t);if(n?.project?.name)return n.project.name}catch{}return"tdk-project"}function ct(e){let t=Ae(),n=process.env.TDK_SERVICE_BASE_URL??`http://${t}.localhost${e?`:${e}`:""}`;try{let r=new URL(n.includes("://")?n:`http://${n}`),s=r.hostname,o=r.port||(e?String(e):"");if(s==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(s))return{appBase:`${r.protocol}//${s}${o?`:${o}`:""}`,apiBase:`${r.protocol}//${s}${o?`:${o}`:""}`};let i=s.replace(/^(app|api)\./,"");return{appBase:`${r.protocol}//app.${i}${o?`:${o}`:""}`,apiBase:`${r.protocol}//api.${i}${o?`:${o}`:""}`}}catch{return{appBase:`http://app.${t}.localhost`,apiBase:`http://api.${t}.localhost`}}}function po(e){return`${e.replace(/\/+$/,"")}/health`}function ut(e){if(P(e.config?.appType)){let t=e.name.replace(/-api$/,"");return e.config?.apiPath??`/api/${t}`}return e.config?.basePath??`/${e.name}`}function jn(e,t){let{appBase:n,apiBase:r}=ct(t);return e.filter(s=>s.config?.appType==="frontend"||P(s.config?.appType)).map(s=>{let o=P(s.config.appType)?r:n;return{name:s.name,appType:s.config.appType,url:`${o}${po(ut(s))}`}})}async function fo(e,t){try{let n=await fetch(e.url,{method:"GET",redirect:"manual",signal:AbortSignal.timeout(t)});return{...e,ok:n.ok,status:n.status}}catch(n){let r=n instanceof Error&&n.name==="TimeoutError"?`no response within ${t}ms`:n instanceof Error?n.message:String(n);return{...e,ok:!1,error:r}}}async function In(e,t){return Promise.all(e.map(n=>fo(n,t)))}import{existsSync as X,readdirSync as ir,readFileSync as ar,statSync as kt}from"node:fs";import{dirname as Zo,join as W}from"node:path";var le=class{data;options;constructor(t){this.data=new Map,this.options=t}has(t){let n=this.data.get(t);return n?Date.now()-n.timestamp>this.options.ttlMs?(this.data.delete(t),!1):!0:!1}get(t){if(this.has(t))return this.data.get(t)?.value}set(t,n){this.data.set(t,{value:n,timestamp:Date.now()})}delete(t){this.data.delete(t)}clear(){this.data.clear()}keys(){let t=[];for(let n of this.data.keys())this.has(n)&&t.push(n);return t}size(){return this.keys().length}};function Fn(e){let t=0;return{isValid(){return Date.now()-t<e},markUpdated(){t=Date.now()},reset(){t=0}}}import{execFileSync as xo,execSync as vo}from"node:child_process";import{existsSync as yo}from"node:fs";import{delimiter as So,extname as bo,join as To}from"node:path";import{delimiter as Hu,extname as mo}from"node:path";function Oe(){return process.platform==="win32"}function ho(e){return e==="linux"?"linux":e==="darwin"?"darwin":e==="win32"?"windows":null}function go(e){return e==="x64"?"amd64":e==="arm64"?"arm64":null}function ko(e,t){let n=ho(e),r=go(t);if(!n||!r||n==="windows"&&r!=="amd64")return null;let s=`tdk-${n}-${r}`;return n==="windows"?`${s}.exe`:s}function Vu(){return ko(process.platform,process.arch)}function Wu(){return Oe()?"tdk.exe":"tdk"}function Mn(e,t=Oe()){return t?mo(e)?[e]:[e,`${e}.exe`,`${e}.cmd`,`${e}.bat`]:[e]}function $(e){let t=process.env.PATH??process.env.Path??"",n=Oe(),r=Mn(e,n);if(n&&!bo(e))for(let s of(process.env.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";")){let o=s.toLowerCase();o&&!r.includes(`${e}${o}`)&&r.push(`${e}${o}`)}for(let s of t.split(So))if(s)for(let o of r){let i=To(s,o);if(yo(i))return i}return null}var Ln=1e4;function Bn(){let e=!1;if(process.platform==="win32")try{return xo($("docker")??"docker",["ps"],{stdio:"ignore",timeout:Ln,windowsHide:!0}),"running"}catch(t){return t.code==="ETIMEDOUT"?"unresponsive":"missing"}for(let t of["docker ps","colima status","podman ps"])try{return vo(t,{stdio:"ignore",timeout:Ln}),"running"}catch(n){n.code==="ETIMEDOUT"&&(e=!0)}return e?"unresponsive":"missing"}function wo(e,t){let n=Array.from({length:t.length+1},(r,s)=>s);for(let r=1;r<=e.length;r++){let s=[r];for(let o=1;o<=t.length;o++){let i=e[r-1]===t[o-1]?0:1;s[o]=Math.min(s[o-1]+1,n[o]+1,n[o-1]+i)}n=s}return n[t.length]}function Po(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length-1;n++)if(e[n]!==t[n]&&e[n]===t[n+1]&&e[n+1]===t[n]&&e.slice(0,n)===t.slice(0,n)&&e.slice(n+2)===t.slice(n+2))return!0;return!1}function Un(e,t){if(e.length<2||t.length===0||t.includes(e))return;let n=e.toLowerCase(),r,s=Number.POSITIVE_INFINITY;for(let o of t){if(o.length===0)continue;let i=o.toLowerCase(),a=Po(n,i)?1:wo(n,i),c=Math.max(1,Math.min(2,Math.floor(Math.max(n.length,i.length)/3)));a>c||(a<s||a===s&&(r===void 0||o<r))&&(r=o,s=a)}return r}import{spawn as $o}from"node:child_process";import{join as Eo}from"node:path";function Ro(e,t=[],n={}){return new Promise((r,s)=>{let o=[e,...t];n.verbose&&console.log(`Executing: tilt ${o.join(" ")}`);let i=$o($("tilt")??"tilt",o,{stdio:n.inheritStdio?"inherit":"pipe",shell:!1,windowsHide:process.platform==="win32",timeout:n.timeoutMs}),a="",c="";n.inheritStdio||(i.stdout?.on("data",u=>{a+=u.toString()}),i.stderr?.on("data",u=>{c+=u.toString()})),i.on("close",u=>{r({exitCode:u??1,stdout:a,stderr:c})}),i.on("error",u=>{s(new Error(`Failed to spawn tilt: ${u.message}`))})})}async function Hn(){try{return(await Ro("version",[],{inheritStdio:!1,timeoutMs:1e4})).exitCode===0}catch{return!1}}function _o(){let e=m();if(!e)throw L.notInProject();return Eo(e,".tdk",".tdk-out","Tiltfile")}function Vn(e){let t=_o();e.push("-f",t)}function od(e,t={}){let n=[];return Vn(n),t.focusTargets&&t.focusTargets.length>0&&n.push("--",`--focus=${t.focusTargets.join(",")}`),n.push(...e),t.verbose&&!t.quiet&&n.push("--verbose"),t.watch&&n.push("--watch"),n}function id(e={}){let t=[];return Vn(t),e.force&&t.push("--force"),e.focusTargets&&e.focusTargets.length>0&&t.push("--",`--focus=${e.focusTargets.join(",")}`),t}function Wn(e){return e instanceof Error?e.message:String(e)}function md(e,t){if(process.env.TDK_VERBOSE){let n=t!==void 0?`: ${Wn(t)}`:"";console.warn(f.gray(`${e}${n}`))}}var E=class extends Error{suggestions;exitCode;constructor(t,n=[],r=1){super(t),this.name="TdkError",this.suggestions=n,this.exitCode=r}display(){Do(this.message,void 0,this.suggestions)}exit(){this.display(),process.exit(this.exitCode)}};function dt(e,t,n=!1){let r=new Set;for(let s of e){let o=Un(s,t);o&&r.add(n?`Did you mean "${o}" for "${s}"?`:`Did you mean "${o}"?`)}return[...r]}var L={tiltNotInstalled:()=>new E("Tilt CLI is not installed",["Install Tilt: `brew install tilt` (macOS)","Or download from: https://docs.tilt.dev/install.html","Verify with: `tilt version`",`Setup guide: ${rt}`]),dockerNotAvailable:()=>new E("Docker (or a compatible container runtime) is not running",["Start Docker Desktop, then verify with: `docker ps`","Or start Colima: `colima start`","Or start the Docker service on Linux: `sudo systemctl start docker`",`Setup guide: ${rt}`]),dockerNotResponding:()=>new E("Docker is running but not responding (`docker ps` hung for 10s)",["Quit and reopen Docker Desktop, or run `colima restart`","Then verify with: `docker ps`"]),stackNotFound:(e,t=[])=>new E(`Stack "${e}" not found`,[...dt([e],t),"Run `tdk stacks` to see available stacks","Run `tdk stack` to assign resources to a stack"]),resourceNotFound:(e,t=[])=>new E(`Resource "${e}" not found`,[...dt([e],t),"Run `tdk resources` to list all resources","Check the resource name spelling"]),unknownServices:(e,t)=>{let n=dt(e,t,e.length>1);return new E(`Unknown service ${e.join(", ")}. Valid names: ${t.join(", ")}`,n,2)},directoryExists:e=>new E(`Directory already exists: ${e}`,["Use `--path` to specify a different location","Remove the existing directory if no longer needed"]),invalidPath:e=>new E(`Invalid path: ${e}`,["Path must be within the project directory",'Path cannot contain special characters like <>:"|?*']),notInProject:()=>new E("Could not find project root (no .tdk/project.json found)",["Run this from within a TDK project","Run `tdk project --yes` to initialize a new project"])};function hd(){let e=m();return e||L.notInProject().exit()}function Ao(e){e instanceof E&&e.exit(),console.error(f.red(`Error: ${Wn(e)}`)),process.exit(1)}async function Oo(e,t){try{return await e()}catch(n){return t?.verbose&&n instanceof Error&&n.stack&&console.error(f.gray(n.stack)),Ao(n)}}async function gd(e,t){let n=[],r=Bn();return r==="unresponsive"?n.push(L.dockerNotResponding()):r==="missing"&&n.push(L.dockerNotAvailable()),await Hn()||n.push(L.tiltNotInstalled()),n.length>0&&(console.error(f.red(`
13
13
  TDK can't start - missing prerequisites:
14
14
  `)),n.forEach((s,o)=>{o>0&&console.error(""),s.display()}),console.error(f.gray("\nRun `tdk doctor` for a full environment check.")),process.exit(1)),Oo(e,t)}function kd(e,t=1){console.error(f.red(`Error: ${e}`)),process.exit(t)}function Do(e,t,n){console.error(f.red(`\u274C ${e}`)),t&&console.error(f.gray(` ${t}`)),n&&n.length>0&&(console.error(f.yellow(`
15
15
  \u{1F4A1} Suggestions:`)),n.forEach(r=>{console.error(f.cyan(` \u2192 ${r}`))}))}function yd(e,t){console.error(f.red(`
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
3
- import{$ as Cg,$a as aD,A as y1,Aa as j1,B as Q1,Ba as z1,C as as,Ca as os,D as S1,Da as yg,E as Fm,Ea as F1,F as fA,Fa as J1,G as YA,Ga as K1,H as Eg,Ha as tB,I as Jm,Ia as Xy,J as v1,Ja as Y1,K as D1,Ka as q1,L as zu,La as V1,M as di,Ma as X1,N as gn,Na as Z1,O as on,Oa as P1,P as Za,Pa as W1,Q as xn,Qa as $1,R as qC,Ra as eD,S as Uo,Sa as nB,T as VC,Ta as aB,U as Jn,Ua as is,V as R1,Va as oB,W as b1,Wa as iB,X as Km,Xa as tD,Y as hg,Ya as Vm,Z as T1,Za as Zy,_ as Ym,_a as nD,a as R,aa as Fu,ab as oD,b as FC,ba as XC,bb as iD,c as KA,ca as ZC,cb as AD,d as Tl,da as Vy,db as AB,e as ns,ea as N1,eb as lD,f as ju,fa as Bg,fb as rD,g as Nl,ga as Zo,gb as Py,h as Ky,ha as Po,hb as Wy,i as Pn,ia as nt,ib as sD,j as wl,ja as w1,jb as cD,k as p1,ka as x1,kb as uD,l as Yy,la as _1,lb as fD,m as m1,ma as U1,n as rc,na as PC,o as vn,oa as Ig,ob as dD,p as ur,pa as M1,pb as gD,q as KC,qa as WC,r as qy,ra as $C,s as YC,sa as O1,t as E1,ta as k1,u as h1,ua as qm,v as C1,va as H1,w as uA,wa as G1,x as zm,xa as eB,y as B1,ya as qA,z as I1,za as L1}from"./chunk-Q6PZ6ZPA.js";import{a as f1,c as JC,d as d1,e as g1}from"./chunk-OBQS5CYC.js";import{a as mg,b as ka,c as Zw,d as st}from"./chunk-6EA4DGCY.js";var e2=ka(yB=>{"use strict";var tM=Symbol.for("react.transitional.element"),nM=Symbol.for("react.fragment");function $R(n,i,l){var s=null;if(l!==void 0&&(s=""+l),i.key!==void 0&&(s=""+i.key),"key"in i){l={};for(var u in i)u!=="key"&&(l[u]=i[u])}else l=i;return i=l.ref,{$$typeof:tM,type:n,key:s,ref:i!==void 0?i:null,props:l}}yB.Fragment=nM;yB.jsx=$R;yB.jsxs=$R});var d2=ka(Dt=>{"use strict";var _Q=Symbol.for("react.transitional.element"),aM=Symbol.for("react.portal"),oM=Symbol.for("react.fragment"),iM=Symbol.for("react.strict_mode"),AM=Symbol.for("react.profiler"),lM=Symbol.for("react.consumer"),rM=Symbol.for("react.context"),sM=Symbol.for("react.forward_ref"),cM=Symbol.for("react.suspense"),uM=Symbol.for("react.memo"),i2=Symbol.for("react.lazy"),fM=Symbol.for("react.activity"),dM=Symbol.for("react.view_transition"),t2=Symbol.iterator;function gM(n){return n===null||typeof n!="object"?null:(n=t2&&n[t2]||n["@@iterator"],typeof n=="function"?n:null)}var A2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},l2=Object.assign,r2={};function xg(n,i,l){this.props=n,this.context=i,this.refs=r2,this.updater=l||A2}xg.prototype.isReactComponent={};xg.prototype.setState=function(n,i){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,i,"setState")};xg.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function s2(){}s2.prototype=xg.prototype;function UQ(n,i,l){this.props=n,this.context=i,this.refs=r2,this.updater=l||A2}var MQ=UQ.prototype=new s2;MQ.constructor=UQ;l2(MQ,xg.prototype);MQ.isPureReactComponent=!0;var n2=Array.isArray;function xQ(){}var Kn={H:null,A:null,T:null,S:null},c2=Object.prototype.hasOwnProperty;function OQ(n,i,l){var s=l.ref;return{$$typeof:_Q,type:n,key:i,ref:s!==void 0?s:null,props:l}}function pM(n,i){return OQ(n.type,i,n.props)}function kQ(n){return typeof n=="object"&&n!==null&&n.$$typeof===_Q}function mM(n){var i={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(l){return i[l]})}var a2=/\/+/g;function wQ(n,i){return typeof n=="object"&&n!==null&&n.key!=null?mM(""+n.key):i.toString(36)}function EM(n){switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:switch(typeof n.status=="string"?n.then(xQ,xQ):(n.status="pending",n.then(function(i){n.status==="pending"&&(n.status="fulfilled",n.value=i)},function(i){n.status==="pending"&&(n.status="rejected",n.reason=i)})),n.status){case"fulfilled":return n.value;case"rejected":throw n.reason}}throw n}function wg(n,i,l,s,u){var p=typeof n;(p==="undefined"||p==="boolean")&&(n=null);var E=!1;if(n===null)E=!0;else switch(p){case"bigint":case"string":case"number":E=!0;break;case"object":switch(n.$$typeof){case _Q:case aM:E=!0;break;case i2:return E=n._init,wg(E(n._payload),i,l,s,u)}}if(E)return u=u(n),E=s===""?"."+wQ(n,0):s,n2(u)?(l="",E!=null&&(l=E.replace(a2,"$&/")+"/"),wg(u,i,l,"",function(S){return S})):u!=null&&(kQ(u)&&(u=pM(u,l+(u.key==null||n&&n.key===u.key?"":(""+u.key).replace(a2,"$&/")+"/")+E)),i.push(u)),1;E=0;var B=s===""?".":s+":";if(n2(n))for(var I=0;I<n.length;I++)s=n[I],p=B+wQ(s,I),E+=wg(s,i,l,p,u);else if(I=gM(n),typeof I=="function")for(n=I.call(n),I=0;!(s=n.next()).done;)s=s.value,p=B+wQ(s,I++),E+=wg(s,i,l,p,u);else if(p==="object"){if(typeof n.then=="function")return wg(EM(n),i,l,s,u);throw i=String(n),Error("Objects are not valid as a React child (found: "+(i==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.")}return E}function QB(n,i,l){if(n==null)return n;var s=[],u=0;return wg(n,s,"","",function(p){return i.call(l,p,u++)}),s}function hM(n){if(n._status===-1){var i=n._result,l=i();l.then(function(s){(n._status===0||n._status===-1)&&(n._status=1,n._result=s,l.status===void 0&&(l.status="fulfilled",l.value=s))},function(s){(n._status===0||n._status===-1)&&(n._status=2,n._result=s,l.status===void 0&&(l.status="rejected",l.reason=s))}),n._status===-1&&(n._status=0,n._result=l)}if(n._status===1)return n._result.default;throw n._result}var o2=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)};function u2(n){var i=Kn.T,l={};l.types=i!==null?i.types:null,Kn.T=l;try{var s=n(),u=Kn.S;u!==null&&u(l,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(xQ,o2)}catch(p){o2(p)}finally{i!==null&&l.types!==null&&(i.types=l.types),Kn.T=i}}function f2(n){var i=Kn.T;if(i!==null){var l=i.types;l===null?i.types=[n]:l.indexOf(n)===-1&&l.push(n)}else u2(f2.bind(null,n))}var CM={map:QB,forEach:function(n,i,l){QB(n,function(){i.apply(this,arguments)},l)},count:function(n){var i=0;return QB(n,function(){i++}),i},toArray:function(n){return QB(n,function(i){return i})||[]},only:function(n){if(!kQ(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};Dt.Activity=fM;Dt.Children=CM;Dt.Component=xg;Dt.Fragment=oM;Dt.Profiler=AM;Dt.PureComponent=UQ;Dt.StrictMode=iM;Dt.Suspense=cM;Dt.ViewTransition=dM;Dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Kn;Dt.__COMPILER_RUNTIME={__proto__:null,c:function(n){return Kn.H.useMemoCache(n)}};Dt.addTransitionType=f2;Dt.cache=function(n){return function(){return n.apply(null,arguments)}};Dt.cacheSignal=function(){return null};Dt.cloneElement=function(n,i,l){if(n==null)throw Error("The argument must be a React element, but you passed "+n+".");var s=l2({},n.props),u=n.key;if(i!=null)for(p in i.key!==void 0&&(u=""+i.key),i)!c2.call(i,p)||p==="key"||p==="__self"||p==="__source"||p==="ref"&&i.ref===void 0||(s[p]=i[p]);var p=arguments.length-2;if(p===1)s.children=l;else if(1<p){for(var E=Array(p),B=0;B<p;B++)E[B]=arguments[B+2];s.children=E}return OQ(n.type,u,s)};Dt.createContext=function(n){return n={$$typeof:rM,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:lM,_context:n},n};Dt.createElement=function(n,i,l){var s,u={},p=null;if(i!=null)for(s in i.key!==void 0&&(p=""+i.key),i)c2.call(i,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(u[s]=i[s]);var E=arguments.length-2;if(E===1)u.children=l;else if(1<E){for(var B=Array(E),I=0;I<E;I++)B[I]=arguments[I+2];u.children=B}if(n&&n.defaultProps)for(s in E=n.defaultProps,E)u[s]===void 0&&(u[s]=E[s]);return OQ(n,p,u)};Dt.createRef=function(){return{current:null}};Dt.forwardRef=function(n){return{$$typeof:sM,render:n}};Dt.isValidElement=kQ;Dt.lazy=function(n){return{$$typeof:i2,_payload:{_status:-1,_result:n},_init:hM}};Dt.memo=function(n,i){return{$$typeof:uM,type:n,compare:i===void 0?null:i}};Dt.startTransition=u2;Dt.unstable_useCacheRefresh=function(){return Kn.H.useCacheRefresh()};Dt.use=function(n){return Kn.H.use(n)};Dt.useActionState=function(n,i,l){return Kn.H.useActionState(n,i,l)};Dt.useCallback=function(n,i){return Kn.H.useCallback(n,i)};Dt.useContext=function(n){return Kn.H.useContext(n)};Dt.useDebugValue=function(){};Dt.useDeferredValue=function(n,i){return Kn.H.useDeferredValue(n,i)};Dt.useEffect=function(n,i){return Kn.H.useEffect(n,i)};Dt.useEffectEvent=function(n){return Kn.H.useEffectEvent(n)};Dt.useId=function(){return Kn.H.useId()};Dt.useImperativeHandle=function(n,i,l){return Kn.H.useImperativeHandle(n,i,l)};Dt.useInsertionEffect=function(n,i){return Kn.H.useInsertionEffect(n,i)};Dt.useLayoutEffect=function(n,i){return Kn.H.useLayoutEffect(n,i)};Dt.useMemo=function(n,i){return Kn.H.useMemo(n,i)};Dt.useOptimistic=function(n,i){return Kn.H.useOptimistic(n,i)};Dt.useReducer=function(n,i,l){return Kn.H.useReducer(n,i,l)};Dt.useRef=function(n){return Kn.H.useRef(n)};Dt.useState=function(n){return Kn.H.useState(n)};Dt.useSyncExternalStore=function(n,i,l){return Kn.H.useSyncExternalStore(n,i,l)};Dt.useTransition=function(){return Kn.H.useTransition()};Dt.version="19.3.0"});var g2=ka((yt,SB)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function n(y,U){Object.defineProperty(s.prototype,y,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",U[0],U[1])}})}function i(y){return y===null||typeof y!="object"?null:(y=Wa&&y[Wa]||y["@@iterator"],typeof y=="function"?y:null)}function l(y,U){y=(y=y.constructor)&&(y.displayName||y.name)||"ReactClass";var ue=y+"."+U;St[ue]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",U,y),St[ue]=!0)}function s(y,U,ue){this.props=y,this.context=U,this.refs=en,this.updater=ue||Ft}function u(){}function p(y,U,ue){this.props=y,this.context=U,this.refs=en,this.updater=ue||Ft}function E(){}function B(y){return""+y}function I(y){try{B(y);var U=!1}catch{U=!0}if(U){U=console;var ue=U.error,re=typeof Symbol=="function"&&Symbol.toStringTag&&y[Symbol.toStringTag]||y.constructor.name||"Object";return ue.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",re),B(y)}}function S(y){if(y==null)return null;if(typeof y=="function")return y.$$typeof===Wn?null:y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case Qt:return"Fragment";case Te:return"Profiler";case J:return"StrictMode";case ct:return"Suspense";case qe:return"SuspenseList";case mn:return"Activity";case Ga:return"ViewTransition"}if(typeof y=="object")switch(typeof y.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),y.$$typeof){case bt:return"Portal";case Pe:return y.displayName||"Context";case Ge:return(y._context.displayName||"Context")+".Consumer";case We:var U=y.render;return y=y.displayName,y||(y=U.displayName||U.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case He:return U=y.displayName||null,U!==null?U:S(y.type)||"Memo";case $e:U=y._payload,y=y._init;try{return S(y(U))}catch{}}return null}function N(y){if(y===Qt)return"<>";if(typeof y=="object"&&y!==null&&y.$$typeof===$e)return"<...>";try{var U=S(y);return U?"<"+U+">":"<...>"}catch{return"<...>"}}function w(){var y=Ve.A;return y===null?null:y.getOwner()}function T(){return Error("react-stack-top-frame")}function x(y){if(Wt.call(y,"key")){var U=Object.getOwnPropertyDescriptor(y,"key").get;if(U&&U.isReactWarning)return!1}return y.key!==void 0}function z(y,U){function ue(){On||(On=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}ue.isReactWarning=!0,Object.defineProperty(y,"key",{get:ue,configurable:!0})}function F(){var y=S(this.type);return Na[y]||(Na[y]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),y=this.props.ref,y!==void 0?y:null}function M(y,U,ue,re,ce,ut){var xe=ue.ref;return y={$$typeof:Me,type:y,key:U,props:ue,_owner:re},(xe!==void 0?xe:null)!==null?Object.defineProperty(y,"ref",{enumerable:!1,get:F}):Object.defineProperty(y,"ref",{enumerable:!1,value:null}),y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(y,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(y,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.defineProperty(y,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ut}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y}function Ae(y,U){return U=M(y.type,U,y.props,y._owner,y._debugStack,y._debugTask),y._store&&(U._store.validated=y._store.validated),U}function he(y){Re(y)?y._store&&(y._store.validated=1):typeof y=="object"&&y!==null&&y.$$typeof===$e&&(y._payload.status==="fulfilled"?Re(y._payload.value)&&y._payload.value._store&&(y._payload.value._store.validated=1):y._store&&(y._store.validated=1))}function Re(y){return typeof y=="object"&&y!==null&&y.$$typeof===Me}function Ie(y){var U={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(ue){return U[ue]})}function je(y,U){return typeof y=="object"&&y!==null&&y.key!=null?(I(y.key),Ie(""+y.key)):U.toString(36)}function Oe(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(E,E):(y.status="pending",y.then(function(U){y.status==="pending"&&(y.status="fulfilled",y.value=U)},function(U){y.status==="pending"&&(y.status="rejected",y.reason=U)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function be(y,U,ue,re,ce){var ut=typeof y;(ut==="undefined"||ut==="boolean")&&(y=null);var xe=!1;if(y===null)xe=!0;else switch(ut){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(y.$$typeof){case Me:case bt:xe=!0;break;case $e:return xe=y._init,be(xe(y._payload),U,ue,re,ce)}}if(xe){xe=y,ce=ce(xe);var Xe=re===""?"."+je(xe,0):re;return fa(ce)?(ue="",Xe!=null&&(ue=Xe.replace(Qo,"$&/")+"/"),be(ce,U,ue,"",function($n){return $n})):ce!=null&&(Re(ce)&&(ce.key!=null&&(xe&&xe.key===ce.key||I(ce.key)),ue=Ae(ce,ue+(ce.key==null||xe&&xe.key===ce.key?"":(""+ce.key).replace(Qo,"$&/")+"/")+Xe),re!==""&&xe!=null&&Re(xe)&&xe.key==null&&xe._store&&!xe._store.validated&&(ue._store.validated=2),ce=ue),U.push(ce)),1}if(xe=0,Xe=re===""?".":re+":",fa(y))for(var _t=0;_t<y.length;_t++)re=y[_t],ut=Xe+je(re,_t),xe+=be(re,U,ue,ut,ce);else if(_t=i(y),typeof _t=="function")for(_t===y.entries&&(qt||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),qt=!0),y=_t.call(y),_t=0;!(re=y.next()).done;)re=re.value,ut=Xe+je(re,_t++),xe+=be(re,U,ue,ut,ce);else if(ut==="object"){if(typeof y.then=="function")return be(Oe(y),U,ue,re,ce);throw U=String(y),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return xe}function ze(y,U,ue){if(y==null)return y;var re=[],ce=0;return be(y,re,"","",function(ut){return U.call(ue,ut,ce++)}),re}function Qe(y){if(y._status===-1){var U=null,ue=null,re=y._ioInfo;re!=null&&(re.start=re.end=performance.now(),re.value=new Promise(function(xe,Xe){U=xe,ue=Xe})),re=y._result;var ce=re();if(ce.then(function(xe){if(y._status===0||y._status===-1){y._status=1,y._result=xe;var Xe=y._ioInfo;if(Xe!=null){Xe.end=performance.now();var _t=xe?.default;U(_t),Xe.value.status="fulfilled",Xe.value.value=_t}ce.status===void 0&&(ce.status="fulfilled",ce.value=xe)}},function(xe){if(y._status===0||y._status===-1){y._status=2,y._result=xe;var Xe=y._ioInfo;Xe!=null&&(Xe.end=performance.now(),Xe.value.then(E,E),ue(xe),Xe.value.status="rejected",Xe.value.reason=xe),ce.status===void 0&&(ce.status="rejected",ce.reason=xe)}}),re=y._ioInfo,re!=null){var ut=ce.displayName;typeof ut=="string"&&(re.name=ut)}y._status===-1&&(y._status=0,y._result=ce)}if(y._status===1)return re=y._result,re===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
3
+ import{$ as Cg,$a as aD,A as y1,Aa as j1,B as Q1,Ba as z1,C as as,Ca as os,D as S1,Da as yg,E as Fm,Ea as F1,F as fA,Fa as J1,G as YA,Ga as K1,H as Eg,Ha as tB,I as Jm,Ia as Xy,J as v1,Ja as Y1,K as D1,Ka as q1,L as zu,La as V1,M as di,Ma as X1,N as gn,Na as Z1,O as on,Oa as P1,P as Za,Pa as W1,Q as xn,Qa as $1,R as qC,Ra as eD,S as Uo,Sa as nB,T as VC,Ta as aB,U as Jn,Ua as is,V as R1,Va as oB,W as b1,Wa as iB,X as Km,Xa as tD,Y as hg,Ya as Vm,Z as T1,Za as Zy,_ as Ym,_a as nD,a as R,aa as Fu,ab as oD,b as FC,ba as XC,bb as iD,c as KA,ca as ZC,cb as AD,d as Tl,da as Vy,db as AB,e as ns,ea as N1,eb as lD,f as ju,fa as Bg,fb as rD,g as Nl,ga as Zo,gb as Py,h as Ky,ha as Po,hb as Wy,i as Pn,ia as nt,ib as sD,j as wl,ja as w1,jb as cD,k as p1,ka as x1,kb as uD,l as Yy,la as _1,lb as fD,m as m1,ma as U1,n as rc,na as PC,o as vn,oa as Ig,ob as dD,p as ur,pa as M1,pb as gD,q as KC,qa as WC,r as qy,ra as $C,s as YC,sa as O1,t as E1,ta as k1,u as h1,ua as qm,v as C1,va as H1,w as uA,wa as G1,x as zm,xa as eB,y as B1,ya as qA,z as I1,za as L1}from"./chunk-7IDEZ54B.js";import{a as f1,c as JC,d as d1,e as g1}from"./chunk-OBQS5CYC.js";import{a as mg,b as ka,c as Zw,d as st}from"./chunk-6EA4DGCY.js";var e2=ka(yB=>{"use strict";var tM=Symbol.for("react.transitional.element"),nM=Symbol.for("react.fragment");function $R(n,i,l){var s=null;if(l!==void 0&&(s=""+l),i.key!==void 0&&(s=""+i.key),"key"in i){l={};for(var u in i)u!=="key"&&(l[u]=i[u])}else l=i;return i=l.ref,{$$typeof:tM,type:n,key:s,ref:i!==void 0?i:null,props:l}}yB.Fragment=nM;yB.jsx=$R;yB.jsxs=$R});var d2=ka(Dt=>{"use strict";var _Q=Symbol.for("react.transitional.element"),aM=Symbol.for("react.portal"),oM=Symbol.for("react.fragment"),iM=Symbol.for("react.strict_mode"),AM=Symbol.for("react.profiler"),lM=Symbol.for("react.consumer"),rM=Symbol.for("react.context"),sM=Symbol.for("react.forward_ref"),cM=Symbol.for("react.suspense"),uM=Symbol.for("react.memo"),i2=Symbol.for("react.lazy"),fM=Symbol.for("react.activity"),dM=Symbol.for("react.view_transition"),t2=Symbol.iterator;function gM(n){return n===null||typeof n!="object"?null:(n=t2&&n[t2]||n["@@iterator"],typeof n=="function"?n:null)}var A2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},l2=Object.assign,r2={};function xg(n,i,l){this.props=n,this.context=i,this.refs=r2,this.updater=l||A2}xg.prototype.isReactComponent={};xg.prototype.setState=function(n,i){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,i,"setState")};xg.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function s2(){}s2.prototype=xg.prototype;function UQ(n,i,l){this.props=n,this.context=i,this.refs=r2,this.updater=l||A2}var MQ=UQ.prototype=new s2;MQ.constructor=UQ;l2(MQ,xg.prototype);MQ.isPureReactComponent=!0;var n2=Array.isArray;function xQ(){}var Kn={H:null,A:null,T:null,S:null},c2=Object.prototype.hasOwnProperty;function OQ(n,i,l){var s=l.ref;return{$$typeof:_Q,type:n,key:i,ref:s!==void 0?s:null,props:l}}function pM(n,i){return OQ(n.type,i,n.props)}function kQ(n){return typeof n=="object"&&n!==null&&n.$$typeof===_Q}function mM(n){var i={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(l){return i[l]})}var a2=/\/+/g;function wQ(n,i){return typeof n=="object"&&n!==null&&n.key!=null?mM(""+n.key):i.toString(36)}function EM(n){switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:switch(typeof n.status=="string"?n.then(xQ,xQ):(n.status="pending",n.then(function(i){n.status==="pending"&&(n.status="fulfilled",n.value=i)},function(i){n.status==="pending"&&(n.status="rejected",n.reason=i)})),n.status){case"fulfilled":return n.value;case"rejected":throw n.reason}}throw n}function wg(n,i,l,s,u){var p=typeof n;(p==="undefined"||p==="boolean")&&(n=null);var E=!1;if(n===null)E=!0;else switch(p){case"bigint":case"string":case"number":E=!0;break;case"object":switch(n.$$typeof){case _Q:case aM:E=!0;break;case i2:return E=n._init,wg(E(n._payload),i,l,s,u)}}if(E)return u=u(n),E=s===""?"."+wQ(n,0):s,n2(u)?(l="",E!=null&&(l=E.replace(a2,"$&/")+"/"),wg(u,i,l,"",function(S){return S})):u!=null&&(kQ(u)&&(u=pM(u,l+(u.key==null||n&&n.key===u.key?"":(""+u.key).replace(a2,"$&/")+"/")+E)),i.push(u)),1;E=0;var B=s===""?".":s+":";if(n2(n))for(var I=0;I<n.length;I++)s=n[I],p=B+wQ(s,I),E+=wg(s,i,l,p,u);else if(I=gM(n),typeof I=="function")for(n=I.call(n),I=0;!(s=n.next()).done;)s=s.value,p=B+wQ(s,I++),E+=wg(s,i,l,p,u);else if(p==="object"){if(typeof n.then=="function")return wg(EM(n),i,l,s,u);throw i=String(n),Error("Objects are not valid as a React child (found: "+(i==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.")}return E}function QB(n,i,l){if(n==null)return n;var s=[],u=0;return wg(n,s,"","",function(p){return i.call(l,p,u++)}),s}function hM(n){if(n._status===-1){var i=n._result,l=i();l.then(function(s){(n._status===0||n._status===-1)&&(n._status=1,n._result=s,l.status===void 0&&(l.status="fulfilled",l.value=s))},function(s){(n._status===0||n._status===-1)&&(n._status=2,n._result=s,l.status===void 0&&(l.status="rejected",l.reason=s))}),n._status===-1&&(n._status=0,n._result=l)}if(n._status===1)return n._result.default;throw n._result}var o2=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)};function u2(n){var i=Kn.T,l={};l.types=i!==null?i.types:null,Kn.T=l;try{var s=n(),u=Kn.S;u!==null&&u(l,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(xQ,o2)}catch(p){o2(p)}finally{i!==null&&l.types!==null&&(i.types=l.types),Kn.T=i}}function f2(n){var i=Kn.T;if(i!==null){var l=i.types;l===null?i.types=[n]:l.indexOf(n)===-1&&l.push(n)}else u2(f2.bind(null,n))}var CM={map:QB,forEach:function(n,i,l){QB(n,function(){i.apply(this,arguments)},l)},count:function(n){var i=0;return QB(n,function(){i++}),i},toArray:function(n){return QB(n,function(i){return i})||[]},only:function(n){if(!kQ(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};Dt.Activity=fM;Dt.Children=CM;Dt.Component=xg;Dt.Fragment=oM;Dt.Profiler=AM;Dt.PureComponent=UQ;Dt.StrictMode=iM;Dt.Suspense=cM;Dt.ViewTransition=dM;Dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Kn;Dt.__COMPILER_RUNTIME={__proto__:null,c:function(n){return Kn.H.useMemoCache(n)}};Dt.addTransitionType=f2;Dt.cache=function(n){return function(){return n.apply(null,arguments)}};Dt.cacheSignal=function(){return null};Dt.cloneElement=function(n,i,l){if(n==null)throw Error("The argument must be a React element, but you passed "+n+".");var s=l2({},n.props),u=n.key;if(i!=null)for(p in i.key!==void 0&&(u=""+i.key),i)!c2.call(i,p)||p==="key"||p==="__self"||p==="__source"||p==="ref"&&i.ref===void 0||(s[p]=i[p]);var p=arguments.length-2;if(p===1)s.children=l;else if(1<p){for(var E=Array(p),B=0;B<p;B++)E[B]=arguments[B+2];s.children=E}return OQ(n.type,u,s)};Dt.createContext=function(n){return n={$$typeof:rM,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:lM,_context:n},n};Dt.createElement=function(n,i,l){var s,u={},p=null;if(i!=null)for(s in i.key!==void 0&&(p=""+i.key),i)c2.call(i,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(u[s]=i[s]);var E=arguments.length-2;if(E===1)u.children=l;else if(1<E){for(var B=Array(E),I=0;I<E;I++)B[I]=arguments[I+2];u.children=B}if(n&&n.defaultProps)for(s in E=n.defaultProps,E)u[s]===void 0&&(u[s]=E[s]);return OQ(n,p,u)};Dt.createRef=function(){return{current:null}};Dt.forwardRef=function(n){return{$$typeof:sM,render:n}};Dt.isValidElement=kQ;Dt.lazy=function(n){return{$$typeof:i2,_payload:{_status:-1,_result:n},_init:hM}};Dt.memo=function(n,i){return{$$typeof:uM,type:n,compare:i===void 0?null:i}};Dt.startTransition=u2;Dt.unstable_useCacheRefresh=function(){return Kn.H.useCacheRefresh()};Dt.use=function(n){return Kn.H.use(n)};Dt.useActionState=function(n,i,l){return Kn.H.useActionState(n,i,l)};Dt.useCallback=function(n,i){return Kn.H.useCallback(n,i)};Dt.useContext=function(n){return Kn.H.useContext(n)};Dt.useDebugValue=function(){};Dt.useDeferredValue=function(n,i){return Kn.H.useDeferredValue(n,i)};Dt.useEffect=function(n,i){return Kn.H.useEffect(n,i)};Dt.useEffectEvent=function(n){return Kn.H.useEffectEvent(n)};Dt.useId=function(){return Kn.H.useId()};Dt.useImperativeHandle=function(n,i,l){return Kn.H.useImperativeHandle(n,i,l)};Dt.useInsertionEffect=function(n,i){return Kn.H.useInsertionEffect(n,i)};Dt.useLayoutEffect=function(n,i){return Kn.H.useLayoutEffect(n,i)};Dt.useMemo=function(n,i){return Kn.H.useMemo(n,i)};Dt.useOptimistic=function(n,i){return Kn.H.useOptimistic(n,i)};Dt.useReducer=function(n,i,l){return Kn.H.useReducer(n,i,l)};Dt.useRef=function(n){return Kn.H.useRef(n)};Dt.useState=function(n){return Kn.H.useState(n)};Dt.useSyncExternalStore=function(n,i,l){return Kn.H.useSyncExternalStore(n,i,l)};Dt.useTransition=function(){return Kn.H.useTransition()};Dt.version="19.3.0"});var g2=ka((yt,SB)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function n(y,U){Object.defineProperty(s.prototype,y,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",U[0],U[1])}})}function i(y){return y===null||typeof y!="object"?null:(y=Wa&&y[Wa]||y["@@iterator"],typeof y=="function"?y:null)}function l(y,U){y=(y=y.constructor)&&(y.displayName||y.name)||"ReactClass";var ue=y+"."+U;St[ue]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",U,y),St[ue]=!0)}function s(y,U,ue){this.props=y,this.context=U,this.refs=en,this.updater=ue||Ft}function u(){}function p(y,U,ue){this.props=y,this.context=U,this.refs=en,this.updater=ue||Ft}function E(){}function B(y){return""+y}function I(y){try{B(y);var U=!1}catch{U=!0}if(U){U=console;var ue=U.error,re=typeof Symbol=="function"&&Symbol.toStringTag&&y[Symbol.toStringTag]||y.constructor.name||"Object";return ue.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",re),B(y)}}function S(y){if(y==null)return null;if(typeof y=="function")return y.$$typeof===Wn?null:y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case Qt:return"Fragment";case Te:return"Profiler";case J:return"StrictMode";case ct:return"Suspense";case qe:return"SuspenseList";case mn:return"Activity";case Ga:return"ViewTransition"}if(typeof y=="object")switch(typeof y.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),y.$$typeof){case bt:return"Portal";case Pe:return y.displayName||"Context";case Ge:return(y._context.displayName||"Context")+".Consumer";case We:var U=y.render;return y=y.displayName,y||(y=U.displayName||U.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case He:return U=y.displayName||null,U!==null?U:S(y.type)||"Memo";case $e:U=y._payload,y=y._init;try{return S(y(U))}catch{}}return null}function N(y){if(y===Qt)return"<>";if(typeof y=="object"&&y!==null&&y.$$typeof===$e)return"<...>";try{var U=S(y);return U?"<"+U+">":"<...>"}catch{return"<...>"}}function w(){var y=Ve.A;return y===null?null:y.getOwner()}function T(){return Error("react-stack-top-frame")}function x(y){if(Wt.call(y,"key")){var U=Object.getOwnPropertyDescriptor(y,"key").get;if(U&&U.isReactWarning)return!1}return y.key!==void 0}function z(y,U){function ue(){On||(On=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}ue.isReactWarning=!0,Object.defineProperty(y,"key",{get:ue,configurable:!0})}function F(){var y=S(this.type);return Na[y]||(Na[y]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),y=this.props.ref,y!==void 0?y:null}function M(y,U,ue,re,ce,ut){var xe=ue.ref;return y={$$typeof:Me,type:y,key:U,props:ue,_owner:re},(xe!==void 0?xe:null)!==null?Object.defineProperty(y,"ref",{enumerable:!1,get:F}):Object.defineProperty(y,"ref",{enumerable:!1,value:null}),y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(y,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(y,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.defineProperty(y,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ut}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y}function Ae(y,U){return U=M(y.type,U,y.props,y._owner,y._debugStack,y._debugTask),y._store&&(U._store.validated=y._store.validated),U}function he(y){Re(y)?y._store&&(y._store.validated=1):typeof y=="object"&&y!==null&&y.$$typeof===$e&&(y._payload.status==="fulfilled"?Re(y._payload.value)&&y._payload.value._store&&(y._payload.value._store.validated=1):y._store&&(y._store.validated=1))}function Re(y){return typeof y=="object"&&y!==null&&y.$$typeof===Me}function Ie(y){var U={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(ue){return U[ue]})}function je(y,U){return typeof y=="object"&&y!==null&&y.key!=null?(I(y.key),Ie(""+y.key)):U.toString(36)}function Oe(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(E,E):(y.status="pending",y.then(function(U){y.status==="pending"&&(y.status="fulfilled",y.value=U)},function(U){y.status==="pending"&&(y.status="rejected",y.reason=U)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function be(y,U,ue,re,ce){var ut=typeof y;(ut==="undefined"||ut==="boolean")&&(y=null);var xe=!1;if(y===null)xe=!0;else switch(ut){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(y.$$typeof){case Me:case bt:xe=!0;break;case $e:return xe=y._init,be(xe(y._payload),U,ue,re,ce)}}if(xe){xe=y,ce=ce(xe);var Xe=re===""?"."+je(xe,0):re;return fa(ce)?(ue="",Xe!=null&&(ue=Xe.replace(Qo,"$&/")+"/"),be(ce,U,ue,"",function($n){return $n})):ce!=null&&(Re(ce)&&(ce.key!=null&&(xe&&xe.key===ce.key||I(ce.key)),ue=Ae(ce,ue+(ce.key==null||xe&&xe.key===ce.key?"":(""+ce.key).replace(Qo,"$&/")+"/")+Xe),re!==""&&xe!=null&&Re(xe)&&xe.key==null&&xe._store&&!xe._store.validated&&(ue._store.validated=2),ce=ue),U.push(ce)),1}if(xe=0,Xe=re===""?".":re+":",fa(y))for(var _t=0;_t<y.length;_t++)re=y[_t],ut=Xe+je(re,_t),xe+=be(re,U,ue,ut,ce);else if(_t=i(y),typeof _t=="function")for(_t===y.entries&&(qt||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),qt=!0),y=_t.call(y),_t=0;!(re=y.next()).done;)re=re.value,ut=Xe+je(re,_t++),xe+=be(re,U,ue,ut,ce);else if(ut==="object"){if(typeof y.then=="function")return be(Oe(y),U,ue,re,ce);throw U=String(y),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return xe}function ze(y,U,ue){if(y==null)return y;var re=[],ce=0;return be(y,re,"","",function(ut){return U.call(ue,ut,ce++)}),re}function Qe(y){if(y._status===-1){var U=null,ue=null,re=y._ioInfo;re!=null&&(re.start=re.end=performance.now(),re.value=new Promise(function(xe,Xe){U=xe,ue=Xe})),re=y._result;var ce=re();if(ce.then(function(xe){if(y._status===0||y._status===-1){y._status=1,y._result=xe;var Xe=y._ioInfo;if(Xe!=null){Xe.end=performance.now();var _t=xe?.default;U(_t),Xe.value.status="fulfilled",Xe.value.value=_t}ce.status===void 0&&(ce.status="fulfilled",ce.value=xe)}},function(xe){if(y._status===0||y._status===-1){y._status=2,y._result=xe;var Xe=y._ioInfo;Xe!=null&&(Xe.end=performance.now(),Xe.value.then(E,E),ue(xe),Xe.value.status="rejected",Xe.value.reason=xe),ce.status===void 0&&(ce.status="rejected",ce.reason=xe)}}),re=y._ioInfo,re!=null){var ut=ce.displayName;typeof ut=="string"&&(re.name=ut)}y._status===-1&&(y._status=0,y._result=ce)}if(y._status===1)return re=y._result,re===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
4
4
 
5
5
  Your code should look like:
6
6
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -607,7 +607,7 @@ Available templates:`));for(let[p,E]of Object.entries(EB))console.log(` ${R.cya
607
607
  `,0),nt(`Source: ${l.bundledPath?"bundled TDK example":l.repo}`,0),nt(`Destination: ${u}
608
608
  `,0);try{if(l.bundledPath){let p=hB(cU(uU(new URL("../dist/commands/project.js",import.meta.url).href)),"../../../");AU(hB(p,l.bundledPath),u,{recursive:!0});let E=sU(u).replace(/-/g,"_");for(let B of["services/platform/messaging/docker-compose.yml","services/shop/orders-api/service.json","services/shop/orders-api/src/index.ts","services/shop/orders-worker/service.json","services/shop/orders-worker/src/index.ts"]){let I=Ng(u,B),S=mQ(I,"utf-8");rU(I,S.replaceAll("tdk_example",E))}}else iU("git",["clone",l.repo,u],{stdio:"inherit"})}catch{Uo(l.bundledPath?"Bundled example copy failed. Reinstall the TDK CLI package and try again.":"git clone failed. Check you have git installed and network access.")}console.log(R.green(`
609
609
  \u2705 Cloned "${n}" into ${s}/`)),nt(`
610
- Next steps:`,0),nt(`1. cd ${s}`),nt("2. tdk doctor # check Docker/Tilt are ready"),nt("3. tdk up # start the stack")}var tE={version:"1.0",project:{name:"",version:"1.0.0"},phases:{pre_alpha:{name:"Pre-Alpha",description:"Core infrastructure and MVP services",enabledStacks:gU()},alpha:{name:"Alpha",description:"Essential business services",enabledStacks:[]},beta:{name:"Beta",description:"Extended features",enabledStacks:[]},out_of_scope:{name:"Out of Scope",description:"Future releases",enabledStacks:[]}},optional_infra:{monitoring:!1,elk:!1,debezium:!1,golden_image:!0,verdaccio:!1},discovery:{paths:["services/*/*"]},overrides:{}},gR=new fU("project").description("Initialize or validate project-level master configuration").argument("[template]",`Clone a starter example instead of a blank project (${Object.keys(EB).join(", ")})`).option("--path <dir>","Directory to clone the template into (default: the template's repo name)").option("--check","Check if master configs exist and are in sync").option("--force","Overwrite existing configuration (dangerous)").option("--yes","Non-interactive mode (use defaults)").option("--config-file <path>","Load project config from existing JSON file").action(async(n,i)=>{let{assertMachineReadyOrExit:l}=await import("./cold-preflight-6VMSECY4.js");if(await l(),n){await xn(async()=>pU(n,i.path));return}await xn(async()=>{let s=vn();s||(s=fR(),Po(`\u{1F680} Initializing new TDK project...
610
+ Next steps:`,0),nt(`1. cd ${s}`),nt("2. tdk doctor # check Docker/Tilt are ready"),nt("3. tdk up # start the stack")}var tE={version:"1.0",project:{name:"",version:"1.0.0"},phases:{pre_alpha:{name:"Pre-Alpha",description:"Core infrastructure and MVP services",enabledStacks:gU()},alpha:{name:"Alpha",description:"Essential business services",enabledStacks:[]},beta:{name:"Beta",description:"Extended features",enabledStacks:[]},out_of_scope:{name:"Out of Scope",description:"Future releases",enabledStacks:[]}},optional_infra:{monitoring:!1,elk:!1,debezium:!1,golden_image:!0,verdaccio:!1},discovery:{paths:["services/*/*"]},overrides:{}},gR=new fU("project").description("Initialize or validate project-level master configuration").argument("[template]",`Clone a starter example instead of a blank project (${Object.keys(EB).join(", ")})`).option("--path <dir>","Directory to clone the template into (default: the template's repo name)").option("--check","Check if master configs exist and are in sync").option("--force","Overwrite existing configuration (dangerous)").option("--yes","Non-interactive mode (use defaults)").option("--config-file <path>","Load project config from existing JSON file").action(async(n,i)=>{let{assertMachineReadyOrExit:l}=await import("./cold-preflight-LV5MPGEA.js");if(await l(),n){await xn(async()=>pU(n,i.path));return}await xn(async()=>{let s=vn();s||(s=fR(),Po(`\u{1F680} Initializing new TDK project...
611
611
  `),nt(`Location: ${s}
612
612
  `,0));let u=Ng(s,".tdk"),p=Ng(u,"project.json");if(i.check){let x=Nl.every(F=>sc(Ng(s,".tdk",".tdk-out",F))),z=sc(p);if(x&&z){let F=Hi(s);Zo("Project configuration is valid"),nt(`Project: ${F.project.name}`,3),nt(`Phases: ${Object.keys(F.phases).join(", ")}`,3),process.exit(0)}else{if(console.log(R.yellow("\u26A0\uFE0F Project configuration incomplete:")),z||nt(".tdk/project.json (not found)",3),!x)for(let F of Nl.filter(M=>!sc(Ng(s,".tdk/.tdk-out",M))))nt(`.tdk/.tdk-out/${F} (not found)`,3);nt("Run `tdk project` to create them."),process.exit(1)}}Fu("Project Configuration"),nt(`Project root: ${s}
613
613
  `,0),sc(u)||(CD(u),Zo("Created: .tdk/ directory"));let E=sc(p);if(E&&!i.force){Zo(".tdk/project.json exists");let x=JSON.parse(mQ(p,"utf-8")),z=Hi(s),F=EQ(s),M=hQ(z,F);if((M.length>0||!x.phases)&&As(p,z),M.length>0&&nt(`Auto-enabled discovered service stacks: ${M.join(", ")}`,0),Po(`
@@ -1044,7 +1044,7 @@ render(() => <App />, document.getElementById('app')!);
1044
1044
  }
1045
1045
 
1046
1046
  export default App;
1047
- `,description:"Generating Solid app",emoji:"\u{1F4BB}"}]}};var NR={id:"svelte",label:"Svelte + Vite",dependencies:{svelte:"^5.0.0"},devDependencies:{"@sveltejs/vite-plugin-svelte":"^4.0.4"},compilerOptions:{},createFiles(n){return[{filename:"index.html",content:`<!DOCTYPE html>
1047
+ `,description:"Generating Solid app",emoji:"\u{1F4BB}"}]}};var NR={id:"svelte",label:"Svelte + Vite",dependencies:{svelte:"^5.0.0"},devDependencies:{"@sveltejs/vite-plugin-svelte":"^5.0.0"},compilerOptions:{},createFiles(n){return[{filename:"index.html",content:`<!DOCTYPE html>
1048
1048
  <html lang="en">
1049
1049
  <head>
1050
1050
  <meta charset="UTF-8" />
@@ -1300,7 +1300,7 @@ describe('${n}', () => {
1300
1300
  expect(true).toBe(true);
1301
1301
  });
1302
1302
  });
1303
- `}var NU={"api-client":{name:"api-client",description:"Pre-configured API client for backend communication (createApiClient wrapper)",applies_to:["frontend"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/frontend.star",output_file:".autogenerated/api-client.ts"},"env-config":{name:"env-config",description:"Environment constants and configuration (Vite env vars)",applies_to:["frontend"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/frontend.star",output_file:".autogenerated/env.ts"},"api-index":{name:"api-index",description:"Barrel export for clean API client imports",applies_to:["frontend"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/frontend.star",output_file:".autogenerated/api-index.ts"},prisma:{name:"prisma",description:"Prisma CLI configuration for migrations and database client generation",applies_to:["backend","worker","migrator"],enabled_by_default:!1,generator_file:"engine/topologies/tilt/generators/typescript/prisma_config.star",output_file:".autogenerated/prisma.config.autogenerated.ts"},vite:{name:"vite",description:"Vite configuration for frontend/backend/SDK builds",applies_to:["frontend","backend","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/vite_config.star",output_file:".autogenerated/vite.config.*.ts"},tsconfig:{name:"tsconfig",description:"TypeScript configuration (local and Docker variants)",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/typescript/",output_file:".autogenerated/tsconfig.*.json"},dockerfile:{name:"dockerfile",description:"Docker container configuration for production builds",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star",output_file:".autogenerated/Dockerfile.app"},npmrc:{name:"npmrc",description:"NPM registry configuration for package installation",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/npmrc.star",output_file:".autogenerated/.npmrc*"},bunfig:{name:"bunfig",description:"Bun runtime configuration for package management",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/npmrc.star",output_file:".autogenerated/bunfig.toml*"},nginx:{name:"nginx",description:"Nginx configuration for static file serving (frontend only)",applies_to:["frontend"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/nginx_conf.star",output_file:".autogenerated/nginx.conf"},env:{name:"env",description:"Backend environment file configuration",applies_to:["backend","worker","migrator"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/env.star",output_file:".autogenerated/.env*"},playwright:{name:"playwright",description:"Playwright test configuration (if playwright: true in manifest)",applies_to:["frontend","backend"],enabled_by_default:!1,generator_file:"engine/topologies/tilt/generators/typescript/playwright_config.star",output_file:".autogenerated/playwright.config.ts"},"agents-md":{name:"agents-md",description:"AI agent guard rails for .autogenerated/ folder (paid TDK feature - free tier writes a stub notice; see extension-fetch.ts KNOWN_RESOURCES)",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/agents_md.star",output_file:".autogenerated/AGENTS.md"},ddd:{name:"ddd",description:"Domain-driven design folder structure (domain/application/infrastructure/presentation) and matching @domain/@application/@infrastructure/@presentation/@test path aliases (Premium - requires TDK_LICENSE_KEY; see hasDddLicense() in extension-fetch.ts)",applies_to:["backend","worker","migrator"],enabled_by_default:!1,category:"premium",generator_file:"engine/topologies/tilt/generators/vite/helpers.star, engine/topologies/tilt/generators/typescript/backend_tsconfig.star",output_file:".autogenerated/vite.config.*.ts, .autogenerated/tsconfig.*.json"},sablier:{name:"sablier",description:"On-demand scaling: stop this resource when idle, wake it on the next request via a `sablier: {enable: true}` manifest block (not the featuresEnabled array). Add `deferStart: true` to also skip this resource during `tdk up` entirely \u2014 no container is created or started, and a Traefik static route wakes it on the first request instead (backends only for now), so it doesn't wait behind the rest of a large landscape's bring-up. Requires `enable: true`. (Premium - requires TDK_LICENSE_KEY; free tier writes a disabled stub; see hasSablierLicense() in extension-fetch.ts KNOWN_RESOURCES/PREMIUM_PATH_MAP)",applies_to:["backend","frontend"],enabled_by_default:!1,category:"premium",generator_file:"engine/topologies/platform/docker/networking/sablier_container_cycle.star (stub; real generator in tdk-cli-extensions/premium/networking/), engine/topologies/platform/docker/networking/traefik.star, engine/topologies/platform/docker/compose/traefik_standalone.star (deferStart wake gateway + static route), engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star (deferred image prebuild + wake route wiring)",output_file:"(Traefik + Sablier Docker labels on the resource's own compose service; with deferStart, also a generated Traefik file-provider dynamic-config entry, wake gateway, and image prebuild resource)"}};function UR(n){if(n===KA)return[];let i=[];for(let[l,s]of Object.entries(NU))s.enabled_by_default&&s.applies_to.includes(n)&&["api-client","env-config","api-index","prisma"].includes(l)&&i.push(l);return i}var zR={port:0,dependsOn:[],build:{dockerfile:"Dockerfile",context:"."},dev:{command:"bun run dev",watch:["src/**/*"]}},xU={backend:{healthCheckPath:"/health"},frontend:{dev:{command:"bun run dev",watch:["src/**/*","public/**/*"]}},worker:{dev:{command:"bun run worker",watch:["src/**/*"]}},mcp:{healthCheckPath:"/health"},[KA]:{healthCheckPath:"/health"}},OR=["no","on-failure","unless-stopped","always"];function _U(n,i,l,s){if(!i)return l;let{min:u,max:p}=Pn[n],E=n===KA?"BYO --port":"--port",B=n===KA?"BYO port":"Port";if(!/^\d+$/.test(i))throw new gn(`${E} must be an integer from ${u} through ${p}.`);let I=Number(i);if(!Number.isInteger(I)||I<u||I>p)throw new gn(`${E} must be an integer from ${u} through ${p}.`);if(s.some(S=>S.config?.port===I))throw new gn(`${B} ${I} is already assigned to another resource.`);return I}function UU(n,i,l,s,u=[],p,E){let B=oE(i,p),I=E===void 0?void 0:Xy(i,E),S=nE(i,p,I),N=xU[i],w=JSON.parse(JSON.stringify(zR));for(let[T,x]of Object.entries(N))typeof x=="object"&&x!==null&&!Array.isArray(x)?w[T]={...w[T],...x}:w[T]=x;return I?.devCommand&&(w.dev={command:I.devCommand,watch:I.watch??w.dev.watch},delete w.build),{...w,$schema:zm,schemaVersion:uA,appName:n,appType:i,featuresEnabled:[...UR(i).filter(T=>!(I?.createFiles&&T==="prisma")),...u],name:n,type:i,stack:l,port:s,...B?{framework:B.id}:{},...S&&i!=="mcp"?{framework:S.id}:{},...I?{language:I.id}:{}}}function MU(n,i,l,s){return{$schema:zm,schemaVersion:uA,appName:n,appType:KA,stack:i,port:l,healthCheckPath:s.healthCheckPath,...s.image?{image:s.image}:{dockerfile:s.dockerfile},...s.exposeViaProxy===!1?{exposeViaProxy:!1}:{},...s.restart?{restart:s.restart}:{}}}function kR(n){let i=`${n} does not exist yet. TDK engine writes it when tdk up loads this resource (needs Docker); tdk resource and tdk config regenerate do not create it. Run tdk up <stack> once, or point this script at your own Vite config to build on the host.`;return`bun -e 'if(!require("fs").existsSync(${JSON.stringify(n)})){console.error(${JSON.stringify(i)});process.exit(1)}'`}function HR(n,i,l,s=!1){let u=i==="frontend",p=oE(i,l),E=nE(i,l);return{name:`@project/${n}`,version:"0.0.1",type:"module",scripts:{...u?{predev:kR(".autogenerated/vite.config.frontend.autogenerated.ts"),prebuild:kR(".autogenerated/vite.config.build.autogenerated.ts")}:{},dev:u?"vite --config .autogenerated/vite.config.frontend.autogenerated.ts":"bun run --watch src/index.ts",build:u?"tsc && vite build --config .autogenerated/vite.config.build.autogenerated.ts":"tsc",...u?{}:{start:"bun run dist/index.js"},test:"vitest",lint:"biome check .","lint:fix":"biome check . --write"},dependencies:{...u?{}:E?.dependencies??{hono:"^4.0.0"},...p?.dependencies??{},...s?{prisma:"^7.5.0","@prisma/client":"^7.5.0","@prisma/adapter-pg":"^7.5.0",pg:"^8.13.0"}:{}},devDependencies:{"@types/bun":"^1.4.2","@types/node":"^20.0.0",typescript:"^7.0.2",vitest:"^5.0.0","@biomejs/biome":"^2.5.13",...u?{vite:"^5.0.0"}:{},...p?.devDependencies??{},...E?.devDependencies??{}}}}var GR=`generator client {
1303
+ `}var NU={"api-client":{name:"api-client",description:"Pre-configured API client for backend communication (createApiClient wrapper)",applies_to:["frontend"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/frontend.star",output_file:".autogenerated/api-client.ts"},"env-config":{name:"env-config",description:"Environment constants and configuration (Vite env vars)",applies_to:["frontend"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/frontend.star",output_file:".autogenerated/env.ts"},"api-index":{name:"api-index",description:"Barrel export for clean API client imports",applies_to:["frontend"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/frontend.star",output_file:".autogenerated/api-index.ts"},prisma:{name:"prisma",description:"Prisma CLI configuration for migrations and database client generation",applies_to:["backend","worker","migrator"],enabled_by_default:!1,generator_file:"engine/topologies/tilt/generators/typescript/prisma_config.star",output_file:".autogenerated/prisma.config.autogenerated.ts"},vite:{name:"vite",description:"Vite configuration for frontend/backend/SDK builds",applies_to:["frontend","backend","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/vite_config.star",output_file:".autogenerated/vite.config.*.ts"},tsconfig:{name:"tsconfig",description:"TypeScript configuration (local and Docker variants)",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/typescript/",output_file:".autogenerated/tsconfig.*.json"},dockerfile:{name:"dockerfile",description:"Docker container configuration for production builds",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star",output_file:".autogenerated/Dockerfile.app"},npmrc:{name:"npmrc",description:"NPM registry configuration for package installation",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/npmrc.star",output_file:".autogenerated/.npmrc*"},bunfig:{name:"bunfig",description:"Bun runtime configuration for package management",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/npmrc.star",output_file:".autogenerated/bunfig.toml*"},nginx:{name:"nginx",description:"Nginx configuration for static file serving (frontend only)",applies_to:["frontend"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/nginx_conf.star",output_file:".autogenerated/nginx.conf"},env:{name:"env",description:"Backend environment file configuration",applies_to:["backend","worker","migrator"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/resources/orchestrator/generators/env.star",output_file:".autogenerated/.env*"},playwright:{name:"playwright",description:"Playwright test configuration (if playwright: true in manifest)",applies_to:["frontend","backend"],enabled_by_default:!1,generator_file:"engine/topologies/tilt/generators/typescript/playwright_config.star",output_file:".autogenerated/playwright.config.ts"},"agents-md":{name:"agents-md",description:"AI agent guard rails for .autogenerated/ folder (paid TDK feature - free tier writes a stub notice; see extension-fetch.ts KNOWN_RESOURCES)",applies_to:["frontend","backend","worker","migrator","sdk"],enabled_by_default:!0,generator_file:"engine/topologies/tilt/generators/agents_md.star",output_file:".autogenerated/AGENTS.md"},ddd:{name:"ddd",description:"Domain-driven design folder structure (domain/application/infrastructure/presentation) and matching @domain/@application/@infrastructure/@presentation/@test path aliases (Premium - requires TDK_LICENSE_KEY; see hasDddLicense() in extension-fetch.ts)",applies_to:["backend","worker","migrator"],enabled_by_default:!1,category:"premium",generator_file:"engine/topologies/tilt/generators/vite/helpers.star, engine/topologies/tilt/generators/typescript/backend_tsconfig.star",output_file:".autogenerated/vite.config.*.ts, .autogenerated/tsconfig.*.json"},sablier:{name:"sablier",description:"On-demand scaling: stop this resource when idle, wake it on the next request via a `sablier: {enable: true}` manifest block (not the featuresEnabled array). Add `deferStart: true` to also skip this resource during `tdk up` entirely \u2014 no container is created or started, and a Traefik static route wakes it on the first request instead (backends only for now), so it doesn't wait behind the rest of a large landscape's bring-up. Requires `enable: true`. (Premium - requires TDK_LICENSE_KEY; free tier writes a disabled stub; see hasSablierLicense() in extension-fetch.ts KNOWN_RESOURCES/PREMIUM_PATH_MAP)",applies_to:["backend","frontend"],enabled_by_default:!1,category:"premium",generator_file:"engine/topologies/platform/docker/networking/sablier_container_cycle.star (stub; real generator in tdk-cli-extensions/premium/networking/), engine/topologies/platform/docker/networking/traefik.star, engine/topologies/platform/docker/compose/traefik_standalone.star (deferStart wake gateway + static route), engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star (deferred image prebuild + wake route wiring)",output_file:"(Traefik + Sablier Docker labels on the resource's own compose service; with deferStart, also a generated Traefik file-provider dynamic-config entry, wake gateway, and image prebuild resource)"}};function UR(n){if(n===KA)return[];let i=[];for(let[l,s]of Object.entries(NU))s.enabled_by_default&&s.applies_to.includes(n)&&["api-client","env-config","api-index","prisma"].includes(l)&&i.push(l);return i}var zR={port:0,dependsOn:[],build:{dockerfile:"Dockerfile",context:"."},dev:{command:"bun run dev",watch:["src/**/*"]}},xU={backend:{healthCheckPath:"/health"},frontend:{dev:{command:"bun run dev",watch:["src/**/*","public/**/*"]}},worker:{dev:{command:"bun run worker",watch:["src/**/*"]}},mcp:{healthCheckPath:"/health"},[KA]:{healthCheckPath:"/health"}},OR=["no","on-failure","unless-stopped","always"];function _U(n,i,l,s){if(!i)return l;let{min:u,max:p}=Pn[n],E=n===KA?"BYO --port":"--port",B=n===KA?"BYO port":"Port";if(!/^\d+$/.test(i))throw new gn(`${E} must be an integer from ${u} through ${p}.`);let I=Number(i);if(!Number.isInteger(I)||I<u||I>p)throw new gn(`${E} must be an integer from ${u} through ${p}.`);if(s.some(S=>S.config?.port===I))throw new gn(`${B} ${I} is already assigned to another resource.`);return I}function UU(n,i,l,s,u=[],p,E){let B=oE(i,p),I=E===void 0?void 0:Xy(i,E),S=nE(i,p,I),N=xU[i],w=JSON.parse(JSON.stringify(zR));for(let[T,x]of Object.entries(N))typeof x=="object"&&x!==null&&!Array.isArray(x)?w[T]={...w[T],...x}:w[T]=x;return I?.devCommand&&(w.dev={command:I.devCommand,watch:I.watch??w.dev.watch},delete w.build),{...w,$schema:zm,schemaVersion:uA,appName:n,appType:i,featuresEnabled:[...UR(i).filter(T=>!(I?.createFiles&&T==="prisma")),...u],name:n,type:i,stack:l,port:s,...B?{framework:B.id}:{},...S&&i!=="mcp"?{framework:S.id}:{},...I?{language:I.id}:{}}}function MU(n,i,l,s){return{$schema:zm,schemaVersion:uA,appName:n,appType:KA,stack:i,port:l,healthCheckPath:s.healthCheckPath,...s.image?{image:s.image}:{dockerfile:s.dockerfile},...s.exposeViaProxy===!1?{exposeViaProxy:!1}:{},...s.restart?{restart:s.restart}:{}}}function kR(n){let i=`${n} does not exist yet. TDK engine writes it when tdk up loads this resource (needs Docker); tdk resource and tdk config regenerate do not create it. Run tdk up <stack> once, or point this script at your own Vite config to build on the host.`;return`bun -e 'if(!require("fs").existsSync(${JSON.stringify(n)})){console.error(${JSON.stringify(i)});process.exit(1)}'`}function HR(n,i,l,s=!1){let u=i==="frontend",p=oE(i,l),E=nE(i,l);return{name:`@project/${n}`,version:"0.0.1",type:"module",scripts:{...u?{predev:kR(".autogenerated/vite.config.frontend.autogenerated.ts"),prebuild:kR(".autogenerated/vite.config.build.autogenerated.ts")}:{},dev:u?"vite --config .autogenerated/vite.config.frontend.autogenerated.ts":"bun run --watch src/index.ts",build:u?"tsc && vite build --config .autogenerated/vite.config.build.autogenerated.ts":"tsc",...u?{}:{start:"bun run dist/index.js"},test:"vitest",lint:"biome check .","lint:fix":"biome check . --write"},dependencies:{...u?{}:E?.dependencies??{hono:"^4.0.0"},...p?.dependencies??{},...s?{prisma:"^7.5.0","@prisma/client":"^7.5.0","@prisma/adapter-pg":"^7.5.0",pg:"^8.13.0"}:{}},devDependencies:{"@types/bun":"^1.4.2","@types/node":"^20.0.0",typescript:"^7.0.2",vitest:"^5.0.0","@biomejs/biome":"^2.5.13",...u?{vite:"^6.4.1"}:{},...p?.devDependencies??{},...E?.devDependencies??{}}}}var GR=`generator client {
1304
1304
  provider = "prisma-client"
1305
1305
  output = "../generated/prisma"
1306
1306
  }
@@ -1416,7 +1416,7 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
1416
1416
  `)}`,B="Upgrade tdk to a version that supports these files. Changing schemaVersion by hand is not a fix";i.onInvalid?.(`${E}
1417
1417
  Fix: ${B}`),console.error(R.red(`\u2717 ${E}`)),console.error(R.gray(` Fix: ${B}`)),l(1)}import{execFileSync as $4}from"node:child_process";var rw=(n,i)=>$4(n,i,{encoding:"utf-8",stdio:"pipe",windowsHide:!0});function e3(n,i=process.platform,l=rw){if(!Number.isInteger(n)||n<1||n>65535)return[];if(i==="win32"){let u=`$port=${n}; Get-NetTCPConnection -LocalPort $port -State Listen -ErrorAction SilentlyContinue | ForEach-Object { $p=Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue; if ($p -and $p.ProcessName -eq 'tilt') { $_.OwningProcess } } | Sort-Object -Unique`;try{return l("powershell.exe",["-NoProfile","-Command",u]).split(/\s+/).map(Number).filter(p=>Number.isInteger(p)&&p>0)}catch{throw new Error(`Unable to inspect Tilt listeners on port ${n} with PowerShell.`)}}let s;try{s=l("lsof",["-nP","-t",`-iTCP:${n}`,"-sTCP:LISTEN"]).split(/\s+/).map(Number).filter(u=>Number.isInteger(u)&&u>0)}catch(u){let p=u,E=p.stderr?.toString().trim();if(p?.status===1&&!E)return[];throw new Error(`Unable to inspect listeners on port ${n}. Install lsof or resolve the lsof error before using --force.`,{cause:p})}return s.filter(u=>{try{return l("ps",["-p",String(u),"-o","comm="]).trim().split(/[\\/]/).at(-1)==="tilt"}catch(p){throw new Error(`Unable to identify the process listening on port ${n}.`,{cause:p})}})}function _I(n,i=process.platform,l=rw){let s=e3(n,i,l);for(let u of s)i==="win32"?l("taskkill.exe",["/PID",String(u),"/F"]):l("kill",["-TERM",String(u)]);return s}function sw(n){if(n===void 0||n==="")return{ok:!0,port:void 0};let i=Number(n);return!/^[0-9]+$/.test(n)||!WC(i)?{ok:!1,message:`Invalid TILT_PORT "${n}": expected an integer from 1 to 65535.`}:{ok:!0,port:i}}function cw(n){return n.runningPorts.length===0||n.force?{action:"start"}:n.only?{action:"only-blocked",ports:n.runningPorts}:{action:"already-running",ports:n.runningPorts}}async function uw(n){if(n.configuredPort!==void 0)return{port:n.configuredPort,autoSwitched:!1};if(n.force)return{port:n.basePort,autoSwitched:!1};let i=await n.findAvailablePort(n.basePort,10);return i&&i!==n.basePort?{port:i,autoSwitched:!0}:{port:n.basePort,autoSwitched:!1}}async function fw(n,i){n.force&&(n.quiet||i.log(`Force flag set - stopping Tilt on port ${n.port} if running...`),i.stop(n.port),await i.wait(2e3))}function dw(n,i){let l=new Set(i.map(s=>s.name));return n.filter(s=>!l.has(s))}function gw(n,i){let l=new Map(i.map(p=>[p.name,p])),s=new Set,u=p=>{if(!(s.has(p)||!l.has(p))){s.add(p);for(let E of l.get(p)?.config?.dependsOn??[])u(E)}};for(let p of n)u(p);return{selected:i.filter(p=>s.has(p.name)),dependencies:i.map(p=>p.name).filter(p=>s.has(p)&&!n.includes(p))}}function pw(n,i=[]){return["TDK is up.",`Tilt UI: http://localhost:${n}`,"App URLs:",...i.length>0?i.slice(0,5).map(l=>` ${l}`):[" run: tdk networks"],"Stop: tdk down"]}function o3(n,i){return n!=="win32"||i==="1"?null:"Landscape startup needs Ubuntu on WSL2. Native Windows is inspect-only."}async function i3(n=Z1(),i=A3){return n.kind==="webcontainer"?V1:P1(n.kind)&&!await i()?X1:null}async function A3(){let{execFile:n}=await import("node:child_process");return new Promise(i=>{n("docker",["ps"],{timeout:1e4},l=>i(!l))})}var l3=2;function r3(n){let i;try{({handEdited:i}=uB(n))}catch(l){if(l instanceof Xm)return null;throw l}return i.length===0?null:["Generated files were edited by hand and no longer match service.json:",...i.map(l=>` ${l}`),"Run `tdk config regenerate` to discard the edits, or bypass with `tdk up --ignore-drift`."]}function s3(n,i,l=process.exit){if(i.ignoreDrift){console.warn(R.yellow("Warning: --ignore-drift set; generated files were not checked."));return}let s=r3(n);if(s){i.onDrift?.(s.join(`
1418
1418
  `));for(let u of s)console.error(R.red(u));l(l3)}}function c3(n,i,l=ur(),s=process.exit){if(i.ignoreVersion){console.warn(R.yellow("Warning: --ignore-version set; minTdkVersion was not checked."));return}let u=uD(n,l);u.status==="none"||u.status==="ok"||(i.onFail?.(`${u.message}
1419
- ${u.fix}`),console.error(R.red(u.message)),console.error(R.red(u.fix)),s(1))}function u3(n,i=3e4){return new Promise(l=>{let s=Date.now()+i,u=()=>{let p=t3({host:"127.0.0.1",port:n}),E=!1,B=I=>{E||(E=!0,p.destroy(),I||Date.now()>=s?l(I):setTimeout(u,250))};p.once("connect",()=>B(!0)),p.once("error",()=>B(!1))};u()})}var mw=new a3("up").description("Start all services (optionally filtered by stack)").alias("deploy").argument("[stack-name]","Name of the stack to start (optional - runs all if omitted)").option("-v, --verbose","Enable verbose output",!1).option("-q, --quiet","Suppress non-essential output",!1).option("--dry-run","Show what would be started without starting",!1).option("-f, --force","Kill existing Tilt process before starting",!1).option("--ignore-drift","Start even if generated files differ from service.json",!1).option("--ignore-version","Start even if this tdk is older than minTdkVersion in .tdk/project.json",!1).option("--only <services...>","Start only these services plus what the Tiltfile enables for them (their dependsOn services and shared infrastructure). With a stack, names must belong to that stack; dependencies may cross stacks").option("--json","Print one JSON object on stdout when the stack is ready or the command fails; implies --quiet",!1).action(async(n,i)=>{let l=i.json?mB("UP_FAILED","tdk up"):void 0;i.json&&(i.quiet=!0);let s=sw(process.env.TILT_PORT);s.ok||(l?.({ok:!1},[{code:"INVALID_TILT_PORT",message:s.message}]),Uo(s.message));let u=s.port,p=vn();p&&c3(p,{ignoreVersion:i.ignoreVersion,onFail:N=>l?.({ok:!1},[{code:"TDK_VERSION_TOO_OLD",message:N}])});let E=i.dryRun?null:await i3();E&&(l?.({ok:!1},[{code:"HOST_UNSUPPORTED",message:E}]),Uo(E));let B=o3(process.platform,process.env.TDK_ALLOW_NATIVE_WINDOWS);B&&Uo(B);let I=vn();if(I&&lw(I,{onInvalid:N=>l?.({ok:!1},[{code:"INVALID_SCHEMA_VERSION",message:N}])}),!i.dryRun){let{assertMachineReadyOrExit:N}=await import("./cold-preflight-6VMSECY4.js");await N()}let S=async()=>{let N=i.dryRun?Za():vn(),w=N??process.cwd(),T=L1(),x,z=[];if((!i.only||n)&&(x=os(T),z=x.map(J=>J.name)),i.only){if(n&&!yg(n)){let Ge=on.stackNotFound(n,z);l?.({ok:!1},[gB(Ge).error]),Ge.exit()}let J=n?T.filter(Ge=>Ge.stack===n):T,Te=dw(i.only,J);if(Te.length>0){let Ge=J.map(We=>We.name),Pe=on.unknownServices(Te,Ge);l?.({ok:!1},[{code:"UNKNOWN_SERVICE",message:Pe.message,...Pe.suggestions.length>0?{suggestions:Pe.suggestions}:{}}]),Pe.exit()}}N&&s3(N,{ignoreDrift:i.ignoreDrift,onDrift:J=>l?.({ok:!1},[{code:"DRIFT_DETECTED",message:J}])}),N&&cD(N,{onInvalid:J=>l?.({ok:!1},[{code:"INVALID_SERVICE_CONFIG",message:J}])}),N&&!l&&!i.quiet&&sD(N);let F=await AB(w,{inspectDocker:!i.dryRun});if(!i.dryRun){if(N){let Ge=Vm(w);Ge.length>0&&!i.quiet&&console.log(R.gray(`Added ${Ge.join(", ")} to .env (generated; existing values unchanged)`))}let J=rQ(w);J.length>0&&i.verbose&&!i.quiet&&console.log(R.gray(`Refreshed runtime assets: ${J.join(", ")}`));let Te=dR(w);Te.length>0&&!i.quiet&&console.log(R.gray(`Added ${Te.join(", ")} to the pre_alpha phase in .tdk/project.json`))}let M,Ae,he=[];if(n){if(M=T.filter(J=>J.stack===n),M.length===0){let J=on.stackNotFound(n,z);l?.({ok:!1},[gB(J).error]),J.exit()}he=M.map(J=>J.name),Ae=`stack "${n}"`}else{M=T;let J=x??os(T);Ae=`all stacks (${Jn(J.length,"stack")}, ${Jn(M.length,"service")})`}let Re=[];if(i.only){let J=gw(i.only,qA());M=J.selected,Re=J.dependencies,he=M.map(Te=>Te.name),Ae=`${Jn(i.only.length,"requested service")}${Re.length>0?` plus ${Re.join(", ")}`:""}`}i.verbose&&!i.quiet&&console.log(R.gray(`Found ${Jn(M.length,"service")} in ${Ae}`));let Ie=M.map(J=>J.name);if(!i.quiet){console.log(R.blue(`${i.dryRun?"Would start":"Starting"} ${Jn(Ie.length,"service")} from ${Ae}...`)),Ie.forEach(We=>{console.log(R.gray(` - ${We}`))});let{appBase:J,apiBase:Te}=KC(F.ingressHttp),Ge=M.filter(We=>We.config?.appType==="frontend"),Pe=M.filter(We=>rc(We.config?.appType));Ge.length>0&&(console.log(R.blue(`
1419
+ ${u.fix}`),console.error(R.red(u.message)),console.error(R.red(u.fix)),s(1))}function u3(n,i=3e4){return new Promise(l=>{let s=Date.now()+i,u=()=>{let p=t3({host:"127.0.0.1",port:n}),E=!1,B=I=>{E||(E=!0,p.destroy(),I||Date.now()>=s?l(I):setTimeout(u,250))};p.once("connect",()=>B(!0)),p.once("error",()=>B(!1))};u()})}var mw=new a3("up").description("Start all services (optionally filtered by stack)").alias("deploy").argument("[stack-name]","Name of the stack to start (optional - runs all if omitted)").option("-v, --verbose","Enable verbose output",!1).option("-q, --quiet","Suppress non-essential output",!1).option("--dry-run","Show what would be started without starting",!1).option("-f, --force","Kill existing Tilt process before starting",!1).option("--ignore-drift","Start even if generated files differ from service.json",!1).option("--ignore-version","Start even if this tdk is older than minTdkVersion in .tdk/project.json",!1).option("--only <services...>","Start only these services plus what the Tiltfile enables for them (their dependsOn services and shared infrastructure). With a stack, names must belong to that stack; dependencies may cross stacks").option("--json","Print one JSON object on stdout when the stack is ready or the command fails; implies --quiet",!1).action(async(n,i)=>{let l=i.json?mB("UP_FAILED","tdk up"):void 0;i.json&&(i.quiet=!0);let s=sw(process.env.TILT_PORT);s.ok||(l?.({ok:!1},[{code:"INVALID_TILT_PORT",message:s.message}]),Uo(s.message));let u=s.port,p=vn();p&&c3(p,{ignoreVersion:i.ignoreVersion,onFail:N=>l?.({ok:!1},[{code:"TDK_VERSION_TOO_OLD",message:N}])});let E=i.dryRun?null:await i3();E&&(l?.({ok:!1},[{code:"HOST_UNSUPPORTED",message:E}]),Uo(E));let B=o3(process.platform,process.env.TDK_ALLOW_NATIVE_WINDOWS);B&&Uo(B);let I=vn();if(I&&lw(I,{onInvalid:N=>l?.({ok:!1},[{code:"INVALID_SCHEMA_VERSION",message:N}])}),!i.dryRun){let{assertMachineReadyOrExit:N}=await import("./cold-preflight-LV5MPGEA.js");await N()}let S=async()=>{let N=i.dryRun?Za():vn(),w=N??process.cwd(),T=L1(),x,z=[];if((!i.only||n)&&(x=os(T),z=x.map(J=>J.name)),i.only){if(n&&!yg(n)){let Ge=on.stackNotFound(n,z);l?.({ok:!1},[gB(Ge).error]),Ge.exit()}let J=n?T.filter(Ge=>Ge.stack===n):T,Te=dw(i.only,J);if(Te.length>0){let Ge=J.map(We=>We.name),Pe=on.unknownServices(Te,Ge);l?.({ok:!1},[{code:"UNKNOWN_SERVICE",message:Pe.message,...Pe.suggestions.length>0?{suggestions:Pe.suggestions}:{}}]),Pe.exit()}}N&&s3(N,{ignoreDrift:i.ignoreDrift,onDrift:J=>l?.({ok:!1},[{code:"DRIFT_DETECTED",message:J}])}),N&&cD(N,{onInvalid:J=>l?.({ok:!1},[{code:"INVALID_SERVICE_CONFIG",message:J}])}),N&&!l&&!i.quiet&&sD(N);let F=await AB(w,{inspectDocker:!i.dryRun});if(!i.dryRun){if(N){let Ge=Vm(w);Ge.length>0&&!i.quiet&&console.log(R.gray(`Added ${Ge.join(", ")} to .env (generated; existing values unchanged)`))}let J=rQ(w);J.length>0&&i.verbose&&!i.quiet&&console.log(R.gray(`Refreshed runtime assets: ${J.join(", ")}`));let Te=dR(w);Te.length>0&&!i.quiet&&console.log(R.gray(`Added ${Te.join(", ")} to the pre_alpha phase in .tdk/project.json`))}let M,Ae,he=[];if(n){if(M=T.filter(J=>J.stack===n),M.length===0){let J=on.stackNotFound(n,z);l?.({ok:!1},[gB(J).error]),J.exit()}he=M.map(J=>J.name),Ae=`stack "${n}"`}else{M=T;let J=x??os(T);Ae=`all stacks (${Jn(J.length,"stack")}, ${Jn(M.length,"service")})`}let Re=[];if(i.only){let J=gw(i.only,qA());M=J.selected,Re=J.dependencies,he=M.map(Te=>Te.name),Ae=`${Jn(i.only.length,"requested service")}${Re.length>0?` plus ${Re.join(", ")}`:""}`}i.verbose&&!i.quiet&&console.log(R.gray(`Found ${Jn(M.length,"service")} in ${Ae}`));let Ie=M.map(J=>J.name);if(!i.quiet){console.log(R.blue(`${i.dryRun?"Would start":"Starting"} ${Jn(Ie.length,"service")} from ${Ae}...`)),Ie.forEach(We=>{console.log(R.gray(` - ${We}`))});let{appBase:J,apiBase:Te}=KC(F.ingressHttp),Ge=M.filter(We=>We.config?.appType==="frontend"),Pe=M.filter(We=>rc(We.config?.appType));Ge.length>0&&(console.log(R.blue(`
1420
1420
  \u{1F30D} Frontend URLs:`)),Ge.forEach(We=>{let ct=We.config?.basePath??`/${We.name}`;console.log(R.gray(` - ${We.name}: ${J}${R.cyan(qy(ct))}`))})),Pe.length>0&&(console.log(R.blue(`
1421
1421
  \u{1F527} Backend API URLs:`)),Pe.forEach(We=>{let ct=We.name.replace(/-api$/,""),qe=We.config?.apiPath??`/api/${ct}`,He=We.config?.sablier,$e=He?.enable&&He?.deferStart?R.dim(" (deferred \u2014 starts on first request)"):"";console.log(R.gray(` - ${We.name}: ${Te}${R.cyan(qy(qe))}${$e}`))}))}let je=i.only??(n?[n]:void 0),Oe=v1(he,{verbose:i.verbose,quiet:i.quiet,force:i.force,focusTargets:je}),be=je?`tilt up ${Oe.join(" ")}`:"tilt up";if(!i.quiet){console.log(R.blue(aD(F)));for(let J of Aw(F))console.log(R.yellow(J));console.log(R.gray("Override with TDK_HTTP_PORT, TDK_HTTPS_PORT, or TDK_POSTGRES_PORT."))}if(l&&i.dryRun){l({ok:!0,dryRun:!0,stack:n??null,services:Ie,...i.only?{requested:i.only,declaredDependencies:Re}:{},command:be});return}if(dB(i,"not starting services",be))return;AD(F),iD(w,F);let ze=wl.tiltUi,Qe=u??ze,Ye=i.only?[...new Set([ze,Qe])]:[Qe],At=[];for(let J of Ye)await cc(J)!==null&&At.push(J);let ke=cw({runningPorts:At,force:i.force,only:!!i.only});if(ke.action==="already-running"){let J=`Environment is already running on port ${ke.ports.join(", ")}.`;l?.({ok:!0,alreadyRunning:!0,tiltUrl:`http://localhost:${ke.ports[0]}`}),i.quiet||console.log(R.green(J));return}if(ke.action==="only-blocked"){let J=`A Tilt is already running on port ${ke.ports.join(", ")}. --only cannot change a running stack's services: run \`tdk down\` first, or pass --force to replace it.`;l?.({ok:!1},[{code:"TILT_ALREADY_RUNNING",message:J}]),Uo(J)}if(i.only)for(let J of At)_I(J);let kt=await uw({configuredPort:u,force:i.force,basePort:ze,findAvailablePort:rR}),at=kt.port;kt.autoSwitched&&!i.quiet&&(console.log(R.yellow(`\u26A0\uFE0F Port ${ze} is already in use`)),console.log(R.blue(`\u{1F504} Auto-switching to port ${at}
1422
1422
  `))),process.env.TILT_PORT=at.toString(),await fw({force:i.force,quiet:i.quiet,port:at},{stop:_I,log:J=>console.log(R.yellow(J)),wait:J=>new Promise(Te=>setTimeout(Te,J))}),i.quiet||(console.log(R.gray(`
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{mb as a,nb as b,ob as c,pb as d,qb as e}from"./chunk-Q6PZ6ZPA.js";import"./chunk-OBQS5CYC.js";import"./chunk-6EA4DGCY.js";export{e as assertMachineReadyOrExit,d as formatColdPreflight,a as nodeTooOld,b as requireVerifiedDockerVersions,c as runColdPreflight};
2
+ import{mb as a,nb as b,ob as c,pb as d,qb as e}from"./chunk-7IDEZ54B.js";import"./chunk-OBQS5CYC.js";import"./chunk-6EA4DGCY.js";export{e as assertMachineReadyOrExit,d as formatColdPreflight,a as nodeTooOld,b as requireVerifiedDockerVersions,c as runColdPreflight};
package/cli/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tdk-cli-internal",
3
3
  "private": true,
4
- "version": "1.3.138",
4
+ "version": "1.3.139",
5
5
  "description": "TDK CLI — start services on your laptop.",
6
6
  "keywords": [
7
7
  "tdk",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tdk-landscape/tdk-cli-core",
3
- "version": "1.3.138",
3
+ "version": "1.3.139",
4
4
  "description": "TDK CLI — start services on your laptop.",
5
5
  "homepage": "https://tdk-landscape.github.io/tdk-website",
6
6
  "repository": {