@visulima/vis 1.0.0-alpha.19 → 1.0.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/LICENSE.md +187 -779
  3. package/README.md +1 -1
  4. package/dist/config/index.d.ts +535 -121
  5. package/dist/config/index.js +1 -1
  6. package/dist/packem_chunks/bin.js +380 -286
  7. package/dist/packem_chunks/config.js +15 -14
  8. package/dist/packem_chunks/doctor-probe.js +2 -2
  9. package/dist/packem_chunks/fix.js +9 -9
  10. package/dist/packem_chunks/handler.js +1 -1
  11. package/dist/packem_chunks/handler10.js +1 -2
  12. package/dist/packem_chunks/handler11.js +5 -1
  13. package/dist/packem_chunks/handler12.js +1 -5
  14. package/dist/packem_chunks/handler13.js +27 -1
  15. package/dist/packem_chunks/handler14.js +5 -20
  16. package/dist/packem_chunks/handler15.js +1 -1
  17. package/dist/packem_chunks/handler16.js +1 -1
  18. package/dist/packem_chunks/handler17.js +1 -1
  19. package/dist/packem_chunks/handler18.js +1 -1
  20. package/dist/packem_chunks/handler19.js +1 -5
  21. package/dist/packem_chunks/handler20.js +5 -2
  22. package/dist/packem_chunks/handler21.js +2 -18
  23. package/dist/packem_chunks/handler22.js +2 -1
  24. package/dist/packem_chunks/handler23.js +18 -1
  25. package/dist/packem_chunks/handler24.js +1 -5
  26. package/dist/packem_chunks/handler25.js +1 -1
  27. package/dist/packem_chunks/handler26.js +5 -3
  28. package/dist/packem_chunks/handler27.js +1 -1
  29. package/dist/packem_chunks/handler28.js +3 -1
  30. package/dist/packem_chunks/handler29.js +1 -7
  31. package/dist/packem_chunks/handler3.js +3 -3
  32. package/dist/packem_chunks/handler30.js +6 -22
  33. package/dist/packem_chunks/handler31.js +33 -3
  34. package/dist/packem_chunks/handler32.js +3 -1
  35. package/dist/packem_chunks/handler33.js +1 -2
  36. package/dist/packem_chunks/handler34.js +25 -24
  37. package/dist/packem_chunks/handler35.js +3 -3
  38. package/dist/packem_chunks/handler36.js +6 -21
  39. package/dist/packem_chunks/handler37.js +22 -428
  40. package/dist/packem_chunks/handler38.js +428 -6
  41. package/dist/packem_chunks/handler39.js +6 -5
  42. package/dist/packem_chunks/handler4.js +8 -2
  43. package/dist/packem_chunks/handler40.js +24 -10
  44. package/dist/packem_chunks/handler41.js +10 -24
  45. package/dist/packem_chunks/handler42.js +1 -1
  46. package/dist/packem_chunks/handler43.js +6 -6
  47. package/dist/packem_chunks/handler44.js +13 -13
  48. package/dist/packem_chunks/handler45.js +213 -3
  49. package/dist/packem_chunks/handler46.js +3 -27
  50. package/dist/packem_chunks/handler47.js +21 -161
  51. package/dist/packem_chunks/handler48.js +166 -33
  52. package/dist/packem_chunks/handler49.js +34 -0
  53. package/dist/packem_chunks/handler5.js +1 -8
  54. package/dist/packem_chunks/handler6.js +1 -1
  55. package/dist/packem_chunks/handler7.js +1 -1
  56. package/dist/packem_chunks/handler8.js +1 -1
  57. package/dist/packem_chunks/handler9.js +2 -1
  58. package/dist/packem_chunks/heal-accept.js +2 -2
  59. package/dist/packem_chunks/heal.js +1 -1
  60. package/dist/packem_chunks/help-command.js +16 -16
  61. package/dist/packem_chunks/index.js +6 -6
  62. package/dist/packem_chunks/keys-refresh.js +4 -0
  63. package/dist/packem_chunks/list.js +3 -0
  64. package/dist/packem_chunks/loader.js +1 -1
  65. package/dist/packem_chunks/prune.js +3 -0
  66. package/dist/packem_chunks/run.js +1 -0
  67. package/dist/packem_chunks/status.js +2 -0
  68. package/dist/packem_chunks/sync.js +2 -0
  69. package/dist/packem_chunks/sync2.js +2 -0
  70. package/dist/packem_chunks/tripwire.js +2 -0
  71. package/dist/packem_shared/advisories-DsynpacV.js +1 -0
  72. package/dist/packem_shared/{ai-analysis-C_GpXikx.js → ai-analysis-uYuTIIXi.js} +1 -1
  73. package/dist/packem_shared/{ai-cache-DrCLD4gc.js → ai-cache-DuwHYx2O.js} +1 -1
  74. package/dist/packem_shared/{ai-fix-CWOz12Om.js → ai-fix-DzrA-dVz.js} +4 -4
  75. package/dist/packem_shared/applyDefaults-BOVDw1jD.js +1 -0
  76. package/dist/packem_shared/build-scripts-DsWMSWDs.js +1 -0
  77. package/dist/packem_shared/{cache-directory-C_U1qsIw.js → cache-directory-DQak1Vjc.js} +1 -1
  78. package/dist/packem_shared/cyclonedx-CiHXuG8M.js +4 -0
  79. package/dist/packem_shared/dependency-scan-DC3nAFHS.js +1 -0
  80. package/dist/packem_shared/{docker-B4s1fjiN.js → docker-B-CIN_nj.js} +19 -19
  81. package/dist/packem_shared/{failure-log-CSC6KfcO.js → failure-log-C3LEMmkq.js} +1 -1
  82. package/dist/packem_shared/{flakiness-DUtrm-wS.js → flakiness-Dq6K4ymq.js} +1 -1
  83. package/dist/packem_shared/glob-MHJQjR39-CQ2GC0b_.js +1 -0
  84. package/dist/packem_shared/{lifecycle-CgK8pcfa.js → lifecycle-Dv3nAtoD.js} +2 -2
  85. package/dist/packem_shared/{lockfile-i-qvq_k8.js → lockfile-C5DYMHVq.js} +1 -1
  86. package/dist/packem_shared/manifests-B0fMp872.js +1 -0
  87. package/dist/packem_shared/min-release-age-BFozFonQ.js +34 -0
  88. package/dist/packem_shared/native-config-sync-Dvi1g2nQ.js +21 -0
  89. package/dist/packem_shared/registry-keys-CewRFW0e.js +1 -0
  90. package/dist/packem_shared/resolve-explicit-CC4Kifk5.js +5 -0
  91. package/dist/packem_shared/{run-summary-utils-CJv75pla.js → run-summary-utils-BaBGP3bo.js} +1 -1
  92. package/dist/packem_shared/{runtime-check-CBU6W8qG.js → runtime-check-BusAwPb2.js} +1 -1
  93. package/dist/packem_shared/scan-progress-CMynp3eA.js +2 -0
  94. package/dist/packem_shared/signatures-5ZdjJ2Pu.js +2 -0
  95. package/dist/packem_shared/{toolchain-B7dckBQ1.js → toolchain-Cc3cwyLP.js} +3 -3
  96. package/dist/packem_shared/typosquats-BCeR-sLf.js +1 -0
  97. package/dist/packem_shared/verify-07kUNTuP.js +1 -0
  98. package/dist/packem_shared/{vis-update-app-D0uL3eO5.js → vis-update-app-CFrlJ3mW.js} +1 -1
  99. package/index.d.ts +358 -0
  100. package/index.js +56 -53
  101. package/package.json +14 -13
  102. package/schemas/vis-config.schema.json +595 -100
  103. package/dist/packem_shared/applyDefaults-DLY94gWA.js +0 -1
  104. package/dist/packem_shared/dependency-scan-YdgNVvoz.js +0 -2
  105. package/dist/packem_shared/readTomlSync-1fKo0R52-DtxWULlF.js +0 -109
  106. package/dist/packem_shared/typosquats-B3A38-qx.js +0 -1
  107. package/dist/packem_shared/verify-WDStBFvK.js +0 -1
