@flisk-sh/flisk 1.3.206 → 1.3.207

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/README.md +1 -0
  2. package/cli/dist/utils/paths.js +13 -0
  3. package/cli/dist-bundle/{chunk-5CFVN3W3.js → chunk-5LRMAY67.js} +1 -1
  4. package/cli/dist-bundle/{chunk-4W6OXDLK.js → chunk-AGXA5DOQ.js} +1 -1
  5. package/cli/dist-bundle/{chunk-XSPMLWAE.js → chunk-AT5MFZ3D.js} +1 -1
  6. package/cli/dist-bundle/{chunk-GANRXKBM.js → chunk-BHWJU6HY.js} +1 -1
  7. package/cli/dist-bundle/{chunk-ODVBKN6S.js → chunk-D2DIEX5E.js} +1 -1
  8. package/cli/dist-bundle/{chunk-LI3BXAX5.js → chunk-DWR3LLHS.js} +1 -1
  9. package/cli/dist-bundle/{chunk-6Y6G7PSD.js → chunk-FAHNFTWN.js} +1 -1
  10. package/cli/dist-bundle/{chunk-7C5VA6CW.js → chunk-GB6DJJ5N.js} +1 -1
  11. package/cli/dist-bundle/{chunk-NCEK46NX.js → chunk-ODYL6LET.js} +1 -1
  12. package/cli/dist-bundle/{chunk-PHI5AT3H.js → chunk-SLKTM6ZO.js} +1 -1
  13. package/cli/dist-bundle/{chunk-3QQGL3NQ.js → chunk-YTXQPTCN.js} +2 -2
  14. package/cli/dist-bundle/{chunk-D2BXXJDM.js → chunk-Z2C55UFP.js} +1 -1
  15. package/cli/dist-bundle/cli.js +3 -3
  16. package/cli/dist-bundle/{cold-preflight-4I24DQLW.js → cold-preflight-7PFKXNK7.js} +1 -1
  17. package/cli/dist-bundle/{demo-stage-EOMANLAD.js → demo-stage-ANHJKDZC.js} +1 -1
  18. package/cli/dist-bundle/{open-6374RNL6.js → open-VJZ7W4JR.js} +1 -1
  19. package/cli/dist-bundle/project-QSH7LOWI.js +2 -0
  20. package/cli/dist-bundle/{services-VIIBMWD4.js → services-CBXN4SXC.js} +1 -1
  21. package/cli/dist-bundle/tilt-port-owner-SMN5SAQJ.js +2 -0
  22. package/cli/package.json +1 -1
  23. package/package.json +1 -1
  24. package/cli/dist-bundle/project-IRWFRXWA.js +0 -2
  25. package/cli/dist-bundle/tilt-port-owner-AN3ITRTR.js +0 -2
package/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  Go from an empty folder to a running tech stack with one command. Built for agents.
6
6
 
