@visulima/vis 1.0.0-alpha.43 → 1.0.0-alpha.45
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 +78 -0
- package/LICENSE.md +256 -0
- package/bin/resolve-binary.mjs +85 -0
- package/bin/vis.mjs +76 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +1 -2
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/CONFIG_FILES.js +1 -1
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog.js +63 -62
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +173 -973
- package/dist/packem_chunks/detect.js +1 -1
- package/dist/packem_chunks/dispatch.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +2 -2
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +13 -4
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler5.js +3 -3
- package/dist/packem_chunks/handler50.js +4 -4
- package/dist/packem_chunks/handler51.js +3 -3
- package/dist/packem_chunks/handler53.js +1 -1
- package/dist/packem_chunks/handler54.js +2 -2
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler57.js +4 -4
- package/dist/packem_chunks/handler58.js +1 -1
- package/dist/packem_chunks/handler59.js +2 -2
- package/dist/packem_chunks/handler6.js +6 -6
- package/dist/packem_chunks/handler60.js +18 -18
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +3 -3
- package/dist/packem_chunks/handler63.js +4 -4
- package/dist/packem_chunks/handler65.js +2 -2
- package/dist/packem_chunks/handler66.js +15 -15
- package/dist/packem_chunks/handler67.js +5 -5
- package/dist/packem_chunks/handler68.js +16 -16
- package/dist/packem_chunks/handler69.js +5 -5
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +16 -17
- package/dist/packem_chunks/handler71.js +2 -2
- package/dist/packem_chunks/handler72.js +2 -2
- package/dist/packem_chunks/handler73.js +13 -13
- package/dist/packem_chunks/handler74.js +3 -3
- package/dist/packem_chunks/handler75.js +3 -3
- package/dist/packem_chunks/handler76.js +63 -63
- package/dist/packem_chunks/handler77.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index2.js +802 -7
- package/dist/packem_chunks/index3.js +7 -135
- package/dist/packem_chunks/index4.js +134 -73
- package/dist/packem_chunks/index5.js +74 -0
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/lean.js +3 -3
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/loader2.js +1 -1
- package/dist/packem_chunks/print-config.js +1 -1
- package/dist/packem_chunks/registry.js +2 -2
- package/dist/packem_chunks/shell-runner.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +2 -2
- package/dist/packem_chunks/ts-loader.js +22 -2
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_chunks/version-resolver.js +2 -2
- package/dist/packem_shared/{Table-CcVkyULl-DLWu6XHL.js → Table-BGIHvenQ-D2oJtNQj.js} +1 -1
- package/dist/packem_shared/affected-shas-CCxG4tvm.js +1 -0
- package/dist/packem_shared/{ai-analysis-Co-b15d_.js → ai-analysis-rC48NLfB.js} +5 -5
- package/dist/packem_shared/{ai-fix-DnJDgPN-.js → ai-fix-D_ijV3Rn.js} +3 -3
- package/dist/packem_shared/augment-DaSS2Lgs.js +4 -0
- package/dist/packem_shared/bin-CPMo34SM.js +1 -0
- package/dist/packem_shared/{build-scripts-Doxce2VM.js → build-scripts-MTSK6TNr.js} +1 -1
- package/dist/packem_shared/{command-runtime-RiCMa2C8.js → command-runtime-3FTGuUsK.js} +1 -1
- package/dist/packem_shared/{cyclonedx-BTBzGCBW.js → cyclonedx-BeUmPgfO.js} +1 -1
- package/dist/packem_shared/{dependency-scan-DEv-scN6.js → dependency-scan-DpOFiZuI.js} +1 -1
- package/dist/packem_shared/{docker-DKlF-gk3.js → docker-CViFYtmM.js} +1 -1
- package/dist/packem_shared/{env-XJzocuUP.js → env-Ct3hMEYB.js} +2 -2
- package/dist/packem_shared/{failure-log-Sp1j-5qo.js → failure-log-Dy2G-rKi.js} +1 -1
- package/dist/packem_shared/glob-fqg4KepW-1S3z30c8.js +1 -0
- package/dist/packem_shared/index-CE6MsgcV.js +22 -0
- package/dist/packem_shared/{index-CkZnT2Fe.js → index-Cntyu-w8.js} +1 -1
- package/dist/packem_shared/{index-DJAnbLEh.js → index-XAb0QGqA.js} +1 -1
- package/dist/packem_shared/{lifecycle-C4nRsXxc.js → lifecycle-CHcFuWf_.js} +1 -1
- package/dist/packem_shared/{lockfile-DIGyLfmF.js → lockfile-C1qCKGH6.js} +1 -1
- package/dist/packem_shared/{manifests-pLwnVmCN.js → manifests-WBnsV_Eb.js} +1 -1
- package/dist/packem_shared/{min-release-age-B23Mr7NO.js → min-release-age-C71MO72F.js} +1 -1
- package/dist/packem_shared/{missing-package-json-DdMNbe_j.js → missing-package-json-CTF71tE5.js} +1 -1
- package/dist/packem_shared/{native-config-sync-4K9wWTj5.js → native-config-sync-BFDVK9LH.js} +4 -4
- package/dist/packem_shared/{osv-bloom-BsQ-aFiM.js → osv-bloom-DVMlkcAO.js} +2 -2
- package/dist/packem_shared/{packument-QjOLAMSk.js → packument-C-A3Uhhx.js} +1 -1
- package/dist/packem_shared/pm-runner-CQcraCcu.js +1 -0
- package/dist/packem_shared/{provenance-CilBg0Ee.js → provenance-R2csDSNg.js} +1 -1
- package/dist/packem_shared/readJsonSync-CvkZyKmL-ihoybKvs.js +1 -0
- package/dist/packem_shared/{registry-keys-BEavOCPz.js → registry-keys-CMnS_Qt_.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-C4o8_-SE.js → resolve-explicit-C4oQMyoB.js} +1 -1
- package/dist/packem_shared/resolve-runtime-QRaQucfL.js +1 -0
- package/dist/packem_shared/run-file-DD7Ne23Z.js +1 -0
- package/dist/packem_shared/{runtime-check-0lUJvgKt.js → runtime-check-BXehSP06.js} +1 -1
- package/dist/packem_shared/{s1ngularity-DuG-LLaX.js → s1ngularity-BCDt28u0.js} +1 -1
- package/dist/packem_shared/scan-progress-YRpDs90j.js +2 -0
- package/dist/packem_shared/{selectors-UmnAuc26.js → selectors-D4iCvITE.js} +1 -1
- package/dist/packem_shared/{signatures-CYheSqd3.js → signatures-B3srzCEv.js} +1 -1
- package/dist/packem_shared/target-options-CR0OuYJr.js +1 -0
- package/dist/packem_shared/toolchain-C44mPKPu.js +5 -0
- package/dist/packem_shared/{typosquats-hCtH-23t.js → typosquats-CQz-1Y6K.js} +1 -1
- package/dist/packem_shared/use-measured-height-DHi0xOPO.js +1 -0
- package/dist/packem_shared/utils-CRueU43T.js +1 -0
- package/dist/packem_shared/verify-DStfg3nb.js +1 -0
- package/dist/packem_shared/{vis-update-app-K-qATSeh.js → vis-update-app-B3I14Vfy.js} +1 -1
- package/dist/packem_shared/{watch-Bkp_AAbc.js → watch-BXNI7dC6.js} +1 -1
- package/dist/packem_shared/{watch-loop-WE7nWIEt.js → watch-loop-JfGKIgKB.js} +1 -1
- package/dist/runtime/preload.js +1 -1
- package/index.js +52 -52
- package/package.json +18 -14
- package/dist/packem_shared/affected-shas-C1XuRlvo.js +0 -1
- package/dist/packem_shared/augment-8fIWWGSc.js +0 -3
- package/dist/packem_shared/bin-DDq2oszw.js +0 -1
- package/dist/packem_shared/glob-fqg4KepW-7Bs2kZuM.js +0 -1
- package/dist/packem_shared/index-OQZQyN5R.js +0 -19
- package/dist/packem_shared/pm-runner-CIH0wPh-.js +0 -1
- package/dist/packem_shared/readJsonSync-CvkZyKmL-CY7PZob_.js +0 -4
- package/dist/packem_shared/resolve-runtime-CJSWV-K8.js +0 -1
- package/dist/packem_shared/run-file-B4TqKa0X.js +0 -1
- package/dist/packem_shared/scan-progress-RTMsE3Z4.js +0 -2
- package/dist/packem_shared/target-options-ChWcK60i.js +0 -1
- package/dist/packem_shared/toolchain-DyCKnGch.js +0 -5
- package/dist/packem_shared/use-measured-height-BKUjhm_3.js +0 -1
- package/dist/packem_shared/utils-Cxree603.js +0 -1
- package/dist/packem_shared/verify-CVPYlUrF.js +0 -1
- package/dist/packem_shared/window-ops-DDePlWLV.js +0 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*!
|
|
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 T(e,t){let r=e.slice(0,t).split(/\r\n|\n|\r/g);return[r.length,r.pop().length+1]}function A(e,t,r){let l=e.split(/\r\n|\n|\r/g),o="",i=(Math.log10(t+1)|0)+1;for(let n=t-1;n<=t+1;n++){let s=l[n-1];s&&(o+=n.toString().padEnd(i," "),o+=": ",o+=s,o+=`
|
|
28
|
+
`,n===t&&(o+=" ".repeat(i+r+2),o+=`^
|
|
29
|
+
`))}return o}class u extends Error{line;column;codeblock;constructor(t,r){const[l,o]=T(r.toml,r.ptr),i=A(r.toml,l,o);super(`Invalid TOML document: ${t}
|
|
30
|
+
|
|
31
|
+
${i}`,r),this.line=l,this.column=o,this.codeblock=i}}function I(e,t){let r=0;for(;e[t-++r]==="\\";);return--r&&r%2}function m(e,t=0,r=e.length){let l=e.indexOf(`
|
|
32
|
+
`,t);return e[l-1]==="\r"&&l--,l<=r?l:-1}function p(e,t){for(let r=t;r<e.length;r++){let l=e[r];if(l===`
|
|
33
|
+
`)return r;if(l==="\r"&&e[r+1]===`
|
|
34
|
+
`)return r+1;if(l<" "&&l!==" "||l==="")throw new u("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}function d(e,t,r,l){let o;for(;;){for(;(o=e[t])===" "||o===" "||!r&&(o===`
|
|
35
|
+
`||o==="\r"&&e[t+1]===`
|
|
36
|
+
`);)t++;if(l||o!=="#")break;t=p(e,t)}return t}function $(e,t,r,l,o=!1){if(!l)return t=m(e,t),t<0?e.length:t;for(let i=t;i<e.length;i++){let n=e[i];if(n==="#")i=m(e,i);else{if(n===r)return i+1;if(n===l||o&&(n===`
|
|
37
|
+
`||n==="\r"&&e[i+1]===`
|
|
38
|
+
`))return i}}throw new u("cannot find end of structure",{toml:e,ptr:t})}function O(e,t){let r=e[t],l=r===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):r;t+=l.length-1;do t=e.indexOf(l,++t);while(t>-1&&r!=="'"&&I(e,t));return t>-1&&(t+=l.length,l.length>1&&(e[t]===r&&t++,e[t]===r&&t++)),t}/*!
|
|
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 E=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;class h extends Date{#t=!1;#r=!1;#e=null;constructor(t){let r=!0,l=!0,o="Z";if(typeof t=="string"){let i=t.match(E);i?(i[1]||(r=!1,t=`0000-01-01T${t}`),l=!!i[2],l&&t[10]===" "&&(t=t.replace(" ","T")),i[2]&&+i[2]>23?t="":(o=i[3]||null,t=t.toUpperCase(),!o&&l&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=r,this.#r=l,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 l=new h(t);return l.#e=r,l}static wrapAsLocalDateTime(t){let r=new h(t);return r.#e=null,r}static wrapAsLocalDate(t){let r=new h(t);return r.#r=!1,r.#e=null,r}static wrapAsLocalTime(t){let r=new h(t);return r.#t=!1,r.#e=null,r}}let N=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,j=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,D=/^[+-]?0[0-9_]/,Z=/^[0-9a-f]{2,8}$/i,x={b:"\b",t:" ",n:`
|
|
65
|
+
`,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function k(e,t=0,r=e.length){let l=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 i=0,n,s="",f=t;for(;t<r-1;){let a=e[t++];if(a===`
|
|
67
|
+
`||a==="\r"&&e[t]===`
|
|
68
|
+
`){if(!o)throw new u("newlines are not allowed in strings",{toml:e,ptr:t-1})}else if(a<" "&&a!==" "||a==="")throw new u("control characters are not allowed in strings",{toml:e,ptr:t-1});if(n){if(n=!1,a==="x"||a==="u"||a==="U"){let c=e.slice(t,t+=a==="x"?2:a==="u"?4:8);if(!Z.test(c))throw new u("invalid unicode escape",{toml:e,ptr:i});try{s+=String.fromCodePoint(parseInt(c,16))}catch{throw new u("invalid unicode escape",{toml:e,ptr:i})}}else if(o&&(a===`
|
|
69
|
+
`||a===" "||a===" "||a==="\r")){if(t=d(e,t-1,!0),e[t]!==`
|
|
70
|
+
`&&e[t]!=="\r")throw new u("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:i});t=d(e,t)}else if(a in x)s+=x[a];else throw new u("unrecognized escape sequence",{toml:e,ptr:i});f=t}else!l&&a==="\\"&&(i=t-1,n=!0,s+=e.slice(f,i))}return s+e.slice(f,r-1)}function L(e,t,r,l){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 l?0n:0;let o=N.test(e);if(o||j.test(e)){if(D.test(e))throw new u("leading zeroes are not allowed",{toml:t,ptr:r});e=e.replace(/_/g,"");let n=+e;if(isNaN(n))throw new u("invalid number",{toml:t,ptr:r});if(o){if((o=!Number.isSafeInteger(n))&&!l)throw new u("integer value cannot be represented losslessly",{toml:t,ptr:r});(o||l===!0)&&(n=BigInt(e))}return n}const i=new h(e);if(!i.isValid())throw new u("invalid value",{toml:t,ptr:r});return i}function V(e,t,r){let l=e.slice(t,r),o=l.indexOf("#");return o>-1&&(p(e,o),l=l.slice(0,o)),[l.trimEnd(),o]}function b(e,t,r,l,o){if(l===0)throw new u("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let i=e[t];if(i==="["||i==="{"){let[f,a]=i==="["?B(e,t,l,o):z(e,t,l,o);if(r){if(a=d(e,a),e[a]===",")a++;else if(e[a]!==r)throw new u("expected comma or end of structure",{toml:e,ptr:a})}return[f,a]}let n;if(i==='"'||i==="'"){n=O(e,t);let f=k(e,t,n);if(r){if(n=d(e,n),e[n]&&e[n]!==","&&e[n]!==r&&e[n]!==`
|
|
71
|
+
`&&e[n]!=="\r")throw new u("unexpected character encountered",{toml:e,ptr:n});n+=+(e[n]===",")}return[f,n]}n=$(e,t,",",r);let s=V(e,t,n-+(e[n-1]===","));if(!s[0])throw new u("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return r&&s[1]>-1&&(n=d(e,t+s[1]),n+=+(e[n]===",")),[L(s[0],e,t,o),n]}let P=/^[a-zA-Z0-9-_]+[ \t]*$/;function g(e,t,r="="){let l=t-1,o=[],i=e.indexOf(r,t);if(i<0)throw new u("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let n=e[t=++l];if(n!==" "&&n!==" ")if(n==='"'||n==="'"){if(n===e[t+1]&&n===e[t+2])throw new u("multiline strings are not allowed in keys",{toml:e,ptr:t});let s=O(e,t);if(s<0)throw new u("unfinished string encountered",{toml:e,ptr:t});l=e.indexOf(".",s);let f=e.slice(s,l<0||l>i?i:l),a=m(f);if(a>-1)throw new u("newlines are not allowed in keys",{toml:e,ptr:t+l+a});if(f.trimStart())throw new u("found extra tokens after the string part",{toml:e,ptr:s});if(i<s&&(i=e.indexOf(r,s),i<0))throw new u("incomplete key-value: cannot find end of key",{toml:e,ptr:t});o.push(k(e,t,s))}else{l=e.indexOf(".",t);let s=e.slice(t,l<0||l>i?i:l);if(!P.test(s))throw new u("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});o.push(s.trimEnd())}}while(l+1&&l<i);return[o,d(e,i+1,!0,!0)]}function z(e,t,r,l){let o={},i=new Set,n;for(t++;(n=e[t++])!=="}"&&n;){if(n===",")throw new u("expected value, found comma",{toml:e,ptr:t-1});if(n==="#")t=p(e,t);else if(n!==" "&&n!==" "&&n!==`
|
|
72
|
+
`&&n!=="\r"){let s,f=o,a=!1,[c,S]=g(e,t-1);for(let w=0;w<c.length;w++){if(w&&(f=a?f[s]:f[s]={}),s=c[w],(a=Object.hasOwn(f,s))&&(typeof f[s]!="object"||i.has(f[s])))throw new u("trying to redefine an already defined value",{toml:e,ptr:t});!a&&s==="__proto__"&&Object.defineProperty(f,s,{enumerable:!0,configurable:!0,writable:!0})}if(a)throw new u("trying to redefine an already defined value",{toml:e,ptr:t});let[y,_]=b(e,S,"}",r-1,l);i.add(y),f[s]=y,t=_}}if(!n)throw new u("unfinished table encountered",{toml:e,ptr:t});return[o,t]}function B(e,t,r,l){let o=[],i;for(t++;(i=e[t++])!=="]"&&i;){if(i===",")throw new u("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=p(e,t);else if(i!==" "&&i!==" "&&i!==`
|
|
73
|
+
`&&i!=="\r"){let n=b(e,t-1,"]",r-1,l);o.push(n[0]),t=n[1]}}if(!i)throw new u("unfinished array encountered",{toml:e,ptr:t});return[o,t]}function v(e,t,r,l){let o=t,i=r,n,s=!1,f;for(let a=0;a<e.length;a++){if(a){if(o=s?o[n]:o[n]={},i=(f=i[n]).c,l===0&&(f.t===1||f.t===2))return null;if(f.t===2){let c=o.length-1;o=o[c],i=i[c].c}}if(n=e[a],(s=Object.hasOwn(o,n))&&i[n]?.t===0&&i[n]?.d)return null;s||(n==="__proto__"&&(Object.defineProperty(o,n,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,n,{enumerable:!0,configurable:!0,writable:!0})),i[n]={t:a<e.length-1&&l===2?3:l,d:!1,i:0,c:{}})}if(f=i[n],f.t!==l&&!(l===1&&f.t===3)||(l===2&&(f.d||(f.d=!0,o[n]=[]),o[n].push(o={}),f.c[f.i++]=f={t:1,d:!1,i:0,c:{}}),f.d))return null;if(f.d=!0,l===1)o=s?o[n]:o[n]={};else if(l===0&&s)return null;return[n,o,f.c]}function C(e,{maxDepth:t=1e3,integersAsBigInt:r}={}){let l={},o={},i=l,n=o;for(let s=d(e,0);s<e.length;){if(e[s]==="["){let f=e[++s]==="[",a=g(e,s+=+f,"]");if(f){if(e[a[1]-1]!=="]")throw new u("expected end of table declaration",{toml:e,ptr:a[1]-1});a[1]++}let c=v(a[0],l,o,f?2:1);if(!c)throw new u("trying to redefine an already defined table or value",{toml:e,ptr:s});n=c[2],i=c[1],s=a[1]}else{let f=g(e,s),a=v(f[0],i,n,0);if(!a)throw new u("trying to redefine an already defined table or value",{toml:e,ptr:s});let c=b(e,f[1],void 0,t,r);a[1][a[0]]=c[0],s=c[1]}if(s=d(e,s,!0),e[s]&&e[s]!==`
|
|
74
|
+
`&&e[s]!=="\r")throw new u("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:s});s=d(e,s)}return l}export{h as TomlDate,u as TomlError,C as parse};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as r}from"./cli-main.js";import{c as i,f as a}from"../packem_shared/registry-keys-
|
|
1
|
+
import{p as r}from"./cli-main.js";import{c as i,f as a}from"../packem_shared/registry-keys-CMnS_Qt_.js";const n=async({options:s})=>{if(s.clear){const t=i();if(s.json){process.stdout.write(`${JSON.stringify({cleared:t,refetched:!1},void 0,2)}
|
|
2
2
|
`);return}r.success(t?"Cleared cached npm signing keys.":"No cached npm signing keys to clear.");return}const e=await a({forceRefresh:!0});if(e===void 0){if(s.json){process.stdout.write(`${JSON.stringify({cleared:!1,error:"fetch-failed",refetched:!1},void 0,2)}
|
|
3
3
|
`),process.exitCode=1;return}r.error("Failed to fetch npm signing keys (network error and no cached keys available)."),process.exitCode=1;return}if(s.json){process.stdout.write(`${JSON.stringify({cleared:!1,fromCache:e.fromCache,keyCount:e.keys.length,refetched:!e.fromCache,stale:e.stale??!1},void 0,2)}
|
|
4
4
|
`);return}if(e.fromCache&&e.stale===!0){r.warn(`Network fetch failed — falling back to expired cache (${String(e.keys.length)} keys).`);return}r.success(`Refreshed npm signing keys (${String(e.keys.length)} keys).`)};export{n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as
|
|
2
|
-
`),process.exitCode=1;return}const e=process.cwd(),
|
|
1
|
+
import{A as a,B as p}from"../packem_shared/index-CE6MsgcV.js";import{r as l}from"../packem_shared/resolve-runtime-QRaQucfL.js";import{r as f}from"../packem_shared/run-file-DD7Ne23Z.js";const m=o=>{let t,n=!1,i;const s=[];for(let e=0;e<o.length;e+=1){const r=o[e];if(i===void 0){if(r==="--node"){n=!0;continue}if(r==="--runtime"){t=o[e+1],e+=1;continue}if(r.startsWith("--runtime=")){t=r.slice(10);continue}i=r;continue}s.push(r)}return s[0]==="--"&&s.shift(),{file:i,node:n,runtimeFlag:t,scriptArguments:s}},h=async o=>{const{file:t,node:n,runtimeFlag:i,scriptArguments:s}=m(o);if(t===void 0){process.stderr.write(`No file specified. Usage: vis x <file> [args...]
|
|
2
|
+
`),process.exitCode=1;return}const e=process.cwd(),r=a(t)?t:p(e,t);if(n){const d=await f(r,s,"node",e,{node:!0});d!==0&&(process.exitCode=d);return}let c;try{c=l(e,{flag:i})}catch(d){process.stderr.write(`${d.message}
|
|
3
3
|
`),process.exitCode=1;return}c.deferredNotice!==void 0&&process.stderr.write(`${c.deferredNotice}
|
|
4
|
-
`);const
|
|
4
|
+
`);const u=await f(r,s,c.runtime,e);u!==0&&(process.exitCode=u)};export{m as parseLeanXArgs,h as runLeanX};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as _}from"node:module";import{h as x,p as o,v as B}from"./cli-main.js";import{
|
|
1
|
+
import{createRequire as _}from"node:module";import{h as x,p as o,v as B}from"./cli-main.js";import{A as R}from"../packem_shared/pm-runner-CQcraCcu.js";import{W as V}from"../packem_shared/build-scripts-MTSK6TNr.js";import{m as y,f as w}from"../packem_shared/index-CE6MsgcV.js";import{a as W}from"../packem_shared/readJsonSync-CvkZyKmL-ihoybKvs.js";const j=_(import.meta.url),v=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,D=c=>{if(typeof v<"u"&&v.versions&&v.versions.node){const[r,f]=v.versions.node.split(".").map(Number);if(r>22||r===22&&f>=3||r===20&&f>=16)return v.getBuiltinModule(c)}return j(c)},{readdirSync:S,statSync:M}=D("node:fs"),q=(c,r={})=>{const f=y(c,"node_modules");if(!w(f))return[];const l=new Map,p=new Set,$=(n,s,t)=>{const e=`${s}@${t}`;if(p.has(e))return;p.add(e);const i=t.startsWith(c)?t.slice(c.length+1):t;let u=l.get(n);u||(u=[],l.set(n,u)),u.some(b=>b.name===s)||u.push({name:s,relativePath:i})},d=(n,s="")=>{let t;try{t=S(n)}catch{return}for(const e of t){const i=y(n,e);if(e.startsWith("@")){d(i,`${e}/`);continue}if(e===".pnpm"&&s===""){let a;try{a=S(i)}catch{continue}for(const m of a){const h=y(i,m,"node_modules");w(h)&&d(h)}continue}if(e.startsWith("."))continue;const u=s+e,b=y(i,"package.json");try{if(!M(i).isDirectory()||!w(b))continue;const a=W(b),m=typeof a.name=="string"?a.name:u;if(typeof a.bin=="string"){const k=m.includes("/")?m.split("/").pop():m;$(k,m,i)}else if(a.bin&&typeof a.bin=="object")for(const k of Object.keys(a.bin))$(k,m,i);const h=y(i,"node_modules");w(h)&&d(h)}catch{}}};d(f);const g=[];for(const[n,s]of l)s.length<2||r[n]===!0||s.every(t=>r[`${t.name}#${n}`]===!0)||g.push({bin:n,packages:s});return g.sort((n,s)=>n.bin.localeCompare(s.bin))},A=new Set(["bun","npm","pnpm","yarn"]),J=({options:c,visConfig:r,workspaceRoot:f})=>{const l=f??process.cwd(),p=R(l),$=r?.security?.policies?.installScripts?.allow??{},d=r?.security?.allowBins??{},g=r?.security?.pinVersions===!0,n=V(l,$,{pinVersions:g}),s=q(l,d),t=r&&A.has(p.name)?x(r,p.name,l):void 0;if(c.json){process.stdout.write(`${JSON.stringify({binConflicts:s,drift:t,excess:n.excess,installed:n.installed.map(e=>({hooks:e.hooks,name:e.name,version:e.version})),packageManager:p.name,pinVersions:g,unapproved:n.unapproved.map(e=>({hooks:e.hooks,name:e.name,version:e.version})),versionDrift:n.versionDrift},void 0,2)}
|
|
2
2
|
`);return}if(o.info(`Build-script status (${p.name}):
|
|
3
3
|
`),n.installed.length===0&&n.unapproved.length===0&&o.success(" No installed packages declare lifecycle scripts."),n.installed.length>0){o.success(` Approved (${String(n.installed.length)}):`);for(const e of n.installed)o.info(` ✓ ${e.name} — ${e.hooks.join(", ")}`)}if(n.unapproved.length>0){o.info(""),o.warn(` Unapproved (${String(n.unapproved.length)}):`);for(const e of n.unapproved)o.info(` ✗ ${e.name} — ${e.hooks.join(", ")}`);o.notice(" Run 'vis approve-builds' to review.")}if(n.excess.length>0){o.info(""),o.warn(` Stale allowlist entries (${String(n.excess.length)}):`);for(const e of n.excess)o.info(` ! ${e}`);o.notice(" Remove these from vis.config.ts security.policies.installScripts.allow.")}if(n.versionDrift.length>0){o.info(""),o.warn(` Version drift (pinVersions: true) — ${String(n.versionDrift.length)} entr${n.versionDrift.length===1?"y":"ies"} point at outdated versions:`);for(const{from:e,to:i}of n.versionDrift)o.info(` ${e} → ${i}`);o.notice(" Update vis.config.ts security.policies.installScripts.allow keys to migrate.")}if(s.length>0){o.info(""),o.warn(` Bin conflicts (${String(s.length)}) — multiple packages expose the same bin name:`);for(const e of s)o.info(` ${e.bin} ← ${e.packages.map(i=>i.name).join(", ")}`);o.notice(" Add the bin (or 'pkg#bin') to vis.config.ts security.allowBins to silence this.")}if(t?.hasDrift){o.info("");for(const e of B(t))o.warn(e)}};export{J as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as m}from"node:module";import{
|
|
1
|
+
import{createRequire as m}from"node:module";import{A as d,j as _}from"../packem_shared/pm-runner-CQcraCcu.js";const w=m(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,r]=o.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return o.getBuiltinModule(e)}return w(e)},{createInterface:y}=g("node:readline"),s="sigstore",$=()=>!!process.stdout.isTTY&&process.env.CI!=="true",v=e=>new Promise(t=>{const r=y({input:process.stdin,output:process.stderr});r.question(`${e} (Y/n) `,i=>{r.close();const n=i.trim().toLowerCase();t(n===""||n==="y"||n==="yes")})}),h=e=>{const t=d(e),r=_(t,{exact:!1,filter:[],global:!1,optional:!1,packages:[s],peer:!1,saveDev:!0,workspace:!1,workspaceRoot:!1},e,console);return Promise.resolve({exitCode:r})},R=()=>{try{return import.meta.resolve(s),!0}catch{return!1}},I=e=>{let t="pnpm";try{t=d(e).name}catch{}switch(t){case"bun":return`bun add -d ${s}`;case"npm":return`npm install -D ${s}`;case"yarn":return`yarn add -D ${s}`;default:return`pnpm add -D ${s}`}},D=()=>import("sigstore"),T=async(e={})=>{const t=e.interactive??$(),r=e.prompt??v,i=e.runInstall??h,n=e.importImpl??D,l=e.workspaceRoot??process.cwd(),a=I(l);try{return await n()}catch(p){const{code:u,message:f}=p;if(!(u==="ERR_MODULE_NOT_FOUND"||u==="MODULE_NOT_FOUND")||!f.includes(s))throw p}if(!t)throw new Error(`${s} is not installed. \`vis attest\` needs it for keyless signing/verification. Install it in your repo first:
|
|
2
2
|
${a}`);if(!await r(`${s} isn't installed. Install it now?`))throw new Error(`${s} install declined. Re-run \`vis attest\` after installing manually:
|
|
3
3
|
${a}`);const c=await i(l);if(c.exitCode!==0)throw new Error(`Install of ${s} failed (exit ${String(c.exitCode)}). Install manually and retry:
|
|
4
4
|
${a}`);return await n()};export{I as installCommandFor,R as isSigstoreInstalled,T as loadOptionalSigstore};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{i as r}from"./ts-loader.js";const n=(t,o)=>{if(!o||typeof o!="object")throw new TypeError(`${t}: default export must be an object (got ${o===null?"null":typeof o}). Use createTemplate({ ... }).`);const e=o;if(typeof e.about!="object"||e.about===null)throw new TypeError(`${t}: default export missing required "about" object`);if(typeof e.produce!="function")throw new TypeError(`${t}: default export missing required "produce" function`);return o},a=async t=>{const o=(await r(t)).default??null;return n(t,o)};export{a as loadNativeTemplate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{normaliseGroup as
|
|
1
|
+
import{normaliseGroup as l}from"../release/types.js";const d=o=>o==="debug",m=o=>/[\\/]/.test(o)||/\.(?:pem|gpg|key|asc|p12|pfx)$/i.test(o)||o.length<8?"(key: configured)":`…${o.slice(-4)}`,i=o=>{try{const a=new URL(o);a.username="",a.password="";const s=a.pathname!==""&&a.pathname!=="/"?"/…REDACTED…":"";return`${a.origin}${s}`}catch{return o.replace(/(:\/\/)[^@/]+@/,"$1")||"[REDACTED]"}},h=o=>{if(!o)return o;const a={};for(const s of Object.keys(o))a[s]="[REDACTED]";return a},u=o=>{const a=structuredClone(o);if(a.signing?.key&&(a.signing={...a.signing,key:m(a.signing.key)}),a.httpProxy&&(a.httpProxy=i(a.httpProxy)),a.notifications){const s=a.notifications,n=r=>({...r,webhook:i(r.webhook)}),t=r=>({...r,webhook:i(r.webhook)}),e=r=>({...r,headers:h(r.headers),url:i(r.url)});s.slack&&(s.slack=Array.isArray(s.slack)?s.slack.map(r=>n(r)):n(s.slack)),s.discord&&(s.discord=Array.isArray(s.discord)?s.discord.map(r=>t(r)):t(s.discord)),s.webhook&&(s.webhook=Array.isArray(s.webhook)?s.webhook.map(r=>e(r)):e(s.webhook))}return a},g=o=>o&&o.map(a=>l(a)),b=(o,a,s)=>{const n=o.printConfig;if(n===void 0||n===!1||n==="")return!1;const t=d(n),e=u(a.config),r=e.gitUser?{...e.gitUser,email:e.gitUser.email?"[REDACTED]":e.gitUser.email}:e.gitUser,c={access:e.access,aggregateRelease:e.aggregateRelease,allowCustomCommands:e.allowCustomCommands,baseBranch:e.baseBranch,bumpDevDependencies:e.bumpDevDependencies,bumpMinorPreMajor:e.bumpMinorPreMajor,bumpPatchForMinorPreMajor:e.bumpPatchForMinorPreMajor,changelog:e.changelog,changesDir:e.changesDir,channels:e.channels,defaultManaged:e.defaultManaged,detectCatalogChanges:e.detectCatalogChanges,fixed:g(e.fixed),floatingMajorTag:e.floatingMajorTag,githubHost:e.githubHost,gitlabHost:e.gitlabHost,gitUser:r,httpProxy:e.httpProxy,ignore:e.ignore,include:e.include,linked:g(e.linked),notifications:e.notifications,postPublishCommand:e.postPublishCommand,postVersionCommand:e.postVersionCommand,prePublishCommand:e.prePublishCommand,preVersionCommand:e.preVersionCommand,privatePackages:e.privatePackages,provider:e.provider,publish:e.publish,releaseNoteTemplate:e.releaseNoteTemplate,releaseTagPattern:e.releaseTagPattern,signing:e.signing,snapshot:e.snapshot,successWalk:e.successWalk,updateInternalDependencies:e.updateInternalDependencies,versionPr:e.versionPr};return t&&(c.__resolved__={branch:a.branch,channel:a.channel,cwd:a.cwd,packageCount:a.packages.length,packageManager:a.pm.id,packageNames:a.packages.map(p=>p.name).sort(),perPackageConfigKeys:[...a.perPackageConfig.keys()].sort()}),process.stdout.write(`${JSON.stringify(c,null,2)}
|
|
2
2
|
`),!0};export{b as printConfigIfRequested};
|
|
@@ -12,7 +12,7 @@ ${e.trimStart()}`:`${n}
|
|
|
12
12
|
|
|
13
13
|
${e.trimStart()}`},Ge=(t,e)=>{const n=Be(e);return`${JSON.stringify(t,null,n)}
|
|
14
14
|
`},Be=t=>{if(!t)return 4;const e=/\n(\s+)"/.exec(t);if(!e)return 4;const n=(e[1]??"").length;return n===2||n===4?n:4},We=t=>`${t.dir}/CHANGELOG.md`,Je=t=>{const e=new Date().toISOString().slice(0,10),n=[`## ${t.newVersion}`,`<sub>${e}</sub>`,""];if(t.isCascadeBump||t.isGroupBump)for(const r of t.sources)n.push(`- Version bump from ${r.name}@${r.newVersion}`);else if(t.isDependencyBump&&t.changeFiles.length===0)for(const r of t.sources)r.newVersion===""?n.push(`- Removed dependency ${r.name}`):n.push(`- Updated dependency ${r.name}@${r.newVersion}`);else for(const r of t.changeFiles)for(const s of r.body.split(/\r?\n/)){if(s.trim()===""){n.push("");continue}n.push(s.startsWith("-")||s.startsWith("*")?s:`- ${s}`)}return n.join(`
|
|
15
|
-
`)},He=["dependencies","devDependencies","peerDependencies","optionalDependencies"],Q={default:{},named:{}},Ke=t=>{if(!t)return Q;let e;try{e=Re(t,{schema:"core",strict:!0})}catch(s){throw new l({cause:s,code:"CONFIG_INVALID",message:`Failed to parse pnpm-workspace.yaml: ${s.message}`})}if(typeof e!="object"||e===null||Array.isArray(e))return Q;const n=e,r={default:{},named:{}};if(typeof n.catalog=="object"&&n.catalog!==null&&!Array.isArray(n.catalog))for(const[s,a]of Object.entries(n.catalog))typeof a=="string"&&(r.default[s]=a);if(typeof n.catalogs=="object"&&n.catalogs!==null&&!Array.isArray(n.catalogs))for(const[s,a]of Object.entries(n.catalogs)){if(typeof a!="object"||a===null||Array.isArray(a))continue;const i={};for(const[o,c]of Object.entries(a))typeof c=="string"&&(i[o]=c);r.named[s]=i}return r},we=(t,e,n)=>{if(!t.startsWith("catalog:"))return t;const r=t.slice(8),s=r===""?n.default:n.named[r];if(s)return s[e]},Y=(t,e)=>{const n={...t};for(const r of He){const s=t[r];if(!s||typeof s!="object")continue;const a={...s};for(const[i,o]of Object.entries(s)){if(!o.startsWith("catalog:"))continue;const c=we(o,i,e);if(c===void 0)throw new l({code:"CONFIG_INVALID",message:`Cannot resolve "${o}" for dependency "${i}" in package "${t.name}". Add it to pnpm-workspace.yaml's "catalog" or "catalogs" block.`,packageName:t.name});a[i]=c}n[r]=a}return n},Ut=Object.defineProperty({__proto__:null,parseCatalogs:Ke,resolveCatalogRef:we,rewriteCatalogRefs:Y},Symbol.toStringTag,{value:"Module"}),qe="ACTIONS_ID_TOKEN_REQUEST_URL",z=t=>{const e=!!t.env[qe],n=!!t.env[t.staticTokenVar],r=t.workspaceConfig?.publish?.preferStaticToken===!0;return e&&!(r&&n)?"oidc":n?"token":"missing"};let T;const Ye="https://github.com/visulima/visulima",ze=async()=>{try{let t=U(Ve(import.meta.url));for(let e=0;e<6;e+=1){const n=h(t,"package.json");try{const s=await A(n,"utf8"),a=JSON.parse(s);if(a.name==="@visulima/vis"&&typeof a.version=="string")return a.version}catch{}const r=U(t);if(r===t)break;t=r}}catch{}return"unknown"},Qe=async()=>(T!==void 0||(T=`vis-release/${await ze()} (+${Ye})`),T),X=new Map,Xe=async t=>{const e=X.get(t);if(e!==void 0)return e;try{const n=await import("./
|
|
15
|
+
`)},He=["dependencies","devDependencies","peerDependencies","optionalDependencies"],Q={default:{},named:{}},Ke=t=>{if(!t)return Q;let e;try{e=Re(t,{schema:"core",strict:!0})}catch(s){throw new l({cause:s,code:"CONFIG_INVALID",message:`Failed to parse pnpm-workspace.yaml: ${s.message}`})}if(typeof e!="object"||e===null||Array.isArray(e))return Q;const n=e,r={default:{},named:{}};if(typeof n.catalog=="object"&&n.catalog!==null&&!Array.isArray(n.catalog))for(const[s,a]of Object.entries(n.catalog))typeof a=="string"&&(r.default[s]=a);if(typeof n.catalogs=="object"&&n.catalogs!==null&&!Array.isArray(n.catalogs))for(const[s,a]of Object.entries(n.catalogs)){if(typeof a!="object"||a===null||Array.isArray(a))continue;const i={};for(const[o,c]of Object.entries(a))typeof c=="string"&&(i[o]=c);r.named[s]=i}return r},we=(t,e,n)=>{if(!t.startsWith("catalog:"))return t;const r=t.slice(8),s=r===""?n.default:n.named[r];if(s)return s[e]},Y=(t,e)=>{const n={...t};for(const r of He){const s=t[r];if(!s||typeof s!="object")continue;const a={...s};for(const[i,o]of Object.entries(s)){if(!o.startsWith("catalog:"))continue;const c=we(o,i,e);if(c===void 0)throw new l({code:"CONFIG_INVALID",message:`Cannot resolve "${o}" for dependency "${i}" in package "${t.name}". Add it to pnpm-workspace.yaml's "catalog" or "catalogs" block.`,packageName:t.name});a[i]=c}n[r]=a}return n},Ut=Object.defineProperty({__proto__:null,parseCatalogs:Ke,resolveCatalogRef:we,rewriteCatalogRefs:Y},Symbol.toStringTag,{value:"Module"}),qe="ACTIONS_ID_TOKEN_REQUEST_URL",z=t=>{const e=!!t.env[qe],n=!!t.env[t.staticTokenVar],r=t.workspaceConfig?.publish?.preferStaticToken===!0;return e&&!(r&&n)?"oidc":n?"token":"missing"};let T;const Ye="https://github.com/visulima/visulima",ze=async()=>{try{let t=U(Ve(import.meta.url));for(let e=0;e<6;e+=1){const n=h(t,"package.json");try{const s=await A(n,"utf8"),a=JSON.parse(s);if(a.name==="@visulima/vis"&&typeof a.version=="string")return a.version}catch{}const r=U(t);if(r===t)break;t=r}}catch{}return"unknown"},Qe=async()=>(T!==void 0||(T=`vis-release/${await ze()} (+${Ye})`),T),X=new Map,Xe=async t=>{const e=X.get(t);if(e!==void 0)return e;try{const n=await import("./index4.js").then(s=>s.i),r=new n.ProxyAgent(t);return X.set(t,r),r}catch{return}},Ze=t=>t===301||t===302||t===303||t===307||t===308,et=(t,e)=>{try{const n=new URL(t),r=new URL(e);return n.host===r.host&&n.protocol===r.protocol}catch{return!1}},j=async(t,e={})=>{const n=e.maxRedirects??2,r={"User-Agent":await Qe(),...e.headers};e.headers?.["User-Agent"]&&(r["User-Agent"]=e.headers["User-Agent"]);let s=t,a=0;const i=e.httpProxy?await Xe(e.httpProxy):void 0;for(;;){let o;try{const p=e.fetchImpl??globalThis.fetch,m={headers:r,method:e.method??"GET",redirect:"manual"};i&&(m.dispatcher=i),o=await p(s,m)}catch{return{json:async()=>{},ok:!1,status:0,text:async()=>""}}if(!Ze(o.status))return{json:async()=>{try{return await o.json()}catch{return}},ok:o.ok,status:o.status,text:async()=>{try{return await o.text()}catch{return""}}};const c=o.headers.get("location")??o.headers.get("Location");if(!c||a>=n)return{json:async()=>{},ok:!1,status:0,text:async()=>""};let d;try{d=new URL(c,s).toString()}catch{return{json:async()=>{},ok:!1,status:0,text:async()=>""}}if(!et(t,d))return{json:async()=>{},ok:!1,status:0,text:async()=>""};s=d,a+=1}},tt="https://crates.io/api/v1/crates",nt="Cargo.toml",Z=async t=>{let e;try{e=await A(t,"utf8")}catch(o){throw new l({cause:o,code:"CONFIG_INVALID",file:t,message:`Failed to read Cargo.toml at ${t}: ${o.message}`})}const{parse:n}=await import("./index5.js");let r;try{r=n(e)}catch(o){throw new l({cause:o,code:"CONFIG_INVALID",file:t,message:`Failed to parse Cargo.toml at ${t}: ${o.message}`})}if(!r.package)throw new l({code:"CONFIG_INVALID",file:t,hint:"CargoVersionActions only supports publishable crates with a [package] table. For workspace roots, point per-package config at the member crate directory.",message:`Cargo.toml at ${t} has no [package] table.`});const{name:s}=r.package;if(typeof s!="string"||s.length===0)throw new l({code:"CONFIG_INVALID",file:t,message:`Cargo.toml at ${t} is missing [package].name.`});const a=r.package.version;let i;if(typeof a=="string"?i=a:a&&typeof a=="object"&&a.workspace===!0&&(i=r.workspace?.package?.version),typeof i!="string"||i.length===0)throw new l({code:"CONFIG_INVALID",file:t,hint:"Set [package].version explicitly, or — for workspace-inherited versions — ensure the root Cargo.toml carries [workspace.package].version and point per-package config at it.",message:`Cargo.toml at ${t} has no resolvable [package].version.`});return{name:s,version:i}},ee=async(t,e)=>{const n=`${tt}/${encodeURIComponent(t)}`;try{const r=await j(n,{headers:{Accept:"application/json"},httpProxy:e});if(r.status===404||!r.ok)return;const s=await r.json();return s?.crate?.max_stable_version??s?.crate?.max_version??void 0}catch{return}},rt=(t,e)=>z({env:t,staticTokenVar:"CARGO_REGISTRY_TOKEN",workspaceConfig:e})==="oidc",st=async(t,e)=>{const n=await t.run("cargo",["package","--list","--allow-dirty"],{cwd:e,silent:!0});return n.exitCode!==0?[]:n.stdout.split(/\r?\n/).map(r=>r.trim()).filter(r=>r.length>0)};class at extends N{id="cargo";async readPublishedVersion(e){const n=H(e.pkg);try{const{name:r}=await Z(n);return await ee(r)}catch{return}}async publish(e){if(e.dryRun)return{output:`[dry-run / cargo] would publish ${e.pkg.name}@${e.release.newVersion}`,published:!0};const n=H(e.pkg,e.perPackageConfig),r=ot(e.pkg,e.perPackageConfig),{name:s,version:a}=await Z(n);if(a!==e.release.newVersion)throw new l({code:"CONFIG_INVALID",file:n,hint:`Confirm the cargo() preset's crateDir points at the directory containing this Cargo.toml. Expected ${e.release.newVersion} on disk after the extra-files bump.`,message:`Cargo.toml version (${a}) does not match planned release version (${e.release.newVersion}) for ${e.pkg.name}.`,packageName:e.pkg.name});if(await ee(s,e.workspaceConfig?.httpProxy)===e.release.newVersion)return{alreadyPublished:!0,output:`[cargo] ${s}@${e.release.newVersion} already on crates.io`,published:!1};const i=rt(process.env,e.workspaceConfig);if(!i&&!process.env.CARGO_REGISTRY_TOKEN)throw new l({code:"AUTH_MISSING",hint:"Set CARGO_REGISTRY_TOKEN, or run from a GH-Actions job with `permissions: id-token: write` for OIDC trusted publishing.",message:`Cannot publish ${s}@${e.release.newVersion}: neither CARGO_REGISTRY_TOKEN nor OIDC trusted publishing is available.`,packageName:e.pkg.name});const o=e.workspaceConfig?.publish?.guards;if(o?.packSecretScan){const p=await st(e.pm.runner,r);if(p.length>0){const{runPackSecretScan:m}=await import("./publish-guards.js"),y=typeof o.packSecretScan=="object"?o.packSecretScan.ignore:void 0,b=await m({files:p,ignore:y,pkgDir:r});if(!b.passed){const{redactTokens:w}=await import("./security.js"),C=b.findings.map(_=>` • [packSecretScan] ${w(_.message)}${_.hint?`
|
|
16
16
|
→ ${w(_.hint)}`:""}`).join(`
|
|
17
17
|
`);throw new l({code:"PUBLISH_FAILED",message:`Pre-publish secret scan failed for ${s}@${e.release.newVersion}:
|
|
18
18
|
${C}`,packageName:e.pkg.name})}}}const c=["publish","--allow-dirty"];e.registry&&e.registry!=="https://crates.io"&&c.push("--registry",e.registry);const d=await e.pm.runner.run("cargo",c,{cwd:r,silent:!1});if(d.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:"Inspect the cargo output above. Common causes: missing CARGO_REGISTRY_TOKEN, OIDC permission misconfigured, version already published, crates.io rate limit. Re-runs are safe — the published-version probe short-circuits subsequent runs.",message:`cargo publish failed for ${s}@${e.release.newVersion}: exit ${d.exitCode}. stderr: ${d.stderr.trim().slice(0,500)}`,packageName:e.pkg.name});return{output:`[cargo] published ${s}@${e.release.newVersion}${i?" (trusted publishing)":""}`,published:!0}}}const H=(t,e)=>{const n=e?.cargoTomlPath??nt;return h(t.dir,n)},ot=(t,e)=>U(H(t,e)),it=["linux/amd64","linux/arm64"],ct=t=>{const e=t.indexOf("/");if(e===-1)return{registry:"docker.io",repository:`library/${t}`};const n=t.slice(0,e),r=t.slice(e+1);return n==="localhost"||n.includes(".")||n.includes(":")?{registry:n,repository:r}:r.includes("/")?{registry:"docker.io",repository:t}:{registry:"docker.io",repository:`${n}/${r}`}},te=(t,e)=>{const{registry:n,repository:r}=ct(t);return`https://${n==="docker.io"?"registry-1.docker.io":n}/v2/${r}/manifests/${encodeURIComponent(e)}`},ke=t=>{const e=t??{};return{buildContext:e.buildContext,containerBuildArgs:e.containerBuildArgs,containerImage:e.containerImage,containerPlatforms:e.containerPlatforms,containerSigning:e.containerSigning,containerSkipLatest:e.containerSkipLatest}},pt=(t,e)=>{const n=ke(t);if(typeof n.containerImage!="string"||n.containerImage.length===0)throw new l({code:"CONFIG_INVALID",hint:["Container packages must declare `containerImage` in their per-pkg release config:","",' release.packages["<pkg>"] = container({',' image: "ghcr.io/scope/foo",',' platforms: ["linux/amd64", "linux/arm64"],',' signing: "cosign", // optional'," })","",'Or set `versionActions: "container"` + `containerImage` directly.'].join(`
|
|
@@ -45,4 +45,4 @@ ${P}`,packageName:e.pkg.name})}}const{hashTarball:y}=await import("./publish-gua
|
|
|
45
45
|
`)},packageName:e.pkg.name,pollIntervalMs:n.pollIntervalMs,runner:e.pm.runner,stageId:r,timeoutMs:n.timeoutMs,version:e.release.newVersion});return i==="approved"?(process.stderr.write(`[vis release] ✓ ${e.pkg.name}@${e.release.newVersion} approved + promoted on resume (${Math.round((Date.now()-s)/1e3)}s).
|
|
46
46
|
`),{output:`[resumed] published ${e.pkg.name}@${e.release.newVersion}`,published:!0}):i==="rejected"?(process.stdout.write(`::warning::Stage rejected on resume for ${e.pkg.name}@${e.release.newVersion} (id ${r}).
|
|
47
47
|
`),{alreadyPublished:!1,output:`stage-rejected: ${r}`,published:!1,stageId:r}):(process.stdout.write(`::warning::Stage timeout on resume for ${e.pkg.name}@${e.release.newVersion} (id ${r}) after ${Math.round(n.timeoutMs/6e4)}m.
|
|
48
|
-
`),{alreadyPublished:!1,output:`stage-timeout: ${r}`,published:!1,stageId:r})}}const At=["dependencies","devDependencies","peerDependencies","optionalDependencies"],Nt=(t,e)=>{const n={...t};for(const r of At){const s=t[r];if(!s||typeof s!="object")continue;const a={...s};for(const[i,o]of Object.entries(s)){if(!o.startsWith("workspace:"))continue;const c=e.get(i);c&&(a[i]=fe(o.slice(10)==="*"?"*":o,c.version),a[i].startsWith("workspace:")&&(a[i]=a[i].slice(10)))}n[r]=a}return n},_t=Object.defineProperty({__proto__:null,NpmVersionActions:$e},Symbol.toStringTag,{value:"Module"});class jt extends N{id="private";async readPublishedVersion(e){}async publish(e){return{output:`[private] skipped publish for ${e.pkg.name}@${e.release.newVersion}`,published:!1}}}const ve=t=>`https://pypi.org/pypi/${encodeURIComponent(t.toLowerCase())}/json`,xt=(t,e)=>e?.uvLockPath?h(t.dir,e.uvLockPath):h(t.dir,"uv.lock"),Vt=async(t,e)=>{let n;try{n=await M(t)}catch{return"no-root-pyproject"}if(n===void 0)return"no-root-pyproject";const r=n.tool?.uv?.workspace?.members;if(!Array.isArray(r)||r.length===0)return"no-workspace";const s=e.replace(/^\.\//,"").replaceAll("\\","/");for(const a of r){if(typeof a!="string")continue;const i=a.replace(/^\.\//,"").replaceAll("\\","/");if(i===s)return"member";if(i.endsWith("/*")){const o=i.slice(0,-2);if(s.startsWith(`${o}/`)&&!s.slice(o.length+1).includes("/"))return"member"}if(i.endsWith("/**")){const o=i.slice(0,-3);if(s===o||s.startsWith(`${o}/`))return"member"}}return"missing"},M=async t=>{const e=h(t,"pyproject.toml");let n;try{n=await A(e,"utf8")}catch(s){const{code:a}=s;if(a==="ENOENT")return;throw new l({cause:s,code:"BUMP_FILE_INVALID",file:e,message:`Failed to read ${e}: ${s.message}`})}const{parse:r}=await import("./
|
|
48
|
+
`),{alreadyPublished:!1,output:`stage-timeout: ${r}`,published:!1,stageId:r})}}const At=["dependencies","devDependencies","peerDependencies","optionalDependencies"],Nt=(t,e)=>{const n={...t};for(const r of At){const s=t[r];if(!s||typeof s!="object")continue;const a={...s};for(const[i,o]of Object.entries(s)){if(!o.startsWith("workspace:"))continue;const c=e.get(i);c&&(a[i]=fe(o.slice(10)==="*"?"*":o,c.version),a[i].startsWith("workspace:")&&(a[i]=a[i].slice(10)))}n[r]=a}return n},_t=Object.defineProperty({__proto__:null,NpmVersionActions:$e},Symbol.toStringTag,{value:"Module"});class jt extends N{id="private";async readPublishedVersion(e){}async publish(e){return{output:`[private] skipped publish for ${e.pkg.name}@${e.release.newVersion}`,published:!1}}}const ve=t=>`https://pypi.org/pypi/${encodeURIComponent(t.toLowerCase())}/json`,xt=(t,e)=>e?.uvLockPath?h(t.dir,e.uvLockPath):h(t.dir,"uv.lock"),Vt=async(t,e)=>{let n;try{n=await M(t)}catch{return"no-root-pyproject"}if(n===void 0)return"no-root-pyproject";const r=n.tool?.uv?.workspace?.members;if(!Array.isArray(r)||r.length===0)return"no-workspace";const s=e.replace(/^\.\//,"").replaceAll("\\","/");for(const a of r){if(typeof a!="string")continue;const i=a.replace(/^\.\//,"").replaceAll("\\","/");if(i===s)return"member";if(i.endsWith("/*")){const o=i.slice(0,-2);if(s.startsWith(`${o}/`)&&!s.slice(o.length+1).includes("/"))return"member"}if(i.endsWith("/**")){const o=i.slice(0,-3);if(s===o||s.startsWith(`${o}/`))return"member"}}return"missing"},M=async t=>{const e=h(t,"pyproject.toml");let n;try{n=await A(e,"utf8")}catch(s){const{code:a}=s;if(a==="ENOENT")return;throw new l({cause:s,code:"BUMP_FILE_INVALID",file:e,message:`Failed to read ${e}: ${s.message}`})}const{parse:r}=await import("./index5.js");try{return r(n)}catch(s){throw new l({cause:s,code:"BUMP_FILE_INVALID",file:e,message:`Failed to parse ${e}: ${s.message}`})}},Ie=async(t,e)=>{try{return(await t.run("uv",["--version"],{cwd:e,silent:!0})).exitCode===0}catch{return!1}},Ce=t=>{const e=t?.["build-system"]?.["build-backend"];return e?e.startsWith("hatchling")?"hatch":e.startsWith("poetry.core")||e.startsWith("poetry_core")?"poetry":e.startsWith("pdm.backend")||e.startsWith("pdm_backend")?"pdm":e.startsWith("setuptools")?"setuptools":e.startsWith("uv_build")||e.startsWith("uv.build")?"uv":"unknown":"unknown"},Pe=(t,e)=>t==="uv"||t==="unknown"&&e?{backend:t,buildCommand:{args:["build"],binary:"uv"},hasUv:e,publishCommand:{args:["publish"],binary:"uv"}}:{backend:t,buildCommand:{args:["-m","build"],binary:"python"},hasUv:e,publishCommand:{args:["upload","dist/*"],binary:"twine"}},Se=(t,e)=>z({env:t,staticTokenVar:"TWINE_PASSWORD",workspaceConfig:e}),K=async(t,e)=>{try{const n=await j(ve(t),{headers:{Accept:"application/json"},httpProxy:e});return n.status===404||!n.ok?void 0:(await n.json())?.info?.version}catch{return}},q=(t,e)=>e?.pythonProjectDir?h(t.dir,e.pythonProjectDir):t.dir;class Ae extends N{id="python";async readPublishedVersion(e){const n=q(e.pkg,e.perPackageConfig),r=(await M(n).catch(()=>{}))?.project?.name??e.pkg.name.replace(/^@[^/]+\//,"");return K(r)}async publish(e){if(e.dryRun)return{output:`[dry-run / python] would publish ${e.pkg.name}@${e.release.newVersion}`,published:!0};const n=e.perPackageConfig??{},r=q(e.pkg,n),s=await M(r);if(s?.project?.dynamic?.includes("version"))throw new l({code:"CONFIG_INVALID",file:h(r,"pyproject.toml"),hint:"Dynamic versioning isn't supported by PythonVersionActions yet; use versionActions: 'shell' with your build backend's version-bump tool (e.g. `hatch version` or `poetry version` for non-vcs setups).",message:`${e.pkg.name}: pyproject.toml declares dynamic = ["version", ...]; PythonVersionActions requires a static [project] version.`,packageName:e.pkg.name});if(s?.project?.version&&s.project.version!==e.release.newVersion)throw new l({code:"BUMP_FILE_INVALID",file:h(r,"pyproject.toml"),hint:`Ensure the pyproject() preset is wired up for this package so the version literal in [project] is bumped before publish. Expected ${e.release.newVersion}, found ${s.project.version}.`,message:`${e.pkg.name}: pyproject.toml version ${s.project.version} differs from planned ${e.release.newVersion}.`,packageName:e.pkg.name});const a=s?.project?.name??e.pkg.name.replace(/^@[^/]+\//,"");if(await K(a,e.workspaceConfig?.httpProxy)===e.release.newVersion)return{alreadyPublished:!0,output:`[python] ${a}@${e.release.newVersion} already on PyPI`,published:!1};const i=await Ie(e.pm.runner,e.pkg.dir),o=Ce(s),c=Pe(o,i),d=Se(process.env,e.workspaceConfig);if(d==="missing")throw new l({code:"AUTH_MISSING",hint:["Set TWINE_PASSWORD to a PyPI API token (`TWINE_USERNAME=__token__` is injected automatically), OR","configure trusted publishing on PyPI and grant the workflow `permissions: id-token: write` so ACTIONS_ID_TOKEN_REQUEST_URL is exposed.","See https://docs.pypi.org/trusted-publishers/"].join(" "),message:`${e.pkg.name}: no PyPI credentials detected (neither TWINE_PASSWORD nor OIDC trusted-publishing env).`,packageName:e.pkg.name});const p=await e.pm.runner.run(c.buildCommand.binary,c.buildCommand.args,{cwd:r,silent:!1});if(p.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:`Inspect the ${c.buildCommand.binary} ${c.buildCommand.args.join(" ")} output above. Common causes: missing ${c.backend==="uv"?"uv":"build/setuptools/wheel"} dependency, broken pyproject.toml, source files missing from \`include\`.`,message:`${e.pkg.name}: build failed (${c.buildCommand.binary} ${c.buildCommand.args.join(" ")}): exit ${p.exitCode}. stderr: ${p.stderr.trim().slice(0,500)}`,packageName:e.pkg.name});const m={...process.env};d==="token"&&!m.TWINE_USERNAME&&(m.TWINE_USERNAME="__token__");const y=await e.pm.runner.run(c.publishCommand.binary,c.publishCommand.args,{cwd:r,env:m,silent:!1});if(y.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:`Inspect the ${c.publishCommand.binary} output above. Common causes: invalid API token, version already published (this should have been caught by readPublishedVersion — file a vis bug), 2FA required without a token.`,message:`${e.pkg.name}: publish failed (${c.publishCommand.binary} ${c.publishCommand.args.join(" ")}): exit ${y.exitCode}. stderr: ${y.stderr.trim().slice(0,500)}`,packageName:e.pkg.name});return{output:`[python/${c.backend}${c.hasUv?"+uv":""}] published ${a}@${e.release.newVersion}`,published:!0}}}const Gt=Object.defineProperty({__proto__:null,PYPI_PROJECT_URL:ve,PythonVersionActions:Ae,checkUvWorkspaceMembership:Vt,detectAuthMode:Se,detectBackend:Ce,detectUv:Ie,fetchPyPiVersion:K,readPyProject:M,resolveBuildEnv:Pe,resolveProjectDir:q,resolveUvLockPath:xt},Symbol.toStringTag,{value:"Module"}),R=async(t,e,n,r)=>{const s=J(n,r),a=process.platform==="win32",i=a?"cmd":"sh",o=a?["/c",s]:["-c",s];return t.run(i,o,{cwd:e,silent:!1})};class Ot extends N{id="shell";async readPublishedVersion(e){const n=e.perPackageConfig??{},{workspaceConfig:r}=e;if(!r)return;const s=W(e.pkg.name,n,r);if(!s.checkPublished)return;const a=await R(e.pm.runner,e.pkg.dir,s.checkPublished,{name:e.pkg.name,version:e.pkg.version});if(a.exitCode!==0)return;const i=a.stdout.trim();return/\b\d+\.\d+\.\d+(?:[-+][\w.+-]+)?\b/.exec(i)?.[0]}async publish(e){if(e.dryRun)return{output:`[dry-run / shell] would publish ${e.pkg.name}@${e.release.newVersion}`,published:!0};const{workspaceConfig:n}=e,r=e.perPackageConfig??{};if(!n)throw new l({code:"CONFIG_INVALID",message:`Shell publish actions for ${e.pkg.name} require a workspace config (release.allowCustomCommands gate).`,packageName:e.pkg.name});const s=W(e.pkg.name,r,n);if(!s.publishCommand)throw new l({code:"CONFIG_INVALID",hint:`Set release.allowCustomCommands (workspace-wide boolean or an allow-list including "${e.pkg.name}") and configure release.packages["${e.pkg.name}"].publishCommand.`,message:`Shell publish actions for ${e.pkg.name} require a publishCommand AND the trust gate to permit it.`,packageName:e.pkg.name});const a={name:e.pkg.name,registry:e.registry,tag:e.tag,version:e.release.newVersion};if(s.checkPublished){const o=await R(e.pm.runner,e.pkg.dir,s.checkPublished,a);if(o.exitCode===0&&/\b\d+\.\d+\.\d+(?:[-+][\w.+-]+)?\b/.exec(o.stdout.trim())?.[0]===e.release.newVersion)return{alreadyPublished:!0,output:`[shell] ${e.pkg.name}@${e.release.newVersion} already on the registry`,published:!1}}if(s.buildCommand){const o=await R(e.pm.runner,e.pkg.dir,s.buildCommand,a);if(o.exitCode!==0)throw new l({code:"PUBLISH_FAILED",message:`buildCommand failed for ${e.pkg.name}: exit ${o.exitCode}. stderr: ${o.stderr.trim().slice(0,500)}`,packageName:e.pkg.name})}const i=Array.isArray(s.publishCommand)?s.publishCommand:[s.publishCommand];for(const o of i){const c=await R(e.pm.runner,e.pkg.dir,o,a);if(c.exitCode!==0)throw new l({code:"PUBLISH_FAILED",hint:"Inspect the publishCommand output above. Common causes: missing auth token, registry unreachable, version already published (re-run safe — `checkPublished` short-circuits subsequent runs).",message:`publishCommand failed for ${e.pkg.name}@${e.release.newVersion}: exit ${c.exitCode}. stderr: ${c.stderr.trim().slice(0,500)}`,packageName:e.pkg.name})}return{output:`[shell] published ${e.pkg.name}@${e.release.newVersion}`,published:!0}}}const Bt=t=>{switch(t){case"cargo":return new at;case"container":return new lt;case"jsr":return new gt;case"maven":return new $t;case"native-addon":return new Pt;case"private":return new jt;case"python":return new Ae;case"shell":return new Ot;default:return new $e}};export{be as a,fe as b,Bt as c,Ue as d,Tt as e,Ut as f,Gt as g,Ke as p,Y as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as c}from"../packem_shared/main-B3juSU5z.js";import{redactTokens as o}from"./security.js";const h=()=>({run:async(s,t,r)=>{try{const e=await c(s,[...t],{nodeOptions:{cwd:r.cwd,env:{...process.env,...r.env},stdio:r.silent?["ignore","pipe","pipe"]:"inherit"},throwOnError:!1});return{exitCode:typeof e.exitCode=="number"?e.exitCode:-1,stderr:o(e.stderr??""),stdout:o(e.stdout??"")}}catch(e){return{exitCode:-1,stderr:o(e.message),stdout:""}}}}),f=()=>new a;class a{handlers=[];on(t,r,e){this.handlers.push({argsPrefix:r,command:t,respond:e})}async run(t,r,e){for(const n of this.handlers)if(!(n.command!==t||r.length<n.argsPrefix.length)&&n.argsPrefix.every((d,i)=>d===r[i]))return n.respond(e.cwd);return{exitCode:0,stderr:"",stdout:""}}}export{a as MockRunner,f as createMockRunner,h as createShellRunner};
|
|
1
|
+
import{k as c}from"../packem_shared/main-B3juSU5z.js";import{redactTokens as o}from"./security.js";const h=()=>({run:async(s,t,r)=>{try{const e=await c(s,[...t],{nodeOptions:{cwd:r.cwd,env:{...process.env,COREPACK_ENABLE_DOWNLOAD_PROMPT:"0",...r.env},stdio:r.silent?["ignore","pipe","pipe"]:"inherit"},throwOnError:!1});return{exitCode:typeof e.exitCode=="number"?e.exitCode:-1,stderr:o(e.stderr??""),stdout:o(e.stdout??"")}}catch(e){return{exitCode:-1,stderr:o(e.message),stdout:""}}}}),f=()=>new a;class a{handlers=[];on(t,r,e){this.handlers.push({argsPrefix:r,command:t,respond:e})}async run(t,r,e){for(const n of this.handlers)if(!(n.command!==t||r.length<n.argsPrefix.length)&&n.argsPrefix.every((d,i)=>d===r[i]))return n.respond(e.cwd);return{exitCode:0,stderr:"",stdout:""}}}export{a as MockRunner,f as createMockRunner,h as createShellRunner};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E as g}from"../packem_shared/index.server-J83sowC4.js";import{p as c}from"./cli-main.js";import{s as $}from"../packem_shared/scan-progress-
|
|
1
|
+
import{E as g}from"../packem_shared/index.server-J83sowC4.js";import{p as c}from"./cli-main.js";import{s as $}from"../packem_shared/scan-progress-YRpDs90j.js";import{s as w,D as v}from"../packem_shared/advisories-CefYKEPe.js";const S=t=>t?.security?.audit?.advisories??{},D=t=>t?t.split(",").map(r=>r.trim()).filter(r=>r.length>0):["npm"],b=async({logger:t,options:r,visConfig:h,workspaceRoot:d})=>{if(!d)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const l=r.format==="json",u=S(h),m=r.source??u.source??v,p=D(r.ecosystem),y=p.map(s=>({id:s,label:`Sync ${s} advisories`})),n=$(y,{live:!l}),i=[];try{for(const s of p){n.start(s);const o=Date.now();try{const e=await w({allowedHosts:u.allowedHosts,dbPath:r.db,ecosystem:s,force:!!r.force,source:m,workspaceRoot:d});i.push({ecosystem:s,result:e}),e.upToDate?n.finish(s,"ok",`up to date · ${f(Date.now()-o)}`):n.finish(s,"ok",`${e.advisoriesIngested.toLocaleString()} advisories · ${f(e.durationMs)}`)}catch(e){const a=e instanceof Error?e.message:String(e);i.push({ecosystem:s,error:a}),n.finish(s,"error",a)}}}finally{n.stop()}if(l){const s={ecosystems:i.map(o=>({advisoriesIngested:o.result?.advisoriesIngested??0,dbPath:o.result?.dbPath??null,durationMs:o.result?.durationMs??0,ecosystem:o.ecosystem,error:o.error??null,upToDate:o.result?.upToDate??!1})),source:m};process.stdout.write(`${JSON.stringify(s,void 0,2)}
|
|
2
2
|
`)}else{const s=i.filter(a=>a.error),o=i.filter(a=>a.result),e=o[0];e?.result?.dbPath&&c.info(g(`DB: ${e.result.dbPath}`)),s.length===0?c.success(`Synced ${o.length} ecosystem${o.length===1?"":"s"}.`):c.error(`${s.length} ecosystem${s.length===1?"":"s"} failed to sync.`)}i.some(s=>s.error)&&(process.exitCode=1)},f=t=>t>=1e3?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`,R=b;export{R as advisoriesSyncExecute};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e}from"./cli-main.js";import{
|
|
1
|
+
import{p as e}from"./cli-main.js";import{A as u}from"../packem_shared/pm-runner-CQcraCcu.js";import{O as g}from"../packem_shared/native-config-sync-BFDVK9LH.js";import{S as l}from"../packem_shared/min-release-age-C71MO72F.js";const y=new Set(["bun","npm","pnpm","yarn"]),k=({options:r,visConfig:c,workspaceRoot:f})=>{const s=f??process.cwd(),n=u(s);if(!y.has(n.name)){e.warn(`Package manager '${n.name}' has no native security config to sync.`);return}if(!c?.security){e.warn("vis.config has no `security` block — nothing to sync.");return}const t=c.security.policies??{},a=Object.fromEntries(Object.entries(t.installScripts?.allow??{}).filter(([,o])=>o)),m=t.firstSeen?.minutes,p=t.firstSeen?.exclude??[],i=[];if(Object.keys(a).length>0&&!r.skipAllowBuilds&&i.push(...g(n.name,s,a)),r.skipMinReleaseAge||i.push(...l(n.name,s,m,p)),i.length===0){e.success("Nothing to sync — vis.config and native PM config are aligned.");return}e.info(`Syncing vis.config security settings to ${n.name} native config…
|
|
2
2
|
`);for(const o of i)e.success(` ${o}`)};export{k as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as m}from"node:module";import{m as d,f as p,T as v}from"../packem_shared/index-
|
|
2
|
-
`),i}catch{return!1}},D=({options:o,workspaceRoot:t})=>{const s=t??process.cwd();if(o.status){switch(l(s)){case"installed":{e.success(`Preinstall tripwire is installed (${n}).`),e.info("Removing 'ignore-scripts=true' will cause future installs to fail loudly.");break}case"missing":{e.warn("Preinstall tripwire is not installed."),e.info(`Run 'vis security tripwire' to add ${n} as a devDependency.`);break}default:e.error("No package.json found at the workspace root."),process.exitCode=1}return}if(o.remove){
|
|
1
|
+
import{createRequire as m}from"node:module";import{m as d,f as p,T as v}from"../packem_shared/index-CE6MsgcV.js";import{p as e}from"./cli-main.js";import{A as h}from"../packem_shared/pm-runner-CQcraCcu.js";import{a as u}from"../packem_shared/readJsonSync-CvkZyKmL-ihoybKvs.js";const g=m(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=o=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[t,s]=c.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return c.getBuiltinModule(o)}return g(o)},{spawnSync:w}=y("node:child_process"),n="@lavamoat/preinstall-always-fail",l=o=>{const t=d(o,"package.json");if(!p(t))return"no-package-json";try{const s=u(t);if(s.devDependencies?.[n]||s.dependencies?.[n])return"installed"}catch{}return"missing"},$=o=>{const t=d(o,"package.json");if(!p(t))return!1;try{const s=u(t);let i=!1;const a=r=>!r||!(n in r)?r:(i=!0,Object.fromEntries(Object.entries(r).filter(([f])=>f!==n)));return s.devDependencies=a(s.devDependencies),s.dependencies=a(s.dependencies),i&&v(t,`${JSON.stringify(s,null,2)}
|
|
2
|
+
`),i}catch{return!1}},D=({options:o,workspaceRoot:t})=>{const s=t??process.cwd();if(o.status){switch(l(s)){case"installed":{e.success(`Preinstall tripwire is installed (${n}).`),e.info("Removing 'ignore-scripts=true' will cause future installs to fail loudly.");break}case"missing":{e.warn("Preinstall tripwire is not installed."),e.info(`Run 'vis security tripwire' to add ${n} as a devDependency.`);break}default:e.error("No package.json found at the workspace root."),process.exitCode=1}return}if(o.remove){$(s)?e.success(`Removed ${n} from package.json. Run your PM's install to clean node_modules.`):e.info(`${n} was not present in package.json.`);return}if(l(s)==="installed"){e.info(`${n} is already installed.`);return}const i=h(s),a={bun:["add","-d",n],npm:["install","--save-dev",n],pnpm:["add","-D","-w",n],yarn:["add","-D",n]}[i.name];if(!a){e.error(`Cannot install tripwire — unsupported package manager '${i.name}'.`),process.exitCode=1;return}e.info(`Installing ${n} via ${i.name}…`);const r=w(i.name,a,{cwd:s,stdio:"inherit"});if(r.error){e.error(`Failed to install tripwire: ${r.error.message}`),process.exitCode=1;return}if(r.signal!==null){e.error(`${i.name} was terminated by signal ${r.signal}`),process.exitCode=1;return}if(r.status!==0){e.error(`${i.name} exited with code ${String(r.status)}`),process.exitCode=r.status??1;return}e.success(`Installed ${n} as a devDependency.`),e.notice(""),e.notice("How the tripwire works:"),e.notice(` ${n} declares a preinstall script that always fails.`),e.notice(" When 'ignore-scripts=true' is set (.npmrc / bunfig.toml / .yarnrc.yml),"),e.notice(" the script is skipped and installs succeed normally. If someone deletes"),e.notice(" that setting, the next install fails — loudly — instead of silently"),e.notice(" running every dependency's lifecycle scripts.")};export{D as default};
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
import{createRequire as $}from"node:module";import{m as U,H as W}from"../packem_shared/index-OQZQyN5R.js";import{transformTs as g}from"#native";const T=$(import.meta.url),n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=t=>{if(typeof n<"u"&&n.versions&&n.versions.node){const[r,s]=n.versions.node.split(".").map(Number);if(r>22||r===22&&s>=3||r===20&&s>=16)return n.getBuiltinModule(t)}return T(t)},{readFileSync:y,statSync:j,writeFileSync:S,unlinkSync:w}=l("node:fs"),R=l("node:module"),{fileURLToPath:a,pathToFileURL:f}=l("node:url"),b=/\.[cm]?tsx?$/;let d=!1,u=0,p=!1,m=!1;const H=()=>{m||(m=!0,process.setSourceMapsEnabled?.(!0))},L=t=>{const r=t.indexOf("?");return r===-1?t:t.slice(0,r)},x=t=>t.endsWith(".cts")?"commonjs":"module",h=[".ts",".tsx",".mts",".cts",".js",".mjs",".cjs",".json"],c=t=>{try{return j(t).isFile()}catch{return!1}},k=t=>{try{return j(t).isDirectory()}catch{return!1}},F=t=>{if(t.endsWith(".js"))return`${t.slice(0,-3)}.ts`;if(t.endsWith(".mjs"))return`${t.slice(0,-4)}.mts`;if(t.endsWith(".cjs"))return`${t.slice(0,-4)}.cts`},q=t=>{if(c(t))return t;const r=F(t);if(r!==void 0&&c(r))return r;for(const s of h)if(c(t+s))return t+s;if(k(t))for(const s of h){const o=`${t}/index${s}`;if(c(o))return o}},v=()=>{H();const{registerHooks:t}=R;return typeof t!="function"?!1:(d||(t({load(r,s,o){const e=L(r);if(e.startsWith("file:")&&b.test(e)){const i=a(e),{code:_}=g(i,y(i,"utf8"));return{format:x(i),shortCircuit:!0,source:_}}return o(r,s)},resolve(r,s,o){if((r.startsWith(".")||r.startsWith("/"))&&s.parentURL!==void 0){let e;try{e=new URL(r,s.parentURL)}catch{e=void 0}if(e?.protocol==="file:"){const i=q(a(e));if(i!==void 0)return{shortCircuit:!0,url:f(i).href}}}return o(r,s)}}),d=!0),!0)},C=()=>v(),P=async t=>{if(u+=1,v())return await import(`${f(t).href}?v=${String(u)}`);p||(p=!0,process.stderr.write(`vis: Node < 22.15 has no module.registerHooks — only the entry file is transpiled; local TypeScript imports won't load. Upgrade to Node >= 22.15 for full support.
|
|
2
|
-
|
|
1
|
+
import{createRequire as ge}from"node:module";import{v as z,z as ve,s as we,U as ke,L as xe,B as R,H as K,y as Cu,e as se,m as I,A as Mu,g as Bu,w as $e,h as Te,f as _,F as hu}from"../packem_shared/index-CE6MsgcV.js";import{parse as Se}from"./index5.js";import{E as Ku}from"../packem_shared/public-api-WqUCiyIe.js";import{transformTs as ne}from"#native";const ye=ge(import.meta.url),uu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wu=u=>{if(typeof uu<"u"&&uu.versions&&uu.versions.node){const[e,o]=uu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return uu.getBuiltinModule(u)}return ye(u)},{readFileSync:Vu,statSync:ie,writeFileSync:be,unlinkSync:Oe}=Wu("node:fs"),Pu=Wu("node:module"),{createRequire:Z}=Pu,{fileURLToPath:fu,pathToFileURL:mu}=Wu("node:url");var Ne=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ie=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Pe=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,vu={Space_Separator:Ne,ID_Start:Ie,ID_Continue:Pe},T={isSpaceSeparator(u){return typeof u=="string"&&vu.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||vu.ID_Start.test(u))},isIdContinueChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u===""||u===""||vu.ID_Continue.test(u))},isDigit(u){return typeof u=="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u=="string"&&/[0-9A-Fa-f]/.test(u)}};let ju,P,V,gu,J,U,N,Ju,au;var je=function(u,e){ju=String(u),P="start",V=[],gu=0,J=1,U=0,N=void 0,Ju=void 0,au=void 0;do N=Le(),Ue[P]();while(N.type!=="eof");return typeof e=="function"?Lu({"":au},"",e):au};function Lu(u,e,o){const t=u[e];if(t!=null&&typeof t=="object")if(Array.isArray(t))for(let r=0;r<t.length;r++){const D=String(r),i=Lu(t,D,o);i===void 0?delete t[D]:Object.defineProperty(t,D,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(const r in t){const D=Lu(t,r,o);D===void 0?delete t[r]:Object.defineProperty(t,r,{value:D,writable:!0,enumerable:!0,configurable:!0})}return o.call(u,e,t)}let h,m,cu,W,b;function Le(){for(h="default",m="",cu=!1,W=1;;){b=M();const u=De[h]();if(u)return u}}function M(){if(ju[gu])return String.fromCodePoint(ju.codePointAt(gu))}function s(){const u=M();return u===`
|
|
2
|
+
`?(J++,U=0):u?U+=u.length:U++,u&&(gu+=u.length),u}const De={default(){switch(b){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
3
|
+
`:case"\r":case"\u2028":case"\u2029":s();return;case"/":s(),h="comment";return;case void 0:return s(),k("eof")}if(T.isSpaceSeparator(b)){s();return}return De[P]()},comment(){switch(b){case"*":s(),h="multiLineComment";return;case"/":s(),h="singleLineComment";return}throw x(s())},multiLineComment(){switch(b){case"*":s(),h="multiLineCommentAsterisk";return;case void 0:throw x(s())}s()},multiLineCommentAsterisk(){switch(b){case"*":s();return;case"/":s(),h="default";return;case void 0:throw x(s())}s(),h="multiLineComment"},singleLineComment(){switch(b){case`
|
|
4
|
+
`:case"\r":case"\u2028":case"\u2029":s(),h="default";return;case void 0:return s(),k("eof")}s()},value(){switch(b){case"{":case"[":return k("punctuator",s());case"n":return s(),q("ull"),k("null",null);case"t":return s(),q("rue"),k("boolean",!0);case"f":return s(),q("alse"),k("boolean",!1);case"-":case"+":s()==="-"&&(W=-1),h="sign";return;case".":m=s(),h="decimalPointLeading";return;case"0":m=s(),h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m=s(),h="decimalInteger";return;case"I":return s(),q("nfinity"),k("numeric",1/0);case"N":return s(),q("aN"),k("numeric",NaN);case'"':case"'":cu=s()==='"',m="",h="string";return}throw x(s())},identifierNameStartEscape(){if(b!=="u")throw x(s());s();const u=_u();switch(u){case"$":case"_":break;default:if(!T.isIdStartChar(u))throw zu();break}m+=u,h="identifierName"},identifierName(){switch(b){case"$":case"_":case"":case"":m+=s();return;case"\\":s(),h="identifierNameEscape";return}if(T.isIdContinueChar(b)){m+=s();return}return k("identifier",m)},identifierNameEscape(){if(b!=="u")throw x(s());s();const u=_u();switch(u){case"$":case"_":case"":case"":break;default:if(!T.isIdContinueChar(u))throw zu();break}m+=u,h="identifierName"},sign(){switch(b){case".":m=s(),h="decimalPointLeading";return;case"0":m=s(),h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m=s(),h="decimalInteger";return;case"I":return s(),q("nfinity"),k("numeric",W*(1/0));case"N":return s(),q("aN"),k("numeric",NaN)}throw x(s())},zero(){switch(b){case".":m+=s(),h="decimalPoint";return;case"e":case"E":m+=s(),h="decimalExponent";return;case"x":case"X":m+=s(),h="hexadecimal";return}return k("numeric",W*0)},decimalInteger(){switch(b){case".":m+=s(),h="decimalPoint";return;case"e":case"E":m+=s(),h="decimalExponent";return}if(T.isDigit(b)){m+=s();return}return k("numeric",W*Number(m))},decimalPointLeading(){if(T.isDigit(b)){m+=s(),h="decimalFraction";return}throw x(s())},decimalPoint(){switch(b){case"e":case"E":m+=s(),h="decimalExponent";return}if(T.isDigit(b)){m+=s(),h="decimalFraction";return}return k("numeric",W*Number(m))},decimalFraction(){switch(b){case"e":case"E":m+=s(),h="decimalExponent";return}if(T.isDigit(b)){m+=s();return}return k("numeric",W*Number(m))},decimalExponent(){switch(b){case"+":case"-":m+=s(),h="decimalExponentSign";return}if(T.isDigit(b)){m+=s(),h="decimalExponentInteger";return}throw x(s())},decimalExponentSign(){if(T.isDigit(b)){m+=s(),h="decimalExponentInteger";return}throw x(s())},decimalExponentInteger(){if(T.isDigit(b)){m+=s();return}return k("numeric",W*Number(m))},hexadecimal(){if(T.isHexDigit(b)){m+=s(),h="hexadecimalInteger";return}throw x(s())},hexadecimalInteger(){if(T.isHexDigit(b)){m+=s();return}return k("numeric",W*Number(m))},string(){switch(b){case"\\":s(),m+=_e();return;case'"':if(cu)return s(),k("string",m);m+=s();return;case"'":if(!cu)return s(),k("string",m);m+=s();return;case`
|
|
5
|
+
`:case"\r":throw x(s());case"\u2028":case"\u2029":We(b);break;case void 0:throw x(s())}m+=s()},start(){switch(b){case"{":case"[":return k("punctuator",s())}h="value"},beforePropertyName(){switch(b){case"$":case"_":m=s(),h="identifierName";return;case"\\":s(),h="identifierNameStartEscape";return;case"}":return k("punctuator",s());case'"':case"'":cu=s()==='"',h="string";return}if(T.isIdStartChar(b)){m+=s(),h="identifierName";return}throw x(s())},afterPropertyName(){if(b===":")return k("punctuator",s());throw x(s())},beforePropertyValue(){h="value"},afterPropertyValue(){switch(b){case",":case"}":return k("punctuator",s())}throw x(s())},beforeArrayValue(){if(b==="]")return k("punctuator",s());h="value"},afterArrayValue(){switch(b){case",":case"]":return k("punctuator",s())}throw x(s())},end(){throw x(s())}};function k(u,e){return{type:u,value:e,line:J,column:U}}function q(u){for(const e of u){if(M()!==e)throw x(s());s()}}function _e(){switch(M()){case"b":return s(),"\b";case"f":return s(),"\f";case"n":return s(),`
|
|
6
|
+
`;case"r":return s(),"\r";case"t":return s()," ";case"v":return s(),"\v";case"0":if(s(),T.isDigit(M()))throw x(s());return"\0";case"x":return s(),Re();case"u":return s(),_u();case`
|
|
7
|
+
`:case"\u2028":case"\u2029":return s(),"";case"\r":return s(),M()===`
|
|
8
|
+
`&&s(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw x(s());case void 0:throw x(s())}return s()}function Re(){let u="",e=M();if(!T.isHexDigit(e)||(u+=s(),e=M(),!T.isHexDigit(e)))throw x(s());return u+=s(),String.fromCodePoint(parseInt(u,16))}function _u(){let u="",e=4;for(;e-- >0;){const o=M();if(!T.isHexDigit(o))throw x(s());u+=s()}return String.fromCodePoint(parseInt(u,16))}const Ue={start(){if(N.type==="eof")throw H();wu()},beforePropertyName(){switch(N.type){case"identifier":case"string":Ju=N.value,P="afterPropertyName";return;case"punctuator":Au();return;case"eof":throw H()}},afterPropertyName(){if(N.type==="eof")throw H();P="beforePropertyValue"},beforePropertyValue(){if(N.type==="eof")throw H();wu()},beforeArrayValue(){if(N.type==="eof")throw H();if(N.type==="punctuator"&&N.value==="]"){Au();return}wu()},afterPropertyValue(){if(N.type==="eof")throw H();switch(N.value){case",":P="beforePropertyName";return;case"}":Au()}},afterArrayValue(){if(N.type==="eof")throw H();switch(N.value){case",":P="beforeArrayValue";return;case"]":Au()}},end(){}};function wu(){let u;switch(N.type){case"punctuator":switch(N.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=N.value;break}if(au===void 0)au=u;else{const e=V[V.length-1];Array.isArray(e)?e.push(u):Object.defineProperty(e,Ju,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(u!==null&&typeof u=="object")V.push(u),Array.isArray(u)?P="beforeArrayValue":P="beforePropertyName";else{const e=V[V.length-1];e==null?P="end":Array.isArray(e)?P="afterArrayValue":P="afterPropertyValue"}}function Au(){V.pop();const u=V[V.length-1];u==null?P="end":Array.isArray(u)?P="afterArrayValue":P="afterPropertyValue"}function x(u){return qu(u===void 0?`JSON5: invalid end of input at ${J}:${U}`:`JSON5: invalid character '${ce(u)}' at ${J}:${U}`)}function H(){return qu(`JSON5: invalid end of input at ${J}:${U}`)}function zu(){return U-=5,qu(`JSON5: invalid identifier character at ${J}:${U}`)}function We(u){console.warn(`JSON5: '${ce(u)}' in strings is not valid ECMAScript; consider escaping`)}function ce(u){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[u])return e[u];if(u<" "){const o=u.charCodeAt(0).toString(16);return"\\x"+("00"+o).substring(o.length)}return u}function qu(u){const e=new SyntaxError(u);return e.lineNumber=J,e.columnNumber=U,e}var Ve=function(u,e,o){const t=[];let r="",D,i,c="",a;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(o=e.space,a=e.quote,e=e.replacer),typeof e=="function")i=e;else if(Array.isArray(e)){D=[];for(const C of e){let y;typeof C=="string"?y=C:(typeof C=="number"||C instanceof String||C instanceof Number)&&(y=String(C)),y!==void 0&&D.indexOf(y)<0&&D.push(y)}}return o instanceof Number?o=Number(o):o instanceof String&&(o=String(o)),typeof o=="number"?o>0&&(o=Math.min(10,Math.floor(o)),c=" ".substr(0,o)):typeof o=="string"&&(c=o.substr(0,10)),l("",{"":u});function l(C,y){let A=y[C];switch(A!=null&&(typeof A.toJSON5=="function"?A=A.toJSON5(C):typeof A.toJSON=="function"&&(A=A.toJSON(C))),i&&(A=i.call(y,C,A)),A instanceof Number?A=Number(A):A instanceof String?A=String(A):A instanceof Boolean&&(A=A.valueOf()),A){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof A=="string")return f(A);if(typeof A=="number")return String(A);if(typeof A=="object")return Array.isArray(A)?O(A):E(A)}function f(C){const y={"'":.1,'"':.2},A={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let w="";for(let n=0;n<C.length;n++){const d=C[n];switch(d){case"'":case'"':y[d]++,w+=d;continue;case"\0":if(T.isDigit(C[n+1])){w+="\\x00";continue}}if(A[d]){w+=A[d];continue}if(d<" "){let g=d.charCodeAt(0).toString(16);w+="\\x"+("00"+g).substring(g.length);continue}w+=d}const F=a||Object.keys(y).reduce((n,d)=>y[n]<y[d]?n:d);return w=w.replace(new RegExp(F,"g"),A[F]),F+w+F}function E(C){if(t.indexOf(C)>=0)throw TypeError("Converting circular structure to JSON5");t.push(C);let y=r;r=r+c;let A=D||Object.keys(C),w=[];for(const n of A){const d=l(n,C);if(d!==void 0){let g=$(n)+":";c!==""&&(g+=" "),g+=d,w.push(g)}}let F;if(w.length===0)F="{}";else{let n;if(c==="")n=w.join(","),F="{"+n+"}";else{let d=`,
|
|
9
|
+
`+r;n=w.join(d),F=`{
|
|
10
|
+
`+r+n+`,
|
|
11
|
+
`+y+"}"}}return t.pop(),r=y,F}function $(C){if(C.length===0)return f(C);const y=String.fromCodePoint(C.codePointAt(0));if(!T.isIdStartChar(y))return f(C);for(let A=y.length;A<C.length;A++)if(!T.isIdContinueChar(String.fromCodePoint(C.codePointAt(A))))return f(C);return C}function O(C){if(t.indexOf(C)>=0)throw TypeError("Converting circular structure to JSON5");t.push(C);let y=r;r=r+c;let A=[];for(let F=0;F<C.length;F++){const n=l(String(F),C);A.push(n!==void 0?n:"null")}let w;if(A.length===0)w="[]";else if(c==="")w="["+A.join(",")+"]";else{let F=`,
|
|
12
|
+
`+r,n=A.join(F);w=`[
|
|
13
|
+
`+r+n+`,
|
|
14
|
+
`+y+"]"}return t.pop(),r=y,w}};const Me={parse:je,stringify:Ve};var Je=Me;function qe(u,e,o){const{beforeParse:t,buffer:r,compression:D,encoding:i="utf8",flag:c}={},a=z(u,{buffer:r,compression:D,encoding:i,flag:c}),l=typeof t=="function"?t(a):a;return Je.parse(l,e)}const He=Z(import.meta.url),eu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ke=u=>{if(typeof eu<"u"&&eu.versions&&eu.versions.node){const[e,o]=eu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return eu.getBuiltinModule(u)}return He(u)};Ke("node:fs/promises");const ze=Z(import.meta.url),tu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ge=u=>{if(typeof tu<"u"&&tu.versions&&tu.versions.node){const[e,o]=tu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return tu.getBuiltinModule(u)}return ze(u)};Ge("node:fs");function Qe(u,e=!1){const o=u.length;let t=0,r="",D=0,i=16,c=0,a=0,l=0,f=0,E=0;function $(n,d){let g=0,B=0;for(;g<n;){let p=u.charCodeAt(t);if(p>=48&&p<=57)B=B*16+p-48;else if(p>=65&&p<=70)B=B*16+p-65+10;else if(p>=97&&p<=102)B=B*16+p-97+10;else break;t++,g++}return g<n&&(B=-1),B}function O(n){t=n,r="",D=0,i=16,E=0}function C(){let n=t;if(u.charCodeAt(t)===48)t++;else for(t++;t<u.length&&G(u.charCodeAt(t));)t++;if(t<u.length&&u.charCodeAt(t)===46)if(t++,t<u.length&&G(u.charCodeAt(t)))for(t++;t<u.length&&G(u.charCodeAt(t));)t++;else return E=3,u.substring(n,t);let d=t;if(t<u.length&&(u.charCodeAt(t)===69||u.charCodeAt(t)===101))if(t++,(t<u.length&&u.charCodeAt(t)===43||u.charCodeAt(t)===45)&&t++,t<u.length&&G(u.charCodeAt(t))){for(t++;t<u.length&&G(u.charCodeAt(t));)t++;d=t}else E=3;return u.substring(n,d)}function y(){let n="",d=t;for(;;){if(t>=o){n+=u.substring(d,t),E=2;break}const g=u.charCodeAt(t);if(g===34){n+=u.substring(d,t),t++;break}if(g===92){if(n+=u.substring(d,t),t++,t>=o){E=2;break}switch(u.charCodeAt(t++)){case 34:n+='"';break;case 92:n+="\\";break;case 47:n+="/";break;case 98:n+="\b";break;case 102:n+="\f";break;case 110:n+=`
|
|
15
|
+
`;break;case 114:n+="\r";break;case 116:n+=" ";break;case 117:const B=$(4);B>=0?n+=String.fromCharCode(B):E=4;break;default:E=5}d=t;continue}if(g>=0&&g<=31)if(ru(g)){n+=u.substring(d,t),E=2;break}else E=6;t++}return n}function A(){if(r="",E=0,D=t,a=c,f=l,t>=o)return D=o,i=17;let n=u.charCodeAt(t);if(ku(n)){do t++,r+=String.fromCharCode(n),n=u.charCodeAt(t);while(ku(n));return i=15}if(ru(n))return t++,r+=String.fromCharCode(n),n===13&&u.charCodeAt(t)===10&&(t++,r+=`
|
|
16
|
+
`),c++,l=t,i=14;switch(n){case 123:return t++,i=1;case 125:return t++,i=2;case 91:return t++,i=3;case 93:return t++,i=4;case 58:return t++,i=6;case 44:return t++,i=5;case 34:return t++,r=y(),i=10;case 47:const d=t-1;if(u.charCodeAt(t+1)===47){for(t+=2;t<o&&!ru(u.charCodeAt(t));)t++;return r=u.substring(d,t),i=12}if(u.charCodeAt(t+1)===42){t+=2;const g=o-1;let B=!1;for(;t<g;){const p=u.charCodeAt(t);if(p===42&&u.charCodeAt(t+1)===47){t+=2,B=!0;break}t++,ru(p)&&(p===13&&u.charCodeAt(t)===10&&t++,c++,l=t)}return B||(t++,E=1),r=u.substring(d,t),i=13}return r+=String.fromCharCode(n),t++,i=16;case 45:if(r+=String.fromCharCode(n),t++,t===o||!G(u.charCodeAt(t)))return i=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=C(),i=11;default:for(;t<o&&w(n);)t++,n=u.charCodeAt(t);if(D!==t){switch(r=u.substring(D,t),r){case"true":return i=8;case"false":return i=9;case"null":return i=7}return i=16}return r+=String.fromCharCode(n),t++,i=16}}function w(n){if(ku(n)||ru(n))return!1;switch(n){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function F(){let n;do n=A();while(n>=12&&n<=15);return n}return{setPosition:O,getPosition:()=>t,scan:e?F:A,getToken:()=>i,getTokenValue:()=>r,getTokenOffset:()=>D,getTokenLength:()=>t-D,getTokenStartLine:()=>a,getTokenStartCharacter:()=>D-f,getTokenError:()=>E}}function ku(u){return u===32||u===9}function ru(u){return u===10||u===13}function G(u){return u>=48&&u<=57}var Gu;(function(u){u[u.lineFeed=10]="lineFeed",u[u.carriageReturn=13]="carriageReturn",u[u.space=32]="space",u[u._0=48]="_0",u[u._1=49]="_1",u[u._2=50]="_2",u[u._3=51]="_3",u[u._4=52]="_4",u[u._5=53]="_5",u[u._6=54]="_6",u[u._7=55]="_7",u[u._8=56]="_8",u[u._9=57]="_9",u[u.a=97]="a",u[u.b=98]="b",u[u.c=99]="c",u[u.d=100]="d",u[u.e=101]="e",u[u.f=102]="f",u[u.g=103]="g",u[u.h=104]="h",u[u.i=105]="i",u[u.j=106]="j",u[u.k=107]="k",u[u.l=108]="l",u[u.m=109]="m",u[u.n=110]="n",u[u.o=111]="o",u[u.p=112]="p",u[u.q=113]="q",u[u.r=114]="r",u[u.s=115]="s",u[u.t=116]="t",u[u.u=117]="u",u[u.v=118]="v",u[u.w=119]="w",u[u.x=120]="x",u[u.y=121]="y",u[u.z=122]="z",u[u.A=65]="A",u[u.B=66]="B",u[u.C=67]="C",u[u.D=68]="D",u[u.E=69]="E",u[u.F=70]="F",u[u.G=71]="G",u[u.H=72]="H",u[u.I=73]="I",u[u.J=74]="J",u[u.K=75]="K",u[u.L=76]="L",u[u.M=77]="M",u[u.N=78]="N",u[u.O=79]="O",u[u.P=80]="P",u[u.Q=81]="Q",u[u.R=82]="R",u[u.S=83]="S",u[u.T=84]="T",u[u.U=85]="U",u[u.V=86]="V",u[u.W=87]="W",u[u.X=88]="X",u[u.Y=89]="Y",u[u.Z=90]="Z",u[u.asterisk=42]="asterisk",u[u.backslash=92]="backslash",u[u.closeBrace=125]="closeBrace",u[u.closeBracket=93]="closeBracket",u[u.colon=58]="colon",u[u.comma=44]="comma",u[u.dot=46]="dot",u[u.doubleQuote=34]="doubleQuote",u[u.minus=45]="minus",u[u.openBrace=123]="openBrace",u[u.openBracket=91]="openBracket",u[u.plus=43]="plus",u[u.slash=47]="slash",u[u.formFeed=12]="formFeed",u[u.tab=9]="tab"})(Gu||(Gu={}));new Array(20).fill(0).map((u,e)=>" ".repeat(e));const Q=200;new Array(Q).fill(0).map((u,e)=>`
|
|
17
|
+
`+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>`\r
|
|
18
|
+
`+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>`
|
|
19
|
+
`+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>`\r
|
|
20
|
+
`+" ".repeat(e));var yu;(function(u){u.DEFAULT={allowTrailingComma:!1}})(yu||(yu={}));function Ye(u,e=[],o=yu.DEFAULT){let t=null,r=[];const D=[];function i(c){Array.isArray(r)?r.push(c):t!==null&&(r[t]=c)}return Ze(u,{onObjectBegin:()=>{const c={};i(c),D.push(r),r=c,t=null},onObjectProperty:c=>{t=c},onObjectEnd:()=>{r=D.pop()},onArrayBegin:()=>{const c=[];i(c),D.push(r),r=c,t=null},onArrayEnd:()=>{r=D.pop()},onLiteralValue:i,onError:(c,a,l)=>{e.push({error:c,offset:a,length:l})}},o),r[0]}function Ze(u,e,o=yu.DEFAULT){const t=Qe(u,!1),r=[];let D=0;function i(v){return v?()=>D===0&&v(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function c(v){return v?S=>D===0&&v(S,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function a(v){return v?S=>D===0&&v(S,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>r.slice()):()=>!0}function l(v){return v?()=>{D>0?D++:v(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>r.slice())===!1&&(D=1)}:()=>!0}function f(v){return v?()=>{D>0&&D--,D===0&&v(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter())}:()=>!0}const E=l(e.onObjectBegin),$=a(e.onObjectProperty),O=f(e.onObjectEnd),C=l(e.onArrayBegin),y=f(e.onArrayEnd),A=a(e.onLiteralValue),w=c(e.onSeparator),F=i(e.onComment),n=c(e.onError),d=o&&o.disallowComments,g=o&&o.allowTrailingComma;function B(){for(;;){const v=t.scan();switch(t.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:d||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(v){case 12:case 13:d?p(10):F();break;case 16:p(1);break;case 15:case 14:break;default:return v}}}function p(v,S=[],Hu=[]){if(n(v),S.length+Hu.length>0){let pu=t.getToken();for(;pu!==17;){if(S.indexOf(pu)!==-1){B();break}else if(Hu.indexOf(pu)!==-1)break;pu=B()}}}function L(v){const S=t.getTokenValue();return v?A(S):($(S),r.push(S)),B(),!0}function X(){switch(t.getToken()){case 11:const v=t.getTokenValue();let S=Number(v);isNaN(S)&&(p(2),S=0),A(S);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return B(),!0}function Fu(){return t.getToken()!==10?(p(3,[],[2,5]),!1):(L(!1),t.getToken()===6?(w(":"),B(),Ou()||p(4,[],[2,5])):p(5,[],[2,5]),r.pop(),!0)}function Be(){E(),B();let v=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(v||p(4,[],[]),w(","),B(),t.getToken()===2&&g)break}else v&&p(6,[],[]);Fu()||p(4,[],[2,5]),v=!0}return O(),t.getToken()!==2?p(7,[2],[]):B(),!0}function he(){C(),B();let v=!0,S=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(S||p(4,[],[]),w(","),B(),t.getToken()===4&&g)break}else S&&p(6,[],[]);v?(r.push(0),v=!1):r[r.length-1]++,Ou()||p(4,[],[4,5]),S=!0}return y(),v||r.pop(),t.getToken()!==4?p(8,[4],[]):B(),!0}function Ou(){switch(t.getToken()){case 3:return he();case 1:return Be();case 10:return L(!0);default:return X()}}return B(),t.getToken()===17?o.allowEmptyContent?!0:(p(4,[],[]),!1):Ou()?(t.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}var Qu;(function(u){u[u.None=0]="None",u[u.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=2]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",u[u.InvalidUnicode=4]="InvalidUnicode",u[u.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",u[u.InvalidCharacter=6]="InvalidCharacter"})(Qu||(Qu={}));var Yu;(function(u){u[u.OpenBraceToken=1]="OpenBraceToken",u[u.CloseBraceToken=2]="CloseBraceToken",u[u.OpenBracketToken=3]="OpenBracketToken",u[u.CloseBracketToken=4]="CloseBracketToken",u[u.CommaToken=5]="CommaToken",u[u.ColonToken=6]="ColonToken",u[u.NullKeyword=7]="NullKeyword",u[u.TrueKeyword=8]="TrueKeyword",u[u.FalseKeyword=9]="FalseKeyword",u[u.StringLiteral=10]="StringLiteral",u[u.NumericLiteral=11]="NumericLiteral",u[u.LineCommentTrivia=12]="LineCommentTrivia",u[u.BlockCommentTrivia=13]="BlockCommentTrivia",u[u.LineBreakTrivia=14]="LineBreakTrivia",u[u.Trivia=15]="Trivia",u[u.Unknown=16]="Unknown",u[u.EOF=17]="EOF"})(Yu||(Yu={}));const bu=Ye;var Zu;(function(u){u[u.InvalidSymbol=1]="InvalidSymbol",u[u.InvalidNumberFormat=2]="InvalidNumberFormat",u[u.PropertyNameExpected=3]="PropertyNameExpected",u[u.ValueExpected=4]="ValueExpected",u[u.ColonExpected=5]="ColonExpected",u[u.CommaExpected=6]="CommaExpected",u[u.CloseBraceExpected=7]="CloseBraceExpected",u[u.CloseBracketExpected=8]="CloseBracketExpected",u[u.EndOfFileExpected=9]="EndOfFileExpected",u[u.InvalidCommentToken=10]="InvalidCommentToken",u[u.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=12]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",u[u.InvalidUnicode=14]="InvalidUnicode",u[u.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",u[u.InvalidCharacter=16]="InvalidCharacter"})(Zu||(Zu={}));function Xe(u){switch(u){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}const ut=(u,e,o,t)=>{if(u.length===0)return;const r=u[0],D=ve(e,r.offset),i=new we(`${Xe(r.error)} at offset ${r.offset}`);throw i.fileName=o,i.codeFrame=ke(e,{start:D},{tabWidth:!1,...t}),i},et=(u,e)=>{const{allowEmptyContent:o,allowTrailingComma:t=!0,beforeParse:r,buffer:D,color:i,compression:c,disallowComments:a,encoding:l="utf8",flag:f}=e??{},E=z(u,{buffer:D,compression:c,encoding:l,flag:f}),$=typeof r=="function"?r(E):E,O=[],C=bu($,O,{allowEmptyContent:o,allowTrailingComma:t,disallowComments:a});return ut(O,$,xe(u),{color:i}),C},tt=Z(import.meta.url),ou=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rt=u=>{if(typeof ou<"u"&&ou.versions&&ou.versions.node){const[e,o]=ou.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ou.getBuiltinModule(u)}return tt(u)};rt("node:fs/promises");const ot=Z(import.meta.url),iu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,it=u=>{if(typeof iu<"u"&&iu.versions&&iu.versions.node){const[e,o]=iu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return iu.getBuiltinModule(u)}return ot(u)};it("node:fs");const st=(u,e)=>{const o=z(u,{encoding:"utf8",...e});return Se(o)};function nt(u,e,o){const{buffer:t,compression:r,encoding:D="utf8",flag:i,...c}={},a=z(u,{buffer:t,compression:r,encoding:D,flag:i});return typeof e=="function"?Ku(a,e,c):Ku(a,c)}var su={},Xu;function Dt(){if(Xu)return su;Xu=1,Object.defineProperty(su,"__esModule",{value:!0});const u=F=>F!==null&&typeof F=="object",e=(F,n)=>Object.assign(new Error(`[${F}]: ${n}`),{code:F}),o="ERR_INVALID_PACKAGE_CONFIG",t="ERR_INVALID_PACKAGE_TARGET",r="ERR_PACKAGE_PATH_NOT_EXPORTED",D="ERR_PACKAGE_IMPORT_NOT_DEFINED",i=/^\d+$/,c=/^(\.{1,2}|node_modules)$/i,a=/\/|\\/;var l=(F=>(F.Export="exports",F.Import="imports",F))(l||{});const f=(F,n,d,g,B)=>{if(n==null)return[];if(typeof n=="string"){const[p,...L]=n.split(a);if(p===".."||L.some(X=>c.test(X)))throw e(t,`Invalid "${F}" target "${n}" defined in the package config`);return[B?n.replace(/\*/g,B):n]}if(Array.isArray(n))return n.flatMap(p=>f(F,p,d,g,B));if(u(n)){for(const p of Object.keys(n)){if(i.test(p))throw e(o,"Cannot contain numeric property keys");if(p==="default"||g.includes(p))return f(F,n[p],d,g,B)}return[]}throw e(t,`Invalid "${F}" target "${n}"`)},E="*",$=(F,n)=>{const d=F.indexOf(E),g=n.indexOf(E);return d===g?n.length>F.length:g>d};function O(F,n){if(!n.includes(E)&&F.hasOwnProperty(n))return[n];let d,g;for(const B of Object.keys(F))if(B.includes(E)){const[p,L,X]=B.split(E);if(X===void 0&&n.startsWith(p)&&n.endsWith(L)){const Fu=n.slice(p.length,-L.length||void 0);Fu&&(!d||$(d,B))&&(d=B,g=Fu)}}return[d,g]}const C=F=>Object.keys(F).reduce((n,d)=>{const g=d===""||d[0]!==".";if(n===void 0||n===g)return g;throw e(o,'"exports" cannot contain some keys starting with "." and some not')},void 0),y=/^\w+:/,A=(F,n,d)=>{if(!F)throw new Error('"exports" is required');n=n===""?".":`./${n}`,(typeof F=="string"||Array.isArray(F)||u(F)&&C(F))&&(F={".":F});const[g,B]=O(F,n),p=f(l.Export,F[g],n,d,B);if(p.length===0)throw e(r,n==="."?'No "exports" main defined':`Package subpath '${n}' is not defined by "exports"`);for(const L of p)if(!L.startsWith("./")&&!y.test(L))throw e(t,`Invalid "exports" target "${L}" defined in the package config`);return p},w=(F,n,d)=>{if(!F)throw new Error('"imports" is required');const[g,B]=O(F,n),p=f(l.Import,F[g],n,d,B);if(p.length===0)throw e(D,`Package import specifier "${n}" is not defined in package`);return p};return su.resolveExports=A,su.resolveImports=w,su}var ct=Dt();const at=Z(import.meta.url),nu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ae=u=>{if(typeof nu<"u"&&nu.versions&&nu.versions.node){const[e,o]=nu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return nu.getBuiltinModule(u)}return at(u)},{statSync:Eu}=ae("node:fs"),lt=ae("node:module"),le=(u=process.cwd())=>{const{findPnpApi:e}=lt;return e?e(u):void 0},Ct=u=>bu(z(u,{buffer:!1})),xu=(u,e,o,t)=>{const r=`resolveFromPackageJsonPath:${u}:${e}:${o?"yes":"no"}`;if(t?.has(r))return t.get(r);const D=Ct(u);if(!D)return;let i=e||"tsconfig.json";if(!o&&D.exports)try{const[c]=ct.resolveExports(D.exports,e,["require","types"]);i=c}catch{return!1}else!e&&D.tsconfig&&(i=D.tsconfig);return i=I(u,"..",i),t?.set(r,i),i},$u="package.json",Tu="tsconfig.json",Ft=(u,e,o)=>{let t=u;if(u===".."&&(t=I(t,Tu)),u.startsWith(".")&&(t=R(e,t)),Mu(t)){if(_(t)){if(Eu(t).isFile())return t}else if(!t.endsWith(".json")){const O=`${t}.json`;if(_(O))return O}return}const[r="",...D]=u.split("/"),i=r.startsWith("@")?`${r}/${String(D.shift())}`:r,c=D.join("/"),a=le(e);if(a){const{resolveRequest:O}=a;try{if(i===u){const C=O(I(i,$u),e);if(C){const y=xu(C,c,!1,o);if(y&&_(y))return y}}else{let C;try{C=O(u,e,{extensions:[".json"]})}catch{C=O(I(u,Tu),e)}if(C)return C}}catch{}}const l=hu(O=>{const C=I(R(O),"node_modules",i);if(_(C))return I("node_modules",i)},{cwd:e,type:"directory"});if(!l||!Eu(l).isDirectory())return;const f=I(l,$u);if(_(f)){const O=xu(f,c,!1,o);if(O===!1)return;if(O&&_(O)&&Eu(O).isFile())return O}const E=I(l,c),$=E.endsWith(".json");if(!$){const O=`${E}.json`;if(_(O))return O}if(_(E)){if(Eu(E).isDirectory()){const O=I(E,$u);if(_(O)){const y=xu(O,"",!0,o);if(y&&_(y))return y}const C=I(E,Tu);if(_(C))return C}else if($)return E}},pt=u=>{const e=R(u);let o;const t=le(e);if(t)try{o=t.resolveRequest("typescript/package.json",e)??void 0}catch{}if(o??=hu(r=>I(r,"node_modules","typescript","package.json"),{cwd:e,type:"file"}),!!o)try{const r=bu(z(o,{buffer:!1}));if(typeof r?.version=="string")return r.version}catch{}},ft=new Set(["node16","node18","node20","nodenext"]),Ce=u=>u!==void 0&&ft.has(u),At=(u,e)=>{!e.has("target")&&!Ce(u.module)&&(u.target="es3")},Et=(u,e)=>{!e.has("target")&&!Ce(u.module)&&(u.target="es5")},dt=(u,e)=>{e.has("strict")||(u.strict=!0),e.has("target")||(u.target="es2025"),e.has("module")||(u.module="es2022"),e.has("moduleResolution")||(u.moduleResolution="bundler"),e.has("rootDir")||(u.rootDir="."),e.has("types")||(u.types=[]),e.has("noUncheckedSideEffectImports")||(u.noUncheckedSideEffectImports=!0),e.has("libReplacement")||(u.libReplacement=!1),e.has("alwaysStrict")||(u.alwaysStrict=!0)},mt=[[4,At],[5,Et],[6,dt]],Bt=/^v?(\d+)/,ht=u=>{const e=Bt.exec(u);return e?Number(e[1]):void 0},gt=(u,e)=>{const o=ht(e);if(o===void 0)return;const t=new Set(Object.keys(u));for(const[r,D]of mt)r<=o&&D(u,t)},yt=u=>bu(z(u,{buffer:!1})),bt=u=>u.replaceAll("\\","/"),lu=u=>{const e=$e(u);return Te(e)?e:`./${e}`},Ru=["files","include","exclude"],ue=(u,e,o)=>{const t=I(e,o),r=Cu(u,t);return Bu(r)||"./"},Ot=(u,e,o)=>{const t=Cu(u,e);if(!t)return o;const r=o.startsWith("./")?o.slice(2):o;return`${t}/${r}`},vt=(u,e,o,t,r)=>{if(o.has(u))throw new Error(`Circularity detected while resolving configuration: ${u}`);o.add(u);const D=K(u),i=Fe(u,t,o,r);delete i.references;const{compilerOptions:c}=i;if(c){const{baseUrl:a}=c;a&&!a.startsWith(j)&&(c.baseUrl=ue(e,D,a));const{outDir:l}=c;l&&!l.startsWith(j)&&(c.outDir=ue(e,D,l))}for(const a of Ru){const l=i[a];l&&(i[a]=l.map(f=>f.startsWith(j)||Mu(f)?f:Ot(e,D,f)))}return i},Fe=(u,e,o=new Set,t=new Map)=>{let r;try{r=yt(u)??{}}catch(i){throw new Error(`Cannot resolve tsconfig at path: ${u}`,{cause:i})}if(typeof r!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const D=K(u);if(r.compilerOptions){const{compilerOptions:i}=r;i.paths&&!i.baseUrl&&(i[pe]=D)}if(r.extends){const i=Array.isArray(r.extends)?r.extends:[r.extends];delete r.extends;const c=i.toReversed();for(let a=0;a<c.length;a++){const l=c[a],f=Ft(l,D,t);if(!f)throw new se(`No such file or directory, for '${l}' found.`);const E=vt(f,D,new Set(o),e,t);E.compilerOptions?.rootDir!==void 0&&!E.compilerOptions.rootDir.startsWith(j)&&(E.compilerOptions.rootDir=I(K(f),E.compilerOptions.rootDir));const $={...E,...r,compilerOptions:{...E.compilerOptions,...r.compilerOptions}};E.watchOptions&&($.watchOptions={...E.watchOptions,...r.watchOptions}),r=$}}if(r.compilerOptions){const{compilerOptions:i}=r;for(const c of["baseUrl","rootDir"]){const a=i[c];if(a&&!a.startsWith(j)){const l=R(D,a);i[c]=lu(Cu(D,l))}}for(const c of["outDir","declarationDir"]){let a=i[c];a&&(Array.isArray(r.exclude)||(r.exclude=["outDir","declarationDir"].map(l=>{const f=i[l];if(f)return f.startsWith(j)||Mu(f)?f:I(D,f)}).filter(Boolean)),a.startsWith(j)||(a=lu(a)),i[c]=a)}}else r.compilerOptions={};if(r.include&&(r.include=r.include.map(i=>bt(i))),r.files&&(r.files=r.files.map(i=>i.startsWith(j)?i:lu(i))),r.watchOptions){const{watchOptions:i}=r;i.excludeDirectories&&(i.excludeDirectories=i.excludeDirectories.map(c=>Bu(R(D,c)))),i.excludeFiles&&(i.excludeFiles=i.excludeFiles.map(c=>Bu(R(D,c)))),i.watchFile&&(i.watchFile=i.watchFile.toLowerCase()),i.watchDirectory&&(i.watchDirectory=i.watchDirectory.toLowerCase()),i.fallbackPolling&&(i.fallbackPolling=i.fallbackPolling.toLowerCase())}if(r.compilerOptions.lib&&(r.compilerOptions.lib=r.compilerOptions.lib.map(i=>i.toLowerCase())),r.compilerOptions.module){let i=r.compilerOptions.module.toLowerCase();i==="es2015"&&(i="es6"),r.compilerOptions.module=i}if(r.compilerOptions.target){let i=r.compilerOptions.target.toLowerCase();i==="es2015"&&(i="es6"),r.compilerOptions.target=i}if(r.compilerOptions.moduleResolution){let i=r.compilerOptions.moduleResolution.toLowerCase();i==="node"&&(i="node10"),r.compilerOptions.moduleResolution=i}return r.compilerOptions.jsx&&(r.compilerOptions.jsx=r.compilerOptions.jsx.toLowerCase()),r.compilerOptions.moduleDetection&&(r.compilerOptions.moduleDetection=r.compilerOptions.moduleDetection.toLowerCase()),r.compilerOptions.importsNotUsedAsValues&&(r.compilerOptions.importsNotUsedAsValues=r.compilerOptions.importsNotUsedAsValues.toLowerCase()),r.compilerOptions.newLine&&(r.compilerOptions.newLine=r.compilerOptions.newLine.toLowerCase()),r},du=(u,e)=>{if(u.startsWith(j))return Bu(I(e,u.slice(j.length)))},wt=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Su=u=>u==="es2022"||u==="es2023"||u==="es2024"||u==="es2025"||u==="esnext",kt=(u,e)=>{if(u.compilerOptions===void 0)return u;if(u.compilerOptions.rewriteRelativeImportExtensions&&(u.compilerOptions.allowImportingTsExtensions??=!0),u.compilerOptions.composite&&(u.compilerOptions.declaration??=!0,u.compilerOptions.incremental??=!0),u.compilerOptions.checkJs&&(u.compilerOptions.allowJs??=!0),u.compilerOptions.verbatimModuleSyntax&&(u.compilerOptions.isolatedModules??=!0,u.compilerOptions.preserveConstEnums??=!0),["5.4","5.5","5.6","5.7","5.8","5.9","true"].includes(String(e?.tscCompatible))){if(u.compilerOptions.esModuleInterop===void 0&&(u.compilerOptions.module==="node16"||u.compilerOptions.module==="node18"||u.compilerOptions.module==="node20"||u.compilerOptions.module==="nodenext"||u.compilerOptions.module==="preserve")&&(u.compilerOptions.esModuleInterop=!0),u.compilerOptions.moduleDetection===void 0&&u.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(u.compilerOptions.module)&&(u.compilerOptions.moduleDetection="force"),u.compilerOptions.moduleResolution===void 0){let o="classic";if(u.compilerOptions.module!==void 0)switch(u.compilerOptions.module.toLocaleLowerCase()){case"commonjs":{o="node10";break}case"node16":case"node18":{o="node16";break}case"node20":{o="node16";break}case"nodenext":{o="nodenext";break}case"preserve":{o="bundler";break}}o!=="classic"&&(u.compilerOptions.moduleResolution=o)}if(u.compilerOptions.moduleResolution==="bundler"&&(u.compilerOptions.resolveJsonModule??=!0),u.compilerOptions.module&&["node20","nodenext"].includes(u.compilerOptions.module)&&(u.compilerOptions.resolveJsonModule??=!0),(u.compilerOptions.esModuleInterop||u.compilerOptions.module==="system"||u.compilerOptions.moduleResolution==="bundler")&&u.compilerOptions.allowSyntheticDefaultImports===void 0&&(u.compilerOptions.allowSyntheticDefaultImports=!0),["5.7","5.8","5.9","true"].includes(String(e?.tscCompatible))&&u.compilerOptions.moduleResolution){let o=!1;["bundler","node16","nodenext"].includes(u.compilerOptions.moduleResolution.toLocaleLowerCase())&&(o=!0),u.compilerOptions.resolvePackageJsonExports===void 0&&o&&(u.compilerOptions.resolvePackageJsonExports=!0),u.compilerOptions.resolvePackageJsonImports===void 0&&o&&(u.compilerOptions.resolvePackageJsonImports=!0)}if(u.compilerOptions.target===void 0){let o="es5";switch(u.compilerOptions.module){case"node16":case"node18":{o="es2022";break}case"node20":{o="es2023";break}case"nodenext":{o="esnext";break}}o!=="es5"&&(u.compilerOptions.target=o)}u.compilerOptions.useDefineForClassFields===void 0&&u.compilerOptions.target&&Su(u.compilerOptions.target)&&(u.compilerOptions.useDefineForClassFields=!0)}if(["5.6","5.7","5.8","5.9","true"].includes(String(e?.tscCompatible))&&u.compilerOptions.strict&&u.compilerOptions.strictBuiltinIteratorReturn===void 0&&(u.compilerOptions.strictBuiltinIteratorReturn=!0),["5.4","5.5","5.6","5.7","5.8","5.9","true"].includes(String(e?.tscCompatible))&&(u.compilerOptions.strict&&(u.compilerOptions.noImplicitAny=u.compilerOptions.noImplicitAny??!0,u.compilerOptions.noImplicitThis=u.compilerOptions.noImplicitThis??!0,u.compilerOptions.strictNullChecks=u.compilerOptions.strictNullChecks??!0,u.compilerOptions.strictFunctionTypes=u.compilerOptions.strictFunctionTypes??!0,u.compilerOptions.strictBindCallApply=u.compilerOptions.strictBindCallApply??!0,u.compilerOptions.strictPropertyInitialization=u.compilerOptions.strictPropertyInitialization??!0,u.compilerOptions.alwaysStrict=u.compilerOptions.alwaysStrict??!0),u.compilerOptions.useDefineForClassFields===void 0&&u.compilerOptions.target&&Su(u.compilerOptions.target)&&(u.compilerOptions.useDefineForClassFields=!0),u.compilerOptions.strict&&u.compilerOptions.useUnknownInCatchVariables===void 0&&(u.compilerOptions.useUnknownInCatchVariables=!0),u.compilerOptions.isolatedModules&&(u.compilerOptions.preserveConstEnums=u.compilerOptions.preserveConstEnums??!0)),String(e?.tscCompatible)==="6.0"){if(u.compilerOptions.moduleDetection===void 0&&u.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(u.compilerOptions.module)&&(u.compilerOptions.moduleDetection="force"),u.compilerOptions.moduleResolution===void 0&&u.compilerOptions.module){const o=u.compilerOptions.module.toLocaleLowerCase();o==="node16"||o==="node18"||o==="node20"?u.compilerOptions.moduleResolution="node16":o==="nodenext"&&(u.compilerOptions.moduleResolution="nodenext")}if(u.compilerOptions.useDefineForClassFields===void 0&&u.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(u.compilerOptions.module)&&u.compilerOptions.target&&!Su(u.compilerOptions.target)&&(u.compilerOptions.useDefineForClassFields=!1),u.compilerOptions.isolatedModules&&u.compilerOptions.preserveConstEnums===void 0&&(u.compilerOptions.preserveConstEnums=!0),u.compilerOptions.resolveJsonModule===void 0){const o=u.compilerOptions.module,t=u.compilerOptions.moduleResolution?.toLocaleLowerCase();!(o!==void 0&&["node20","nodenext"].includes(o)||t==="bundler")&&t&&(u.compilerOptions.resolveJsonModule=!1)}if(u.compilerOptions.moduleResolution){const o=u.compilerOptions.moduleResolution.toLocaleLowerCase();["bundler","node16","nodenext"].includes(o)||(u.compilerOptions.resolvePackageJsonExports??=!1,u.compilerOptions.resolvePackageJsonImports??=!1)}}return u.compileOnSave===!1&&delete u.compileOnSave,u},xt=(u,e)=>{const o=u?.typescriptVersion;if(!(o===!1||o===void 0))return o==="auto"?pt(e):o},j="${configDir}",pe=Symbol("implicitBaseUrl"),$t=(u,e)=>{const o=R(u),t=Fe(o,e),r=K(o),D=xt(e,r);D&&t.compilerOptions&>(t.compilerOptions,D);const{compilerOptions:i}=t;if(i){for(const a of wt){const l=i[a];if(l){const f=du(l,r);i[a]=f?lu(Cu(r,f)):l}}for(const a of["rootDirs","typeRoots"]){const l=i[a];l&&(i[a]=l.map(f=>{const E=du(f,r);return E?lu(Cu(r,E)):f}))}const{paths:c}=i;if(c){const a=Object.keys(c);for(let l=0;l<a.length;l++){const f=a[l];c[f]=c[f].map(E=>du(E,r)??E)}}}for(let c=0;c<Ru.length;c++){const a=Ru[c],l=t[a];l&&(t[a]=l.map(f=>du(f,r)??f))}return kt(t,e)},Tt=Z(import.meta.url),Du=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,St=u=>{if(typeof Du<"u"&&Du.versions&&Du.versions.node){const[e,o]=Du.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Du.getBuiltinModule(u)}return Tt(u)},{statSync:Nt}=St("node:fs"),It=new Map,Pt="tsconfig.json",jt=(u,e)=>{let o=0;try{o=Nt(u).mtimeMs}catch{}return`${u}::${String(e.tscCompatible)}::${String(e.typescriptVersion)}::${String(o)}`},Lt=(u,e={})=>{const o=e.configFileName??Pt,t=e.configFileName===void 0;let r=hu(o,{...u&&{cwd:u},type:"file"});if(!r&&t&&(r=hu("jsconfig.json",{...u&&{cwd:u},type:"file"})),!r)throw new se(t?`No such file or directory, for '${o}' or 'jsconfig.json' found.`:`No such file or directory, for '${o}' found.`);const D=e.cache&&typeof e.cache!="boolean"?e.cache:It,i=jt(r,e);if(e.cache&&D.has(i))return D.get(i);const c={config:$t(r,{tscCompatible:e.tscCompatible,typescriptVersion:e.typescriptVersion}),path:r};return e.cache&&D.set(i,c),c},_t=/\.[cm]?tsx?$/,Rt=[".yaml",".yml",".toml",".jsonc",".json5",".txt"],fe=/\.(?:ya?ml|toml|jsonc|json5|txt)$/,Ut=u=>u.endsWith(".yaml")||u.endsWith(".yml")?nt(u):u.endsWith(".toml")?st(u):u.endsWith(".jsonc")?et(u,{allowTrailingComma:!0}):u.endsWith(".json5")?qe(u):Vu(u,"utf8"),Uu=u=>u===void 0?"undefined":u===null?"null":typeof u=="number"?Number.isNaN(u)?"NaN":u===Number.POSITIVE_INFINITY?"Infinity":u===Number.NEGATIVE_INFINITY?"-Infinity":String(u):typeof u=="bigint"?`${u}n`:typeof u=="boolean"?String(u):typeof u=="string"?JSON.stringify(u):u instanceof Date?`new Date(${JSON.stringify(u.toISOString())})`:Array.isArray(u)?`[${u.map(e=>Uu(e)).join(",")}]`:typeof u=="object"?`{${Object.entries(u).map(([e,o])=>`${JSON.stringify(e)}:${Uu(o)}`).join(",")}}`:"null",Nu=new Map,Wt=(u,e)=>u.startsWith(j)?I(e,u.slice(j.length)):u,Vt=u=>{if(Nu.has(u))return Nu.get(u);let e;try{const{config:o,path:t}=Lt(u,{cache:!1}),r=K(t),D=o.compilerOptions,i=D?.paths??{};if(D!==void 0){const{baseUrl:c}=D;let a,l=!1;if(c===void 0){const f=D[pe];a=typeof f=="string"?f:r}else l=!0,a=R(r,Wt(c,r));e={hasBaseUrl:l,paths:i,pathsBase:a}}}catch{e=void 0}return Nu.set(u,e),e},Ae=(u,e)=>{const o=Vt(e);if(o===void 0)return;const{hasBaseUrl:t,pathsBase:r}=o,D=i=>Ee(i)??de(i);for(const[i,c]of Object.entries(o.paths)){const a=i.indexOf("*");if(a===-1){if(i===u)for(const E of c){const $=D(R(r,E));if($!==void 0)return $}continue}const l=i.slice(0,a),f=i.slice(a+1);if(u.startsWith(l)&&u.endsWith(f)&&u.length>=l.length+f.length){const E=u.slice(l.length,u.length-f.length);for(const $ of c){const O=$.replace("*",E),C=D(R(r,O));if(C!==void 0)return C}}}if(t){const i=D(R(r,u));if(i!==void 0)return i}};let ee=!1,Iu=0,te=!1,re=!1;const Mt=()=>{re||(re=!0,process.setSourceMapsEnabled?.(!0))},Jt=u=>{const e=u.indexOf("?");return e===-1?u:u.slice(0,e)},qt=u=>u.endsWith(".cts")?"commonjs":"module",oe=[".ts",".tsx",".mts",".cts",".js",".mjs",".cjs",".json"],Y=u=>{try{return ie(u).isFile()}catch{return!1}},Ht=u=>{try{return ie(u).isDirectory()}catch{return!1}},Kt=u=>{if(u.endsWith(".js"))return`${u.slice(0,-3)}.ts`;if(u.endsWith(".mjs"))return`${u.slice(0,-4)}.mts`;if(u.endsWith(".cjs"))return`${u.slice(0,-4)}.cts`},Ee=u=>{if(Y(u))return u;const e=Kt(u);if(e!==void 0&&Y(e))return e;for(const o of oe)if(Y(u+o))return u+o;if(Ht(u))for(const o of oe){const t=`${u}/index${o}`;if(Y(t))return t}},de=u=>{if(Y(u)&&fe.test(u))return u;for(const e of Rt)if(Y(u+e))return u+e},me=()=>{Mt();const{registerHooks:u}=Pu;return typeof u!="function"?!1:(ee||(u({load(e,o,t){const r=Jt(e);if(r.startsWith("file:")&&_t.test(r)){const D=fu(r),{code:i}=ne(D,Vu(D,"utf8"));return{format:qt(D),shortCircuit:!0,source:i}}if(r.startsWith("file:")&&fe.test(r)){const D=fu(r),i=Ut(D);return{format:"module",shortCircuit:!0,source:`export default ${Uu(i)};
|
|
21
|
+
`}}return t(e,o)},resolve(e,o,t){if((e.startsWith(".")||e.startsWith("/"))&&o.parentURL!==void 0){let r;try{r=new URL(e,o.parentURL)}catch{r=void 0}if(r?.protocol==="file:"){const D=fu(r),i=Ee(D)??de(D);if(i!==void 0)return{shortCircuit:!0,url:mu(i).href}}}if(o.parentURL!==void 0&&!e.startsWith(".")&&!e.startsWith("/")&&!e.startsWith("#")&&!e.startsWith("node:")&&!Pu.isBuiltin?.(e)){let r;try{r=K(fu(o.parentURL))}catch{r=void 0}if(r!==void 0){const D=Ae(e,r);if(D!==void 0)return{shortCircuit:!0,url:mu(D).href}}}return t(e,o)}}),ee=!0),!0)},zt=()=>me(),Gt=async u=>{if(Iu+=1,me())return await import(`${mu(u).href}?v=${String(Iu)}`);te||(te=!0,process.stderr.write(`vis: Node < 22.15 has no module.registerHooks — only the entry file is transpiled; local TypeScript imports won't load. Upgrade to Node >= 22.15 for full support.
|
|
22
|
+
`));const{code:e}=ne(u,Vu(u,"utf8")),o=I(K(u),`.vis-ts-${String(Iu)}-${String(process.pid)}.mjs`);be(o,e);try{return await import(mu(o).href)}finally{try{Oe(o)}catch{}}},er=Object.defineProperty({__proto__:null,importTs:Gt,registerTsHooks:zt,resolveTsConfigPaths:Ae},Symbol.toStringTag,{value:"Module"});export{Gt as i,st as m,zt as r,er as t,nt as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as b,p}from"./cli-main.js";import{w}from"../packem_shared/pm-runner-
|
|
1
|
+
import{D as b,p}from"./cli-main.js";import{A as w}from"../packem_shared/pm-runner-CQcraCcu.js";import{r as y,l as $,L as v}from"../packem_shared/dependency-scan-DpOFiZuI.js";import{v as C,m,f as S}from"../packem_shared/index-CE6MsgcV.js";import"../packem_shared/public-api-WqUCiyIe.js";import{e as x}from"../packem_shared/index-Cntyu-w8.js";const M=e=>{const s=e.trim();return s===""?!1:/^(?:git\+|git:\/\/|git@|ssh:\/\/)/i.test(s)||/^(?:github|gitlab|bitbucket|gist):/i.test(s)||/^[\w.-]+\/[\w.-]+(?:#.+)?$/.test(s)&&!s.includes("@")?!0:/^https?:\/\//i.test(s)},L=(e,s)=>{for(const t of s)if(t===e||t.endsWith("*")&&e.startsWith(t.slice(0,-1)))return!0;return!1},D=(e,s,t={})=>{const o=y(e,s);if(!o)return[];let i;try{i=C(m(e,o.file))}catch{return[]}const n=b(i,o.type);if(n.length===0)return[];const c=t.allow??[],l=[],f=new Set;for(const r of n){const a=`${r.name}@${r.version}`;for(const d of[r.dependencies,r.optionalDependencies])if(d){for(const[u,h]of Object.entries(d))if(!L(u,c))for(const k of h){if(!M(k))continue;const g=`${a}->${u}@${k}`;f.has(g)||(f.add(g),l.push({declaredBy:a,packageName:u,source:k}))}}}return l.sort((r,a)=>r.packageName.localeCompare(a.packageName)||r.declaredBy.localeCompare(a.declaredBy))},E=new Set(["firstSeen","publisherChange"]),N=e=>e.severity==="block"&&e.acceptedRisk===void 0,R=e=>{const s=e.security?.policies?.firstSeen?.minutes,t=typeof s=="number"&&s>0,o=e.security?.policies?.publisherChange?.mode==="no-downgrade",i=e.security?.blockExoticSubdeps===!0;return t||o||i},V=async e=>{const{offline:s=!1,packageManager:t,visConfig:o,workspaceRoot:i}=e,n=Date.now();if(!R(o))return{decisions:[],durationMs:Date.now()-n,entryCount:0,exoticViolations:[],lockfileMissing:!1,status:"skipped"};const c=y(i,t);if(!c||!S(m(i,c.file)))return{decisions:[],durationMs:Date.now()-n,entryCount:0,exoticViolations:[],lockfileMissing:!0,status:"fail"};const l=$(i,t,{includeDev:!0}),f=l.length,r=await x({offline:s,packageManager:t,packages:l,workspaceRoot:i},"install",{enabledPolicies:new Set(E),visConfig:o}),a=o.security?.blockExoticSubdeps===!0?D(i,t,{allow:o.security.exoticSubdepsAllow}):[],d=r.some(u=>N(u))||a.length>0;return{decisions:r,durationMs:Date.now()-n,entryCount:f,exoticViolations:a,lockfileMissing:!1,status:d?"fail":"pass"}},B=e=>e<1e3?`${String(e)}ms`:`${(e/1e3).toFixed(1)}s`,P=e=>{if(e.status==="skipped")return["– Lockfile supply-chain verification skipped (no firstSeen / publisherChange / blockExoticSubdeps policy configured)"];if(e.lockfileMissing)return["✗ Lockfile supply-chain verification failed — no lockfile found, the resolved closure cannot be attested"];const s=`(${String(e.entryCount)} ${e.entryCount===1?"entry":"entries"}, ${B(e.durationMs)})`;if(e.status==="pass")return[`✓ Lockfile passes supply-chain policies ${s}`];const t=[`✗ Lockfile failed supply-chain policy check ${s}`];for(const o of e.decisions)o.severity==="block"&&o.acceptedRisk===void 0&&t.push(` [${o.policy}] ${o.reason}`);for(const o of e.exoticViolations)t.push(` [blockExoticSubdeps] ${o.packageName} pulled from exotic source by ${o.declaredBy}: ${o.source}`);return t},J=async({options:e,visConfig:s,workspaceRoot:t})=>{const o=t??process.cwd(),i=w(o);if(!v[i.name]){p.warn(`Package manager '${i.name}' has no lockfile vis can verify.`);return}const n=await V({offline:!!e.offline,packageManager:i.name,visConfig:s??{},workspaceRoot:o});if(e.json){process.stdout.write(`${JSON.stringify(n,void 0,2)}
|
|
2
2
|
`),n.status==="fail"&&(process.exitCode=1);return}const[c,...l]=P(n);if(n.status==="skipped"){p.info(c);return}if(n.status==="pass"){p.success(c);return}p.error(c);for(const f of l)p.error(f);process.exitCode=1};export{J as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u}from"../packem_shared/index-Cg0IHaFI.js";import{c as $}from"./registry.js";import{r as w}from"./orchestrator.js";
|
|
2
|
-
`).map(l=>l.trim()).filter(Boolean);if(m.length===0)return{fallbackReason:`no git tag matched pattern "${s}" for ${e.name}; falling back to manifest version ${e.version}. (Pass --first-release to bootstrap.)`,resolvedFrom:"disk",version:e.version};const d=h(s,e),o=[];for(const l of m){const n=d.exec(l);n?.[1]&&
|
|
1
|
+
import{u as k}from"../packem_shared/index-Cg0IHaFI.js";import{c as $}from"./registry.js";import{r as w}from"./orchestrator.js";const R=e=>{let t=0;const i=[],r=()=>{if(t>=e)return;const s=i.shift();s&&(t+=1,s())};return async s=>new Promise((c,a)=>{const m=()=>{t-=1,r()},d=()=>{s().then(c,a).finally(m)};i.push(d),r()})},b=4,p=new Map,h=(e,t)=>{const i=m=>m.replaceAll(/[$()*+.?[\\\]^{|}]/g,String.raw`\$&`);let r="^",s=0;const c=/\{(name|unscopedName|version|major|minor|patch|date|channel)\}/g;let a;for(;(a=c.exec(e))!==null;){switch(r+=i(e.slice(s,a.index)),a[1]){case"name":{r+=i(t.name);break}case"unscopedName":{r+=i(t.name.replace(/^@[^/]+\//,""));break}case"version":{r+=String.raw`(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)`;break}default:r+="[^/]+"}s=a.index+a[0].length}return r+=`${i(e.slice(s))}$`,new RegExp(r)},y=async(e,t,i,r)=>{if(t==="disk")return{resolvedFrom:"disk",version:e.version};if(t==="registry"){const l=w(e,r.perPackageConfig??{}),n=await $(l).readPublishedVersion({pkg:e,pm:r.pm,workspaceConfig:r.workspaceConfig});return n&&k.valid(n)?{resolvedFrom:"registry",version:n}:{fallbackReason:n===void 0?`registry returned no version for ${e.name} (likely a 404 / not-yet-published); falling back to manifest version ${e.version}.`:`registry returned an invalid semver "${n}" for ${e.name}; falling back to manifest version ${e.version}.`,resolvedFrom:"disk",version:e.version}}const s=r.perPackageConfig?.releaseTagPattern??r.workspaceConfig?.releaseTagPattern??"{name}@{version}",c=s.replaceAll(/\{(name|unscopedName|version|major|minor|patch|date|channel)\}/g,(l,n)=>n==="name"?e.name:n==="unscopedName"?e.name.replace(/^@[^/]+\//,""):"*"),a=await r.runner.run("git",["tag","--list",c,"--sort=-v:refname"],{cwd:r.cwd,silent:!0});if(a.exitCode!==0)return{fallbackReason:`git tag --list ${c} failed (exit ${a.exitCode}); falling back to manifest version ${e.version}.`,resolvedFrom:"disk",version:e.version};const m=a.stdout.split(`
|
|
2
|
+
`).map(l=>l.trim()).filter(Boolean);if(m.length===0)return{fallbackReason:`no git tag matched pattern "${s}" for ${e.name}; falling back to manifest version ${e.version}. (Pass --first-release to bootstrap.)`,resolvedFrom:"disk",version:e.version};const d=h(s,e),o=[];for(const l of m){const n=d.exec(l);n?.[1]&&k.valid(n[1])&&o.push(n[1])}return o.length===0?{fallbackReason:`git tag pattern "${s}" matched tags but none yielded a valid semver for ${e.name}; falling back to manifest version ${e.version}.`,resolvedFrom:"disk",version:e.version}:(o.sort(k.rcompare),{resolvedFrom:"git-tag",version:o[0]})},C=(e,t,i)=>i?"disk":t?.currentVersionResolver??e?.currentVersionResolver??"disk",V=async(e,t,i,r,s)=>{const c=new Map,a=[],m=R(b),d=await Promise.all(e.map(async o=>m(async()=>{const l=r.get(o.name),n=C(i,l,s.firstRelease),g=s.skipRegistryLookup?"disk":n,v=`${o.name}@${g}@${o.version}`,u=p.get(v);if(u)return{mode:g,pkg:o,result:await u};const f=y(o,g,t,{...s,perPackageConfig:l,workspaceConfig:i});return p.set(v,f),f.catch(()=>{p.get(v)===f&&p.delete(v)}),{mode:g,pkg:o,result:await f}})));for(const{mode:o,pkg:l,result:n}of d)c.set(l.name,n.version),n.fallbackReason&&o!=="disk"&&a.push(`currentVersionResolver (${o}): ${n.fallbackReason}`);return{versions:c,warnings:a}};export{b as REGISTRY_LOOKUP_CONCURRENCY,h as compileReleaseTagRegex,y as resolveCurrentVersion,V as resolveCurrentVersionsForWorkspace,C as resolveModeForPackage};
|