@visulima/vis 1.0.0-alpha.17 → 1.0.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +66 -26
- package/dist/config/index.d.ts +72 -28
- package/dist/packem_chunks/bin.js +255 -251
- package/dist/packem_chunks/doctor-probe.js +2 -2
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler22.js +1 -1
- package/dist/packem_chunks/handler37.js +1 -1
- package/dist/packem_chunks/handler39.js +5 -22
- package/dist/packem_chunks/handler40.js +10 -5
- package/dist/packem_chunks/handler41.js +24 -10
- package/dist/packem_chunks/handler42.js +153 -24
- package/dist/packem_chunks/handler43.js +25 -153
- package/dist/packem_chunks/handler44.js +24 -25
- package/dist/packem_chunks/handler46.js +1 -1
- package/dist/packem_chunks/handler47.js +48 -48
- package/dist/packem_chunks/handler48.js +22 -22
- package/dist/packem_chunks/help-command.js +8 -8
- package/dist/packem_chunks/index.js +1 -1
- package/dist/packem_shared/{docker-B4i5yxtP.js → docker-B4s1fjiN.js} +26 -26
- package/dist/packem_shared/flakiness-DUtrm-wS.js +1 -0
- package/dist/packem_shared/{lifecycle-C7vfQmA3.js → lifecycle-CgK8pcfa.js} +2 -2
- package/index.js +57 -53
- package/package.json +12 -12
- package/schemas/vis-config.schema.json +85 -1
- package/dist/packem_shared/flakiness-Dzz-I3dB.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var h=Object.defineProperty;var f=(a,s)=>h(a,"name",{value:s,configurable:!0});import{createRequire as R}from"node:module";import{a as b,n as T,M as j}from"../packem_chunks/config.js";import{n as v}from"../packem_chunks/bin.js";const S=R(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=f(a=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[s,o]=l.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return l.getBuiltinModule(a)}return S(a)},"__cjs_getBuiltinModule"),{readdirSync:y}=k("node:fs");var F=Object.defineProperty,m=f((a,s)=>F(a,"name",{value:s,configurable:!0}),"i");const P=m((a,s)=>{let o=0,n=0,r=0;for(const[,t]of a)switch(t.status){case"failure":{r+=1;break}case"local-cache":case"local-cache-kept-existing":case"remote-cache":{n+=1;break}case"success":{o+=1;break}}const c=[];o>0&&c.push(`${String(o)} succeeded`),n>0&&c.push(`${String(n)} cached`),r>0&&c.push(`${String(r)} failed`);const u=(s/1e3).toFixed(1);return c.push(`${u}s`),c.join(" · ")},"formatTimingSummary"),p=m(a=>{const s=v(a);if(!b(s))return[];const o=y(s).filter(r=>r.endsWith(".json")),n=[];for(const r of o)try{n.push(T(j(s,r)))}catch{}return n},"loadRunSummaries"),A=m((a,s,o)=>{const n=o??p(a);if(n.length<2)return;let r=0,c=0;for(const e of n)typeof e.duration=="number"&&e.duration>0&&(r+=e.duration,c+=1);if(c<2)return;const u=r/c-s,t=Math.abs(u/1e3).toFixed(1);return Math.abs(u)<500?"(about average)":u>0?`(${t}s faster than avg)`:`(${t}s slower than avg)`},"compareDuration");var _=Object.defineProperty,d=f((a,s)=>_(a,"name",{value:s,configurable:!0}),"o");const D=d((a,s={},o)=>{const n=o??p(a);if(n.length===0)return[];const r=new Map;for(const t of n)if(!(s.since&&(t.startTime===void 0||t.startTime<s.since))&&Array.isArray(t.tasks))for(const e of t.tasks){if(e.cacheStatus==="HIT"||e.cacheStatus==="REMOTE_HIT"||e.cacheStatus==="SKIPPED")continue;const i=r.get(e.taskId)??{failures:0,project:e.target.project,retriedSuccesses:0,successes:0,target:e.target.target,totalRuns:0};i.totalRuns+=1,e.exitCode!==void 0&&e.exitCode!==0?(i.failures+=1,i.lastFailure=e.startTime??t.startTime):(e.retryAttempts&&e.retryAttempts>0&&(i.retriedSuccesses+=1,i.lastRetry=e.startTime??t.startTime),i.successes+=1),r.set(e.taskId,i)}const c=s.minRuns??2,u=[];for(const[t,e]of r){if(e.totalRuns<c||e.failures===0&&e.retriedSuccesses===0)continue;const i=(e.failures+.5*e.retriedSuccesses)/e.totalRuns;u.push({failures:e.failures,flakinessRate:i,lastFailure:e.lastFailure,lastRetry:e.lastRetry,project:e.project,retriedSuccesses:e.retriedSuccesses,successes:e.successes,target:e.target,taskId:t,totalRuns:e.totalRuns})}return u.sort((t,e)=>e.flakinessRate-t.flakinessRate),u},"analyzeFlakiness"),E=d(a=>{if(a.length===0)return["No flaky tasks detected."];const s=["Task","Runs","Failures","Retried","Rate","Last Failure"],o=a.map(t=>[t.taskId,String(t.totalRuns),String(t.failures),String(t.retriedSuccesses),`${(t.flakinessRate*100).toFixed(1)}%`,t.lastFailure??t.lastRetry??"—"]),n=s.map((t,e)=>{let i=0;for(const g of o)i=Math.max(i,(g[e]??"").length);return Math.max(t.length,i)}),r=d((t,e)=>t.padEnd(e),"pad"),c=n.map(t=>"─".repeat(t)).join("──"),u=[s.map((t,e)=>r(t,n[e])).join(" "),c];for(const t of o)u.push(t.map((e,i)=>r(e,n[i])).join(" "));return u},"formatFlakinessTable");export{D as a,E as b,A as c,P as f,p as l};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
`,{mode:M});try{await it(r,s)}catch(i){throw await T(r,{force:!0}).catch(()=>{}),i}},"writeEntry"),g=d(async(t,e,o)=>{const s=await w(t),r=o??await b(t,e);await T(D(s,e),{force:!0}),r&&await T(r.logFile,{force:!0}).catch(()=>{})},"deleteEntry"),f=d(t=>{try{return process.kill(t,0),!0}catch{return!1}},"isAlive"),Zt=d(async t=>{const e=await Ot(t),o=[],s=[];for(const r of e){if(f(r.pid)){s.push(r);continue}const i=await b(t,r.id);if(i&&i.pid!==r.pid){s.push(i);continue}await g(t,r.id,r).catch(()=>{}),o.push(r.id)}return{pruned:o,surviving:s}},"pruneDead"),xt=d(t=>new Promise(e=>{setTimeout(e,t)}),"sleep"),Ct=d(async t=>{try{const e=await A(t,"wx",M);try{await e.writeFile(String(process.pid))}finally{await e.close().catch(()=>{})}return!0}catch(e){if(e.code==="EEXIST")return!1;throw e}},"tryClaimLock"),Ft=d(async t=>{let e;try{const o=await at(t,"utf8"),s=Number.parseInt(o.trim(),10);e=Number.isFinite(s)?s:void 0}catch{return!0}if(e!==void 0&&!f(e))return!0;try{const o=await nt(t);return Date.now()-o.mtimeMs>Rt}catch{return!0}},"isLockStale"),G=d(async(t,e,o)=>{const s=await w(t),r=Dt(s,e),i=Date.now();for(;!await Ct(r);){if(await Ft(r)){await j(r).catch(()=>{});continue}if(Date.now()-i>=C)throw new Error(`Could not acquire service lock for ${e} within ${String(C)}ms — another \`vis service\` invocation appears to be holding it.`);await xt(Mt)}try{return await o()}finally{await j(r).catch(()=>{})}},"withServiceLock");var It=Object.defineProperty,n=a((t,e)=>It(t,"name",{value:e,configurable:!0}),"r");function v(t,e={},o){for(const s in t){const r=t[s],i=o?`${o}:${s}`:s;typeof r=="object"&&r!==null?v(r,e,i):typeof r=="function"&&(e[i]=r)}return e}a(v,"c");n(v,"flatHooks");function Lt(...t){const e={};for(const o of t){const s=v(o);for(const r in s)e[r]?e[r].push(s[r]):e[r]=[s[r]]}for(const o in e)if(e[o].length>1){const s=e[o];e[o]=(...r)=>V(s,i=>i(...r))}else e[o]=e[o][0];return e}a(Lt,"v");n(Lt,"mergeHooks");function V(t,e){return t.reduce((o,s)=>o.then(()=>e(s)),Promise.resolve())}a(V,"d$2");n(V,"serial");const q=(()=>{if(console.createTask)return console.createTask;const t={run:n(e=>e(),"run")};return()=>t})();function $(t,e,o,s){for(let r=o;r<t.length;r+=1)try{const i=s?s.run(()=>t[r](...e)):t[r](...e);if(i&&typeof i.then=="function")return Promise.resolve(i).then(()=>$(t,e,r+1,s))}catch(i){return Promise.reject(i)}}a($,"k");n($,"callHooks");function X(t,e,o){if(t.length>0)return $(t,e,0,q(o))}a(X,"y");n(X,"serialTaskCaller");function J(t,e,o){if(t.length>0){const s=q(o);return Promise.all(t.map(r=>s.run(()=>r(...e))))}}a(J,"m");n(J,"parallelTaskCaller");function At(t,e){return t.reduce((o,s)=>o.then(()=>s(...e||[])),Promise.resolve())}a(At,"x");n(At,"serialCaller");function Wt(t,e){return Promise.all(t.map(o=>o(...e||[])))}a(Wt,"P");n(Wt,"parallelCaller");function _(t,e){for(const o of[...t])o(e)}a(_,"a");n(_,"callEachWith");var Nt=class{static{a(this,"p")}static{n(this,"Hookable")}_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,e,o={}){if(!t||typeof e!="function")return()=>{};const s=t;let r;for(;this._deprecatedHooks[t];)r=this._deprecatedHooks[t],t=r.to;if(r&&!o.allowDeprecated){let i=r.message;i||(i=`${s} hook has been deprecated`+(r.to?`, please use ${r.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!e.name)try{Object.defineProperty(e,"name",{get:n(()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb","get"),configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)}}hookOnce(t,e){let o,s=n((...r)=>(typeof o=="function"&&o(),o=void 0,s=void 0,e(...r)),"_function");return o=this.hook(t,s),o}removeHook(t,e){const o=this._hooks[t];if(o){const s=o.indexOf(e);s!==-1&&o.splice(s,1),o.length===0&&(this._hooks[t]=void 0)}}clearHook(t){this._hooks[t]=void 0}deprecateHook(t,e){this._deprecatedHooks[t]=typeof e=="string"?{to:e}:e;const o=this._hooks[t]||[];this._hooks[t]=void 0;for(const s of o)this.hook(t,s)}deprecateHooks(t){for(const e in t)this.deprecateHook(e,t[e])}addHooks(t){const e=v(t),o=Object.keys(e).map(s=>this.hook(s,e[s]));return()=>{for(const s of o)s();o.length=0}}removeHooks(t){const e=v(t);for(const o in e)this.removeHook(o,e[o])}removeAllHooks(){this._hooks={}}callHook(t,...e){return this.callHookWith(X,t,e)}callHookParallel(t,...e){return this.callHookWith(J,t,e)}callHookWith(t,e,o){const s=this._before||this._after?{name:e,args:o,context:{}}:void 0;this._before&&_(this._before,s);const r=t(this._hooks[e]?[...this._hooks[e]]:[],o,e);return r instanceof Promise?r.finally(()=>{this._after&&s&&_(this._after,s)}):(this._after&&s&&_(this._after,s),r)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const e=this._before.indexOf(t);e!==-1&&this._before.splice(e,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const e=this._after.indexOf(t);e!==-1&&this._after.splice(e,1)}}}};function K(){return new Nt}a(K,"w$2");n(K,"createHooks");(class{static{n(this,"HookableCore")}_hooks;constructor(){this._hooks={}}hook(t,e){return!t||typeof e!="function"?()=>{}:(this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)})}removeHook(t,e){const o=this._hooks[t];if(o){const s=o.indexOf(e);s!==-1&&o.splice(s,1),o.length===0&&(this._hooks[t]=void 0)}}callHook(t,...e){const o=this._hooks[t];if(!(!o||o.length===0))return $(o,e,0)}});const F=typeof window<"u";function Bt(t,e={}){const o={inspect:F,group:F,filter:n(()=>!0,"filter"),...e},s=o.filter,r=typeof s=="string"?c=>c.startsWith(s):s,i=o.tag?`[${o.tag}] `:"",l=n(c=>i+c.name+"".padEnd(c._id,"\0"),"logPrefix"),h={},S=t.beforeEach(c=>{r!==void 0&&!r(c.name)||(h[c.name]=h[c.name]||0,c._id=h[c.name]++,console.time(l(c)))}),P=t.afterEach(c=>{r!==void 0&&!r(c.name)||(o.group&&console.groupCollapsed(c.name),o.inspect?console.timeLog(l(c),c.args):console.timeEnd(l(c)),o.group&&console.groupEnd(),h[c.name]--)});return{close:n(()=>{S(),P()},"close")}}a(Bt,"W");n(Bt,"createDebugger");var Gt=Object.defineProperty,H=a((t,e)=>Gt(t,"name",{value:e,configurable:!0}),"t$1");const te=H(()=>K(),"createVisHooks"),ee=H(async(t,e)=>{if(!(!e||e.length===0))for(const o of e){if(o.hooks)for(const[s,r]of Object.entries(o.hooks)){const i=Array.isArray(r)?r:[r];for(const l of i)t.hook(s,l)}o.setup&&await o.setup(t)}},"registerPlugins");class oe{static{a(this,"HookableLifeCycle")}static{H(this,"HookableLifeCycle")}#o;#e;#s=new Map;constructor(e,o){this.#o=e,this.#e=o}startTasks(e){for(const o of e)this.#s.set(o.id,o),this.#t("task:before",o)}endTasks(e){for(const o of e)this.#s.delete(o.task.id),this.#t("task:after",o.task,o),o.status==="failure"?this.#t("task:failure",o.task,o):Vt(o.status)&&this.#t("task:cacheHit",o.task,o)}printCacheMiss(e,o){this.#t("task:cacheMiss",e,o)}onTaskStdout(e,o){this.#t("task:stdout",e,o)}onTaskStderr(e,o){this.#t("task:stderr",e,o)}#t(e,...o){Promise.resolve(this.#o.callHook(e,...o)).catch(s=>{if(this.#e)try{this.#e(e,s)}catch{}})}}const Vt=H(t=>t==="local-cache"||t==="local-cache-kept-existing"||t==="remote-cache","isCacheStatus");var qt=Object.defineProperty,Xt=a((t,e)=>qt(t,"name",{value:e,configurable:!0}),"i");const I=process.platform==="win32",Jt=Xt(async t=>{const{command:e,cwd:o,env:s,logFile:r}=t,i=await A(r,"a",M);let l;try{l=ht(I?"cmd":"/bin/sh",I?["/d","/s","/c",e]:["-c",e],{cwd:o,detached:!0,env:{...process.env,...s},stdio:["ignore",i.fd,i.fd],windowsHide:!0})}finally{await i.close().catch(()=>{})}if(l.pid===void 0&&await new Promise((h,S)=>{l.once("spawn",()=>{h()}),l.once("error",P=>{S(P)})}),l.pid===void 0)throw new Error(`Failed to spawn detached process for command: ${e}`);return l.unref(),{pid:l.pid}},"spawnDetached");var Kt=Object.defineProperty,E=a((t,e)=>Kt(t,"name",{value:e,configurable:!0}),"t");const
|
|
1
|
+
var z=Object.defineProperty;var a=(t,e)=>z(t,"name",{value:e,configurable:!0});import{createRequire as U}from"node:module";import{f as tt,g as O,M as p}from"../packem_chunks/config.js";import{aQ as lt,$ as dt,aR as W}from"../packem_chunks/bin.js";const Z=U(import.meta.url),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=a(t=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[e,o]=k.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return k.getBuiltinModule(t)}return Z(t)},"__cjs_getBuiltinModule"),{Socket:et}=y("node:net"),{randomBytes:ot}=y("node:crypto"),{readdir:st,writeFile:rt,rename:it,rm:T,open:A,readFile:at,stat:nt,unlink:j}=y("node:fs/promises"),{createRequire:ct}=y("node:module"),{spawn:ht}=y("node:child_process");var ut=Object.defineProperty,ft=a((t,e)=>ut(t,"name",{value:e,configurable:!0}),"i$1"),pt=Object.defineProperty,N=ft((t,e)=>pt(t,"name",{value:e,configurable:!0}),"s");const wt=ct(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kt=N(t=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[e,o]=m.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return m.getBuiltinModule(t)}return wt(t)},"__cjs_getBuiltinModule"),{lstat:x,mkdir:mt}=kt("node:fs/promises");var gt=Object.defineProperty,vt=N((t,e)=>gt(t,"name",{value:e,configurable:!0}),"o");const yt=vt(async t=>{tt(t);try{const e=await x(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(O(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await mt(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const o=await x(t);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(O(o))}'`,{cause:e})}},"ensureDir");var _t=Object.defineProperty,u=a((t,e)=>_t(t,"name",{value:e,configurable:!0}),"s");const bt=3e4,B=100;class $t extends Error{static{a(this,"ServiceReadinessError")}constructor(e,o){super(e),this.elapsedMs=o,this.name="ServiceReadinessError"}elapsedMs;static{u(this,"ServiceReadinessError")}}const Ht=u(async t=>{const e=t.host??"127.0.0.1",{port:o}=t,s=t.timeoutMs??bt,r=Date.now();for(;Date.now()-r<s;){if(await Et(e,o))return;await St(B)}throw new $t(`Timed out waiting for ${e}:${String(o)} to accept TCP connections (${String(s)}ms)`,Date.now()-r)},"waitForTcp"),Et=u((t,e)=>new Promise(o=>{const s=new et,r=u(i=>{s.removeAllListeners(),s.destroy(),o(i)},"onDone");s.once("connect",()=>{r(!0)}),s.once("error",()=>{r(!1)}),s.setTimeout(B,()=>{r(!1)});try{s.connect(e,t)}catch{r(!1)}}),"tryConnect"),St=u(t=>new Promise(e=>{setTimeout(e,t)}),"delay"),Pt=u(async(t,e)=>{const o=t.readiness??(t.port===void 0?void 0:{tcp:{port:t.port}});o&&await Ht({host:o.tcp.host,port:o.tcp.port,timeoutMs:e?.timeoutMs??o.tcp.timeoutMs})},"runReadiness");var Tt=Object.defineProperty,d=a((t,e)=>Tt(t,"name",{value:e,configurable:!0}),"o");const M=384,C=5e3,Mt=50,Rt=3e4,w=d(async t=>{const e=p(lt(t),"services");try{await yt(e)}catch(o){throw o.code==="ENOTDIR"?new Error(`Service registry path ${e} exists but is not a directory. Remove it or move the conflicting file before running \`vis service\`.`,{cause:o}):o}return e},"getRegistryDir"),R=d(t=>t.replaceAll("/","_").replaceAll(":","__"),"slugify"),D=d((t,e)=>p(t,`${R(e)}.json`),"entryPath"),Dt=d((t,e)=>p(t,`${R(e)}.lock`),"lockPath"),b=d(async(t,e)=>{const o=await w(t),s=D(o,e);if(await dt(s))try{return await W(s)}catch{return}},"readEntry"),Ot=d(async t=>{const e=await w(t);let o;try{o=await st(e)}catch{return[]}const s=[];for(const r of o)if(r.endsWith(".json"))try{const i=await W(p(e,r));s.push(i)}catch{}return s},"readAllEntries"),jt=d(async(t,e)=>{const o=await w(t),s=D(o,e.id),r=p(o,`.${ot(8).toString("hex")}.tmp`);await rt(r,`${JSON.stringify(e,void 0,2)}
|
|
2
|
+
`,{mode:M});try{await it(r,s)}catch(i){throw await T(r,{force:!0}).catch(()=>{}),i}},"writeEntry"),g=d(async(t,e,o)=>{const s=await w(t),r=o??await b(t,e);await T(D(s,e),{force:!0}),r&&await T(r.logFile,{force:!0}).catch(()=>{})},"deleteEntry"),f=d(t=>{try{return process.kill(t,0),!0}catch{return!1}},"isAlive"),Zt=d(async t=>{const e=await Ot(t),o=[],s=[];for(const r of e){if(f(r.pid)){s.push(r);continue}const i=await b(t,r.id);if(i&&i.pid!==r.pid){s.push(i);continue}await g(t,r.id,r).catch(()=>{}),o.push(r.id)}return{pruned:o,surviving:s}},"pruneDead"),xt=d(t=>new Promise(e=>{setTimeout(e,t)}),"sleep"),Ct=d(async t=>{try{const e=await A(t,"wx",M);try{await e.writeFile(String(process.pid))}finally{await e.close().catch(()=>{})}return!0}catch(e){if(e.code==="EEXIST")return!1;throw e}},"tryClaimLock"),Ft=d(async t=>{let e;try{const o=await at(t,"utf8"),s=Number.parseInt(o.trim(),10);e=Number.isFinite(s)?s:void 0}catch{return!0}if(e!==void 0&&!f(e))return!0;try{const o=await nt(t);return Date.now()-o.mtimeMs>Rt}catch{return!0}},"isLockStale"),G=d(async(t,e,o)=>{const s=await w(t),r=Dt(s,e),i=Date.now();for(;!await Ct(r);){if(await Ft(r)){await j(r).catch(()=>{});continue}if(Date.now()-i>=C)throw new Error(`Could not acquire service lock for ${e} within ${String(C)}ms — another \`vis service\` invocation appears to be holding it.`);await xt(Mt)}try{return await o()}finally{await j(r).catch(()=>{})}},"withServiceLock");var It=Object.defineProperty,n=a((t,e)=>It(t,"name",{value:e,configurable:!0}),"r");function v(t,e={},o){for(const s in t){const r=t[s],i=o?`${o}:${s}`:s;typeof r=="object"&&r!==null?v(r,e,i):typeof r=="function"&&(e[i]=r)}return e}a(v,"c");n(v,"flatHooks");function Lt(...t){const e={};for(const o of t){const s=v(o);for(const r in s)e[r]?e[r].push(s[r]):e[r]=[s[r]]}for(const o in e)if(e[o].length>1){const s=e[o];e[o]=(...r)=>V(s,i=>i(...r))}else e[o]=e[o][0];return e}a(Lt,"v");n(Lt,"mergeHooks");function V(t,e){return t.reduce((o,s)=>o.then(()=>e(s)),Promise.resolve())}a(V,"d$2");n(V,"serial");const q=(()=>{if(console.createTask)return console.createTask;const t={run:n(e=>e(),"run")};return()=>t})();function $(t,e,o,s){for(let r=o;r<t.length;r+=1)try{const i=s?s.run(()=>t[r](...e)):t[r](...e);if(i&&typeof i.then=="function")return Promise.resolve(i).then(()=>$(t,e,r+1,s))}catch(i){return Promise.reject(i)}}a($,"k");n($,"callHooks");function X(t,e,o){if(t.length>0)return $(t,e,0,q(o))}a(X,"y");n(X,"serialTaskCaller");function J(t,e,o){if(t.length>0){const s=q(o);return Promise.all(t.map(r=>s.run(()=>r(...e))))}}a(J,"m");n(J,"parallelTaskCaller");function At(t,e){return t.reduce((o,s)=>o.then(()=>s(...e||[])),Promise.resolve())}a(At,"x");n(At,"serialCaller");function Wt(t,e){return Promise.all(t.map(o=>o(...e||[])))}a(Wt,"P");n(Wt,"parallelCaller");function _(t,e){for(const o of[...t])o(e)}a(_,"a");n(_,"callEachWith");var Nt=class{static{a(this,"p")}static{n(this,"Hookable")}_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,e,o={}){if(!t||typeof e!="function")return()=>{};const s=t;let r;for(;this._deprecatedHooks[t];)r=this._deprecatedHooks[t],t=r.to;if(r&&!o.allowDeprecated){let i=r.message;i||(i=`${s} hook has been deprecated`+(r.to?`, please use ${r.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!e.name)try{Object.defineProperty(e,"name",{get:n(()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb","get"),configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)}}hookOnce(t,e){let o,s=n((...r)=>(typeof o=="function"&&o(),o=void 0,s=void 0,e(...r)),"_function");return o=this.hook(t,s),o}removeHook(t,e){const o=this._hooks[t];if(o){const s=o.indexOf(e);s!==-1&&o.splice(s,1),o.length===0&&(this._hooks[t]=void 0)}}clearHook(t){this._hooks[t]=void 0}deprecateHook(t,e){this._deprecatedHooks[t]=typeof e=="string"?{to:e}:e;const o=this._hooks[t]||[];this._hooks[t]=void 0;for(const s of o)this.hook(t,s)}deprecateHooks(t){for(const e in t)this.deprecateHook(e,t[e])}addHooks(t){const e=v(t),o=Object.keys(e).map(s=>this.hook(s,e[s]));return()=>{for(const s of o)s();o.length=0}}removeHooks(t){const e=v(t);for(const o in e)this.removeHook(o,e[o])}removeAllHooks(){this._hooks={}}callHook(t,...e){return this.callHookWith(X,t,e)}callHookParallel(t,...e){return this.callHookWith(J,t,e)}callHookWith(t,e,o){const s=this._before||this._after?{name:e,args:o,context:{}}:void 0;this._before&&_(this._before,s);const r=t(this._hooks[e]?[...this._hooks[e]]:[],o,e);return r instanceof Promise?r.finally(()=>{this._after&&s&&_(this._after,s)}):(this._after&&s&&_(this._after,s),r)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const e=this._before.indexOf(t);e!==-1&&this._before.splice(e,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const e=this._after.indexOf(t);e!==-1&&this._after.splice(e,1)}}}};function K(){return new Nt}a(K,"w$2");n(K,"createHooks");(class{static{n(this,"HookableCore")}_hooks;constructor(){this._hooks={}}hook(t,e){return!t||typeof e!="function"?()=>{}:(this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)})}removeHook(t,e){const o=this._hooks[t];if(o){const s=o.indexOf(e);s!==-1&&o.splice(s,1),o.length===0&&(this._hooks[t]=void 0)}}callHook(t,...e){const o=this._hooks[t];if(!(!o||o.length===0))return $(o,e,0)}});const F=typeof window<"u";function Bt(t,e={}){const o={inspect:F,group:F,filter:n(()=>!0,"filter"),...e},s=o.filter,r=typeof s=="string"?c=>c.startsWith(s):s,i=o.tag?`[${o.tag}] `:"",l=n(c=>i+c.name+"".padEnd(c._id,"\0"),"logPrefix"),h={},S=t.beforeEach(c=>{r!==void 0&&!r(c.name)||(h[c.name]=h[c.name]||0,c._id=h[c.name]++,console.time(l(c)))}),P=t.afterEach(c=>{r!==void 0&&!r(c.name)||(o.group&&console.groupCollapsed(c.name),o.inspect?console.timeLog(l(c),c.args):console.timeEnd(l(c)),o.group&&console.groupEnd(),h[c.name]--)});return{close:n(()=>{S(),P()},"close")}}a(Bt,"W");n(Bt,"createDebugger");var Gt=Object.defineProperty,H=a((t,e)=>Gt(t,"name",{value:e,configurable:!0}),"t$1");const te=H(()=>K(),"createVisHooks"),ee=H(async(t,e)=>{if(!(!e||e.length===0))for(const o of e){if(o.hooks)for(const[s,r]of Object.entries(o.hooks)){const i=Array.isArray(r)?r:[r];for(const l of i)t.hook(s,l)}o.setup&&await o.setup(t)}},"registerPlugins");class oe{static{a(this,"HookableLifeCycle")}static{H(this,"HookableLifeCycle")}#o;#e;#s=new Map;constructor(e,o){this.#o=e,this.#e=o}startTasks(e){for(const o of e)this.#s.set(o.id,o),this.#t("task:before",o)}endTasks(e){for(const o of e)this.#s.delete(o.task.id),this.#t("task:after",o.task,o),o.status==="failure"?this.#t("task:failure",o.task,o):Vt(o.status)&&this.#t("task:cacheHit",o.task,o)}printCacheMiss(e,o){this.#t("task:cacheMiss",e,o)}onTaskStdout(e,o){this.#t("task:stdout",e,o)}onTaskStderr(e,o){this.#t("task:stderr",e,o)}#t(e,...o){Promise.resolve(this.#o.callHook(e,...o)).catch(s=>{if(this.#e)try{this.#e(e,s)}catch{}})}}const Vt=H(t=>t==="local-cache"||t==="local-cache-kept-existing"||t==="remote-cache","isCacheStatus");var qt=Object.defineProperty,Xt=a((t,e)=>qt(t,"name",{value:e,configurable:!0}),"i");const I=process.platform==="win32",Jt=Xt(async t=>{const{command:e,cwd:o,env:s,logFile:r}=t,i=await A(r,"a",M);let l;try{l=ht(I?"cmd":"/bin/sh",I?["/d","/s","/c",e]:["-c",e],{cwd:o,detached:!0,env:{...process.env,...s},stdio:["ignore",i.fd,i.fd],windowsHide:!0})}finally{await i.close().catch(()=>{})}if(l.pid===void 0&&await new Promise((h,S)=>{l.once("spawn",()=>{h()}),l.once("error",P=>{S(P)})}),l.pid===void 0)throw new Error(`Failed to spawn detached process for command: ${e}`);return l.unref(),{pid:l.pid}},"spawnDetached");var Kt=Object.defineProperty,E=a((t,e)=>Kt(t,"name",{value:e,configurable:!0}),"t");const Q=5e3,se=E(async t=>G(t.workspaceRoot,t.id,async()=>{const e=await b(t.workspaceRoot,t.id);if(e&&f(e.pid))throw new Error(`Service ${t.id} is already running (pid ${String(e.pid)})`);e&&await g(t.workspaceRoot,t.id,e);const o=await w(t.workspaceRoot),s=R(t.id),r=p(o,`${s}.log`),{pid:i}=await Jt({command:t.command,cwd:t.cwd,env:t.env,logFile:r}),l={command:t.command,config:t.config,cwd:t.cwd,env:t.config.env??{},id:t.id,logFile:r,pid:i,slug:s,startedAt:new Date().toISOString(),visVersion:process.env.VIS_VERSION??"0.0.0"};if(await jt(t.workspaceRoot,l),t.skipReadiness!==!0)try{await Pt(t.config,{timeoutMs:t.readinessTimeoutMs})}catch(h){throw await Y(i,t.config.killGracePeriodMs??Q).catch(()=>{}),await g(t.workspaceRoot,t.id,l).catch(()=>{}),h}return{entry:l}}),"startService"),re=E(async t=>G(t.workspaceRoot,t.id,async()=>{const e=await b(t.workspaceRoot,t.id);if(!e)return{stopped:!1};if(!f(e.pid))return await g(t.workspaceRoot,t.id,e),{stopped:!1};const o=t.graceMs??e.config.killGracePeriodMs??Q;return await Y(e.pid,o),await g(t.workspaceRoot,t.id,e),{stopped:!0}}),"stopService"),Y=E(async(t,e)=>{L(t,"SIGTERM");const o=Date.now();for(;Date.now()-o<e;){if(!f(t))return;await new Promise(s=>{setTimeout(s,100)})}f(t)&&L(t,"SIGKILL")},"stopServiceByPid"),L=E((t,e)=>{try{process.platform==="win32"?process.kill(t,e):process.kill(-t,e)}catch(o){if(o.code==="ESRCH")return;throw o}},"sendSignalToServiceGroup");export{oe as H,$t as S,b as a,re as b,te as c,Ot as d,Pt as e,g as f,f as i,Zt as p,ee as r,se as s};
|
package/index.js
CHANGED
|
@@ -81,8 +81,8 @@ function requireNative() {
|
|
|
81
81
|
try {
|
|
82
82
|
const binding = require('@visulima/vis-binding-android-arm64')
|
|
83
83
|
const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
|
|
84
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
85
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
84
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
85
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
86
|
}
|
|
87
87
|
return binding
|
|
88
88
|
} catch (e) {
|
|
@@ -97,8 +97,8 @@ function requireNative() {
|
|
|
97
97
|
try {
|
|
98
98
|
const binding = require('@visulima/vis-binding-android-arm-eabi')
|
|
99
99
|
const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
|
|
100
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
100
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
102
|
}
|
|
103
103
|
return binding
|
|
104
104
|
} catch (e) {
|
|
@@ -118,8 +118,8 @@ function requireNative() {
|
|
|
118
118
|
try {
|
|
119
119
|
const binding = require('@visulima/vis-binding-win32-x64-gnu')
|
|
120
120
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
|
|
121
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
122
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
121
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
122
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
123
123
|
}
|
|
124
124
|
return binding
|
|
125
125
|
} catch (e) {
|
|
@@ -134,8 +134,8 @@ function requireNative() {
|
|
|
134
134
|
try {
|
|
135
135
|
const binding = require('@visulima/vis-binding-win32-x64-msvc')
|
|
136
136
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
|
|
137
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
138
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
137
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
138
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
139
139
|
}
|
|
140
140
|
return binding
|
|
141
141
|
} catch (e) {
|
|
@@ -151,8 +151,8 @@ function requireNative() {
|
|
|
151
151
|
try {
|
|
152
152
|
const binding = require('@visulima/vis-binding-win32-ia32-msvc')
|
|
153
153
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
|
|
154
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
155
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
154
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
155
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
156
156
|
}
|
|
157
157
|
return binding
|
|
158
158
|
} catch (e) {
|
|
@@ -167,8 +167,8 @@ function requireNative() {
|
|
|
167
167
|
try {
|
|
168
168
|
const binding = require('@visulima/vis-binding-win32-arm64-msvc')
|
|
169
169
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
|
|
170
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
171
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
170
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
172
|
}
|
|
173
173
|
return binding
|
|
174
174
|
} catch (e) {
|
|
@@ -186,8 +186,8 @@ function requireNative() {
|
|
|
186
186
|
try {
|
|
187
187
|
const binding = require('@visulima/vis-binding-darwin-universal')
|
|
188
188
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
|
|
189
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
190
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
189
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
190
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
191
191
|
}
|
|
192
192
|
return binding
|
|
193
193
|
} catch (e) {
|
|
@@ -202,8 +202,8 @@ function requireNative() {
|
|
|
202
202
|
try {
|
|
203
203
|
const binding = require('@visulima/vis-binding-darwin-x64')
|
|
204
204
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
|
|
205
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
206
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
205
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
206
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
207
207
|
}
|
|
208
208
|
return binding
|
|
209
209
|
} catch (e) {
|
|
@@ -218,8 +218,8 @@ function requireNative() {
|
|
|
218
218
|
try {
|
|
219
219
|
const binding = require('@visulima/vis-binding-darwin-arm64')
|
|
220
220
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
|
|
221
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
222
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
221
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
222
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
223
|
}
|
|
224
224
|
return binding
|
|
225
225
|
} catch (e) {
|
|
@@ -238,8 +238,8 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = require('@visulima/vis-binding-freebsd-x64')
|
|
240
240
|
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
|
|
241
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
241
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
243
243
|
}
|
|
244
244
|
return binding
|
|
245
245
|
} catch (e) {
|
|
@@ -254,8 +254,8 @@ function requireNative() {
|
|
|
254
254
|
try {
|
|
255
255
|
const binding = require('@visulima/vis-binding-freebsd-arm64')
|
|
256
256
|
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
|
|
257
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
258
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
257
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
258
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
259
259
|
}
|
|
260
260
|
return binding
|
|
261
261
|
} catch (e) {
|
|
@@ -275,8 +275,8 @@ function requireNative() {
|
|
|
275
275
|
try {
|
|
276
276
|
const binding = require('@visulima/vis-binding-linux-x64-musl')
|
|
277
277
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
|
|
278
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
279
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
278
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
279
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
280
280
|
}
|
|
281
281
|
return binding
|
|
282
282
|
} catch (e) {
|
|
@@ -291,8 +291,8 @@ function requireNative() {
|
|
|
291
291
|
try {
|
|
292
292
|
const binding = require('@visulima/vis-binding-linux-x64-gnu')
|
|
293
293
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
|
|
294
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
295
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
294
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
295
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
296
|
}
|
|
297
297
|
return binding
|
|
298
298
|
} catch (e) {
|
|
@@ -309,8 +309,8 @@ function requireNative() {
|
|
|
309
309
|
try {
|
|
310
310
|
const binding = require('@visulima/vis-binding-linux-arm64-musl')
|
|
311
311
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
|
|
312
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
313
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
312
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
313
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
314
314
|
}
|
|
315
315
|
return binding
|
|
316
316
|
} catch (e) {
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('@visulima/vis-binding-linux-arm64-gnu')
|
|
327
327
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
|
|
328
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
328
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
330
|
}
|
|
331
331
|
return binding
|
|
332
332
|
} catch (e) {
|
|
@@ -343,8 +343,8 @@ function requireNative() {
|
|
|
343
343
|
try {
|
|
344
344
|
const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
|
|
345
345
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
|
|
346
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
347
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
346
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
347
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
348
348
|
}
|
|
349
349
|
return binding
|
|
350
350
|
} catch (e) {
|
|
@@ -359,8 +359,8 @@ function requireNative() {
|
|
|
359
359
|
try {
|
|
360
360
|
const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
|
|
361
361
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
|
|
362
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
363
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
362
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
363
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
364
|
}
|
|
365
365
|
return binding
|
|
366
366
|
} catch (e) {
|
|
@@ -377,8 +377,8 @@ function requireNative() {
|
|
|
377
377
|
try {
|
|
378
378
|
const binding = require('@visulima/vis-binding-linux-loong64-musl')
|
|
379
379
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
|
|
380
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
381
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
380
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
381
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
382
382
|
}
|
|
383
383
|
return binding
|
|
384
384
|
} catch (e) {
|
|
@@ -393,8 +393,8 @@ function requireNative() {
|
|
|
393
393
|
try {
|
|
394
394
|
const binding = require('@visulima/vis-binding-linux-loong64-gnu')
|
|
395
395
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
|
|
396
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
397
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
396
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
397
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
398
|
}
|
|
399
399
|
return binding
|
|
400
400
|
} catch (e) {
|
|
@@ -411,8 +411,8 @@ function requireNative() {
|
|
|
411
411
|
try {
|
|
412
412
|
const binding = require('@visulima/vis-binding-linux-riscv64-musl')
|
|
413
413
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
|
|
414
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
415
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
414
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
415
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
416
416
|
}
|
|
417
417
|
return binding
|
|
418
418
|
} catch (e) {
|
|
@@ -427,8 +427,8 @@ function requireNative() {
|
|
|
427
427
|
try {
|
|
428
428
|
const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
|
|
429
429
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
|
|
430
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
431
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
430
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
431
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
432
432
|
}
|
|
433
433
|
return binding
|
|
434
434
|
} catch (e) {
|
|
@@ -444,8 +444,8 @@ function requireNative() {
|
|
|
444
444
|
try {
|
|
445
445
|
const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
|
|
446
446
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
|
|
447
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
448
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
447
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
448
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
449
449
|
}
|
|
450
450
|
return binding
|
|
451
451
|
} catch (e) {
|
|
@@ -460,8 +460,8 @@ function requireNative() {
|
|
|
460
460
|
try {
|
|
461
461
|
const binding = require('@visulima/vis-binding-linux-s390x-gnu')
|
|
462
462
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
|
|
463
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
464
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
463
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
464
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
465
465
|
}
|
|
466
466
|
return binding
|
|
467
467
|
} catch (e) {
|
|
@@ -480,8 +480,8 @@ function requireNative() {
|
|
|
480
480
|
try {
|
|
481
481
|
const binding = require('@visulima/vis-binding-openharmony-arm64')
|
|
482
482
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
|
|
483
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
484
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
483
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
484
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
485
485
|
}
|
|
486
486
|
return binding
|
|
487
487
|
} catch (e) {
|
|
@@ -496,8 +496,8 @@ function requireNative() {
|
|
|
496
496
|
try {
|
|
497
497
|
const binding = require('@visulima/vis-binding-openharmony-x64')
|
|
498
498
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
|
|
499
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
500
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
499
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
500
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
501
501
|
}
|
|
502
502
|
return binding
|
|
503
503
|
} catch (e) {
|
|
@@ -512,8 +512,8 @@ function requireNative() {
|
|
|
512
512
|
try {
|
|
513
513
|
const binding = require('@visulima/vis-binding-openharmony-arm')
|
|
514
514
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
|
|
515
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
516
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
515
|
+
if (bindingPackageVersion !== '1.0.0-alpha.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
516
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
517
517
|
}
|
|
518
518
|
return binding
|
|
519
519
|
} catch (e) {
|
|
@@ -579,12 +579,14 @@ if (!nativeBinding) {
|
|
|
579
579
|
throw new Error(`Failed to load native binding`)
|
|
580
580
|
}
|
|
581
581
|
|
|
582
|
-
const { cleanWorkspace, detectPackageManager, execPmCommand, execPmCommandInteractive, NATIVE_BINDING_VERSION, resolveAdd, resolveDedupe, resolveDlx, resolveEditorconfigDefaults, resolveExec, resolveInstall, resolveLink, resolveOutdated, resolvePmCommand, resolveRemove, resolveUnlink, resolveWhy, sortPackageJsonString, sortPackageJsonStringWithOptions, whichBin } = nativeBinding
|
|
582
|
+
const { allKnownTags, cleanWorkspace, detectPackageManager, execPmCommand, execPmCommandInteractive, NATIVE_BINDING_VERSION, parseShebang, resolveAdd, resolveDedupe, resolveDlx, resolveEditorconfigDefaults, resolveExec, resolveInstall, resolveLink, resolveOutdated, resolvePmCommand, resolveRemove, resolveUnlink, resolveWhy, sortPackageJsonString, sortPackageJsonStringWithOptions, tagsFromPath, tagsFromPaths, whichBin } = nativeBinding
|
|
583
|
+
export { allKnownTags }
|
|
583
584
|
export { cleanWorkspace }
|
|
584
585
|
export { detectPackageManager }
|
|
585
586
|
export { execPmCommand }
|
|
586
587
|
export { execPmCommandInteractive }
|
|
587
588
|
export { NATIVE_BINDING_VERSION }
|
|
589
|
+
export { parseShebang }
|
|
588
590
|
export { resolveAdd }
|
|
589
591
|
export { resolveDedupe }
|
|
590
592
|
export { resolveDlx }
|
|
@@ -599,4 +601,6 @@ export { resolveUnlink }
|
|
|
599
601
|
export { resolveWhy }
|
|
600
602
|
export { sortPackageJsonString }
|
|
601
603
|
export { sortPackageJsonStringWithOptions }
|
|
604
|
+
export { tagsFromPath }
|
|
605
|
+
export { tagsFromPaths }
|
|
602
606
|
export { whichBin }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/vis",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.19",
|
|
4
4
|
"description": "A CLI task runner for monorepo workspaces, powered by @visulima/task-runner",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"LICENSE.md"
|
|
77
77
|
],
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@visulima/secret-scanner": "1.0.0-alpha.
|
|
80
|
-
"@visulima/task-runner": "1.0.0-alpha.
|
|
81
|
-
"@visulima/tui": "1.0.0-alpha.
|
|
79
|
+
"@visulima/secret-scanner": "1.0.0-alpha.2",
|
|
80
|
+
"@visulima/task-runner": "1.0.0-alpha.13",
|
|
81
|
+
"@visulima/tui": "1.0.0-alpha.14",
|
|
82
82
|
"jiti": "^2.7.0",
|
|
83
83
|
"module-replacements": "^2.11.0",
|
|
84
84
|
"module-replacements-codemods": "^1.2.1",
|
|
@@ -99,14 +99,14 @@
|
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
"optionalDependencies": {
|
|
102
|
-
"@visulima/vis-binding-darwin-
|
|
103
|
-
"@visulima/vis-binding-darwin-
|
|
104
|
-
"@visulima/vis-binding-linux-arm64-gnu": "1.0.0-alpha.
|
|
105
|
-
"@visulima/vis-binding-linux-x64-gnu": "1.0.0-alpha.
|
|
106
|
-
"@visulima/vis-binding-linux-arm64-musl": "1.0.0-alpha.
|
|
107
|
-
"@visulima/vis-binding-
|
|
108
|
-
"@visulima/vis-binding-
|
|
109
|
-
"@visulima/vis-binding-win32-x64-msvc": "1.0.0-alpha.
|
|
102
|
+
"@visulima/vis-binding-darwin-arm64": "1.0.0-alpha.19",
|
|
103
|
+
"@visulima/vis-binding-darwin-x64": "1.0.0-alpha.19",
|
|
104
|
+
"@visulima/vis-binding-linux-arm64-gnu": "1.0.0-alpha.19",
|
|
105
|
+
"@visulima/vis-binding-linux-x64-gnu": "1.0.0-alpha.19",
|
|
106
|
+
"@visulima/vis-binding-linux-arm64-musl": "1.0.0-alpha.19",
|
|
107
|
+
"@visulima/vis-binding-win32-arm64-msvc": "1.0.0-alpha.19",
|
|
108
|
+
"@visulima/vis-binding-linux-x64-musl": "1.0.0-alpha.19",
|
|
109
|
+
"@visulima/vis-binding-win32-x64-msvc": "1.0.0-alpha.19"
|
|
110
110
|
},
|
|
111
111
|
"engines": {
|
|
112
112
|
"node": "^22.14.0 || >=24.10.0"
|
|
@@ -271,6 +271,18 @@
|
|
|
271
271
|
"additionalProperties": false,
|
|
272
272
|
"description": "Installer backend selection for `vis install` / `vis add` / `vis remove` / `vis update` / `vis ci`.\n\nLets users opt into [aube](https://github.com/endevco/aube) — a Rust-native package manager that reads/writes pnpm/npm/yarn/bun lockfiles in place — as the default installer, while keeping a single switch to fall back to the conventional PM detected from the lockfile.\n\nResolution precedence (highest first): 1. CLI flag (`--installer <name>` / `--no-aube`) 2. Env var `VIS_INSTALLER` 3. This config field 4. Auto-detect (the default)\n\nAube must be installed separately — `vis` does not bundle it. Install via npm (`@endevco/aube`), `mise use -g aube`, or `brew install endevco/tap/aube`."
|
|
273
273
|
},
|
|
274
|
+
"mcpPromote": {
|
|
275
|
+
"type": "object",
|
|
276
|
+
"properties": {
|
|
277
|
+
"enabled": {
|
|
278
|
+
"type": "boolean",
|
|
279
|
+
"description": "Show the vis-mcp promotion notice on successful command completion.",
|
|
280
|
+
"default": true
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"additionalProperties": false,
|
|
284
|
+
"description": "`vis-mcp` promotion notice shown after successful commands when an AI CLI (Claude Code, Cursor, Windsurf, Continue, Zed, Cline) is installed but `@visulima/vis-mcp` is not wired into its config.\n\nShown at most once every 14 days; skipped in CI, non-TTY shells, during `--help`/`--version`/`ai`/`mcp` invocations, and when `VIS_NO_MCP_PROMOTE=1` is set. Set `enabled: false` to silence permanently for this workspace."
|
|
285
|
+
},
|
|
274
286
|
"namedInputs": {
|
|
275
287
|
"type": "object",
|
|
276
288
|
"additionalProperties": {
|
|
@@ -725,6 +737,35 @@
|
|
|
725
737
|
"additionalProperties": false,
|
|
726
738
|
"description": "Pre-flight checks fired before `vis run` starts the orchestrator. Each check is opt-out (`false`) — defaults are sensible for the common monorepo case."
|
|
727
739
|
},
|
|
740
|
+
"run": {
|
|
741
|
+
"type": "object",
|
|
742
|
+
"properties": {
|
|
743
|
+
"ciGrouping": {
|
|
744
|
+
"type": "string",
|
|
745
|
+
"enum": [
|
|
746
|
+
"auto",
|
|
747
|
+
"azure",
|
|
748
|
+
"buildkite",
|
|
749
|
+
"github",
|
|
750
|
+
"gitlab",
|
|
751
|
+
"off"
|
|
752
|
+
],
|
|
753
|
+
"description": "Wrap each task's CI log block in collapsible groups so users can fold/unfold per-task output in the host CI's web UI. Failed tasks always render expanded so the failure is visible without an extra click.\n\n- `auto` (default): pick the format from the detected runner — `GITHUB_ACTIONS=true` → `github` (`::group::`), `GITLAB_CI=true` → `gitlab` (`section_start:` ANSI sequences), `BUILDKITE=true` → `buildkite` (`---` collapsed headers), `TF_BUILD=True` → `azure` (`##[group]`), no grouping otherwise.\n- `off`: never group (raw separators only — useful when piping through tools that mangle the directives).\n- `azure` / `buildkite` / `github` / `gitlab`: force the format regardless of detected environment (useful for self-hosted runners that don't set the standard env vars).\n\nCircleCI is intentionally not auto-detected: its 2.0+ format has no inline grouping directive — steps auto-group in the web UI without any markup from the runner."
|
|
754
|
+
},
|
|
755
|
+
"services": {
|
|
756
|
+
"type": "string",
|
|
757
|
+
"enum": [
|
|
758
|
+
"auto",
|
|
759
|
+
"ephemeral",
|
|
760
|
+
"off",
|
|
761
|
+
"persistent"
|
|
762
|
+
],
|
|
763
|
+
"description": "One knob controlling auto-start of missing service deps.\n- `auto` (default in TTY): pick by task — `dev` → ephemeral, others → persistent.\n- `ephemeral`: services die with the run (no registry entry).\n- `persistent`: services persist across runs in the registry.\n- `off` (default in CI / non-TTY): print diagnostics and abort."
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
"additionalProperties": false,
|
|
767
|
+
"description": "Behavior of `vis run` when invoked tasks declare service dependencies that aren't running in the workspace registry. CLI `--services=<mode>` overrides this block."
|
|
768
|
+
},
|
|
728
769
|
"secrets": {
|
|
729
770
|
"type": "object",
|
|
730
771
|
"properties": {
|
|
@@ -986,7 +1027,7 @@
|
|
|
986
1027
|
},
|
|
987
1028
|
"sharedWorktreeCache": {
|
|
988
1029
|
"type": "boolean",
|
|
989
|
-
"description": "Share the cache between sibling git worktrees. When the workspace is a linked worktree (created with `git worktree add`), the cache root is relocated from `<linkedRoot>/.
|
|
1030
|
+
"description": "Share the cache between sibling git worktrees. When the workspace is a linked worktree (created with `git worktree add`), the cache root is relocated from `<linkedRoot>/.vis/cache` to the *main* worktree's `.vis/cache`. Multiple parallel agents working in sibling worktrees then share a single cache instead of rebuilding the same hash N times.\n\nSingle-checkout repos (where `.git` is a directory) are unaffected.\n\nSet to `false` to opt out — useful when worktrees deliberately need independent caches, e.g. for hermetic experiments.",
|
|
990
1031
|
"default": true
|
|
991
1032
|
},
|
|
992
1033
|
"sortPackageJson": {
|
|
@@ -1633,6 +1674,10 @@
|
|
|
1633
1674
|
"type": "string",
|
|
1634
1675
|
"description": "Directory for storing cache"
|
|
1635
1676
|
},
|
|
1677
|
+
"dataDirectory": {
|
|
1678
|
+
"type": "string",
|
|
1679
|
+
"description": "Directory used to persist run summaries (`runs/`), `last-summary.json`, and other run-scoped state. Defaults to `{workspaceRoot}/.task-runner` when omitted so standalone task-runner consumers keep their existing layout. Vis sets this to `{workspaceRoot}/.vis` so all per-workspace state lives under a single directory."
|
|
1680
|
+
},
|
|
1636
1681
|
"dryRun": {
|
|
1637
1682
|
"type": "boolean",
|
|
1638
1683
|
"description": "Dry-run mode: compute hashes and check cache but don't execute tasks. Useful for debugging cache hits/misses.",
|
|
@@ -1797,6 +1842,10 @@
|
|
|
1797
1842
|
"description": "When `true`, the cache directory is partitioned by a hash of the resolved `globalEnv` values. Changing a globalEnv var moves cache writes into a new namespace; rolling it back reuses the old namespace and its hits. Without this option, any globalEnv change silently busts every cached entry.\n\nKeep disabled when globalEnv is stable across runs — the extra path depth offers no value, and misconfigured namespaces can hide stale hits.",
|
|
1798
1843
|
"default": false
|
|
1799
1844
|
},
|
|
1845
|
+
"onFingerprint": {
|
|
1846
|
+
"not": {},
|
|
1847
|
+
"description": "Plugin extension point invoked during task fingerprinting. Fires once per task after the built-in inputs (filesets, runtime, env) have been gathered and before the hash is sealed. Contributions made through the supplied {@link FingerprintContributor } are mixed deterministically into the final hash.\n\nThrowing aborts fingerprinting for that task — the task fails before any cache lookup runs, so a buggy plugin can't silently corrupt cache state.\n\nWired by `vis` to bridge into the `task:fingerprint` hook; standalone task-runner consumers can pass a callback directly."
|
|
1848
|
+
},
|
|
1800
1849
|
"parallel": {
|
|
1801
1850
|
"type": [
|
|
1802
1851
|
"number",
|
|
@@ -2676,6 +2725,27 @@
|
|
|
2676
2725
|
"description": "Fired once before any task in the graph starts, after workspace discovery and graph construction. Throwing aborts the run."
|
|
2677
2726
|
}
|
|
2678
2727
|
},
|
|
2728
|
+
"service:attach": {
|
|
2729
|
+
"type": "array",
|
|
2730
|
+
"items": {
|
|
2731
|
+
"not": {},
|
|
2732
|
+
"description": "Fired after `vis run` auto-attaches to one or more registered services. `taskIds` lists the in-graph dependents that consumed the service's `env` block; an empty array means the service was registered but no kept task depended on it."
|
|
2733
|
+
}
|
|
2734
|
+
},
|
|
2735
|
+
"service:start": {
|
|
2736
|
+
"type": "array",
|
|
2737
|
+
"items": {
|
|
2738
|
+
"not": {},
|
|
2739
|
+
"description": "Fired after a service is registered and its readiness probe succeeds. Sourced from both `vis service start` (and `restart`'s post-start phase) and any future programmatic call sites."
|
|
2740
|
+
}
|
|
2741
|
+
},
|
|
2742
|
+
"service:stop": {
|
|
2743
|
+
"type": "array",
|
|
2744
|
+
"items": {
|
|
2745
|
+
"not": {},
|
|
2746
|
+
"description": "Fired after a registered service is stopped (SIGTERM/SIGKILL acknowledged, registry entry deleted). Not fired when stop is called against an unknown id — only when there was an alive entry to terminate."
|
|
2747
|
+
}
|
|
2748
|
+
},
|
|
2679
2749
|
"task:after": {
|
|
2680
2750
|
"type": "array",
|
|
2681
2751
|
"items": {
|
|
@@ -2711,6 +2781,20 @@
|
|
|
2711
2781
|
"description": "Fired when a task exits non-zero."
|
|
2712
2782
|
}
|
|
2713
2783
|
},
|
|
2784
|
+
"task:fingerprint": {
|
|
2785
|
+
"type": "array",
|
|
2786
|
+
"items": {
|
|
2787
|
+
"not": {},
|
|
2788
|
+
"description": "Fired during fingerprint construction, after built-in inputs are gathered and before the hash is sealed. Plugins call `contributor.contribute(key, value)` to mix arbitrary strings into the task hash — the hasher namespaces and sorts contributions deterministically so call order doesn't change the result.\n\nThrowing aborts hashing for the offending task and surfaces as a task failure before any cache lookup runs. Use this to guarantee a buggy plugin can't quietly poison cache state."
|
|
2789
|
+
}
|
|
2790
|
+
},
|
|
2791
|
+
"task:retry": {
|
|
2792
|
+
"type": "array",
|
|
2793
|
+
"items": {
|
|
2794
|
+
"not": {},
|
|
2795
|
+
"description": "Fired right before a failed task is re-spawned by the retry controller. `attempt` is 1-indexed and counts the retry that's about to start (so the original failed run was attempt 0). `prevExitCode` is the failing exit status that triggered the retry (the full TaskResult isn't materialized at the retry boundary — only the per-attempt close event is available).\n\nThrowing aborts the retry; the previous failure becomes the final result."
|
|
2796
|
+
}
|
|
2797
|
+
},
|
|
2714
2798
|
"task:stderr": {
|
|
2715
2799
|
"type": "array",
|
|
2716
2800
|
"items": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var f=(a,s)=>h(a,"name",{value:s,configurable:!0});import{createRequire as k}from"node:module";import{a as y,n as T,M as v}from"../packem_chunks/config.js";import{n as S}from"../packem_chunks/bin.js";const R=k(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=f(a=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[s,n]=l.versions.node.split(".").map(Number);if(s>22||s===22&&n>=3||s===20&&n>=16)return l.getBuiltinModule(a)}return R(a)},"__cjs_getBuiltinModule"),{readdirSync:j}=b("node:fs");var F=Object.defineProperty,d=f((a,s)=>F(a,"name",{value:s,configurable:!0}),"i");const P=d((a,s)=>{let n=0,o=0,r=0;for(const[,t]of a)switch(t.status){case"failure":{r+=1;break}case"local-cache":case"local-cache-kept-existing":case"remote-cache":{o+=1;break}case"success":{n+=1;break}}const i=[];n>0&&i.push(`${String(n)} succeeded`),o>0&&i.push(`${String(o)} cached`),r>0&&i.push(`${String(r)} failed`);const c=(s/1e3).toFixed(1);return i.push(`${c}s`),i.join(" · ")},"formatTimingSummary"),p=d(a=>{const s=S(a);if(!y(s))return[];const n=j(s).filter(r=>r.endsWith(".json")),o=[];for(const r of n)try{o.push(T(v(s,r)))}catch{}return o},"loadRunSummaries"),D=d((a,s,n)=>{const o=n??p(a);if(o.length<2)return;let r=0,i=0;for(const e of o)typeof e.duration=="number"&&e.duration>0&&(r+=e.duration,i+=1);if(i<2)return;const c=r/i-s,t=Math.abs(c/1e3).toFixed(1);return Math.abs(c)<500?"(about average)":c>0?`(${t}s faster than avg)`:`(${t}s slower than avg)`},"compareDuration");var _=Object.defineProperty,m=f((a,s)=>_(a,"name",{value:s,configurable:!0}),"l");const E=m((a,s={},n)=>{const o=n??p(a);if(o.length===0)return[];const r=new Map;for(const t of o)if(!(s.since&&(t.startTime===void 0||t.startTime<s.since))&&Array.isArray(t.tasks))for(const e of t.tasks){if(e.cacheStatus==="HIT"||e.cacheStatus==="REMOTE_HIT"||e.cacheStatus==="SKIPPED")continue;const u=r.get(e.taskId)??{failures:0,project:e.target.project,successes:0,target:e.target.target,totalRuns:0};u.totalRuns+=1,e.exitCode!==void 0&&e.exitCode!==0?(u.failures+=1,u.lastFailure=e.startTime??t.startTime):u.successes+=1,r.set(e.taskId,u)}const i=s.minRuns??2,c=[];for(const[t,e]of r)e.totalRuns<i||e.failures!==0&&c.push({failures:e.failures,flakinessRate:e.failures/e.totalRuns,lastFailure:e.lastFailure,project:e.project,successes:e.successes,target:e.target,taskId:t,totalRuns:e.totalRuns});return c.sort((t,e)=>e.flakinessRate-t.flakinessRate),c},"analyzeFlakiness"),q=m(a=>{if(a.length===0)return["No flaky tasks detected."];const s=["Task","Runs","Failures","Rate","Last Failure"],n=a.map(t=>[t.taskId,String(t.totalRuns),String(t.failures),`${(t.flakinessRate*100).toFixed(1)}%`,t.lastFailure??"—"]),o=s.map((t,e)=>{let u=0;for(const g of n)u=Math.max(u,(g[e]??"").length);return Math.max(t.length,u)}),r=m((t,e)=>t.padEnd(e),"pad"),i=o.map(t=>"─".repeat(t)).join("──"),c=[s.map((t,e)=>r(t,o[e])).join(" "),i];for(const t of n)c.push(t.map((e,u)=>r(e,o[u])).join(" "));return c},"formatFlakinessTable");export{E as a,q as b,D as c,P as f,p as l};
|