@tdk-landscape/tdk-cli-core 1.3.148 → 1.3.149

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.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
3
- import{$ as k1,$a as rs,A as R1,Aa as $m,B as b1,Ba as V1,C as dA,Ca as X1,D as Xm,Da as AB,E as T1,Ea as VA,F as N1,Fa as Z1,G as w1,Ga as P1,H as x1,Ha as W1,I as As,Ia as ls,J as _1,Ja as Dg,K as Zm,Ka as $1,L as gA,La as eD,M as xl,Ma as tD,N as Ig,Na as lB,O as U1,Oa as nQ,P as M1,Pa as nD,Q as O1,Qa as aD,R as Ku,Ra as oD,S as di,Sa as iD,T as gn,Ta as AD,U as on,Ua as lD,V as Za,Va as rD,W as wn,Wa as sD,X as $C,Xa as cD,Y as Uo,Ya as uD,Z as eB,Za as rB,_ as Mn,_a as sB,a as R,aa as H1,ab as cB,b as XC,ba as Pm,bb as uB,c as qA,ca as yg,cb as fD,d as fA,da as G1,db as eE,e as fr,ea as Wm,eb as aQ,f as Ju,fa as Qg,fb as dD,g as Q1,ga as Yu,gb as gD,h as dr,ha as tB,hb as pD,i as qm,ia as nB,ib as mD,j as Vm,ja as tQ,jb as ED,k as gr,ka as L1,kb as fB,l as Nl,la as Sg,lb as hD,m as wl,ma as Zo,mb as CD,n as Wy,na as Po,nb as oQ,o as Pn,oa as Pe,ob as iQ,p as ki,pa as j1,pb as BD,q as S1,qa as z1,qb as ID,r as $y,ra as F1,rb as yD,s as v1,sa as J1,sb as QD,t as cc,ta as aB,u as In,ua as vg,v as pr,va as K1,vb as SD,w as PC,wa as oB,wb as vD,x as eQ,xa as iB,y as WC,ya as Y1,z as D1,za as q1}from"./chunk-4RTR7KXM.js";import{a as B1,c as ZC,d as I1,e as y1}from"./chunk-42IVF3YT.js";import{a as Bg,b as Ha,c as cx,d as st}from"./chunk-6EA4DGCY.js";var E2=Ha(TB=>{"use strict";var CM=Symbol.for("react.transitional.element"),BM=Symbol.for("react.fragment");function m2(n,o,l){var s=null;if(l!==void 0&&(s=""+l),o.key!==void 0&&(s=""+o.key),"key"in o){l={};for(var u in o)u!=="key"&&(l[u]=o[u])}else l=o;return o=l.ref,{$$typeof:CM,type:n,key:s,ref:o!==void 0?o:null,props:l}}TB.Fragment=BM;TB.jsx=m2;TB.jsxs=m2});var N2=Ha(Rt=>{"use strict";var jQ=Symbol.for("react.transitional.element"),IM=Symbol.for("react.portal"),yM=Symbol.for("react.fragment"),QM=Symbol.for("react.strict_mode"),SM=Symbol.for("react.profiler"),vM=Symbol.for("react.consumer"),DM=Symbol.for("react.context"),RM=Symbol.for("react.forward_ref"),bM=Symbol.for("react.suspense"),TM=Symbol.for("react.memo"),y2=Symbol.for("react.lazy"),NM=Symbol.for("react.activity"),wM=Symbol.for("react.view_transition"),h2=Symbol.iterator;function xM(n){return n===null||typeof n!="object"?null:(n=h2&&n[h2]||n["@@iterator"],typeof n=="function"?n:null)}var Q2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S2=Object.assign,v2={};function kg(n,o,l){this.props=n,this.context=o,this.refs=v2,this.updater=l||Q2}kg.prototype.isReactComponent={};kg.prototype.setState=function(n,o){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,o,"setState")};kg.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function D2(){}D2.prototype=kg.prototype;function zQ(n,o,l){this.props=n,this.context=o,this.refs=v2,this.updater=l||Q2}var FQ=zQ.prototype=new D2;FQ.constructor=zQ;S2(FQ,kg.prototype);FQ.isPureReactComponent=!0;var C2=Array.isArray;function LQ(){}var Kn={H:null,A:null,T:null,S:null},R2=Object.prototype.hasOwnProperty;function JQ(n,o,l){var s=l.ref;return{$$typeof:jQ,type:n,key:o,ref:s!==void 0?s:null,props:l}}function _M(n,o){return JQ(n.type,o,n.props)}function KQ(n){return typeof n=="object"&&n!==null&&n.$$typeof===jQ}function UM(n){var o={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(l){return o[l]})}var B2=/\/+/g;function GQ(n,o){return typeof n=="object"&&n!==null&&n.key!=null?UM(""+n.key):o.toString(36)}function MM(n){switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:switch(typeof n.status=="string"?n.then(LQ,LQ):(n.status="pending",n.then(function(o){n.status==="pending"&&(n.status="fulfilled",n.value=o)},function(o){n.status==="pending"&&(n.status="rejected",n.reason=o)})),n.status){case"fulfilled":return n.value;case"rejected":throw n.reason}}throw n}function Og(n,o,l,s,u){var p=typeof n;(p==="undefined"||p==="boolean")&&(n=null);var E=!1;if(n===null)E=!0;else switch(p){case"bigint":case"string":case"number":E=!0;break;case"object":switch(n.$$typeof){case jQ:case IM:E=!0;break;case y2:return E=n._init,Og(E(n._payload),o,l,s,u)}}if(E)return u=u(n),E=s===""?"."+GQ(n,0):s,C2(u)?(l="",E!=null&&(l=E.replace(B2,"$&/")+"/"),Og(u,o,l,"",function(S){return S})):u!=null&&(KQ(u)&&(u=_M(u,l+(u.key==null||n&&n.key===u.key?"":(""+u.key).replace(B2,"$&/")+"/")+E)),o.push(u)),1;E=0;var B=s===""?".":s+":";if(C2(n))for(var I=0;I<n.length;I++)s=n[I],p=B+GQ(s,I),E+=Og(s,o,l,p,u);else if(I=xM(n),typeof I=="function")for(n=I.call(n),I=0;!(s=n.next()).done;)s=s.value,p=B+GQ(s,I++),E+=Og(s,o,l,p,u);else if(p==="object"){if(typeof n.then=="function")return Og(MM(n),o,l,s,u);throw o=String(n),Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}return E}function NB(n,o,l){if(n==null)return n;var s=[],u=0;return Og(n,s,"","",function(p){return o.call(l,p,u++)}),s}function OM(n){if(n._status===-1){var o=n._result,l=o();l.then(function(s){(n._status===0||n._status===-1)&&(n._status=1,n._result=s,l.status===void 0&&(l.status="fulfilled",l.value=s))},function(s){(n._status===0||n._status===-1)&&(n._status=2,n._result=s,l.status===void 0&&(l.status="rejected",l.reason=s))}),n._status===-1&&(n._status=0,n._result=l)}if(n._status===1)return n._result.default;throw n._result}var I2=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=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(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)};function b2(n){var o=Kn.T,l={};l.types=o!==null?o.types:null,Kn.T=l;try{var s=n(),u=Kn.S;u!==null&&u(l,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(LQ,I2)}catch(p){I2(p)}finally{o!==null&&l.types!==null&&(o.types=l.types),Kn.T=o}}function T2(n){var o=Kn.T;if(o!==null){var l=o.types;l===null?o.types=[n]:l.indexOf(n)===-1&&l.push(n)}else b2(T2.bind(null,n))}var kM={map:NB,forEach:function(n,o,l){NB(n,function(){o.apply(this,arguments)},l)},count:function(n){var o=0;return NB(n,function(){o++}),o},toArray:function(n){return NB(n,function(o){return o})||[]},only:function(n){if(!KQ(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};Rt.Activity=NM;Rt.Children=kM;Rt.Component=kg;Rt.Fragment=yM;Rt.Profiler=SM;Rt.PureComponent=zQ;Rt.StrictMode=QM;Rt.Suspense=bM;Rt.ViewTransition=wM;Rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Kn;Rt.__COMPILER_RUNTIME={__proto__:null,c:function(n){return Kn.H.useMemoCache(n)}};Rt.addTransitionType=T2;Rt.cache=function(n){return function(){return n.apply(null,arguments)}};Rt.cacheSignal=function(){return null};Rt.cloneElement=function(n,o,l){if(n==null)throw Error("The argument must be a React element, but you passed "+n+".");var s=S2({},n.props),u=n.key;if(o!=null)for(p in o.key!==void 0&&(u=""+o.key),o)!R2.call(o,p)||p==="key"||p==="__self"||p==="__source"||p==="ref"&&o.ref===void 0||(s[p]=o[p]);var p=arguments.length-2;if(p===1)s.children=l;else if(1<p){for(var E=Array(p),B=0;B<p;B++)E[B]=arguments[B+2];s.children=E}return JQ(n.type,u,s)};Rt.createContext=function(n){return n={$$typeof:DM,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:vM,_context:n},n};Rt.createElement=function(n,o,l){var s,u={},p=null;if(o!=null)for(s in o.key!==void 0&&(p=""+o.key),o)R2.call(o,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(u[s]=o[s]);var E=arguments.length-2;if(E===1)u.children=l;else if(1<E){for(var B=Array(E),I=0;I<E;I++)B[I]=arguments[I+2];u.children=B}if(n&&n.defaultProps)for(s in E=n.defaultProps,E)u[s]===void 0&&(u[s]=E[s]);return JQ(n,p,u)};Rt.createRef=function(){return{current:null}};Rt.forwardRef=function(n){return{$$typeof:RM,render:n}};Rt.isValidElement=KQ;Rt.lazy=function(n){return{$$typeof:y2,_payload:{_status:-1,_result:n},_init:OM}};Rt.memo=function(n,o){return{$$typeof:TM,type:n,compare:o===void 0?null:o}};Rt.startTransition=b2;Rt.unstable_useCacheRefresh=function(){return Kn.H.useCacheRefresh()};Rt.use=function(n){return Kn.H.use(n)};Rt.useActionState=function(n,o,l){return Kn.H.useActionState(n,o,l)};Rt.useCallback=function(n,o){return Kn.H.useCallback(n,o)};Rt.useContext=function(n){return Kn.H.useContext(n)};Rt.useDebugValue=function(){};Rt.useDeferredValue=function(n,o){return Kn.H.useDeferredValue(n,o)};Rt.useEffect=function(n,o){return Kn.H.useEffect(n,o)};Rt.useEffectEvent=function(n){return Kn.H.useEffectEvent(n)};Rt.useId=function(){return Kn.H.useId()};Rt.useImperativeHandle=function(n,o,l){return Kn.H.useImperativeHandle(n,o,l)};Rt.useInsertionEffect=function(n,o){return Kn.H.useInsertionEffect(n,o)};Rt.useLayoutEffect=function(n,o){return Kn.H.useLayoutEffect(n,o)};Rt.useMemo=function(n,o){return Kn.H.useMemo(n,o)};Rt.useOptimistic=function(n,o){return Kn.H.useOptimistic(n,o)};Rt.useReducer=function(n,o,l){return Kn.H.useReducer(n,o,l)};Rt.useRef=function(n){return Kn.H.useRef(n)};Rt.useState=function(n){return Kn.H.useState(n)};Rt.useSyncExternalStore=function(n,o,l){return Kn.H.useSyncExternalStore(n,o,l)};Rt.useTransition=function(){return Kn.H.useTransition()};Rt.version="19.3.0"});var w2=Ha((yt,wB)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function n(y,U){Object.defineProperty(s.prototype,y,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",U[0],U[1])}})}function o(y){return y===null||typeof y!="object"?null:(y=$a&&y[$a]||y["@@iterator"],typeof y=="function"?y:null)}function l(y,U){y=(y=y.constructor)&&(y.displayName||y.name)||"ReactClass";var ue=y+"."+U;St[ue]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",U,y),St[ue]=!0)}function s(y,U,ue){this.props=y,this.context=U,this.refs=en,this.updater=ue||Ft}function u(){}function p(y,U,ue){this.props=y,this.context=U,this.refs=en,this.updater=ue||Ft}function E(){}function B(y){return""+y}function I(y){try{B(y);var U=!1}catch{U=!0}if(U){U=console;var ue=U.error,re=typeof Symbol=="function"&&Symbol.toStringTag&&y[Symbol.toStringTag]||y.constructor.name||"Object";return ue.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",re),B(y)}}function S(y){if(y==null)return null;if(typeof y=="function")return y.$$typeof===Wn?null:y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case Qt:return"Fragment";case Te:return"Profiler";case J:return"StrictMode";case ut:return"Suspense";case qe:return"SuspenseList";case mn:return"Activity";case Ga:return"ViewTransition"}if(typeof y=="object")switch(typeof y.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),y.$$typeof){case Tt:return"Portal";case We:return y.displayName||"Context";case Ge:return(y._context.displayName||"Context")+".Consumer";case $e:var U=y.render;return y=y.displayName,y||(y=U.displayName||U.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case He:return U=y.displayName||null,U!==null?U:S(y.type)||"Memo";case et:U=y._payload,y=y._init;try{return S(y(U))}catch{}}return null}function w(y){if(y===Qt)return"<>";if(typeof y=="object"&&y!==null&&y.$$typeof===et)return"<...>";try{var U=S(y);return U?"<"+U+">":"<...>"}catch{return"<...>"}}function x(){var y=Ve.A;return y===null?null:y.getOwner()}function v(){return Error("react-stack-top-frame")}function N(y){if(Wt.call(y,"key")){var U=Object.getOwnPropertyDescriptor(y,"key").get;if(U&&U.isReactWarning)return!1}return y.key!==void 0}function L(y,U){function ue(){kn||(kn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}ue.isReactWarning=!0,Object.defineProperty(y,"key",{get:ue,configurable:!0})}function j(){var y=S(this.type);return Na[y]||(Na[y]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),y=this.props.ref,y!==void 0?y:null}function M(y,U,ue,re,ce,ct){var xe=ue.ref;return y={$$typeof:Me,type:y,key:U,props:ue,_owner:re},(xe!==void 0?xe:null)!==null?Object.defineProperty(y,"ref",{enumerable:!1,get:j}):Object.defineProperty(y,"ref",{enumerable:!1,value:null}),y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(y,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(y,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.defineProperty(y,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ct}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y}function ae(y,U){return U=M(y.type,U,y.props,y._owner,y._debugStack,y._debugTask),y._store&&(U._store.validated=y._store.validated),U}function he(y){Re(y)?y._store&&(y._store.validated=1):typeof y=="object"&&y!==null&&y.$$typeof===et&&(y._payload.status==="fulfilled"?Re(y._payload.value)&&y._payload.value._store&&(y._payload.value._store.validated=1):y._store&&(y._store.validated=1))}function Re(y){return typeof y=="object"&&y!==null&&y.$$typeof===Me}function Ie(y){var U={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(ue){return U[ue]})}function je(y,U){return typeof y=="object"&&y!==null&&y.key!=null?(I(y.key),Ie(""+y.key)):U.toString(36)}function Oe(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(E,E):(y.status="pending",y.then(function(U){y.status==="pending"&&(y.status="fulfilled",y.value=U)},function(U){y.status==="pending"&&(y.status="rejected",y.reason=U)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function be(y,U,ue,re,ce){var ct=typeof y;(ct==="undefined"||ct==="boolean")&&(y=null);var xe=!1;if(y===null)xe=!0;else switch(ct){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(y.$$typeof){case Me:case Tt:xe=!0;break;case et:return xe=y._init,be(xe(y._payload),U,ue,re,ce)}}if(xe){xe=y,ce=ce(xe);var Xe=re===""?"."+je(xe,0):re;return ua(ce)?(ue="",Xe!=null&&(ue=Xe.replace(Qo,"$&/")+"/"),be(ce,U,ue,"",function($n){return $n})):ce!=null&&(Re(ce)&&(ce.key!=null&&(xe&&xe.key===ce.key||I(ce.key)),ue=ae(ce,ue+(ce.key==null||xe&&xe.key===ce.key?"":(""+ce.key).replace(Qo,"$&/")+"/")+Xe),re!==""&&xe!=null&&Re(xe)&&xe.key==null&&xe._store&&!xe._store.validated&&(ue._store.validated=2),ce=ue),U.push(ce)),1}if(xe=0,Xe=re===""?".":re+":",ua(y))for(var Dt=0;Dt<y.length;Dt++)re=y[Dt],ct=Xe+je(re,Dt),xe+=be(re,U,ue,ct,ce);else if(Dt=o(y),typeof Dt=="function")for(Dt===y.entries&&(qt||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),qt=!0),y=Dt.call(y),Dt=0;!(re=y.next()).done;)re=re.value,ct=Xe+je(re,Dt++),xe+=be(re,U,ue,ct,ce);else if(ct==="object"){if(typeof y.then=="function")return be(Oe(y),U,ue,re,ce);throw U=String(y),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return xe}function ze(y,U,ue){if(y==null)return y;var re=[],ce=0;return be(y,re,"","",function(ct){return U.call(ue,ct,ce++)}),re}function Qe(y){if(y._status===-1){var U=null,ue=null,re=y._ioInfo;re!=null&&(re.start=re.end=performance.now(),re.value=new Promise(function(xe,Xe){U=xe,ue=Xe})),re=y._result;var ce=re();if(ce.then(function(xe){if(y._status===0||y._status===-1){y._status=1,y._result=xe;var Xe=y._ioInfo;if(Xe!=null){Xe.end=performance.now();var Dt=xe?.default;U(Dt),Xe.value.status="fulfilled",Xe.value.value=Dt}ce.status===void 0&&(ce.status="fulfilled",ce.value=xe)}},function(xe){if(y._status===0||y._status===-1){y._status=2,y._result=xe;var Xe=y._ioInfo;Xe!=null&&(Xe.end=performance.now(),Xe.value.then(E,E),ue(xe),Xe.value.status="rejected",Xe.value.reason=xe),ce.status===void 0&&(ce.status="rejected",ce.reason=xe)}}),re=y._ioInfo,re!=null){var ct=ce.displayName;typeof ct=="string"&&(re.name=ct)}y._status===-1&&(y._status=0,y._result=ce)}if(y._status===1)return re=y._result,re===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
3
+ import{$ as k1,$a as rs,A as R1,Aa as $m,B as b1,Ba as V1,C as dA,Ca as X1,D as Xm,Da as AB,E as T1,Ea as VA,F as N1,Fa as Z1,G as w1,Ga as P1,H as x1,Ha as W1,I as As,Ia as ls,J as _1,Ja as Dg,K as Zm,Ka as $1,L as gA,La as eD,M as xl,Ma as tD,N as Ig,Na as lB,O as U1,Oa as nQ,P as M1,Pa as nD,Q as O1,Qa as aD,R as Ku,Ra as oD,S as di,Sa as iD,T as gn,Ta as AD,U as on,Ua as lD,V as Za,Va as rD,W as wn,Wa as sD,X as $C,Xa as cD,Y as Uo,Ya as uD,Z as eB,Za as rB,_ as Mn,_a as sB,a as R,aa as H1,ab as cB,b as XC,ba as Pm,bb as uB,c as qA,ca as yg,cb as fD,d as fA,da as G1,db as eE,e as fr,ea as Wm,eb as aQ,f as Ju,fa as Qg,fb as dD,g as Q1,ga as Yu,gb as gD,h as dr,ha as tB,hb as pD,i as qm,ia as nB,ib as mD,j as Vm,ja as tQ,jb as ED,k as gr,ka as L1,kb as fB,l as Nl,la as Sg,lb as hD,m as wl,ma as Zo,mb as CD,n as Wy,na as Po,nb as oQ,o as Pn,oa as Pe,ob as iQ,p as ki,pa as j1,pb as BD,q as S1,qa as z1,qb as ID,r as $y,ra as F1,rb as yD,s as v1,sa as J1,sb as QD,t as cc,ta as aB,u as In,ua as vg,v as pr,va as K1,vb as SD,w as PC,wa as oB,wb as vD,x as eQ,xa as iB,y as WC,ya as Y1,z as D1,za as q1}from"./chunk-PLUWAA7O.js";import{a as B1,c as ZC,d as I1,e as y1}from"./chunk-42IVF3YT.js";import{a as Bg,b as Ha,c as cx,d as st}from"./chunk-6EA4DGCY.js";var E2=Ha(TB=>{"use strict";var CM=Symbol.for("react.transitional.element"),BM=Symbol.for("react.fragment");function m2(n,o,l){var s=null;if(l!==void 0&&(s=""+l),o.key!==void 0&&(s=""+o.key),"key"in o){l={};for(var u in o)u!=="key"&&(l[u]=o[u])}else l=o;return o=l.ref,{$$typeof:CM,type:n,key:s,ref:o!==void 0?o:null,props:l}}TB.Fragment=BM;TB.jsx=m2;TB.jsxs=m2});var N2=Ha(Rt=>{"use strict";var jQ=Symbol.for("react.transitional.element"),IM=Symbol.for("react.portal"),yM=Symbol.for("react.fragment"),QM=Symbol.for("react.strict_mode"),SM=Symbol.for("react.profiler"),vM=Symbol.for("react.consumer"),DM=Symbol.for("react.context"),RM=Symbol.for("react.forward_ref"),bM=Symbol.for("react.suspense"),TM=Symbol.for("react.memo"),y2=Symbol.for("react.lazy"),NM=Symbol.for("react.activity"),wM=Symbol.for("react.view_transition"),h2=Symbol.iterator;function xM(n){return n===null||typeof n!="object"?null:(n=h2&&n[h2]||n["@@iterator"],typeof n=="function"?n:null)}var Q2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S2=Object.assign,v2={};function kg(n,o,l){this.props=n,this.context=o,this.refs=v2,this.updater=l||Q2}kg.prototype.isReactComponent={};kg.prototype.setState=function(n,o){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,o,"setState")};kg.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function D2(){}D2.prototype=kg.prototype;function zQ(n,o,l){this.props=n,this.context=o,this.refs=v2,this.updater=l||Q2}var FQ=zQ.prototype=new D2;FQ.constructor=zQ;S2(FQ,kg.prototype);FQ.isPureReactComponent=!0;var C2=Array.isArray;function LQ(){}var Kn={H:null,A:null,T:null,S:null},R2=Object.prototype.hasOwnProperty;function JQ(n,o,l){var s=l.ref;return{$$typeof:jQ,type:n,key:o,ref:s!==void 0?s:null,props:l}}function _M(n,o){return JQ(n.type,o,n.props)}function KQ(n){return typeof n=="object"&&n!==null&&n.$$typeof===jQ}function UM(n){var o={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(l){return o[l]})}var B2=/\/+/g;function GQ(n,o){return typeof n=="object"&&n!==null&&n.key!=null?UM(""+n.key):o.toString(36)}function MM(n){switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:switch(typeof n.status=="string"?n.then(LQ,LQ):(n.status="pending",n.then(function(o){n.status==="pending"&&(n.status="fulfilled",n.value=o)},function(o){n.status==="pending"&&(n.status="rejected",n.reason=o)})),n.status){case"fulfilled":return n.value;case"rejected":throw n.reason}}throw n}function Og(n,o,l,s,u){var p=typeof n;(p==="undefined"||p==="boolean")&&(n=null);var E=!1;if(n===null)E=!0;else switch(p){case"bigint":case"string":case"number":E=!0;break;case"object":switch(n.$$typeof){case jQ:case IM:E=!0;break;case y2:return E=n._init,Og(E(n._payload),o,l,s,u)}}if(E)return u=u(n),E=s===""?"."+GQ(n,0):s,C2(u)?(l="",E!=null&&(l=E.replace(B2,"$&/")+"/"),Og(u,o,l,"",function(S){return S})):u!=null&&(KQ(u)&&(u=_M(u,l+(u.key==null||n&&n.key===u.key?"":(""+u.key).replace(B2,"$&/")+"/")+E)),o.push(u)),1;E=0;var B=s===""?".":s+":";if(C2(n))for(var I=0;I<n.length;I++)s=n[I],p=B+GQ(s,I),E+=Og(s,o,l,p,u);else if(I=xM(n),typeof I=="function")for(n=I.call(n),I=0;!(s=n.next()).done;)s=s.value,p=B+GQ(s,I++),E+=Og(s,o,l,p,u);else if(p==="object"){if(typeof n.then=="function")return Og(MM(n),o,l,s,u);throw o=String(n),Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}return E}function NB(n,o,l){if(n==null)return n;var s=[],u=0;return Og(n,s,"","",function(p){return o.call(l,p,u++)}),s}function OM(n){if(n._status===-1){var o=n._result,l=o();l.then(function(s){(n._status===0||n._status===-1)&&(n._status=1,n._result=s,l.status===void 0&&(l.status="fulfilled",l.value=s))},function(s){(n._status===0||n._status===-1)&&(n._status=2,n._result=s,l.status===void 0&&(l.status="rejected",l.reason=s))}),n._status===-1&&(n._status=0,n._result=l)}if(n._status===1)return n._result.default;throw n._result}var I2=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=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(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)};function b2(n){var o=Kn.T,l={};l.types=o!==null?o.types:null,Kn.T=l;try{var s=n(),u=Kn.S;u!==null&&u(l,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(LQ,I2)}catch(p){I2(p)}finally{o!==null&&l.types!==null&&(o.types=l.types),Kn.T=o}}function T2(n){var o=Kn.T;if(o!==null){var l=o.types;l===null?o.types=[n]:l.indexOf(n)===-1&&l.push(n)}else b2(T2.bind(null,n))}var kM={map:NB,forEach:function(n,o,l){NB(n,function(){o.apply(this,arguments)},l)},count:function(n){var o=0;return NB(n,function(){o++}),o},toArray:function(n){return NB(n,function(o){return o})||[]},only:function(n){if(!KQ(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};Rt.Activity=NM;Rt.Children=kM;Rt.Component=kg;Rt.Fragment=yM;Rt.Profiler=SM;Rt.PureComponent=zQ;Rt.StrictMode=QM;Rt.Suspense=bM;Rt.ViewTransition=wM;Rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Kn;Rt.__COMPILER_RUNTIME={__proto__:null,c:function(n){return Kn.H.useMemoCache(n)}};Rt.addTransitionType=T2;Rt.cache=function(n){return function(){return n.apply(null,arguments)}};Rt.cacheSignal=function(){return null};Rt.cloneElement=function(n,o,l){if(n==null)throw Error("The argument must be a React element, but you passed "+n+".");var s=S2({},n.props),u=n.key;if(o!=null)for(p in o.key!==void 0&&(u=""+o.key),o)!R2.call(o,p)||p==="key"||p==="__self"||p==="__source"||p==="ref"&&o.ref===void 0||(s[p]=o[p]);var p=arguments.length-2;if(p===1)s.children=l;else if(1<p){for(var E=Array(p),B=0;B<p;B++)E[B]=arguments[B+2];s.children=E}return JQ(n.type,u,s)};Rt.createContext=function(n){return n={$$typeof:DM,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:vM,_context:n},n};Rt.createElement=function(n,o,l){var s,u={},p=null;if(o!=null)for(s in o.key!==void 0&&(p=""+o.key),o)R2.call(o,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(u[s]=o[s]);var E=arguments.length-2;if(E===1)u.children=l;else if(1<E){for(var B=Array(E),I=0;I<E;I++)B[I]=arguments[I+2];u.children=B}if(n&&n.defaultProps)for(s in E=n.defaultProps,E)u[s]===void 0&&(u[s]=E[s]);return JQ(n,p,u)};Rt.createRef=function(){return{current:null}};Rt.forwardRef=function(n){return{$$typeof:RM,render:n}};Rt.isValidElement=KQ;Rt.lazy=function(n){return{$$typeof:y2,_payload:{_status:-1,_result:n},_init:OM}};Rt.memo=function(n,o){return{$$typeof:TM,type:n,compare:o===void 0?null:o}};Rt.startTransition=b2;Rt.unstable_useCacheRefresh=function(){return Kn.H.useCacheRefresh()};Rt.use=function(n){return Kn.H.use(n)};Rt.useActionState=function(n,o,l){return Kn.H.useActionState(n,o,l)};Rt.useCallback=function(n,o){return Kn.H.useCallback(n,o)};Rt.useContext=function(n){return Kn.H.useContext(n)};Rt.useDebugValue=function(){};Rt.useDeferredValue=function(n,o){return Kn.H.useDeferredValue(n,o)};Rt.useEffect=function(n,o){return Kn.H.useEffect(n,o)};Rt.useEffectEvent=function(n){return Kn.H.useEffectEvent(n)};Rt.useId=function(){return Kn.H.useId()};Rt.useImperativeHandle=function(n,o,l){return Kn.H.useImperativeHandle(n,o,l)};Rt.useInsertionEffect=function(n,o){return Kn.H.useInsertionEffect(n,o)};Rt.useLayoutEffect=function(n,o){return Kn.H.useLayoutEffect(n,o)};Rt.useMemo=function(n,o){return Kn.H.useMemo(n,o)};Rt.useOptimistic=function(n,o){return Kn.H.useOptimistic(n,o)};Rt.useReducer=function(n,o,l){return Kn.H.useReducer(n,o,l)};Rt.useRef=function(n){return Kn.H.useRef(n)};Rt.useState=function(n){return Kn.H.useState(n)};Rt.useSyncExternalStore=function(n,o,l){return Kn.H.useSyncExternalStore(n,o,l)};Rt.useTransition=function(){return Kn.H.useTransition()};Rt.version="19.3.0"});var w2=Ha((yt,wB)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function n(y,U){Object.defineProperty(s.prototype,y,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",U[0],U[1])}})}function o(y){return y===null||typeof y!="object"?null:(y=$a&&y[$a]||y["@@iterator"],typeof y=="function"?y:null)}function l(y,U){y=(y=y.constructor)&&(y.displayName||y.name)||"ReactClass";var ue=y+"."+U;St[ue]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",U,y),St[ue]=!0)}function s(y,U,ue){this.props=y,this.context=U,this.refs=en,this.updater=ue||Ft}function u(){}function p(y,U,ue){this.props=y,this.context=U,this.refs=en,this.updater=ue||Ft}function E(){}function B(y){return""+y}function I(y){try{B(y);var U=!1}catch{U=!0}if(U){U=console;var ue=U.error,re=typeof Symbol=="function"&&Symbol.toStringTag&&y[Symbol.toStringTag]||y.constructor.name||"Object";return ue.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",re),B(y)}}function S(y){if(y==null)return null;if(typeof y=="function")return y.$$typeof===Wn?null:y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case Qt:return"Fragment";case Te:return"Profiler";case J:return"StrictMode";case ut:return"Suspense";case qe:return"SuspenseList";case mn:return"Activity";case Ga:return"ViewTransition"}if(typeof y=="object")switch(typeof y.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),y.$$typeof){case Tt:return"Portal";case We:return y.displayName||"Context";case Ge:return(y._context.displayName||"Context")+".Consumer";case $e:var U=y.render;return y=y.displayName,y||(y=U.displayName||U.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case He:return U=y.displayName||null,U!==null?U:S(y.type)||"Memo";case et:U=y._payload,y=y._init;try{return S(y(U))}catch{}}return null}function w(y){if(y===Qt)return"<>";if(typeof y=="object"&&y!==null&&y.$$typeof===et)return"<...>";try{var U=S(y);return U?"<"+U+">":"<...>"}catch{return"<...>"}}function x(){var y=Ve.A;return y===null?null:y.getOwner()}function v(){return Error("react-stack-top-frame")}function N(y){if(Wt.call(y,"key")){var U=Object.getOwnPropertyDescriptor(y,"key").get;if(U&&U.isReactWarning)return!1}return y.key!==void 0}function L(y,U){function ue(){kn||(kn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}ue.isReactWarning=!0,Object.defineProperty(y,"key",{get:ue,configurable:!0})}function j(){var y=S(this.type);return Na[y]||(Na[y]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),y=this.props.ref,y!==void 0?y:null}function M(y,U,ue,re,ce,ct){var xe=ue.ref;return y={$$typeof:Me,type:y,key:U,props:ue,_owner:re},(xe!==void 0?xe:null)!==null?Object.defineProperty(y,"ref",{enumerable:!1,get:j}):Object.defineProperty(y,"ref",{enumerable:!1,value:null}),y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(y,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(y,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.defineProperty(y,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ct}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y}function ae(y,U){return U=M(y.type,U,y.props,y._owner,y._debugStack,y._debugTask),y._store&&(U._store.validated=y._store.validated),U}function he(y){Re(y)?y._store&&(y._store.validated=1):typeof y=="object"&&y!==null&&y.$$typeof===et&&(y._payload.status==="fulfilled"?Re(y._payload.value)&&y._payload.value._store&&(y._payload.value._store.validated=1):y._store&&(y._store.validated=1))}function Re(y){return typeof y=="object"&&y!==null&&y.$$typeof===Me}function Ie(y){var U={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(ue){return U[ue]})}function je(y,U){return typeof y=="object"&&y!==null&&y.key!=null?(I(y.key),Ie(""+y.key)):U.toString(36)}function Oe(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(E,E):(y.status="pending",y.then(function(U){y.status==="pending"&&(y.status="fulfilled",y.value=U)},function(U){y.status==="pending"&&(y.status="rejected",y.reason=U)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function be(y,U,ue,re,ce){var ct=typeof y;(ct==="undefined"||ct==="boolean")&&(y=null);var xe=!1;if(y===null)xe=!0;else switch(ct){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(y.$$typeof){case Me:case Tt:xe=!0;break;case et:return xe=y._init,be(xe(y._payload),U,ue,re,ce)}}if(xe){xe=y,ce=ce(xe);var Xe=re===""?"."+je(xe,0):re;return ua(ce)?(ue="",Xe!=null&&(ue=Xe.replace(Qo,"$&/")+"/"),be(ce,U,ue,"",function($n){return $n})):ce!=null&&(Re(ce)&&(ce.key!=null&&(xe&&xe.key===ce.key||I(ce.key)),ue=ae(ce,ue+(ce.key==null||xe&&xe.key===ce.key?"":(""+ce.key).replace(Qo,"$&/")+"/")+Xe),re!==""&&xe!=null&&Re(xe)&&xe.key==null&&xe._store&&!xe._store.validated&&(ue._store.validated=2),ce=ue),U.push(ce)),1}if(xe=0,Xe=re===""?".":re+":",ua(y))for(var Dt=0;Dt<y.length;Dt++)re=y[Dt],ct=Xe+je(re,Dt),xe+=be(re,U,ue,ct,ce);else if(Dt=o(y),typeof Dt=="function")for(Dt===y.entries&&(qt||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),qt=!0),y=Dt.call(y),Dt=0;!(re=y.next()).done;)re=re.value,ct=Xe+je(re,Dt++),xe+=be(re,U,ue,ct,ce);else if(ct==="object"){if(typeof y.then=="function")return be(Oe(y),U,ue,re,ce);throw U=String(y),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return xe}function ze(y,U,ue){if(y==null)return y;var re=[],ce=0;return be(y,re,"","",function(ct){return U.call(ue,ct,ce++)}),re}function Qe(y){if(y._status===-1){var U=null,ue=null,re=y._ioInfo;re!=null&&(re.start=re.end=performance.now(),re.value=new Promise(function(xe,Xe){U=xe,ue=Xe})),re=y._result;var ce=re();if(ce.then(function(xe){if(y._status===0||y._status===-1){y._status=1,y._result=xe;var Xe=y._ioInfo;if(Xe!=null){Xe.end=performance.now();var Dt=xe?.default;U(Dt),Xe.value.status="fulfilled",Xe.value.value=Dt}ce.status===void 0&&(ce.status="fulfilled",ce.value=xe)}},function(xe){if(y._status===0||y._status===-1){y._status=2,y._result=xe;var Xe=y._ioInfo;Xe!=null&&(Xe.end=performance.now(),Xe.value.then(E,E),ue(xe),Xe.value.status="rejected",Xe.value.reason=xe),ce.status===void 0&&(ce.status="rejected",ce.reason=xe)}}),re=y._ioInfo,re!=null){var ct=ce.displayName;typeof ct=="string"&&(re.name=ct)}y._status===-1&&(y._status=0,y._result=ce)}if(y._status===1)return re=y._result,re===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
4
4
 
5
5
  Your code should look like:
6
6
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -597,7 +597,7 @@ To go back to TDK: install it and run \`tdk config regenerate\`.
597
597
  ${R.cyan("$")} tdk networks # Show Traefik-routed URLs
598
598
  ${R.cyan("$")} tdk doctor # Check your environment
599
599
  ${R.cyan("$")} tdk upgrade # Self-update
600
- `)),console.log(R.gray(` ${"\u2550".repeat(50)}`)),console.log(R.gray(` For more help: ${R.cyan("tdk help [command]")}`)),console.log(R.gray(` GitHub: ${R.cyan("https://github.com/tdk-landscape/tdk-cli-core")}`)),console.log()}import{spawn as b_}from"node:child_process";import{Command as T_}from"commander";var N_="github:tdk-landscape/tdk-import";function w_(n,o=process.env,l=process.platform){let s=o.TDK_IMPORT_PACKAGE||N_;return{command:l==="win32"?"npx.cmd":"npx",args:["--yes",s,...n],shell:l==="win32"}}function x_(n,o=b_){let l=w_(n);return new Promise(s=>{let u=o(l.command,l.args,{stdio:"inherit",shell:l.shell});u.on("error",p=>{console.error(`tdk import: could not run npx (${p.message}). Install Node.js/npm and retry.`),s(127)}),u.on("close",p=>s(p??1))})}var ZD=new T_("import").description("Import the services a directory describes (runs tdk-import)").argument("[args...]","Passed to tdk-import: [dir] --dry-run --yes --force --only <ids>").allowUnknownOption().helpOption(!1).action(async n=>{process.exitCode=await x_(n)});import{Command as k_}from"commander";var __={ns:1,us:1e3,\u00B5s:1e3,ms:1e6,s:1e9,m:6e10,h:36e11},U_=2**63-1;function PD(n){if(!/^(\d+(\.\d+)?(ns|us|µs|ms|s|m|h))+$/.test(n))return!1;let o=0;for(let[,l,s]of n.matchAll(/(\d+(?:\.\d+)?)(ns|us|µs|ms|s|m|h)/g))o+=Number(l)*(__[s]??0);return o<=U_}function WD(n){return/^[1-9]\d{0,4}$/.test(n)&&Number(n)<=65535}function $D(n){return/^[1-9]\d*$/.test(n)&&Number(n)<=1e4}function eR(n,o){let l=[];for(let s of n.split(`
600
+ `)),console.log(R.gray(` ${"\u2550".repeat(50)}`)),console.log(R.gray(` For more help: ${R.cyan("tdk help [command]")}`)),console.log(R.gray(` GitHub: ${R.cyan("https://github.com/tdk-landscape/tdk-cli-core")}`)),console.log()}import{spawn as b_}from"node:child_process";import{Command as T_}from"commander";var N_="@tdk-landscape/tdk-import@0.2.1";function w_(n,o=process.env,l=process.platform){let s=o.TDK_IMPORT_PACKAGE||N_;return{command:l==="win32"?"npx.cmd":"npx",args:["--yes",s,...n],shell:l==="win32"}}function x_(n,o=b_){let l=w_(n);return new Promise(s=>{let u=o(l.command,l.args,{stdio:"inherit",shell:l.shell});u.on("error",p=>{console.error(`tdk import: could not run npx (${p.message}). Install Node.js/npm and retry.`),s(127)}),u.on("close",p=>s(p??1))})}var ZD=new T_("import").description("Import the services in a directory's root docker-compose.yml (runs tdk-import)").argument("[args...]","Passed to tdk-import: [dir] --dry-run --yes --force").allowUnknownOption().helpOption(!1).action(async n=>{process.exitCode=await x_(n)});import{Command as k_}from"commander";var __={ns:1,us:1e3,\u00B5s:1e3,ms:1e6,s:1e9,m:6e10,h:36e11},U_=2**63-1;function PD(n){if(!/^(\d+(\.\d+)?(ns|us|µs|ms|s|m|h))+$/.test(n))return!1;let o=0;for(let[,l,s]of n.matchAll(/(\d+(?:\.\d+)?)(ns|us|µs|ms|s|m|h)/g))o+=Number(l)*(__[s]??0);return o<=U_}function WD(n){return/^[1-9]\d{0,4}$/.test(n)&&Number(n)<=65535}function $D(n){return/^[1-9]\d*$/.test(n)&&Number(n)<=1e4}function eR(n,o){let l=[];for(let s of n.split(`
601
601
  `))if(s.trim())try{let u=JSON.parse(s),p=E=>typeof E=="string"&&E!==""?E:null;l.push({time:p(u.time),resource:p(u.resource),level:p(u.level),source:p(u.source),text:typeof u.message=="string"?u.message:""})}catch{}return l.slice(-o)}function tR(n){return/connection refused|connecting to Tilt|no such host|dial tcp|websocket_token/i.test(n)}function nR(n){return`Could not reach Tilt on port ${n}. The stack is not running, or Tilt is on another port. Start it with: tdk up`}async function H_(n){try{let o=await xl("get",["uiresources","-o","json","--port",n],{inheritStdio:!1});return o.exitCode!==0?null:(JSON.parse(o.stdout).items??[]).flatMap(s=>s.metadata?.name?[s.metadata.name]:[])}catch{return null}}var aR=new k_("logs").description("Print a bounded snapshot of recent logs from the running stack").option("-s, --service <names...>","Only these services (Tilt resource names)").option("--tail <n>","Number of most recent lines to return",String(200)).option("--since <duration>","Only logs newer than this duration, for example 30s, 5m, 1h").option("--port <n>","Tilt UI port (default: TILT_PORT or 10350)").option("--json","Output one JSON object and exit",!1).action(async n=>{let o=[],l=(B,I,S=1,w=[])=>{let x=oQ(I,o),v=iQ(w,o);return n.json&&(console.log(JSON.stringify(Wo(null,[{code:B,message:x,...v.length>0?{suggestions:v}:{}}]))),console.error(x),process.exit(S)),v.length>0?new gn(x,v,S).exit():Uo(x,S)};$D(n.tail)||l("USAGE",`--tail must be an integer from 1 to ${1e4}`,2),n.since!==void 0&&!PD(n.since)&&l("USAGE","--since must be a duration such as 30s, 5m or 1h",2);let s=n.port??process.env.TILT_PORT??String(ki.tiltUi);WD(s)||l("USAGE","--port must be a valid port number",2);let u=Number(n.tail),p=n.service??[];await wn(async()=>{let B=In();if(!B){let x=on.notInProject();return l("COMMAND_FAILED",x.message,x.exitCode,x.suggestions)}try{o=CD(B)}catch(x){if(!(x instanceof hD))throw x;l("ENV_UNREADABLE",x.message,1,["Fix the read permission on .env, or move it out of the project"])}if(await Ig()||l("TILT_MISSING","Tilt is not installed. Run: tdk doctor"),p.length>0){let x=await H_(s),v=p.filter(N=>x&&!x.includes(N));if(v.length>0){let N=on.unknownServices(v,x??[]),L=N.suggestions;l("UNKNOWN_SERVICE",N.message,N.exitCode,L)}}let I=["--port",s,"--tail",String(u)];n.since!==void 0&&I.push("--since",n.since),n.json&&I.push("--json"),p.length>0&&I.push("--",...p);let S=await xl("logs",I,{inheritStdio:!1});if(S.exitCode!==0){let x=S.stderr.trim();(!x||tR(x))&&l("TILT_NOT_RUNNING",nR(s)),l("TILT_LOGS_FAILED",`tilt logs failed: ${x}`)}if(!n.json){process.stdout.write(oQ(S.stdout,o));return}let w=eR(S.stdout,u);console.log(JSON.stringify(iQ(Wo({services:p,tail:u,since:n.since??null,lines:w}),o)))})});import{existsSync as G_,readFileSync as L_}from"node:fs";import{resolve as j_}from"node:path";import{Command as oR}from"commander";var z_=3,F_=2,J_=["name","github id","company"],K_=new Set(["","tbd","unknown","tdk-landscape"]);function BQ(n){return n.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(o=>o.trim())}function Y_(n){let o=n.split(/\r?\n/),l=o.findIndex(I=>{if(!I.includes("|"))return!1;let S=BQ(I).map(w=>w.toLowerCase());return J_.every(w=>S.includes(w))});if(l===-1)return{ok:!1,error:"table with columns Name, GitHub id, Company not found"};let s=BQ(o[l]).map(I=>I.toLowerCase()),u=s.indexOf("name"),p=s.indexOf("github id"),E=s.indexOf("company"),B=[];for(let I of o.slice(l+1)){if(!I.includes("|"))break;let S=BQ(I);S.every(w=>/^:?-+:?$/.test(w))||B.push({name:S[u]??"",githubId:S[p]??"",company:S[E]??""})}return{ok:!0,rows:B}}function q_(n){let o=new Set,l=n.filter(E=>{let B=E.githubId.toLowerCase();return!E.name||!B||o.has(B)||K_.has(E.company.toLowerCase())?!1:(o.add(B),!0)}),s=new Set(l.map(E=>E.company.toLowerCase())),u=Math.max(0,z_-l.length),p=Math.max(0,F_-s.size);return{eligible:u===0&&p===0,people:l.length,companies:s.size,missingPeople:u,missingCompanies:p}}function V_(n){let o=j_(n);if(!G_(o))return{exitCode:1,output:`${n} not found`};let l=Y_(L_(o,"utf8"));if(!l.ok)return{exitCode:1,output:`${n}: ${l.error}`};let s=q_(l.rows);return s.eligible?{exitCode:0,output:`${s.people} maintainers, ${s.companies} companies`}:{exitCode:1,output:`not eligible: ${s.people} maintainers (${s.missingPeople} missing), ${s.companies} companies (${s.missingCompanies} missing)`}}var iR=new oR("maintainers").description("Maintainer file checks").addCommand(new oR("check").description("Check MAINTAINERS.md lists 3 maintainers from 2 companies (a gate, not a claim of eligibility)").argument("[file]","maintainers file","MAINTAINERS.md").action(n=>{let{exitCode:o,output:l}=V_(n);(o===0?console.log:console.error)(l),process.exitCode=o}));import{createInterface as lU}from"node:readline";import{Command as rU}from"commander";var AR=["2025-06-18","2025-03-26","2024-11-05"],wg={parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602};function aE(n,o){return JSON.stringify({jsonrpc:"2.0",id:n,result:o})}function xg(n,o,l){return JSON.stringify({jsonrpc:"2.0",id:n??null,error:{code:o,message:l}})}function lR(n,o){let l=new Map(n.map(u=>[u.name,u]));async function s(u){let p=u.id===void 0;if(u.jsonrpc!=="2.0"||typeof u.method!="string")return p?null:xg(u.id,wg.invalidRequest,"Invalid request");switch(u.method){case"initialize":{let E=String(u.params?.protocolVersion??""),B=AR.includes(E)?E:AR[0];return aE(u.id,{protocolVersion:B,capabilities:{tools:{listChanged:!1}},serverInfo:o})}case"ping":return aE(u.id,{});case"tools/list":return aE(u.id,{tools:n.map(({name:E,description:B,inputSchema:I})=>({name:E,description:B,inputSchema:I}))});case"tools/call":{let E=u.params?.name,B=typeof E=="string"?l.get(E):void 0;if(!B)return xg(u.id,wg.invalidParams,`Unknown tool: ${String(E)}`);let I=u.params?.arguments;if(I!==void 0&&(typeof I!="object"||I===null||Array.isArray(I)))return xg(u.id,wg.invalidParams,"arguments must be an object");try{let S=await B.handler(I??{});return aE(u.id,{content:[{type:"text",text:JSON.stringify(S.data)}],structuredContent:S.data,isError:S.isError})}catch(S){let w=S instanceof Error?S.message:String(S);return aE(u.id,{content:[{type:"text",text:w}],isError:!0})}}default:return p?null:xg(u.id,wg.methodNotFound,`Method not found: ${u.method}`)}}return{async handleLine(u){if(!u.trim())return null;let p;try{p=JSON.parse(u)}catch{return xg(null,wg.parse,"Parse error")}return typeof p!="object"||p===null||Array.isArray(p)?xg(null,wg.invalidRequest,"Invalid request"):s(p)}}}import{spawn as rR}from"node:child_process";import{closeSync as X_,existsSync as Z_,openSync as P_,readFileSync as W_}from"node:fs";import{tmpdir as $_}from"node:os";import{isAbsolute as eU,join as tU}from"node:path";var sR=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,nU=/^(\d+(\.\d+)?(ns|us|µs|ms|s|m|h))+$/;function cR(n=process.execPath,o=process.argv[1],l=Z_){return!o||o.startsWith("/$bunfs/")||o.includes("~BUN")||!l(o)?[n]:[n,o]}var aU=(n,o={})=>new Promise((l,s)=>{let[u,...p]=cR(),E=rR(u,[...p,...n],{cwd:o.cwd,stdio:["ignore","pipe","pipe"],env:{...process.env,NO_COLOR:"1"}}),B="",I="";E.stdout?.on("data",w=>{B+=w.toString()}),E.stderr?.on("data",w=>{I+=w.toString()});let S=setTimeout(()=>E.kill("SIGTERM"),o.timeoutMs??12e4);E.once("error",w=>{clearTimeout(S),s(w)}),E.once("close",w=>{clearTimeout(S),l({exitCode:w,stdout:B,stderr:I})})});function uR(n,o){if(n===void 0)return[];if(!Array.isArray(n)||n.some(l=>typeof l!="string"||!sR.test(l)))throw new Error(`${o} must be an array of service names (letters, digits, ".", "_", "-")`);return n}function fR(n,o){if(n!==void 0){if(typeof n!="string"||!sR.test(n))throw new Error(`${o} must be a name (letters, digits, ".", "_", "-")`);return n}}function dR(n,o){if(n===void 0)return!1;if(typeof n!="boolean")throw new Error(`${o} must be a boolean`);return n}function IQ(n){let l=n.stdout.trim().split(`
602
602
  `).filter(s=>s.trim().startsWith("{")).pop();if(!l)return{data:{errors:[{code:"NO_JSON",message:n.stderr.trim()||`tdk exited with code ${n.exitCode}`}]},isError:!0};try{let s=JSON.parse(l),u=(s.errors?.length??0)>0||s.data?.ok===!1;return{data:s,isError:u}}catch{return{data:{errors:[{code:"BAD_JSON",message:l.slice(0,200)}]},isError:!0}}}var gR={spawnUp(n,o,l){let s=P_(o,"a"),[u,...p]=cR(),E=rR(u,[...p,...n],{cwd:l,detached:!0,stdio:["ignore",s,s],env:{...process.env,NO_COLOR:"1"}});return X_(s),E},readLog(n){try{return W_(n,"utf-8")}catch{return""}},sleep:n=>new Promise(o=>setTimeout(o,n)),now:()=>Date.now(),logFile:()=>tU($_(),`tdk-mcp-up-${Date.now()}.log`)};function oU(n){let o=fR(n.stack,"stack"),l=uR(n.only,"only"),s=["up"];return o&&s.push(o),l.length>0&&s.push(...l.map(u=>`--only=${u}`)),dR(n.force,"force")&&s.push("--force"),s.push("--json"),s}async function iU(n,o=gR){let l=oU(n),s=o.logFile(),u=o.spawnUp(l,s,pR(n.projectPath)),p;u.once("exit",I=>{p=I});let E=typeof n.waitSeconds=="number"?Math.min(Math.max(n.waitSeconds,0),60)*1e3:15e3,B=o.now()+E;for(;;){let I=o.readLog(s),S=I.split(`
603
603
  `).filter(w=>w.startsWith('{"schemaVersion"')).pop();if(S)return{...IQ({exitCode:p??null,stdout:S,stderr:""})};if(p!==void 0)return IQ({exitCode:p,stdout:"",stderr:I.slice(-2e3)});if(o.now()>=B)break;await o.sleep(250)}return u.unref(),{data:{schemaVersion:1,data:{ok:!0,started:!0,pid:u.pid??null,logFile:s,next:"Poll the status tool until data.tilt.readiness.ready is true. Call down to stop it."},errors:[]},isError:!1}}function AU(n){let o=["logs","--json"];for(let l of uR(n.services,"services"))o.push(`--service=${l}`);if(n.tail!==void 0){if(!Number.isInteger(n.tail)||n.tail<1)throw new Error("tail must be a positive integer");o.push(`--tail=${n.tail}`)}if(n.since!==void 0){if(typeof n.since!="string"||!nU.test(n.since))throw new Error("since must be a duration such as 30s, 5m or 1h");o.push(`--since=${n.since}`)}return o}var _g=n=>({type:"object",properties:n,additionalProperties:!1}),Ug={type:"string",description:"Absolute path to the TDK project root; run this operation from that directory."};function pR(n){if(n!==void 0){if(typeof n!="string"||!eU(n))throw new Error("projectPath must be an absolute path to a TDK project root");return n}}function mR(n=aU,o=gR){let l=s=>async u=>IQ(await n(s(u),{cwd:pR(u.projectPath)}));return[{name:"doctor",description:"Check whether this machine can run the TDK stack. Optionally set projectPath to include checks for a specific TDK project. Returns data.ready and data.host.canUp; run it before `up`.",inputSchema:_g({projectPath:Ug,noPing:{type:"boolean",description:"Skip pinging running services' health endpoints"}}),handler:l(s=>["doctor","--json",...dR(s.noPing,"noPing")?["--no-ping"]:[]])},{name:"up",description:"Start the stack (or part of it) detached from the optional projectPath and return without waiting for it to be ready. Poll `status` for data.tilt.readiness.ready. Fails fast on an unknown service, an unsupported host, or a Tilt already running.",inputSchema:_g({projectPath:Ug,stack:{type:"string",description:"Only this stack"},only:{type:"array",items:{type:"string"},description:"Start only these services plus what they depend on and shared infrastructure"},force:{type:"boolean",description:"Replace a Tilt that is already running"},waitSeconds:{type:"number",description:"How long to watch for an early failure before returning (default 15, max 60)"}}),handler:s=>iU(s,o)},{name:"down",description:"Stop the running stack, optionally selecting its project with projectPath.",inputSchema:_g({projectPath:Ug}),handler:l(()=>["down","--json"])},{name:"status",description:"Stacks, resources, their ingress URLs and container ports, the stack-level ports, and Tilt readiness (data.tilt.readiness: ready, pending, failures, enabled; null when no Tilt answers). Optionally select the project with projectPath.",inputSchema:_g({projectPath:Ug}),handler:l(()=>["status","--json"])},{name:"logs",description:"A bounded snapshot of recent logs from the running stack (default the last 200 lines, at most 10000). Optionally select the project with projectPath. Not a stream.",inputSchema:_g({projectPath:Ug,services:{type:"array",items:{type:"string"},description:"Only these services"},tail:{type:"integer",minimum:1,maximum:1e4},since:{type:"string",description:"Only logs newer than this, for example 30s, 5m, 1h"}}),handler:l(AU)},{name:"resource_list",description:"List the selected project's services (resources) with their stack, type and port. Set projectPath when the MCP server is not running from the project root.",inputSchema:_g({projectPath:Ug,stack:{type:"string",description:"Only this stack"}}),handler:l(s=>{let u=fR(s.stack,"stack");return["resources","--json",...u?[`--stack=${u}`]:[]]})}]}var ER=new rU("mcp").description("Run a Model Context Protocol server over stdio for coding agents").action(async()=>{let n=lR(mR(),{name:"tdk",version:pr()}),o=lU({input:process.stdin}),l=new Set;o.on("line",s=>{let u=n.handleLine(s).then(p=>{p&&process.stdout.write(`${p}
@@ -607,7 +607,7 @@ Available templates:`));for(let[p,E]of Object.entries(QB))console.log(` ${R.cya
607
607
  `,0),Pe(`Source: ${l.bundledPath?"bundled TDK example":l.repo}`,0),Pe(`Destination: ${u}
608
608
  `,0);try{if(l.bundledPath){let p=SB(vU(DU(new URL("../dist/commands/project.js",import.meta.url).href)),"../../../");IU(SB(p,l.bundledPath),u,{recursive:!0});let E=SU(u).replace(/-/g,"_");for(let B of["services/platform/messaging/docker-compose.yml","services/shop/orders-api/service.json","services/shop/orders-api/src/index.ts","services/shop/orders-worker/service.json","services/shop/orders-worker/src/index.ts"]){let I=Mg(u,B),S=QQ(I,"utf-8");QU(I,S.replaceAll("tdk_example",E))}}else BU("git",["clone",l.repo,u],{stdio:"inherit"})}catch{Uo(l.bundledPath?"Bundled example copy failed. Reinstall the TDK CLI package and try again.":"git clone failed. Check you have git installed and network access.")}console.log(R.green(`
609
609
  \u2705 Cloned "${n}" into ${s}/`)),Pe(`
610
- Next steps:`,0),Pe(`1. cd ${s}`),Pe("2. tdk doctor # check Docker/Tilt are ready"),Pe("3. tdk up # start the stack")}var AE={version:"1.0",project:{name:"",version:"1.0.0"},phases:{pre_alpha:{name:"Pre-Alpha",description:"Core infrastructure and MVP services",enabledStacks:TU()},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:{}},DR=new RU("project").description("Initialize or validate project-level master configuration").argument("[template]",`Clone a starter example instead of a blank project (${Object.keys(QB).join(", ")})`).option("--path <dir>","Directory to clone the template into (default: the template's repo name)").option("--check","Check if master configs exist and are in sync").option("--force","Overwrite existing configuration (dangerous)").option("--yes","Non-interactive mode (use defaults)").option("--config-file <path>","Load project config from existing JSON file").action(async(n,o)=>{let{assertMachineReadyOrExit:l}=await import("./cold-preflight-SJPUDOFL.js");if(await l(),n){await wn(async()=>NU(n,o.path));return}await wn(async()=>{let s=In();s||(s=SR(),Po(`\u{1F680} Initializing new TDK project...
610
+ Next steps:`,0),Pe(`1. cd ${s}`),Pe("2. tdk doctor # check Docker/Tilt are ready"),Pe("3. tdk up # start the stack")}var AE={version:"1.0",project:{name:"",version:"1.0.0"},phases:{pre_alpha:{name:"Pre-Alpha",description:"Core infrastructure and MVP services",enabledStacks:TU()},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:{}},DR=new RU("project").description("Initialize or validate project-level master configuration").argument("[template]",`Clone a starter example instead of a blank project (${Object.keys(QB).join(", ")})`).option("--path <dir>","Directory to clone the template into (default: the template's repo name)").option("--check","Check if master configs exist and are in sync").option("--force","Overwrite existing configuration (dangerous)").option("--yes","Non-interactive mode (use defaults)").option("--config-file <path>","Load project config from existing JSON file").action(async(n,o)=>{let{assertMachineReadyOrExit:l}=await import("./cold-preflight-RABRN55J.js");if(await l(),n){await wn(async()=>NU(n,o.path));return}await wn(async()=>{let s=In();s||(s=SR(),Po(`\u{1F680} Initializing new TDK project...
611
611
  `),Pe(`Location: ${s}
612
612
  `,0));let u=Mg(s,".tdk"),p=Mg(u,gr);if(o.check){let N=wl.every(j=>uc(Mg(s,".tdk",".tdk-out",j))),L=uc(p);if(N&&L){let j=Gi(s);Zo("Project configuration is valid"),Pe(`Project: ${j.project.name}`,3),Pe(`Phases: ${Object.keys(j.phases).join(", ")}`,3),process.exit(0)}else{if(console.log(R.yellow("\u26A0\uFE0F Project configuration incomplete:")),L||Pe(".tdk/project.json (not found)",3),!N)for(let j of wl.filter(M=>!uc(Mg(s,".tdk/.tdk-out",M))))Pe(`.tdk/.tdk-out/${j} (not found)`,3);Pe("Run `tdk project` to create them."),process.exit(1)}}Yu("Project Configuration"),Pe(`Project root: ${s}
613
613
  `,0),uc(u)||(ND(u),Zo("Created: .tdk/ directory"));let E=uc(p);if(E&&!o.force){Zo(".tdk/project.json exists");let N=JSON.parse(QQ(p,"utf-8")),L=Gi(s),j=SQ(s),M=vQ(L,j);if((M.length>0||!N.phases)&&ss(p,L),M.length>0&&Pe(`Auto-enabled discovered service stacks: ${M.join(", ")}`,0),Po(`
@@ -1416,7 +1416,7 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
1416
1416
  `)}`,B="Upgrade tdk to a version that supports these files. Changing schemaVersion by hand is not a fix";o.onInvalid?.(`${E}
1417
1417
  Fix: ${B}`),console.error(R.red(`\u2717 ${E}`)),console.error(R.gray(` Fix: ${B}`)),l(1)}import{execFileSync as E3}from"node:child_process";var vw=(n,o)=>E3(n,o,{encoding:"utf-8",stdio:"pipe",windowsHide:!0});function h3(n,o=process.platform,l=vw){if(!Number.isInteger(n)||n<1||n>65535)return[];if(o==="win32"){let u=`$port=${n}; Get-NetTCPConnection -LocalPort $port -State Listen -ErrorAction SilentlyContinue | ForEach-Object { $p=Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue; if ($p -and $p.ProcessName -eq 'tilt') { $_.OwningProcess } } | Sort-Object -Unique`;try{return l("powershell.exe",["-NoProfile","-Command",u]).split(/\s+/).map(Number).filter(p=>Number.isInteger(p)&&p>0)}catch{throw new Error(`Unable to inspect Tilt listeners on port ${n} with PowerShell.`)}}let s;try{s=l("lsof",["-nP","-t",`-iTCP:${n}`,"-sTCP:LISTEN"]).split(/\s+/).map(Number).filter(u=>Number.isInteger(u)&&u>0)}catch(u){let p=u,E=p.stderr?.toString().trim();if(p?.status===1&&!E)return[];throw new Error(`Unable to inspect listeners on port ${n}. Install lsof or resolve the lsof error before using --force.`,{cause:p})}return s.filter(u=>{try{return l("ps",["-p",String(u),"-o","comm="]).trim().split(/[\\/]/).at(-1)==="tilt"}catch(p){throw new Error(`Unable to identify the process listening on port ${n}.`,{cause:p})}})}function LI(n,o=process.platform,l=vw){let s=h3(n,o,l);for(let u of s)o==="win32"?l("taskkill.exe",["/PID",String(u),"/F"]):l("kill",["-TERM",String(u)]);return s}function Dw(n,o){let l=new Set(o.map(s=>s.name));return n.filter(s=>!l.has(s))}function Rw(n,o){let l=new Map(o.map(p=>[p.name,p])),s=new Set,u=p=>{if(!(s.has(p)||!l.has(p))){s.add(p);for(let E of l.get(p)?.config?.dependsOn??[])u(E)}};for(let p of n)u(p);return{selected:o.filter(p=>s.has(p.name)),dependencies:o.map(p=>p.name).filter(p=>s.has(p)&&!n.includes(p))}}function Tw(n,o=[]){return["TDK is up.",`Tilt UI: http://localhost:${n}`,"App URLs:",...o.length>0?o.slice(0,5).map(l=>` ${l}`):[" run: tdk networks"],"Stop: tdk down"]}function y3(n,o){return n!=="win32"||o==="1"?null:"Landscape startup needs Ubuntu on WSL2. Native Windows is inspect-only."}async function Q3(n=lD(),o=S3){return n.kind==="webcontainer"?iD:rD(n.kind)&&!await o()?AD:null}async function S3(){let{execFile:n}=await import("node:child_process");return new Promise(o=>{n("docker",["ps"],{timeout:1e4},l=>o(!l))})}var v3=2;function D3(n){let o;try{({handEdited:o}=EB(n))}catch(l){if(l instanceof tE)return null;throw l}return o.length===0?null:["Generated files were edited by hand and no longer match service.json:",...o.map(l=>` ${l}`),"Run `tdk config regenerate` to discard the edits, or bypass with `tdk up --ignore-drift`."]}function R3(n,o,l=process.exit){if(o.ignoreDrift){console.warn(R.yellow("Warning: --ignore-drift set; generated files were not checked."));return}let s=D3(n);if(s){o.onDrift?.(s.join(`
1418
1418
  `));for(let u of s)console.error(R.red(u));l(v3)}}function b3(n,o,l=pr(),s=process.exit){if(o.ignoreVersion){console.warn(R.yellow("Warning: --ignore-version set; minTdkVersion was not checked."));return}let u=yD(n,l);u.status==="none"||u.status==="ok"||(o.onFail?.(`${u.message}
1419
- ${u.fix}`),console.error(R.red(u.message)),console.error(R.red(u.fix)),s(1))}function T3(n,o=3e4){return new Promise(l=>{let s=Date.now()+o,u=()=>{let p=B3({host:"127.0.0.1",port:n}),E=!1,B=I=>{E||(E=!0,p.destroy(),I||Date.now()>=s?l(I):setTimeout(u,250))};p.once("connect",()=>B(!0)),p.once("error",()=>B(!1))};u()})}var Nw=new I3("up").description("Start all services (optionally filtered by stack)").alias("deploy").argument("[stack-name]","Name of the stack to start (optional - runs all if omitted)").option("-v, --verbose","Enable verbose output",!1).option("-q, --quiet","Suppress non-essential output",!1).option("--dry-run","Show what would be started without starting",!1).option("-f, --force","Kill existing Tilt process before starting",!1).option("--ignore-drift","Start even if generated files differ from service.json",!1).option("--ignore-version","Start even if this tdk is older than minTdkVersion in .tdk/project.json",!1).option("--only <services...>","Start only these services plus what the Tiltfile enables for them (their dependsOn services and shared infrastructure). With a stack, names must belong to that stack; dependencies may cross stacks").option("--json","Print one JSON object on stdout when the stack is ready or the command fails; implies --quiet",!1).action(async(n,o)=>{let l=o.json?yB("UP_FAILED","tdk up"):void 0;o.json&&(o.quiet=!0);let s=HQ(process.env.TILT_PORT);s.ok||(l?.({ok:!1},[{code:"INVALID_TILT_PORT",message:s.message}]),Uo(s.message));let u=s.port,p=In();p&&b3(p,{ignoreVersion:o.ignoreVersion,onFail:w=>l?.({ok:!1},[{code:"TDK_VERSION_TOO_OLD",message:w}])});let E=o.dryRun?null:await Q3();E&&(l?.({ok:!1},[{code:"HOST_UNSUPPORTED",message:E}]),Uo(E));let B=y3(process.platform,process.env.TDK_ALLOW_NATIVE_WINDOWS);B&&Uo(B);let I=In();if(I&&Sw(I,{onInvalid:w=>l?.({ok:!1},[{code:"INVALID_SCHEMA_VERSION",message:w}])}),!o.dryRun){let{assertMachineReadyOrExit:w}=await import("./cold-preflight-SJPUDOFL.js");await w()}let S=async()=>{let w=o.dryRun?Za():In(),x=w??process.cwd(),v=Z1(),N,L=[];if((!o.only||n)&&(N=ls(v),L=N.map(J=>J.name)),o.only){if(n&&!Dg(n)){let Ge=on.stackNotFound(n,L);l?.({ok:!1},[BB(Ge).error]),Ge.exit()}let J=n?v.filter(Ge=>Ge.stack===n):v,Te=Dw(o.only,J);if(Te.length>0){let Ge=J.map($e=>$e.name),We=on.unknownServices(Te,Ge);l?.({ok:!1},[{code:"UNKNOWN_SERVICE",message:We.message,...We.suggestions.length>0?{suggestions:We.suggestions}:{}}]),We.exit()}}w&&R3(w,{ignoreDrift:o.ignoreDrift,onDrift:J=>l?.({ok:!1},[{code:"DRIFT_DETECTED",message:J}])}),w&&ID(w,{onInvalid:J=>l?.({ok:!1},[{code:"INVALID_SERVICE_CONFIG",message:J}])}),w&&!l&&!o.quiet&&BD(w);let j=await fB(x,{inspectDocker:!o.dryRun});if(!o.dryRun){if(w){let Ge=eE(x);Ge.length>0&&!o.quiet&&console.log(R.gray(`Added ${Ge.join(", ")} to .env (generated; existing values unchanged)`))}w&&!C3(bw(x,".tdk",".tdk-out","Tiltfile"))&&(o.quiet||console.log(R.gray("No generated Tiltfile yet; generating .tdk/.tdk-out/ ...")),await Zu(x,{quiet:o.quiet}));let J=pQ(x);J.length>0&&o.verbose&&!o.quiet&&console.log(R.gray(`Refreshed runtime assets: ${J.join(", ")}`));let Te=vR(x);Te.length>0&&!o.quiet&&console.log(R.gray(`Added ${Te.join(", ")} to the pre_alpha phase in .tdk/project.json`))}let M,ae,he=[];if(n){if(M=v.filter(J=>J.stack===n),M.length===0){let J=on.stackNotFound(n,L);l?.({ok:!1},[BB(J).error]),J.exit()}he=M.map(J=>J.name),ae=`stack "${n}"`}else{M=v;let J=N??ls(v);ae=`all stacks (${Mn(J.length,"stack")}, ${Mn(M.length,"service")})`}let Re=[];if(o.only){let J=Rw(o.only,VA());M=J.selected,Re=J.dependencies,he=M.map(Te=>Te.name),ae=`${Mn(o.only.length,"requested service")}${Re.length>0?` plus ${Re.join(", ")}`:""}`}o.verbose&&!o.quiet&&console.log(R.gray(`Found ${Mn(M.length,"service")} in ${ae}`));let Ie=M.map(J=>J.name);if(!o.quiet){console.log(R.blue(`${o.dryRun?"Would start":"Starting"} ${Mn(Ie.length,"service")} from ${ae}...`));for(let $e of Ie)console.log(R.gray(` - ${$e}`));let{appBase:J,apiBase:Te}=PC(j.ingressHttp),Ge=M.filter($e=>$e.config?.appType==="frontend"),We=M.filter($e=>cc($e.config?.appType));if(Ge.length>0){console.log(R.blue(`
1419
+ ${u.fix}`),console.error(R.red(u.message)),console.error(R.red(u.fix)),s(1))}function T3(n,o=3e4){return new Promise(l=>{let s=Date.now()+o,u=()=>{let p=B3({host:"127.0.0.1",port:n}),E=!1,B=I=>{E||(E=!0,p.destroy(),I||Date.now()>=s?l(I):setTimeout(u,250))};p.once("connect",()=>B(!0)),p.once("error",()=>B(!1))};u()})}var Nw=new I3("up").description("Start all services (optionally filtered by stack)").alias("deploy").argument("[stack-name]","Name of the stack to start (optional - runs all if omitted)").option("-v, --verbose","Enable verbose output",!1).option("-q, --quiet","Suppress non-essential output",!1).option("--dry-run","Show what would be started without starting",!1).option("-f, --force","Kill existing Tilt process before starting",!1).option("--ignore-drift","Start even if generated files differ from service.json",!1).option("--ignore-version","Start even if this tdk is older than minTdkVersion in .tdk/project.json",!1).option("--only <services...>","Start only these services plus what the Tiltfile enables for them (their dependsOn services and shared infrastructure). With a stack, names must belong to that stack; dependencies may cross stacks").option("--json","Print one JSON object on stdout when the stack is ready or the command fails; implies --quiet",!1).action(async(n,o)=>{let l=o.json?yB("UP_FAILED","tdk up"):void 0;o.json&&(o.quiet=!0);let s=HQ(process.env.TILT_PORT);s.ok||(l?.({ok:!1},[{code:"INVALID_TILT_PORT",message:s.message}]),Uo(s.message));let u=s.port,p=In();p&&b3(p,{ignoreVersion:o.ignoreVersion,onFail:w=>l?.({ok:!1},[{code:"TDK_VERSION_TOO_OLD",message:w}])});let E=o.dryRun?null:await Q3();E&&(l?.({ok:!1},[{code:"HOST_UNSUPPORTED",message:E}]),Uo(E));let B=y3(process.platform,process.env.TDK_ALLOW_NATIVE_WINDOWS);B&&Uo(B);let I=In();if(I&&Sw(I,{onInvalid:w=>l?.({ok:!1},[{code:"INVALID_SCHEMA_VERSION",message:w}])}),!o.dryRun){let{assertMachineReadyOrExit:w}=await import("./cold-preflight-RABRN55J.js");await w()}let S=async()=>{let w=o.dryRun?Za():In(),x=w??process.cwd(),v=Z1(),N,L=[];if((!o.only||n)&&(N=ls(v),L=N.map(J=>J.name)),o.only){if(n&&!Dg(n)){let Ge=on.stackNotFound(n,L);l?.({ok:!1},[BB(Ge).error]),Ge.exit()}let J=n?v.filter(Ge=>Ge.stack===n):v,Te=Dw(o.only,J);if(Te.length>0){let Ge=J.map($e=>$e.name),We=on.unknownServices(Te,Ge);l?.({ok:!1},[{code:"UNKNOWN_SERVICE",message:We.message,...We.suggestions.length>0?{suggestions:We.suggestions}:{}}]),We.exit()}}w&&R3(w,{ignoreDrift:o.ignoreDrift,onDrift:J=>l?.({ok:!1},[{code:"DRIFT_DETECTED",message:J}])}),w&&ID(w,{onInvalid:J=>l?.({ok:!1},[{code:"INVALID_SERVICE_CONFIG",message:J}])}),w&&!l&&!o.quiet&&BD(w);let j=await fB(x,{inspectDocker:!o.dryRun});if(!o.dryRun){if(w){let Ge=eE(x);Ge.length>0&&!o.quiet&&console.log(R.gray(`Added ${Ge.join(", ")} to .env (generated; existing values unchanged)`))}w&&!C3(bw(x,".tdk",".tdk-out","Tiltfile"))&&(o.quiet||console.log(R.gray("No generated Tiltfile yet; generating .tdk/.tdk-out/ ...")),await Zu(x,{quiet:o.quiet}));let J=pQ(x);J.length>0&&o.verbose&&!o.quiet&&console.log(R.gray(`Refreshed runtime assets: ${J.join(", ")}`));let Te=vR(x);Te.length>0&&!o.quiet&&console.log(R.gray(`Added ${Te.join(", ")} to the pre_alpha phase in .tdk/project.json`))}let M,ae,he=[];if(n){if(M=v.filter(J=>J.stack===n),M.length===0){let J=on.stackNotFound(n,L);l?.({ok:!1},[BB(J).error]),J.exit()}he=M.map(J=>J.name),ae=`stack "${n}"`}else{M=v;let J=N??ls(v);ae=`all stacks (${Mn(J.length,"stack")}, ${Mn(M.length,"service")})`}let Re=[];if(o.only){let J=Rw(o.only,VA());M=J.selected,Re=J.dependencies,he=M.map(Te=>Te.name),ae=`${Mn(o.only.length,"requested service")}${Re.length>0?` plus ${Re.join(", ")}`:""}`}o.verbose&&!o.quiet&&console.log(R.gray(`Found ${Mn(M.length,"service")} in ${ae}`));let Ie=M.map(J=>J.name);if(!o.quiet){console.log(R.blue(`${o.dryRun?"Would start":"Starting"} ${Mn(Ie.length,"service")} from ${ae}...`));for(let $e of Ie)console.log(R.gray(` - ${$e}`));let{appBase:J,apiBase:Te}=PC(j.ingressHttp),Ge=M.filter($e=>$e.config?.appType==="frontend"),We=M.filter($e=>cc($e.config?.appType));if(Ge.length>0){console.log(R.blue(`
1420
1420
  \u{1F30D} Frontend URLs:`));for(let $e of Ge){let ut=$e.config?.basePath??`/${$e.name}`;console.log(R.gray(` - ${$e.name}: ${J}${R.cyan(eQ(ut))}`))}}if(We.length>0){console.log(R.blue(`
1421
1421
  \u{1F527} Backend API URLs:`));for(let $e of We){let ut=$e.name.replace(/-api$/,""),qe=$e.config?.apiPath??`/api/${ut}`,He=$e.config?.sablier,et=He?.enable&&He?.deferStart?R.dim(" (deferred \u2014 starts on first request)"):"";console.log(R.gray(` - ${$e.name}: ${Te}${R.cyan(eQ(qe))}${et}`))}}}let je=o.only??(n?[n]:void 0),Oe=M1(he,{verbose:o.verbose,quiet:o.quiet,force:o.force,focusTargets:je}),be=je?`tilt up ${Oe.join(" ")}`:"tilt up";if(!o.quiet){console.log(R.blue(gD(j)));for(let J of Qw(j))console.log(R.yellow(J));console.log(R.gray("Override with TDK_HTTP_PORT, TDK_HTTPS_PORT, or TDK_POSTGRES_PORT."))}if(l&&o.dryRun){l({ok:!0,dryRun:!0,stack:n??null,services:Ie,...o.only?{requested:o.only,declaredDependencies:Re}:{},command:be});return}if(CB(o,"not starting services",be))return;ED(j),mD(x,j);let ze=ki.tiltUi,Qe=u??ze,Ye=o.only?[...new Set([ze,Qe])]:[Qe],At=[];for(let J of Ye)await fc(J)!==null&&At.push(J);let ke=f2({runningPorts:At,force:o.force,only:!!o.only});if(ke.action==="already-running"){let J=`Environment is already running on port ${ke.ports.join(", ")}.`;l?.({ok:!0,alreadyRunning:!0,tiltUrl:`http://localhost:${ke.ports[0]}`}),o.quiet||console.log(R.green(J));return}if(ke.action==="only-blocked"){let J=`A Tilt is already running on port ${ke.ports.join(", ")}. --only cannot change a running stack's services: run \`tdk down\` first, or pass --force to replace it.`;l?.({ok:!1},[{code:"TILT_ALREADY_RUNNING",message:J}]),Uo(J)}if(o.only)for(let J of At)LI(J);let kt=await d2({configuredPort:u,force:o.force,basePort:ze,findAvailablePort:BR}),at=kt.port;kt.autoSwitched&&!o.quiet&&(console.log(R.yellow(`\u26A0\uFE0F Port ${ze} is already in use`)),console.log(R.blue(`\u{1F504} Auto-switching to port ${at}
1422
1422
  `))),process.env.TILT_PORT=at.toString(),await g2({force:o.force,quiet:o.quiet,port:at},{stop:LI,log:J=>console.log(R.yellow(J)),wait:J=>new Promise(Te=>setTimeout(Te,J))}),o.quiet||(console.log(R.gray(`
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{tb as a,ub as b,vb as c,wb as d,xb as e}from"./chunk-4RTR7KXM.js";import"./chunk-42IVF3YT.js";import"./chunk-6EA4DGCY.js";export{e as assertMachineReadyOrExit,d as formatColdPreflight,a as nodeTooOld,b as requireVerifiedDockerVersions,c as runColdPreflight};
2
+ import{tb as a,ub as b,vb as c,wb as d,xb as e}from"./chunk-PLUWAA7O.js";import"./chunk-42IVF3YT.js";import"./chunk-6EA4DGCY.js";export{e as assertMachineReadyOrExit,d as formatColdPreflight,a as nodeTooOld,b as requireVerifiedDockerVersions,c as runColdPreflight};
package/cli/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tdk-cli-internal",
3
3
  "private": true,
4
- "version": "1.3.148",
4
+ "version": "1.3.149",
5
5
  "description": "TDK CLI — start services on your machine.",
6
6
  "keywords": [
7
7
  "tdk",
@@ -300,12 +300,14 @@ def _apply_manifest_defaults(manifest, resource_path):
300
300
  root_api_path = result.get('apiPath')
301
301
  default_path_prefix = root_api_path if root_api_path else '/api/' + stack
302
302
 
303
+ # A bring-your-own service without healthCheckPath may not serve HTTP, so it gets no default Traefik health path.
304
+ default_health_path = None if app_type == 'bring-your-own' else HEALTH_CHECK_PATH
303
305
  computed_traefik = {
304
306
  'host': stack + '.backend.' + PlatformDockerConstants.PROJECT_NAME + '.local',
305
307
  'pathPrefix': default_path_prefix,
306
308
  # Follows healthCheckPath so a manifest that only sets that keeps one
307
309
  # path for both probes; `traefik.healthCheck` overrides just Traefik's.
308
- 'healthCheck': result.get('healthCheckPath') or HEALTH_CHECK_PATH,
310
+ 'healthCheck': result.get('healthCheckPath') or default_health_path,
309
311
  }
310
312
 
311
313
  # Check for overrides
@@ -319,6 +321,8 @@ def _apply_manifest_defaults(manifest, resource_path):
319
321
  'pathPrefix': existing_traefik.get('pathPrefix', computed_traefik['pathPrefix']),
320
322
  'healthCheck': existing_traefik.get('healthCheck', computed_traefik['healthCheck']),
321
323
  }
324
+ if result['traefik']['healthCheck'] == None:
325
+ result['traefik'].pop('healthCheck')
322
326
 
323
327
  # 🎯 SMART NATS CONFIG
324
328
  if result['useNats']:
@@ -89,8 +89,7 @@
89
89
  }
90
90
  },
91
91
  "required": [
92
- "port",
93
- "healthCheckPath"
92
+ "port"
94
93
  ]
95
94
  }
96
95
  }
@@ -277,7 +276,7 @@
277
276
  },
278
277
  "healthCheckPath": {
279
278
  "default": "/health",
280
- "description": "HTTP endpoint for health checks. Must return 200 OK.",
279
+ "description": "HTTP endpoint for health checks. Must return 200 OK. Optional for bring-your-own: omit it for a service that does not speak HTTP (Postgres, Redis, SMTP, ...), and TDK then skips the HTTP health probes for it.",
281
280
  "pattern": "^/[a-z0-9/-]*$",
282
281
  "type": "string"
283
282
  },
@@ -180,6 +180,9 @@ def _generate_single_backend_entry(resource_path, resource_name, res, manifest,
180
180
  db_url_with_fallback = PlatformDockerConstants.get_compose_env_database_url(db_name)
181
181
 
182
182
  health_path = manifest.get('healthCheckPath', HEALTH_CHECK_PATH) if manifest else HEALTH_CHECK_PATH
183
+ # A bring-your-own service without healthCheckPath may not serve HTTP. None means no HTTP probe: no Traefik health check labels.
184
+ if manifest and manifest.get('appType') == 'bring-your-own' and not manifest.get('healthCheckPath'):
185
+ health_path = None
183
186
 
184
187
  traefik_cfg = manifest.get('traefik', {}) if manifest else {}
185
188
  traefik_host = traefik_cfg.get('host', stack + '.backend.' + _PROJECT_NAME + '.local')
@@ -164,22 +164,31 @@ def get_backend_traefik_labels(
164
164
  middleware_config=middleware_config,
165
165
  )
166
166
 
167
- labels = """ - "{traefik_enable_label}"
168
- {backend_router_labels} - "traefik.http.services.{traefik_resource_name}.loadbalancer.server.port={internal_port}"
169
- - "traefik.http.services.{traefik_resource_name}.loadbalancer.healthcheck.path={health_path}"
167
+ # No health path (a bring-your-own service that does not speak HTTP): Traefik balances without an active HTTP probe rather than
168
+ # probing a path the service never serves.
169
+ traefik_healthcheck_labels = ""
170
+ if health_path:
171
+ traefik_healthcheck_labels = """ - "traefik.http.services.{traefik_resource_name}.loadbalancer.healthcheck.path={health_path}"
170
172
  - "traefik.http.services.{traefik_resource_name}.loadbalancer.healthcheck.interval={health_interval}"
171
173
  - "traefik.http.services.{traefik_resource_name}.loadbalancer.healthcheck.timeout={health_timeout}"
172
174
  - "traefik.http.services.{traefik_resource_name}.loadbalancer.healthcheck.followredirects=false"
173
- - "traefik.docker.network={traefik_network}"
175
+ """.format(
176
+ traefik_resource_name=traefik_resource_name,
177
+ health_path=health_path,
178
+ health_interval=TRAEFIK_HEALTHCHECK_INTERVAL,
179
+ health_timeout=TRAEFIK_HEALTHCHECK_TIMEOUT,
180
+ )
181
+
182
+ labels = """ - "{traefik_enable_label}"
183
+ {backend_router_labels} - "traefik.http.services.{traefik_resource_name}.loadbalancer.server.port={internal_port}"
184
+ {traefik_healthcheck_labels} - "traefik.docker.network={traefik_network}"
174
185
  """.format(
175
186
  resource_entry_name=resource_entry_name,
176
187
  traefik_enable_label=TRAEFIK_ENABLE_LABEL,
177
188
  backend_router_labels=backend_router_labels,
178
189
  traefik_resource_name=traefik_resource_name,
179
190
  internal_port=internal_port,
180
- health_path=health_path,
181
- health_interval=TRAEFIK_HEALTHCHECK_INTERVAL,
182
- health_timeout=TRAEFIK_HEALTHCHECK_TIMEOUT,
191
+ traefik_healthcheck_labels=traefik_healthcheck_labels,
183
192
  traefik_network=TRAEFIK_DOCKER_NETWORK,
184
193
  )
185
194
 
@@ -185,6 +185,11 @@ def normalize(manifest, resource_path=""):
185
185
  # Compute appType from path if missing
186
186
  if not normalized.get('appType'):
187
187
  normalized['appType'] = _determine_app_type(normalized, resource_path)
188
+
189
+ # A bring-your-own service may not speak HTTP (a database, a mail relay). Its health path is optional, so do not invent /health
190
+ # for it. Only an explicit healthCheckPath in service.json gives it one.
191
+ if normalized['appType'] == 'bring-your-own' and 'healthCheckPath' not in manifest:
192
+ normalized.pop('healthCheckPath', None)
188
193
 
189
194
  # Compute stack from path if missing
190
195
  if not normalized.get('stack'):
@@ -419,6 +419,19 @@ def _test_resource_description():
419
419
  # MAIN
420
420
  # =============================================================================
421
421
 
422
+ def _test_byo_health_path_is_optional():
423
+ """A bring-your-own service without healthCheckPath gets none; /health is only the default for HTTP types."""
424
+ print("\n🧪 Testing bring-your-own health path is optional...")
425
+
426
+ byo = ManifestParser.normalize({'appType': 'bring-your-own', 'appName': 'postgres', 'stack': 'shop', 'port': 4500}, 'services/shop/postgres')
427
+ assert_true('healthCheckPath' not in byo, "BYO without healthCheckPath gets no default /health")
428
+
429
+ byo_http = ManifestParser.normalize({'appType': 'bring-your-own', 'appName': 'web', 'stack': 'shop', 'port': 4501, 'healthCheckPath': '/status'}, 'services/shop/web')
430
+ assert_equal('/status', byo_http.get('healthCheckPath'), "BYO keeps an explicit healthCheckPath")
431
+
432
+ backend = ManifestParser.normalize({'appType': 'backend', 'appName': 'api', 'stack': 'shop', 'port': 4000}, 'services/shop/api')
433
+ assert_equal('/health', backend.get('healthCheckPath'), "Backends still default to /health")
434
+
422
435
  def run_tests():
423
436
  """Run all Phase 2 integration tests."""
424
437
  print("\n" + "="*70)
@@ -436,6 +449,7 @@ def run_tests():
436
449
  _test_get_normalized()
437
450
  _test_resource_description()
438
451
  _test_generated_string_fields()
452
+ _test_byo_health_path_is_optional()
439
453
 
440
454
  # Print results
441
455
  print("\n" + "="*70)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tdk-landscape/tdk-cli-core",
3
- "version": "1.3.148",
3
+ "version": "1.3.149",
4
4
  "description": "TDK CLI — start services on your machine.",
5
5
  "homepage": "https://tdk-landscape.github.io/tdk-website",
6
6
  "repository": {