@socketsecurity/lib 3.2.3 → 3.2.4
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 +18 -0
- package/dist/abort.js +1 -1
- package/dist/agent.js +1 -1
- package/dist/ansi.js +1 -1
- package/dist/argv/flags.js +1 -1
- package/dist/argv/parse.js +1 -1
- package/dist/arrays.js +1 -1
- package/dist/bin.js +1 -1
- package/dist/cacache.js +1 -1
- package/dist/cache-with-ttl.js +1 -1
- package/dist/constants/agents.js +1 -1
- package/dist/constants/core.js +1 -1
- package/dist/constants/encoding.js +1 -1
- package/dist/constants/github.js +1 -1
- package/dist/constants/licenses.js +1 -1
- package/dist/constants/node.js +1 -1
- package/dist/constants/packages.js +1 -1
- package/dist/constants/paths.js +1 -1
- package/dist/constants/platform.js +1 -1
- package/dist/constants/process.js +1 -1
- package/dist/constants/socket.js +1 -1
- package/dist/constants/testing.js +1 -1
- package/dist/constants/time.js +1 -1
- package/dist/constants/typescript.js +1 -1
- package/dist/cover/code.js +1 -1
- package/dist/cover/formatters.js +1 -1
- package/dist/cover/type.js +1 -1
- package/dist/cover/types.js +1 -1
- package/dist/debug.js +1 -1
- package/dist/dlx-binary.js +1 -1
- package/dist/dlx-manifest.js +1 -1
- package/dist/dlx-package.js +1 -1
- package/dist/dlx.js +1 -1
- package/dist/effects/pulse-frames.js +4 -4
- package/dist/effects/text-shimmer.js +1 -1
- package/dist/effects/types.js +1 -1
- package/dist/effects/ultra.js +1 -1
- package/dist/env/ci.js +1 -1
- package/dist/env/debug.js +1 -1
- package/dist/env/github.js +1 -1
- package/dist/env/helpers.js +1 -1
- package/dist/env/home.js +1 -1
- package/dist/env/locale.js +1 -1
- package/dist/env/node-auth-token.js +1 -1
- package/dist/env/node-env.js +1 -1
- package/dist/env/npm.js +1 -1
- package/dist/env/package-manager.js +1 -1
- package/dist/env/path.js +1 -1
- package/dist/env/pre-commit.js +1 -1
- package/dist/env/rewire.js +1 -1
- package/dist/env/shell.js +1 -1
- package/dist/env/socket-cli-shadow.js +1 -1
- package/dist/env/socket-cli.js +1 -1
- package/dist/env/socket.js +1 -1
- package/dist/env/temp-dir.js +1 -1
- package/dist/env/term.js +1 -1
- package/dist/env/test.js +1 -1
- package/dist/env/windows.js +1 -1
- package/dist/env/xdg.js +1 -1
- package/dist/env.js +1 -1
- package/dist/external/@inquirer/confirm.js +16 -15
- package/dist/external/@inquirer/input.js +16 -15
- package/dist/external/@inquirer/password.js +17 -16
- package/dist/external/@inquirer/search.js +18 -17
- package/dist/external/@inquirer/select.js +19 -18
- package/dist/external/@npmcli/package-json/lib/read-package.js +7 -1
- package/dist/external/@npmcli/package-json/lib/sort.js +6 -1
- package/dist/external/@npmcli/package-json.js +18 -0
- package/dist/external/@npmcli/promise-spawn.js +2 -1
- package/dist/external/@socketregistry/is-unicode-supported.js +2 -1
- package/dist/external/@socketregistry/packageurl-js.js +3 -2
- package/dist/external/@socketregistry/yocto-spinner.js +5 -4
- package/dist/external/@yarnpkg/extensions.js +2 -1
- package/dist/external/cacache.js +10 -9
- package/dist/external/debug.js +2 -5
- package/dist/external/del.js +3 -2
- package/dist/external/fast-glob.js +3 -2
- package/dist/external/fast-sort.js +2 -1
- package/dist/external/get-east-asian-width.js +2 -1
- package/dist/external/libnpmexec.js +6 -0
- package/dist/external/libnpmpack.js +64 -63
- package/dist/external/make-fetch-happen.js +16 -15
- package/dist/external/normalize-package-data.js +3 -2
- package/dist/external/npm-package-arg.js +3 -2
- package/dist/external/pacote.js +36 -35
- package/dist/external/picomatch.js +2 -1
- package/dist/external/semver.js +2 -1
- package/dist/external/spdx-correct.js +2 -1
- package/dist/external/spdx-expression-parse.js +2 -1
- package/dist/external/streaming-iterables.js +2 -1
- package/dist/external/validate-npm-package-name.js +2 -1
- package/dist/external/which.js +2 -1
- package/dist/external/yargs-parser.js +2 -1
- package/dist/external/yoctocolors-cjs.js +2 -1
- package/dist/external/zod.js +10 -9
- package/dist/fs.js +1 -1
- package/dist/functions.js +1 -1
- package/dist/git.js +1 -1
- package/dist/github.js +1 -1
- package/dist/globs.js +1 -1
- package/dist/http-request.js +1 -1
- package/dist/ipc.js +1 -1
- package/dist/json.js +1 -1
- package/dist/links/index.js +1 -1
- package/dist/logger.d.ts +29 -4
- package/dist/logger.js +34 -5
- package/dist/maintained-node-versions.js +1 -1
- package/dist/memoization.js +1 -1
- package/dist/objects.js +1 -1
- package/dist/packages/editable.js +1 -1
- package/dist/packages/exports.js +1 -1
- package/dist/packages/isolation.js +1 -1
- package/dist/packages/licenses.js +1 -1
- package/dist/packages/manifest.js +1 -1
- package/dist/packages/normalize.js +1 -1
- package/dist/packages/operations.js +1 -1
- package/dist/packages/paths.js +1 -1
- package/dist/packages/provenance.js +1 -1
- package/dist/packages/specs.js +1 -1
- package/dist/packages/validation.js +1 -1
- package/dist/packages.js +1 -1
- package/dist/path.js +1 -1
- package/dist/paths/rewire.js +1 -1
- package/dist/paths.js +1 -1
- package/dist/performance.js +1 -1
- package/dist/process-lock.js +1 -1
- package/dist/promise-queue.js +1 -1
- package/dist/promises.js +1 -1
- package/dist/regexps.js +1 -1
- package/dist/sea.js +1 -1
- package/dist/shadow.js +1 -1
- package/dist/signal-exit.js +1 -1
- package/dist/sorts.js +1 -1
- package/dist/spawn.js +1 -1
- package/dist/spinner.js +1 -1
- package/dist/ssri.js +1 -1
- package/dist/stdio/clear.js +1 -1
- package/dist/stdio/divider.js +1 -1
- package/dist/stdio/footer.js +1 -1
- package/dist/stdio/header.js +1 -1
- package/dist/stdio/mask.js +1 -1
- package/dist/stdio/progress.js +1 -1
- package/dist/stdio/prompts.js +1 -1
- package/dist/stdio/stderr.js +1 -1
- package/dist/stdio/stdout.js +1 -1
- package/dist/streams.js +1 -1
- package/dist/strings.js +1 -1
- package/dist/suppress-warnings.js +1 -1
- package/dist/tables.js +1 -1
- package/dist/temporary-executor.js +1 -1
- package/dist/themes/context.js +1 -1
- package/dist/themes/index.js +1 -1
- package/dist/themes/themes.js +1 -1
- package/dist/themes/types.js +1 -1
- package/dist/themes/utils.js +1 -1
- package/dist/types.js +1 -1
- package/dist/url.js +1 -1
- package/dist/utils/get-ipc.js +1 -1
- package/dist/validation/json-parser.js +1 -1
- package/dist/validation/types.js +1 -1
- package/dist/versions.js +1 -1
- package/dist/words.js +1 -1
- package/dist/zod.js +1 -1
- package/package.json +1 -1
- package/dist/abort.js.map +0 -7
- package/dist/agent.js.map +0 -7
- package/dist/ansi.js.map +0 -7
- package/dist/argv/flags.js.map +0 -7
- package/dist/argv/parse.js.map +0 -7
- package/dist/arrays.js.map +0 -7
- package/dist/bin.js.map +0 -7
- package/dist/cacache.js.map +0 -7
- package/dist/cache-with-ttl.js.map +0 -7
- package/dist/constants/agents.js.map +0 -7
- package/dist/constants/core.js.map +0 -7
- package/dist/constants/encoding.js.map +0 -7
- package/dist/constants/github.js.map +0 -7
- package/dist/constants/licenses.js.map +0 -7
- package/dist/constants/node.js.map +0 -7
- package/dist/constants/packages.js.map +0 -7
- package/dist/constants/paths.js.map +0 -7
- package/dist/constants/platform.js.map +0 -7
- package/dist/constants/process.js.map +0 -7
- package/dist/constants/socket.js.map +0 -7
- package/dist/constants/testing.js.map +0 -7
- package/dist/constants/time.js.map +0 -7
- package/dist/constants/typescript.js.map +0 -7
- package/dist/cover/code.js.map +0 -7
- package/dist/cover/formatters.js.map +0 -7
- package/dist/cover/type.js.map +0 -7
- package/dist/cover/types.js.map +0 -7
- package/dist/debug.js.map +0 -7
- package/dist/dlx-binary.js.map +0 -7
- package/dist/dlx-manifest.js.map +0 -7
- package/dist/dlx-package.js.map +0 -7
- package/dist/dlx.js.map +0 -7
- package/dist/effects/pulse-frames.js.map +0 -7
- package/dist/effects/text-shimmer.js.map +0 -7
- package/dist/effects/types.js.map +0 -7
- package/dist/effects/ultra.js.map +0 -7
- package/dist/env/ci.js.map +0 -7
- package/dist/env/debug.js.map +0 -7
- package/dist/env/github.js.map +0 -7
- package/dist/env/helpers.js.map +0 -7
- package/dist/env/home.js.map +0 -7
- package/dist/env/locale.js.map +0 -7
- package/dist/env/node-auth-token.js.map +0 -7
- package/dist/env/node-env.js.map +0 -7
- package/dist/env/npm.js.map +0 -7
- package/dist/env/package-manager.js.map +0 -7
- package/dist/env/path.js.map +0 -7
- package/dist/env/pre-commit.js.map +0 -7
- package/dist/env/rewire.js.map +0 -7
- package/dist/env/shell.js.map +0 -7
- package/dist/env/socket-cli-shadow.js.map +0 -7
- package/dist/env/socket-cli.js.map +0 -7
- package/dist/env/socket.js.map +0 -7
- package/dist/env/temp-dir.js.map +0 -7
- package/dist/env/term.js.map +0 -7
- package/dist/env/test.js.map +0 -7
- package/dist/env/windows.js.map +0 -7
- package/dist/env/xdg.js.map +0 -7
- package/dist/env.js.map +0 -7
- package/dist/external/@npmcli/package-json/index.js +0 -1
- package/dist/external/@socketregistry/is-unicode-supported.d.ts +0 -2
- package/dist/external/@socketregistry/yocto-spinner.d.ts +0 -12
- package/dist/external/@yarnpkg/extensions.d.ts +0 -4
- package/dist/external/cacache.d.ts +0 -86
- package/dist/external/debug.d.ts +0 -22
- package/dist/external/del.d.ts +0 -1
- package/dist/external/fast-sort.d.ts +0 -3
- package/dist/external/get-east-asian-width.d.ts +0 -5
- package/dist/external/libnpmexec.d.ts +0 -33
- package/dist/external/libnpmpack.d.ts +0 -2
- package/dist/external/make-fetch-happen.d.ts +0 -15
- package/dist/external/pacote.d.ts +0 -14
- package/dist/external/semver.d.ts +0 -2
- package/dist/external/yargs-parser.d.ts +0 -2
- package/dist/external/yoctocolors-cjs.d.ts +0 -52
- package/dist/external/zod.d.ts +0 -1
- package/dist/fs.js.map +0 -7
- package/dist/functions.js.map +0 -7
- package/dist/git.js.map +0 -7
- package/dist/github.js.map +0 -7
- package/dist/globs.js.map +0 -7
- package/dist/http-request.js.map +0 -7
- package/dist/ipc.js.map +0 -7
- package/dist/json.js.map +0 -7
- package/dist/links/index.js.map +0 -7
- package/dist/logger.js.map +0 -7
- package/dist/maintained-node-versions.js.map +0 -7
- package/dist/memoization.js.map +0 -7
- package/dist/objects.js.map +0 -7
- package/dist/packages/editable.js.map +0 -7
- package/dist/packages/exports.js.map +0 -7
- package/dist/packages/isolation.js.map +0 -7
- package/dist/packages/licenses.js.map +0 -7
- package/dist/packages/manifest.js.map +0 -7
- package/dist/packages/normalize.js.map +0 -7
- package/dist/packages/operations.js.map +0 -7
- package/dist/packages/paths.js.map +0 -7
- package/dist/packages/provenance.js.map +0 -7
- package/dist/packages/specs.js.map +0 -7
- package/dist/packages/validation.js.map +0 -7
- package/dist/packages.js.map +0 -7
- package/dist/path.js.map +0 -7
- package/dist/paths/rewire.js.map +0 -7
- package/dist/paths.js.map +0 -7
- package/dist/performance.js.map +0 -7
- package/dist/process-lock.js.map +0 -7
- package/dist/promise-queue.js.map +0 -7
- package/dist/promises.js.map +0 -7
- package/dist/regexps.js.map +0 -7
- package/dist/sea.js.map +0 -7
- package/dist/shadow.js.map +0 -7
- package/dist/signal-exit.js.map +0 -7
- package/dist/sorts.js.map +0 -7
- package/dist/spawn.js.map +0 -7
- package/dist/spinner.js.map +0 -7
- package/dist/ssri.js.map +0 -7
- package/dist/stdio/clear.js.map +0 -7
- package/dist/stdio/divider.js.map +0 -7
- package/dist/stdio/footer.js.map +0 -7
- package/dist/stdio/header.js.map +0 -7
- package/dist/stdio/mask.js.map +0 -7
- package/dist/stdio/progress.js.map +0 -7
- package/dist/stdio/prompts.js.map +0 -7
- package/dist/stdio/stderr.js.map +0 -7
- package/dist/stdio/stdout.js.map +0 -7
- package/dist/streams.js.map +0 -7
- package/dist/strings.js.map +0 -7
- package/dist/suppress-warnings.js.map +0 -7
- package/dist/tables.js.map +0 -7
- package/dist/temporary-executor.js.map +0 -7
- package/dist/themes/context.js.map +0 -7
- package/dist/themes/index.js.map +0 -7
- package/dist/themes/themes.js.map +0 -7
- package/dist/themes/types.js.map +0 -7
- package/dist/themes/utils.js.map +0 -7
- package/dist/types.js.map +0 -7
- package/dist/url.js.map +0 -7
- package/dist/utils/get-ipc.js.map +0 -7
- package/dist/validation/json-parser.js.map +0 -7
- package/dist/validation/types.js.map +0 -7
- package/dist/versions.js.map +0 -7
- package/dist/words.js.map +0 -7
- package/dist/zod.js.map +0 -7
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Bundled from streaming-iterables
|
|
3
4
|
* This is a zero-dependency bundle created by esbuild.
|
|
4
5
|
*/
|
|
5
|
-
var Me=Object.defineProperty;var o=(l,v)=>Me(l,"name",{value:v,configurable:!0});(function(l,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(l=typeof globalThis<"u"?globalThis:l||self,v(l.streamingIterables={}))})(exports,(function(l){"use strict";async function*v(e,t){let n=[];for await(let r of t)n.push(r),n.length===e&&(yield n,n=[]);n.length>0&&(yield n)}o(v,"_batch");function*X(e,t){let n=[];for(let r of t)n.push(r),n.length===e&&(yield n,n=[]);n.length>0&&(yield n)}o(X,"_syncBatch");function D(e,t){return t===void 0?n=>D(e,n):t[Symbol.asyncIterator]?v(e,t):X(e,t)}o(D,"batch");let P=Symbol("TIMEOUT"),Y=o(e=>{let t;return[new Promise(n=>{t=setTimeout(()=>n(P),e)}),()=>{clearTimeout(t)}]},"createTimer");async function*Z(e,t,n){let r=n[Symbol.asyncIterator](),i,f=[],a,y,s=o(()=>{c(),[a,y]=Y(t)},"startTimer"),c=o(()=>{y&&y(),a=void 0},"deleteTimer");for(i=r.next();;){let h=await(a?Promise.race([i,a]):i);if(h===P||h.done){if(f.length&&(yield f,f=[]),c(),h!==P)break;continue}if(i=r.next(),f.push(h.value),f.length===1&&s(),f.length===e){yield f,f=[],c();continue}}}o(Z,"_batchWithTimeout");function W(e,t,n){return n===void 0?r=>W(e,t,r):n[Symbol.asyncIterator]&&t!==1/0?Z(e,t,n):D(e,n)}o(W,"batchWithTimeout");function g(e){if(typeof e.next=="function")return e;if(typeof e[Symbol.iterator]=="function")return e[Symbol.iterator]();if(typeof e[Symbol.asyncIterator]=="function")return e[Symbol.asyncIterator]();throw new TypeError('"values" does not to conform to any of the iterator or iterable protocols')}o(g,"getIterator");function A(){let e,t;return{promise:new Promise((r,i)=>{t=r,e=i}),reject:e,resolve:t}}o(A,"defer");function $(e,t){let n=g(t),r=[],i=[],f=!1,a=!1;function y(){for(;i.length>0&&r.length>0;){let u=i.shift(),{error:w,value:p}=r.shift();w?u.reject(w):u.resolve({done:!1,value:p})}for(;i.length>0&&a;){let{resolve:u}=i.shift();u({done:!0,value:void 0})}}o(y,"fulfillReadQueue");async function s(){if(!a&&!f&&!(r.length>=e)){f=!0;try{let{done:u,value:w}=await n.next();u?a=!0:r.push({value:w})}catch(u){a=!0,r.push({error:u})}y(),f=!1,s()}}o(s,"fillQueue");async function c(){if(r.length>0){let{error:w,value:p}=r.shift();if(w)throw w;return s(),{done:!1,value:p}}if(a)return{done:!0,value:void 0};let u=A();return i.push(u),s(),u.promise}o(c,"next");let h={next:c,[Symbol.asyncIterator]:()=>h};return h}o($,"_buffer");function*z(e,t){let n=[],r;try{for(let i of t)n.push(i),!(n.length<=e)&&(yield n.shift())}catch(i){r=i}for(let i of n)yield i;if(r)throw r}o(z,"syncBuffer");function _(e,t){return t===void 0?n=>_(e,n):e===0?t:t[Symbol.asyncIterator]?$(e,t):z(e,t)}o(_,"buffer");async function x(e){let t=[];for await(let n of e)t.push(n);return t}o(x,"_collect");function ee(e){return e[Symbol.asyncIterator]?x(e):Array.from(e)}o(ee,"collect");async function*te(e){for await(let t of e)yield*t}o(te,"_concat");function*ne(e){for(let t of e)yield*t}o(ne,"_syncConcat");function re(...e){return e.find(n=>n[Symbol.asyncIterator]!==void 0)?te(e):ne(e)}o(re,"concat");async function oe(e){for await(let t of e);}o(oe,"_consume");function ie(e){if(e[Symbol.asyncIterator])return oe(e);for(let t of e);}o(ie,"consume");async function*fe(e,t){let n=0;for await(let r of t){if(n<e){n++;continue}yield await r}}o(fe,"_drop");function*ae(e,t){let n=0;for(let r of t){if(n<e){n++;continue}yield r}}o(ae,"_syncDrop");function L(e,t){return t===void 0?n=>L(e,n):t[Symbol.asyncIterator]?fe(e,t):ae(e,t)}o(L,"drop");async function*F(e,t){for await(let n of t)await e(n)&&(yield n)}o(F,"_filter");function I(e,t){return t===void 0?n=>F(e,n):F(e,t)}o(I,"filter");async function*T(e){for await(let t of e)t&&typeof t!="string"&&(t[Symbol.iterator]||t[Symbol.asyncIterator])?yield*T(t):yield t}o(T,"flatten");async function*B(e,t){for await(let n of t)yield await e(n)}o(B,"_map");function k(e,t){return t===void 0?n=>B(e,n):B(e,t)}o(k,"map");function R(e,t){return t===void 0?n=>R(e,n):I(n=>n!=null,T(k(e,t)))}o(R,"flatMap");function ue(e,t,n){let r=g(n),i=[],f=[],a=!1,y=!1,s=0,c=null;function h(){for(;f.length>0&&i.length>0;){let{resolve:m}=f.shift(),d=i.shift();m({done:!1,value:d})}for(;f.length>0&&s===0&&a;){let{resolve:m,reject:d}=f.shift();c?(d(c),c=null):m({done:!0,value:void 0})}}o(h,"fulfillReadQueue");async function u(){if(a){h();return}if(!y&&!(s+i.length>=e)){y=!0,s++;try{let{done:m,value:d}=await r.next();m?(a=!0,s--,h()):w(d)}catch(m){a=!0,s--,c=m,h()}y=!1,u()}}o(u,"fillQueue");async function w(m){try{let d=await t(m);if(d&&d[Symbol.asyncIterator])for await(let be of d)i.push(be);else i.push(d)}catch(d){a=!0,c=d}s--,h(),u()}o(w,"mapAndQueue");async function p(){if(i.length===0){let d=A();return f.push(d),u(),d.promise}let m=i.shift();return u(),{done:!1,value:m}}o(p,"next");let S={next:p,[Symbol.asyncIterator]:()=>S};return S}o(ue,"_flatTransform");function E(e,t,n){return t===void 0?(r,i)=>i?E(e,r,i):E(e,r):n===void 0?r=>E(e,t,r):I(r=>r!=null,T(ue(e,t,n)))}o(E,"flatTransform");async function le(e){return new Promise(t=>{e.once("readable",()=>{t()})})}o(le,"onceReadable");async function*se(e){for(;;){let t=e.read();if(t!==null){yield t;continue}if(e._readableState.ended)break;await le(e)}}o(se,"_fromStream");function ce(e){return typeof e[Symbol.asyncIterator]=="function"?e:se(e)}o(ce,"fromStream");async function*de(...e){let t=new Set(e.map(g));for(;t.size>0;)for(let n of t){let r=await n.next();r.done?t.delete(n):yield r.value}}o(de,"merge");function j(e,...t){let n=e();for(let r of t)n=r(n);return n}o(j,"pipeline");async function*ye(e,t,n){let r=null,i=o(s=>({value:t(s)}),"wrapFunc"),f=o(async function*(s){for await(let c of s){if(r)return;yield c}},"stopOnError"),a=j(()=>n,_(1),f,k(i),_(e-1)),y=g(a);for(;;){let{value:s,done:c}=await y.next();if(c)break;try{let h=await s.value;r||(yield h)}catch(h){r=h}}if(r)throw r}o(ye,"_parallelMap");function Q(e,t,n){return t===void 0?(r,i)=>Q(e,r,i):n===void 0?r=>Q(e,t,r):e===1?k(t,n):ye(e,t,n)}o(Q,"parallelMap");function b(e,t,n){return t===void 0?(r,i)=>i?b(e,r,i):b(e,r):n===void 0?r=>b(e,t,r):I(r=>r!=null,T(Q(e,t,n)))}o(b,"parallelFlatMap");async function*he(...e){let t=e.map(g),n=new Set,r=new Map,i=null,f=null,a=null,y=o(u=>{i=u,f&&f(u)},"notifyError"),s=o(u=>{a&&a(u)},"notifyDone"),c=o(()=>new Promise((u,w)=>{if(i&&w(i),r.size>0)return u();a=u,f=w}),"waitForQueue"),h=o(u=>{let w=Promise.resolve(u.next()).then(async({done:p,value:S})=>{p||r.set(u,S),n.delete(w)});n.add(w),w.then(s,y)},"queueNext");for(let u of t)h(u);for(;;){if(n.size===0&&r.size===0)return;await c();for(let[u,w]of r)r.delete(u),yield w,h(u)}}o(he,"parallelMerge");async function N(e,t,n){let r=t;for await(let i of n)r=await e(r,i);return r}o(N,"_reduce");function C(e,t,n){return t===void 0?(r,i)=>i?N(e,r,i):C(e,r):n===void 0?r=>C(e,t,r):N(e,t,n)}o(C,"reduce");async function*me(e,t){let n=0;for await(let r of t)if(yield await r,n++,n>=e)break}o(me,"_take");function*we(e,t){let n=0;for(let r of t)if(yield r,n++,n>=e)break}o(we,"_syncTake");function O(e,t){return t===void 0?n=>O(e,n):t[Symbol.asyncIterator]?me(e,t):we(e,t)}o(O,"take");async function*pe(e,t){let n=[];for await(let r of t)n.push(r),n.length>e&&n.shift();for(;n.length;)yield await n.shift()}o(pe,"_takeLast");function*ve(e,t){let n=[];for(let r of t)n.push(r),n.length>e&&n.shift();for(;n.length;)yield n.shift()}o(ve,"_syncTakeLast");function V(e,t){return t===void 0?n=>V(e,n):t[Symbol.asyncIterator]?pe(e,t):ve(e,t)}o(V,"takeLast");async function*U(e,t){for await(let n of t){if(!await e(n))return;yield n}}o(U,"_takeWhile");function ge(e,t){return t===void 0?n=>U(e,n):U(e,t)}o(ge,"takeWhile");async function*q(e,t){for await(let n of t)await e(n),yield n}o(q,"_asyncTap");function Se(e,t){return t===void 0?n=>q(e,n):q(e,t)}o(Se,"tap");let Te=o(e=>new Promise(t=>setTimeout(t,e)),"sleep");function G(e,t,n){if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(e<=0)throw new TypeError("Expected `limit` to be greater than 0");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");return o((async function*(){let i=0,f;for await(let a of n){if(i<e){typeof f>"u"&&(f=Date.now()),i++,yield a;continue}let y=Date.now()-(f||0),s=t-y;s>0&&await Te(s),f=Date.now(),i=1,yield a}}),"__throttle")()}o(G,"_throttle");function _e(e,t,n){return n===void 0?r=>G(e,t,r):G(e,t,n)}o(_e,"throttle");function H(e,t){let n=e[0]+t[0],r=e[1]+t[1];if(r>=1e9){let i=r%1e9;n+=(r-i)/1e9,r=i}return[n,r]}o(H,"addTime");async function*Ie(e,t){let n=t[Symbol.asyncIterator](),r=[0,0];for(;;){let i=process.hrtime(),{value:f,done:a}=await n.next(),y=process.hrtime(i);if(r=H(r,y),e.progress&&e.progress(y,r),a)return e.total&&e.total(r),f;yield f}}o(Ie,"_asyncTime");function*ke(e,t){let n=t[Symbol.iterator](),r=[0,0];for(;;){let i=process.hrtime(),{value:f,done:a}=n.next(),y=process.hrtime(i);if(r=H(r,y),e.progress&&e.progress(y,r),a)return e.total&&e.total(r),f;yield f}}o(ke,"_syncTime");function J(e={},t){return t===void 0?n=>J(e,n):t[Symbol.asyncIterator]!==void 0?Ie(e,t):ke(e,t)}o(J,"time");function Ee(e,t,n){let r=g(n),i=[],f=[],a=!1,y=!1,s=0,c=null;function h(){for(;f.length>0&&i.length>0;){let{resolve:m}=f.shift(),d=i.shift();m({done:!1,value:d})}for(;f.length>0&&s===0&&a;){let{resolve:m,reject:d}=f.shift();c?(d(c),c=null):m({done:!0,value:void 0})}}o(h,"fulfillReadQueue");async function u(){if(a){h();return}if(!y&&!(s+i.length>=e)){y=!0,s++;try{let{done:m,value:d}=await r.next();m?(a=!0,s--,h()):w(d)}catch(m){a=!0,s--,c=m,h()}y=!1,u()}}o(u,"fillQueue");async function w(m){try{let d=await t(m);i.push(d)}catch(d){a=!0,c=d}s--,h(),u()}o(w,"mapAndQueue");async function p(){if(i.length===0){let d=A();return f.push(d),u(),d.promise}let m=i.shift();return u(),{done:!1,value:m}}o(p,"next");let S={next:p,[Symbol.asyncIterator]:()=>S};return S}o(Ee,"_transform");function M(e,t,n){return t===void 0?(r,i)=>i?M(e,r,i):M(e,r):n===void 0?r=>M(e,t,r):Ee(e,t,n)}o(M,"transform");async function K(e,t){let n=null,r=null,i=null,f=o(c=>{n=c,r&&r(c)},"notifyError"),a=o(()=>{i&&i()},"notifyDrain"),y=o(()=>{e.removeListener("error",f),e.removeListener("drain",a)},"cleanup");e.once("error",f);let s=o(()=>new Promise((c,h)=>{if(n)return h(n);e.once("drain",a),i=c,r=h}),"waitForDrain");for await(let c of t)if(e.write(c)===!1&&await s(),n)break;if(y(),n)throw n}o(K,"_writeToStream");function Qe(e,t){return t===void 0?n=>K(e,n):K(e,t)}o(Qe,"writeToStream"),l.batch=D,l.batchWithTimeout=W,l.buffer=_,l.collect=ee,l.concat=re,l.consume=ie,l.drop=L,l.filter=I,l.flatMap=R,l.flatTransform=E,l.flatten=T,l.fromStream=ce,l.getIterator=g,l.map=k,l.merge=de,l.parallelFlatMap=b,l.parallelMap=Q,l.parallelMerge=he,l.pipeline=j,l.reduce=C,l.take=O,l.takeLast=V,l.takeWhile=ge,l.tap=Se,l.throttle=_e,l.time=J,l.transform=M,l.writeToStream=Qe}));
|
|
6
|
+
"use strict";var Ae=Object.defineProperty;var o=(l,p)=>Ae(l,"name",{value:p,configurable:!0});var Ce=(l,p)=>()=>(p||l((p={exports:{}}).exports,p),p.exports);var Z=Ce((D,Y)=>{(function(l,p){typeof D=="object"&&typeof Y<"u"?p(D):typeof define=="function"&&define.amd?define(["exports"],p):(l=typeof globalThis<"u"?globalThis:l||self,p(l.streamingIterables={}))})(D,(function(l){"use strict";async function*p(e,t){let n=[];for await(let r of t)n.push(r),n.length===e&&(yield n,n=[]);n.length>0&&(yield n)}o(p,"_batch");function*$(e,t){let n=[];for(let r of t)n.push(r),n.length===e&&(yield n,n=[]);n.length>0&&(yield n)}o($,"_syncBatch");function P(e,t){return t===void 0?n=>P(e,n):t[Symbol.asyncIterator]?p(e,t):$(e,t)}o(P,"batch");let A=Symbol("TIMEOUT"),z=o(e=>{let t;return[new Promise(n=>{t=setTimeout(()=>n(A),e)}),()=>{clearTimeout(t)}]},"createTimer");async function*x(e,t,n){let r=n[Symbol.asyncIterator](),i,f=[],a,y,s=o(()=>{c(),[a,y]=z(t)},"startTimer"),c=o(()=>{y&&y(),a=void 0},"deleteTimer");for(i=r.next();;){let h=await(a?Promise.race([i,a]):i);if(h===A||h.done){if(f.length&&(yield f,f=[]),c(),h!==A)break;continue}if(i=r.next(),f.push(h.value),f.length===1&&s(),f.length===e){yield f,f=[],c();continue}}}o(x,"_batchWithTimeout");function L(e,t,n){return n===void 0?r=>L(e,t,r):n[Symbol.asyncIterator]&&t!==1/0?x(e,t,n):P(e,n)}o(L,"batchWithTimeout");function g(e){if(typeof e.next=="function")return e;if(typeof e[Symbol.iterator]=="function")return e[Symbol.iterator]();if(typeof e[Symbol.asyncIterator]=="function")return e[Symbol.asyncIterator]();throw new TypeError('"values" does not to conform to any of the iterator or iterable protocols')}o(g,"getIterator");function C(){let e,t;return{promise:new Promise((r,i)=>{t=r,e=i}),reject:e,resolve:t}}o(C,"defer");function ee(e,t){let n=g(t),r=[],i=[],f=!1,a=!1;function y(){for(;i.length>0&&r.length>0;){let u=i.shift(),{error:w,value:v}=r.shift();w?u.reject(w):u.resolve({done:!1,value:v})}for(;i.length>0&&a;){let{resolve:u}=i.shift();u({done:!0,value:void 0})}}o(y,"fulfillReadQueue");async function s(){if(!a&&!f&&!(r.length>=e)){f=!0;try{let{done:u,value:w}=await n.next();u?a=!0:r.push({value:w})}catch(u){a=!0,r.push({error:u})}y(),f=!1,s()}}o(s,"fillQueue");async function c(){if(r.length>0){let{error:w,value:v}=r.shift();if(w)throw w;return s(),{done:!1,value:v}}if(a)return{done:!0,value:void 0};let u=C();return i.push(u),s(),u.promise}o(c,"next");let h={next:c,[Symbol.asyncIterator]:()=>h};return h}o(ee,"_buffer");function*te(e,t){let n=[],r;try{for(let i of t)n.push(i),!(n.length<=e)&&(yield n.shift())}catch(i){r=i}for(let i of n)yield i;if(r)throw r}o(te,"syncBuffer");function _(e,t){return t===void 0?n=>_(e,n):e===0?t:t[Symbol.asyncIterator]?ee(e,t):te(e,t)}o(_,"buffer");async function ne(e){let t=[];for await(let n of e)t.push(n);return t}o(ne,"_collect");function re(e){return e[Symbol.asyncIterator]?ne(e):Array.from(e)}o(re,"collect");async function*oe(e){for await(let t of e)yield*t}o(oe,"_concat");function*ie(e){for(let t of e)yield*t}o(ie,"_syncConcat");function fe(...e){return e.find(n=>n[Symbol.asyncIterator]!==void 0)?oe(e):ie(e)}o(fe,"concat");async function ae(e){for await(let t of e);}o(ae,"_consume");function ue(e){if(e[Symbol.asyncIterator])return ae(e);for(let t of e);}o(ue,"consume");async function*le(e,t){let n=0;for await(let r of t){if(n<e){n++;continue}yield await r}}o(le,"_drop");function*se(e,t){let n=0;for(let r of t){if(n<e){n++;continue}yield r}}o(se,"_syncDrop");function F(e,t){return t===void 0?n=>F(e,n):t[Symbol.asyncIterator]?le(e,t):se(e,t)}o(F,"drop");async function*B(e,t){for await(let n of t)await e(n)&&(yield n)}o(B,"_filter");function I(e,t){return t===void 0?n=>B(e,n):B(e,t)}o(I,"filter");async function*T(e){for await(let t of e)t&&typeof t!="string"&&(t[Symbol.iterator]||t[Symbol.asyncIterator])?yield*T(t):yield t}o(T,"flatten");async function*R(e,t){for await(let n of t)yield await e(n)}o(R,"_map");function k(e,t){return t===void 0?n=>R(e,n):R(e,t)}o(k,"map");function j(e,t){return t===void 0?n=>j(e,n):I(n=>n!=null,T(k(e,t)))}o(j,"flatMap");function ce(e,t,n){let r=g(n),i=[],f=[],a=!1,y=!1,s=0,c=null;function h(){for(;f.length>0&&i.length>0;){let{resolve:m}=f.shift(),d=i.shift();m({done:!1,value:d})}for(;f.length>0&&s===0&&a;){let{resolve:m,reject:d}=f.shift();c?(d(c),c=null):m({done:!0,value:void 0})}}o(h,"fulfillReadQueue");async function u(){if(a){h();return}if(!y&&!(s+i.length>=e)){y=!0,s++;try{let{done:m,value:d}=await r.next();m?(a=!0,s--,h()):w(d)}catch(m){a=!0,s--,c=m,h()}y=!1,u()}}o(u,"fillQueue");async function w(m){try{let d=await t(m);if(d&&d[Symbol.asyncIterator])for await(let Pe of d)i.push(Pe);else i.push(d)}catch(d){a=!0,c=d}s--,h(),u()}o(w,"mapAndQueue");async function v(){if(i.length===0){let d=C();return f.push(d),u(),d.promise}let m=i.shift();return u(),{done:!1,value:m}}o(v,"next");let S={next:v,[Symbol.asyncIterator]:()=>S};return S}o(ce,"_flatTransform");function E(e,t,n){return t===void 0?(r,i)=>i?E(e,r,i):E(e,r):n===void 0?r=>E(e,t,r):I(r=>r!=null,T(ce(e,t,n)))}o(E,"flatTransform");async function de(e){return new Promise(t=>{e.once("readable",()=>{t()})})}o(de,"onceReadable");async function*ye(e){for(;;){let t=e.read();if(t!==null){yield t;continue}if(e._readableState.ended)break;await de(e)}}o(ye,"_fromStream");function he(e){return typeof e[Symbol.asyncIterator]=="function"?e:ye(e)}o(he,"fromStream");async function*me(...e){let t=new Set(e.map(g));for(;t.size>0;)for(let n of t){let r=await n.next();r.done?t.delete(n):yield r.value}}o(me,"merge");function N(e,...t){let n=e();for(let r of t)n=r(n);return n}o(N,"pipeline");async function*we(e,t,n){let r=null,i=o(s=>({value:t(s)}),"wrapFunc"),f=o(async function*(s){for await(let c of s){if(r)return;yield c}},"stopOnError"),a=N(()=>n,_(1),f,k(i),_(e-1)),y=g(a);for(;;){let{value:s,done:c}=await y.next();if(c)break;try{let h=await s.value;r||(yield h)}catch(h){r=h}}if(r)throw r}o(we,"_parallelMap");function Q(e,t,n){return t===void 0?(r,i)=>Q(e,r,i):n===void 0?r=>Q(e,t,r):e===1?k(t,n):we(e,t,n)}o(Q,"parallelMap");function b(e,t,n){return t===void 0?(r,i)=>i?b(e,r,i):b(e,r):n===void 0?r=>b(e,t,r):I(r=>r!=null,T(Q(e,t,n)))}o(b,"parallelFlatMap");async function*pe(...e){let t=e.map(g),n=new Set,r=new Map,i=null,f=null,a=null,y=o(u=>{i=u,f&&f(u)},"notifyError"),s=o(u=>{a&&a(u)},"notifyDone"),c=o(()=>new Promise((u,w)=>{if(i&&w(i),r.size>0)return u();a=u,f=w}),"waitForQueue"),h=o(u=>{let w=Promise.resolve(u.next()).then(async({done:v,value:S})=>{v||r.set(u,S),n.delete(w)});n.add(w),w.then(s,y)},"queueNext");for(let u of t)h(u);for(;;){if(n.size===0&&r.size===0)return;await c();for(let[u,w]of r)r.delete(u),yield w,h(u)}}o(pe,"parallelMerge");async function O(e,t,n){let r=t;for await(let i of n)r=await e(r,i);return r}o(O,"_reduce");function W(e,t,n){return t===void 0?(r,i)=>i?O(e,r,i):W(e,r):n===void 0?r=>W(e,t,r):O(e,t,n)}o(W,"reduce");async function*ve(e,t){let n=0;for await(let r of t)if(yield await r,n++,n>=e)break}o(ve,"_take");function*ge(e,t){let n=0;for(let r of t)if(yield r,n++,n>=e)break}o(ge,"_syncTake");function V(e,t){return t===void 0?n=>V(e,n):t[Symbol.asyncIterator]?ve(e,t):ge(e,t)}o(V,"take");async function*Se(e,t){let n=[];for await(let r of t)n.push(r),n.length>e&&n.shift();for(;n.length;)yield await n.shift()}o(Se,"_takeLast");function*Te(e,t){let n=[];for(let r of t)n.push(r),n.length>e&&n.shift();for(;n.length;)yield n.shift()}o(Te,"_syncTakeLast");function q(e,t){return t===void 0?n=>q(e,n):t[Symbol.asyncIterator]?Se(e,t):Te(e,t)}o(q,"takeLast");async function*U(e,t){for await(let n of t){if(!await e(n))return;yield n}}o(U,"_takeWhile");function _e(e,t){return t===void 0?n=>U(e,n):U(e,t)}o(_e,"takeWhile");async function*G(e,t){for await(let n of t)await e(n),yield n}o(G,"_asyncTap");function Ie(e,t){return t===void 0?n=>G(e,n):G(e,t)}o(Ie,"tap");let ke=o(e=>new Promise(t=>setTimeout(t,e)),"sleep");function H(e,t,n){if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(e<=0)throw new TypeError("Expected `limit` to be greater than 0");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");return o((async function*(){let i=0,f;for await(let a of n){if(i<e){typeof f>"u"&&(f=Date.now()),i++,yield a;continue}let y=Date.now()-(f||0),s=t-y;s>0&&await ke(s),f=Date.now(),i=1,yield a}}),"__throttle")()}o(H,"_throttle");function Ee(e,t,n){return n===void 0?r=>H(e,t,r):H(e,t,n)}o(Ee,"throttle");function J(e,t){let n=e[0]+t[0],r=e[1]+t[1];if(r>=1e9){let i=r%1e9;n+=(r-i)/1e9,r=i}return[n,r]}o(J,"addTime");async function*Qe(e,t){let n=t[Symbol.asyncIterator](),r=[0,0];for(;;){let i=process.hrtime(),{value:f,done:a}=await n.next(),y=process.hrtime(i);if(r=J(r,y),e.progress&&e.progress(y,r),a)return e.total&&e.total(r),f;yield f}}o(Qe,"_asyncTime");function*be(e,t){let n=t[Symbol.iterator](),r=[0,0];for(;;){let i=process.hrtime(),{value:f,done:a}=n.next(),y=process.hrtime(i);if(r=J(r,y),e.progress&&e.progress(y,r),a)return e.total&&e.total(r),f;yield f}}o(be,"_syncTime");function K(e={},t){return t===void 0?n=>K(e,n):t[Symbol.asyncIterator]!==void 0?Qe(e,t):be(e,t)}o(K,"time");function Me(e,t,n){let r=g(n),i=[],f=[],a=!1,y=!1,s=0,c=null;function h(){for(;f.length>0&&i.length>0;){let{resolve:m}=f.shift(),d=i.shift();m({done:!1,value:d})}for(;f.length>0&&s===0&&a;){let{resolve:m,reject:d}=f.shift();c?(d(c),c=null):m({done:!0,value:void 0})}}o(h,"fulfillReadQueue");async function u(){if(a){h();return}if(!y&&!(s+i.length>=e)){y=!0,s++;try{let{done:m,value:d}=await r.next();m?(a=!0,s--,h()):w(d)}catch(m){a=!0,s--,c=m,h()}y=!1,u()}}o(u,"fillQueue");async function w(m){try{let d=await t(m);i.push(d)}catch(d){a=!0,c=d}s--,h(),u()}o(w,"mapAndQueue");async function v(){if(i.length===0){let d=C();return f.push(d),u(),d.promise}let m=i.shift();return u(),{done:!1,value:m}}o(v,"next");let S={next:v,[Symbol.asyncIterator]:()=>S};return S}o(Me,"_transform");function M(e,t,n){return t===void 0?(r,i)=>i?M(e,r,i):M(e,r):n===void 0?r=>M(e,t,r):Me(e,t,n)}o(M,"transform");async function X(e,t){let n=null,r=null,i=null,f=o(c=>{n=c,r&&r(c)},"notifyError"),a=o(()=>{i&&i()},"notifyDrain"),y=o(()=>{e.removeListener("error",f),e.removeListener("drain",a)},"cleanup");e.once("error",f);let s=o(()=>new Promise((c,h)=>{if(n)return h(n);e.once("drain",a),i=c,r=h}),"waitForDrain");for await(let c of t)if(e.write(c)===!1&&await s(),n)break;if(y(),n)throw n}o(X,"_writeToStream");function De(e,t){return t===void 0?n=>X(e,n):X(e,t)}o(De,"writeToStream"),l.batch=P,l.batchWithTimeout=L,l.buffer=_,l.collect=re,l.concat=fe,l.consume=ue,l.drop=F,l.filter=I,l.flatMap=j,l.flatTransform=E,l.flatten=T,l.fromStream=he,l.getIterator=g,l.map=k,l.merge=me,l.parallelFlatMap=b,l.parallelMap=Q,l.parallelMerge=pe,l.pipeline=N,l.reduce=W,l.take=V,l.takeLast=q,l.takeWhile=_e,l.tap=Ie,l.throttle=Ee,l.time=K,l.transform=M,l.writeToStream=De}))});var{parallelMap:We,transform:Le}=Z();module.exports={parallelMap:We,transform:Le};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Bundled from validate-npm-package-name
|
|
3
4
|
* This is a zero-dependency bundle created by esbuild.
|
|
4
5
|
*/
|
|
5
|
-
"use strict";var
|
|
6
|
+
"use strict";var h=Object.defineProperty;var o=(n,t)=>h(n,"name",{value:t,configurable:!0});var f=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var l=f((b,u)=>{"use strict";var{builtinModules:p}=require("module"),d=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),g=["node_modules","favicon.ico"];function v(n){var t=[],e=[];if(n===null)return e.push("name cannot be null"),r(t,e);if(n===void 0)return e.push("name cannot be undefined"),r(t,e);if(typeof n!="string")return e.push("name must be a string"),r(t,e);if(n.length||e.push("name length must be greater than zero"),n.startsWith(".")&&e.push("name cannot start with a period"),n.match(/^_/)&&e.push("name cannot start with an underscore"),n.trim()!==n&&e.push("name cannot contain leading or trailing spaces"),g.forEach(function(c){n.toLowerCase()===c&&e.push(c+" is not a valid package name")}),p.includes(n.toLowerCase())&&t.push(n+" is a core module name"),n.length>214&&t.push("name can no longer contain more than 214 characters"),n.toLowerCase()!==n&&t.push("name can no longer contain capital letters"),/[~'!()*]/.test(n.split("/").slice(-1)[0])&&t.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(n)!==n){var i=n.match(d);if(i){var s=i[1],a=i[2];if(a.startsWith(".")&&e.push("name cannot start with a period"),encodeURIComponent(s)===s&&encodeURIComponent(a)===a)return r(t,e)}e.push("name can only contain URL-friendly characters")}return r(t,e)}o(v,"validate");var r=o(function(n,t){var e={validForNewPackages:t.length===0&&n.length===0,validForOldPackages:t.length===0,warnings:n,errors:t};return e.warnings.length||delete e.warnings,e.errors.length||delete e.errors,e},"done");u.exports=v});module.exports=l();
|
package/dist/external/which.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Bundled from which
|
|
3
4
|
* This is a zero-dependency bundle created by esbuild.
|
|
4
5
|
*/
|
|
5
|
-
var
|
|
6
|
+
"use strict";var N=Object.defineProperty;var c=(e,t)=>N(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var y=E(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});l.sync=l.isexe=void 0;var D=require("fs"),G=require("fs/promises"),U=c(async(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return g(await(0,G.stat)(e),t)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}},"isexe");l.isexe=U;var W=c((e,t={})=>{let{ignoreErrors:r=!1}=t;try{return g((0,D.statSync)(e),t)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}},"sync");l.sync=W;var g=c((e,t)=>e.isFile()&&z(e,t),"checkStat"),z=c((e,t)=>{let r=t.uid??process.getuid?.(),s=t.groups??process.getgroups?.()??[],n=t.gid??process.getgid?.()??s[0];if(r===void 0||n===void 0)throw new Error("cannot get uid or gid");let i=new Set([n,...s]),u=e.mode,f=e.uid,p=e.gid,a=parseInt("100",8),d=parseInt("010",8),B=parseInt("001",8),H=a|d;return!!(u&B||u&d&&i.has(p)||u&a&&f===r||u&H&&r===0)},"checkMode")});var x=E(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.sync=h.isexe=void 0;var J=require("fs"),K=require("fs/promises"),Q=c(async(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return _(await(0,K.stat)(e),e,t)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}},"isexe");h.isexe=Q;var V=c((e,t={})=>{let{ignoreErrors:r=!1}=t;try{return _((0,J.statSync)(e),e,t)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}},"sync");h.sync=V;var Y=c((e,t)=>{let{pathExt:r=process.env.PATHEXT||""}=t,s=r.split(";");if(s.indexOf("")!==-1)return!0;for(let n=0;n<s.length;n++){let i=s[n].toLowerCase(),u=e.substring(e.length-i.length).toLowerCase();if(i&&u===i)return!0}return!1},"checkPathExt"),_=c((e,t,r)=>e.isFile()&&Y(t,r),"checkStat")});var v=E(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0})});var C=E(o=>{"use strict";var P=o&&o.__createBinding||(Object.create?(function(e,t,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:c(function(){return t[r]},"get")}),Object.defineProperty(e,s,n)}):(function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]})),Z=o&&o.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),O=o&&o.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&P(t,e,r);return Z(t,e),t},m=o&&o.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&P(t,e,r)};Object.defineProperty(o,"__esModule",{value:!0});o.sync=o.isexe=o.posix=o.win32=void 0;var S=O(y());o.posix=S;var b=O(x());o.win32=b;m(v(),o);var k=process.env._ISEXE_TEST_PLATFORM_||process.platform,j=k==="win32"?b:S;o.isexe=j.isexe;o.sync=j.sync});var X=E((Ee,R)=>{var{isexe:ee,sync:te}=C(),{join:re,delimiter:ne,sep:M,posix:q}=require("path"),T=process.platform==="win32",A=new RegExp(`[${q.sep}${M===q.sep?"":M}]`.replace(/(\\)/g,"\\$1")),se=new RegExp(`^\\.${A.source}`),$=c(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),I=c((e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:s=ne})=>{let n=e.match(A)?[""]:[...T?[process.cwd()]:[],...(t||"").split(s)];if(T){let i=r||[".EXE",".CMD",".BAT",".COM"].join(s),u=i.split(s).flatMap(f=>[f,f.toLowerCase()]);return e.includes(".")&&u[0]!==""&&u.unshift(""),{pathEnv:n,pathExt:u,pathExtExe:i}}return{pathEnv:n,pathExt:[""]}},"getPathInfo"),F=c((e,t)=>{let r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&se.test(t)?t.slice(0,2):"")+re(r,t)},"getPathPart"),L=c(async(e,t={})=>{let{pathEnv:r,pathExt:s,pathExtExe:n}=I(e,t),i=[];for(let u of r){let f=F(u,e);for(let p of s){let a=f+p;if(await ee(a,{pathExt:n,ignoreErrors:!0})){if(!t.all)return a;i.push(a)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw $(e)},"which"),oe=c((e,t={})=>{let{pathEnv:r,pathExt:s,pathExtExe:n}=I(e,t),i=[];for(let u of r){let f=F(u,e);for(let p of s){let a=f+p;if(te(a,{pathExt:n,ignoreErrors:!0})){if(!t.all)return a;i.push(a)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw $(e)},"whichSync");R.exports=L;L.sync=oe});module.exports=X();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Bundled from yargs-parser
|
|
3
4
|
* This is a zero-dependency bundle created by esbuild.
|
|
4
5
|
*/
|
|
5
|
-
var V=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var Be=Object.getOwnPropertyNames;var Ie=Object.prototype.hasOwnProperty;var d=(i,h)=>V(i,"name",{value:h,configurable:!0});var Fe=(i,h)=>{for(var O in h)V(i,O,{get:h[O],enumerable:!0})},Le=(i,h,O,u)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of Be(h))!Ie.call(i,l)&&l!==O&&V(i,l,{get:()=>h[l],enumerable:!(u=ze(h,l))||u.enumerable});return i};var Pe=i=>Le(V({},"__esModule",{value:!0}),i);var Te={};Fe(Te,{default:()=>We,"module.exports":()=>I});module.exports=Pe(Te);var ge=require("util"),Y=require("path");function z(i){if(i!==i.toLowerCase()&&i!==i.toUpperCase()||(i=i.toLowerCase()),i.indexOf("-")===-1&&i.indexOf("_")===-1)return i;{let O="",u=!1,l=i.match(/^-+/);for(let b=l?l[0].length:0;b<i.length;b++){let g=i.charAt(b);u&&(u=!1,g=g.toUpperCase()),b!==0&&(g==="-"||g==="_")?u=!0:g!=="-"&&g!=="_"&&(O+=g)}return O}}d(z,"camelCase");function D(i,h){let O=i.toLowerCase();h=h||"-";let u="";for(let l=0;l<i.length;l++){let b=O.charAt(l),g=i.charAt(l);b!==g&&l>0?u+=`${h}${O.charAt(l)}`:u+=g}return u}d(D,"decamelize");function G(i){return i==null?!1:typeof i=="number"||/^0x[0-9a-f]+$/i.test(i)?!0:/^0[^.]/.test(i)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(i)}d(G,"looksLikeNumber");function ue(i){if(Array.isArray(i))return i.map(g=>typeof g!="string"?g+"":g);i=i.trim();let h=0,O=null,u=null,l=null,b=[];for(let g=0;g<i.length;g++){if(O=u,u=i.charAt(g),u===" "&&!l){O!==" "&&h++;continue}u===l?l=null:(u==="'"||u==='"')&&!l&&(l=u),b[h]||(b[h]=""),b[h]+=u}return b}d(ue,"tokenizeArgString");var N;(function(i){i.BOOLEAN="boolean",i.STRING="string",i.NUMBER="number",i.ARRAY="array"})(N||(N={}));var $,K=class{static{d(this,"YargsParser")}constructor(h){$=h}parse(h,O){let u=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},O),l=ue(h),b=typeof h=="string",g=Me(Object.assign(Object.create(null),u.alias)),m=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},u.configuration),C=Object.assign(Object.create(null),u.default),te=u.configObjects||[],H=u.envPrefix,se=m["populate--"],re=se?"--":"_",P=Object.create(null),oe=Object.create(null),R=u.__||$.format,r={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},x=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,Z=new RegExp("^--"+m["negation-prefix"]+"(.+)");[].concat(u.array||[]).filter(Boolean).forEach(function(e){let t=typeof e=="object"?e.key:e,o=Object.keys(e).map(function(s){return{boolean:"bools",string:"strings",number:"numbers"}[s]}).filter(Boolean).pop();o&&(r[o][t]=!0),r.arrays[t]=!0,r.keys.push(t)}),[].concat(u.boolean||[]).filter(Boolean).forEach(function(e){r.bools[e]=!0,r.keys.push(e)}),[].concat(u.string||[]).filter(Boolean).forEach(function(e){r.strings[e]=!0,r.keys.push(e)}),[].concat(u.number||[]).filter(Boolean).forEach(function(e){r.numbers[e]=!0,r.keys.push(e)}),[].concat(u.count||[]).filter(Boolean).forEach(function(e){r.counts[e]=!0,r.keys.push(e)}),[].concat(u.normalize||[]).filter(Boolean).forEach(function(e){r.normalize[e]=!0,r.keys.push(e)}),typeof u.narg=="object"&&Object.entries(u.narg).forEach(([e,t])=>{typeof t=="number"&&(r.nargs[e]=t,r.keys.push(e))}),typeof u.coerce=="object"&&Object.entries(u.coerce).forEach(([e,t])=>{typeof t=="function"&&(r.coercions[e]=t,r.keys.push(e))}),typeof u.config<"u"&&(Array.isArray(u.config)||typeof u.config=="string"?[].concat(u.config).filter(Boolean).forEach(function(e){r.configs[e]=!0}):typeof u.config=="object"&&Object.entries(u.config).forEach(([e,t])=>{(typeof t=="boolean"||typeof t=="function")&&(r.configs[e]=t)})),Ne(u.key,g,u.default,r.arrays),Object.keys(C).forEach(function(e){(r.aliases[e]||[]).forEach(function(t){C[t]=C[e]})});let _=null;Re();let M=[],j=Object.assign(Object.create(null),{_:[]}),ie={};for(let e=0;e<l.length;e++){let t=l[e],o=t.replace(/^-{3,}/,"---"),s,n,a,c,f,E;if(t!=="--"&&/^-/.test(t)&&T(t))J(t);else if(o.match(/^---+(=|$)/)){J(t);continue}else if(t.match(/^--.+=/)||!m["short-option-groups"]&&t.match(/^-.+=/))c=t.match(/^--?([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&(p(c[1],r.arrays)?e=U(e,c[1],l,c[2]):p(c[1],r.nargs)!==!1?e=S(e,c[1],l,c[2]):A(c[1],c[2],!0));else if(t.match(Z)&&m["boolean-negation"])c=t.match(Z),c!==null&&Array.isArray(c)&&c.length>=2&&(n=c[1],A(n,p(n,r.arrays)?[!1]:!1));else if(t.match(/^--.+/)||!m["short-option-groups"]&&t.match(/^-[^-]+/))c=t.match(/^--?(.+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(n=c[1],p(n,r.arrays)?e=U(e,n,l):p(n,r.nargs)!==!1?e=S(e,n,l):(f=l[e+1],f!==void 0&&(!f.match(/^-/)||f.match(x))&&!p(n,r.bools)&&!p(n,r.counts)||/^(true|false)$/.test(f)?(A(n,f),e++):A(n,B(n))));else if(t.match(/^-.\..+=/))c=t.match(/^-([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&A(c[1],c[2]);else if(t.match(/^-.\..+/)&&!t.match(x))f=l[e+1],c=t.match(/^-(.\..+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(n=c[1],f!==void 0&&!f.match(/^-/)&&!p(n,r.bools)&&!p(n,r.counts)?(A(n,f),e++):A(n,B(n)));else if(t.match(/^-[^-]+/)&&!t.match(x)){a=t.slice(1,-1).split(""),s=!1;for(let y=0;y<a.length;y++){if(f=t.slice(y+2),a[y+1]&&a[y+1]==="="){E=t.slice(y+3),n=a[y],p(n,r.arrays)?e=U(e,n,l,E):p(n,r.nargs)!==!1?e=S(e,n,l,E):A(n,E),s=!0;break}if(f==="-"){A(a[y],f);continue}if(/[A-Za-z]/.test(a[y])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(f)&&p(f,r.bools)===!1){A(a[y],f),s=!0;break}if(a[y+1]&&a[y+1].match(/\W/)){A(a[y],f),s=!0;break}else A(a[y],B(a[y]))}n=t.slice(-1)[0],!s&&n!=="-"&&(p(n,r.arrays)?e=U(e,n,l):p(n,r.nargs)!==!1?e=S(e,n,l):(f=l[e+1],f!==void 0&&(!/^(-|--)[^-]/.test(f)||f.match(x))&&!p(n,r.bools)&&!p(n,r.counts)||/^(true|false)$/.test(f)?(A(n,f),e++):A(n,B(n))))}else if(t.match(/^-[0-9]$/)&&t.match(x)&&p(t.slice(1),r.bools))n=t.slice(1),A(n,B(n));else if(t==="--"){M=l.slice(e+1);break}else if(m["halt-at-non-option"]){M=l.slice(e);break}else J(t)}ae(j,!0),ae(j,!1),Oe(j),je(),fe(j,r.aliases,C,!0),Ee(j),m["set-placeholder-key"]&&ye(j),Object.keys(r.counts).forEach(function(e){F(j,e.split("."))||A(e,0)}),se&&M.length&&(j[re]=[]),M.forEach(function(e){j[re].push(e)}),m["camel-case-expansion"]&&m["strip-dashed"]&&Object.keys(j).filter(e=>e!=="--"&&e.includes("-")).forEach(e=>{delete j[e]}),m["strip-aliased"]&&[].concat(...Object.keys(g).map(e=>g[e])).forEach(e=>{m["camel-case-expansion"]&&e.includes("-")&&delete j[e.split(".").map(t=>z(t)).join(".")],delete j[e]});function J(e){let t=W("_",e);(typeof t=="string"||typeof t=="number")&&j._.push(t)}d(J,"pushPositional");function S(e,t,o,s){let n,a=p(t,r.nargs);if(a=typeof a!="number"||isNaN(a)?1:a,a===0)return w(s)||(_=Error(R("Argument unexpected for: %s",t))),A(t,B(t)),e;let c=w(s)?0:1;if(m["nargs-eats-options"])o.length-(e+1)+c<a&&(_=Error(R("Not enough arguments following: %s",t))),c=a;else{for(n=e+1;n<o.length&&(!o[n].match(/^-[^0-9]/)||o[n].match(x)||T(o[n]));n++)c++;c<a&&(_=Error(R("Not enough arguments following: %s",t)))}let f=Math.min(c,a);for(!w(s)&&f>0&&(A(t,s),f--),n=e+1;n<f+e+1;n++)A(t,o[n]);return e+f}d(S,"eatNargs");function U(e,t,o,s){let n=[],a=s||o[e+1],c=p(t,r.nargs);if(p(t,r.bools)&&!/^(true|false)$/.test(a))n.push(!0);else if(w(a)||w(s)&&/^-/.test(a)&&!x.test(a)&&!T(a)){if(C[t]!==void 0){let f=C[t];n=Array.isArray(f)?f:[f]}}else{w(s)||n.push(Q(t,s,!0));for(let f=e+1;f<o.length&&!(!m["greedy-arrays"]&&n.length>0||c&&typeof c=="number"&&n.length>=c||(a=o[f],/^-/.test(a)&&!x.test(a)&&!T(a)));f++)e=f,n.push(Q(t,a,b))}return typeof c=="number"&&(c&&n.length<c||isNaN(c)&&n.length===0)&&(_=Error(R("Not enough arguments following: %s",t))),A(t,n),e}d(U,"eatArray");function A(e,t,o=b){if(/-/.test(e)&&m["camel-case-expansion"]){let a=e.split(".").map(function(c){return z(c)}).join(".");ce(e,a)}let s=Q(e,t,o),n=e.split(".");L(j,n,s),r.aliases[e]&&r.aliases[e].forEach(function(a){let c=a.split(".");L(j,c,s)}),n.length>1&&m["dot-notation"]&&(r.aliases[n[0]]||[]).forEach(function(a){let c=a.split("."),f=[].concat(n);f.shift(),c=c.concat(f),(r.aliases[e]||[]).includes(c.join("."))||L(j,c,s)}),p(e,r.normalize)&&!p(e,r.arrays)&&[e].concat(r.aliases[e]||[]).forEach(function(c){Object.defineProperty(ie,c,{enumerable:!0,get(){return t},set(f){t=typeof f=="string"?$.normalize(f):f}})})}d(A,"setArg");function ce(e,t){r.aliases[e]&&r.aliases[e].length||(r.aliases[e]=[t],P[t]=!0),r.aliases[t]&&r.aliases[t].length||ce(t,e)}d(ce,"addNewAlias");function Q(e,t,o){o&&(t=Se(t)),(p(e,r.bools)||p(e,r.counts))&&typeof t=="string"&&(t=t==="true");let s=Array.isArray(t)?t.map(function(n){return W(e,n)}):W(e,t);return p(e,r.counts)&&(w(s)||typeof s=="boolean")&&(s=X()),p(e,r.normalize)&&p(e,r.arrays)&&(Array.isArray(t)?s=t.map(n=>$.normalize(n)):s=$.normalize(t)),s}d(Q,"processValue");function W(e,t){return!m["parse-positional-numbers"]&&e==="_"||!p(e,r.strings)&&!p(e,r.bools)&&!Array.isArray(t)&&(G(t)&&m["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!w(t)&&p(e,r.numbers))&&(t=Number(t)),t}d(W,"maybeCoerceNumber");function Oe(e){let t=Object.create(null);fe(t,r.aliases,C),Object.keys(r.configs).forEach(function(o){let s=e[o]||t[o];if(s)try{let n=null,a=$.resolve($.cwd(),s),c=r.configs[o];if(typeof c=="function"){try{n=c(a)}catch(f){n=f}if(n instanceof Error){_=n;return}}else n=$.require(a);q(n)}catch(n){n.name==="PermissionDenied"?_=n:e[o]&&(_=Error(R("Invalid JSON config file: %s",s)))}})}d(Oe,"setConfig");function q(e,t){Object.keys(e).forEach(function(o){let s=e[o],n=t?t+"."+o:o;typeof s=="object"&&s!==null&&!Array.isArray(s)&&m["dot-notation"]?q(s,n):(!F(j,n.split("."))||p(n,r.arrays)&&m["combine-arrays"])&&A(n,s)})}d(q,"setConfigObject");function je(){typeof te<"u"&&te.forEach(function(e){q(e)})}d(je,"setConfigObjects");function ae(e,t){if(typeof H>"u")return;let o=typeof H=="string"?H:"",s=$.env();Object.keys(s).forEach(function(n){if(o===""||n.lastIndexOf(o,0)===0){let a=n.split("__").map(function(c,f){return f===0&&(c=c.substring(o.length)),z(c)});(t&&r.configs[a.join(".")]||!t)&&!F(e,a)&&A(a.join("."),s[n])}})}d(ae,"applyEnvVars");function Ee(e){let t,o=new Set;Object.keys(e).forEach(function(s){if(!o.has(s)&&(t=p(s,r.coercions),typeof t=="function"))try{let n=W(s,t(e[s]));[].concat(r.aliases[s]||[],s).forEach(a=>{o.add(a),e[a]=n})}catch(n){_=n}})}d(Ee,"applyCoercions");function ye(e){return r.keys.forEach(t=>{~t.indexOf(".")||typeof e[t]>"u"&&(e[t]=void 0)}),e}d(ye,"setPlaceholderKeys");function fe(e,t,o,s=!1){Object.keys(o).forEach(function(n){F(e,n.split("."))||(L(e,n.split("."),o[n]),s&&(oe[n]=!0),(t[n]||[]).forEach(function(a){F(e,a.split("."))||L(e,a.split("."),o[n])}))})}d(fe,"applyDefaultsAndAliases");function F(e,t){let o=e;m["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach(function(n){o=o[n]||{}});let s=t[t.length-1];return typeof o!="object"?!1:s in o}d(F,"hasKey");function L(e,t,o){let s=e;m["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach(function(E){E=pe(E),typeof s=="object"&&s[E]===void 0&&(s[E]={}),typeof s[E]!="object"||Array.isArray(s[E])?(Array.isArray(s[E])?s[E].push({}):s[E]=[s[E],{}],s=s[E][s[E].length-1]):s=s[E]});let n=pe(t[t.length-1]),a=p(t.join("."),r.arrays),c=Array.isArray(o),f=m["duplicate-arguments-array"];!f&&p(n,r.nargs)&&(f=!0,(!w(s[n])&&r.nargs[n]===1||Array.isArray(s[n])&&s[n].length===r.nargs[n])&&(s[n]=void 0)),o===X()?s[n]=X(s[n]):Array.isArray(s[n])?f&&a&&c?s[n]=m["flatten-duplicate-arrays"]?s[n].concat(o):(Array.isArray(s[n][0])?s[n]:[s[n]]).concat([o]):!f&&!!a==!!c?s[n]=o:s[n]=s[n].concat([o]):s[n]===void 0&&a?s[n]=c?o:[o]:f&&!(s[n]===void 0||p(n,r.counts)||p(n,r.bools))?s[n]=[s[n],o]:s[n]=o}d(L,"setKey");function Ne(...e){e.forEach(function(t){Object.keys(t||{}).forEach(function(o){r.aliases[o]||(r.aliases[o]=[].concat(g[o]||[]),r.aliases[o].concat(o).forEach(function(s){if(/-/.test(s)&&m["camel-case-expansion"]){let n=z(s);n!==o&&r.aliases[o].indexOf(n)===-1&&(r.aliases[o].push(n),P[n]=!0)}}),r.aliases[o].concat(o).forEach(function(s){if(s.length>1&&/[A-Z]/.test(s)&&m["camel-case-expansion"]){let n=D(s,"-");n!==o&&r.aliases[o].indexOf(n)===-1&&(r.aliases[o].push(n),P[n]=!0)}}),r.aliases[o].forEach(function(s){r.aliases[s]=[o].concat(r.aliases[o].filter(function(n){return s!==n}))}))})})}d(Ne,"extendAliases");function p(e,t){let o=[].concat(r.aliases[e]||[],e),s=Object.keys(t),n=o.find(a=>s.includes(a));return n?t[n]:!1}d(p,"checkAllAliases");function le(e){let t=Object.keys(r);return[].concat(t.map(s=>r[s])).some(function(s){return Array.isArray(s)?s.includes(e):s[e]})}d(le,"hasAnyFlag");function Ce(e,...t){return[].concat(...t).some(function(s){let n=e.match(s);return n&&le(n[1])})}d(Ce,"hasFlagsMatching");function _e(e){if(e.match(x)||!e.match(/^-[^-]+/))return!1;let t=!0,o,s=e.slice(1).split("");for(let n=0;n<s.length;n++){if(o=e.slice(n+2),!le(s[n])){t=!1;break}if(s[n+1]&&s[n+1]==="="||o==="-"||/[A-Za-z]/.test(s[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(o)||s[n+1]&&s[n+1].match(/\W/))break}return t}d(_e,"hasAllShortFlags");function T(e){return m["unknown-options-as-args"]&&xe(e)}d(T,"isUnknownOptionAsArg");function xe(e){return e=e.replace(/^-{3,}/,"--"),e.match(x)||_e(e)?!1:!Ce(e,/^-+([^=]+?)=[\s\S]*$/,Z,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}d(xe,"isUnknownOption");function B(e){return!p(e,r.bools)&&!p(e,r.counts)&&`${e}`in C?C[e]:we($e(e))}d(B,"defaultValue");function we(e){return{[N.BOOLEAN]:!0,[N.STRING]:"",[N.NUMBER]:void 0,[N.ARRAY]:[]}[e]}d(we,"defaultForType");function $e(e){let t=N.BOOLEAN;return p(e,r.strings)?t=N.STRING:p(e,r.numbers)?t=N.NUMBER:p(e,r.bools)?t=N.BOOLEAN:p(e,r.arrays)&&(t=N.ARRAY),t}d($e,"guessType");function w(e){return e===void 0}d(w,"isUndefined");function Re(){Object.keys(r.counts).find(e=>p(e,r.arrays)?(_=Error(R("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):p(e,r.nargs)?(_=Error(R("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0):!1)}return d(Re,"checkConfiguration"),{aliases:Object.assign({},r.aliases),argv:Object.assign(ie,j),configuration:m,defaulted:Object.assign({},oe),error:_,newAliases:Object.assign({},P)}}};function Me(i){let h=[],O=Object.create(null),u=!0;for(Object.keys(i).forEach(function(l){h.push([].concat(i[l],l))});u;){u=!1;for(let l=0;l<h.length;l++)for(let b=l+1;b<h.length;b++)if(h[l].filter(function(m){return h[b].indexOf(m)!==-1}).length){h[l]=h[l].concat(h[b]),h.splice(b,1),u=!0;break}}return h.forEach(function(l){l=l.filter(function(g,m,C){return C.indexOf(g)===m});let b=l.pop();b!==void 0&&typeof b=="string"&&(O[b]=l)}),O}d(Me,"combineAliases");function X(i){return i!==void 0?i+1:1}d(X,"increment");function pe(i){return i==="__proto__"?"___proto___":i}d(pe,"sanitizeKey");function Se(i){return typeof i=="string"&&(i[0]==="'"||i[0]==='"')&&i[i.length-1]===i[0]?i.substring(1,i.length-1):i}d(Se,"stripQuotes");var be=require("fs"),ne=require("node:module");var v,k,ee,de=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):20,he=(k=(v=process==null?void 0:process.versions)===null||v===void 0?void 0:v.node)!==null&&k!==void 0?k:(ee=process==null?void 0:process.version)===null||ee===void 0?void 0:ee.slice(1);if(he&&Number(he.match(/^([^.]+)/)[1])<de)throw Error(`yargs parser supports a minimum Node.js version of ${de}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var Ue=process?process.env:{},me=ne.createRequire?(0,ne.createRequire)(__filename):void 0,Ae=new K({cwd:process.cwd,env:d(()=>Ue,"env"),format:ge.format,normalize:Y.normalize,resolve:Y.resolve,require:d(i=>{if(typeof me<"u")return me(i);if(i.match(/\.json$/))return JSON.parse((0,be.readFileSync)(i,"utf8"));throw Error("only .json config files are supported in ESM")},"require")}),I=d(function(h,O){return Ae.parse(h.slice(),O).argv},"Parser");I.detailed=function(i,h){return Ae.parse(i.slice(),h)};I.camelCase=z;I.decamelize=D;I.looksLikeNumber=G;var We=I;0&&(module.exports={"module.exports":null});
|
|
6
|
+
"use strict";var D=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var Ue=Object.getOwnPropertyNames;var We=Object.prototype.hasOwnProperty;var h=(i,p)=>D(i,"name",{value:p,configurable:!0});var P=(i,p)=>()=>(i&&(p=i(i=0)),p);var Te=(i,p)=>{for(var O in p)D(i,O,{get:p[O],enumerable:!0})},Ve=(i,p,O,u)=>{if(p&&typeof p=="object"||typeof p=="function")for(let l of Ue(p))!We.call(i,l)&&l!==O&&D(i,l,{get:()=>p[l],enumerable:!(u=Se(p,l))||u.enumerable});return i};var De=i=>Ve(D({},"__esModule",{value:!0}),i);function z(i){if(i!==i.toLowerCase()&&i!==i.toUpperCase()||(i=i.toLowerCase()),i.indexOf("-")===-1&&i.indexOf("_")===-1)return i;{let O="",u=!1,l=i.match(/^-+/);for(let b=l?l[0].length:0;b<i.length;b++){let g=i.charAt(b);u&&(u=!1,g=g.toUpperCase()),b!==0&&(g==="-"||g==="_")?u=!0:g!=="-"&&g!=="_"&&(O+=g)}return O}}function G(i,p){let O=i.toLowerCase();p=p||"-";let u="";for(let l=0;l<i.length;l++){let b=O.charAt(l),g=i.charAt(l);b!==g&&l>0?u+=`${p}${O.charAt(l)}`:u+=g}return u}function K(i){return i==null?!1:typeof i=="number"||/^0x[0-9a-f]+$/i.test(i)?!0:/^0[^.]/.test(i)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(i)}var v=P(()=>{h(z,"camelCase");h(G,"decamelize");h(K,"looksLikeNumber")});function de(i){if(Array.isArray(i))return i.map(g=>typeof g!="string"?g+"":g);i=i.trim();let p=0,O=null,u=null,l=null,b=[];for(let g=0;g<i.length;g++){if(O=u,u=i.charAt(g),u===" "&&!l){O!==" "&&p++;continue}u===l?l=null:(u==="'"||u==='"')&&!l&&(l=u),b[p]||(b[p]=""),b[p]+=u}return b}var he=P(()=>{h(de,"tokenizeArgString")});var N,me=P(()=>{(function(i){i.BOOLEAN="boolean",i.STRING="string",i.NUMBER="number",i.ARRAY="array"})(N||(N={}))});function Ge(i){let p=[],O=Object.create(null),u=!0;for(Object.keys(i).forEach(function(l){p.push([].concat(i[l],l))});u;){u=!1;for(let l=0;l<p.length;l++)for(let b=l+1;b<p.length;b++)if(p[l].filter(function(m){return p[b].indexOf(m)!==-1}).length){p[l]=p[l].concat(p[b]),p.splice(b,1),u=!0;break}}return p.forEach(function(l){l=l.filter(function(g,m,C){return C.indexOf(g)===m});let b=l.pop();b!==void 0&&typeof b=="string"&&(O[b]=l)}),O}function k(i){return i!==void 0?i+1:1}function ge(i){return i==="__proto__"?"___proto___":i}function Ke(i){return typeof i=="string"&&(i[0]==="'"||i[0]==='"')&&i[i.length-1]===i[0]?i.substring(1,i.length-1):i}var $,Y,be=P(()=>{he();me();v();Y=class{static{h(this,"YargsParser")}constructor(p){$=p}parse(p,O){let u=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},O),l=de(p),b=typeof p=="string",g=Ge(Object.assign(Object.create(null),u.alias)),m=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},u.configuration),C=Object.assign(Object.create(null),u.default),re=u.configObjects||[],Z=u.envPrefix,oe=m["populate--"],ie=oe?"--":"_",M=Object.create(null),ce=Object.create(null),R=u.__||$.format,r={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},x=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,J=new RegExp("^--"+m["negation-prefix"]+"(.+)");[].concat(u.array||[]).filter(Boolean).forEach(function(e){let t=typeof e=="object"?e.key:e,o=Object.keys(e).map(function(s){return{boolean:"bools",string:"strings",number:"numbers"}[s]}).filter(Boolean).pop();o&&(r[o][t]=!0),r.arrays[t]=!0,r.keys.push(t)}),[].concat(u.boolean||[]).filter(Boolean).forEach(function(e){r.bools[e]=!0,r.keys.push(e)}),[].concat(u.string||[]).filter(Boolean).forEach(function(e){r.strings[e]=!0,r.keys.push(e)}),[].concat(u.number||[]).filter(Boolean).forEach(function(e){r.numbers[e]=!0,r.keys.push(e)}),[].concat(u.count||[]).filter(Boolean).forEach(function(e){r.counts[e]=!0,r.keys.push(e)}),[].concat(u.normalize||[]).filter(Boolean).forEach(function(e){r.normalize[e]=!0,r.keys.push(e)}),typeof u.narg=="object"&&Object.entries(u.narg).forEach(([e,t])=>{typeof t=="number"&&(r.nargs[e]=t,r.keys.push(e))}),typeof u.coerce=="object"&&Object.entries(u.coerce).forEach(([e,t])=>{typeof t=="function"&&(r.coercions[e]=t,r.keys.push(e))}),typeof u.config<"u"&&(Array.isArray(u.config)||typeof u.config=="string"?[].concat(u.config).filter(Boolean).forEach(function(e){r.configs[e]=!0}):typeof u.config=="object"&&Object.entries(u.config).forEach(([e,t])=>{(typeof t=="boolean"||typeof t=="function")&&(r.configs[e]=t)})),ze(u.key,g,u.default,r.arrays),Object.keys(C).forEach(function(e){(r.aliases[e]||[]).forEach(function(t){C[t]=C[e]})});let _=null;Me();let S=[],j=Object.assign(Object.create(null),{_:[]}),ae={};for(let e=0;e<l.length;e++){let t=l[e],o=t.replace(/^-{3,}/,"---"),s,n,a,c,f,E;if(t!=="--"&&/^-/.test(t)&&V(t))q(t);else if(o.match(/^---+(=|$)/)){q(t);continue}else if(t.match(/^--.+=/)||!m["short-option-groups"]&&t.match(/^-.+=/))c=t.match(/^--?([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&(d(c[1],r.arrays)?e=W(e,c[1],l,c[2]):d(c[1],r.nargs)!==!1?e=U(e,c[1],l,c[2]):A(c[1],c[2],!0));else if(t.match(J)&&m["boolean-negation"])c=t.match(J),c!==null&&Array.isArray(c)&&c.length>=2&&(n=c[1],A(n,d(n,r.arrays)?[!1]:!1));else if(t.match(/^--.+/)||!m["short-option-groups"]&&t.match(/^-[^-]+/))c=t.match(/^--?(.+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(n=c[1],d(n,r.arrays)?e=W(e,n,l):d(n,r.nargs)!==!1?e=U(e,n,l):(f=l[e+1],f!==void 0&&(!f.match(/^-/)||f.match(x))&&!d(n,r.bools)&&!d(n,r.counts)||/^(true|false)$/.test(f)?(A(n,f),e++):A(n,B(n))));else if(t.match(/^-.\..+=/))c=t.match(/^-([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&A(c[1],c[2]);else if(t.match(/^-.\..+/)&&!t.match(x))f=l[e+1],c=t.match(/^-(.\..+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(n=c[1],f!==void 0&&!f.match(/^-/)&&!d(n,r.bools)&&!d(n,r.counts)?(A(n,f),e++):A(n,B(n)));else if(t.match(/^-[^-]+/)&&!t.match(x)){a=t.slice(1,-1).split(""),s=!1;for(let y=0;y<a.length;y++){if(f=t.slice(y+2),a[y+1]&&a[y+1]==="="){E=t.slice(y+3),n=a[y],d(n,r.arrays)?e=W(e,n,l,E):d(n,r.nargs)!==!1?e=U(e,n,l,E):A(n,E),s=!0;break}if(f==="-"){A(a[y],f);continue}if(/[A-Za-z]/.test(a[y])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(f)&&d(f,r.bools)===!1){A(a[y],f),s=!0;break}if(a[y+1]&&a[y+1].match(/\W/)){A(a[y],f),s=!0;break}else A(a[y],B(a[y]))}n=t.slice(-1)[0],!s&&n!=="-"&&(d(n,r.arrays)?e=W(e,n,l):d(n,r.nargs)!==!1?e=U(e,n,l):(f=l[e+1],f!==void 0&&(!/^(-|--)[^-]/.test(f)||f.match(x))&&!d(n,r.bools)&&!d(n,r.counts)||/^(true|false)$/.test(f)?(A(n,f),e++):A(n,B(n))))}else if(t.match(/^-[0-9]$/)&&t.match(x)&&d(t.slice(1),r.bools))n=t.slice(1),A(n,B(n));else if(t==="--"){S=l.slice(e+1);break}else if(m["halt-at-non-option"]){S=l.slice(e);break}else q(t)}le(j,!0),le(j,!1),xe(j),we(),ue(j,r.aliases,C,!0),$e(j),m["set-placeholder-key"]&&Re(j),Object.keys(r.counts).forEach(function(e){F(j,e.split("."))||A(e,0)}),oe&&S.length&&(j[ie]=[]),S.forEach(function(e){j[ie].push(e)}),m["camel-case-expansion"]&&m["strip-dashed"]&&Object.keys(j).filter(e=>e!=="--"&&e.includes("-")).forEach(e=>{delete j[e]}),m["strip-aliased"]&&[].concat(...Object.keys(g).map(e=>g[e])).forEach(e=>{m["camel-case-expansion"]&&e.includes("-")&&delete j[e.split(".").map(t=>z(t)).join(".")],delete j[e]});function q(e){let t=T("_",e);(typeof t=="string"||typeof t=="number")&&j._.push(t)}h(q,"pushPositional");function U(e,t,o,s){let n,a=d(t,r.nargs);if(a=typeof a!="number"||isNaN(a)?1:a,a===0)return w(s)||(_=Error(R("Argument unexpected for: %s",t))),A(t,B(t)),e;let c=w(s)?0:1;if(m["nargs-eats-options"])o.length-(e+1)+c<a&&(_=Error(R("Not enough arguments following: %s",t))),c=a;else{for(n=e+1;n<o.length&&(!o[n].match(/^-[^0-9]/)||o[n].match(x)||V(o[n]));n++)c++;c<a&&(_=Error(R("Not enough arguments following: %s",t)))}let f=Math.min(c,a);for(!w(s)&&f>0&&(A(t,s),f--),n=e+1;n<f+e+1;n++)A(t,o[n]);return e+f}h(U,"eatNargs");function W(e,t,o,s){let n=[],a=s||o[e+1],c=d(t,r.nargs);if(d(t,r.bools)&&!/^(true|false)$/.test(a))n.push(!0);else if(w(a)||w(s)&&/^-/.test(a)&&!x.test(a)&&!V(a)){if(C[t]!==void 0){let f=C[t];n=Array.isArray(f)?f:[f]}}else{w(s)||n.push(Q(t,s,!0));for(let f=e+1;f<o.length&&!(!m["greedy-arrays"]&&n.length>0||c&&typeof c=="number"&&n.length>=c||(a=o[f],/^-/.test(a)&&!x.test(a)&&!V(a)));f++)e=f,n.push(Q(t,a,b))}return typeof c=="number"&&(c&&n.length<c||isNaN(c)&&n.length===0)&&(_=Error(R("Not enough arguments following: %s",t))),A(t,n),e}h(W,"eatArray");function A(e,t,o=b){if(/-/.test(e)&&m["camel-case-expansion"]){let a=e.split(".").map(function(c){return z(c)}).join(".");fe(e,a)}let s=Q(e,t,o),n=e.split(".");L(j,n,s),r.aliases[e]&&r.aliases[e].forEach(function(a){let c=a.split(".");L(j,c,s)}),n.length>1&&m["dot-notation"]&&(r.aliases[n[0]]||[]).forEach(function(a){let c=a.split("."),f=[].concat(n);f.shift(),c=c.concat(f),(r.aliases[e]||[]).includes(c.join("."))||L(j,c,s)}),d(e,r.normalize)&&!d(e,r.arrays)&&[e].concat(r.aliases[e]||[]).forEach(function(c){Object.defineProperty(ae,c,{enumerable:!0,get(){return t},set(f){t=typeof f=="string"?$.normalize(f):f}})})}h(A,"setArg");function fe(e,t){r.aliases[e]&&r.aliases[e].length||(r.aliases[e]=[t],M[t]=!0),r.aliases[t]&&r.aliases[t].length||fe(t,e)}h(fe,"addNewAlias");function Q(e,t,o){o&&(t=Ke(t)),(d(e,r.bools)||d(e,r.counts))&&typeof t=="string"&&(t=t==="true");let s=Array.isArray(t)?t.map(function(n){return T(e,n)}):T(e,t);return d(e,r.counts)&&(w(s)||typeof s=="boolean")&&(s=k()),d(e,r.normalize)&&d(e,r.arrays)&&(Array.isArray(t)?s=t.map(n=>$.normalize(n)):s=$.normalize(t)),s}h(Q,"processValue");function T(e,t){return!m["parse-positional-numbers"]&&e==="_"||!d(e,r.strings)&&!d(e,r.bools)&&!Array.isArray(t)&&(K(t)&&m["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!w(t)&&d(e,r.numbers))&&(t=Number(t)),t}h(T,"maybeCoerceNumber");function xe(e){let t=Object.create(null);ue(t,r.aliases,C),Object.keys(r.configs).forEach(function(o){let s=e[o]||t[o];if(s)try{let n=null,a=$.resolve($.cwd(),s),c=r.configs[o];if(typeof c=="function"){try{n=c(a)}catch(f){n=f}if(n instanceof Error){_=n;return}}else n=$.require(a);X(n)}catch(n){n.name==="PermissionDenied"?_=n:e[o]&&(_=Error(R("Invalid JSON config file: %s",s)))}})}h(xe,"setConfig");function X(e,t){Object.keys(e).forEach(function(o){let s=e[o],n=t?t+"."+o:o;typeof s=="object"&&s!==null&&!Array.isArray(s)&&m["dot-notation"]?X(s,n):(!F(j,n.split("."))||d(n,r.arrays)&&m["combine-arrays"])&&A(n,s)})}h(X,"setConfigObject");function we(){typeof re<"u"&&re.forEach(function(e){X(e)})}h(we,"setConfigObjects");function le(e,t){if(typeof Z>"u")return;let o=typeof Z=="string"?Z:"",s=$.env();Object.keys(s).forEach(function(n){if(o===""||n.lastIndexOf(o,0)===0){let a=n.split("__").map(function(c,f){return f===0&&(c=c.substring(o.length)),z(c)});(t&&r.configs[a.join(".")]||!t)&&!F(e,a)&&A(a.join("."),s[n])}})}h(le,"applyEnvVars");function $e(e){let t,o=new Set;Object.keys(e).forEach(function(s){if(!o.has(s)&&(t=d(s,r.coercions),typeof t=="function"))try{let n=T(s,t(e[s]));[].concat(r.aliases[s]||[],s).forEach(a=>{o.add(a),e[a]=n})}catch(n){_=n}})}h($e,"applyCoercions");function Re(e){return r.keys.forEach(t=>{~t.indexOf(".")||typeof e[t]>"u"&&(e[t]=void 0)}),e}h(Re,"setPlaceholderKeys");function ue(e,t,o,s=!1){Object.keys(o).forEach(function(n){F(e,n.split("."))||(L(e,n.split("."),o[n]),s&&(ce[n]=!0),(t[n]||[]).forEach(function(a){F(e,a.split("."))||L(e,a.split("."),o[n])}))})}h(ue,"applyDefaultsAndAliases");function F(e,t){let o=e;m["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach(function(n){o=o[n]||{}});let s=t[t.length-1];return typeof o!="object"?!1:s in o}h(F,"hasKey");function L(e,t,o){let s=e;m["dot-notation"]||(t=[t.join(".")]),t.slice(0,-1).forEach(function(E){E=ge(E),typeof s=="object"&&s[E]===void 0&&(s[E]={}),typeof s[E]!="object"||Array.isArray(s[E])?(Array.isArray(s[E])?s[E].push({}):s[E]=[s[E],{}],s=s[E][s[E].length-1]):s=s[E]});let n=ge(t[t.length-1]),a=d(t.join("."),r.arrays),c=Array.isArray(o),f=m["duplicate-arguments-array"];!f&&d(n,r.nargs)&&(f=!0,(!w(s[n])&&r.nargs[n]===1||Array.isArray(s[n])&&s[n].length===r.nargs[n])&&(s[n]=void 0)),o===k()?s[n]=k(s[n]):Array.isArray(s[n])?f&&a&&c?s[n]=m["flatten-duplicate-arrays"]?s[n].concat(o):(Array.isArray(s[n][0])?s[n]:[s[n]]).concat([o]):!f&&!!a==!!c?s[n]=o:s[n]=s[n].concat([o]):s[n]===void 0&&a?s[n]=c?o:[o]:f&&!(s[n]===void 0||d(n,r.counts)||d(n,r.bools))?s[n]=[s[n],o]:s[n]=o}h(L,"setKey");function ze(...e){e.forEach(function(t){Object.keys(t||{}).forEach(function(o){r.aliases[o]||(r.aliases[o]=[].concat(g[o]||[]),r.aliases[o].concat(o).forEach(function(s){if(/-/.test(s)&&m["camel-case-expansion"]){let n=z(s);n!==o&&r.aliases[o].indexOf(n)===-1&&(r.aliases[o].push(n),M[n]=!0)}}),r.aliases[o].concat(o).forEach(function(s){if(s.length>1&&/[A-Z]/.test(s)&&m["camel-case-expansion"]){let n=G(s,"-");n!==o&&r.aliases[o].indexOf(n)===-1&&(r.aliases[o].push(n),M[n]=!0)}}),r.aliases[o].forEach(function(s){r.aliases[s]=[o].concat(r.aliases[o].filter(function(n){return s!==n}))}))})})}h(ze,"extendAliases");function d(e,t){let o=[].concat(r.aliases[e]||[],e),s=Object.keys(t),n=o.find(a=>s.includes(a));return n?t[n]:!1}h(d,"checkAllAliases");function pe(e){let t=Object.keys(r);return[].concat(t.map(s=>r[s])).some(function(s){return Array.isArray(s)?s.includes(e):s[e]})}h(pe,"hasAnyFlag");function Be(e,...t){return[].concat(...t).some(function(s){let n=e.match(s);return n&&pe(n[1])})}h(Be,"hasFlagsMatching");function Ie(e){if(e.match(x)||!e.match(/^-[^-]+/))return!1;let t=!0,o,s=e.slice(1).split("");for(let n=0;n<s.length;n++){if(o=e.slice(n+2),!pe(s[n])){t=!1;break}if(s[n+1]&&s[n+1]==="="||o==="-"||/[A-Za-z]/.test(s[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(o)||s[n+1]&&s[n+1].match(/\W/))break}return t}h(Ie,"hasAllShortFlags");function V(e){return m["unknown-options-as-args"]&&Fe(e)}h(V,"isUnknownOptionAsArg");function Fe(e){return e=e.replace(/^-{3,}/,"--"),e.match(x)||Ie(e)?!1:!Be(e,/^-+([^=]+?)=[\s\S]*$/,J,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}h(Fe,"isUnknownOption");function B(e){return!d(e,r.bools)&&!d(e,r.counts)&&`${e}`in C?C[e]:Le(Pe(e))}h(B,"defaultValue");function Le(e){return{[N.BOOLEAN]:!0,[N.STRING]:"",[N.NUMBER]:void 0,[N.ARRAY]:[]}[e]}h(Le,"defaultForType");function Pe(e){let t=N.BOOLEAN;return d(e,r.strings)?t=N.STRING:d(e,r.numbers)?t=N.NUMBER:d(e,r.bools)?t=N.BOOLEAN:d(e,r.arrays)&&(t=N.ARRAY),t}h(Pe,"guessType");function w(e){return e===void 0}h(w,"isUndefined");function Me(){Object.keys(r.counts).find(e=>d(e,r.arrays)?(_=Error(R("Invalid configuration: %s, opts.count excludes opts.array.",e)),!0):d(e,r.nargs)?(_=Error(R("Invalid configuration: %s, opts.count excludes opts.narg.",e)),!0):!1)}return h(Me,"checkConfiguration"),{aliases:Object.assign({},r.aliases),argv:Object.assign(ae,j),configuration:m,defaulted:Object.assign({},ce),error:_,newAliases:Object.assign({},M)}}};h(Ge,"combineAliases");h(k,"increment");h(ge,"sanitizeKey");h(Ke,"stripQuotes")});var Ce={};Te(Ce,{default:()=>He,"module.exports":()=>I});var Ee,H,ye,se,ee,ne,te,Ae,Oe,Ye,je,Ne,I,He,_e=P(()=>{Ee=require("util"),H=require("path");v();be();ye=require("fs"),se=require("node:module");Ae=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):20,Oe=(ne=(ee=process==null?void 0:process.versions)===null||ee===void 0?void 0:ee.node)!==null&&ne!==void 0?ne:(te=process==null?void 0:process.version)===null||te===void 0?void 0:te.slice(1);if(Oe&&Number(Oe.match(/^([^.]+)/)[1])<Ae)throw Error(`yargs parser supports a minimum Node.js version of ${Ae}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);Ye=process?process.env:{},je=se.createRequire?(0,se.createRequire)(__filename):void 0,Ne=new Y({cwd:process.cwd,env:h(()=>Ye,"env"),format:Ee.format,normalize:H.normalize,resolve:H.resolve,require:h(i=>{if(typeof je<"u")return je(i);if(i.match(/\.json$/))return JSON.parse((0,ye.readFileSync)(i,"utf8"));throw Error("only .json config files are supported in ESM")},"require")}),I=h(function(p,O){return Ne.parse(p.slice(),O).argv},"Parser");I.detailed=function(i,p){return Ne.parse(i.slice(),p)};I.camelCase=z;I.decamelize=G;I.looksLikeNumber=K;He=I});module.exports=(_e(),De(Ce));
|
|
6
7
|
/*! Bundled license information:
|
|
7
8
|
|
|
8
9
|
yargs-parser/build/lib/string-utils.js:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Bundled from yoctocolors-cjs
|
|
3
4
|
* This is a zero-dependency bundle created by esbuild.
|
|
4
5
|
*/
|
|
5
|
-
var
|
|
6
|
+
"use strict";var y=Object.defineProperty;var c=(g,r)=>y(g,"name",{value:r,configurable:!0});var p=(g,r)=>()=>(r||g((r={exports:{}}).exports,r),r.exports);var d=p((x,b)=>{var C=require("node:tty"),f=C?.WriteStream?.prototype?.hasColors?.()??!1,t=c((g,r)=>{if(!f)return a=>a;let s=`\x1B[${g}m`,n=`\x1B[${r}m`;return a=>{let i=a+"",o=i.indexOf(n);if(o===-1)return s+i+n;let h=s,l=0,u=(r===22?n:"")+s;for(;o!==-1;)h+=i.slice(l,o)+u,l=o+n.length,o=i.indexOf(n,l);return h+=i.slice(l)+n,h}},"format"),e={};e.reset=t(0,0);e.bold=t(1,22);e.dim=t(2,22);e.italic=t(3,23);e.underline=t(4,24);e.overline=t(53,55);e.inverse=t(7,27);e.hidden=t(8,28);e.strikethrough=t(9,29);e.black=t(30,39);e.red=t(31,39);e.green=t(32,39);e.yellow=t(33,39);e.blue=t(34,39);e.magenta=t(35,39);e.cyan=t(36,39);e.white=t(37,39);e.gray=t(90,39);e.bgBlack=t(40,49);e.bgRed=t(41,49);e.bgGreen=t(42,49);e.bgYellow=t(43,49);e.bgBlue=t(44,49);e.bgMagenta=t(45,49);e.bgCyan=t(46,49);e.bgWhite=t(47,49);e.bgGray=t(100,49);e.redBright=t(91,39);e.greenBright=t(92,39);e.yellowBright=t(93,39);e.blueBright=t(94,39);e.magentaBright=t(95,39);e.cyanBright=t(96,39);e.whiteBright=t(97,39);e.bgRedBright=t(101,49);e.bgGreenBright=t(102,49);e.bgYellowBright=t(103,49);e.bgBlueBright=t(104,49);e.bgMagentaBright=t(105,49);e.bgCyanBright=t(106,49);e.bgWhiteBright=t(107,49);b.exports=e});var B=d();module.exports=B;module.exports.default=B;
|