@@ -1 +0,0 @@
1
- import{createRequire as e}from"node:module";import{p as l,O as p,k as d,l as u,r as _,i as c,j as g,I as m,X as C,e as T}from"../packem_chunks/config.js";import"jiti";import{otelPlugin as j}from"./otelPlugin-CJR2T_lk.js";import{definePlugin as S}from"./definePlugin-CWm4Dv_t.js";const n=e(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process;export{l as CONFIG_FILES,p as SECURITY_DEFAULTS,d as TASK_CONFIG_FILES,u as applyDefaults,_ as defineConfig,S as definePlugin,c as defineTaskConfig,g as findVisConfigFile,m as findVisTaskConfigFile,C as loadVisConfig,T as loadVisTaskConfig,j as otelPlugin};
@@ -1,2 +0,0 @@
1
- var j=Object.defineProperty;var b=(t,e)=>j(t,"name",{value:e,configurable:!0});import{e as E,aE as h,E as w,c as M,d as O,s as R}from"../packem_chunks/bin.js";import{render as A}from"@visulima/tui";import k from"react";import{jsx as i,jsxs as v}from"react/jsx-runtime";import{Box as g}from"@visulima/tui/components/box";import{Spinner as I}from"@visulima/tui/components/spinner";import{Text as f}from"@visulima/tui/components/text";import{D as S,W as Y,T as B,C as G}from"./symbols-CQmER5MT.js";import{$ as T,M as D}from"../packem_chunks/config.js";import{F as P}from"./lockfile-i-qvq_k8.js";var N=Object.defineProperty,W=b((t,e)=>N(t,"name",{value:e,configurable:!0}),"l$1");const $=W(({rows:t})=>i(g,{flexDirection:"column",children:t.map(e=>{let r;switch(e.status){case"error":{r=i(f,{color:"red",children:G});break}case"ok":{r=i(f,{color:"green",children:B});break}case"running":{r=i(f,{color:"white",children:i(I,{type:"dots"})});break}case"warn":{r=i(f,{color:"yellow",children:Y});break}default:{r=i(f,{dimColor:!0,children:S});break}}return v(g,{children:[i(g,{width:3,children:r}),i(g,{flexGrow:1,children:i(f,{children:e.label})}),e.summary?i(g,{children:v(f,{dimColor:!0,children:[S," ",e.summary]})}):null]},e.id)})}),"ScanProgressApp");var z=Object.defineProperty,l=b((t,e)=>z(t,"name",{value:e,configurable:!0}),"e");const F={error:O(h.failure),ok:M(h.success),pending:w(h.dash),skip:w(h.dash),warn:E(h.warning)},H=l((t,e,r)=>{const m=r?`${t} ${w(`— ${r}`)}`:t;return` ${F[e]} ${m}
2
- `},"formatStaticRow"),te=l((t,e={})=>{const r=e.stream??process.stderr,m=typeof r.isTTY=="boolean"&&r.isTTY&&!R,u=e.live??m,n=new Map;for(const o of t)n.set(o.id,{id:o.id,label:o.label,status:"pending"});if(!u||t.length===0)return{finish:l((o,c,y)=>{const d=n.get(o);d&&(n.set(o,{...d,status:c,summary:y}),r.write(H(d.label,c,y)))},"finish"),start:l(o=>{const c=n.get(o);c&&n.set(o,{...c,status:"running"})},"start"),stop:l(()=>{},"stop")};const p=l(()=>t.map(o=>n.get(o.id)),"buildRows");let s=A(k.createElement($,{rows:p()}),{interactive:!0,patchConsole:!1});const a=l(()=>{s?.rerender(k.createElement($,{rows:p()}))},"rerender");return{finish:l((o,c,y)=>{const d=n.get(o);d&&(n.set(o,{...d,status:c,summary:y}),a())},"finish"),start:l(o=>{const c=n.get(o);c&&(n.set(o,{...c,status:"running"}),a())},"start"),stop:l(()=>{s&&(a(),s.unmount(),s=void 0)},"stop")}},"startScanProgress");var K=Object.defineProperty,x=b((t,e)=>K(t,"name",{value:e,configurable:!0}),"l");const C={bun:{file:"bun.lock",type:"bun"},npm:{file:"package-lock.json",type:"npm"},pnpm:{file:"pnpm-lock.yaml",type:"pnpm"},yarn:{file:"yarn.lock",type:"yarn"}},ne=x((t,e)=>{const r=C[e];if(!r)return[];let m;try{m=T(D(t,r.file))}catch{return[]}const u=P(m,r.type);if(u.length===0)return[];const n=new Set,p=[];for(const s of u){const a=`${s.name}@${s.version}`;n.has(a)||(n.add(a),p.push({isDev:!1,name:s.name,version:s.version}))}return p},"lockedPackages"),se=x((t,e)=>{const r=C[e];if(!r)return[];let m;try{m=T(D(t,r.file))}catch{return[]}const u=P(m,r.type);if(u.length===0)return[];const n=new Map;for(const s of u)n.has(s.name)||n.set(s.name,new Set),n.get(s.name).add(s.version);const p=[];for(const[s,a]of n)a.size<=1||p.push({name:s,versions:[...a]});return p.sort((s,a)=>s.name.localeCompare(a.name))},"findDuplicateDependencies");export{se as f,ne as l,te as s};
@@ -1,109 +0,0 @@
1
- var X=Object.defineProperty;var s=(e,t)=>X(e,"name",{value:t,configurable:!0});import{$ as Y}from"../packem_chunks/config.js";var ee=Object.defineProperty,A=s((e,t)=>ee(e,"name",{value:t,configurable:!0}),"i");/*!
2
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3
- * SPDX-License-Identifier: BSD-3-Clause
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions are met:
7
- *
8
- * 1. Redistributions of source code must retain the above copyright notice, this
9
- * list of conditions and the following disclaimer.
10
- * 2. Redistributions in binary form must reproduce the above copyright notice,
11
- * this list of conditions and the following disclaimer in the
12
- * documentation and/or other materials provided with the distribution.
13
- * 3. Neither the name of the copyright holder nor the names of its contributors
14
- * may be used to endorse or promote products derived from this software without
15
- * specific prior written permission.
16
- *
17
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
- */function C(e,t){let r=e.slice(0,t).split(/\r\n|\n|\r/g);return[r.length,r.pop().length+1]}s(C,"d$2");A(C,"getLineColFromPtr");function D(e,t,r){let n=e.split(/\r\n|\n|\r/g),o="",l=(Math.log10(t+1)|0)+1;for(let i=t-1;i<=t+1;i++){let a=n[i-1];a&&(o+=i.toString().padEnd(l," "),o+=": ",o+=a,o+=`
28
- `,i===t&&(o+=" ".repeat(l+r+2),o+=`^
29
- `))}return o}s(D,"m$3");A(D,"makeCodeBlock");class c extends Error{static{s(this,"TomlError")}static{A(this,"TomlError")}line;column;codeblock;constructor(t,r){const[n,o]=C(r.toml,r.ptr),l=D(r.toml,n,o);super(`Invalid TOML document: ${t}
30
-
31
- ${l}`,r),this.line=n,this.column=o,this.codeblock=l}}var te=Object.defineProperty,g=s((e,t)=>te(e,"name",{value:t,configurable:!0}),"e");function V(e,t){let r=0;for(;e[t-++r]==="\\";);return--r&&r%2}s(V,"h$4");g(V,"isEscaped");function x(e,t=0,r=e.length){let n=e.indexOf(`
32
- `,t);return e[n-1]==="\r"&&n--,n<=r?n:-1}s(x,"indexOfNewline");g(x,"indexOfNewline");function v(e,t){for(let r=t;r<e.length;r++){let n=e[r];if(n===`
33
- `)return r;if(n==="\r"&&e[r+1]===`
34
- `)return r+1;if(n<" "&&n!==" "||n==="")throw new c("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}s(v,"skipComment");g(v,"skipComment");function h(e,t,r,n){let o;for(;;){for(;(o=e[t])===" "||o===" "||!r&&(o===`
35
- `||o==="\r"&&e[t+1]===`
36
- `);)t++;if(n||o!=="#")break;t=v(e,t)}return t}s(h,"skipVoid");g(h,"skipVoid");function z(e,t,r,n,o=!1){if(!n)return t=x(e,t),t<0?e.length:t;for(let l=t;l<e.length;l++){let i=e[l];if(i==="#")l=x(e,l);else{if(i===r)return l+1;if(i===n||o&&(i===`
37
- `||i==="\r"&&e[l+1]===`
38
- `))return l}}throw new c("cannot find end of structure",{toml:e,ptr:t})}s(z,"skipUntil");g(z,"skipUntil");function P(e,t){let r=e[t],n=r===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):r;t+=n.length-1;do t=e.indexOf(n,++t);while(t>-1&&r!=="'"&&V(e,t));return t>-1&&(t+=n.length,n.length>1&&(e[t]===r&&t++,e[t]===r&&t++)),t}s(P,"getStringEnd");g(P,"getStringEnd");var re=Object.defineProperty,ne=s((e,t)=>re(e,"name",{value:t,configurable:!0}),"l$1");/*!
39
- * Copyright (c) Squirrel Chat et al., All rights reserved.
40
- * SPDX-License-Identifier: BSD-3-Clause
41
- *
42
- * Redistribution and use in source and binary forms, with or without
43
- * modification, are permitted provided that the following conditions are met:
44
- *
45
- * 1. Redistributions of source code must retain the above copyright notice, this
46
- * list of conditions and the following disclaimer.
47
- * 2. Redistributions in binary form must reproduce the above copyright notice,
48
- * this list of conditions and the following disclaimer in the
49
- * documentation and/or other materials provided with the distribution.
50
- * 3. Neither the name of the copyright holder nor the names of its contributors
51
- * may be used to endorse or promote products derived from this software without
52
- * specific prior written permission.
53
- *
54
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
55
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
56
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
57
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
58
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
59
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
60
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
61
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
62
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
63
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64
- */let ie=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;class w extends Date{static{s(this,"TomlDate")}static{ne(this,"TomlDate")}#t=!1;#r=!1;#e=null;constructor(t){let r=!0,n=!0,o="Z";if(typeof t=="string"){let l=t.match(ie);l?(l[1]||(r=!1,t=`0000-01-01T${t}`),n=!!l[2],n&&t[10]===" "&&(t=t.replace(" ","T")),l[2]&&+l[2]>23?t="":(o=l[3]||null,t=t.toUpperCase(),!o&&n&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=r,this.#r=n,this.#e=o)}isDateTime(){return this.#t&&this.#r}isLocal(){return!this.#t||!this.#r||!this.#e}isDate(){return this.#t&&!this.#r}isTime(){return this.#r&&!this.#t}isValid(){return this.#t||this.#r}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(this.#e===null)return t.slice(0,-1);if(this.#e==="Z")return t;let r=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return r=this.#e[0]==="-"?r:-r,new Date(this.getTime()-r*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(t,r="Z"){let n=new w(t);return n.#e=r,n}static wrapAsLocalDateTime(t){let r=new w(t);return r.#e=null,r}static wrapAsLocalDate(t){let r=new w(t);return r.#r=!1,r.#e=null,r}static wrapAsLocalTime(t){let r=new w(t);return r.#t=!1,r.#e=null,r}}var le=Object.defineProperty,L=s((e,t)=>le(e,"name",{value:t,configurable:!0}),"w$1");let oe=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,ae=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,fe=/^[+-]?0[0-9_]/,ue=/^[0-9a-f]{2,8}$/i,I={b:"\b",t:" ",n:`
65
- `,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function N(e,t=0,r=e.length){let n=e[t]==="'",o=e[t++]===e[t]&&e[t]===e[t+1];o&&(r-=2,e[t+=2]==="\r"&&t++,e[t]===`
66
- `&&t++);let l=0,i,a="",u=t;for(;t<r-1;){let f=e[t++];if(f===`
67
- `||f==="\r"&&e[t]===`
68
- `){if(!o)throw new c("newlines are not allowed in strings",{toml:e,ptr:t-1})}else if(f<" "&&f!==" "||f==="")throw new c("control characters are not allowed in strings",{toml:e,ptr:t-1});if(i){if(i=!1,f==="x"||f==="u"||f==="U"){let d=e.slice(t,t+=f==="x"?2:f==="u"?4:8);if(!ue.test(d))throw new c("invalid unicode escape",{toml:e,ptr:l});try{a+=String.fromCodePoint(parseInt(d,16))}catch{throw new c("invalid unicode escape",{toml:e,ptr:l})}}else if(o&&(f===`
69
- `||f===" "||f===" "||f==="\r")){if(t=h(e,t-1,!0),e[t]!==`
70
- `&&e[t]!=="\r")throw new c("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:l});t=h(e,t)}else if(f in I)a+=I[f];else throw new c("unrecognized escape sequence",{toml:e,ptr:l});u=t}else!n&&f==="\\"&&(l=t-1,i=!0,a+=e.slice(u,l))}return a+e.slice(u,r-1)}s(N,"parseString");L(N,"parseString");function Z(e,t,r,n){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return n?0n:0;let o=oe.test(e);if(o||ae.test(e)){if(fe.test(e))throw new c("leading zeroes are not allowed",{toml:t,ptr:r});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new c("invalid number",{toml:t,ptr:r});if(o){if((o=!Number.isSafeInteger(i))&&!n)throw new c("integer value cannot be represented losslessly",{toml:t,ptr:r});(o||n===!0)&&(i=BigInt(e))}return i}const l=new w(e);if(!l.isValid())throw new c("invalid value",{toml:t,ptr:r});return l}s(Z,"parseValue");L(Z,"parseValue");var se=Object.defineProperty,F=s((e,t)=>se(e,"name",{value:t,configurable:!0}),"t$1");function B(e,t,r){let n=e.slice(t,r),o=n.indexOf("#");return o>-1&&(v(e,o),n=n.slice(0,o)),[n.trimEnd(),o]}s(B,"T$1");F(B,"sliceAndTrimEndOf");function j(e,t,r,n,o){if(n===0)throw new c("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let l=e[t];if(l==="["||l==="{"){let[u,f]=l==="["?K(e,t,n,o):U(e,t,n,o);if(r){if(f=h(e,f),e[f]===",")f++;else if(e[f]!==r)throw new c("expected comma or end of structure",{toml:e,ptr:f})}return[u,f]}let i;if(l==='"'||l==="'"){i=P(e,t);let u=N(e,t,i);if(r){if(i=h(e,i),e[i]&&e[i]!==","&&e[i]!==r&&e[i]!==`
71
- `&&e[i]!=="\r")throw new c("unexpected character encountered",{toml:e,ptr:i});i+=+(e[i]===",")}return[u,i]}i=z(e,t,",",r);let a=B(e,t,i-+(e[i-1]===","));if(!a[0])throw new c("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return r&&a[1]>-1&&(i=h(e,t+a[1]),i+=+(e[i]===",")),[Z(a[0],e,t,o),i]}s(j,"extractValue");F(j,"extractValue");var ce=Object.defineProperty,_=s((e,t)=>ce(e,"name",{value:t,configurable:!0}),"m$2");let de=/^[a-zA-Z0-9-_]+[ \t]*$/;function O(e,t,r="="){let n=t-1,o=[],l=e.indexOf(r,t);if(l<0)throw new c("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let i=e[t=++n];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===e[t+1]&&i===e[t+2])throw new c("multiline strings are not allowed in keys",{toml:e,ptr:t});let a=P(e,t);if(a<0)throw new c("unfinished string encountered",{toml:e,ptr:t});n=e.indexOf(".",a);let u=e.slice(a,n<0||n>l?l:n),f=x(u);if(f>-1)throw new c("newlines are not allowed in keys",{toml:e,ptr:t+n+f});if(u.trimStart())throw new c("found extra tokens after the string part",{toml:e,ptr:a});if(l<a&&(l=e.indexOf(r,a),l<0))throw new c("incomplete key-value: cannot find end of key",{toml:e,ptr:t});o.push(N(e,t,a))}else{n=e.indexOf(".",t);let a=e.slice(t,n<0||n>l?l:n);if(!de.test(a))throw new c("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});o.push(a.trimEnd())}}while(n+1&&n<l);return[o,h(e,l+1,!0,!0)]}s(O,"parseKey");_(O,"parseKey");function U(e,t,r,n){let o={},l=new Set,i;for(t++;(i=e[t++])!=="}"&&i;){if(i===",")throw new c("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=v(e,t);else if(i!==" "&&i!==" "&&i!==`
72
- `&&i!=="\r"){let a,u=o,f=!1,[d,m]=O(e,t-1);for(let $=0;$<d.length;$++){if($&&(u=f?u[a]:u[a]={}),a=d[$],(f=Object.hasOwn(u,a))&&(typeof u[a]!="object"||l.has(u[a])))throw new c("trying to redefine an already defined value",{toml:e,ptr:t});!f&&a==="__proto__"&&Object.defineProperty(u,a,{enumerable:!0,configurable:!0,writable:!0})}if(f)throw new c("trying to redefine an already defined value",{toml:e,ptr:t});let[y,W]=j(e,m,"}",r-1,n);l.add(y),u[a]=y,t=W}}if(!i)throw new c("unfinished table encountered",{toml:e,ptr:t});return[o,t]}s(U,"parseInlineTable");_(U,"parseInlineTable");function K(e,t,r,n){let o=[],l;for(t++;(l=e[t++])!=="]"&&l;){if(l===",")throw new c("expected value, found comma",{toml:e,ptr:t-1});if(l==="#")t=v(e,t);else if(l!==" "&&l!==" "&&l!==`
73
- `&&l!=="\r"){let i=j(e,t-1,"]",r-1,n);o.push(i[0]),t=i[1]}}if(!l)throw new c("unfinished array encountered",{toml:e,ptr:t});return[o,t]}s(K,"parseArray");_(K,"parseArray");var he=Object.defineProperty,M=s((e,t)=>he(e,"name",{value:t,configurable:!0}),"b$1");function E(e,t,r,n){let o=t,l=r,i,a=!1,u;for(let f=0;f<e.length;f++){if(f){if(o=a?o[i]:o[i]={},l=(u=l[i]).c,n===0&&(u.t===1||u.t===2))return null;if(u.t===2){let d=o.length-1;o=o[d],l=l[d].c}}if(i=e[f],(a=Object.hasOwn(o,i))&&l[i]?.t===0&&l[i]?.d)return null;a||(i==="__proto__"&&(Object.defineProperty(o,i,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(l,i,{enumerable:!0,configurable:!0,writable:!0})),l[i]={t:f<e.length-1&&n===2?3:n,d:!1,i:0,c:{}})}if(u=l[i],u.t!==n&&!(n===1&&u.t===3)||(n===2&&(u.d||(u.d=!0,o[i]=[]),o[i].push(o={}),u.c[u.i++]=u={t:1,d:!1,i:0,c:{}}),u.d))return null;if(u.d=!0,n===1)o=a?o[i]:o[i]={};else if(n===0&&a)return null;return[i,o,u.c]}s(E,"w");M(E,"peekTable");function q(e,{maxDepth:t=1e3,integersAsBigInt:r}={}){let n={},o={},l=n,i=o;for(let a=h(e,0);a<e.length;){if(e[a]==="["){let u=e[++a]==="[",f=O(e,a+=+u,"]");if(u){if(e[f[1]-1]!=="]")throw new c("expected end of table declaration",{toml:e,ptr:f[1]-1});f[1]++}let d=E(f[0],n,o,u?2:1);if(!d)throw new c("trying to redefine an already defined table or value",{toml:e,ptr:a});i=d[2],l=d[1],a=f[1]}else{let u=O(e,a),f=E(u[0],l,i,0);if(!f)throw new c("trying to redefine an already defined table or value",{toml:e,ptr:a});let d=j(e,u[1],void 0,t,r);f[1][f[0]]=d[0],a=d[1]}if(a=h(e,a,!0),e[a]&&e[a]!==`
74
- `&&e[a]!=="\r")throw new c("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=h(e,a)}return n}s(q,"parse");M(q,"parse");var pe=Object.defineProperty,p=s((e,t)=>pe(e,"name",{value:t,configurable:!0}),"l");/*!
75
- * Copyright (c) Squirrel Chat et al., All rights reserved.
76
- * SPDX-License-Identifier: BSD-3-Clause
77
- *
78
- * Redistribution and use in source and binary forms, with or without
79
- * modification, are permitted provided that the following conditions are met:
80
- *
81
- * 1. Redistributions of source code must retain the above copyright notice, this
82
- * list of conditions and the following disclaimer.
83
- * 2. Redistributions in binary form must reproduce the above copyright notice,
84
- * this list of conditions and the following disclaimer in the
85
- * documentation and/or other materials provided with the distribution.
86
- * 3. Neither the name of the copyright holder nor the names of its contributors
87
- * may be used to endorse or promote products derived from this software without
88
- * specific prior written permission.
89
- *
90
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
91
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
92
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
93
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
94
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
95
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
96
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
97
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
98
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
99
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
100
- */let J=/^[a-z0-9-_]+$/i;function b(e){let t=typeof e;if(t==="object"){if(Array.isArray(e))return"array";if(e instanceof Date)return"date"}return t}s(b,"g");p(b,"extendedTypeOf");function G(e){for(let t=0;t<e.length;t++)if(b(e[t])!=="object")return!1;return e.length!=0}s(G,"E");p(G,"isArrayOfTables");function T(e){return JSON.stringify(e).replace(/\x7f/g,"\\u007f")}s(T,"a$1");p(T,"formatString");function k(e,t,r,n){if(r===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(t==="number")return isNaN(e)?"nan":e===1/0?"inf":e===-1/0?"-inf":n&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t==="bigint"||t==="boolean")return e.toString();if(t==="string")return T(e);if(t==="date"){if(isNaN(e.getTime()))throw new TypeError("cannot serialize invalid date");return e.toISOString()}if(t==="object")return H(e,r,n);if(t==="array")return Q(e,r,n)}s(k,"d$1");p(k,"stringifyValue");function H(e,t,r){let n=Object.keys(e);if(n.length===0)return"{}";let o="{ ";for(let l=0;l<n.length;l++){let i=n[l];l&&(o+=", "),o+=J.test(i)?i:T(i),o+=" = ",o+=k(e[i],b(e[i]),t-1,r)}return o+" }"}s(H,"b");p(H,"stringifyInlineTable");function Q(e,t,r){if(e.length===0)return"[]";let n="[ ";for(let o=0;o<e.length;o++){if(o&&(n+=", "),e[o]===null||e[o]===void 0)throw new TypeError("arrays cannot contain null or undefined values");n+=k(e[o],b(e[o]),t-1,r)}return n+" ]"}s(Q,"x");p(Q,"stringifyArray");function R(e,t,r,n){if(r===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let o="";for(let l=0;l<e.length;l++)o+=`${o&&`
101
- `}[[${t}]]
102
- `,o+=S(0,e[l],t,r,n);return o}s(R,"k");p(R,"stringifyArrayTable");function S(e,t,r,n,o){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let l="",i="",a=Object.keys(t);for(let u=0;u<a.length;u++){let f=a[u];if(t[f]!==null&&t[f]!==void 0){let d=b(t[f]);if(d==="symbol"||d==="function")throw new TypeError(`cannot serialize values of type '${d}'`);let m=J.test(f)?f:T(f);if(d==="array"&&G(t[f]))i+=(i&&`
103
- `)+R(t[f],r?`${r}.${m}`:m,n-1,o);else if(d==="object"){let y=r?`${r}.${m}`:m;i+=(i&&`
104
- `)+S(y,t[f],y,n-1,o)}else l+=m,l+=" = ",l+=k(t[f],d,n,o),l+=`
105
- `}}return e&&(l||!i)&&(l=l?`[${e}]
106
- ${l}`:`[${e}]`),l&&i?`${l}
107
- ${i}`:l||i}s(S,"h");p(S,"stringifyTable");function me(e,{maxDepth:t=1e3,numbersAsFloat:r=!1}={}){if(b(e)!=="object")throw new TypeError("stringify can only be called with an object");let n=S(0,e,"",t,r);return n[n.length-1]!==`
108
- `?n+`
109
- `:n}s(me,"stringify");p(me,"stringify");var we=Object.defineProperty,ge=s((e,t)=>we(e,"name",{value:t,configurable:!0}),"a"),be=Object.defineProperty,ye=ge((e,t)=>be(e,"name",{value:t,configurable:!0}),"t"),ve=Object.defineProperty,$e=ye((e,t)=>ve(e,"name",{value:t,configurable:!0}),"n");const je=$e((e,t)=>{const r=Y(e,{encoding:"utf8",...t});return q(r)},"readTomlSync");export{je as d};
@@ -1 +0,0 @@
1
- var q=Object.defineProperty;var l=(e,s)=>q(e,"name",{value:s,configurable:!0});import{createRequire as $}from"node:module";import{aH as M,p as i,d as b,e as k}from"../packem_chunks/bin.js";import{M as C,a as D,n as A}from"../packem_chunks/config.js";const z=$(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=l(e=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[s,r]=m.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return m.getBuiltinModule(e)}return z(e)},"__cjs_getBuiltinModule"),{createInterface:T}=_("node:readline");var O=["aj","aju","av","avj","ejv","jav","jv"],F=["angula","angular-node","angularjs"],N=["auto-prefixer"],P=["aaxios","aios","axio","axioos","axios-node","axioss","axis","axiso","axois","axos","axxios"],B=["abel","babbel","babe","babel-js","babel-node","babl","bable","bbael","bebel"],R=["bcrpyt","bcrypt-node","brcypt","crypt","dcrypt"],S=["bcryptjs-node","dcryptjs"],W=["bunan","bunya","bunyan-node","buynan"],L=["cai","cha","chaijs","chal","chi","chia","hai"],E=["cahlk","calk","cchalk","ch4lk","cha1k","chaalk","chaik","chak","chakl","chalk-node","chalkk","challk","chhalk","chlak","chlk","halk","hcalk"],U=["cheero","cherio"],V=["c0lor","ccolor","clor","colo","coloor","color-js","colorjs","colorr","colr","coolor","coolr"],H=["ccolors","colors-node","colorss","colorz","colrs","coolors"],I=["c0mmander","ccommander","cmmander","cmomander","co-mmander","comamnder","comander","comm4nder","commaander","commader","commadner","commamder","command3r","commandder","commande","commandeer","commander-js","commanderr","commandr","commandre","commanedr","commaner","commannder","commender","commmander","commnader","commnder","coommander","ocmmander","ommander"],J=["cor","corss","cos","cosr","cros","crs","ors"],Y=["days"],G=["d3bug","dbeug","dbug","ddebug","debbug","debg","debgu","debu","debu9","debug-js","debug-node","debugg","debugjs","debuug","deebug","deubg","deug","ebug","edbug"],K=["dot-env","dotenv-node","dotenvjs","dotevn"],Q=["3lectron","eectron","eelctron","eelectron","el3ctron","elcetron","elctron","elecctron","elecron","elecrton","electon","electorn","electr0n","electrn","electrno","electro","electrom","electron-node","electronn","electroon","electrron","electtron","eleectron","eletcron","eletron","ellectron","lectron","leectron"],X=["asbuild","ebuild","esbuild-node","esbuildjs","ezbuild","sbuild"],Z=["aslint","elint","eslint-js","eslint-node","eslit","ezlint","slint"],ee=["eexpress","epress","epxress","experss","expess","exppress","expreess","expres","express-node","expressjs","expresss","exprress","exprses","exprss","exress","exrpess","exxpress","xepress","xpress"],oe=["astify"],se=["firebasejs"],re=["form1dable"],ae=["glb","glo","glob-js","globjs","gob","golb","lob"],te=["go","goot","gotjs","gott","gt","gto","ogt","ot","qot"],ne=["helmetjs","helnet"],ce=["homo","hon","hoo","hoon","ohno","ono"],ie=["inquire","inquirer-js","nquirer"],de=["iredis"],me=["ejst","est","jast","jes","jestjs","jestt","jet","jets","jst"],le=["imp","jim","jip","jmp"],pe=["ji","jio","jo","joii","jol","oi","oji"],ue=["jdom","jsdm","jsdo","jsdom-js","jsdon","jsom","sdom"],ve=["jsonwebtoken-js","jsonwebtoken-node"],he=["ka","kao","ko","koaa","koajs","koe","oa","oka"],je=["1odash","iodash","l0dash","ldash","ldoash","llodash","lo-dash","loadsh","loash","lobash","lod4sh","lodaash","lodah","lodahs","lodas","lodash-node","lodashh","lodassh","loddash","lodesh","lodsah","lodsh","loodash","odash","oldash"],be=["luca","luci","lucie"],ke=["luon","luxo","luxon-js"],ge=["imcromatch","mciromatch","micormatch","micrmoatch","micro-match","microamtch","micromacth","micromathc","micromtach","mircomatch"],fe=["minimath"],ye=["mcha","mmocha","moca","moch","mocha-js","moha","nocha","ocha"],xe=["m0ment","mment","mmoent","mmoment","moemnt","moent","mom3nt","momeent","momemt","momen","momen7","momennt","moment-js","momentjs","momentt","momet","mometn","momment","momnet","momnt","monent","mooment","oment","omment"],we=["mognoose","mogoose","mongoos","mongose","monqoose","moongoose"],qe=["moran","organ"],$e=["muler","multer-js","muter"],ze=["mysql"],_e=["ext","mext","n3xt","naxt","net","netx","nex","next-js","next-node","nextjs","nxt"],Te=["node-mailer","nodemailer-js"],Me=["nodemo","nodemonjs","nodmeon"],Ce=["oar","or","ora-node","ore","ra","roa"],De=["arcel","parce","parceljs"],Ae=["passport-js"],Oe=["phase","phaser-node"],Fe=["ino","pimo","pin","pino-node","pinojs","pio","pion"],Ne=["playright","playwright-js"],Pe=["postcss-js","postcss-node","potscss"],Be=["pettier","pprettier","pretier","prettierjs","prettierr","prtetier"],Re=["prima","prism","prisma-js","prismajs","prizma"],Se=["pupeteer"],We=["rada","rama","ramd","randa"],Le=["eact","eract","r3act","raact","ract","raect","re4ct","reaact","reac","reac7","reacct","react-node","reactjs","reactt","reat","reatc","recat","rect","reeact","reect","rreact"],Ee=["erdis","radis","rdis","redi","redis-js","redis-node","rediss","rediz","reds","reis","rredis"],Ue=["resen","rsend"],Ve=["ollup","rollup-js","rollup-node"],He=["ass","asss","sas","sass-node","sess","ssas","sss"],Ie=["emver","seemver","semver-node","semvre","senver","sever"],Je=["sequelize-js","sequelize-node"],Ye=["harp","shap","shar","sharp-js","sharpjs"],Ge=["stipe","strip","stripe-node","tripe"],Ke=["supabase-js"],Qe=["suelte","svelt3","svelte-js","sveltejs","velte"],Xe=["tailwindcss-js"],Ze=["auri","taui"],eo=["hree","htree","thee","there","three-js","three-node","tree"],oo=["stx","sx","ts","tsxx","ttsx","tx","txs","tzx"],so=["ttypescript","typecript","typescipt","typescript-node","typescriptjs","typescrit","typescritp"],ro=["udnerscore","undercore","underscoer","underscore-node","underscroe","undersocre","undesrcore"],ao=["uid","uud","uudi","uui","uuid-js","uuid-node","uuidjs","vuid"],to=["ite","vie","vit","vita","vite-node","vitee","vlte","vte"],no=["itest","uitest","vitestjs","vitezt","vittest","vtest"],co=["ue","uue","uve","ve","veu","vu","vu3","vua","vue-node","vuee","vuejs","vuue","vve","vvue"],io=["web-pack","weback","webpac","webpack-node","webpackjs","webpak","weebpack","wepack","wepback"],mo=["winson","winston-js","winstoon"],lo=["up","uyp","yp","yu","yupjs","yupp"],po=["od","zd","zdo","zo","zob","zod-js","zodjs"];const uo={ajv:O,angular:F,autoprefixer:N,"aws-sdk":["awssdk","ews-sdk"],axios:P,babel:B,bcrypt:R,bcryptjs:S,"body-parser":["body-paresr","body-parse","body-parser-js","body_parser"],bunyan:W,chai:L,chalk:E,cheerio:U,color:V,colors:H,commander:I,"cookie-parser":["cookie-parse","cookieparser"],cors:J,"cross-env":["crossenv"],"date-fns":["data-fns","date-fn"],dayjs:Y,debug:G,dotenv:K,electron:Q,esbuild:X,eslint:Z,express:ee,fastify:oe,firebase:se,formidable:re,glob:ae,got:te,helmet:ne,hono:ce,inquirer:ie,ioredis:de,jest:me,jimp:le,joi:pe,jsdom:ue,jsonwebtoken:ve,koa:he,lodash:je,lucia:be,luxon:ke,micromatch:ge,minimatch:fe,mocha:ye,moment:xe,mongoose:we,morgan:qe,multer:$e,mysql2:ze,next:_e,"node-fetch":["node-fecth","node-fethc","node.fetch"],nodemailer:Te,nodemon:Me,ora:Ce,parcel:De,passport:Ae,phaser:Oe,pino:Fe,playwright:Ne,postcss:Pe,prettier:Be,prisma:Re,puppeteer:Se,ramda:We,react:Le,"react-dom":["eact-dom","eract-dom","r3act-dom","ract-dom","raect-dom","re4ct-dom","reaact-dom","reac-dom","reac7-dom","reacct-dom","react-bom","react-d0m","react-ddom","react-dm","react-dmo","react-do","react-domm","react-don","react-doom","react-odm","react-om","react.dom","reactdom","reactt-dom","reat-dom","reatc-dom","recat-dom","rect-dom","reeact-dom","rreact-dom"],redis:Ee,resend:Ue,rollup:Ve,sass:He,semver:Ie,sequelize:Je,sharp:Ye,"socket.io":["ocket.io","oscket.io","scket.io","scoket.io","soccket.io","socekt.io","socet.io","sock3t.io","socke.io","socke7.io","sockeet.io","socket.1o","socket.i","socket.iio","socket.ioo","socket.lo","socket.o","socket.oi","sockett.io","sockket.io","sockt.io","sockte.io","sokcet.io","soket.io","soocket.io","ssocket.io"],stripe:Ge,supabase:Ke,svelte:Qe,tailwindcss:Xe,tauri:Ze,three:eo,"ts-node":["tts-node"],tsx:oo,typescript:so,underscore:ro,uuid:ao,vite:to,vitest:no,vue:co,webpack:io,winston:mo,yup:lo,zod:po};var v,g;function vo(){return g||(g=1,v={"@tanstack/start":["start-tanstack-app","tanstack","tanstack-app","tanstack-start"]}),v}l(vo,"requireTyposquatsManual");var ho=vo();const jo=M(ho);var bo=Object.defineProperty,n=l((e,s)=>bo(e,"name",{value:s,configurable:!0}),"c");const ko={a:["4","e"],b:["d"],d:["b"],e:["3","a"],g:["9","q"],i:["1","l"],l:["1","i"],m:["n"],n:["m"],o:["0"],s:["5","z"],t:["7"],u:["v"],v:["u"]},go=["app","cli","core","kit","lib","pkg","sdk"],fo=n(e=>{const s=new Set;if(e.length<3)return s;for(let o=0;o<e.length;o++){const a=e[o],t=a==="-"||a==="."||a==="_";if(t||s.add(e.slice(0,o)+e.slice(o+1)),t||s.add(e.slice(0,o)+a+e.slice(o)),o<e.length-1&&e[o]!==e[o+1]){const u=e[o+1]==="-"||e[o+1]==="."||e[o+1]==="_";if(!t&&!u){const d=[...e];[d[o],d[o+1]]=[d[o+1],d[o]],s.add(d.join(""))}}const c=e[o].toLowerCase(),j=ko[c];if(j)for(const u of j)s.add(e.slice(0,o)+u+e.slice(o+1))}const r=/[-._]/g;if(r.test(e))s.add(e.replaceAll(r,"")),s.add(e.replaceAll(r,"-")),s.add(e.replaceAll(r,".")),s.add(e.replaceAll(r,"_"));else if(e.length>5)for(let o=2;o<e.length-2;o++)s.add(`${e.slice(0,o)}-${e.slice(o)}`),s.add(`${e.slice(0,o)}.${e.slice(o)}`),s.add(`${e.slice(0,o)}_${e.slice(o)}`);if(e.startsWith("@")||(s.add(`${e}-js`),s.add(`${e}js`),s.add(`${e}-node`)),e.startsWith("@")){const o=e.indexOf("/");if(o>1&&o<e.length-1){const a=e.slice(1,o),t=e.slice(o+1);a.length>=3&&s.add(a);for(const c of["","-",".","_"])s.add(`${a}${c}${t}`),s.add(`${t}${c}${a}`);for(const c of go)s.add(`${a}-${c}`),s.add(`${t}-${a}-${c}`),s.add(`${c}-${a}-${t}`)}}return s.delete(e),s},"generateVariants");let h,p;const f=n(()=>{if(!h){const e={};for(const s of[uo,jo])for(const[r,o]of Object.entries(s)){const a=e[r]??(e[r]=[]);for(const t of o)a.includes(t)||a.push(t)}h=e}return h},"loadBlocklist"),yo=n(()=>{if(!p){p=new Map;for(const[e,s]of Object.entries(f()))for(const r of s)p.set(r,e)}return p},"getReverseLookup"),xo=n(e=>e.startsWith("@")?e.split("/")[1]??e:e,"bareName"),wo=n(e=>{const s=xo(e),r=yo().get(s);if(r)return{input:e,legitimate:r,method:"blocklist"};for(const o of Object.keys(f()))if(fo(o).has(s))return{input:e,legitimate:o,method:"heuristic"}},"checkTyposquat"),y=n((e,s)=>{const r=s?new Set(s):void 0,o=[];for(const a of e){if(r?.has(a))continue;const t=wo(a);t&&o.push(t)}return o},"checkTyposquats"),x=n((e,s)=>{i.warn(""),i.warn(b(`Possible typosquat${e.length===1?"":"s"} ${s}:`));for(const r of e){const o=r.method==="blocklist"?"known typosquat":"similar name";i.warn(` ${k("⚠")} ${b(r.input)} — did you mean ${k(r.legitimate)}? (${o})`)}i.warn("")},"printTyposquatWarnings"),w=n(async e=>{if(!process.stdin.isTTY){i.warn("Aborting: potential typosquat detected in non-interactive mode. Use --no-typosquat-check to skip.");return}const s=T({input:process.stdin,output:process.stdout}),r=await new Promise(o=>{s.question(e,a=>{o(a.trim().toLowerCase())})});return s.close(),r},"askConfirmation"),Do=n(async(e,s)=>{const r=y(e,s);if(r.length===0)return{ok:!0,packages:e};x(r,"detected");const o=await w(`Use suggested package${r.length===1?"":"s"} instead? [S]uggested / [y]es, keep original / [N]o, abort (default: N) `);if(o===void 0)return{ok:!1,packages:e};if(o==="s"||o==="suggested"){const a=new Map(r.map(t=>[t.input,t.legitimate]));return{ok:!0,packages:e.map(t=>a.get(t)??t)}}return o==="y"||o==="yes"?{ok:!0,packages:e}:{ok:!1,packages:e}},"runTyposquatCheck"),qo=/^(?:npm|pnpm|yarn):(.+?)(?:@.*)?$/,$o=n(e=>qo.exec(e)?.[1],"parseAliasTarget"),zo=n(e=>{if(!D(e))return[];const s=A(e),r={...s.dependencies,...s.devDependencies,...s.optionalDependencies,...s.peerDependencies},o=new Set;for(const[a,t]of Object.entries(r)){o.add(a);const c=$o(t);c&&o.add(c)}return[...o]},"readDepsFromPackageJson"),Ao=n(async(e,s)=>{const r=C(e,"package.json"),o=zo(r);if(o.length===0)return!0;const a=y(o,s);if(a.length===0)return!0;x(a,"in package.json dependencies"),i.warn("Fix the package name in package.json before proceeding.");const t=await w("Continue anyway? [y/N] ");return t==="y"||t==="yes"},"scanDepsForTyposquats");export{Do as r,Ao as s};
@@ -1 +0,0 @@
1
- var u=Object.defineProperty;var g=(n,s)=>u(n,"name",{value:s,configurable:!0});import{createRequire as m}from"node:module";import{M as i,a,$ as f}from"../packem_chunks/config.js";import{u as $}from"../packem_chunks/bin.js";const j=m(import.meta.url),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=g(n=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[s,o]=k.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return k.getBuiltinModule(n)}return j(n)},"__cjs_getBuiltinModule"),{readdirSync:v}=b("node:fs");var w=Object.defineProperty,l=g((n,s)=>w(n,"name",{value:s,configurable:!0}),"o");const _=[".husky/pre-commit",".vis-hooks/pre-commit",".git/hooks/pre-commit"],D=[".secretlintrc",".secretlintrc.json",".secretlintrc.js",".secretlintrc.mjs",".secretlintrc.cjs",".secretlintrc.yml",".secretlintrc.yaml"],S=[".syncpackrc",".syncpackrc.json",".syncpackrc.yaml",".syncpackrc.yml",".syncpackrc.cjs",".syncpackrc.js",".syncpackrc.mjs",".syncpackrc.ts","syncpack.config.cjs","syncpack.config.js","syncpack.config.mjs","syncpack.config.ts"],M=l(n=>{const s=i(n,"package.json");if(!a(s))return[];let o;try{o=JSON.parse(f(s))}catch{return[]}const e=[];if(o.scripts)for(const[t,c]of Object.entries(o.scripts))typeof c=="string"&&(/\bgitleaks\b/.test(c)&&e.push({detail:`Script "${t}" still invokes gitleaks: ${c}`,kind:"script",location:"package.json",tool:"gitleaks"}),/\bsecretlint\b/.test(c)&&e.push({detail:`Script "${t}" still invokes secretlint: ${c}`,kind:"script",location:"package.json",tool:"secretlint"}),/\bsyncpack\b/.test(c)&&e.push({detail:`Script "${t}" still invokes syncpack: ${c}`,kind:"script",location:"package.json",tool:"syncpack"}),/\bsherif\b/.test(c)&&e.push({detail:`Script "${t}" still invokes sherif: ${c}`,kind:"script",location:"package.json",tool:"sherif"}));if(o.devDependencies)for(const t of Object.keys(o.devDependencies))(t==="gitleaks"||t==="@gitleaks/cli")&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"gitleaks"}),(t==="secretlint"||t.startsWith("@secretlint/"))&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"secretlint"}),t==="syncpack"&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"syncpack"}),t==="sherif"&&e.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"sherif"});return o.sherif&&e.push({detail:"`sherif` config block still present in package.json",kind:"config",location:"package.json",tool:"sherif"}),e},"scanPackageJson"),O=l(n=>{const s=[];for(const o of _){const e=i(n,o);if(!a(e))continue;const t=f(e);/\bgitleaks\b/.test(t)&&s.push({detail:"gitleaks invocation still present in hook",kind:"hook",location:o,tool:"gitleaks"}),/\bsecretlint\b/.test(t)&&s.push({detail:"secretlint invocation still present in hook",kind:"hook",location:o,tool:"secretlint"}),/\bsyncpack\b/.test(t)&&s.push({detail:"syncpack invocation still present in hook",kind:"hook",location:o,tool:"syncpack"}),/\bsherif\b/.test(t)&&s.push({detail:"sherif invocation still present in hook",kind:"hook",location:o,tool:"sherif"})}return s},"scanHooks"),C=l(n=>{const s=[];for(const o of D)a(i(n,o))&&s.push({detail:"secretlint config should be removed after migration",kind:"config",location:o,tool:"secretlint"});for(const o of S)a(i(n,o))&&s.push({detail:"syncpack config should be removed after migration",kind:"config",location:o,tool:"syncpack"});return s},"scanConfigs"),N=[".github/workflows",".gitlab-ci.yml",".circleci/config.yml",".woodpecker.yml",".drone.yml"],q=l(n=>{const s=[],o=l(e=>{const t=i(n,e);if(!a(t))return;const c=f(t);/\bsyncpack\b/.test(c)&&s.push({detail:"syncpack invocation still present in CI",kind:"ci",location:e,tool:"syncpack"}),/\bsherif\b/.test(c)&&s.push({detail:"sherif invocation still present in CI",kind:"ci",location:e,tool:"sherif"})},"scanFile");for(const e of N){const t=i(n,e);if(a(t)){if(e===".github/workflows"){try{for(const c of v(t))(c.endsWith(".yml")||c.endsWith(".yaml"))&&o(`.github/workflows/${c}`)}catch{}continue}o(e)}}return s},"scanCi"),I=l(n=>{const s=[],o=i(n,"pnpm-workspace.yaml");if(a(o)){let t;try{t=$(o)}catch{t=void 0}if(t&&typeof t=="object"){const c=t.catalog;c&&typeof c.syncpack=="string"&&s.push({detail:"`syncpack` still listed in pnpm-workspace.yaml#catalog",kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"});const r=t.catalogs;if(r&&typeof r=="object")for(const[d,p]of Object.entries(r))p&&typeof p.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in pnpm-workspace.yaml#catalogs.${d}`,kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"})}}const e=i(n,"package.json");if(a(e)){let t;try{t=JSON.parse(f(e))}catch{return s}const c=t.workspaces;if(c&&typeof c=="object"&&!Array.isArray(c)){const d=c.catalog;d&&typeof d.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#workspaces.catalog",kind:"catalog",location:"package.json",tool:"syncpack"});const p=c.catalogs;if(p&&typeof p=="object")for(const[h,y]of Object.entries(p))y&&typeof y.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in package.json#workspaces.catalogs.${h}`,kind:"catalog",location:"package.json",tool:"syncpack"})}const r=t.catalog;r&&typeof r.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#catalog",kind:"catalog",location:"package.json",tool:"syncpack"})}return s},"scanCatalogs"),J=l(n=>[...M(n),...O(n),...C(n),...q(n),...I(n)],"scanMigrationLeftovers"),B=l((n,s)=>{const o=J(n);if(o.length===0)return s.info("✓ No unmigrated gitleaks/secretlint/sherif/syncpack references found."),[];s.warn(`Found ${String(o.length)} unmigrated reference(s):`);for(const e of o)s.warn(` [${e.kind}] ${e.location} — ${e.detail}`);return o},"verifyMigration");export{J as s,B as v};