7
+ [![Flisk Discord](https://img.shields.io/badge/Discord-Join%20Server-5865F2?logo=discord&logoColor=white)](https://discord.gg/JG6r33HVB)
7
8
  [![npm version](https://img.shields.io/npm/v/@flisk-sh/flisk.svg?style=flat&color=blue)](https://www.npmjs.com/package/@flisk-sh/flisk) [![npm weekly downloads](https://img.shields.io/npm/dw/@flisk-sh/flisk?style=flat&color=blue)](https://www.npmjs.com/package/@flisk-sh/flisk) [![unpacked size](https://img.shields.io/npm/unpacked-size/@flisk-sh/flisk)](https://packagephobia.com/result?p=@flisk-sh/flisk) [![install size](https://badgen.net/packagephobia/install/@flisk-sh/flisk)](https://packagephobia.com/result?p=@flisk-sh/flisk) [![GitHub stars](https://img.shields.io/github/stars/flisk-sh/flisk?style=flat&logo=github)](https://github.com/flisk-sh/flisk/stargazers) [![OSS Insight](https://img.shields.io/badge/OSS%20Insight-analytics-blue)](https://ossinsight.io/analyze/flisk-sh/flisk) [![X followers: 1,605](https://img.shields.io/badge/X%20followers-1%2C605-1DA1F2?style=flat&logo=x&logoColor=white)](https://x.com/brookservers)
8
9
  [![Journeys E2E](https://github.com/flisk-sh/flisk/actions/workflows/e2e-journeys.yml/badge.svg)](https://github.com/flisk-sh/flisk/actions/workflows/e2e-journeys.yml) [![ERP fixture scale E2E](https://github.com/flisk-sh/flisk/actions/workflows/e2e-scale-full.yml/badge.svg)](https://github.com/flisk-sh/flisk/actions/workflows/e2e-scale-full.yml) [![Example apps E2E](https://github.com/flisk-sh/flisk/actions/workflows/e2e-real-apps.yml/badge.svg?branch=main)](https://github.com/flisk-sh/flisk/actions/workflows/e2e-real-apps.yml) [![CodeQL](https://github.com/flisk-sh/flisk/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/flisk-sh/flisk/security/code-scanning) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/flisk-sh/flisk/badge)](https://scorecard.dev/viewer/?uri=github.com/flisk-sh/flisk) [![Known Vulnerabilities](https://snyk.io/test/github/flisk-sh/flisk/badge.svg)](https://snyk.io/test/github/flisk-sh/flisk) [![Socket Badge](https://badge.socket.dev/npm/package/@flisk-sh/flisk/latest)](https://socket.dev/npm/package/@flisk-sh/flisk/overview)
9
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
@@ -5,6 +5,13 @@ import { dirname, join, resolve } from "node:path";
5
5
  import { cwd } from "node:process";
6
6
  import packageJson from "../../package.json" with { type: "json" };
7
7
  import { PROJECT_JSON } from "./constants.js";
8
+ /**
9
+ * Find the nearest enclosing Flisk project root by walking up from `startDir` until a
10
+ * `.tdk/project.json` marker is found. Stops at the filesystem root without treating the
11
+ * root itself as a project.
12
+ * @param startDir - Directory to start searching from (default: cwd)
13
+ * @returns Absolute path of the project root, or null if no `.tdk/project.json` exists on any parent
14
+ */
8
15
  export function findProjectRoot(startDir = cwd()) {
9
16
  let currentDir = resolve(startDir);
10
17
  const root = resolve("/");
@@ -38,6 +45,12 @@ function getPackageInfo() {
38
45
  };
39
46
  return packageCache;
40
47
  }
48
+ /**
49
+ * Return the CLI's own package version from the bundled `package.json`, cached after the
50
+ * first read (the JSON import is resolved at compile time by Bun, so this never touches
51
+ * the filesystem at runtime).
52
+ * @returns The version string of the CLI package
53
+ */
41
54
  export function getPackageVersion() {
42
55
  return getPackageInfo().version;
43
56
  }
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{b as N}from"./chunk-GANRXKBM.js";import{a as m,ga as f,t as T}from"./chunk-4W6OXDLK.js";import{C as M,L as O,e as $,f as C,i as U,j as E,m as F,n as P,x as l}from"./chunk-XSPMLWAE.js";import{execFileSync as de,execSync as ue}from"node:child_process";import{existsSync as R,readdirSync as V,readFileSync as y}from"node:fs";import{basename as le,dirname as me,join as u,relative as k}from"node:path";function Oe(t){return I(t,!1)}function Ne(t){return I(t,!0)}function I(t,e){return`import { Hono } from 'hono';
2
+ import{b as N}from"./chunk-BHWJU6HY.js";import{a as m,ga as f,t as T}from"./chunk-AGXA5DOQ.js";import{C as M,L as O,e as $,f as C,i as U,j as E,m as F,n as P,x as l}from"./chunk-AT5MFZ3D.js";import{execFileSync as de,execSync as ue}from"node:child_process";import{existsSync as R,readdirSync as V,readFileSync as y}from"node:fs";import{basename as le,dirname as me,join as u,relative as k}from"node:path";function Oe(t){return I(t,!1)}function Ne(t){return I(t,!0)}function I(t,e){return`import { Hono } from 'hono';
3
3
  ${e?`import { sql } from 'drizzle-orm';
4
4
  import { db } from './db.js';
5
5
  `:""}
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{M as q,b as f,e as G,h as xe,i as Ee,m as ke,n as we,r as z,u as ve,v as be,x as T}from"./chunk-XSPMLWAE.js";import st,{existsSync as O,readdirSync as nn,readFileSync as rn,statSync as ce}from"node:fs";import{dirname as on,join as w}from"node:path";var j=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 Te(e){let t=0;return{isValid(){return Date.now()-t<e},markUpdated(){t=Date.now()},reset(){t=0}}}function ct(e,t,n){return e===1?t:n||`${t}s`}function Re(e,t,n){return`${e} ${ct(e,t,n)}`}var ut={month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"};function Sn(e){return new Date(e).toLocaleString("en-US",ut)}function yn(e){return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"})}var K={success:{color:"green",icon:"\u2713",chalkFn:f.green},error:{color:"red",icon:"\u2717",chalkFn:f.red},warning:{color:"yellow",icon:"\u25CB",chalkFn:f.yellow},unknown:{color:"gray",icon:"?",chalkFn:f.gray}};function H(e){if(!e)return"unknown";let t=e.toLowerCase();return t==="ready"||t==="healthy"||t==="active"||t==="running"?"success":t==="error"||t==="failed"||t==="critical"||t==="stopped"?"error":t==="pending"||t==="starting"||t==="building"||t==="degraded"?"warning":"unknown"}function $n(e){return K[H(e)].color}function xn(e){return K[H(e)].icon}function En(e,t){return K[H(t)].chalkFn(e)}var ft={resources:{singular:"resource",command:"flisk resource <name>",context:`
2
+ import{M as q,b as f,e as G,h as xe,i as Ee,m as ke,n as we,r as z,u as ve,v as be,x as T}from"./chunk-AT5MFZ3D.js";import st,{existsSync as O,readdirSync as nn,readFileSync as rn,statSync as ce}from"node:fs";import{dirname as on,join as w}from"node:path";var j=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 Te(e){let t=0;return{isValid(){return Date.now()-t<e},markUpdated(){t=Date.now()},reset(){t=0}}}function ct(e,t,n){return e===1?t:n||`${t}s`}function Re(e,t,n){return`${e} ${ct(e,t,n)}`}var ut={month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"};function Sn(e){return new Date(e).toLocaleString("en-US",ut)}function yn(e){return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"})}var K={success:{color:"green",icon:"\u2713",chalkFn:f.green},error:{color:"red",icon:"\u2717",chalkFn:f.red},warning:{color:"yellow",icon:"\u25CB",chalkFn:f.yellow},unknown:{color:"gray",icon:"?",chalkFn:f.gray}};function H(e){if(!e)return"unknown";let t=e.toLowerCase();return t==="ready"||t==="healthy"||t==="active"||t==="running"?"success":t==="error"||t==="failed"||t==="critical"||t==="stopped"?"error":t==="pending"||t==="starting"||t==="building"||t==="degraded"?"warning":"unknown"}function $n(e){return K[H(e)].color}function xn(e){return K[H(e)].icon}function En(e,t){return K[H(t)].chalkFn(e)}var ft={resources:{singular:"resource",command:"flisk resource <name>",context:`
3
3
  To create a resource:`},stacks:{singular:"stack",command:"flisk stack <stack-name>",context:`
4
4
  To create a stack, use:`},services:{singular:"service",command:"flisk resource <name>",context:`
5
5
  To create a service:`},"stack-services":{singular:"service",command:"flisk resource <name> --stack <stack-name>",context:`
@@ -3,7 +3,7 @@ function G(e,t,r){let o=e.indexOf(t);if(o===-1)return e;let n=t.length,s=0,i="";
3
3
  `:`
4
4
  `)+r,n=o+1,o=e.indexOf(`
5
5
  `,n)}while(o!==-1);return s+=e.slice(n),s}var Y=(e=0)=>t=>`\x1B[${t+e}m`,S=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,I=(e=0)=>(t,r,o)=>`\x1B[${38+e};2;${t};${r};${o}m`,he=e=>`\x1B[58;5;${e<90?e-30:e-90+8}m`,c={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],underlineDouble:["4:2",24],underlineCurly:["4:3",24],underlineDotted:["4:4",24],underlineDashed:["4:5",24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},underlineColor:{underlineBlack:["58;5;0",59],underlineRed:["58;5;1",59],underlineGreen:["58;5;2",59],underlineYellow:["58;5;3",59],underlineBlue:["58;5;4",59],underlineMagenta:["58;5;5",59],underlineCyan:["58;5;6",59],underlineWhite:["58;5;7",59],underlineBlackBright:["58;5;8",59],underlineGray:["58;5;8",59],underlineGrey:["58;5;8",59],underlineRedBright:["58;5;9",59],underlineGreenBright:["58;5;10",59],underlineYellowBright:["58;5;11",59],underlineBlueBright:["58;5;12",59],underlineMagentaBright:["58;5;13",59],underlineCyanBright:["58;5;14",59],underlineWhiteBright:["58;5;15",59]}},K=Object.keys(c.modifier),_=Object.keys(c.color),N=Object.keys(c.bgColor),ge=Object.keys(c.underlineColor),H=[..._,...N];function be(){let e=new Map;for(let[t,r]of Object.entries(c)){for(let[o,n]of Object.entries(r))c[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[o]=c[o],e.set(Number.parseInt(n[0],10),n[1]);Object.defineProperty(c,t,{value:r,enumerable:!1})}return Object.defineProperty(c,"codes",{value:e,enumerable:!1}),c.color.close="\x1B[39m",c.bgColor.close="\x1B[49m",c.underlineColor.close="\x1B[59m",c.color.ansi=Y(),c.color.ansi256=S(),c.color.ansi16m=I(),c.bgColor.ansi=Y(10),c.bgColor.ansi256=S(10),c.bgColor.ansi16m=I(10),c.underlineColor.ansi=he,c.underlineColor.ansi256=S(20),c.underlineColor.ansi16m=I(20),Object.defineProperties(c,{rgbToAnsi256:{value(t,r,o){return t===r&&r===o?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[\da-f]{6}|[\da-f]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[o]=r;o.length===3&&(o=[...o].map(s=>s+s).join(""));let n=Number.parseInt(o,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>c.rgbToAnsi256(...c.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,o,n;if(t>=232)r=((t-232)*10+8)/255,o=r,n=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,o=Math.floor(a/6)/5,n=a%6/5}let s=Math.max(r,o,n)*2;if(s===0)return 30;let i=30+(Math.round(n)<<2|Math.round(o)<<1|Math.round(r));return s===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,r,o)=>c.ansi256ToAnsi(c.rgbToAnsi256(t,r,o)),enumerable:!1},hexToAnsi:{value:t=>c.ansi256ToAnsi(c.hexToAnsi256(t)),enumerable:!1}}),c}var xe=be(),m=xe;import j from"node:process";import Ee from"node:os";import W from"node:tty";function d(e,t=globalThis.Deno?globalThis.Deno.args:j.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(r+e),n=t.indexOf("--");return o!==-1&&(n===-1||o<n)}var{env:l}=j,R;d("no-color")||d("no-colors")||d("color=false")||d("color=never")?R=0:(d("color")||d("colors")||d("color=true")||d("color=always"))&&(R=1);function z(){return/^\d+$/.test(l.FORCE_COLOR)}function Te(){if("FORCE_COLOR"in l){if(l.FORCE_COLOR==="false")return 0;if(l.FORCE_COLOR==="true"||l.FORCE_COLOR.length===0)return 1;if(z())return Math.min(Number.parseInt(l.FORCE_COLOR,10),3)}}function Ce(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Re(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=Te();o!==void 0&&(R=o);let n=r?R:o;if(n===0)return 0;if(r){if(d("color=16m")||d("color=full")||d("color=truecolor"))return 3;if(d("color=256"))return 2}if(n!==void 0&&z())return n;if("TF_BUILD"in l&&"AGENT_NAME"in l)return 1;if(e&&!t&&n===void 0)return 0;let s=n||0;if(l.TERM==="dumb")return s;if(j.platform==="win32"){let i=Ee.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in l)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(i=>i in l)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(i=>i in l)||l.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in l)return/^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/.test(l.TEAMCITY_VERSION)?1:0;if(l.COLORTERM==="truecolor"||l.TERM==="xterm-kitty"||l.TERM==="xterm-ghostty"||l.TERM==="wezterm")return 3;if("TERM_PROGRAM"in l){let i=Number.parseInt((l.TERM_PROGRAM_VERSION||"").split(".",1)[0],10);switch(l.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(?:color)?$/i.test(l.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(l.TERM)||"COLORTERM"in l?1:s}function J(e,t={}){let r=Re(e,{streamIsTTY:e&&e.isTTY,...t});return Ce(r)}var ke={stdout:J({isTTY:W.isatty(1)}),stderr:J({isTTY:W.isatty(2)})},X=ke;var{stdout:q,stderr:Q}=X,b=Symbol("GENERATOR"),x=Symbol("STYLER"),O=Symbol("IS_EMPTY"),k=Symbol("LEVEL"),E=Object.create(null),Z=e=>{if(!Number.isSafeInteger(e)||e<0||e>3)throw new Error("The `level` should be an integer from 0 to 3")},Oe={enumerable:!0,get(){return this[k]},set(e){Z(e),this[k]=e}},ye=(e,t={})=>{t.level!==void 0&&Z(t.level);let r=q?q.level:0;e[k]=t.level===void 0?r:t.level};var ve=e=>{let t=(...r)=>r.join(" ");return ye(t,e),Object.setPrototypeOf(t,T.prototype),t};function T(e){return ve(e)}Object.setPrototypeOf(T.prototype,Function.prototype);for(let[e,t]of Object.entries(m))E[e]={get(){let r=M(this,ee(t.open,t.close,this[x]),this[O]);return Object.defineProperty(this,e,{value:r}),r}};E.visible={get(){let e=M(this,this[x],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Ae=(e,t)=>{let r=m[t];if(e==="rgb"){let n=(i,a,u)=>r.ansi(m.rgbToAnsi(i,a,u));return[n,n,(i,a,u)=>r.ansi256(m.rgbToAnsi256(i,a,u)),r.ansi16m]}if(e==="hex"){let n=i=>r.ansi(m.hexToAnsi(i));return[n,n,i=>r.ansi256(m.hexToAnsi256(i)),i=>r.ansi16m(...m.hexToRgb(i))]}let o=n=>r.ansi(m.ansi256ToAnsi(n));return[o,o,r.ansi256,r.ansi256]},we=["rgb","hex","ansi256"];for(let e of we){let t=e[0].toUpperCase()+e.slice(1);for(let[r,o]of[[e,"color"],["bg"+t,"bgColor"],["underline"+t,"underlineColor"]]){let{close:n}=m[o],s=Ae(e,o);E[r]={get(){let i=function(a,u,f){let me=s[this.level](a,u,f);return M(this,ee(me,n,this[x]),this[O])};return Object.defineProperty(this,r,{value:i}),i}}}}var Se=Object.defineProperties(()=>{},{...E,level:{enumerable:!0,get(){return this[b].level},set(e){this[b].level=e}}}),ee=(e,t,r)=>{let o,n;return r===void 0?(o=e,n=t):(o=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:n,parent:r}},M=(e,t,r)=>{let o=(...n)=>n.length===1?F(o,""+n[0]):n.length===2?F(o,`${n[0]??""} ${n[1]??""}`):F(o,n.join(" "));return Object.setPrototypeOf(o,Se),o[b]=e[b]??e,o[x]=t,o[O]=r,o},F=(e,t)=>{if(e[b][k]<=0||!t)return e[O]?"":t;let r=e[x];if(r===void 0)return t;let{openAll:o,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=G(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
6
- `);return s!==-1&&(t=V(t,n,o,s)),o+t+n};Object.defineProperties(T.prototype,{...E,level:Oe});var Ie=T(),ut=T({level:Q?Q.level:0});var h=Ie;var te={name:"tdk-cli-internal",private:!0,version:"1.3.206",description:"Flisk CLI \u2014 start services on your machine.",keywords:["flisk","tilt","cli","local-dev","microservices"],homepage:"https://github.com/flisk-sh/flisk#readme",bugs:{url:"https://github.com/flisk-sh/flisk/issues"},repository:{type:"git",url:"git+https://github.com/flisk-sh/flisk.git",directory:"cli"},license:"MIT",author:"Flisk Team",type:"module",main:"./dist/index.js",types:"./dist/index.d.ts",bin:{flisk:"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","check:dist":"npm run build && ../scripts/check-cli-dist.sh",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","test:coverage":"vitest run --coverage --coverage.reportOnFailure --coverage.reporter=text --coverage.reporter=html --coverage.reporter=json-summary --coverage.reporter=json --coverage.reportsDirectory=coverage --reporter=default --reporter=json --outputFile.json=test-results/vitest.json",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":"^26.6.5","@types/react":"^19.3.0","@vitest/coverage-v8":"5.0.5",ajv:"^8.17.1",chalk:"^6.0.1",esbuild:"^0.28.2",ink:"^8.0.0",knip:"^6.38.0",react:"^19.3.0","react-devtools-core":"^8.0.0",typescript:"^7.0.2",vite:"^8.3.3",vitest:"5.0.5"},engines:{node:">=22.12.0"}};var mt="Container Runtime",P="bring-your-own";var ht="database-management",gt=".tiltignore",bt="service.json",Ne="docker-compose.yml",xt=".autogenerated",je="TILT_TECH_STACK.star",Fe="TILT_RESOURCE_DEFAULTS.star",re="project.json",Et="package.json",Tt=[je,Fe,"spec.master"],Ct=["backend","frontend","library","sdk","worker","migrator","mcp","agent",P],Rt={backend:["dev","build","start"],worker:["dev","build","start"],migrator:["dev","build","start"],mcp:["dev","build","start"],agent:["dev","build","start"],frontend:["dev","build"],library:["dev","build"],sdk:["dev","build"],[P]:[]};var kt=["monitoring","elk","debezium","golden_image","verdaccio"],Ot={frontend:{base:3e3,min:3e3,max:3999,range:"3000-3999"},backend:{base:4e3,min:4e3,max:4999,range:"4000-4999"},mcp:{base:4e3,min:4e3,max:5999,range:"4000-5999"},agent:{base:4e3,min:4e3,max:5999,range:"4000-5999"},[P]:{base:4e3,min:4e3,max:5999,range:"4000-5999"},worker:{base:6e3,min:6e3,max:6999,range:"6000-6999"},health:{base:5e3,min:5e3,max:5999,range:"5000-5999"},migrator:{base:7e3,min:7e3,max:7999,range:"7000-7999"}},yt={tiltUi:10350,traefik:8080},B="https://flisk.sh/docs/quickstart/";var vt=["node_modules",".git",".tilt",".tilt-engine","dist","build",".prisma",".turbo","coverage","tmp","temp","__tests__","test","tests",".github",".vscode","docs"],At=["Dockerfile",Ne,"docker-compose.yaml","Tiltfile","vite.config.ts","tsconfig.json","tsconfig.build.json"],Me={infra:"\u{1F3D7}\uFE0F",core:"\u{1F527}",api:"\u26A1",app:"\u{1F3A8}",orchestrator:"\u2699\uFE0F"};function wt(e){let t=e.toLowerCase();for(let[r,o]of Object.entries(Me))if(t.includes(r))return o;return"\u{1F4E6}"}import{existsSync as Pe}from"node:fs";import{dirname as Be,join as De,resolve as oe}from"node:path";import{cwd as $e}from"node:process";function v(e=$e()){let t=oe(e),r=oe("/");for(;t!==r;){if(Pe(De(t,".tdk",re)))return t;let o=Be(t);if(o===t)break;t=o}return null}var y=null;function Le(){if(y)return y;let e=te;if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Invalid package.json: expected object");let t=e;return y={name:String(t.name??"@flisk-sh/flisk"),version:String(t.version??"0.0.0"),fullPackage:t},y}function Mt(){return Le().version}import{existsSync as ne}from"node:fs";import{delimiter as se,extname as ie,join as ce}from"node:path";import{delimiter as Dt,extname as Ue}from"node:path";function C(){return process.platform==="win32"}function Ge(e){return e==="linux"?"linux":e==="darwin"?"darwin":e==="win32"?"windows":null}function Ve(e){return e==="x64"?"amd64":e==="arm64"?"arm64":null}function Ye(e,t){let r=Ge(e),o=Ve(t);if(!r||!o||r==="windows"&&o!=="amd64")return null;let n=`tdk-${r}-${o}`;return r==="windows"?`${n}.exe`:n}function $t(){return Ye(process.platform,process.arch)}function Lt(){return C()?"tdk.exe":"flisk"}function D(e,t=C()){return t?Ue(e)?[e]:[e,`${e}.exe`,`${e}.cmd`,`${e}.bat`]:[e]}function A(e){let t=process.env.PATH??process.env.Path??"",r=C(),o=D(e,r);if(r&&!ie(e))for(let n of(process.env.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";")){let s=n.toLowerCase();s&&!o.includes(`${e}${s}`)&&o.push(`${e}${s}`)}for(let n of t.split(se))if(n)for(let s of o){let i=ce(n,s);if(ne(i))return i}return null}function Kt(e){let t=process.env.PATH??process.env.Path??"",r=C(),o=D(e,r);if(r&&!ie(e))for(let i of(process.env.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";")){let a=i.toLowerCase();a&&!o.includes(`${e}${a}`)&&o.push(`${e}${a}`)}let n=[],s=new Set;for(let i of t.split(se))if(i)for(let a of o){let u=ce(i,a);if(!ne(u))continue;let f=r?u.toLowerCase():u;s.has(f)||(s.add(f),n.push(u))}return n}import{execFileSync as Ke,execSync as He}from"node:child_process";var le=1e4;function ae(){let e=!1;if(process.platform==="win32")try{return Ke(A("docker")??"docker",["ps"],{stdio:"ignore",timeout:le,windowsHide:!0}),"running"}catch(t){return t.code==="ETIMEDOUT"?"unresponsive":"missing"}for(let t of["docker ps","colima status","podman ps"])try{return He(t,{stdio:"ignore",timeout:le}),"running"}catch(r){r.code==="ETIMEDOUT"&&(e=!0)}return e?"unresponsive":"missing"}function w(e,t){return e[t]??0}function We(e,t){let r=Array.from({length:t.length+1},(o,n)=>n);for(let o=1;o<=e.length;o++){let n=[o];for(let s=1;s<=t.length;s++){let i=e[o-1]===t[s-1]?0:1;n[s]=Math.min(w(n,s-1)+1,w(r,s)+1,w(r,s-1)+i)}r=n}return w(r,t.length)}function Je(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length-1;r++)if(e[r]!==t[r]&&e[r]===t[r+1]&&e[r+1]===t[r]&&e.slice(0,r)===t.slice(0,r)&&e.slice(r+2)===t.slice(r+2))return!0;return!1}function ue(e,t){if(e.length<2||t.length===0||t.includes(e))return;let r=e.toLowerCase(),o,n=Number.POSITIVE_INFINITY;for(let s of t){if(s.length===0)continue;let i=s.toLowerCase(),a=Je(r,i)?1:We(r,i),u=Math.max(1,Math.min(2,Math.floor(Math.max(r.length,i.length)/3)));a>u||(a<n||a===n&&(o===void 0||s<o))&&(o=s,n=a)}return o}import{spawn as ze}from"node:child_process";import{join as Xe}from"node:path";function qe(e,t=[],r={}){return new Promise((o,n)=>{let s=[e,...t];r.verbose&&console.log(`Executing: tilt ${s.join(" ")}`);let i=ze(A("tilt")??"tilt",s,{stdio:r.inheritStdio?"inherit":"pipe",shell:!1,windowsHide:process.platform==="win32",timeout:r.timeoutMs}),a="",u="";r.inheritStdio||(i.stdout?.on("data",f=>{a+=f.toString()}),i.stderr?.on("data",f=>{u+=f.toString()})),i.on("close",f=>{o({exitCode:f??1,stdout:a,stderr:u})}),i.on("error",f=>{n(new Error(`Failed to spawn tilt: ${f.message}`))})})}async function fe(){try{return(await qe("version",[],{inheritStdio:!1,timeoutMs:1e4})).exitCode===0}catch{return!1}}function Qe(){let e=v();if(!e)throw g.notInProject();return Xe(e,".tdk",".tdk-out","Tiltfile")}function de(e){let t=Qe();e.push("-f",t)}function rr(e,t={}){let r=[];return de(r),t.focusTargets&&t.focusTargets.length>0&&r.push("--",`--focus=${t.focusTargets.join(",")}`),r.push(...e),t.verbose&&!t.quiet&&r.push("--verbose"),t.watch&&r.push("--watch"),r}function or(e={}){let t=[];return de(t),e.focusTargets&&e.focusTargets.length>0&&t.push("--",`--focus=${e.focusTargets.join(",")}`),t}function pe(e){return e instanceof Error?e.message:String(e)}function fr(e,t){if(process.env.TDK_VERBOSE){let r=t!==void 0?`: ${pe(t)}`:"";console.warn(h.gray(`${e}${r}`))}}var p=class extends Error{suggestions;exitCode;constructor(t,r=[],o=1){super(t),this.name="TdkError",this.suggestions=r,this.exitCode=o}display(){U(this.message,void 0,this.suggestions)}exit(){this.display(),process.exit(this.exitCode)}},L=class extends Error{code;constructor(t=1){super(`process.exit(${t})`),this.name="ProcessExitError",this.code=t}};function $(e,t,r=!1){let o=new Set;for(let n of e){let s=ue(n,t);s&&o.add(r?`Did you mean "${s}" for "${n}"?`:`Did you mean "${s}"?`)}return[...o]}var g={tiltNotInstalled:()=>new p("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: ${B}`]),dockerNotAvailable:()=>new p("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: ${B}`]),dockerNotResponding:()=>new p("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 p(`Stack "${e}" not found`,[...$([e],t),"Run `flisk stacks` to see available stacks","Run `flisk stack` to assign resources to a stack"]),resourceNotFound:(e,t=[])=>new p(`Resource "${e}" not found`,[...$([e],t),"Run `flisk resources` to list all resources","Check the resource name spelling"]),unknownServices:(e,t)=>{let r=$(e,t,e.length>1);return new p(`Unknown service ${e.join(", ")}. Valid names: ${t.join(", ")}`,r,2)},directoryExists:e=>new p(`Directory already exists: ${e}`,["Use `--path` to specify a different location","Remove the existing directory if no longer needed"]),invalidPath:e=>new p(`Invalid path: ${e}`,["Path must be within the project directory",'Path cannot contain special characters like <>:"|?*']),notInProject:()=>new p("Could not find project root (no .tdk/project.json found)",["Run this from within a Flisk project","Run `flisk project --yes` to initialize a new project"])};function dr(){let e=v();return e||g.notInProject().exit()}function Ze(e){e instanceof p&&e.exit(),U(pe(e)),process.exit(1)}async function et(e,t){try{return await e()}catch(r){if(r instanceof L)throw r;return t?.verbose&&r instanceof Error&&r.stack&&console.error(h.gray(r.stack)),Ze(r)}}async function pr(e,t){let r=[],o=ae();return o==="unresponsive"?r.push(g.dockerNotResponding()):o==="missing"&&r.push(g.dockerNotAvailable()),await fe()||r.push(g.tiltNotInstalled()),r.length>0&&(console.error(h.red(`
6
+ `);return s!==-1&&(t=V(t,n,o,s)),o+t+n};Object.defineProperties(T.prototype,{...E,level:Oe});var Ie=T(),ut=T({level:Q?Q.level:0});var h=Ie;var te={name:"tdk-cli-internal",private:!0,version:"1.3.207",description:"Flisk CLI \u2014 start services on your machine.",keywords:["flisk","tilt","cli","local-dev","microservices"],homepage:"https://github.com/flisk-sh/flisk#readme",bugs:{url:"https://github.com/flisk-sh/flisk/issues"},repository:{type:"git",url:"git+https://github.com/flisk-sh/flisk.git",directory:"cli"},license:"MIT",author:"Flisk Team",type:"module",main:"./dist/index.js",types:"./dist/index.d.ts",bin:{flisk:"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","check:dist":"npm run build && ../scripts/check-cli-dist.sh",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","test:coverage":"vitest run --coverage --coverage.reportOnFailure --coverage.reporter=text --coverage.reporter=html --coverage.reporter=json-summary --coverage.reporter=json --coverage.reportsDirectory=coverage --reporter=default --reporter=json --outputFile.json=test-results/vitest.json",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":"^26.6.5","@types/react":"^19.3.0","@vitest/coverage-v8":"5.0.5",ajv:"^8.17.1",chalk:"^6.0.1",esbuild:"^0.28.2",ink:"^8.0.0",knip:"^6.38.0",react:"^19.3.0","react-devtools-core":"^8.0.0",typescript:"^7.0.2",vite:"^8.3.3",vitest:"5.0.5"},engines:{node:">=22.12.0"}};var mt="Container Runtime",P="bring-your-own";var ht="database-management",gt=".tiltignore",bt="service.json",Ne="docker-compose.yml",xt=".autogenerated",je="TILT_TECH_STACK.star",Fe="TILT_RESOURCE_DEFAULTS.star",re="project.json",Et="package.json",Tt=[je,Fe,"spec.master"],Ct=["backend","frontend","library","sdk","worker","migrator","mcp","agent",P],Rt={backend:["dev","build","start"],worker:["dev","build","start"],migrator:["dev","build","start"],mcp:["dev","build","start"],agent:["dev","build","start"],frontend:["dev","build"],library:["dev","build"],sdk:["dev","build"],[P]:[]};var kt=["monitoring","elk","debezium","golden_image","verdaccio"],Ot={frontend:{base:3e3,min:3e3,max:3999,range:"3000-3999"},backend:{base:4e3,min:4e3,max:4999,range:"4000-4999"},mcp:{base:4e3,min:4e3,max:5999,range:"4000-5999"},agent:{base:4e3,min:4e3,max:5999,range:"4000-5999"},[P]:{base:4e3,min:4e3,max:5999,range:"4000-5999"},worker:{base:6e3,min:6e3,max:6999,range:"6000-6999"},health:{base:5e3,min:5e3,max:5999,range:"5000-5999"},migrator:{base:7e3,min:7e3,max:7999,range:"7000-7999"}},yt={tiltUi:10350,traefik:8080},B="https://flisk.sh/docs/quickstart/";var vt=["node_modules",".git",".tilt",".tilt-engine","dist","build",".prisma",".turbo","coverage","tmp","temp","__tests__","test","tests",".github",".vscode","docs"],At=["Dockerfile",Ne,"docker-compose.yaml","Tiltfile","vite.config.ts","tsconfig.json","tsconfig.build.json"],Me={infra:"\u{1F3D7}\uFE0F",core:"\u{1F527}",api:"\u26A1",app:"\u{1F3A8}",orchestrator:"\u2699\uFE0F"};function wt(e){let t=e.toLowerCase();for(let[r,o]of Object.entries(Me))if(t.includes(r))return o;return"\u{1F4E6}"}import{existsSync as Pe}from"node:fs";import{dirname as Be,join as De,resolve as oe}from"node:path";import{cwd as $e}from"node:process";function v(e=$e()){let t=oe(e),r=oe("/");for(;t!==r;){if(Pe(De(t,".tdk",re)))return t;let o=Be(t);if(o===t)break;t=o}return null}var y=null;function Le(){if(y)return y;let e=te;if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Invalid package.json: expected object");let t=e;return y={name:String(t.name??"@flisk-sh/flisk"),version:String(t.version??"0.0.0"),fullPackage:t},y}function Mt(){return Le().version}import{existsSync as ne}from"node:fs";import{delimiter as se,extname as ie,join as ce}from"node:path";import{delimiter as Dt,extname as Ue}from"node:path";function C(){return process.platform==="win32"}function Ge(e){return e==="linux"?"linux":e==="darwin"?"darwin":e==="win32"?"windows":null}function Ve(e){return e==="x64"?"amd64":e==="arm64"?"arm64":null}function Ye(e,t){let r=Ge(e),o=Ve(t);if(!r||!o||r==="windows"&&o!=="amd64")return null;let n=`tdk-${r}-${o}`;return r==="windows"?`${n}.exe`:n}function $t(){return Ye(process.platform,process.arch)}function Lt(){return C()?"tdk.exe":"flisk"}function D(e,t=C()){return t?Ue(e)?[e]:[e,`${e}.exe`,`${e}.cmd`,`${e}.bat`]:[e]}function A(e){let t=process.env.PATH??process.env.Path??"",r=C(),o=D(e,r);if(r&&!ie(e))for(let n of(process.env.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";")){let s=n.toLowerCase();s&&!o.includes(`${e}${s}`)&&o.push(`${e}${s}`)}for(let n of t.split(se))if(n)for(let s of o){let i=ce(n,s);if(ne(i))return i}return null}function Kt(e){let t=process.env.PATH??process.env.Path??"",r=C(),o=D(e,r);if(r&&!ie(e))for(let i of(process.env.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";")){let a=i.toLowerCase();a&&!o.includes(`${e}${a}`)&&o.push(`${e}${a}`)}let n=[],s=new Set;for(let i of t.split(se))if(i)for(let a of o){let u=ce(i,a);if(!ne(u))continue;let f=r?u.toLowerCase():u;s.has(f)||(s.add(f),n.push(u))}return n}import{execFileSync as Ke,execSync as He}from"node:child_process";var le=1e4;function ae(){let e=!1;if(process.platform==="win32")try{return Ke(A("docker")??"docker",["ps"],{stdio:"ignore",timeout:le,windowsHide:!0}),"running"}catch(t){return t.code==="ETIMEDOUT"?"unresponsive":"missing"}for(let t of["docker ps","colima status","podman ps"])try{return He(t,{stdio:"ignore",timeout:le}),"running"}catch(r){r.code==="ETIMEDOUT"&&(e=!0)}return e?"unresponsive":"missing"}function w(e,t){return e[t]??0}function We(e,t){let r=Array.from({length:t.length+1},(o,n)=>n);for(let o=1;o<=e.length;o++){let n=[o];for(let s=1;s<=t.length;s++){let i=e[o-1]===t[s-1]?0:1;n[s]=Math.min(w(n,s-1)+1,w(r,s)+1,w(r,s-1)+i)}r=n}return w(r,t.length)}function Je(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length-1;r++)if(e[r]!==t[r]&&e[r]===t[r+1]&&e[r+1]===t[r]&&e.slice(0,r)===t.slice(0,r)&&e.slice(r+2)===t.slice(r+2))return!0;return!1}function ue(e,t){if(e.length<2||t.length===0||t.includes(e))return;let r=e.toLowerCase(),o,n=Number.POSITIVE_INFINITY;for(let s of t){if(s.length===0)continue;let i=s.toLowerCase(),a=Je(r,i)?1:We(r,i),u=Math.max(1,Math.min(2,Math.floor(Math.max(r.length,i.length)/3)));a>u||(a<n||a===n&&(o===void 0||s<o))&&(o=s,n=a)}return o}import{spawn as ze}from"node:child_process";import{join as Xe}from"node:path";function qe(e,t=[],r={}){return new Promise((o,n)=>{let s=[e,...t];r.verbose&&console.log(`Executing: tilt ${s.join(" ")}`);let i=ze(A("tilt")??"tilt",s,{stdio:r.inheritStdio?"inherit":"pipe",shell:!1,windowsHide:process.platform==="win32",timeout:r.timeoutMs}),a="",u="";r.inheritStdio||(i.stdout?.on("data",f=>{a+=f.toString()}),i.stderr?.on("data",f=>{u+=f.toString()})),i.on("close",f=>{o({exitCode:f??1,stdout:a,stderr:u})}),i.on("error",f=>{n(new Error(`Failed to spawn tilt: ${f.message}`))})})}async function fe(){try{return(await qe("version",[],{inheritStdio:!1,timeoutMs:1e4})).exitCode===0}catch{return!1}}function Qe(){let e=v();if(!e)throw g.notInProject();return Xe(e,".tdk",".tdk-out","Tiltfile")}function de(e){let t=Qe();e.push("-f",t)}function rr(e,t={}){let r=[];return de(r),t.focusTargets&&t.focusTargets.length>0&&r.push("--",`--focus=${t.focusTargets.join(",")}`),r.push(...e),t.verbose&&!t.quiet&&r.push("--verbose"),t.watch&&r.push("--watch"),r}function or(e={}){let t=[];return de(t),e.focusTargets&&e.focusTargets.length>0&&t.push("--",`--focus=${e.focusTargets.join(",")}`),t}function pe(e){return e instanceof Error?e.message:String(e)}function fr(e,t){if(process.env.TDK_VERBOSE){let r=t!==void 0?`: ${pe(t)}`:"";console.warn(h.gray(`${e}${r}`))}}var p=class extends Error{suggestions;exitCode;constructor(t,r=[],o=1){super(t),this.name="TdkError",this.suggestions=r,this.exitCode=o}display(){U(this.message,void 0,this.suggestions)}exit(){this.display(),process.exit(this.exitCode)}},L=class extends Error{code;constructor(t=1){super(`process.exit(${t})`),this.name="ProcessExitError",this.code=t}};function $(e,t,r=!1){let o=new Set;for(let n of e){let s=ue(n,t);s&&o.add(r?`Did you mean "${s}" for "${n}"?`:`Did you mean "${s}"?`)}return[...o]}var g={tiltNotInstalled:()=>new p("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: ${B}`]),dockerNotAvailable:()=>new p("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: ${B}`]),dockerNotResponding:()=>new p("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 p(`Stack "${e}" not found`,[...$([e],t),"Run `flisk stacks` to see available stacks","Run `flisk stack` to assign resources to a stack"]),resourceNotFound:(e,t=[])=>new p(`Resource "${e}" not found`,[...$([e],t),"Run `flisk resources` to list all resources","Check the resource name spelling"]),unknownServices:(e,t)=>{let r=$(e,t,e.length>1);return new p(`Unknown service ${e.join(", ")}. Valid names: ${t.join(", ")}`,r,2)},directoryExists:e=>new p(`Directory already exists: ${e}`,["Use `--path` to specify a different location","Remove the existing directory if no longer needed"]),invalidPath:e=>new p(`Invalid path: ${e}`,["Path must be within the project directory",'Path cannot contain special characters like <>:"|?*']),notInProject:()=>new p("Could not find project root (no .tdk/project.json found)",["Run this from within a Flisk project","Run `flisk project --yes` to initialize a new project"])};function dr(){let e=v();return e||g.notInProject().exit()}function Ze(e){e instanceof p&&e.exit(),U(pe(e)),process.exit(1)}async function et(e,t){try{return await e()}catch(r){if(r instanceof L)throw r;return t?.verbose&&r instanceof Error&&r.stack&&console.error(h.gray(r.stack)),Ze(r)}}async function pr(e,t){let r=[],o=ae();return o==="unresponsive"?r.push(g.dockerNotResponding()):o==="missing"&&r.push(g.dockerNotAvailable()),await fe()||r.push(g.tiltNotInstalled()),r.length>0&&(console.error(h.red(`
7
7
  Flisk can't start - missing prerequisites:
8
8
  `)),r.forEach((n,s)=>{s>0&&console.error(""),n.display()}),console.error(h.gray("\nRun `flisk doctor` for a full environment check.")),process.exit(1)),et(e,t)}function mr(e,t=1,r){U(e,void 0,r),process.exit(t)}function U(e,t,r){if(console.error(h.red(`\u274C ${e}`)),t&&console.error(h.gray(` ${t}`)),r&&r.length>0){console.error(h.yellow(`
9
9
  \u{1F4A1} Suggestions:`));for(let o of r)console.error(h.cyan(` \u2192 ${o}`))}}function hr(e,t){console.error(h.red(`
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{a as A}from"./chunk-LI3BXAX5.js";import{ga as _}from"./chunk-4W6OXDLK.js";import{f as u,m as S}from"./chunk-XSPMLWAE.js";import{existsSync as w,readFileSync as h}from"node:fs";import{join as i}from"node:path";var O=["postgres",u],y=["pre_alpha","alpha","beta","out_of_scope"];function D(e){return O.includes(e)}function b(e){try{return JSON.parse(h(i(e,".tdk",S),"utf-8"))}catch{return}}function d(e){try{return w(e)?h(e,"utf-8"):void 0}catch{return}}function k(e,s){let n=r=>{let t=r;for(;t<e.length&&/\s/.test(e[t]);)t+=1;return t},a=0;for(;;){let r=e.indexOf(s,a);if(r===-1)return;let t=n(r+s.length);if(e[t]==="="&&(t=n(t+1),e[t]==="[")){let o=e.indexOf("]",t+1);return o===-1?void 0:[...e.slice(t+1,o).matchAll(/"([^"]+)"|'([^']+)'/g)].map(f=>f[1]??f[2]??"")}a=r+s.length}}function N(e){let s=i(e,".tdk",".tdk-out","Tiltfile"),n=d(s);if(n)return k(n,"ALWAYS_ENABLED_INFRA")}function M(e){let s=i(e,".tdk",".tdk-out","spec.master"),n=d(s);if(n!==void 0)return/"database-management"\s*:\s*True/.test(n)}function x(e){let s=i(e,".tdk",".tdk-out"),n=d(i(s,"Tiltfile")),a=d(i(s,"spec.master")),r=d(i(s,"tdk-cli-ext","discovery","config.star")),t=d(i(s,"tdk-cli-ext","engine","topologies","tilt","config","profiles.star"));if(!n||!a||!r||!t)return!1;let o=a.match(/PRE_ALPHA_RESOURCES\s*=\s*\{([^}]*)\}/)?.[1],f=k(r,"CORE_INFRA");return/FOCUS_MODE\s*,\s*FOCUS_ENABLED_ALL\s*,\s*FOCUS_ENABLED_RESOURCES\s*=\s*Config\.apply_focus\(cfg\)/.test(n)&&/if FOCUS_MODE and FOCUS_ENABLED_ALL\s*:/.test(n)&&/"[^"]+"\s*:\s*True|'[^']+'\s*:\s*True/.test(o??"")&&(f?.includes("postgres")??!1)&&/["']postgres["']\s*:\s*["']database-management["']/.test(r)&&/for infra in CORE_INFRA_EXPORT\s*:/.test(t)&&/needed\[INFRA_STACK_MAP_EXPORT\[infra\]\]\s*=\s*True/.test(t)}function C(e){let s=b(e);if(!s)return!1;let n=s.phases??{};for(let r of y){let t=n[r]?.enabledStacks;if(Array.isArray(t)&&t.includes(u))return!0}let a=s.always_enabled_infra??A;return Array.isArray(a)&&a.includes(u)}function L(e,s){let n=new Set;for(let t of O)n.add(t);for(let t of s)n.add(t.name),t.stack&&n.add(t.stack);let a=b(e);if(a){let t=a.phases??{};for(let f of y){let l=t[f]?.enabledStacks;if(Array.isArray(l))for(let c of l)n.add(c)}let o=a.always_enabled_infra??A;if(Array.isArray(o))for(let f of o)n.add(f)}let r=N(e);if(Array.isArray(r))for(let t of r)n.add(t);return n}function $(e,s=_(e)){let n=C(e),a=N(e),r=Array.isArray(a)&&a.includes(u),t=M(e)===!0,o=n||r||t,f=!n&&x(e),l=L(e,s),c=[],E=[];for(let p of s){let P=p.config?.dependsOn??[],g=!1;for(let m of P){if(D(m)){g=!0;continue}l.has(m)||E.push({resource:p.name,name:m})}g&&c.push(p.name)}let T=o||c.length>0,F=o?"feature":c.length>0?"dependsOn":"none";return{featureOn:o,featureOnFromProjectJson:n,featureOnFromTiltfile:r,featureOnFromSpecMaster:t,focusWouldEnableDatabaseManagement:f,dependsOnUsers:c,willStart:T,reason:F,unknownDependsOnNames:E}}export{O as a,$ as b};
2
+ import{a as A}from"./chunk-DWR3LLHS.js";import{ga as _}from"./chunk-AGXA5DOQ.js";import{f as u,m as S}from"./chunk-AT5MFZ3D.js";import{existsSync as w,readFileSync as h}from"node:fs";import{join as i}from"node:path";var O=["postgres",u],y=["pre_alpha","alpha","beta","out_of_scope"];function D(e){return O.includes(e)}function b(e){try{return JSON.parse(h(i(e,".tdk",S),"utf-8"))}catch{return}}function d(e){try{return w(e)?h(e,"utf-8"):void 0}catch{return}}function k(e,s){let n=r=>{let t=r;for(;t<e.length&&/\s/.test(e[t]);)t+=1;return t},a=0;for(;;){let r=e.indexOf(s,a);if(r===-1)return;let t=n(r+s.length);if(e[t]==="="&&(t=n(t+1),e[t]==="[")){let o=e.indexOf("]",t+1);return o===-1?void 0:[...e.slice(t+1,o).matchAll(/"([^"]+)"|'([^']+)'/g)].map(f=>f[1]??f[2]??"")}a=r+s.length}}function N(e){let s=i(e,".tdk",".tdk-out","Tiltfile"),n=d(s);if(n)return k(n,"ALWAYS_ENABLED_INFRA")}function M(e){let s=i(e,".tdk",".tdk-out","spec.master"),n=d(s);if(n!==void 0)return/"database-management"\s*:\s*True/.test(n)}function x(e){let s=i(e,".tdk",".tdk-out"),n=d(i(s,"Tiltfile")),a=d(i(s,"spec.master")),r=d(i(s,"tdk-cli-ext","discovery","config.star")),t=d(i(s,"tdk-cli-ext","engine","topologies","tilt","config","profiles.star"));if(!n||!a||!r||!t)return!1;let o=a.match(/PRE_ALPHA_RESOURCES\s*=\s*\{([^}]*)\}/)?.[1],f=k(r,"CORE_INFRA");return/FOCUS_MODE\s*,\s*FOCUS_ENABLED_ALL\s*,\s*FOCUS_ENABLED_RESOURCES\s*=\s*Config\.apply_focus\(cfg\)/.test(n)&&/if FOCUS_MODE and FOCUS_ENABLED_ALL\s*:/.test(n)&&/"[^"]+"\s*:\s*True|'[^']+'\s*:\s*True/.test(o??"")&&(f?.includes("postgres")??!1)&&/["']postgres["']\s*:\s*["']database-management["']/.test(r)&&/for infra in CORE_INFRA_EXPORT\s*:/.test(t)&&/needed\[INFRA_STACK_MAP_EXPORT\[infra\]\]\s*=\s*True/.test(t)}function C(e){let s=b(e);if(!s)return!1;let n=s.phases??{};for(let r of y){let t=n[r]?.enabledStacks;if(Array.isArray(t)&&t.includes(u))return!0}let a=s.always_enabled_infra??A;return Array.isArray(a)&&a.includes(u)}function L(e,s){let n=new Set;for(let t of O)n.add(t);for(let t of s)n.add(t.name),t.stack&&n.add(t.stack);let a=b(e);if(a){let t=a.phases??{};for(let f of y){let l=t[f]?.enabledStacks;if(Array.isArray(l))for(let c of l)n.add(c)}let o=a.always_enabled_infra??A;if(Array.isArray(o))for(let f of o)n.add(f)}let r=N(e);if(Array.isArray(r))for(let t of r)n.add(t);return n}function $(e,s=_(e)){let n=C(e),a=N(e),r=Array.isArray(a)&&a.includes(u),t=M(e)===!0,o=n||r||t,f=!n&&x(e),l=L(e,s),c=[],E=[];for(let p of s){let P=p.config?.dependsOn??[],g=!1;for(let m of P){if(D(m)){g=!0;continue}l.has(m)||E.push({resource:p.name,name:m})}g&&c.push(p.name)}let T=o||c.length>0,F=o?"feature":c.length>0?"dependsOn":"none";return{featureOn:o,featureOnFromProjectJson:n,featureOnFromTiltfile:r,featureOnFromSpecMaster:t,focusWouldEnableDatabaseManagement:f,dependsOnUsers:c,willStart:T,reason:F,unknownDependsOnNames:E}}export{O as a,$ as b};
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{E as C,t as $}from"./chunk-XSPMLWAE.js";var g=class extends Error{kind;constructor(i,a){super(i),this.kind=a,this.name="TiltEventsLoadError"}};function m(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)?n:null}var w="\x1B",k="\x07",I=new RegExp(`${w}(?:\\[[0-?]*[ -/]*[@-~]|\\][^${k}${w}]*(?:${k}|${w}\\\\)?|[@-Z\\\\-_])`,"g"),O=new RegExp("[\\u0000-\\u0008\\u000b-\\u001f\\u007f-\\u009f]","g");function U(n){return n.replace(I,"").replace(O,"")}function r(n){return typeof n!="string"?void 0:U(n).trim()||void 0}function _(n){return Array.isArray(n)?n.flatMap(i=>{let a=r(i);return a?[a]:[]}):[]}function L(n){let i=m(n);if(!i||!Array.isArray(i.items))throw new Error("Tilt returned an invalid UIResource list");let a=[],e=[];for(let s of i.items){let u=m(s),N=m(u?.metadata),t=r(N?.name);if(!u||!t)continue;let c=m(u.status);a.push({name:t,runtimeStatus:r(c?.runtimeStatus),updateStatus:r(c?.updateStatus),hasPendingChanges:typeof c?.hasPendingChanges=="boolean"?c.hasPendingChanges:void 0});let x=Array.isArray(c?.buildHistory)?c.buildHistory:[];for(let[d,A]of x.entries()){let o=m(A);if(!o)continue;let f=r(o.error),l=_(o.warnings),p=[f,...l].filter(S=>!!S),h=r(o.spanID);e.push({id:`${t}:build:${h??String(d)}`,resourceName:t,kind:f?"failed":l.length?"warning":"success",title:f?"Build failed":l.length?"Build completed with warnings":"Build completed",occurredAt:r(o.finishTime)??r(o.startTime),details:p.length?p.join("; "):void 0})}let T=m(c?.currentBuild);T&&e.push({id:`${t}:current-build`,resourceName:t,kind:"running",title:"Build in progress",occurredAt:r(T.startTime)});let b=r(c?.pendingBuildSince);!T&&(c?.queued===!0||b)&&e.push({id:`${t}:queued`,resourceName:t,kind:"warning",title:"Update queued",occurredAt:b});let y=r(c?.lastDeployTime),E=y?Date.parse(y):Number.NaN,R=e.some(d=>d.resourceName===t&&d.kind==="success"&&d.occurredAt!==void 0&&Date.parse(d.occurredAt)===E);y&&!R&&e.push({id:`${t}:last-deploy`,resourceName:t,kind:"success",title:"Last deployed",occurredAt:y});let B=Array.isArray(c?.conditions)?c.conditions:[];for(let[d,A]of B.entries()){let o=m(A);if(!o)continue;let f=r(o.type),l=r(o.status),p=r(o.reason),h=r(o.message);if(!f&&!p&&!h||l==="True"&&!p&&!h)continue;let S=[p,h].filter(D=>!!D).join(": ");e.push({id:`${t}:condition:${d}:${f??"status"}`,resourceName:t,kind:l==="False"?"warning":"status",title:`Condition ${f??"status"}${l?`: ${l}`:""}`,occurredAt:r(o.lastTransitionTime),details:S||void 0})}}return e.sort((s,u)=>{if(s.kind==="running"&&u.kind!=="running")return-1;if(u.kind==="running"&&s.kind!=="running")return 1;let N=s.occurredAt?Date.parse(s.occurredAt):Number.NaN,t=u.occurredAt?Date.parse(u.occurredAt):Number.NaN;return Number.isNaN(N)?Number.isNaN(t)?s.resourceName.localeCompare(u.resourceName):1:Number.isNaN(t)?-1:t-N}),{resources:a,events:e}}async function q(){let n=process.env.TILT_PORT??String($.tiltUi),i;try{i=await C("get",["uiresources","-o","json","--port",n],{inheritStdio:!1,timeoutMs:1e4})}catch(e){let s=e instanceof Error?e.message:String(e),u=/ENOENT|not found|no such file|connection refused|failed to connect|could not connect|unable to connect|Tilt is not running/i.test(s)?"unavailable":"error";throw new g(s,u)}if(i.exitCode!==0){let e=i.stderr.trim()||`tilt get exited with code ${i.exitCode}`,s=/connection refused|failed to connect|could not connect|unable to connect|Tilt is not running|no running Tilt/i.test(e)?"unavailable":"error";throw new g(e,s)}let a;try{a=JSON.parse(i.stdout)}catch{throw new g("Tilt returned invalid UIResource JSON","error")}try{return L(a)}catch(e){throw new g(e instanceof Error?e.message:"Tilt returned an invalid UIResource list","error")}}export{g as a,U as b,q as c};
2
+ import{E as C,t as $}from"./chunk-AT5MFZ3D.js";var g=class extends Error{kind;constructor(i,a){super(i),this.kind=a,this.name="TiltEventsLoadError"}};function m(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)?n:null}var w="\x1B",k="\x07",I=new RegExp(`${w}(?:\\[[0-?]*[ -/]*[@-~]|\\][^${k}${w}]*(?:${k}|${w}\\\\)?|[@-Z\\\\-_])`,"g"),O=new RegExp("[\\u0000-\\u0008\\u000b-\\u001f\\u007f-\\u009f]","g");function U(n){return n.replace(I,"").replace(O,"")}function r(n){return typeof n!="string"?void 0:U(n).trim()||void 0}function _(n){return Array.isArray(n)?n.flatMap(i=>{let a=r(i);return a?[a]:[]}):[]}function L(n){let i=m(n);if(!i||!Array.isArray(i.items))throw new Error("Tilt returned an invalid UIResource list");let a=[],e=[];for(let s of i.items){let u=m(s),N=m(u?.metadata),t=r(N?.name);if(!u||!t)continue;let c=m(u.status);a.push({name:t,runtimeStatus:r(c?.runtimeStatus),updateStatus:r(c?.updateStatus),hasPendingChanges:typeof c?.hasPendingChanges=="boolean"?c.hasPendingChanges:void 0});let x=Array.isArray(c?.buildHistory)?c.buildHistory:[];for(let[d,A]of x.entries()){let o=m(A);if(!o)continue;let f=r(o.error),l=_(o.warnings),p=[f,...l].filter(S=>!!S),h=r(o.spanID);e.push({id:`${t}:build:${h??String(d)}`,resourceName:t,kind:f?"failed":l.length?"warning":"success",title:f?"Build failed":l.length?"Build completed with warnings":"Build completed",occurredAt:r(o.finishTime)??r(o.startTime),details:p.length?p.join("; "):void 0})}let T=m(c?.currentBuild);T&&e.push({id:`${t}:current-build`,resourceName:t,kind:"running",title:"Build in progress",occurredAt:r(T.startTime)});let b=r(c?.pendingBuildSince);!T&&(c?.queued===!0||b)&&e.push({id:`${t}:queued`,resourceName:t,kind:"warning",title:"Update queued",occurredAt:b});let y=r(c?.lastDeployTime),E=y?Date.parse(y):Number.NaN,R=e.some(d=>d.resourceName===t&&d.kind==="success"&&d.occurredAt!==void 0&&Date.parse(d.occurredAt)===E);y&&!R&&e.push({id:`${t}:last-deploy`,resourceName:t,kind:"success",title:"Last deployed",occurredAt:y});let B=Array.isArray(c?.conditions)?c.conditions:[];for(let[d,A]of B.entries()){let o=m(A);if(!o)continue;let f=r(o.type),l=r(o.status),p=r(o.reason),h=r(o.message);if(!f&&!p&&!h||l==="True"&&!p&&!h)continue;let S=[p,h].filter(D=>!!D).join(": ");e.push({id:`${t}:condition:${d}:${f??"status"}`,resourceName:t,kind:l==="False"?"warning":"status",title:`Condition ${f??"status"}${l?`: ${l}`:""}`,occurredAt:r(o.lastTransitionTime),details:S||void 0})}}return e.sort((s,u)=>{if(s.kind==="running"&&u.kind!=="running")return-1;if(u.kind==="running"&&s.kind!=="running")return 1;let N=s.occurredAt?Date.parse(s.occurredAt):Number.NaN,t=u.occurredAt?Date.parse(u.occurredAt):Number.NaN;return Number.isNaN(N)?Number.isNaN(t)?s.resourceName.localeCompare(u.resourceName):1:Number.isNaN(t)?-1:t-N}),{resources:a,events:e}}async function q(){let n=process.env.TILT_PORT??String($.tiltUi),i;try{i=await C("get",["uiresources","-o","json","--port",n],{inheritStdio:!1,timeoutMs:1e4})}catch(e){let s=e instanceof Error?e.message:String(e),u=/ENOENT|not found|no such file|connection refused|failed to connect|could not connect|unable to connect|Tilt is not running/i.test(s)?"unavailable":"error";throw new g(s,u)}if(i.exitCode!==0){let e=i.stderr.trim()||`tilt get exited with code ${i.exitCode}`,s=/connection refused|failed to connect|could not connect|unable to connect|Tilt is not running|no running Tilt/i.test(e)?"unavailable":"error";throw new g(e,s)}let a;try{a=JSON.parse(i.stdout)}catch{throw new g("Tilt returned invalid UIResource JSON","error")}try{return L(a)}catch(e){throw new g(e instanceof Error?e.message:"Tilt returned an invalid UIResource list","error")}}export{g as a,U as b,q as c};
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{f as A}from"./chunk-XSPMLWAE.js";var o=[A,"proxy"];export{o as a};
2
+ import{f as A}from"./chunk-AT5MFZ3D.js";var o=[A,"proxy"];export{o as a};
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{r as c}from"./chunk-5CFVN3W3.js";import{execFileSync as u}from"node:child_process";import{realpathSync as l}from"node:fs";import{resolve as p}from"node:path";var m=(o,t)=>u(o,t,{encoding:"utf-8",stdio:"pipe",timeout:5e3,windowsHide:!0});function a(o,t=process.platform,e=m){if(t==="win32")return null;try{let s=e("lsof",["-nP",`-iTCP:${o}`,"-sTCP:LISTEN","-t"]).split(/\r?\n/).map(r=>r.trim()).filter(Boolean);for(let r of s){let n=e("ps",["-p",r,"-o","command="]).trim(),[i]=c(`${r} ${n}`);if(i)return i}}catch{}return null}function f(o){try{return l(o)}catch{return p(o)}}function d(o,t){return o!==null&&f(o.root)!==f(t)}async function P(o,t,e,s=a){let r={running:[],foreign:[]};for(let n of o){if(!await e(n))continue;let i=s(n);i&&d(i,t)?r.foreign.push({port:n,root:i.root}):r.running.push(n)}return r}export{a,d as b,P as c};
2
+ import{r as c}from"./chunk-5LRMAY67.js";import{execFileSync as u}from"node:child_process";import{realpathSync as l}from"node:fs";import{resolve as p}from"node:path";var m=(o,t)=>u(o,t,{encoding:"utf-8",stdio:"pipe",timeout:5e3,windowsHide:!0});function a(o,t=process.platform,e=m){if(t==="win32")return null;try{let s=e("lsof",["-nP",`-iTCP:${o}`,"-sTCP:LISTEN","-t"]).split(/\r?\n/).map(r=>r.trim()).filter(Boolean);for(let r of s){let n=e("ps",["-p",r,"-o","command="]).trim(),[i]=c(`${r} ${n}`);if(i)return i}}catch{}return null}function f(o){try{return l(o)}catch{return p(o)}}function d(o,t){return o!==null&&f(o.root)!==f(t)}async function P(o,t,e,s=a){let r={running:[],foreign:[]};for(let n of o){if(!await e(n))continue;let i=s(n);i&&d(i,t)?r.foreign.push({port:n,root:i.root}):r.running.push(n)}return r}export{a,d as b,P as c};
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{i as mt,o as ht}from"./chunk-NCEK46NX.js";import{f as O,g as gt,h as kt,i as St,j as se,k as yt,l as wt,m as xt,n as Pt,o as bt,p as ne,q as vt,s as Dt,t as $t}from"./chunk-5CFVN3W3.js";import{c as ft}from"./chunk-42IVF3YT.js";import{b as W,c as Tt,d as K}from"./chunk-YZRPX76N.js";import{a as ut,f as pt,g as te,j as Ct,k as Nt,l as Et,m as Rt,o as Ot,p as xe,q as Pe,r as _t,s as be,t as ve,u as At,v as De,w as jt}from"./chunk-PHI5AT3H.js";import{A as rt,B as Se,C as Q,D as ot,E as Z,I as ye,J as it,K as ee,L as at,M as ct,O as lt,P as dt,Q as we,a as C,ga as x,t as st,x as nt}from"./chunk-4W6OXDLK.js";import{C as b,D as et,L as tt,b as h,d as v,j as H,m as L,n as G,o as ge,q as ke,x as g,y as Ze}from"./chunk-XSPMLWAE.js";import{execFileSync as Os}from"node:child_process";import{readFileSync as Kr}from"node:fs";import{join as qr}from"node:path";import{execFileSync as tr,execSync as gs}from"node:child_process";import{existsSync as $,readdirSync as sr,readFileSync as B}from"node:fs";import{join as P,normalize as Be,relative as Ve}from"node:path";import{Command as nr}from"commander";import{existsSync as Ms}from"node:fs";var re="docs/agent-hosts.md",$e=`WebContainers cannot run Flisk: there is no Docker daemon or Tilt. Run \`flisk up\` on a machine with Docker. See ${re}.`,It=`Docker is not reachable from this Dev Container. Mount the host Docker socket (-v /var/run/docker.sock:/var/run/docker.sock) or add the docker-outside-of-docker feature to devcontainer.json, then retry. Docker-in-docker is not supported. See ${re}.`;function Hs(){return{env:process.env,versions:process.versions,platform:process.platform,fileExists:Ms}}function Ft(e=Hs()){let{env:t,versions:s,platform:n,fileExists:r}=e;return s.webcontainer?{kind:"webcontainer",canUp:!1}:t.CODESPACES==="true"?{kind:"codespaces",canUp:!0}:t.REMOTE_CONTAINERS||r("/.dockerenv")&&t.DEVCONTAINER?{kind:"devcontainer",canUp:!0}:n==="win32"?{kind:"native-windows",canUp:t.TDK_ALLOW_NATIVE_WINDOWS==="1"}:n==="linux"&&t.WSL_DISTRO_NAME?{kind:"wsl2",canUp:!0}:{kind:"local",canUp:!0}}function Mt(e){return e==="devcontainer"||e==="codespaces"}function oe(e){return e.some(t=>st(t.config?.appType)||t.config?.appType==="frontend"||t.config?.appType==="worker")}import{existsSync as Ls,readFileSync as Ws}from"node:fs";import{join as Bs,relative as Ht,resolve as Lt,sep as Vs}from"node:path";var Us=2,Wt=["services/*/*"];function Bt(e){return e.split(Vs).filter(Boolean)}function Gs(e,t){let s=0,n=0,r=-1,o=0;for(;n<t.length;)if(s<e.length&&e[s]!=="*"&&(e[s]==="?"||e[s]===t[n]))s++,n++;else if(s<e.length&&e[s]==="*")r=s++,o=n;else if(r!==-1)s=r+1,n=++o;else return!1;for(;s<e.length&&e[s]==="*";)s++;return s===e.length}function Ks(e,t){return e.length===t.length&&e.every((s,n)=>Gs(s,t[n]))}function Te(e){let t=Bs(e,".tdk",L);if(!Ls(t))return Wt;try{let s=JSON.parse(Ws(t,"utf-8"))?.discovery?.paths;if(Array.isArray(s)&&s.every(n=>typeof n=="string"))return s}catch{}return Wt}function ie(e,t,s){let n=Bt(Ht(e,Lt(e,t)));return s.some(r=>{let o=Bt(Ht(e,Lt(e,r)));for(let i=0;i<=Us;i++){let a=n.length-i;if(a>0&&Ks(o,n.slice(0,a)))return!0}return!1})}function ao(e,t,s,n){let r=Te(e);if(ie(e,t,r))return{path:t};let o=`services/${s}/${n}`;return ie(e,o,r)?{path:o,adjustedFrom:t}:{path:t}}import{execFile as qs}from"node:child_process";import{promisify as Js}from"node:util";var zs=Js(qs),Xs=1e4,Ys=5,Vt=10*6e4,Qs=3,Zs=200,en=async e=>{let{stdout:t,stderr:s}=await zs("docker",e,{encoding:"utf-8",timeout:Xs,windowsHide:!0});return`${t}${s}`};function tn(e,t){let s=Ct(t).toLowerCase(),n=e.replace(/-/g,"_").toLowerCase();return n===s||n.startsWith(`${s}_`)}function sn(e,t=Date.now()){if(e.status==="restarting")return!0;if(e.restartCount<Ys)return!1;if(e.status==="running"){let n=Date.parse(e.startedAt);return Number.isNaN(n)||t-n<Vt}let s=Date.parse(e.finishedAt??"");return e.exitCode!==0&&!Number.isNaN(s)&&t-s<Vt}function nn(e,t){let s=/database "([^"]+)" does not exist/i.exec(e);return s?`database "${s[1]}" does not exist: re-run the project's database provisioning (flisk up) or create it`:/Cannot find module|MODULE_NOT_FOUND|module not found/i.test(e)?"a module is missing from the image: rebuild it (flisk up --force) after checking the resource's dependencies":/EADDRINUSE|address already in use/i.test(e)?"the port inside the container is already in use: check for two processes started by the same command":/ECONNREFUSED|connection refused|could not connect/i.test(e)?"a dependency is not reachable: check that the service it connects to is running and healthy":/\b(?:environment variable|env var)\b.*\b(?:missing|not set|required|undefined)\b/i.test(e)||/\b[A-Z][A-Z0-9_]{2,}\b (?:is )?(?:not set|required|missing)\b/.test(e)?"a required environment variable is missing: check the project's .env":t.exitCode===137?"killed (exit 137), usually out of memory: raise the container's memory limit":null}function rn(e){let t=[];for(let s of e.split(/\r?\n/)){let[n,r,o,i,a,c]=s.split(" ");!n||r===void 0||t.push({name:n.replace(/^\//,""),restartCount:Number(r)||0,status:o??"",startedAt:i??"",exitCode:Number(a)||0,finishedAt:c??""})}return t}async function Ut(e,t=[],s=en,n=Date.now()){let r="Crash-looping containers",o;try{o=(await s(["ps","-a","--format",'{{.ID}} {{.Label "com.docker.compose.project"}}'])).split(/\r?\n/).map(m=>m.split(" ")).filter(([m,u])=>m&&u&&tn(u,e)).map(([m])=>m)}catch{return{name:r,didPass:!0,isSkipped:!0,message:"Docker not available - skipped crash-loop check"}}if(o.length===0)return{name:r,didPass:!0,isSkipped:!0,message:"No project containers to check"};let i;try{i=rn(await s(["inspect","--format","{{.Name}} {{.RestartCount}} {{.State.Status}} {{.State.StartedAt}} {{.State.ExitCode}} {{.State.FinishedAt}}",...o]))}catch{return{name:r,didPass:!0,isSkipped:!0,message:"Containers changed while checking - skipped crash-loop check"}}let a=i.filter(f=>sn(f,n));if(a.length===0)return{name:r,didPass:!0,message:"No project container is crash-looping"};let c=[],l=new Set;for(let f of a){let m="";try{m=await s(["logs","--tail",String(Qs),f.name])}catch{}let u=Q(m,t).split(/\r?\n/).map(k=>k.trim().slice(0,Zs)).filter(Boolean),S=nn(m,f);S&&l.add(S),c.push([`${f.name}: ${f.status}, restarted ${f.restartCount} times`,...u.map(k=>` | ${k}`)].join(`
2
+ import{i as mt,o as ht}from"./chunk-ODYL6LET.js";import{f as O,g as gt,h as kt,i as St,j as se,k as yt,l as wt,m as xt,n as Pt,o as bt,p as ne,q as vt,s as Dt,t as $t}from"./chunk-5LRMAY67.js";import{c as ft}from"./chunk-42IVF3YT.js";import{b as W,c as Tt,d as K}from"./chunk-YZRPX76N.js";import{a as ut,f as pt,g as te,j as Ct,k as Nt,l as Et,m as Rt,o as Ot,p as xe,q as Pe,r as _t,s as be,t as ve,u as At,v as De,w as jt}from"./chunk-SLKTM6ZO.js";import{A as rt,B as Se,C as Q,D as ot,E as Z,I as ye,J as it,K as ee,L as at,M as ct,O as lt,P as dt,Q as we,a as C,ga as x,t as st,x as nt}from"./chunk-AGXA5DOQ.js";import{C as b,D as et,L as tt,b as h,d as v,j as H,m as L,n as G,o as ge,q as ke,x as g,y as Ze}from"./chunk-AT5MFZ3D.js";import{execFileSync as Os}from"node:child_process";import{readFileSync as Kr}from"node:fs";import{join as qr}from"node:path";import{execFileSync as tr,execSync as gs}from"node:child_process";import{existsSync as $,readdirSync as sr,readFileSync as B}from"node:fs";import{join as P,normalize as Be,relative as Ve}from"node:path";import{Command as nr}from"commander";import{existsSync as Ms}from"node:fs";var re="docs/agent-hosts.md",$e=`WebContainers cannot run Flisk: there is no Docker daemon or Tilt. Run \`flisk up\` on a machine with Docker. See ${re}.`,It=`Docker is not reachable from this Dev Container. Mount the host Docker socket (-v /var/run/docker.sock:/var/run/docker.sock) or add the docker-outside-of-docker feature to devcontainer.json, then retry. Docker-in-docker is not supported. See ${re}.`;function Hs(){return{env:process.env,versions:process.versions,platform:process.platform,fileExists:Ms}}function Ft(e=Hs()){let{env:t,versions:s,platform:n,fileExists:r}=e;return s.webcontainer?{kind:"webcontainer",canUp:!1}:t.CODESPACES==="true"?{kind:"codespaces",canUp:!0}:t.REMOTE_CONTAINERS||r("/.dockerenv")&&t.DEVCONTAINER?{kind:"devcontainer",canUp:!0}:n==="win32"?{kind:"native-windows",canUp:t.TDK_ALLOW_NATIVE_WINDOWS==="1"}:n==="linux"&&t.WSL_DISTRO_NAME?{kind:"wsl2",canUp:!0}:{kind:"local",canUp:!0}}function Mt(e){return e==="devcontainer"||e==="codespaces"}function oe(e){return e.some(t=>st(t.config?.appType)||t.config?.appType==="frontend"||t.config?.appType==="worker")}import{existsSync as Ls,readFileSync as Ws}from"node:fs";import{join as Bs,relative as Ht,resolve as Lt,sep as Vs}from"node:path";var Us=2,Wt=["services/*/*"];function Bt(e){return e.split(Vs).filter(Boolean)}function Gs(e,t){let s=0,n=0,r=-1,o=0;for(;n<t.length;)if(s<e.length&&e[s]!=="*"&&(e[s]==="?"||e[s]===t[n]))s++,n++;else if(s<e.length&&e[s]==="*")r=s++,o=n;else if(r!==-1)s=r+1,n=++o;else return!1;for(;s<e.length&&e[s]==="*";)s++;return s===e.length}function Ks(e,t){return e.length===t.length&&e.every((s,n)=>Gs(s,t[n]))}function Te(e){let t=Bs(e,".tdk",L);if(!Ls(t))return Wt;try{let s=JSON.parse(Ws(t,"utf-8"))?.discovery?.paths;if(Array.isArray(s)&&s.every(n=>typeof n=="string"))return s}catch{}return Wt}function ie(e,t,s){let n=Bt(Ht(e,Lt(e,t)));return s.some(r=>{let o=Bt(Ht(e,Lt(e,r)));for(let i=0;i<=Us;i++){let a=n.length-i;if(a>0&&Ks(o,n.slice(0,a)))return!0}return!1})}function ao(e,t,s,n){let r=Te(e);if(ie(e,t,r))return{path:t};let o=`services/${s}/${n}`;return ie(e,o,r)?{path:o,adjustedFrom:t}:{path:t}}import{execFile as qs}from"node:child_process";import{promisify as Js}from"node:util";var zs=Js(qs),Xs=1e4,Ys=5,Vt=10*6e4,Qs=3,Zs=200,en=async e=>{let{stdout:t,stderr:s}=await zs("docker",e,{encoding:"utf-8",timeout:Xs,windowsHide:!0});return`${t}${s}`};function tn(e,t){let s=Ct(t).toLowerCase(),n=e.replace(/-/g,"_").toLowerCase();return n===s||n.startsWith(`${s}_`)}function sn(e,t=Date.now()){if(e.status==="restarting")return!0;if(e.restartCount<Ys)return!1;if(e.status==="running"){let n=Date.parse(e.startedAt);return Number.isNaN(n)||t-n<Vt}let s=Date.parse(e.finishedAt??"");return e.exitCode!==0&&!Number.isNaN(s)&&t-s<Vt}function nn(e,t){let s=/database "([^"]+)" does not exist/i.exec(e);return s?`database "${s[1]}" does not exist: re-run the project's database provisioning (flisk up) or create it`:/Cannot find module|MODULE_NOT_FOUND|module not found/i.test(e)?"a module is missing from the image: rebuild it (flisk up --force) after checking the resource's dependencies":/EADDRINUSE|address already in use/i.test(e)?"the port inside the container is already in use: check for two processes started by the same command":/ECONNREFUSED|connection refused|could not connect/i.test(e)?"a dependency is not reachable: check that the service it connects to is running and healthy":/\b(?:environment variable|env var)\b.*\b(?:missing|not set|required|undefined)\b/i.test(e)||/\b[A-Z][A-Z0-9_]{2,}\b (?:is )?(?:not set|required|missing)\b/.test(e)?"a required environment variable is missing: check the project's .env":t.exitCode===137?"killed (exit 137), usually out of memory: raise the container's memory limit":null}function rn(e){let t=[];for(let s of e.split(/\r?\n/)){let[n,r,o,i,a,c]=s.split(" ");!n||r===void 0||t.push({name:n.replace(/^\//,""),restartCount:Number(r)||0,status:o??"",startedAt:i??"",exitCode:Number(a)||0,finishedAt:c??""})}return t}async function Ut(e,t=[],s=en,n=Date.now()){let r="Crash-looping containers",o;try{o=(await s(["ps","-a","--format",'{{.ID}} {{.Label "com.docker.compose.project"}}'])).split(/\r?\n/).map(m=>m.split(" ")).filter(([m,u])=>m&&u&&tn(u,e)).map(([m])=>m)}catch{return{name:r,didPass:!0,isSkipped:!0,message:"Docker not available - skipped crash-loop check"}}if(o.length===0)return{name:r,didPass:!0,isSkipped:!0,message:"No project containers to check"};let i;try{i=rn(await s(["inspect","--format","{{.Name}} {{.RestartCount}} {{.State.Status}} {{.State.StartedAt}} {{.State.ExitCode}} {{.State.FinishedAt}}",...o]))}catch{return{name:r,didPass:!0,isSkipped:!0,message:"Containers changed while checking - skipped crash-loop check"}}let a=i.filter(f=>sn(f,n));if(a.length===0)return{name:r,didPass:!0,message:"No project container is crash-looping"};let c=[],l=new Set;for(let f of a){let m="";try{m=await s(["logs","--tail",String(Qs),f.name])}catch{}let u=Q(m,t).split(/\r?\n/).map(k=>k.trim().slice(0,Zs)).filter(Boolean),S=nn(m,f);S&&l.add(S),c.push([`${f.name}: ${f.status}, restarted ${f.restartCount} times`,...u.map(k=>` | ${k}`)].join(`
3
3
  `))}return{name:r,didPass:!1,message:`${a.length} container${a.length===1?" is":"s are"} crash-looping:
4
4
  ${c.join(`
5
5
  `)}`,fix:[...l,"Read the full log: docker logs <container>"].join("; ")}}import{execFile as Sn,execFileSync as yn}from"node:child_process";import{existsSync as wn,realpathSync as Xt,statfsSync as xn}from"node:fs";import{homedir as Pn}from"node:os";import{join as bn}from"node:path";import{promisify as vn}from"node:util";import{statfsSync as on}from"node:fs";import{homedir as an}from"node:os";var ae="Disk Space",cn=1024**3,ln=2,Ce=10,Gt=["Free disk space, then retry: flisk doctor"," docker system prune -af # unused images and build cache (needs Docker running)"," npm cache clean --force"," bun pm cache rm"," brew cleanup -s"].join(`
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{c as z,e as Q}from"./chunk-42IVF3YT.js";import{a as X}from"./chunk-LI3BXAX5.js";import{T as J,U as B,ca as O,ga as Y,u as L}from"./chunk-4W6OXDLK.js";import{b as q,f as v,g as k,i as V,j as x,k as P,l as F,m as W,n as A,s as d,t as N}from"./chunk-XSPMLWAE.js";import{a as $}from"./chunk-6EA4DGCY.js";import{appendFileSync as le,existsSync as C,mkdirSync as fe,readFileSync as de,writeFileSync as Z}from"node:fs";import{dirname as pe,resolve as w}from"node:path";function ft(t,e,n){for(let[r,s]of e.entries())console.log(q.blue(`${s.emoji} ${s.description}...`)),s.type==="json"?me(t,s.filename,s.content):he(t,s.filename,String(s.content)),n&&n(s,r,e.length)}function ue(t,e,n=2){let r=`${JSON.stringify(e,null,n)}
2
+ import{c as z,e as Q}from"./chunk-42IVF3YT.js";import{a as X}from"./chunk-DWR3LLHS.js";import{T as J,U as B,ca as O,ga as Y,u as L}from"./chunk-AGXA5DOQ.js";import{b as q,f as v,g as k,i as V,j as x,k as P,l as F,m as W,n as A,s as d,t as N}from"./chunk-AT5MFZ3D.js";import{a as $}from"./chunk-6EA4DGCY.js";import{appendFileSync as le,existsSync as C,mkdirSync as fe,readFileSync as de,writeFileSync as Z}from"node:fs";import{dirname as pe,resolve as w}from"node:path";function ft(t,e,n){for(let[r,s]of e.entries())console.log(q.blue(`${s.emoji} ${s.description}...`)),s.type==="json"?me(t,s.filename,s.content):he(t,s.filename,String(s.content)),n&&n(s,r,e.length)}function ue(t,e,n=2){let r=`${JSON.stringify(e,null,n)}
3
3
  `;Z(t,r,"utf-8")}function me(t,e,n,r=2){let s=w(t,e);ue(s,n,r)}function U(t,e){Z(t,e,"utf-8")}function he(t,e,n){let r=w(t,e);U(r,n)}function dt(t){C(t)||fe(t,{recursive:!0})}var ge=[".env",".tdk/.tdk-out/",".tdk/.project-id",".tdk/smoke/","node_modules/"];function Se(t){let e=w(t,".gitignore"),n=C(e)?de(e,"utf-8"):"",r=new Set(n.split(`
4
4
  `).map(l=>l.trim().replace(/\/$/,""))),s=ge.filter(l=>!r.has(l.replace(/\/$/,"")));if(s.length===0)return[];let o=n&&!n.endsWith(`
5
5
  `)?`
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{E as x,a as h,ga as D,ha as L,t as _}from"./chunk-4W6OXDLK.js";import{C as F,j as I,m as w,n as A,t as j,x as T}from"./chunk-XSPMLWAE.js";import{execFileSync as B}from"node:child_process";import{existsSync as de,mkdirSync as le,readFileSync as K,realpathSync as fe,writeFileSync as pe}from"node:fs";import{join as S,resolve as he,sep as me}from"node:path";import{createServer as ie}from"node:net";import{connect as oe}from"node:net";function U(e,t=500){return new Promise(r=>{let s=oe({port:e,host:"127.0.0.1"}),n=o=>{s.destroy(),r(o)};s.setTimeout(t,()=>n(!1)),s.once("connect",()=>n(!0)),s.once("error",()=>n(!1))})}var ae={ingressHttp:{start:8080,end:8180},ingressHttps:{start:8443,end:8543},postgres:{start:15432,end:15532}},v={ingressHttp:"TDK_HTTP_PORT",ingressHttps:"TDK_HTTPS_PORT",postgres:"TDK_POSTGRES_PORT"},H={ingressHttp:80,ingressHttps:443,postgres:5432},E={ingressHttp:H.ingressHttp,ingressHttps:H.ingressHttps};function ce(e,t){return e==="EACCES"&&t==="darwin"}async function O(e){return await U(e)?!1:new Promise(t=>{let r=ie();r.once("error",s=>{t(ce(s.code,process.platform))}),r.listen(e,"127.0.0.1",()=>r.close(()=>t(!0)))})}function ue(e,t){let r=Number(t);if(!Number.isInteger(r)||r<1||r>65535)throw new Error(`${e} must be an integer between 1 and 65535 (received ${JSON.stringify(t)})`);return r}async function R(e={}){let t=e.env??process.env,r=e.isAvailable??O,s={ingressHttp:!1,ingressHttps:!1,postgres:!1},n={ingressHttp:"",ingressHttps:"",postgres:""},o={explicit:s},a=new Set;for(let c of["ingressHttp","ingressHttps","postgres"]){let u=t[v[c]],i=u!==void 0&&u.trim()!=="",d=e.ranges?.[c]??ae[c],l=E[c],f=i?[ue(v[c],u)]:[...l===void 0?[]:[l],...Array.from({length:d.end-d.start+1},(g,k)=>d.start+k)],m;for(let g of f)if(!a.has(g)){if(await r(g)){m=g;break}if(i)throw new Error(`${v[c]}=${g} is already in use. Choose a free host port and retry.`)}if(m===void 0)throw new Error(`No available host port in ${d.start}-${d.end} for ${c}. Set ${v[c]} to a free port and retry.`);a.add(m),o[c]=m,s[c]=i,n[c]=i?"explicit override":m===l?"requested port is free":`selected from fallback range ${d.start}-${d.end}`}return{...o,requested:{...H},reason:n}}function Ve(e){return`Host ports: HTTP ${e.ingressHttp}, HTTPS ${e.ingressHttps}, Postgres ${e.postgres}`}var G=S(".tdk",".tdk-out","host-ports.json");function ge(e,t,r){return e.split(`
2
+ import{E as x,a as h,ga as D,ha as L,t as _}from"./chunk-AGXA5DOQ.js";import{C as F,j as I,m as w,n as A,t as j,x as T}from"./chunk-AT5MFZ3D.js";import{execFileSync as B}from"node:child_process";import{existsSync as de,mkdirSync as le,readFileSync as K,realpathSync as fe,writeFileSync as pe}from"node:fs";import{join as S,resolve as he,sep as me}from"node:path";import{createServer as ie}from"node:net";import{connect as oe}from"node:net";function U(e,t=500){return new Promise(r=>{let s=oe({port:e,host:"127.0.0.1"}),n=o=>{s.destroy(),r(o)};s.setTimeout(t,()=>n(!1)),s.once("connect",()=>n(!0)),s.once("error",()=>n(!1))})}var ae={ingressHttp:{start:8080,end:8180},ingressHttps:{start:8443,end:8543},postgres:{start:15432,end:15532}},v={ingressHttp:"TDK_HTTP_PORT",ingressHttps:"TDK_HTTPS_PORT",postgres:"TDK_POSTGRES_PORT"},H={ingressHttp:80,ingressHttps:443,postgres:5432},E={ingressHttp:H.ingressHttp,ingressHttps:H.ingressHttps};function ce(e,t){return e==="EACCES"&&t==="darwin"}async function O(e){return await U(e)?!1:new Promise(t=>{let r=ie();r.once("error",s=>{t(ce(s.code,process.platform))}),r.listen(e,"127.0.0.1",()=>r.close(()=>t(!0)))})}function ue(e,t){let r=Number(t);if(!Number.isInteger(r)||r<1||r>65535)throw new Error(`${e} must be an integer between 1 and 65535 (received ${JSON.stringify(t)})`);return r}async function R(e={}){let t=e.env??process.env,r=e.isAvailable??O,s={ingressHttp:!1,ingressHttps:!1,postgres:!1},n={ingressHttp:"",ingressHttps:"",postgres:""},o={explicit:s},a=new Set;for(let c of["ingressHttp","ingressHttps","postgres"]){let u=t[v[c]],i=u!==void 0&&u.trim()!=="",d=e.ranges?.[c]??ae[c],l=E[c],f=i?[ue(v[c],u)]:[...l===void 0?[]:[l],...Array.from({length:d.end-d.start+1},(g,k)=>d.start+k)],m;for(let g of f)if(!a.has(g)){if(await r(g)){m=g;break}if(i)throw new Error(`${v[c]}=${g} is already in use. Choose a free host port and retry.`)}if(m===void 0)throw new Error(`No available host port in ${d.start}-${d.end} for ${c}. Set ${v[c]} to a free port and retry.`);a.add(m),o[c]=m,s[c]=i,n[c]=i?"explicit override":m===l?"requested port is free":`selected from fallback range ${d.start}-${d.end}`}return{...o,requested:{...H},reason:n}}function Ve(e){return`Host ports: HTTP ${e.ingressHttp}, HTTPS ${e.ingressHttps}, Postgres ${e.postgres}`}var G=S(".tdk",".tdk-out","host-ports.json");function ge(e,t,r){return e.split(`
3
3
  `).some(s=>{let[n="",o=""]=s.split("|"),a=n.toLowerCase(),c=t.toLowerCase();return(a.startsWith(`${c}_`)||a.startsWith(`${c}-`))&&o.includes(`:${r}->`)})}function V(e){let t=S(e,G);if(!de(t))return null;try{let r=JSON.parse(K(t,"utf-8"));if(!r||typeof r!="object")return null;let s=r;return!Number.isInteger(s.ingressHttp)||!Number.isInteger(s.ingressHttps)||!Number.isInteger(s.postgres)||!s.requested||!s.explicit||!s.reason?null:s}catch{return null}}function Ye(e,t){let r=S(e,G);le(S(e,".tdk",".tdk-out"),{recursive:!0}),pe(r,`${JSON.stringify(t,null,2)}
4
4
  `,{encoding:"utf-8",mode:384})}function Qe(e){process.env.TDK_HTTP_PORT=String(e.ingressHttp),process.env.TDK_HTTPS_PORT=String(e.ingressHttps),process.env.TDK_POSTGRES_PORT=String(e.postgres)}var ke="com.docker.compose.project.working_dir";function Pe(e,t,r){let s=new Set([he(t)]);try{s.add(fe(t))}catch{}return e.split(`
5
5
  `).some(n=>{let[,o="",a=""]=n.split("|");return!a||!o.includes(`:${r}->`)?!1:[...s].some(c=>a===c||a.startsWith(`${c}${me}`))})}function Xe(e,t,r=()=>B("docker",["ps","--format",`{{.Names}}|{{.Ports}}|{{.Label "${ke}"}}`],{encoding:"utf-8",timeout:5e3})){let s=V(e);if(!s||s.ingressHttp===t)return t;try{if(Pe(r(),e,s.ingressHttp))return s.ingressHttp}catch{}return t}async function et(e,t={}){let r=V(e),s=["TDK_HTTP_PORT","TDK_HTTPS_PORT","TDK_POSTGRES_PORT"].some(i=>process.env[i]);if(t.inspectDocker===!1&&r&&!s)return r;let n="";try{let i=JSON.parse(K(S(e,".tdk",w),"utf-8"));n=String(i?.project?.name??"tdk-project").replace(/-/g,"_").toLowerCase()}catch{n="tdk_project"}let o="";if(t.inspectDocker!==!1)try{o=B("docker",["ps","--format","{{.Names}}|{{.Ports}}"],{encoding:"utf-8",timeout:5e3})}catch{}let a=i=>ge(o,n,i),c=t.isPortFree??O,u=async i=>await c(i)||a(i);if(r&&!s){for(let i of[r.ingressHttp,r.ingressHttps,r.postgres])if(!await u(i))return R({isAvailable:u});for(let[i,d]of Object.entries(E)){let l=r[i];if(d!==void 0&&l!==d&&await u(d))return R({isAvailable:u})}return r}return R({isAvailable:u})}import{execFileSync as Q,execSync as $}from"node:child_process";import{existsSync as C,readdirSync as Te,readFileSync as N}from"node:fs";import{createServer as Se}from"node:net";import{join as P}from"node:path";function W(e,t){return e==="pending"||e==="in_progress"||e==="none"||t==="pending"||t==="none"}var J="container is running, but its health check is failing";function M(e){let t=e?.runtimeStatus??"";if(t!=="ok")return t;let r=e?.composeResourceInfo?.healthStatus;return r==="unhealthy"?"error":r==="starting"?"pending":t}var b=1e4,z=3e3,be="http://localhost:4873";function X(e){return`'${e.replace(/'/g,"'\\''")}'`}function y(e,t,r,s,n){return process.platform==="win32"?Q(F(t)??t,r,{...n,windowsHide:!0}):e(s,n)}var ye=[80,443];function $e(e){return e.replace(/-/g,"_")}function we(e,t){let r=new Set(t),s=[];for(let n of e.split(`
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{a as C}from"./chunk-GIMHTZNR.js";import{b as N,c as fe,d as V,i as D,j as Y,n as J,o as L,q as O}from"./chunk-NCEK46NX.js";import{$ as ae,ea as ie,fa as se,h as T,ha as ce,i as B,ja as le,ka as de,la as pe,o as h,p as b,q as t,x as re,y as G,z as W}from"./chunk-4W6OXDLK.js";import{M as U,O as z,Q as E,b as g,f as x,m as M,o as P,x as F}from"./chunk-XSPMLWAE.js";import{execFileSync as Se}from"node:child_process";import{cpSync as je,existsSync as S,readdirSync as _e,readFileSync as K,writeFileSync as we}from"node:fs";import{basename as xe,dirname as Pe,isAbsolute as Ee,join as _,resolve as q}from"node:path";import{cwd as he}from"node:process";import{fileURLToPath as Oe}from"node:url";import{Command as Ce}from"commander";var ve="-y, --yes",ye="Skip prompts and confirmations; use defaults";function ue(e,o=ye){return e.option(ve,o,!1)}async function be(e,o=!0){let l=await L({message:e,initial:o});return l||T(),l}function Le(e,o=1){e.valid||E(e.error??"Validation failed",o)}function Ie(e,o,l,s){return e.dryRun?(s?s():(console.log(`Dry run - ${o}`),console.log(`Would run: ${l}`)),!0):!1}async function qe(e,o){return await be(e,!0)?!0:(o&&o(),!1)}var I=new Map;function me(e){e!==void 0?I.delete(e):I.clear()}function Be(e=!1){let o=F(),l=o??"";if(!e){let p=I.get(l);if(p)return p}let{resources:s,problems:d}=o?ie(o):{resources:ce(),problems:[]},u=pe(s),n=de(s);se(d);let r=s.filter(p=>!p.stack),f=new Map;for(let p of s)if(p.stack){let i=f.get(p.stack)||[];i.push(p),f.set(p.stack,i)}let m={resources:s,problems:d,stacks:u,stackNames:n,unassignedResources:r,resourcesByStack:f};return I.set(l,m),m}var A={proxy:{name:"proxy",description:"Traefik reverse proxy and API gateway for routing all services",category:"core",phase:"pre_alpha",enabled_by_default:!0,dependsOn:[]},verdaccio:{name:"verdaccio",description:"Verdaccio npm registry for package management and local publishing (Premium - requires TDK_LICENSE_KEY)",category:"premium",phase:"pre_alpha",enabled_by_default:!1,dependsOn:[]},[x]:{name:x,description:"PostgreSQL database for data persistence and SQL operations",category:"core",phase:"pre_alpha",enabled_by_default:!0,dependsOn:[]},monitoring:{name:"monitoring",description:"SigNoz or SkyWalking observability platform for monitoring and tracing",category:"optional",phase:"pre_alpha",enabled_by_default:!1,dependsOn:[x]},elk:{name:"elk",description:"Elasticsearch, Logstash, Kibana stack for log aggregation and analysis",category:"optional",phase:"pre_alpha",enabled_by_default:!1,dependsOn:[]},debezium:{name:"debezium",description:"Change Data Capture for real-time data streaming from databases",category:"optional",phase:"pre_alpha",enabled_by_default:!1,dependsOn:[x]},"golden-image":{name:"golden-image",description:"Pre-built Docker image layer for faster builds and smaller deployments",category:"optional",phase:"pre_alpha",enabled_by_default:!0,dependsOn:[]}};function H(e,o){try{return le(e,o)}catch{return[]}}function Ae(e){return new Set([...e.phases.pre_alpha.enabledStacks,...e.phases.alpha.enabledStacks,...e.phases.beta.enabledStacks,...e.phases.out_of_scope.enabledStacks])}function Q(e,o){let l=Ae(e),s=o.filter(d=>!l.has(d));return s.length===0?(e.phases.pre_alpha.enabledStacks=Array.from(new Set(e.phases.pre_alpha.enabledStacks)),[]):(e.phases.pre_alpha.enabledStacks=Array.from(new Set([...e.phases.pre_alpha.enabledStacks,...s])),s)}function gt(e,o){let l=_(e,".tdk",M);if(!S(l))return[];let s=D(e),d=Q(s,H(e,o));return d.length>0&&N(l,s),d}function $e(){return Object.values(A).filter(e=>e.enabled_by_default&&e.category==="core").map(e=>e.name)}function Re(e,o){return o||(C[e]?.repo.split("/").pop()??e).replace(/\.git$/,"")}function ge(e){return e.split(`
2
+ import{a as C}from"./chunk-GIMHTZNR.js";import{b as N,c as fe,d as V,i as D,j as Y,n as J,o as L,q as O}from"./chunk-ODYL6LET.js";import{$ as ae,ea as ie,fa as se,h as T,ha as ce,i as B,ja as le,ka as de,la as pe,o as h,p as b,q as t,x as re,y as G,z as W}from"./chunk-AGXA5DOQ.js";import{M as U,O as z,Q as E,b as g,f as x,m as M,o as P,x as F}from"./chunk-AT5MFZ3D.js";import{execFileSync as Se}from"node:child_process";import{cpSync as je,existsSync as S,readdirSync as _e,readFileSync as K,writeFileSync as we}from"node:fs";import{basename as xe,dirname as Pe,isAbsolute as Ee,join as _,resolve as q}from"node:path";import{cwd as he}from"node:process";import{fileURLToPath as Oe}from"node:url";import{Command as Ce}from"commander";var ve="-y, --yes",ye="Skip prompts and confirmations; use defaults";function ue(e,o=ye){return e.option(ve,o,!1)}async function be(e,o=!0){let l=await L({message:e,initial:o});return l||T(),l}function Le(e,o=1){e.valid||E(e.error??"Validation failed",o)}function Ie(e,o,l,s){return e.dryRun?(s?s():(console.log(`Dry run - ${o}`),console.log(`Would run: ${l}`)),!0):!1}async function qe(e,o){return await be(e,!0)?!0:(o&&o(),!1)}var I=new Map;function me(e){e!==void 0?I.delete(e):I.clear()}function Be(e=!1){let o=F(),l=o??"";if(!e){let p=I.get(l);if(p)return p}let{resources:s,problems:d}=o?ie(o):{resources:ce(),problems:[]},u=pe(s),n=de(s);se(d);let r=s.filter(p=>!p.stack),f=new Map;for(let p of s)if(p.stack){let i=f.get(p.stack)||[];i.push(p),f.set(p.stack,i)}let m={resources:s,problems:d,stacks:u,stackNames:n,unassignedResources:r,resourcesByStack:f};return I.set(l,m),m}var A={proxy:{name:"proxy",description:"Traefik reverse proxy and API gateway for routing all services",category:"core",phase:"pre_alpha",enabled_by_default:!0,dependsOn:[]},verdaccio:{name:"verdaccio",description:"Verdaccio npm registry for package management and local publishing (Premium - requires TDK_LICENSE_KEY)",category:"premium",phase:"pre_alpha",enabled_by_default:!1,dependsOn:[]},[x]:{name:x,description:"PostgreSQL database for data persistence and SQL operations",category:"core",phase:"pre_alpha",enabled_by_default:!0,dependsOn:[]},monitoring:{name:"monitoring",description:"SigNoz or SkyWalking observability platform for monitoring and tracing",category:"optional",phase:"pre_alpha",enabled_by_default:!1,dependsOn:[x]},elk:{name:"elk",description:"Elasticsearch, Logstash, Kibana stack for log aggregation and analysis",category:"optional",phase:"pre_alpha",enabled_by_default:!1,dependsOn:[]},debezium:{name:"debezium",description:"Change Data Capture for real-time data streaming from databases",category:"optional",phase:"pre_alpha",enabled_by_default:!1,dependsOn:[x]},"golden-image":{name:"golden-image",description:"Pre-built Docker image layer for faster builds and smaller deployments",category:"optional",phase:"pre_alpha",enabled_by_default:!0,dependsOn:[]}};function H(e,o){try{return le(e,o)}catch{return[]}}function Ae(e){return new Set([...e.phases.pre_alpha.enabledStacks,...e.phases.alpha.enabledStacks,...e.phases.beta.enabledStacks,...e.phases.out_of_scope.enabledStacks])}function Q(e,o){let l=Ae(e),s=o.filter(d=>!l.has(d));return s.length===0?(e.phases.pre_alpha.enabledStacks=Array.from(new Set(e.phases.pre_alpha.enabledStacks)),[]):(e.phases.pre_alpha.enabledStacks=Array.from(new Set([...e.phases.pre_alpha.enabledStacks,...s])),s)}function gt(e,o){let l=_(e,".tdk",M);if(!S(l))return[];let s=D(e),d=Q(s,H(e,o));return d.length>0&&N(l,s),d}function $e(){return Object.values(A).filter(e=>e.enabled_by_default&&e.category==="core").map(e=>e.name)}function Re(e,o){return o||(C[e]?.repo.split("/").pop()??e).replace(/\.git$/,"")}function ge(e){return e.split(`
3
3
  `).map(l=>l.trim()).filter(Boolean).pop()??"unknown error"}async function Fe(e,o,l,s={}){let d=C[e];if(!d){console.log(g.red(`
4
4
  \u274C Unknown template: "${e}"`)),console.log(g.yellow(`
5
5
  Available templates:`));for(let[r,f]of Object.entries(C))console.log(` ${g.cyan(r)} ${g.gray(`- ${f.description}`)}`);console.log(g.gray("\nOr run `flisk project` with no template for a blank project.")),process.exit(1)}let u=Re(e,o);ae(u)||U.invalidPath(u).exit();let n=Ee(u)?u:q(he(),u);S(n)&&_e(n).length>0&&U.directoryExists(n).exit(),s.quiet||(B(`Cloning template: ${e}`),t(`${d.description}
@@ -7,7 +7,7 @@ Available templates:`));for(let[r,f]of Object.entries(C))console.log(` ${g.cyan
7
7
  `,0));try{if(d.bundledPath){let r=q(Pe(Oe(new URL("../dist/commands/project.js",import.meta.url).href)),"../../../");je(q(r,d.bundledPath),n,{recursive:!0});let f=xe(n).replace(/-/g,"_");for(let m 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 p=_(n,m),i=K(p,"utf-8");we(p,i.replaceAll("tdk_example",f))}}else Se("git",["clone",d.repo,n],{stdio:["ignore","pipe","pipe"],encoding:"utf-8"})}catch(r){let f=r instanceof Error?r.message:String(r),m=d.bundledPath?`Bundled example copy failed (${ge(f)}). Reinstall the Flisk CLI package and try again.`:`git clone failed: ${ge(f)}. Check you have git installed and network access.`;if(s.quiet)throw new Error(m);E(m)}if(me(),!s.quiet){console.log(g.green(`
8
8
  \u2705 Cloned "${e}" into ${u}/`)),t(`
9
9
  Next steps:`,0),t(`1. cd ${u}`),t("2. flisk doctor # check Docker/Tilt are ready"),t("3. flisk up # start the stack"),t(`
10
- Runtime readiness:`,0);for(let r of l)t(r,0)}}var $={version:"1.0",project:{name:"",version:"1.0.0"},phases:{pre_alpha:{name:"Pre-Alpha",description:"Core infrastructure and MVP services",enabledStacks:$e()},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:{}},ht=ue(new Ce("project")).description("Initialize or validate project-level master configuration").argument("[template]",`Clone a starter example instead of a blank project (${Object.keys(C).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("--config-file <path>","Load project config from existing JSON file").option("-q, --quiet","Only print what fails; used by `flisk demo`",!1).action(async(e,o)=>{let{assertMachineReadyOrExit:l,detectRuntimePrerequisites:s,formatRuntimeNextSteps:d}=await import("./cold-preflight-4I24DQLW.js");await l({scope:"scaffold"});let u=d(s()),n=!!o.quiet;if(e){await z(async()=>Fe(e,o.path,u,{quiet:n}));return}await z(async()=>{let r=F();r||(r=he(),n||(b(`\u{1F680} Initializing new Flisk project...
10
+ Runtime readiness:`,0);for(let r of l)t(r,0)}}var $={version:"1.0",project:{name:"",version:"1.0.0"},phases:{pre_alpha:{name:"Pre-Alpha",description:"Core infrastructure and MVP services",enabledStacks:$e()},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:{}},ht=ue(new Ce("project")).description("Initialize or validate project-level master configuration").argument("[template]",`Clone a starter example instead of a blank project (${Object.keys(C).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("--config-file <path>","Load project config from existing JSON file").option("-q, --quiet","Only print what fails; used by `flisk demo`",!1).action(async(e,o)=>{let{assertMachineReadyOrExit:l,detectRuntimePrerequisites:s,formatRuntimeNextSteps:d}=await import("./cold-preflight-7PFKXNK7.js");await l({scope:"scaffold"});let u=d(s()),n=!!o.quiet;if(e){await z(async()=>Fe(e,o.path,u,{quiet:n}));return}await z(async()=>{let r=F();r||(r=he(),n||(b(`\u{1F680} Initializing new Flisk project...
11
11
  `),t(`Location: ${r}
12
12
  `,0)));let f=_(r,".tdk"),m=_(f,M);if(o.check){let c=P.every(k=>S(_(r,".tdk",".tdk-out",k))),v=S(m);if(c&&v){let k=D(r);h("Project configuration is valid"),t(`Project: ${k.project.name}`,3),t(`Phases: ${Object.keys(k.phases).join(", ")}`,3),process.exit(0)}else{if(console.log(g.yellow("\u26A0\uFE0F Project configuration incomplete:")),v||t(".tdk/project.json (not found)",3),!c)for(let k of P.filter(j=>!S(_(r,".tdk/.tdk-out",j))))t(`.tdk/.tdk-out/${k} (not found)`,3);t("Run `flisk project` to create them."),process.exit(1)}}n||(B("Project Configuration"),t(`Project root: ${r}
13
13
  `,0)),S(f)||(fe(f),n||h("Created: .tdk/ directory"));let p=S(m);if(p&&!o.force){n||h(".tdk/project.json exists");let c=JSON.parse(K(m,"utf-8")),v=D(r),k=H(r),j=Q(v,k);if((j.length>0||!c.phases)&&N(m,v),j.length>0&&!n&&t(`Auto-enabled discovered service stacks: ${j.join(", ")}`,0),n||b(`
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{b}from"./chunk-GOEBYLFN.js";import{g as m,r as T}from"./chunk-PHI5AT3H.js";import{a as S}from"./chunk-GANRXKBM.js";import{F as k,H as $,ea as x,p as y,q as w}from"./chunk-4W6OXDLK.js";import{b as t,f as d,m as g,x as h}from"./chunk-XSPMLWAE.js";import{Command as R}from"commander";import{readFileSync as N}from"node:fs";import{join as O}from"node:path";function F(n){let e=n.config;return e?Array.isArray(e.featuresEnabled)&&e.featuresEnabled.includes(d)?!0:(Array.isArray(e.dependsOn)?e.dependsOn:[]).some(s=>S.includes(s)):!1}function J(n,e){let r=n.replace(/-/g,"_"),s=[];for(let o of[...e].sort((a,c)=>a.name.localeCompare(c.name))){let a=o.resources.filter(F).map(c=>c.name);a.length!==0&&s.push({name:`${r}_${o.name.replace(/-/g,"_")}`,stack:o.name,services:a.sort()})}return s.length===0?null:{name:"postgres",databases:s}}function E(n){try{let e=JSON.parse(N(O(n,".tdk",g),"utf-8"));return typeof e?.project?.name=="string"?e.project.name:null}catch{return null}}var P=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function A(n){let e=process.stderr,r=e.isTTY===!0,s=0,o=n,a,c=()=>e.write(`\r\x1B[2K${t.cyan(P[s])} ${o}`);r?(c(),a=setInterval(()=>{s=(s+1)%P.length,c()},80)):e.write(`- ${o}
2
+ import{b}from"./chunk-GOEBYLFN.js";import{g as m,r as T}from"./chunk-SLKTM6ZO.js";import{a as S}from"./chunk-BHWJU6HY.js";import{F as k,H as $,ea as x,p as y,q as w}from"./chunk-AGXA5DOQ.js";import{b as t,f as d,m as g,x as h}from"./chunk-AT5MFZ3D.js";import{Command as R}from"commander";import{readFileSync as N}from"node:fs";import{join as O}from"node:path";function F(n){let e=n.config;return e?Array.isArray(e.featuresEnabled)&&e.featuresEnabled.includes(d)?!0:(Array.isArray(e.dependsOn)?e.dependsOn:[]).some(s=>S.includes(s)):!1}function J(n,e){let r=n.replace(/-/g,"_"),s=[];for(let o of[...e].sort((a,c)=>a.name.localeCompare(c.name))){let a=o.resources.filter(F).map(c=>c.name);a.length!==0&&s.push({name:`${r}_${o.name.replace(/-/g,"_")}`,stack:o.name,services:a.sort()})}return s.length===0?null:{name:"postgres",databases:s}}function E(n){try{let e=JSON.parse(N(O(n,".tdk",g),"utf-8"));return typeof e?.project?.name=="string"?e.project.name:null}catch{return null}}var P=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function A(n){let e=process.stderr,r=e.isTTY===!0,s=0,o=n,a,c=()=>e.write(`\r\x1B[2K${t.cyan(P[s])} ${o}`);r?(c(),a=setInterval(()=>{s=(s+1)%P.length,c()},80)):e.write(`- ${o}
3
3
  `);let l=(i,u)=>{a&&clearInterval(a),e.write(`${r?"\r\x1B[2K":""}${i} ${u??o}
4
4
  `)};return{get text(){return o},set text(i){o=i,r||e.write(`- ${o}
5
5
  `)},succeed:i=>l(t.green("\u2714"),i),fail:i=>l(t.red("\u2716"),i),warn:i=>l(t.yellow("\u26A0"),i)}}async function j(n){let{resources:e}=x(n),r=await m(n,{inspectDocker:!1}),{appBase:s}=k(r?.ingressHttp,n);return e.filter(o=>o.config?.appType==="frontend").map(o=>({name:o.name,url:`${s}${$(o)}`}))}async function v(n,e=2e3){try{return(await fetch(n,{signal:AbortSignal.timeout(e)})).status<500}catch{return!1}}async function D(n,e=3e4,r){if(n.length===0)return;let s=Date.now(),o=s+e;for(;;){for(let c of n)if(await v(c.url))return c;let a=Date.now()-s;if(a>=e)return;r?.(a),await new Promise(c=>setTimeout(c,2e3))}}async function te(n,e=0,r){let s=await j(n);return D(s,e,r)}async function C(n){let e=n??h();if(!e)return console.log(t.yellow("Not in a Flisk project, so there is no frontend to open.")),console.log(t.gray("Run `flisk project --yes` first, or `flisk open` inside a project.")),null;let r=await j(e);if(r.length===0)return console.log(t.yellow("This project has no frontend service to open.")),console.log(t.gray("Start the stack with `flisk up` and add a frontend with `flisk resource`.")),null;let s=E(e);y(`Opening the first frontend of ${s??"this project"}`);for(let l of r)console.log(t.gray(` - ${l.name}: ${l.url}`));let o=A("Waiting for the frontend to answer..."),a=await D(r,12e4,l=>{o.text=`Waiting for the frontend to answer... ${Math.round(l/1e3)}s`});if(!a){o.fail("No frontend answered yet.");let i=(await m(e,{inspectDocker:!1}))?.ingressHttp,u=i?await T(i)==="in-use":!1;if(i&&!u){console.log(t.yellow(`The stack is running, but this machine cannot reach port ${i}.`)),console.log(t.gray(" Docker is not publishing the port to the host."));let{checkColima:f}=await import("./colima-SVZX2UML.js"),p=f();p.isColima&&!p.running?(console.log(t.gray(` ${p.problem??"The Colima VM is not running"}`)),console.log(t.gray(` Fix: ${p.fix??"colima start"}`))):console.log(t.gray(" Restart the Docker runtime (Docker Desktop or Colima), then run `flisk open` again."))}else console.log(t.yellow("The stack is not serving the frontend yet.")),console.log(t.gray(" - Start the stack in another terminal: flisk up")),console.log(t.gray(" - Then run this again: flisk open"));for(let f of r)console.log(t.gray(` - ${f.name}: ${f.url}`));return null}o.succeed(`The frontend is up: ${a.name}`);let c=await b(a.url);return console.log(c?t.green(`
@@ -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{a as Fu,b as Ti,c as eA,d as zf,e as Sr,f as pm,g as J2,j as Y2}from"./chunk-3QQGL3NQ.js";import{b as X2}from"./chunk-53M5D4KE.js";import{c as Z2}from"./chunk-6Y6G7PSD.js";import{a as K2,b as q2,c as V2}from"./chunk-ODVBKN6S.js";import{a as M2,b as _2,c as Jf,i as k2}from"./chunk-D2BXXJDM.js";import{b as H2,c as G2}from"./chunk-GOEBYLFN.js";import{b as L2}from"./chunk-GIMHTZNR.js";import{C as j2,D as F2,a as En,b as nS,c as xo,d as C2,e as B2,f as I2,g as y2,h as Q2,i as S2,j as v2,k as R2,l as N2,m as T2,n as Ff,o as WI,p as w2,q as aS,r as b2,s as x2,t as U2,u as O2,v as iS,w as z2}from"./chunk-7C5VA6CW.js";import{a as YI,b as KI,e as u2,f as c2,g as f2,h as d2,i as Ju,j as qI,k as g2,l as m2,m as VI,n as mm,o as oS,p as XI,q as p2}from"./chunk-NCEK46NX.js";import{a as Qh,b as i2,c as gm,d as l2,e as JI,h as h2}from"./chunk-5CFVN3W3.js";import{a as A2,c as r2,d as s2}from"./chunk-42IVF3YT.js";import"./chunk-YZRPX76N.js";import{a as t2,b as n2,c as FI,d as o2,e as a2,g as dm,h as ZI,i as PI,l as jf,m as D2,n as $I}from"./chunk-PHI5AT3H.js";import{b as E2}from"./chunk-GANRXKBM.js";import"./chunk-LI3BXAX5.js";import{$ as KR,A as _R,B as HR,C as PQ,D as $Q,F as HI,G as WQ,H as GI,J as eS,L as GR,N as kR,O as LR,P as zR,Q as Tl,R as yh,S as jR,V as FR,W as JR,X as kI,Y as um,Z as YR,_ as LI,a as qn,aa as qR,b as NR,ba as VR,c as TR,ca as XR,d as Bh,e as rm,ea as zI,f as wR,fa as jI,g as Ih,ga as ZR,h as qQ,ha as cm,i as OI,ia as PR,j as MI,k as _I,l as VQ,la as Lf,m as bR,ma as tS,n as sm,na as fm,o as XQ,oa as $R,p as ju,pa as WR,q as Vn,qa as e2,r as xR,s as UR,t as _A,v as OR,w as ZQ,y as MR}from"./chunk-4W6OXDLK.js";import{A as QR,B as Am,C as UA,D as SR,E as OA,F as zu,G as vR,H as DR,I as RR,J as ys,K as ci,L as st,M as An,N as Aa,O as Mn,P as xI,Q as Ya,R as MA,S as UI,a as CR,b as D,c as Gf,e as Wl,h as kf,j as hh,k as BR,l as IR,m as KQ,n as im,o as lm,p as Ch,s as bI,t as xA,w as yR,x as Dn,y as Nl,z as Is}from"./chunk-XSPMLWAE.js";import{a as YQ,b as Ko,c as PO,d as ct}from"./chunk-6EA4DGCY.js";var OT=Ko(py=>{"use strict";var NH=Symbol.for("react.transitional.element"),TH=Symbol.for("react.fragment");function UT(n,i,A){var u=null;if(A!==void 0&&(u=""+A),i.key!==void 0&&(u=""+i.key),"key"in i){A={};for(var d in i)d!=="key"&&(A[d]=i[d])}else A=i;return i=A.ref,{$$typeof:NH,type:n,key:u,ref:i!==void 0?i:null,props:A}}py.Fragment=TH;py.jsx=UT;py.jsxs=UT});var qT=Ko(Ut=>{"use strict";var NS=Symbol.for("react.transitional.element"),wH=Symbol.for("react.portal"),bH=Symbol.for("react.fragment"),xH=Symbol.for("react.strict_mode"),UH=Symbol.for("react.profiler"),OH=Symbol.for("react.consumer"),MH=Symbol.for("react.context"),_H=Symbol.for("react.forward_ref"),HH=Symbol.for("react.suspense"),GH=Symbol.for("react.memo"),kT=Symbol.for("react.lazy"),kH=Symbol.for("react.activity"),LH=Symbol.for("react.view_transition"),MT=Symbol.iterator;function zH(n){return n===null||typeof n!="object"?null:(n=MT&&n[MT]||n["@@iterator"],typeof n=="function"?n:null)}var LT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zT=Object.assign,jT={};function vm(n,i,A){this.props=n,this.context=i,this.refs=jT,this.updater=A||LT}vm.prototype.isReactComponent={};vm.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")};vm.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function FT(){}FT.prototype=vm.prototype;function TS(n,i,A){this.props=n,this.context=i,this.refs=jT,this.updater=A||LT}var wS=TS.prototype=new FT;wS.constructor=TS;zT(wS,vm.prototype);wS.isPureReactComponent=!0;var _T=Array.isArray;function RS(){}var Wn={H:null,A:null,T:null,S:null},JT=Object.prototype.hasOwnProperty;function bS(n,i,A){var u=A.ref;return{$$typeof:NS,type:n,key:i,ref:u!==void 0?u:null,props:A}}function jH(n,i){return bS(n.type,i,n.props)}function xS(n){return typeof n=="object"&&n!==null&&n.$$typeof===NS}function FH(n){var i={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(A){return i[A]})}var HT=/\/+/g;function DS(n,i){return typeof n=="object"&&n!==null&&n.key!=null?FH(""+n.key):i.toString(36)}function JH(n){switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:switch(typeof n.status=="string"?n.then(RS,RS):(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 Sm(n,i,A,u,d){var p=typeof n;(p==="undefined"||p==="boolean")&&(n=null);var h=!1;if(n===null)h=!0;else switch(p){case"bigint":case"string":case"number":h=!0;break;case"object":switch(n.$$typeof){case NS:case wH:h=!0;break;case kT:return h=n._init,Sm(h(n._payload),i,A,u,d)}}if(h)return d=d(n),h=u===""?"."+DS(n,0):u,_T(d)?(A="",h!=null&&(A=h.replace(HT,"$&/")+"/"),Sm(d,i,A,"",function(Q){return Q})):d!=null&&(xS(d)&&(d=jH(d,A+(d.key==null||n&&n.key===d.key?"":(""+d.key).replace(HT,"$&/")+"/")+h)),i.push(d)),1;h=0;var C=u===""?".":u+":";if(_T(n))for(var I=0;I<n.length;I++)u=n[I],p=C+DS(u,I),h+=Sm(u,i,A,p,d);else if(I=zH(n),typeof I=="function")for(n=I.call(n),I=0;!(u=n.next()).done;)u=u.value,p=C+DS(u,I++),h+=Sm(u,i,A,p,d);else if(p==="object"){if(typeof n.then=="function")return Sm(JH(n),i,A,u,d);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 h}function Ey(n,i,A){if(n==null)return n;var u=[],d=0;return Sm(n,u,"","",function(p){return i.call(A,p,d++)}),u}function YH(n){if(n._status===-1){var i=n._result,A=i();A.then(function(u){(n._status===0||n._status===-1)&&(n._status=1,n._result=u,A.status===void 0&&(A.status="fulfilled",A.value=u))},function(u){(n._status===0||n._status===-1)&&(n._status=2,n._result=u,A.status===void 0&&(A.status="rejected",A.reason=u))}),n._status===-1&&(n._status=0,n._result=A)}if(n._status===1)return n._result.default;throw n._result}var GT=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 YT(n){var i=Wn.T,A={};A.types=i!==null?i.types:null,Wn.T=A;try{var u=n(),d=Wn.S;d!==null&&d(A,u),typeof u=="object"&&u!==null&&typeof u.then=="function"&&u.then(RS,GT)}catch(p){GT(p)}finally{i!==null&&A.types!==null&&(i.types=A.types),Wn.T=i}}function KT(n){var i=Wn.T;if(i!==null){var A=i.types;A===null?i.types=[n]:A.indexOf(n)===-1&&A.push(n)}else YT(KT.bind(null,n))}var KH={map:Ey,forEach:function(n,i,A){Ey(n,function(){i.apply(this,arguments)},A)},count:function(n){var i=0;return Ey(n,function(){i++}),i},toArray:function(n){return Ey(n,function(i){return i})||[]},only:function(n){if(!xS(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};Ut.Activity=kH;Ut.Children=KH;Ut.Component=vm;Ut.Fragment=bH;Ut.Profiler=UH;Ut.PureComponent=TS;Ut.StrictMode=xH;Ut.Suspense=HH;Ut.ViewTransition=LH;Ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Wn;Ut.__COMPILER_RUNTIME={__proto__:null,c:function(n){return Wn.H.useMemoCache(n)}};Ut.addTransitionType=KT;Ut.cache=function(n){return function(){return n.apply(null,arguments)}};Ut.cacheSignal=function(){return null};Ut.cloneElement=function(n,i,A){if(n==null)throw Error("The argument must be a React element, but you passed "+n+".");var u=zT({},n.props),d=n.key;if(i!=null)for(p in i.key!==void 0&&(d=""+i.key),i)!JT.call(i,p)||p==="key"||p==="__self"||p==="__source"||p==="ref"&&i.ref===void 0||(u[p]=i[p]);var p=arguments.length-2;if(p===1)u.children=A;else if(1<p){for(var h=Array(p),C=0;C<p;C++)h[C]=arguments[C+2];u.children=h}return bS(n.type,d,u)};Ut.createContext=function(n){return n={$$typeof:MH,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:OH,_context:n},n};Ut.createElement=function(n,i,A){var u,d={},p=null;if(i!=null)for(u in i.key!==void 0&&(p=""+i.key),i)JT.call(i,u)&&u!=="key"&&u!=="__self"&&u!=="__source"&&(d[u]=i[u]);var h=arguments.length-2;if(h===1)d.children=A;else if(1<h){for(var C=Array(h),I=0;I<h;I++)C[I]=arguments[I+2];d.children=C}if(n&&n.defaultProps)for(u in h=n.defaultProps,h)d[u]===void 0&&(d[u]=h[u]);return bS(n,p,d)};Ut.createRef=function(){return{current:null}};Ut.forwardRef=function(n){return{$$typeof:_H,render:n}};Ut.isValidElement=xS;Ut.lazy=function(n){return{$$typeof:kT,_payload:{_status:-1,_result:n},_init:YH}};Ut.memo=function(n,i){return{$$typeof:GH,type:n,compare:i===void 0?null:i}};Ut.startTransition=YT;Ut.unstable_useCacheRefresh=function(){return Wn.H.useCacheRefresh()};Ut.use=function(n){return Wn.H.use(n)};Ut.useActionState=function(n,i,A){return Wn.H.useActionState(n,i,A)};Ut.useCallback=function(n,i){return Wn.H.useCallback(n,i)};Ut.useContext=function(n){return Wn.H.useContext(n)};Ut.useDebugValue=function(){};Ut.useDeferredValue=function(n,i){return Wn.H.useDeferredValue(n,i)};Ut.useEffect=function(n,i){return Wn.H.useEffect(n,i)};Ut.useEffectEvent=function(n){return Wn.H.useEffectEvent(n)};Ut.useId=function(){return Wn.H.useId()};Ut.useImperativeHandle=function(n,i,A){return Wn.H.useImperativeHandle(n,i,A)};Ut.useInsertionEffect=function(n,i){return Wn.H.useInsertionEffect(n,i)};Ut.useLayoutEffect=function(n,i){return Wn.H.useLayoutEffect(n,i)};Ut.useMemo=function(n,i){return Wn.H.useMemo(n,i)};Ut.useOptimistic=function(n,i){return Wn.H.useOptimistic(n,i)};Ut.useReducer=function(n,i,A){return Wn.H.useReducer(n,i,A)};Ut.useRef=function(n){return Wn.H.useRef(n)};Ut.useState=function(n){return Wn.H.useState(n)};Ut.useSyncExternalStore=function(n,i,A){return Wn.H.useSyncExternalStore(n,i,A)};Ut.useTransition=function(){return Wn.H.useTransition()};Ut.version="19.3.1"});var VT=Ko((Nt,hy)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function n(R,Y){Object.defineProperty(u.prototype,R,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Y[0],Y[1])}})}function i(R){return R===null||typeof R!="object"?null:(R=mt&&R[mt]||R["@@iterator"],typeof R=="function"?R:null)}function A(R,Y){R=(R=R.constructor)&&(R.displayName||R.name)||"ReactClass";var he=R+"."+Y;it[he]||(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.",Y,R),it[he]=!0)}function u(R,Y,he){this.props=R,this.context=Y,this.refs=gn,this.updater=he||Dt}function d(){}function p(R,Y,he){this.props=R,this.context=Y,this.refs=gn,this.updater=he||Dt}function h(){}function C(R){return""+R}function I(R){try{C(R);var Y=!1}catch{Y=!0}if(Y){Y=console;var he=Y.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&R[Symbol.toStringTag]||R.constructor.name||"Object";return he.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),C(R)}}function Q(R){if(R==null)return null;if(typeof R=="function")return R.$$typeof===kt?null:R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case tt:return"Fragment";case Ee:return"Profiler";case X:return"StrictMode";case jt:return"Suspense";case dt:return"SuspenseList";case Qe:return"Activity";case rt:return"ViewTransition"}if(typeof R=="object")switch(typeof R.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),R.$$typeof){case Fe:return"Portal";case Ve:return R.displayName||"Context";case Pe:return(R._context.displayName||"Context")+".Consumer";case Yt:var Y=R.render;return R=R.displayName,R||(R=Y.displayName||Y.name||"",R=R!==""?"ForwardRef("+R+")":"ForwardRef"),R;case Ae:return Y=R.displayName||null,Y!==null?Y:Q(R.type)||"Memo";case Ct:Y=R._payload,R=R._init;try{return Q(R(Y))}catch{}}return null}function U(R){if(R===tt)return"<>";if(typeof R=="object"&&R!==null&&R.$$typeof===Ct)return"<...>";try{var Y=Q(R);return Y?"<"+Y+">":"<...>"}catch{return"<...>"}}function O(){var R=Xe.A;return R===null?null:R.getOwner()}function S(){return Error("react-stack-top-frame")}function b(R){if(Gn.call(R,"key")){var Y=Object.getOwnPropertyDescriptor(R,"key").get;if(Y&&Y.isReactWarning)return!1}return R.key!==void 0}function x(R,Y){function he(){uo||(uo=!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)",Y))}he.isReactWarning=!0,Object.defineProperty(R,"key",{get:he,configurable:!0})}function H(){var R=Q(this.type);return ht[R]||(ht[R]=!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.")),R=this.props.ref,R!==void 0?R:null}function j(R,Y,he,G,te,nt){var Ne=he.ref;return R={$$typeof:He,type:R,key:Y,props:he,_owner:G},(Ne!==void 0?Ne:null)!==null?Object.defineProperty(R,"ref",{enumerable:!1,get:H}):Object.defineProperty(R,"ref",{enumerable:!1,value:null}),R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(R,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(R,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(R,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:nt}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R}function F(R,Y){return Y=j(R.type,Y,R.props,R._owner,R._debugStack,R._debugTask),R._store&&(Y._store.validated=R._store.validated),Y}function xe(R){ge(R)?R._store&&(R._store.validated=1):typeof R=="object"&&R!==null&&R.$$typeof===Ct&&(R._payload.status==="fulfilled"?ge(R._payload.value)&&R._payload.value._store&&(R._payload.value._store.validated=1):R._store&&(R._store.validated=1))}function ge(R){return typeof R=="object"&&R!==null&&R.$$typeof===He}function qe(R){var Y={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(he){return Y[he]})}function Re(R,Y){return typeof R=="object"&&R!==null&&R.key!=null?(I(R.key),qe(""+R.key)):Y.toString(36)}function je(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(h,h):(R.status="pending",R.then(function(Y){R.status==="pending"&&(R.status="fulfilled",R.value=Y)},function(Y){R.status==="pending"&&(R.status="rejected",R.reason=Y)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function et(R,Y,he,G,te){var nt=typeof R;(nt==="undefined"||nt==="boolean")&&(R=null);var Ne=!1;if(R===null)Ne=!0;else switch(nt){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(R.$$typeof){case He:case Fe:Ne=!0;break;case Ct:return Ne=R._init,et(Ne(R._payload),Y,he,G,te)}}if(Ne){Ne=R,te=te(Ne);var Ie=G===""?"."+Re(Ne,0):G;return Gt(te)?(he="",Ie!=null&&(he=Ie.replace(qo,"$&/")+"/"),et(te,Y,he,"",function(kn){return kn})):te!=null&&(ge(te)&&(te.key!=null&&(Ne&&Ne.key===te.key||I(te.key)),he=F(te,he+(te.key==null||Ne&&Ne.key===te.key?"":(""+te.key).replace(qo,"$&/")+"/")+Ie),G!==""&&Ne!=null&&ge(Ne)&&Ne.key==null&&Ne._store&&!Ne._store.validated&&(he._store.validated=2),te=he),Y.push(te)),1}if(Ne=0,Ie=G===""?".":G+":",Gt(R))for(var Le=0;Le<R.length;Le++)G=R[Le],nt=Ie+Re(G,Le),Ne+=et(G,Y,he,nt,te);else if(Le=i(R),typeof Le=="function")for(Le===R.entries&&(sa||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),sa=!0),R=Le.call(R),Le=0;!(G=R.next()).done;)G=G.value,nt=Ie+Re(G,Le++),Ne+=et(G,Y,he,nt,te);else if(nt==="object"){if(typeof R.then=="function")return et(je(R),Y,he,G,te);throw Y=String(R),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function Ue(R,Y,he){if(R==null)return R;var G=[],te=0;return et(R,G,"","",function(nt){return Y.call(he,nt,te++)}),G}function Be(R){if(R._status===-1){var Y=null,he=null,G=R._ioInfo;G!=null&&(G.start=G.end=performance.now(),G.value=new Promise(function(Ne,Ie){Y=Ne,he=Ie})),G=R._result;var te=G();if(te.then(function(Ne){if(R._status===0||R._status===-1){R._status=1,R._result=Ne;var Ie=R._ioInfo;if(Ie!=null){Ie.end=performance.now();var Le=Ne?.default;Y(Le),Ie.value.status="fulfilled",Ie.value.value=Le}te.status===void 0&&(te.status="fulfilled",te.value=Ne)}},function(Ne){if(R._status===0||R._status===-1){R._status=2,R._result=Ne;var Ie=R._ioInfo;Ie!=null&&(Ie.end=performance.now(),Ie.value.then(h,h),he(Ne),Ie.value.status="rejected",Ie.value.reason=Ne),te.status===void 0&&(te.status="rejected",te.reason=Ne)}}),G=R._ioInfo,G!=null){var nt=te.displayName;typeof nt=="string"&&(G.name=nt)}R._status===-1&&(R._status=0,R._result=te)}if(R._status===1)return G=R._result,G===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
3
+ import{a as Fu,b as Ti,c as eA,d as zf,e as Sr,f as pm,g as J2,j as Y2}from"./chunk-YTXQPTCN.js";import{b as X2}from"./chunk-53M5D4KE.js";import{c as Z2}from"./chunk-FAHNFTWN.js";import{a as K2,b as q2,c as V2}from"./chunk-D2DIEX5E.js";import{a as M2,b as _2,c as Jf,i as k2}from"./chunk-Z2C55UFP.js";import{b as H2,c as G2}from"./chunk-GOEBYLFN.js";import{b as L2}from"./chunk-GIMHTZNR.js";import{C as j2,D as F2,a as En,b as nS,c as xo,d as C2,e as B2,f as I2,g as y2,h as Q2,i as S2,j as v2,k as R2,l as N2,m as T2,n as Ff,o as WI,p as w2,q as aS,r as b2,s as x2,t as U2,u as O2,v as iS,w as z2}from"./chunk-GB6DJJ5N.js";import{a as YI,b as KI,e as u2,f as c2,g as f2,h as d2,i as Ju,j as qI,k as g2,l as m2,m as VI,n as mm,o as oS,p as XI,q as p2}from"./chunk-ODYL6LET.js";import{a as Qh,b as i2,c as gm,d as l2,e as JI,h as h2}from"./chunk-5LRMAY67.js";import{a as A2,c as r2,d as s2}from"./chunk-42IVF3YT.js";import"./chunk-YZRPX76N.js";import{a as t2,b as n2,c as FI,d as o2,e as a2,g as dm,h as ZI,i as PI,l as jf,m as D2,n as $I}from"./chunk-SLKTM6ZO.js";import{b as E2}from"./chunk-BHWJU6HY.js";import"./chunk-DWR3LLHS.js";import{$ as KR,A as _R,B as HR,C as PQ,D as $Q,F as HI,G as WQ,H as GI,J as eS,L as GR,N as kR,O as LR,P as zR,Q as Tl,R as yh,S as jR,V as FR,W as JR,X as kI,Y as um,Z as YR,_ as LI,a as qn,aa as qR,b as NR,ba as VR,c as TR,ca as XR,d as Bh,e as rm,ea as zI,f as wR,fa as jI,g as Ih,ga as ZR,h as qQ,ha as cm,i as OI,ia as PR,j as MI,k as _I,l as VQ,la as Lf,m as bR,ma as tS,n as sm,na as fm,o as XQ,oa as $R,p as ju,pa as WR,q as Vn,qa as e2,r as xR,s as UR,t as _A,v as OR,w as ZQ,y as MR}from"./chunk-AGXA5DOQ.js";import{A as QR,B as Am,C as UA,D as SR,E as OA,F as zu,G as vR,H as DR,I as RR,J as ys,K as ci,L as st,M as An,N as Aa,O as Mn,P as xI,Q as Ya,R as MA,S as UI,a as CR,b as D,c as Gf,e as Wl,h as kf,j as hh,k as BR,l as IR,m as KQ,n as im,o as lm,p as Ch,s as bI,t as xA,w as yR,x as Dn,y as Nl,z as Is}from"./chunk-AT5MFZ3D.js";import{a as YQ,b as Ko,c as PO,d as ct}from"./chunk-6EA4DGCY.js";var OT=Ko(py=>{"use strict";var NH=Symbol.for("react.transitional.element"),TH=Symbol.for("react.fragment");function UT(n,i,A){var u=null;if(A!==void 0&&(u=""+A),i.key!==void 0&&(u=""+i.key),"key"in i){A={};for(var d in i)d!=="key"&&(A[d]=i[d])}else A=i;return i=A.ref,{$$typeof:NH,type:n,key:u,ref:i!==void 0?i:null,props:A}}py.Fragment=TH;py.jsx=UT;py.jsxs=UT});var qT=Ko(Ut=>{"use strict";var NS=Symbol.for("react.transitional.element"),wH=Symbol.for("react.portal"),bH=Symbol.for("react.fragment"),xH=Symbol.for("react.strict_mode"),UH=Symbol.for("react.profiler"),OH=Symbol.for("react.consumer"),MH=Symbol.for("react.context"),_H=Symbol.for("react.forward_ref"),HH=Symbol.for("react.suspense"),GH=Symbol.for("react.memo"),kT=Symbol.for("react.lazy"),kH=Symbol.for("react.activity"),LH=Symbol.for("react.view_transition"),MT=Symbol.iterator;function zH(n){return n===null||typeof n!="object"?null:(n=MT&&n[MT]||n["@@iterator"],typeof n=="function"?n:null)}var LT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zT=Object.assign,jT={};function vm(n,i,A){this.props=n,this.context=i,this.refs=jT,this.updater=A||LT}vm.prototype.isReactComponent={};vm.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")};vm.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function FT(){}FT.prototype=vm.prototype;function TS(n,i,A){this.props=n,this.context=i,this.refs=jT,this.updater=A||LT}var wS=TS.prototype=new FT;wS.constructor=TS;zT(wS,vm.prototype);wS.isPureReactComponent=!0;var _T=Array.isArray;function RS(){}var Wn={H:null,A:null,T:null,S:null},JT=Object.prototype.hasOwnProperty;function bS(n,i,A){var u=A.ref;return{$$typeof:NS,type:n,key:i,ref:u!==void 0?u:null,props:A}}function jH(n,i){return bS(n.type,i,n.props)}function xS(n){return typeof n=="object"&&n!==null&&n.$$typeof===NS}function FH(n){var i={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(A){return i[A]})}var HT=/\/+/g;function DS(n,i){return typeof n=="object"&&n!==null&&n.key!=null?FH(""+n.key):i.toString(36)}function JH(n){switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:switch(typeof n.status=="string"?n.then(RS,RS):(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 Sm(n,i,A,u,d){var p=typeof n;(p==="undefined"||p==="boolean")&&(n=null);var h=!1;if(n===null)h=!0;else switch(p){case"bigint":case"string":case"number":h=!0;break;case"object":switch(n.$$typeof){case NS:case wH:h=!0;break;case kT:return h=n._init,Sm(h(n._payload),i,A,u,d)}}if(h)return d=d(n),h=u===""?"."+DS(n,0):u,_T(d)?(A="",h!=null&&(A=h.replace(HT,"$&/")+"/"),Sm(d,i,A,"",function(Q){return Q})):d!=null&&(xS(d)&&(d=jH(d,A+(d.key==null||n&&n.key===d.key?"":(""+d.key).replace(HT,"$&/")+"/")+h)),i.push(d)),1;h=0;var C=u===""?".":u+":";if(_T(n))for(var I=0;I<n.length;I++)u=n[I],p=C+DS(u,I),h+=Sm(u,i,A,p,d);else if(I=zH(n),typeof I=="function")for(n=I.call(n),I=0;!(u=n.next()).done;)u=u.value,p=C+DS(u,I++),h+=Sm(u,i,A,p,d);else if(p==="object"){if(typeof n.then=="function")return Sm(JH(n),i,A,u,d);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 h}function Ey(n,i,A){if(n==null)return n;var u=[],d=0;return Sm(n,u,"","",function(p){return i.call(A,p,d++)}),u}function YH(n){if(n._status===-1){var i=n._result,A=i();A.then(function(u){(n._status===0||n._status===-1)&&(n._status=1,n._result=u,A.status===void 0&&(A.status="fulfilled",A.value=u))},function(u){(n._status===0||n._status===-1)&&(n._status=2,n._result=u,A.status===void 0&&(A.status="rejected",A.reason=u))}),n._status===-1&&(n._status=0,n._result=A)}if(n._status===1)return n._result.default;throw n._result}var GT=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 YT(n){var i=Wn.T,A={};A.types=i!==null?i.types:null,Wn.T=A;try{var u=n(),d=Wn.S;d!==null&&d(A,u),typeof u=="object"&&u!==null&&typeof u.then=="function"&&u.then(RS,GT)}catch(p){GT(p)}finally{i!==null&&A.types!==null&&(i.types=A.types),Wn.T=i}}function KT(n){var i=Wn.T;if(i!==null){var A=i.types;A===null?i.types=[n]:A.indexOf(n)===-1&&A.push(n)}else YT(KT.bind(null,n))}var KH={map:Ey,forEach:function(n,i,A){Ey(n,function(){i.apply(this,arguments)},A)},count:function(n){var i=0;return Ey(n,function(){i++}),i},toArray:function(n){return Ey(n,function(i){return i})||[]},only:function(n){if(!xS(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};Ut.Activity=kH;Ut.Children=KH;Ut.Component=vm;Ut.Fragment=bH;Ut.Profiler=UH;Ut.PureComponent=TS;Ut.StrictMode=xH;Ut.Suspense=HH;Ut.ViewTransition=LH;Ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Wn;Ut.__COMPILER_RUNTIME={__proto__:null,c:function(n){return Wn.H.useMemoCache(n)}};Ut.addTransitionType=KT;Ut.cache=function(n){return function(){return n.apply(null,arguments)}};Ut.cacheSignal=function(){return null};Ut.cloneElement=function(n,i,A){if(n==null)throw Error("The argument must be a React element, but you passed "+n+".");var u=zT({},n.props),d=n.key;if(i!=null)for(p in i.key!==void 0&&(d=""+i.key),i)!JT.call(i,p)||p==="key"||p==="__self"||p==="__source"||p==="ref"&&i.ref===void 0||(u[p]=i[p]);var p=arguments.length-2;if(p===1)u.children=A;else if(1<p){for(var h=Array(p),C=0;C<p;C++)h[C]=arguments[C+2];u.children=h}return bS(n.type,d,u)};Ut.createContext=function(n){return n={$$typeof:MH,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:OH,_context:n},n};Ut.createElement=function(n,i,A){var u,d={},p=null;if(i!=null)for(u in i.key!==void 0&&(p=""+i.key),i)JT.call(i,u)&&u!=="key"&&u!=="__self"&&u!=="__source"&&(d[u]=i[u]);var h=arguments.length-2;if(h===1)d.children=A;else if(1<h){for(var C=Array(h),I=0;I<h;I++)C[I]=arguments[I+2];d.children=C}if(n&&n.defaultProps)for(u in h=n.defaultProps,h)d[u]===void 0&&(d[u]=h[u]);return bS(n,p,d)};Ut.createRef=function(){return{current:null}};Ut.forwardRef=function(n){return{$$typeof:_H,render:n}};Ut.isValidElement=xS;Ut.lazy=function(n){return{$$typeof:kT,_payload:{_status:-1,_result:n},_init:YH}};Ut.memo=function(n,i){return{$$typeof:GH,type:n,compare:i===void 0?null:i}};Ut.startTransition=YT;Ut.unstable_useCacheRefresh=function(){return Wn.H.useCacheRefresh()};Ut.use=function(n){return Wn.H.use(n)};Ut.useActionState=function(n,i,A){return Wn.H.useActionState(n,i,A)};Ut.useCallback=function(n,i){return Wn.H.useCallback(n,i)};Ut.useContext=function(n){return Wn.H.useContext(n)};Ut.useDebugValue=function(){};Ut.useDeferredValue=function(n,i){return Wn.H.useDeferredValue(n,i)};Ut.useEffect=function(n,i){return Wn.H.useEffect(n,i)};Ut.useEffectEvent=function(n){return Wn.H.useEffectEvent(n)};Ut.useId=function(){return Wn.H.useId()};Ut.useImperativeHandle=function(n,i,A){return Wn.H.useImperativeHandle(n,i,A)};Ut.useInsertionEffect=function(n,i){return Wn.H.useInsertionEffect(n,i)};Ut.useLayoutEffect=function(n,i){return Wn.H.useLayoutEffect(n,i)};Ut.useMemo=function(n,i){return Wn.H.useMemo(n,i)};Ut.useOptimistic=function(n,i){return Wn.H.useOptimistic(n,i)};Ut.useReducer=function(n,i,A){return Wn.H.useReducer(n,i,A)};Ut.useRef=function(n){return Wn.H.useRef(n)};Ut.useState=function(n){return Wn.H.useState(n)};Ut.useSyncExternalStore=function(n,i,A){return Wn.H.useSyncExternalStore(n,i,A)};Ut.useTransition=function(){return Wn.H.useTransition()};Ut.version="19.3.1"});var VT=Ko((Nt,hy)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function n(R,Y){Object.defineProperty(u.prototype,R,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Y[0],Y[1])}})}function i(R){return R===null||typeof R!="object"?null:(R=mt&&R[mt]||R["@@iterator"],typeof R=="function"?R:null)}function A(R,Y){R=(R=R.constructor)&&(R.displayName||R.name)||"ReactClass";var he=R+"."+Y;it[he]||(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.",Y,R),it[he]=!0)}function u(R,Y,he){this.props=R,this.context=Y,this.refs=gn,this.updater=he||Dt}function d(){}function p(R,Y,he){this.props=R,this.context=Y,this.refs=gn,this.updater=he||Dt}function h(){}function C(R){return""+R}function I(R){try{C(R);var Y=!1}catch{Y=!0}if(Y){Y=console;var he=Y.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&R[Symbol.toStringTag]||R.constructor.name||"Object";return he.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),C(R)}}function Q(R){if(R==null)return null;if(typeof R=="function")return R.$$typeof===kt?null:R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case tt:return"Fragment";case Ee:return"Profiler";case X:return"StrictMode";case jt:return"Suspense";case dt:return"SuspenseList";case Qe:return"Activity";case rt:return"ViewTransition"}if(typeof R=="object")switch(typeof R.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),R.$$typeof){case Fe:return"Portal";case Ve:return R.displayName||"Context";case Pe:return(R._context.displayName||"Context")+".Consumer";case Yt:var Y=R.render;return R=R.displayName,R||(R=Y.displayName||Y.name||"",R=R!==""?"ForwardRef("+R+")":"ForwardRef"),R;case Ae:return Y=R.displayName||null,Y!==null?Y:Q(R.type)||"Memo";case Ct:Y=R._payload,R=R._init;try{return Q(R(Y))}catch{}}return null}function U(R){if(R===tt)return"<>";if(typeof R=="object"&&R!==null&&R.$$typeof===Ct)return"<...>";try{var Y=Q(R);return Y?"<"+Y+">":"<...>"}catch{return"<...>"}}function O(){var R=Xe.A;return R===null?null:R.getOwner()}function S(){return Error("react-stack-top-frame")}function b(R){if(Gn.call(R,"key")){var Y=Object.getOwnPropertyDescriptor(R,"key").get;if(Y&&Y.isReactWarning)return!1}return R.key!==void 0}function x(R,Y){function he(){uo||(uo=!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)",Y))}he.isReactWarning=!0,Object.defineProperty(R,"key",{get:he,configurable:!0})}function H(){var R=Q(this.type);return ht[R]||(ht[R]=!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.")),R=this.props.ref,R!==void 0?R:null}function j(R,Y,he,G,te,nt){var Ne=he.ref;return R={$$typeof:He,type:R,key:Y,props:he,_owner:G},(Ne!==void 0?Ne:null)!==null?Object.defineProperty(R,"ref",{enumerable:!1,get:H}):Object.defineProperty(R,"ref",{enumerable:!1,value:null}),R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(R,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(R,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(R,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:nt}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R}function F(R,Y){return Y=j(R.type,Y,R.props,R._owner,R._debugStack,R._debugTask),R._store&&(Y._store.validated=R._store.validated),Y}function xe(R){ge(R)?R._store&&(R._store.validated=1):typeof R=="object"&&R!==null&&R.$$typeof===Ct&&(R._payload.status==="fulfilled"?ge(R._payload.value)&&R._payload.value._store&&(R._payload.value._store.validated=1):R._store&&(R._store.validated=1))}function ge(R){return typeof R=="object"&&R!==null&&R.$$typeof===He}function qe(R){var Y={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(he){return Y[he]})}function Re(R,Y){return typeof R=="object"&&R!==null&&R.key!=null?(I(R.key),qe(""+R.key)):Y.toString(36)}function je(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(h,h):(R.status="pending",R.then(function(Y){R.status==="pending"&&(R.status="fulfilled",R.value=Y)},function(Y){R.status==="pending"&&(R.status="rejected",R.reason=Y)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function et(R,Y,he,G,te){var nt=typeof R;(nt==="undefined"||nt==="boolean")&&(R=null);var Ne=!1;if(R===null)Ne=!0;else switch(nt){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(R.$$typeof){case He:case Fe:Ne=!0;break;case Ct:return Ne=R._init,et(Ne(R._payload),Y,he,G,te)}}if(Ne){Ne=R,te=te(Ne);var Ie=G===""?"."+Re(Ne,0):G;return Gt(te)?(he="",Ie!=null&&(he=Ie.replace(qo,"$&/")+"/"),et(te,Y,he,"",function(kn){return kn})):te!=null&&(ge(te)&&(te.key!=null&&(Ne&&Ne.key===te.key||I(te.key)),he=F(te,he+(te.key==null||Ne&&Ne.key===te.key?"":(""+te.key).replace(qo,"$&/")+"/")+Ie),G!==""&&Ne!=null&&ge(Ne)&&Ne.key==null&&Ne._store&&!Ne._store.validated&&(he._store.validated=2),te=he),Y.push(te)),1}if(Ne=0,Ie=G===""?".":G+":",Gt(R))for(var Le=0;Le<R.length;Le++)G=R[Le],nt=Ie+Re(G,Le),Ne+=et(G,Y,he,nt,te);else if(Le=i(R),typeof Le=="function")for(Le===R.entries&&(sa||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),sa=!0),R=Le.call(R),Le=0;!(G=R.next()).done;)G=G.value,nt=Ie+Re(G,Le++),Ne+=et(G,Y,he,nt,te);else if(nt==="object"){if(typeof R.then=="function")return et(je(R),Y,he,G,te);throw Y=String(R),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function Ue(R,Y,he){if(R==null)return R;var G=[],te=0;return et(R,G,"","",function(nt){return Y.call(he,nt,te++)}),G}function Be(R){if(R._status===-1){var Y=null,he=null,G=R._ioInfo;G!=null&&(G.start=G.end=performance.now(),G.value=new Promise(function(Ne,Ie){Y=Ne,he=Ie})),G=R._result;var te=G();if(te.then(function(Ne){if(R._status===0||R._status===-1){R._status=1,R._result=Ne;var Ie=R._ioInfo;if(Ie!=null){Ie.end=performance.now();var Le=Ne?.default;Y(Le),Ie.value.status="fulfilled",Ie.value.value=Le}te.status===void 0&&(te.status="fulfilled",te.value=Ne)}},function(Ne){if(R._status===0||R._status===-1){R._status=2,R._result=Ne;var Ie=R._ioInfo;Ie!=null&&(Ie.end=performance.now(),Ie.value.then(h,h),he(Ne),Ie.value.status="rejected",Ie.value.reason=Ne),te.status===void 0&&(te.status="rejected",te.reason=Ne)}}),G=R._ioInfo,G!=null){var nt=te.displayName;typeof nt=="string"&&(G.name=nt)}R._status===-1&&(R._status=0,R._result=te)}if(R._status===1)return G=R._result,G===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'))
@@ -1830,7 +1830,7 @@ Fix: ${C}`),console.error(D.red(`\u2717 ${h}`)),console.error(D.gray(` Fix: ${C
1830
1830
  `)),MA(u.join(`
1831
1831
  `)),A(q5))}function Z5(n,i,A=Nl(),u=process.exit){if(i.ignoreVersion){console.warn(D.yellow("Warning: --ignore-version set; minTdkVersion was not checked."));return}let d=U2(n,A);d.status==="none"||d.status==="ok"||(i.onFail?.(`${d.message}
1832
1832
  ${d.fix}`),MA(`${d.message}
1833
- ${d.fix}`),u(1))}var oO=Symbol("startup-failed");async function P5(n,i,A=process.exit){let u=await Promise.race([n,i.then(()=>oO)]);return u===oO&&A(1),u}function $5(n,i=3e4){return new Promise(A=>{let u=Date.now()+i,d=()=>{let p=j5({host:"127.0.0.1",port:n}),h=!1,C=I=>{h||(h=!0,p.destroy(),I||Date.now()>=u?A(I):setTimeout(d,250))};p.once("connect",()=>C(!0)),p.once("error",()=>C(!1))};d()})}function W5(n,i){if(i===void 0)return;if(!n)throw An.notInProject();let A=KU(n,i);return VU(n),A}function eL(n){let i=n instanceof st?n.suggestions:[];return{failure:{code:n instanceof LA?n.code:"ENV_FILE_INVALID",message:ys(n),...i.length>0?{suggestions:i}:{}},exitCode:n instanceof st?n.exitCode:2}}var aO=new F5("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 flisk 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("--env-file <path>","Use this project env file for the run instead of .env (for example: --env-file .env.integration)").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 A=i.json?sy("UP_FAILED","flisk up"):void 0;i.json&&(i.quiet=!0);let u=vS(process.env.TILT_PORT);u.ok||(A?.({ok:!1},[{code:"INVALID_TILT_PORT",message:u.message}]),Ya(u.message));let d=u.port,p=Dn();p&&Z5(p,{ignoreVersion:i.ignoreVersion,onFail:b=>A?.({ok:!1},[{code:"TDK_VERSION_TOO_OLD",message:b}])});let h=p,C;if(i.envFile===void 0&&delete process.env[Q0],i.envFile!==void 0){try{C=W5(h,i.envFile)}catch(b){let{failure:x,exitCode:H}=eL(b);A?.({ok:!1},[x]),Ya(x.message,H,x.suggestions)}if(C&&h){qU(C),i.quiet||console.log(D.gray(`Using env file: ${C.relativePath} (the project .env is not read in this run)`));let b=XU(h,C);b&&console.warn(D.yellow(b))}}let I=i.dryRun?null:await Y5();I&&(A?.({ok:!1},[{code:"HOST_UNSUPPORTED",message:I}]),Ya(I));let Q=J5(process.platform,process.env.TDK_ALLOW_NATIVE_WINDOWS);Q&&Ya(Q);let U=Dn(),O;if(U){try{O=zI(U),jI(O.problems)}catch{}O&&PU(U,{resources:O.resources,onInvalid:b=>A?.({ok:!1},[{code:"INVALID_SCHEMA_VERSION",message:b}])})}if(!i.dryRun){let{assertMachineReadyOrExit:b}=await import("./cold-preflight-4I24DQLW.js");await b()}let S=async()=>{let b=i.dryRun?Aa():Dn(),x=b??process.cwd(),H=PR(b&&b===U?O:void 0),j,F=[];if((!i.only||n)&&(j=Lf(H),F=j.map(Ae=>Ae.name)),i.only){if(n&&!fm(n,H)){let Qe=An.stackNotFound(n,F);A?.({ok:!1},[nS(Qe).error]),Qe.exit()}let Ae=n?tS(n,H):H,Ct=WU(i.only,Ae);if(Ct.length>0){let Qe=Ae.map(mt=>mt.name),rt=An.unknownServices(Ct,Qe);A?.({ok:!1},[{code:"UNKNOWN_SERVICE",message:rt.message,...rt.suggestions.length>0?{suggestions:rt.suggestions}:{}}]),rt.exit()}}b&&X5(b,{ignoreDrift:i.ignoreDrift,resources:H,onDrift:Ae=>A?.({ok:!1},[{code:"DRIFT_DETECTED",message:Ae}])}),b&&x2(b,{resources:H,onInvalid:Ae=>A?.({ok:!1},[{code:"INVALID_SERVICE_CONFIG",message:Ae}])}),b&&!A&&!i.quiet&&b2(b,H);let xe=await dm(x,{inspectDocker:!i.dryRun});if(!i.dryRun){if(b&&!C){let Qe=MR(x);Qe.length>0&&!i.quiet&&console.log(D.gray(`Added ${Qe.join(", ")} to .env (generated; existing values unchanged)`))}b&&!z5(tO(x,".tdk",".tdk-out","Tiltfile"))&&(i.quiet||console.log(D.gray("No generated Tiltfile yet; generating .tdk/.tdk-out/ ...")),await qI(x,{quiet:i.quiet}));let Ae=m2(x);Ae.length>0&&i.verbose&&!i.quiet&&console.log(D.gray(`Refreshed runtime assets: ${Ae.join(", ")}`));let Ct=J2(x,H);Ct.length>0&&!i.quiet&&console.log(D.gray(`Added ${Ct.join(", ")} to the pre_alpha phase in .tdk/project.json`))}let ge,qe,Re=[];if(n){if(ge=tS(n,H),ge.length===0){let Ae=An.stackNotFound(n,F);A?.({ok:!1},[nS(Ae).error]),Ae.exit()}Re=ge.map(Ae=>Ae.name),qe=`stack "${n}"`}else{ge=H;let Ae=j??Lf(H);qe=`all stacks (${qn(Ae.length,"stack")}, ${qn(ge.length,"service")})`}let je=[];if(i.only){let Ae=eO(i.only,H);ge=Ae.selected,je=Ae.dependencies,Re=ge.map(Ct=>Ct.name),qe=`${qn(i.only.length,"requested service")}${je.length>0?` plus ${je.join(", ")}`:""}`}i.verbose&&!i.quiet&&console.log(D.gray(`Found ${qn(ge.length,"service")} in ${qe}`));let et=ge.map(Ae=>Ae.name);if(!i.quiet){console.log(D.blue(`${i.dryRun?"Would start":"Starting"} ${qn(et.length,"service")} from ${qe}...`));for(let mt of et)console.log(D.gray(` - ${mt}`));let{appBase:Ae,apiBase:Ct}=HI(xe.ingressHttp),Qe=ge.filter(mt=>mt.config?.appType==="frontend"),rt=ge.filter(mt=>_A(mt.config?.appType));if(Qe.length>0){console.log(D.blue(`
1833
+ ${d.fix}`),u(1))}var oO=Symbol("startup-failed");async function P5(n,i,A=process.exit){let u=await Promise.race([n,i.then(()=>oO)]);return u===oO&&A(1),u}function $5(n,i=3e4){return new Promise(A=>{let u=Date.now()+i,d=()=>{let p=j5({host:"127.0.0.1",port:n}),h=!1,C=I=>{h||(h=!0,p.destroy(),I||Date.now()>=u?A(I):setTimeout(d,250))};p.once("connect",()=>C(!0)),p.once("error",()=>C(!1))};d()})}function W5(n,i){if(i===void 0)return;if(!n)throw An.notInProject();let A=KU(n,i);return VU(n),A}function eL(n){let i=n instanceof st?n.suggestions:[];return{failure:{code:n instanceof LA?n.code:"ENV_FILE_INVALID",message:ys(n),...i.length>0?{suggestions:i}:{}},exitCode:n instanceof st?n.exitCode:2}}var aO=new F5("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 flisk 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("--env-file <path>","Use this project env file for the run instead of .env (for example: --env-file .env.integration)").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 A=i.json?sy("UP_FAILED","flisk up"):void 0;i.json&&(i.quiet=!0);let u=vS(process.env.TILT_PORT);u.ok||(A?.({ok:!1},[{code:"INVALID_TILT_PORT",message:u.message}]),Ya(u.message));let d=u.port,p=Dn();p&&Z5(p,{ignoreVersion:i.ignoreVersion,onFail:b=>A?.({ok:!1},[{code:"TDK_VERSION_TOO_OLD",message:b}])});let h=p,C;if(i.envFile===void 0&&delete process.env[Q0],i.envFile!==void 0){try{C=W5(h,i.envFile)}catch(b){let{failure:x,exitCode:H}=eL(b);A?.({ok:!1},[x]),Ya(x.message,H,x.suggestions)}if(C&&h){qU(C),i.quiet||console.log(D.gray(`Using env file: ${C.relativePath} (the project .env is not read in this run)`));let b=XU(h,C);b&&console.warn(D.yellow(b))}}let I=i.dryRun?null:await Y5();I&&(A?.({ok:!1},[{code:"HOST_UNSUPPORTED",message:I}]),Ya(I));let Q=J5(process.platform,process.env.TDK_ALLOW_NATIVE_WINDOWS);Q&&Ya(Q);let U=Dn(),O;if(U){try{O=zI(U),jI(O.problems)}catch{}O&&PU(U,{resources:O.resources,onInvalid:b=>A?.({ok:!1},[{code:"INVALID_SCHEMA_VERSION",message:b}])})}if(!i.dryRun){let{assertMachineReadyOrExit:b}=await import("./cold-preflight-7PFKXNK7.js");await b()}let S=async()=>{let b=i.dryRun?Aa():Dn(),x=b??process.cwd(),H=PR(b&&b===U?O:void 0),j,F=[];if((!i.only||n)&&(j=Lf(H),F=j.map(Ae=>Ae.name)),i.only){if(n&&!fm(n,H)){let Qe=An.stackNotFound(n,F);A?.({ok:!1},[nS(Qe).error]),Qe.exit()}let Ae=n?tS(n,H):H,Ct=WU(i.only,Ae);if(Ct.length>0){let Qe=Ae.map(mt=>mt.name),rt=An.unknownServices(Ct,Qe);A?.({ok:!1},[{code:"UNKNOWN_SERVICE",message:rt.message,...rt.suggestions.length>0?{suggestions:rt.suggestions}:{}}]),rt.exit()}}b&&X5(b,{ignoreDrift:i.ignoreDrift,resources:H,onDrift:Ae=>A?.({ok:!1},[{code:"DRIFT_DETECTED",message:Ae}])}),b&&x2(b,{resources:H,onInvalid:Ae=>A?.({ok:!1},[{code:"INVALID_SERVICE_CONFIG",message:Ae}])}),b&&!A&&!i.quiet&&b2(b,H);let xe=await dm(x,{inspectDocker:!i.dryRun});if(!i.dryRun){if(b&&!C){let Qe=MR(x);Qe.length>0&&!i.quiet&&console.log(D.gray(`Added ${Qe.join(", ")} to .env (generated; existing values unchanged)`))}b&&!z5(tO(x,".tdk",".tdk-out","Tiltfile"))&&(i.quiet||console.log(D.gray("No generated Tiltfile yet; generating .tdk/.tdk-out/ ...")),await qI(x,{quiet:i.quiet}));let Ae=m2(x);Ae.length>0&&i.verbose&&!i.quiet&&console.log(D.gray(`Refreshed runtime assets: ${Ae.join(", ")}`));let Ct=J2(x,H);Ct.length>0&&!i.quiet&&console.log(D.gray(`Added ${Ct.join(", ")} to the pre_alpha phase in .tdk/project.json`))}let ge,qe,Re=[];if(n){if(ge=tS(n,H),ge.length===0){let Ae=An.stackNotFound(n,F);A?.({ok:!1},[nS(Ae).error]),Ae.exit()}Re=ge.map(Ae=>Ae.name),qe=`stack "${n}"`}else{ge=H;let Ae=j??Lf(H);qe=`all stacks (${qn(Ae.length,"stack")}, ${qn(ge.length,"service")})`}let je=[];if(i.only){let Ae=eO(i.only,H);ge=Ae.selected,je=Ae.dependencies,Re=ge.map(Ct=>Ct.name),qe=`${qn(i.only.length,"requested service")}${je.length>0?` plus ${je.join(", ")}`:""}`}i.verbose&&!i.quiet&&console.log(D.gray(`Found ${qn(ge.length,"service")} in ${qe}`));let et=ge.map(Ae=>Ae.name);if(!i.quiet){console.log(D.blue(`${i.dryRun?"Would start":"Starting"} ${qn(et.length,"service")} from ${qe}...`));for(let mt of et)console.log(D.gray(` - ${mt}`));let{appBase:Ae,apiBase:Ct}=HI(xe.ingressHttp),Qe=ge.filter(mt=>mt.config?.appType==="frontend"),rt=ge.filter(mt=>_A(mt.config?.appType));if(Qe.length>0){console.log(D.blue(`
1834
1834
  \u{1F30D} Frontend URLs:`));for(let mt of Qe){let it=mt.config?.basePath??`/${mt.name}`;console.log(D.gray(` - ${mt.name}: ${Ae}${D.cyan(WQ(it))}`))}}if(rt.length>0){console.log(D.blue(`
1835
1835
  \u{1F527} Backend API URLs:`));for(let mt of rt){let it=mt.name.replace(/-api$/,""),Dt=mt.config?.apiPath??`/api/${it}`,pt=mt.config?.sablier,gn=pt?.enable&&pt?.deferStart?D.dim(" (deferred \u2014 starts on first request)"):"";console.log(D.gray(` - ${mt.name}: ${Ct}${D.cyan(WQ(Dt))}${gn}`))}}}let Ue=i.only??(n?[n]:void 0),Be=DR(Re,{verbose:i.verbose,quiet:i.quiet,force:i.force,focusTargets:Ue}),ke=Ue?`tilt up ${Be.join(" ")}`:"tilt up";if(!i.quiet){console.log(D.blue(n2(xe)));for(let Ae of ZU(xe))console.log(D.yellow(Ae));console.log(D.gray("Override with TDK_HTTP_PORT, TDK_HTTPS_PORT, or TDK_POSTGRES_PORT."))}if(A&&i.dryRun){A({ok:!0,dryRun:!0,stack:n??null,services:et,...i.only?{requested:i.only,declaredDependencies:je}:{},command:ke});return}if(Sr(i,"not starting services",ke))return;a2(xe),o2(x,xe);let ft=xA.tiltUi,Ze=d??ft,Tt=i.only?[...new Set([ft,Ze])]:[Ze],{running:Qt,foreign:fe}=await Z2(Tt,x,async Ae=>await Ff(Ae)!==null);if(fe.length>0&&d!==void 0){let Ae=fe[0],Ct=`TILT_PORT=${Ae?.port} is used by another project's Tilt (${Ae?.root}). Choose a free port, or run flisk down in that project.`;A?.({ok:!1},[{code:"TILT_PORT_IN_USE",message:Ct}]),Ya(Ct)}if(!i.quiet)for(let Ae of fe)console.log(D.yellow(`\u26A0\uFE0F Tilt on port ${Ae.port} belongs to another project (${Ae.root}); this project will use another port.`));let we=i.force&&fe.length===0,Me=TT({runningPorts:Qt,force:we,only:!!i.only});if(Me.action==="already-running"){if(C){let Ct=`A Tilt is already running on port ${Me.ports.join(", ")}. --env-file applies to a new run only: run \`flisk down\` first, or pass --force to replace the running stack.`;A?.({ok:!1},[{code:"ENV_FILE_ALREADY_RUNNING",message:Ct}]),Ya(Ct)}let Ae=`Environment is already running on port ${Me.ports.join(", ")}.`;A?.({ok:!0,alreadyRunning:!0,tiltUrl:`http://localhost:${Me.ports[0]}`}),i.quiet||console.log(D.green(Ae));return}if(Me.action==="only-blocked"){let Ae=`A Tilt is already running on port ${Me.ports.join(", ")}. --only cannot change a running stack's services: run \`flisk down\` first, or pass --force to replace it.`;A?.({ok:!1},[{code:"TILT_ALREADY_RUNNING",message:Ae}]),Ya(Ae)}if(i.only)for(let Ae of Qt)S0(Ae);let Oe=await wT({configuredPort:d,force:we,basePort:ft,findAvailablePort:aT}),He=Oe.port;Oe.autoSwitched&&!i.quiet&&(console.log(D.yellow(`\u26A0\uFE0F Port ${ft} is already in use`)),console.log(D.blue(`\u{1F504} Auto-switching to port ${He}
1836
1836
  `))),process.env.TILT_PORT=He.toString(),await bT({force:we,quiet:i.quiet,port:He},{stop:S0,log:Ae=>console.log(D.yellow(Ae)),wait:Ae=>new Promise(Ct=>setTimeout(Ct,Ae))}),i.quiet||(console.log(D.gray(`
@@ -1868,7 +1868,7 @@ Manual upgrade using a published package:`)),console.log(D.cyan(" npm install
1868
1868
  `)):(console.log(),await oS({message:"Proceed with upgrade?",initial:!0})||(qQ(),process.exit(0))),console.log();let h=!1;switch(A.method){case"npm":h=await pO();break;case"bun":h=await EO();break;case"git":A.path&&(h=await hO(A.path));break;case"binary":A.path&&p&&(h=await gO(A.path,p));break}if(!h){if(console.error(D.red(`
1869
1869
  Upgrade failed`)),A.method==="git")console.log(D.cyan(` Check local changes with: git -C ${A.path} status --short`)),console.log(D.cyan(" Commit or stash them, then retry: flisk upgrade"));else if(A.method==="binary"&&p&&A.path){let I=wi(M1(A.path),"tdk-cli");Is()?console.log(D.cyan(" irm https://flisk.sh/install.ps1 | iex")):(console.log(D.cyan(` curl -fsSL -o ${A.path} ${p.downloadUrl}`)),console.log(D.cyan(` chmod +x ${A.path}`)),console.log(D.cyan(` rm -rf ${I} && mkdir -p ${I}`)),console.log(D.cyan(` curl -fsSL ${p.engineDownloadUrl} | tar -xzf - -C ${I} --strip-components=1`)))}process.exit(1)}console.log();let C=Jf("Verifying upgrade...");try{let I=Ia(UA(Am())??Am(),["version"],{encoding:"utf-8",windowsHide:Is()}).trim();C.succeed(`Verified: now running ${D.green(I)}`),console.log(),console.log(D.green.bold("\u2728 Upgrade complete!")),console.log(D.gray(` Version: ${i} \u2192 ${I}`)),console.log(),console.log(D.cyan.bold("\u{1F4CD} Installation Details:")),A.method==="git"&&A.path?(console.log(D.gray(` Location: ${A.path}`)),console.log(D.gray(" Method: git clone + bun link"))):console.log(D.gray(` Method: ${A.method}`)),console.log(D.gray(` Binary: ${A.path??UA(Am())??"unknown"}`)),console.log(),console.log(D.cyan.bold("\u{1F680} Quick Start:")),console.log(D.white(" flisk --help Show all commands")),console.log(D.white(" flisk networks View service URLs")),console.log(D.white(" flisk doctor Check environment")),I===i&&!n.force&&(console.log(),console.log(D.yellow("\u{1F4A1} Tip: Version appears unchanged. You may need to restart your terminal."))),console.log(),console.log(D.green("Happy coding! \u{1F389}"))}catch(I){C.warn("Could not verify new version"),console.error(D.red(`Verification error: ${ys(I)}`)),console.log(),console.log(D.yellow("\u26A0\uFE0F Upgrade status unknown - verification failed")),console.log(),dL(I)&&A.method!=="git"&&A.path?(console.log(D.yellow("\u{1F4A1} The installed binary isn't executable. Fix it with:")),console.log(D.cyan(` chmod +x ${A.path}`)),console.log(D.white(" then run: flisk version"))):(console.log(D.yellow("\u{1F4A1} Verify manually:")),console.log(D.white(" 1. Restart your terminal")),console.log(D.white(" 2. Run: flisk version")),A.method==="git"&&A.path&&console.log(D.white(` 3. Compare with: git -C ${A.path} rev-parse HEAD`)))}})}var CO=hL();import{Command as CL}from"commander";var BO=new CL("version").description("Display version number").alias("v").action(()=>{console.log(Nl())});function IO(){return[QS,yT,sT,aO,MN,nT,JN,HN,LN,k2,xT,vT,IT,yS,Y2,gS,LU,BO,KN,O2,wN,CO,AT,lS,QT]}function yO(){let n=new BL;n.name("flisk").description("Flisk CLI \u2014 start services on your machine.").version(Gf.version,"-v, --version","Display version number").option("--verbose","Enable verbose output",!1).option("--template <name>","Create a project from a starter template in one command (restaurant, saas, erp, ecommerce, example)").option("--project <dir>","Directory to create the project in (default: the template name)").configureOutput({outputError:(i,A)=>A(D.red(i)),writeOut:i=>process.stdout.write(i),writeErr:i=>process.stderr.write(i)}),n.helpCommand("help [command]","Show colorful help").on("--help",()=>{ey(),process.exit(0)}),n.addHelpText("before","");for(let i of IO())n.addCommand(i);return n}function QO(n,i){let[A,u]=n;return A!=="help"||!u||u.startsWith("-")||i.some(p=>p.name()===u||p.aliases().includes(u))?void 0:u}var G1=yO();if(process.argv.length===2){let n=await j2();console.log(F2(n)),console.log(`
1870
1870
  Commands: flisk doctor | flisk project --yes | flisk --help`),console.log(`
1871
- One command from scratch (clones, boots and opens the browser):`),console.log(" npx -y @flisk-sh/flisk@latest demo"),console.log(" npx -y @flisk-sh/flisk@latest restaurant --project=my-stack"),process.exit(n.ok?0:1)}var ld=bO(process.argv,"--template")??L2(process.argv),DO=bO(process.argv,"--project");if(ld){let{nativeWindowsStackRefusal:n}=await import("./native-windows-X5XVLFJS.js"),i=n(process.platform,process.env.TDK_ALLOW_NATIVE_WINDOWS);i&&(console.error(D.red(`\u274C ${i}`)),console.error(D.gray(" Run it from Ubuntu in WSL2. Guide: docs/wsl2.md")),process.exit(1));let{cloneProjectTemplate:A,templateTargetDir:u}=await import("./project-IRWFRXWA.js"),{assertMachineReadyOrExit:d}=await import("./cold-preflight-4I24DQLW.js");await d({scope:"scaffold"});let{nextAvailableProjectDir:p}=await import("./one-command-P6XVAXWV.js"),{PROJECT_TEMPLATES:h}=await import("./project-templates-JDRE7AVL.js"),{listFrontendTargets:C,pickReadyFrontend:I}=await import("./open-6374RNL6.js"),{discoverResourcesWithProblems:Q}=await import("./services-VIIBMWD4.js"),{openUrl:U}=await import("./url-actions-D6ROTHZG.js"),{createDemoStage:O}=await import("./demo-stage-EOMANLAD.js"),S=u(ld,DO),b=DO?void 0:h[ld]?.fixedDir,x=process.argv.includes("--keep"),H;b?H=$m(wO(),".flisk",b):(H=p(S,Qe=>{let rt=SO(vO(),Qe);return R0(rt)&&TO(rt).length>0}),H!==S&&console.log(D.gray(`The folder ${S} is taken, using ${H} instead.`)));let j=SL(H)?H:SO(vO(),H),F=!1;if(b&&R0(j)){R0($m(j,".tdk","project.json"))||(console.log(D.yellow(`${j} already exists and is not a Flisk project.`)),console.log(D.gray(" Remove it, or use --project <dir> to put the demo somewhere else.")),process.exit(1));let Qe=await I(await C(j),0);Qe&&(console.log(D.gray(`The demo is already running: ${Qe.url}`)),await U(Qe.url),process.exit(0)),x?F=!0:yL(j,{recursive:!0,force:!0})}let{checkColima:xe}=await import("./colima-SVZX2UML.js"),ge=xe();ge.isColima&&!ge.running&&(console.log(D.yellow(ge.problem??"The Colima VM is not running.")),console.log(D.gray(` Fix: ${ge.fix??"colima start"}`)),process.exit(1));let qe=[{id:"fetch",label:F?"Reusing the demo":"Fetching the demo",status:"active"},{id:"config",label:"Generating project config",status:"pending"},{id:"deps",label:"Installing dependencies",status:"pending"},{id:"start",label:"Starting services",status:"pending"}],Re=O({title:"Flisk demo",subtitle:`${ld} starter`,phases:qe,servicesReady:0,servicesTotal:0,servicesBuilding:0,elapsedMs:0}),je=(Qe,rt,mt)=>{qe=qe.map(it=>it.id===Qe?{...it,status:rt,elapsedMs:mt??it.elapsedMs}:it),Re.update({phases:qe})},et=[`flisk ${Gf.version} ${ld}`,`cwd: ${j}`],Ue=Date.now();try{F||await A(ld,H,[],{quiet:!0})}catch(Qe){Re.fail(Qe instanceof Error?Qe.message:String(Qe),"Check that git is installed and that you are online, then run the command again."),Re.stop(),process.exit(1)}let Be=z2();je("fetch","done",Date.now()-Ue);let ke=process.argv[1];(!ke||!R0(j))&&(Re.fail("The demo could not find the CLI entry point or the project folder.","Reinstall the Flisk CLI package and run the command again."),Re.stop(),process.exit(1));let{initializeProject:ft,installServiceDependencies:Ze,runStackQuiet:Tt}=await import("./one-command-P6XVAXWV.js"),Qt=Date.now(),fe=await ft(ke,j);if(et.push("--- project setup ---",fe.output??""),!fe.ok){let Qe=H1(et);Re.fail(fe.error??"The project setup did not finish.","Run `flisk project --yes` in the project folder to see what it printed.",Qe),Re.stop(),process.exit(1)}je("config","done",Date.now()-Qt);let we=Q(j).resources.length;Re.update({servicesTotal:we});let Me=Date.now(),Oe=await Ze(j),He=Oe.filter(Qe=>!Qe.ok);for(let Qe of Oe)et.push(`install ${Qe.dir}: ${Qe.ok?"ok":"failed"}`);He.length>0&&(Re.fail(`${He.length} of ${Oe.length} services could not install their dependencies.`,`Run "bun install" in ${He[0]?.dir??"the failed services"}.`,H1(et)),Re.stop(),process.exit(1)),je("deps","done",Date.now()-Me);let Fe=Date.now();je("start","active");let{readStackProgress:tt}=await import("./stack-progress-6GO2TCRH.js"),{classifyTiltPorts:X}=await import("./tilt-port-owner-AN3ITRTR.js"),Ee=Array.from({length:10},(Qe,rt)=>10350+rt),Pe=!0,Ve=we;(async()=>{for(;Pe;){try{let{running:Qe}=await X(Ee,j,async rt=>await tt(rt)!==void 0);for(let rt of Qe){let mt=await tt(rt);if(mt){Ve=mt.total,Re.update({servicesReady:mt.ready,servicesTotal:mt.total,servicesBuilding:mt.building});break}}}catch{}await new Promise(Qe=>{setTimeout(Qe,2e3).unref?.()})}})();let Yt=await Tt(ke,j);if(Pe=!1,et.push("--- stack ---",Yt.raw??""),!Yt.ok){let Qe=Yt.data?.tiltUrl??"http://localhost:10350";Re.fail(vL(Yt.raw)??Yt.error??"The stack stopped before it was ready.",`Run \`flisk up\` in the project folder, or watch ${Qe}.`,H1(et)),Re.stop(),process.exit(1)}je("start","done",Date.now()-Fe),Re.update({servicesReady:Ve,servicesTotal:Ve});let jt=await C(j),dt=await I(jt,3e4);dt&&await U(dt.url);let Ae=NO($m(j,".tdk")),Ct=NO(j,["node_modules",".git"]);Re.update({subtitle:`${ld} starter \xB7 ${_1(Ct,"file")} wired`}),Re.finish({urls:(dt?[dt.url,...jt.map(Qe=>Qe.url)]:jt.map(Qe=>Qe.url)).filter((Qe,rt,mt)=>mt.indexOf(Qe)===rt).slice(0,2),summary:`${_1(Ae,"file")} generated \xB7 ${_1(we,"app service")} \xB7 live reload`,hint:"Edit any file and the browser updates.",version:Gf.version}),Re.stop(),Be==="failed"&&console.log(D.gray("\n `flisk` is not on your PATH. Next time, run this command again with npx.")),process.exit(0)}process.argv[2]==="--doctor"&&(process.argv[2]="doctor");process.argv.length===3&&["-h","--help","help"].includes(process.argv[2])&&(ey(),process.exit(0));var RO=QO(process.argv.slice(2),G1.commands);RO&&G1.error(`error: unknown command '${RO}'`,{exitCode:1,code:"commander.unknownCommand"});G1.parse();function bO(n,i){let A=`${i}=`;for(let u=0;u<n.length;u+=1){let d=n[u];if(d.startsWith(A))return d.slice(A.length);if(d===i)return n[u+1]}}function _1(n,i){return`${n} ${i}${n===1?"":"s"}`}function NO(n,i=[]){let A=0,u=d=>{try{for(let p of TO(d,{withFileTypes:!0})){if(i.includes(p.name))continue;let h=$m(d,p.name);p.isDirectory()?u(h):p.isFile()&&(A+=1)}}catch{}};return u(n),A}function vL(n){if(n)for(let i of n.split(`
1871
+ One command from scratch (clones, boots and opens the browser):`),console.log(" npx -y @flisk-sh/flisk@latest demo"),console.log(" npx -y @flisk-sh/flisk@latest restaurant --project=my-stack"),process.exit(n.ok?0:1)}var ld=bO(process.argv,"--template")??L2(process.argv),DO=bO(process.argv,"--project");if(ld){let{nativeWindowsStackRefusal:n}=await import("./native-windows-X5XVLFJS.js"),i=n(process.platform,process.env.TDK_ALLOW_NATIVE_WINDOWS);i&&(console.error(D.red(`\u274C ${i}`)),console.error(D.gray(" Run it from Ubuntu in WSL2. Guide: docs/wsl2.md")),process.exit(1));let{cloneProjectTemplate:A,templateTargetDir:u}=await import("./project-QSH7LOWI.js"),{assertMachineReadyOrExit:d}=await import("./cold-preflight-7PFKXNK7.js");await d({scope:"scaffold"});let{nextAvailableProjectDir:p}=await import("./one-command-P6XVAXWV.js"),{PROJECT_TEMPLATES:h}=await import("./project-templates-JDRE7AVL.js"),{listFrontendTargets:C,pickReadyFrontend:I}=await import("./open-VJZ7W4JR.js"),{discoverResourcesWithProblems:Q}=await import("./services-CBXN4SXC.js"),{openUrl:U}=await import("./url-actions-D6ROTHZG.js"),{createDemoStage:O}=await import("./demo-stage-ANHJKDZC.js"),S=u(ld,DO),b=DO?void 0:h[ld]?.fixedDir,x=process.argv.includes("--keep"),H;b?H=$m(wO(),".flisk",b):(H=p(S,Qe=>{let rt=SO(vO(),Qe);return R0(rt)&&TO(rt).length>0}),H!==S&&console.log(D.gray(`The folder ${S} is taken, using ${H} instead.`)));let j=SL(H)?H:SO(vO(),H),F=!1;if(b&&R0(j)){R0($m(j,".tdk","project.json"))||(console.log(D.yellow(`${j} already exists and is not a Flisk project.`)),console.log(D.gray(" Remove it, or use --project <dir> to put the demo somewhere else.")),process.exit(1));let Qe=await I(await C(j),0);Qe&&(console.log(D.gray(`The demo is already running: ${Qe.url}`)),await U(Qe.url),process.exit(0)),x?F=!0:yL(j,{recursive:!0,force:!0})}let{checkColima:xe}=await import("./colima-SVZX2UML.js"),ge=xe();ge.isColima&&!ge.running&&(console.log(D.yellow(ge.problem??"The Colima VM is not running.")),console.log(D.gray(` Fix: ${ge.fix??"colima start"}`)),process.exit(1));let qe=[{id:"fetch",label:F?"Reusing the demo":"Fetching the demo",status:"active"},{id:"config",label:"Generating project config",status:"pending"},{id:"deps",label:"Installing dependencies",status:"pending"},{id:"start",label:"Starting services",status:"pending"}],Re=O({title:"Flisk demo",subtitle:`${ld} starter`,phases:qe,servicesReady:0,servicesTotal:0,servicesBuilding:0,elapsedMs:0}),je=(Qe,rt,mt)=>{qe=qe.map(it=>it.id===Qe?{...it,status:rt,elapsedMs:mt??it.elapsedMs}:it),Re.update({phases:qe})},et=[`flisk ${Gf.version} ${ld}`,`cwd: ${j}`],Ue=Date.now();try{F||await A(ld,H,[],{quiet:!0})}catch(Qe){Re.fail(Qe instanceof Error?Qe.message:String(Qe),"Check that git is installed and that you are online, then run the command again."),Re.stop(),process.exit(1)}let Be=z2();je("fetch","done",Date.now()-Ue);let ke=process.argv[1];(!ke||!R0(j))&&(Re.fail("The demo could not find the CLI entry point or the project folder.","Reinstall the Flisk CLI package and run the command again."),Re.stop(),process.exit(1));let{initializeProject:ft,installServiceDependencies:Ze,runStackQuiet:Tt}=await import("./one-command-P6XVAXWV.js"),Qt=Date.now(),fe=await ft(ke,j);if(et.push("--- project setup ---",fe.output??""),!fe.ok){let Qe=H1(et);Re.fail(fe.error??"The project setup did not finish.","Run `flisk project --yes` in the project folder to see what it printed.",Qe),Re.stop(),process.exit(1)}je("config","done",Date.now()-Qt);let we=Q(j).resources.length;Re.update({servicesTotal:we});let Me=Date.now(),Oe=await Ze(j),He=Oe.filter(Qe=>!Qe.ok);for(let Qe of Oe)et.push(`install ${Qe.dir}: ${Qe.ok?"ok":"failed"}`);He.length>0&&(Re.fail(`${He.length} of ${Oe.length} services could not install their dependencies.`,`Run "bun install" in ${He[0]?.dir??"the failed services"}.`,H1(et)),Re.stop(),process.exit(1)),je("deps","done",Date.now()-Me);let Fe=Date.now();je("start","active");let{readStackProgress:tt}=await import("./stack-progress-6GO2TCRH.js"),{classifyTiltPorts:X}=await import("./tilt-port-owner-SMN5SAQJ.js"),Ee=Array.from({length:10},(Qe,rt)=>10350+rt),Pe=!0,Ve=we;(async()=>{for(;Pe;){try{let{running:Qe}=await X(Ee,j,async rt=>await tt(rt)!==void 0);for(let rt of Qe){let mt=await tt(rt);if(mt){Ve=mt.total,Re.update({servicesReady:mt.ready,servicesTotal:mt.total,servicesBuilding:mt.building});break}}}catch{}await new Promise(Qe=>{setTimeout(Qe,2e3).unref?.()})}})();let Yt=await Tt(ke,j);if(Pe=!1,et.push("--- stack ---",Yt.raw??""),!Yt.ok){let Qe=Yt.data?.tiltUrl??"http://localhost:10350";Re.fail(vL(Yt.raw)??Yt.error??"The stack stopped before it was ready.",`Run \`flisk up\` in the project folder, or watch ${Qe}.`,H1(et)),Re.stop(),process.exit(1)}je("start","done",Date.now()-Fe),Re.update({servicesReady:Ve,servicesTotal:Ve});let jt=await C(j),dt=await I(jt,3e4);dt&&await U(dt.url);let Ae=NO($m(j,".tdk")),Ct=NO(j,["node_modules",".git"]);Re.update({subtitle:`${ld} starter \xB7 ${_1(Ct,"file")} wired`}),Re.finish({urls:(dt?[dt.url,...jt.map(Qe=>Qe.url)]:jt.map(Qe=>Qe.url)).filter((Qe,rt,mt)=>mt.indexOf(Qe)===rt).slice(0,2),summary:`${_1(Ae,"file")} generated \xB7 ${_1(we,"app service")} \xB7 live reload`,hint:"Edit any file and the browser updates.",version:Gf.version}),Re.stop(),Be==="failed"&&console.log(D.gray("\n `flisk` is not on your PATH. Next time, run this command again with npx.")),process.exit(0)}process.argv[2]==="--doctor"&&(process.argv[2]="doctor");process.argv.length===3&&["-h","--help","help"].includes(process.argv[2])&&(ey(),process.exit(0));var RO=QO(process.argv.slice(2),G1.commands);RO&&G1.error(`error: unknown command '${RO}'`,{exitCode:1,code:"commander.unknownCommand"});G1.parse();function bO(n,i){let A=`${i}=`;for(let u=0;u<n.length;u+=1){let d=n[u];if(d.startsWith(A))return d.slice(A.length);if(d===i)return n[u+1]}}function _1(n,i){return`${n} ${i}${n===1?"":"s"}`}function NO(n,i=[]){let A=0,u=d=>{try{for(let p of TO(d,{withFileTypes:!0})){if(i.includes(p.name))continue;let h=$m(d,p.name);p.isDirectory()?u(h):p.isFile()&&(A+=1)}}catch{}};return u(n),A}function vL(n){if(n)for(let i of n.split(`
1872
1872
  `)){let A=/^\s*FAIL\s+(.+)$/.exec(i);if(A?.[1])return A[1].trim()}}function H1(n){try{let i=$m(wO(),".flisk","logs");IL(i,{recursive:!0});let A=$m(i,`demo-${new Date().toISOString().replace(/[:.]/g,"-")}.log`);return QL(A,n.join(`
1873
1873
  `)),A}catch{return}}
1874
1874
  /*! Bundled license information:
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{A as d,B as e,C as f,D as g,E as h,F as i,G as j,x as a,y as b,z as c}from"./chunk-7C5VA6CW.js";import"./chunk-NCEK46NX.js";import"./chunk-5CFVN3W3.js";import"./chunk-42IVF3YT.js";import"./chunk-YZRPX76N.js";import"./chunk-PHI5AT3H.js";import"./chunk-GANRXKBM.js";import"./chunk-LI3BXAX5.js";import"./chunk-4W6OXDLK.js";import"./chunk-XSPMLWAE.js";import"./chunk-6EA4DGCY.js";export{c as MACHINE_CHECK_IDS,a as RUNTIME_CHECK_IDS,b as SCAFFOLD_CHECK_IDS,h as assertMachineReadyOrExit,i as detectRuntimePrerequisites,g as formatColdPreflight,j as formatRuntimeNextSteps,d as nodeTooOld,e as requireVerifiedDockerVersions,f as runColdPreflight};
2
+ import{A as d,B as e,C as f,D as g,E as h,F as i,G as j,x as a,y as b,z as c}from"./chunk-GB6DJJ5N.js";import"./chunk-ODYL6LET.js";import"./chunk-5LRMAY67.js";import"./chunk-42IVF3YT.js";import"./chunk-YZRPX76N.js";import"./chunk-SLKTM6ZO.js";import"./chunk-BHWJU6HY.js";import"./chunk-DWR3LLHS.js";import"./chunk-AGXA5DOQ.js";import"./chunk-AT5MFZ3D.js";import"./chunk-6EA4DGCY.js";export{c as MACHINE_CHECK_IDS,a as RUNTIME_CHECK_IDS,b as SCAFFOLD_CHECK_IDS,h as assertMachineReadyOrExit,i as detectRuntimePrerequisites,g as formatColdPreflight,j as formatRuntimeNextSteps,d as nodeTooOld,e as requireVerifiedDockerVersions,f as runColdPreflight};
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{b as R}from"./chunk-ODVBKN6S.js";import{b as c}from"./chunk-XSPMLWAE.js";import"./chunk-6EA4DGCY.js";var v=12,_=24,F={plain:e=>e,bold:c.bold,dim:c.gray,ok:c.green,warn:c.yellow,err:c.red},S={pending:"\u25CB",active:"\u25D0",done:"\u2714",failed:"\u2716"},j={pending:"dim",active:"warn",done:"ok",failed:"err"};function o(e){return R(String(e)).replace(/[\n\r\t]/g," ")}function g(e){if(!Number.isFinite(e)||e<0)return"0.0s";if(e<1e4)return`${(e/1e3).toFixed(1)}s`;if(e<6e4)return`${Math.round(e/1e3)}s`;let n=Math.floor(e/6e4),i=Math.round(e%6e4/1e3);return`${n}m ${i}s`}function $(e){return e.reduce((n,i)=>n+i.text.length,0)}function k(e,n){if(n<=0)return[];let i=[],l=0;for(let s of e){if(l>=n)break;let t=n-l;if(s.text.length<=t){i.push(s),l+=s.text.length;continue}i.push({...s,text:`${s.text.slice(0,Math.max(0,t-1))}\u2026`}),l=n}return i}function w(e,n){let i=k(e,n),l=n-$(i);return l<=0?i:[...i,{text:" ".repeat(l),style:"plain"}]}function M(e,n,i){let l=$(n),s=i-l-1;if(s<4)return w(k([...e,...n],i),i);let t=k(e,s),r=i-$(t)-l;return[...t,{text:" ".repeat(Math.max(1,r)),style:"plain"},...n]}function b(e){return[{text:` ${"\u2500".repeat(Math.max(0,e-2))}`,style:"dim"}]}function P(e,n){return M([{text:" ",style:"plain"},{text:S[e.status],style:j[e.status]},{text:" ",style:"plain"},{text:o(e.label),style:e.status==="pending"?"dim":"plain"}],e.elapsedMs===void 0?[]:[{text:g(e.elapsedMs),style:"dim"}],n)}function Y(e){let n=Math.max(0,e.servicesTotal);if(n===0)return"no services found";let l=[`${Math.min(Math.max(0,e.servicesReady),n)} of ${n} services ready`];return e.servicesBuilding>0&&l.push(`${e.servicesBuilding} building`),l.join(" \xB7 ")}function E(e,n=80){let i=Number.isFinite(n)&&n>0?n:80,l=Math.max(_,Math.min(i-1,78)),s=[],t=a=>s.push(w(a,l)),r=()=>t([]);if(e.done){t(M([{text:" ",style:"plain"},{text:"\u2714",style:"ok"},{text:" Your stack is running",style:"ok"}],[{text:g(e.elapsedMs),style:"dim"}],l)),t([{text:" ",style:"plain"},{text:o(e.subtitle),style:"dim"}]),r();for(let a of e.done.urls.slice(0,2))t([{text:" ",style:"plain"},{text:o(a),style:"plain"}]);r(),t(b(l)),t([{text:" ",style:"plain"},{text:o(e.done.summary),style:"plain"}]),t([{text:" ",style:"plain"},{text:o(e.done.hint),style:"dim"}]),r(),t([{text:" ",style:"plain"},{text:`flisk ${o(e.done.version)}`,style:"dim"}])}else if(e.failure){let a=e.phases.find(p=>p.status==="failed");t(M([{text:" ",style:"plain"},{text:"\u2716",style:"err"},{text:" ",style:"plain"},{text:o(a?.label??"The demo stopped"),style:"err"}],[{text:g(e.elapsedMs),style:"dim"}],l)),r(),t([{text:" ",style:"plain"},{text:o(e.failure.message),style:"plain"}]),e.failure.fix&&t([{text:" ",style:"plain"},{text:o(e.failure.fix),style:"dim"}]),r(),t(b(l)),e.detail&&t([{text:" ",style:"plain"},{text:o(e.detail),style:"dim"}]),e.failure.logPath&&t([{text:" ",style:"plain"},{text:`log: ${o(e.failure.logPath)}`,style:"dim"}])}else{t([{text:" ",style:"plain"},{text:o(e.title),style:"bold"}]),t([{text:" ",style:"plain"},{text:o(e.subtitle),style:"dim"}]),r();let a=e.phases.slice(0,4);for(let p of a)t(P(p,l));for(let p=a.length;p<4;p+=1)r();r(),t(b(l)),t([{text:" ",style:"plain"},{text:o(e.detail??""),style:"dim"}]),t(M([{text:" ",style:"plain"},{text:Y(e),style:"plain"}],[{text:g(e.elapsedMs),style:"dim"}],l))}for(;s.length<v;)s.push(w([],l));return s.slice(0,v)}function A(e){return e.map(n=>n.map(i=>i.text).join(""))}function D(e){return e.map(n=>F[n.style](n.text)).join("")}function H(e,n=process.stderr,i=Date.now){let l=n.isTTY===!0,s=i(),t={...e},r=!1,a="",p="",f,T=()=>{let u=!!(t.done||t.failure);return{...t,elapsedMs:u?t.elapsedMs:i()-s}},x=()=>{let u=T(),m=E(u,n.columns??80),y=A(m);if(!l){let h=y.join(`
2
+ import{b as R}from"./chunk-D2DIEX5E.js";import{b as c}from"./chunk-AT5MFZ3D.js";import"./chunk-6EA4DGCY.js";var v=12,_=24,F={plain:e=>e,bold:c.bold,dim:c.gray,ok:c.green,warn:c.yellow,err:c.red},S={pending:"\u25CB",active:"\u25D0",done:"\u2714",failed:"\u2716"},j={pending:"dim",active:"warn",done:"ok",failed:"err"};function o(e){return R(String(e)).replace(/[\n\r\t]/g," ")}function g(e){if(!Number.isFinite(e)||e<0)return"0.0s";if(e<1e4)return`${(e/1e3).toFixed(1)}s`;if(e<6e4)return`${Math.round(e/1e3)}s`;let n=Math.floor(e/6e4),i=Math.round(e%6e4/1e3);return`${n}m ${i}s`}function $(e){return e.reduce((n,i)=>n+i.text.length,0)}function k(e,n){if(n<=0)return[];let i=[],l=0;for(let s of e){if(l>=n)break;let t=n-l;if(s.text.length<=t){i.push(s),l+=s.text.length;continue}i.push({...s,text:`${s.text.slice(0,Math.max(0,t-1))}\u2026`}),l=n}return i}function w(e,n){let i=k(e,n),l=n-$(i);return l<=0?i:[...i,{text:" ".repeat(l),style:"plain"}]}function M(e,n,i){let l=$(n),s=i-l-1;if(s<4)return w(k([...e,...n],i),i);let t=k(e,s),r=i-$(t)-l;return[...t,{text:" ".repeat(Math.max(1,r)),style:"plain"},...n]}function b(e){return[{text:` ${"\u2500".repeat(Math.max(0,e-2))}`,style:"dim"}]}function P(e,n){return M([{text:" ",style:"plain"},{text:S[e.status],style:j[e.status]},{text:" ",style:"plain"},{text:o(e.label),style:e.status==="pending"?"dim":"plain"}],e.elapsedMs===void 0?[]:[{text:g(e.elapsedMs),style:"dim"}],n)}function Y(e){let n=Math.max(0,e.servicesTotal);if(n===0)return"no services found";let l=[`${Math.min(Math.max(0,e.servicesReady),n)} of ${n} services ready`];return e.servicesBuilding>0&&l.push(`${e.servicesBuilding} building`),l.join(" \xB7 ")}function E(e,n=80){let i=Number.isFinite(n)&&n>0?n:80,l=Math.max(_,Math.min(i-1,78)),s=[],t=a=>s.push(w(a,l)),r=()=>t([]);if(e.done){t(M([{text:" ",style:"plain"},{text:"\u2714",style:"ok"},{text:" Your stack is running",style:"ok"}],[{text:g(e.elapsedMs),style:"dim"}],l)),t([{text:" ",style:"plain"},{text:o(e.subtitle),style:"dim"}]),r();for(let a of e.done.urls.slice(0,2))t([{text:" ",style:"plain"},{text:o(a),style:"plain"}]);r(),t(b(l)),t([{text:" ",style:"plain"},{text:o(e.done.summary),style:"plain"}]),t([{text:" ",style:"plain"},{text:o(e.done.hint),style:"dim"}]),r(),t([{text:" ",style:"plain"},{text:`flisk ${o(e.done.version)}`,style:"dim"}])}else if(e.failure){let a=e.phases.find(p=>p.status==="failed");t(M([{text:" ",style:"plain"},{text:"\u2716",style:"err"},{text:" ",style:"plain"},{text:o(a?.label??"The demo stopped"),style:"err"}],[{text:g(e.elapsedMs),style:"dim"}],l)),r(),t([{text:" ",style:"plain"},{text:o(e.failure.message),style:"plain"}]),e.failure.fix&&t([{text:" ",style:"plain"},{text:o(e.failure.fix),style:"dim"}]),r(),t(b(l)),e.detail&&t([{text:" ",style:"plain"},{text:o(e.detail),style:"dim"}]),e.failure.logPath&&t([{text:" ",style:"plain"},{text:`log: ${o(e.failure.logPath)}`,style:"dim"}])}else{t([{text:" ",style:"plain"},{text:o(e.title),style:"bold"}]),t([{text:" ",style:"plain"},{text:o(e.subtitle),style:"dim"}]),r();let a=e.phases.slice(0,4);for(let p of a)t(P(p,l));for(let p=a.length;p<4;p+=1)r();r(),t(b(l)),t([{text:" ",style:"plain"},{text:o(e.detail??""),style:"dim"}]),t(M([{text:" ",style:"plain"},{text:Y(e),style:"plain"}],[{text:g(e.elapsedMs),style:"dim"}],l))}for(;s.length<v;)s.push(w([],l));return s.slice(0,v)}function A(e){return e.map(n=>n.map(i=>i.text).join(""))}function D(e){return e.map(n=>F[n.style](n.text)).join("")}function H(e,n=process.stderr,i=Date.now){let l=n.isTTY===!0,s=i(),t={...e},r=!1,a="",p="",f,T=()=>{let u=!!(t.done||t.failure);return{...t,elapsedMs:u?t.elapsedMs:i()-s}},x=()=>{let u=T(),m=E(u,n.columns??80),y=A(m);if(!l){let h=y.join(`
3
3
  `);if(h===p)return;p=h,n.write(`${y.filter(L=>L.trim()!=="").join(`
4
4
  `)}
5
5
  `);return}let d=y.join(`
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{d as a,e as b,f as c,g as d,h as e,i as f}from"./chunk-D2BXXJDM.js";import"./chunk-GOEBYLFN.js";import"./chunk-PHI5AT3H.js";import"./chunk-GANRXKBM.js";import"./chunk-LI3BXAX5.js";import"./chunk-4W6OXDLK.js";import"./chunk-XSPMLWAE.js";import"./chunk-6EA4DGCY.js";export{d as findReadyFrontend,b as isFrontendReady,a as listFrontendTargets,f as openCommand,e as openFirstFrontend,c as pickReadyFrontend};
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f}from"./chunk-Z2C55UFP.js";import"./chunk-GOEBYLFN.js";import"./chunk-SLKTM6ZO.js";import"./chunk-BHWJU6HY.js";import"./chunk-DWR3LLHS.js";import"./chunk-AGXA5DOQ.js";import"./chunk-AT5MFZ3D.js";import"./chunk-6EA4DGCY.js";export{d as findReadyFrontend,b as isFrontendReady,a as listFrontendTargets,f as openCommand,e as openFirstFrontend,c as pickReadyFrontend};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
+ import{g as a,h as b,i as c,j as d}from"./chunk-YTXQPTCN.js";import"./chunk-GIMHTZNR.js";import"./chunk-ODYL6LET.js";import"./chunk-42IVF3YT.js";import"./chunk-DWR3LLHS.js";import"./chunk-AGXA5DOQ.js";import"./chunk-AT5MFZ3D.js";import"./chunk-6EA4DGCY.js";export{c as cloneProjectTemplate,a as enableDiscoveredStacks,d as projectCommand,b as templateTargetDir};
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{ca as a,da as b,ea as c,fa as d,ga as e,ha as f,ia as g,ja as h,ka as i,la as j,ma as k,na as l,oa as m,pa as n,qa as o}from"./chunk-4W6OXDLK.js";import"./chunk-XSPMLWAE.js";import"./chunk-6EA4DGCY.js";export{m as clearMetadataCache,f as discoverResources,e as discoverResourcesFromRoot,g as discoverResourcesStrict,c as discoverResourcesWithProblems,a as discoverServiceManifestPaths,h as discoverStackNames,j as discoverStacks,i as getAllStacks,n as getResourceMetadata,k as getResourcesForStack,o as getStackMetadata,b as resetPrintedServiceWarnings,l as stackExists,d as warnAboutSkippedFiles};
2
+ import{ca as a,da as b,ea as c,fa as d,ga as e,ha as f,ia as g,ja as h,ka as i,la as j,ma as k,na as l,oa as m,pa as n,qa as o}from"./chunk-AGXA5DOQ.js";import"./chunk-AT5MFZ3D.js";import"./chunk-6EA4DGCY.js";export{m as clearMetadataCache,f as discoverResources,e as discoverResourcesFromRoot,g as discoverResourcesStrict,c as discoverResourcesWithProblems,a as discoverServiceManifestPaths,h as discoverStackNames,j as discoverStacks,i as getAllStacks,n as getResourceMetadata,k as getResourcesForStack,o as getStackMetadata,b as resetPrintedServiceWarnings,l as stackExists,d as warnAboutSkippedFiles};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
+ import{a,b,c}from"./chunk-FAHNFTWN.js";import"./chunk-5LRMAY67.js";import"./chunk-BHWJU6HY.js";import"./chunk-DWR3LLHS.js";import"./chunk-AGXA5DOQ.js";import"./chunk-AT5MFZ3D.js";import"./chunk-6EA4DGCY.js";export{c as classifyTiltPorts,a as findTiltPortOwner,b as isForeignTilt};
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.206",
4
+ "version": "1.3.207",
5
5
  "description": "Flisk CLI — start services on your machine.",
6
6
  "keywords": [
7
7
  "flisk",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flisk-sh/flisk",
3
- "version": "1.3.206",
3
+ "version": "1.3.207",
4
4
  "description": "Flisk CLI — start services on your machine.",
5
5
  "homepage": "https://flisk.sh",
6
6
  "repository": {
@@ -1,2 +0,0 @@
1
- import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{g as a,h as b,i as c,j as d}from"./chunk-3QQGL3NQ.js";import"./chunk-GIMHTZNR.js";import"./chunk-NCEK46NX.js";import"./chunk-42IVF3YT.js";import"./chunk-LI3BXAX5.js";import"./chunk-4W6OXDLK.js";import"./chunk-XSPMLWAE.js";import"./chunk-6EA4DGCY.js";export{c as cloneProjectTemplate,a as enableDiscoveredStacks,d as projectCommand,b as templateTargetDir};
@@ -1,2 +0,0 @@
1
- import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-6Y6G7PSD.js";import"./chunk-5CFVN3W3.js";import"./chunk-GANRXKBM.js";import"./chunk-LI3BXAX5.js";import"./chunk-4W6OXDLK.js";import"./chunk-XSPMLWAE.js";import"./chunk-6EA4DGCY.js";export{c as classifyTiltPorts,a as findTiltPortOwner,b as isForeignTilt};