@redocly/cli 0.0.0-snapshot.1791798660 → 0.0.0-snapshot.1791905305
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/THIRD_PARTY_NOTICES +2 -2
- package/lib/chunks/{SXBAAS4M.js → 27RF53UX.js} +1 -1
- package/lib/chunks/{PA5NTLHU.js → 2BK4VLO4.js} +1 -1
- package/lib/chunks/{MNH2K4WM.js → 2RFPYWLR.js} +1 -1
- package/lib/chunks/{6EGJEFXO.js → 3AN2JL5L.js} +1 -1
- package/lib/chunks/{3C6UUCEW.js → 3G6I2THA.js} +1 -1
- package/lib/chunks/3GG2SIJT.js +7 -0
- package/lib/chunks/{DS4SCWID.js → 4K56BI6R.js} +1 -1
- package/lib/chunks/{65VNXAVH.js → 52NJDJAR.js} +1 -1
- package/lib/chunks/{H6CHW7QD.js → 5AFWDMOQ.js} +1 -1
- package/lib/chunks/{I5CGSLGR.js → 5EHONRHV.js} +1 -1
- package/lib/chunks/{UT6R3WJ5.js → 5MBXADM5.js} +1 -1
- package/lib/chunks/{3DEJQSYG.js → 5PAHQ46O.js} +1 -1
- package/lib/chunks/{2XK7ML3U.js → 5X4BHEEC.js} +1 -1
- package/lib/chunks/{LRLGVYCG.js → 62DUJODV.js} +1 -1
- package/lib/chunks/{3FXYWWTJ.js → 65Z4HCGP.js} +1 -1
- package/lib/chunks/{Z7TTYRM6.js → 6IX7RIAQ.js} +1 -1
- package/lib/chunks/{BPGARLT6.js → 6NPSQO6M.js} +1 -1
- package/lib/chunks/{MM6FCQYH.js → 6U47BFPO.js} +1 -1
- package/lib/chunks/{KOR5TUJG.js → 75KF6KMH.js} +1 -1
- package/lib/chunks/{XC4CTAKH.js → ATI4PX7R.js} +1 -1
- package/lib/chunks/B3XVDFWU.js +11 -0
- package/lib/chunks/{FDMXHRDK.js → BGYGNTSQ.js} +1 -1
- package/lib/chunks/{HJ5DD7MU.js → C5G3PHMB.js} +1 -1
- package/lib/chunks/{OP7NIAI7.js → CE33XFWK.js} +1 -1
- package/lib/chunks/{WDYKA4ID.js → CJUDQD45.js} +1 -1
- package/lib/chunks/DPMI267Z.js +59 -0
- package/lib/chunks/DSHBQJYY.js +20 -0
- package/lib/chunks/{SLQPKXO2.js → EHHPFNRI.js} +1 -1
- package/lib/chunks/{6DO6IN4A.js → EVRLVLLG.js} +1 -1
- package/lib/chunks/{CSYGFJ7J.js → EWGN3O2F.js} +1 -1
- package/lib/chunks/{S6NFOZ34.js → FR5GGAOC.js} +1 -1
- package/lib/chunks/{6NB3FKVN.js → G5N5PSW7.js} +1 -1
- package/lib/chunks/{XJTGJYVS.js → GMDR5ZW4.js} +1 -1
- package/lib/chunks/{MIVAVRV6.js → I6CVSFQZ.js} +1 -1
- package/lib/chunks/{KRCCY64H.js → ICZFSIWN.js} +1 -1
- package/lib/chunks/{JM7UFSTY.js → IHCXPOS3.js} +1 -1
- package/lib/chunks/{HYE4U6V5.js → JCULCLTC.js} +1 -1
- package/lib/chunks/{TBZEEKTV.js → KO4GISAK.js} +1 -1
- package/lib/chunks/{PTNNX4IU.js → M7COG6HN.js} +1 -1
- package/lib/chunks/{P7RM5LE4.js → MASJ2JX2.js} +156 -58
- package/lib/chunks/{GWXT3QO6.js → MNLUMWPT.js} +2 -2
- package/lib/chunks/{US7X4XPD.js → NL4BJZLQ.js} +1 -1
- package/lib/chunks/{2OQM5ARW.js → NPLUTFQJ.js} +1 -1
- package/lib/chunks/{22EANOP2.js → NPUBXOHX.js} +105 -105
- package/lib/chunks/{XJE2OFDN.js → NR3R4HFM.js} +45 -18
- package/lib/chunks/{WLWBF55X.js → NZ5FSYRJ.js} +7 -7
- package/lib/chunks/{3JYY42DL.js → O4NYNM77.js} +1 -1
- package/lib/chunks/{LVGVWPDB.js → PXZCW4SP.js} +1 -1
- package/lib/chunks/{VKGWZVJS.js → QR4Q7PTJ.js} +3 -3
- package/lib/chunks/{37WWN4MA.js → RK5FX2O4.js} +1 -1
- package/lib/chunks/{5PG3ST2N.js → SH7VG2WW.js} +2 -2
- package/lib/chunks/{ENSYM7KY.js → STYDNPKP.js} +1 -1
- package/lib/chunks/T2PHWJRR.js +7 -0
- package/lib/chunks/{3MVW5AM6.js → TTDGK4JI.js} +1 -1
- package/lib/chunks/{RMDO6VMU.js → TZYJIOE5.js} +1 -1
- package/lib/chunks/{T5PHAXRK.js → UWLAMW3D.js} +1 -1
- package/lib/chunks/{SYWAPWW7.js → UX43XK5R.js} +1 -1
- package/lib/chunks/{2OVI7BIW.js → UYE3ZNKG.js} +1 -1
- package/lib/chunks/{SHZZKTDE.js → V6XQIM52.js} +1 -1
- package/lib/chunks/{HBENVUR4.js → VLUZTVYU.js} +1 -1
- package/lib/chunks/VS4CM3ST.js +20 -0
- package/lib/chunks/{TKLMYBPI.js → VWPTPKZ3.js} +1 -1
- package/lib/chunks/{4AM55DEH.js → X2PCIOQT.js} +1 -1
- package/lib/chunks/{244JPOF6.js → XD7FOFXV.js} +1 -1
- package/lib/chunks/{YDVWNFMS.js → XJITGOF2.js} +1 -1
- package/lib/chunks/{RPHIT72T.js → Y4UGVSZQ.js} +1 -1
- package/lib/chunks/{XCAIWCYC.js → YFXPPZFW.js} +381 -381
- package/lib/chunks/{ZCVUIIPU.js → YHGXW2UM.js} +1 -1
- package/lib/chunks/{IAWXLFH5.js → ZALM5QZR.js} +1 -1
- package/lib/chunks/{V47KAOFH.js → ZGIRLXCL.js} +1 -1
- package/lib/chunks/{XHWNKVDR.js → ZU3WYT3C.js} +1 -1
- package/lib/eject-assets/generators/cli/docs.ts +1 -1
- package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
- package/lib/eject-assets/generators/cli/index.ts +2 -2
- package/lib/eject-assets/generators/cli/render.ts +1 -1
- package/lib/eject-assets/generators/go/client.ts +1 -1
- package/lib/eject-assets/generators/go/descriptor.ts +2 -1
- package/lib/eject-assets/generators/go/index.ts +2 -2
- package/lib/eject-assets/generators/go/models.ts +1 -1
- package/lib/eject-assets/generators/go/naming.ts +1 -1
- package/lib/eject-assets/generators/go/operations.ts +1 -1
- package/lib/eject-assets/generators/go/pagination.ts +1 -1
- package/lib/eject-assets/generators/go/types.ts +1 -1
- package/lib/eject-assets/generators/mock/faker.ts +1 -1
- package/lib/eject-assets/generators/mock/index.ts +2 -2
- package/lib/eject-assets/generators/mock/render.ts +1 -1
- package/lib/eject-assets/generators/mock/sample.ts +1 -1
- package/lib/eject-assets/generators/mock/values.ts +1 -1
- package/lib/eject-assets/generators/php/client.ts +1 -1
- package/lib/eject-assets/generators/php/descriptor.ts +2 -1
- package/lib/eject-assets/generators/php/index.ts +2 -2
- package/lib/eject-assets/generators/php/models.ts +1 -1
- package/lib/eject-assets/generators/php/naming.ts +1 -1
- package/lib/eject-assets/generators/php/operations.ts +1 -1
- package/lib/eject-assets/generators/php/pagination.ts +1 -1
- package/lib/eject-assets/generators/php/types.ts +1 -1
- package/lib/eject-assets/generators/python/client.ts +1 -1
- package/lib/eject-assets/generators/python/descriptor.ts +2 -1
- package/lib/eject-assets/generators/python/index.ts +2 -2
- package/lib/eject-assets/generators/python/models.ts +1 -1
- package/lib/eject-assets/generators/python/naming.ts +1 -1
- package/lib/eject-assets/generators/python/operations.ts +1 -1
- package/lib/eject-assets/generators/python/pagination.ts +1 -1
- package/lib/eject-assets/generators/python/types.ts +1 -1
- package/lib/eject-assets/generators/swr/index.ts +2 -2
- package/lib/eject-assets/generators/swr/render.ts +1 -1
- package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
- package/lib/eject-assets/generators/tanstack-query/render.ts +56 -9
- package/lib/eject-assets/generators/transformers/index.ts +2 -2
- package/lib/eject-assets/generators/transformers/render.ts +1 -1
- package/lib/eject-assets/generators/typescript/banner.ts +1 -1
- package/lib/eject-assets/generators/typescript/client.ts +1 -1
- package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
- package/lib/eject-assets/generators/typescript/index.ts +2 -2
- package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
- package/lib/eject-assets/generators/typescript/operations.ts +1 -1
- package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
- package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
- package/lib/eject-assets/generators/typescript/types.ts +1 -1
- package/lib/eject-assets/generators/zod/index.ts +2 -2
- package/lib/eject-assets/generators/zod/schemas.ts +1 -1
- package/lib/eject-assets/skills/tanstack-query-generator/SKILL.md +5 -2
- package/lib/eject-assets/skills/typescript-generator/SKILL.md +5 -0
- package/lib/index.js +5 -5
- package/package.json +1 -1
- package/lib/chunks/2KDQDHHX.js +0 -11
- package/lib/chunks/3AJ7S63W.js +0 -20
- package/lib/chunks/BEIMEONG.js +0 -42
- package/lib/chunks/KEQMCLRU.js +0 -20
- package/lib/chunks/LSS2SW4D.js +0 -7
- package/lib/chunks/RJYQDEUH.js +0 -7
package/THIRD_PARTY_NOTICES
CHANGED
|
@@ -663,8 +663,8 @@ Packages:
|
|
|
663
663
|
@redocly/ajv@8.11.2 — Copyright (c) 2015-2021 Evgeny Poberezkin
|
|
664
664
|
@redocly/ajv@8.18.3 — Copyright (c) 2015-2021 Evgeny Poberezkin
|
|
665
665
|
@redocly/cli-otel@0.3.7 — Copyright 2025 Redocly Inc, all rights reserved.
|
|
666
|
+
@redocly/config@0.0.0-feat-config-is-file-path.1ef532d5f77 — Copyright 2024 Redocly Inc.
|
|
666
667
|
@redocly/config@0.22.0 — Copyright 2024 Redocly Inc.
|
|
667
|
-
@redocly/config@0.65.0 — Copyright 2024 Redocly Inc.
|
|
668
668
|
@redocly/openapi-core@1.34.20
|
|
669
669
|
agent-base@7.1.4 — Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
|
670
670
|
ajv-formats@3.0.1 — Copyright (c) 2020 Evgeny Poberezkin
|
|
@@ -697,7 +697,7 @@ Packages:
|
|
|
697
697
|
foreach@2.0.6 — Copyright (c) 2013 Manuel Stofer
|
|
698
698
|
get-east-asian-width@1.7.0
|
|
699
699
|
graphql@16.14.2 — Copyright (c) GraphQL Contributors
|
|
700
|
-
handlebars@4.7.
|
|
700
|
+
handlebars@4.7.10 — Copyright (C) 2011-2019 by Yehuda Katz
|
|
701
701
|
has-flag@4.0.0
|
|
702
702
|
https-proxy-agent@7.0.6 — Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
|
703
703
|
is-buffer@2.0.5 — Copyright (c) Feross Aboukhadijeh
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{b as D}from"./
|
|
7
|
+
import{b as D}from"./G5N5PSW7.js";import{V as C,W as j,ia as $,ka as k,la as M,ma as S,oa as b,q as F,u as R,w as x}from"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{relative as I,resolve as U}from"node:path";var A=20;async function B({argv:o,config:t,collectSpecData:r}){let[{path:s}]=await D([o.api],t),n=new C(t.resolve),e=await n.resolveDocument(null,s,!0);r?.(e);let i=k(e.parsed),d=F(t.extendTypes(x(i),i),t),p=new Map,u=({source:l,pointer:c},f,N)=>{let v=`${l.absoluteRef}${c}`,y=p.get(v);if(!y){p.set(v,{absoluteRef:l.absoluteRef,pointer:c,types:[f],resolvesTo:N});return}y.types.includes(f)||y.types.push(f),y.resolvesTo||(y.resolvesTo=N)},m={any:{enter(l,{location:c,type:f}){u(c,f.name)}},ref(l,{location:c,type:f},N){u(c,f.name,N.location)}},h={problems:[],specVersion:i,config:t,visitorsData:{}},a=await j({rootDocument:e,rootType:d.Root,externalRefResolver:n});if(S({document:e,rootType:d.Root,normalizedVisitors:M([{severity:"warn",ruleId:"inspect-node-types",visitor:m}],d),resolvedRefMap:a,ctx:h}),o.pointer){let l=W(p,o.pointer,e.source.absoluteRef);o.parents?L(w(p,l,e.source.absoluteRef)):$.output(`${l.types.join(`
|
|
8
8
|
`)}
|
|
9
9
|
`);return}let g=[...p.values()];if(o.summary)V(g);else if(o.type){let l=o.type,c=g.filter(({types:f})=>f.includes(l));if(c.length===0)throw new b(`No nodes of type '${l}'. Run the command with --summary to see the types used in this description.`);o.parents?L(c.flatMap(f=>w(p,f,e.source.absoluteRef)),l):E(c)}else E(g)}function w(o,t,r,s=new Set){let n=`${t.absoluteRef}${t.pointer}`;if(s.has(n))return[[t]];s.add(n);let e=[],i=t.pointer.split("/");for(let p=1;p<i.length;p++){let u=p===1?"#/":i.slice(0,p).join("/");if(u===t.pointer)continue;let m=o.get(`${t.absoluteRef}${u}`);m&&e.push(m)}e.push(t);let d=[];e[0].absoluteRef===r&&e[0].pointer==="#/"&&d.push(e);for(let[p,u]of e.entries()){let m=[...o.values()].filter(a=>a.resolvesTo?.source.absoluteRef===u.absoluteRef&&a.resolvesTo.pointer===u.pointer),h=e.slice(p+1);for(let a of m)d.push(...w(o,a,r,s).map(g=>[...g,...h]))}return d.length?d:[e]}function L(o,t){let r=new Set(o.map(s=>s.map(({types:n})=>t&&n.includes(t)?t:n.join(", ")).join(" \u2192 ")));for(let s of r)$.output(`${s}
|
|
10
10
|
`)}function W(o,t,r){let[s,n]=t.split("#"),e=s?R(s)?s:U(process.cwd(),s):r,i=o.get(`${e}#${n||"/"}`);if(!i)throw new b(`No node at ${t}. ${z(o,e,`#${n||"/"}`,s)??`Check the pointer, and make sure the file is referenced from ${T(r)}.`}`);return i}function z(o,t,r,s){let n=r.split("/");for(let e=n.length-1;e>=1;e--){let i=e===1?"#/":n.slice(0,e).join("/"),d=o.get(`${t}${i}`);if(!d)continue;let p=n[e].toLowerCase(),u=e===1?"#/":`${i}/`,m=[...o.values()].filter(c=>c.absoluteRef===t&&c.pointer.startsWith(u)&&!c.pointer.slice(u.length).includes("/")),h=m.filter(c=>c.pointer.slice(u.length).toLowerCase().includes(p)),a=(h.length?h:m).map(c=>` ${s}${c.pointer}`),g=a.length-A;g>0&&(a.length=A,a.push(` \u2026and ${g} more`));let l=`The closest node is ${d.types.join(", ")} at ${s}${i}.`;return a.length?`${l} Did you mean:
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as ee,b as te,f as ne,g as E,h as re}from"./
|
|
7
|
+
import{a as ee,b as te,f as ne,g as E,h as re}from"./MASJ2JX2.js";import{a as y}from"./WZXA5XPB.js";import{Aa as Z,P as W,V,c as x,ia as b,ka as Q,r as v,ra as Y,s as H,ta as T,u as J}from"./NPUBXOHX.js";import{b as A,c as G,k as D}from"./LD5MEXEL.js";import{mkdir as ct,readFile as ut,writeFile as dt}from"node:fs/promises";import{dirname as ke,parse as ft,resolve as R,sep as pt}from"node:path";function M(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./TTDGK4JI.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var U={outputMode:"it always emits one self-contained file",runtime:"the runtime is always embedded in the generated file",argsStyle:"inputs follow the target language's own idiom",importExt:"the generated file has no relative imports"},I={typescript:{load:()=>import("./I6CVSFQZ.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./UWLAMW3D.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":M("react"),"tanstack-query-vue":M("vue"),"tanstack-query-svelte":M("svelte"),"tanstack-query-solid":M("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./XD7FOFXV.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./ZU3WYT3C.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./ZALM5QZR.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./ATI4PX7R.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./6IX7RIAQ.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./TZYJIOE5.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function oe(e,t,n,r){let s=new Set(e);t.goPackage!==void 0&&!s.has("go")&&b.warn(`generate-client: goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).
|
|
8
8
|
`);let o=t.errorMode??"throw",i=t.dateType??"string";for(let a of e){let c=n.get(a);if(!c)throw new y(`Unknown generator: ${a}`);for(let d of c.requires??[])if(!s.has(d)){let f=[...new Set([d,...e])].map(m=>`--generator ${m}`).join(" ");throw new y(`The "${a}" generator requires the "${d}" generator. Add it, e.g. ${f}.`)}if(c.errorModes&&!c.errorModes.includes(o))throw new y(`The "${a}" generator does not support --error-mode "${o}" (supported: ${c.errorModes.join(", ")}).`);if(c.dateTypes&&!c.dateTypes.includes(i))throw new y(`The "${a}" generator requires --date-type ${c.dateTypes.join(" or ")} (got "${i}") so the runtime values match the generated types.`);let u={...t,outputMode:r};for(let[d,f]of Object.entries(c.notApplicable??{}))u[d]!==void 0&&b.warn(`generate-client: the "${a}" generator ignores ${d} \u2014 ${f}.
|
|
9
9
|
`)}}function se(e,t,n){let r=new Map;for(let s of e){let o=t.get(s)?.options,i=n?.[s];if(o===void 0){i!==void 0&&b.warn(`generate-client: the "${s}" generator declares no options, so client.options.${s} is ignored.
|
|
10
10
|
`),r.set(s,{});continue}r.set(s,ve(s,o,i))}return r}function ve(e,t,n){if(n!==void 0&&!x(n))throw new y(`The "${e}" generator's options must be a map of option names to values.`);let r=n??{},s=Object.keys(t.properties);if(t.additionalProperties!==!0){for(let i of Object.keys(r))if(!s.includes(i))throw new y(`The "${e}" generator got an unknown option "${i}". Declared options: ${s.join(", ")||"(none)"}.`)}for(let i of t.required??[])if(r[i]===void 0)throw new y(`The "${e}" generator requires the "${i}" option.`);let o={...r};for(let[i,a]of Object.entries(t.properties)){if(o[i]===void 0){a.default!==void 0&&(o[i]=a.default);continue}let c=Se(a,o[i]);if(c!==void 0)throw new y(`The "${e}" generator's "${i}" ${c}.`)}return o}function Se(e,t){if("enum"in e)return e.enum.includes(t)?void 0:`must be one of: ${e.enum.join(", ")}`;if(e.type==="array"){let n=e.items.type;return Array.isArray(t)&&t.every(r=>typeof r===n)?void 0:`must be an array of ${n}`}return typeof t===e.type?void 0:`must be a ${e.type}`}import{isAbsolute as xe,resolve as qe}from"node:path";import{pathToFileURL as Pe}from"node:url";var Oe=function(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,s,o,i){return r?t?".jsx":".js":s&&(!o||!i)?n:s+o+"."+i.toLowerCase()+"js"}):e};async function ae(e,t={}){let n=new Map;for(let a of t.customGenerators??[])ce(n,a);let r=[];for(let a of e)r.push(await ie(a,n,t.configDir));let s=[],o=new Set,i=async a=>{if(!(s.includes(a)||o.has(a))){o.add(a);for(let c of n.get(a).requires??[])(n.has(c)||c in I)&&await i(await ie(c,n,t.configDir));o.delete(a),s.push(a)}};for(let a of r)await i(a);return{selected:s,registry:n}}async function ie(e,t,n){if(t.has(e))return e;let r=I[e];if(r!==void 0){let{load:o,...i}=r;return t.set(e,{...i,...await o()}),e}if(e==="sdk")throw new y('The "sdk" generator is now named "typescript". Update the `generators` list or the --generator flag.');let s=await je(e,n??process.cwd());return ce(t,s),s.name}function ce(e,t){if(!x(t)||typeof t.name!="string"||t.name===""||typeof t.run!="function")throw new y("Invalid custom generator: expected an object with a non-empty string `name` and a `run` function (build one with `defineGenerator`).");if(e.has(t.name))throw new y(`Generator name "${t.name}" collides with an existing generator. Rename the custom generator.`);if(t.requiresGenerator!==void 0){let n=re(E,t.requiresGenerator);if(n===void 0)throw new y(`Generator "${t.name}" declares requiresGenerator "${t.requiresGenerator}", which is not a range we read. Use ^1.2.0, ~1.2.0, >=1.2.0, or an exact version.`);if(!n)throw new y(`Generator "${t.name}" needs @redocly/client-generator ${t.requiresGenerator}; this CLI ships ${E}. Upgrade @redocly/cli if the generator is newer, or update the generator \u2014 \`redocly eject-generator <name> --update\` for an ejected file, or upgrade its package.`)}t.name in I&&b.warn(`generate-client: custom generator "${t.name}" takes over the built-in generator of the same name.
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a,b,c,d,e,f,g}from"./
|
|
7
|
+
import{a,b,c,d,e,f,g}from"./BGYGNTSQ.js";import"./UF2ZCH7W.js";import"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{d as RESET_ESCAPE_CODE,c as calculateTotals,f as conditionallyMaskSecrets,b as generate,e as maskSecrets,a as parseRuntimeExpression,g as run};
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a,b}from"./
|
|
7
|
+
import{a,b}from"./VLUZTVYU.js";import"./G5N5PSW7.js";import"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as bundleTelemetry,b as handleBundle};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as $,g as xt,h as et}from"./
|
|
7
|
+
import{a as $,g as xt,h as et}from"./EHHPFNRI.js";import{a as wt}from"./64G5RPLP.js";import{b as lt,f as ut,m as gt,n as ht,s as yt}from"./G5N5PSW7.js";import{$ as D,V as Z,aa as G,b as N,ba as k,c as M,ca as v,d as it,g as at,i as U,ia as T,ka as tt,oa as w,qa as ft,r as E,va as ct,w as pt,wa as mt}from"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import*as Nt from"node:path";import{performance as jt}from"node:perf_hooks";import*as Ot from"node:path";function dt(t,e){xt(t,o=>{if(E(o)&&et(o.$ref)){let r=Ot.basename(o.$ref);o.$ref=o.$ref.replace(r,e+"_"+r)}else if(M(o.discriminator)&&M(o.discriminator.mapping)){let{mapping:r}=o.discriminator;for(let i of Object.keys(r)){let c=r[i];typeof c=="string"&&et(c)&&(r[i]=c.split("/").map((O,s,p)=>p.length-1===s&&!O.startsWith(e+"_")?e+"_"+O:O).join("/"))}}})}function j(t,e,o){if(!e)return"";if(!t)throw new w("Info section is not found in specification.");if(!t[e])throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value is not found in info section.`);if(!at(t[e]))throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value should be string.`);if(t[e].length>50)throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value length should not exceed 50 characters.`);return t[e].replaceAll(/\s/g,"_")}function ot(t,e){return e?t?.map(o=>{let r={};for(let[i,c]of Object.entries(o))Object.assign(r,{[e+"_"+i]:c});return r}):t}function C(t,e){return e?e+"_"+t:t}import*as Pt from"node:path";function H(t,e){return t.replace(/"(#\/components\/.*?)"/g,o=>{let r=Pt.basename(o);return o.replace(r,C(r,e))})}function B(t){return t.map(e=>({name:e}))}import*as q from"node:path";function bt(t){return q.basename(t,q.extname(t))}function vt(t){return Object.entries(t).filter(([e,o])=>o.length>1)}function rt(t,e){for(let[o,r]of e)T.warn(`Conflict on ${t} : ${D(o)} in files: ${v(r)}
|
|
8
8
|
`)}function Tt(t){T.info(G(`
|
|
9
9
|
${t} conflict(s) on tags.
|
|
10
10
|
Suggestion: please use ${v("prefix-tags-with-filename")}, ${v("prefix-tags-with-info-prop")} or ${v("without-x-tag-groups")} to prevent naming conflicts.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
var __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as l}from"./ZGIRLXCL.js";import{a as R,b as u,c as f,d}from"./52NJDJAR.js";import{d as y,e as G,f as x}from"./VS4CM3ST.js";import{c as g,d as S,e as h}from"./NZ5FSYRJ.js";import{c as k,d as v,e as b}from"./DSHBQJYY.js";import{a as D,b as E,c as q,d as z}from"./2BK4VLO4.js";import{a as o}from"./DPMI267Z.js";import{a,b as p,c as s}from"./5MBXADM5.js";import"./NR3R4HFM.js";import{a as m}from"./IHCXPOS3.js";import{a as i}from"./JM7BMZLD.js";import{a as c}from"./5AFWDMOQ.js";import"./C5G3PHMB.js";import{a as I,d as M,e as N}from"./EWGN3O2F.js";import{a as rr,b as er,c as tr,d as or,e as nr,f as ar,g as pr,h as sr,i as mr,j as ir,k as cr}from"./B3XVDFWU.js";import"./MASJ2JX2.js";import{a as U}from"./WZXA5XPB.js";import"./NPUBXOHX.js";import"./NEWT5A6S.js";import{e as T,h as j,k as w}from"./LD5MEXEL.js";import{a as _,b as B,c as F,d as J,e as Q,f as H,g as K,h as P,i as V,j as W,k as X,l as Y,m as Z,n as $}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";var A={typescript:{run:a,sample:s,docs:p},zod:{run:m},transformers:{run:i},"tanstack-query":{run:o("react")},"tanstack-query-vue":{run:o("vue")},"tanstack-query-svelte":{run:o("svelte")},"tanstack-query-solid":{run:o("solid")},swr:{run:c},mock:{run:l},cli:{run:u,sample:d,docs:f},python:{run:y,sample:G,docs:x},go:{run:g,sample:S,docs:h},php:{run:k,sample:v,docs:b}},L=Object.fromEntries(Object.entries(D).map(([e,{load:r,...t}])=>[e,{...t,...A[e]}]));function n(){return new Map(Object.entries(L))}function C(e,r,t=n(),O){E(e,r,t,O)}function Er(e,r){let t=r.registry??n();return C(r.generators,r.emit,t,r.outputMode),q(e,{...r,registry:t})}export{cr as AUTHORING_HELPER_NAMES,U as NotSupportedError,_ as Printer,F as RESERVED_WORDS,B as casing,j as codeLiteral,Er as collectGeneratedFiles,H as deref,P as discriminatorCases,Y as docText,X as enumValues,K as flattenAllOf,z as generateClient,$ as headerCoerceType,J as identifierFor,ar as isBinaryContentType,or as isMultipartBody,V as isNullable,nr as isUntypedMultipartBody,er as jsonSuccessSchema,I as operationSignature,mr as paginationItemSchema,rr as paginationRuleFor,w as pascalCase,R as renderComposedCliEntry,ir as renderReferencePage,T as safeIdent,Z as schemaAtPointer,sr as securityRequirements,pr as serverUrlParts,tr as sseResponse,M as tsJsdoc,N as tsType,Q as uniqueIdentifiers,W as unwrapNullable};
|
|
@@ -4,6 +4,6 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as K}from"./GKXY6U4S.js";import{Aa as V,j as z,l as I,o as H,oa as m,p as q,ta as Y}from"./22EANOP2.js";import{e as b}from"./RFWIIJFG.js";var Q=b(K(),1);var T=b(K(),1);function G(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function X(n){let t=process.env.NO_PROXY||process.env.no_proxy;if(!t)return!1;let e=t.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(e.length===0)return!1;let r;try{r=new URL(n).hostname.toLowerCase()}catch{return!1}return e.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var Z=async(n,{timeout:t,...e}={})=>{let r=G(),s=r&&!X(n),o;s?o=new T.ProxyAgent({uri:r}):t&&(o=new T.Agent({connect:{timeout:t}}));try{return await(0,T.fetch)(n,{signal:t?AbortSignal.timeout(t):void 0,...e,dispatcher:o})}catch(i){throw await o?.destroy(),i}};var de=/^[\x21-\x7e]+( [\x21-\x7e]+)*$/;function J(){let n=process.env.REDOCLY_ENVIRONMENT?.trim();return n&&de.test(n)?n:void 0}var u=class extends Error{status;constructor(t,e){super(t),this.status=e}},x=class{command;version;sunsetWarnings=[];constructor(t,e="2.0"){this.command=t,this.version=e}async request(t,e){let r=J(),s={...e.headers,"user-agent":`redocly-cli/${this.version} ${this.command}${r?` ${r}`:""}`};try{let o=await Z(t,{...e,headers:s});return this.collectSunsetWarning(o),o}catch(o){let i=o.cause??o,a=`Failed to fetch. Caused by ${i.message||i.name}.`;throw typeof i.code=="string"&&(a+=` Code: ${i.code}`),new Error(a)}}collectSunsetWarning(t){let e=this.getSunsetDate(t);if(!e)return;let r=new Date(e);e>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(t){let{headers:e}=t;if(!e)return;let r=e.get("sunset")||e.get("Sunset");if(r)return Date.parse(r)}},U=class{client;domain;apiKey;constructor(t,e,r){this.client=t,this.domain=e,this.apiKey=r}async getParsedResponse(t){let e=await t.json();if(t.ok)return e;throw new u(`${e.title||t.statusText||"Unknown error"}.`,t.status)}},N=class extends U{async find(t,e){try{let r=await this.client.request(`${this.domain}/api/orgs/${encodeURIComponent(t)}/projects/${encodeURIComponent(e)}`,{timeout:6e3,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return r.status===404?void 0:await this.getParsedResponse(r)}catch(r){let s=`Failed to fetch project. ${r.message}`;throw r instanceof u?new u(s,r.status):new Error(s)}}},j=class extends U{async getDefaultBranch(t,e){try{let r=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/source`,{timeout:6e3,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return(await this.getParsedResponse(r)).branchName}catch(r){let s=`Failed to fetch default branch. ${r.message}`;throw r instanceof u?new u(s,r.status):new Error(s)}}async upsert(t,e,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/remotes`,{timeout:6e3,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({mountPath:r.mountPath,mountBranchName:r.mountBranchName,type:"CICD",autoMerge:!0})});return await this.getParsedResponse(s)}catch(s){let o=`Failed to upsert remote. ${s.message}`;throw s instanceof u?new u(o,s.status):new Error(o)}}async push(t,e,r,s){let o=new Q.FormData;o.append("remoteId",r.remoteId),o.append("commit[message]",r.commit.message),o.append("commit[author][name]",r.commit.author.name),o.append("commit[author][email]",r.commit.author.email),o.append("commit[branchName]",r.commit.branchName),r.commit.url&&o.append("commit[url]",r.commit.url),r.commit.namespace&&o.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&o.append("commit[sha]",r.commit.sha),r.commit.repository&&o.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&o.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let a=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await he(i.stream)]);o.append(`files[${i.path}]`,a,i.path)}r.isMainBranch&&o.append("isMainBranch","true"),r.replace&&o.append("replace","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:o});return await this.getParsedResponse(i)}catch(i){let a=`Failed to push. ${i.message}`;throw i instanceof u?new u(a,i.status):new Error(a)}}async getPush({organizationId:t,projectId:e,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/pushes/${r}`,{timeout:6e3,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let o=`Failed to get push status. ${s.message}`;throw s instanceof u?new u(o,s.status):new Error(o)}}},g=class{apiClient;projects;remotes;constructor({domain:t,apiKey:e,command:r,version:s}){this.apiClient=new x(r,s),this.projects=new N(this.apiClient,t,e),this.remotes=new j(this.apiClient,t,e)}getSunsetWarning(){return ee(this.apiClient.sunsetWarnings)}};function ee(n){let[t]=[...n].sort((e,r)=>e.isSunsetExpired!==r.isSunsetExpired?e.isSunsetExpired?-1:1:e.sunsetDate>r.sunsetDate?1:-1);return t}async function he(n){let t=[];for await(let e of n)t.push(e);return Buffer.concat(t)}function fe(){if(process.env.REDOCLY_AUTHORIZATION)return process.env.REDOCLY_AUTHORIZATION;throw new Error("No api key provided, please use environment variable REDOCLY_AUTHORIZATION.")}var pe=/^http:\/\/(localhost|127\.0\.0\.1)(:\d+)?$/,R={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function me(){return process.env.REDOCLY_DOMAIN||R.us}var te=ge((n,t)=>{try{let e=t||n?.resolvedConfig.residency;return we(e)?R[e]:e?new URL(e).origin:n?.resolvedConfig.scorecard?.fromProjectUrl?new URL(n.resolvedConfig.scorecard.fromProjectUrl).origin:R.us}catch{throw new E}});function D(n){try{te(void 0,n)}catch{return!1}return!0}function ge(n){return(...t)=>{let e=n(...t);if(!e.startsWith("https://")&&!pe.test(e))throw new E;return e}}var E=class extends Error{constructor(){super("Invalid Reunite URL")}};function we(n){return typeof n=="string"&&n in R}import{Buffer as O}from"node:buffer";import F from"node:crypto";import{mkdirSync as ye,existsSync as ne,writeFileSync as ve,readFileSync as Te,rmSync as xe}from"node:fs";import{homedir as Ce}from"node:os";import se from"node:path";import*as re from"node:child_process";var w=class{baseUrl;apiClient;clientName="redocly-cli";constructor(t,e){this.baseUrl=t,this.apiClient=new x("login",e)}async run(t){let e=await this.getDeviceCode();t?.({verificationUri:e.verificationUri,verificationUriComplete:e.verificationUriComplete,userCode:e.userCode}),this.openBrowser(e.verificationUriComplete);let r=await this.pollingAccessToken(e.deviceCode,e.interval,e.expiresIn);return this.withResidency(r)}openBrowser(t){if(!/^https?:\/\//.test(t))return;let[e,r]=process.platform==="win32"?["rundll32",["url.dll,FileProtocolHandler",t]]:process.platform==="darwin"?["open",[t]]:["xdg-open",[t]];re.spawn(e,r,{stdio:"ignore",detached:!0}).on("error",()=>{}).unref()}async verifyToken(t){try{return!!(await this.sendRequest("/session","GET",void 0,{Cookie:`accessToken=${t};`})).user}catch{return!1}}async verifyApiKey(t){try{return!!(await this.sendRequest("/api-keys-verify","POST",{apiKey:t})).success}catch{return!1}}async refreshToken(t){let e=await this.sendRequest("/device-rotate-token","POST",{grant_type:"refresh_token",client_name:this.clientName,refresh_token:t});if(!e.access_token)throw new Error("Failed to refresh token");return this.withResidency({access_token:e.access_token,refresh_token:e.refresh_token,expires_in:e.expires_in})}async pollingAccessToken(t,e,r){return new Promise((s,o)=>{let i=setInterval(async()=>{let c=await this.getAccessToken(t);c.access_token&&(clearInterval(i),clearTimeout(a),s(c)),c.error&&c.error!=="authorization_pending"&&(clearInterval(i),clearTimeout(a),o(c.error_description))},e*1e3),a=setTimeout(async()=>{clearInterval(i),clearTimeout(a),o("Authorization has expired. Please try again.")},r*1e3)})}async getAccessToken(t){return await this.sendRequest("/device-token","POST",{client_name:this.clientName,device_code:t,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})}async getDeviceCode(){let{device_code:t,user_code:e,verification_uri:r,verification_uri_complete:s,interval:o=10,expires_in:i=300}=await this.sendRequest("/device-authorize","POST",{client_name:this.clientName});return{deviceCode:t,userCode:e,verificationUri:r,verificationUriComplete:s,interval:o,expiresIn:i}}async sendRequest(t,e="GET",r=void 0,s={}){let o=`${this.baseUrl}/api${t}`,i=await this.apiClient.request(o,{body:r&&JSON.stringify(r),method:e,headers:{"Content-Type":"application/json",...s},timeout:6e3});return i.status===204?{success:!0}:await i.json()}withResidency(t){return{...t,residency:this.baseUrl}}};var Pe="4618dbc9-8aed-4e27-aaf0-225f4603e5a4",oe="aes-256-cbc",k=class{version;credentialsFolderPath;credentialsFilePath;credentialsFileName;key;iv;constructor(t){this.version=t;let e=Ce();this.credentialsFolderPath=se.join(e,".redocly"),this.credentialsFileName="credentials",this.credentialsFilePath=se.join(this.credentialsFolderPath,this.credentialsFileName),this.key=F.createHash("sha256").update(`${this.credentialsFolderPath}${Pe}`).digest(),this.iv=F.createHash("md5").update(this.credentialsFolderPath).digest(),ye(this.credentialsFolderPath,{recursive:!0})}async login(t,e){let s=await new w(t,this.version).run(e);if(!s)throw new Error("Failed to login. No credentials received.");await this.saveCredentials(s)}async logout(){try{this.removeCredentials()}catch{}}async isAuthorized(t,e){return e?new w(t,this.version).verifyApiKey(e):!!await this.getAccessToken(t)}getAccessToken=async t=>{let e=new w(t,this.version),r=await this.readCredentials();if(!r||!D(t)||r.residency&&r.residency!==t)return null;if(await e.verifyToken(r.access_token))return r.access_token;try{let o=await e.refreshToken(r.refresh_token);return await this.saveCredentials(o),o.access_token}catch{return null}};async saveCredentials(t){try{let e=this.encryptCredentials(t);ve(this.credentialsFilePath,e,"utf8")}catch(e){throw new Error(`Failed to save credentials: ${e.message}`)}}async readCredentials(){if(!ne(this.credentialsFilePath))return null;try{let t=Te(this.credentialsFilePath,"utf8");return this.decryptCredentials(t)}catch{return null}}async removeCredentials(){ne(this.credentialsFilePath)&&xe(this.credentialsFilePath)}encryptCredentials(t){let e=F.createCipheriv(oe,this.key,this.iv);return O.concat([e.update(JSON.stringify(t),"utf8"),e.final()]).toString("hex")}decryptCredentials(t){let e=F.createDecipheriv(oe,this.key,this.iv),r=O.concat([e.update(O.from(t,"hex")),e.final()]);return JSON.parse(r.toString("utf8"))}};import*as y from"node:fs";import*as h from"node:path";var Re=/\/orgs\/([^/]+)\/projects\//,Ee=[401,403];async function C(n,{organization:t,project:e,onSlugDeprecated:r}){let s=await $e(n,t,e);if(!s)return{organizationId:t,projectId:e};let o={organizationId:_e(s.uri),projectId:s.id};return(o.organizationId!==t||o.projectId!==e)&&r?.(o),o}async function $e(n,t,e){try{let r=await n.projects.find(t,e);if(!r)throw new u(`Project "${e}" was not found in organization "${t}". Use the IDs from the organization and project settings in Reunite.`,404);return r}catch(r){if(r instanceof u&&Ee.includes(r.status))return;throw r}}function _e(n){let t=n.match(Re)?.[1];if(!t)throw new Error(`Could not read the organization ID from the project URI "${n}".`);return t}async function Se({domain:n,apiKey:t,organization:e,project:r,mountPath:s,files:o,defaultBranch:i,commit:a,version:c,replace:$,onUploadStart:_,onSunsetWarning:v,onSlugDeprecated:A}){let f=new g({domain:n,apiKey:t,command:"push",version:c});try{let{organizationId:d,projectId:l}=await C(f,{organization:e,project:r,onSlugDeprecated:A}),M=await f.remotes.getDefaultBranch(d,l),p=await f.remotes.upsert(d,l,{mountBranchName:M,mountPath:s});_?.(p);let{id:P}=await f.remotes.push(d,l,{remoteId:p.id,commit:a,isMainBranch:i===a.branchName,replace:$},o.map(W=>({path:H(W.name),stream:y.createReadStream(W.path)})));return{pushId:P,organizationId:d,projectId:l}}finally{let d=f.getSunsetWarning();d&&v?.(d)}}function Ue(n,t){let e={};for(let s of n)if(y.statSync(s).isDirectory()){let o=s;ie(o,[]).forEach(a=>r(a,o))}else r(s,h.dirname(s));function r(s,o){let i=h.relative(o,s);e[i]&&t?.(e[i],s),e[i]=s}return Object.entries(e).map(([s,o])=>({name:s,path:h.resolve(o)}))}function ie(n,t){let e=y.readdirSync(n);for(let r of e){let s=h.join(n,r);y.statSync(s).isDirectory()?t=ie(s,t):t.push(s)}return t}async function ae({operation:n,condition:t,onConditionNotMet:e,startTime:r=Date.now(),retryTimeoutMs:s=6e5,retryIntervalMs:o=5e3}){async function i(){let a=await n();if(t(a))return a;if(Date.now()-r>s)throw new Error("Timeout exceeded.");return await e?.(a),await z(o),i()}return i()}var Fe=1200,Ae=5e3,Ie=["pending","running"];async function Ne(n){let t=ce(n);try{let e=await C(t,n);return await le(t,e,n.pushId)}finally{ue(t,n)}}async function je({buildType:n,maxExecutionTime:t=Fe,retryIntervalMs:e=Ae,startTime:r=Date.now(),onRetry:s,...o}){let i=ce(o);try{let a=await C(i,o);return await ae({operation:()=>le(i,a,o.pushId),condition:c=>!Ie.includes(c.status[n].deploy.status),onConditionNotMet:s,startTime:r,retryTimeoutMs:t*1e3,retryIntervalMs:e})}finally{ue(i,o)}}function ce({domain:n,apiKey:t,version:e}){return new g({domain:n,apiKey:t,command:"push-status",version:e})}function ue(n,{onSunsetWarning:t}){let e=n.getSunsetWarning();e&&t?.(e)}function le(n,{organizationId:t,projectId:e},r){return n.remotes.getPush({organizationId:t,projectId:e,pushId:r})}async function De({projectUrl:n,auth:t,isApiKey:e=!1,onDebug:r}){let s=Oe(n);if(!s)throw new m(`Invalid project URL format: ${n}`);try{let o=await ke({...s,auth:t,isApiKey:e,onDebug:r}),i=o.config.scorecardClassic||o.config.scorecard;if(!i)throw new Error("No scorecard configuration found.");let a=o.config.pluginsUrl,c=a?await Le(a,r):void 0;return{scorecard:i,plugins:c,pluginsUrl:a}}catch(o){throw new m(o instanceof Error?o.message:String(o))}}function Oe(n){let t=new URL(n),e=t.pathname.match(/\/org\/(?<orgSlug>[^/]+)\/project\/(?<projectSlug>[^/]+)/);if(!e?.groups)return;let{orgSlug:r,projectSlug:s}=e.groups;return{residency:t.origin,orgSlug:r,projectSlug:s}}async function ke({residency:n,orgSlug:t,projectSlug:e,auth:r,isApiKey:s,onDebug:o}){let i=new URL(`${n}/api/orgs/${t}/projects/${e}`),a=await fetch(i,{headers:Be(r,s)});if(o?.(`Project fetch response status: ${a.status}`),a.status===401||a.status===403)throw o?.(`Authentication failed with status ${a.status}.`),o?.("Check that your credentials are valid and have the necessary permissions."),new Error(`Unauthorized access to project: ${e}. Please check your credentials.`);if(a.status!==200)throw new Error(`Failed to fetch project: ${e}. Status: ${a.status}`);return o?.("Successfully received project configuration."),a.json()}async function Le(n,t){t?.(`Fetching plugins from: ${n}`);try{let e=await fetch(n);if(t?.(`Plugins fetch response status: ${e.status}`),e.status!==200){t?.("Failed to fetch plugins");return}return e.text()}catch(e){t?.(`Error fetching plugins: ${e instanceof Error?e.message:String(e)}`);return}}function Be(n,t){return t?{Authorization:`Bearer ${n}`}:{Cookie:`accessToken=${n}`}}async function L(n,t,e=[],r=[],s){let o={};for(let i of e){let a={[i.name]:{root:n,rules:t}},c=await Y({apis:a,...i,plugins:r},{configPath:s});o[i.name]=c.forAlias(i.name)}return o}function B(n,t){if(n){for(let e of n)if(Object.entries(e.where?.metadata||{}).every(([s,o])=>Me(s,o,t)))return e}}function Me(n,t,e){if(t.match(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}Z)?\/(\d{4}-\d{2}-\d{2})?$/)){if(!e[n])return!1;let[r,s]=t.split("/"),o=new Date(e[n]);return!(o<new Date(r)||s&&o>new Date(s))}else if(t.match(/^\/.*\//)){if(!e[n])return!1;try{return q(t).test(e[n])}catch{throw new m(`Invalid regex in scorecard target "${n}": ${t}`)}}return e[n]===t}import{pathToFileURL as We}from"node:url";async function be(n,t){if(!n)return[];let e=We(t??process.cwd()).href+"/",r=n.replaceAll("__redocly_dirname",`"${e}"`);return(await import(`data:text/javascript;base64,${btoa(r)}`)).default.map(i=>i())}var ze=".redocly.com";function He(n){try{return new URL(n).hostname.toLowerCase().endsWith(ze)}catch{return!1}}async function qe({apiPath:n,document:t,externalRefResolver:e,scorecardConfig:r,configPath:s,plugins:o=[],targetLevel:i,metadata:a={},onDebug:c}){let $=[],_=new Map,v=r.levels||[];if(i&&!v.some(l=>l.name===i))throw new m(`Target level "${i}" not found in the scorecard configuration levels.
|
|
7
|
+
import{a as K}from"./GKXY6U4S.js";import{Aa as V,j as z,l as I,o as H,oa as m,p as q,ta as Y}from"./NPUBXOHX.js";import{e as b}from"./RFWIIJFG.js";var Q=b(K(),1);var T=b(K(),1);function G(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function X(n){let t=process.env.NO_PROXY||process.env.no_proxy;if(!t)return!1;let e=t.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(e.length===0)return!1;let r;try{r=new URL(n).hostname.toLowerCase()}catch{return!1}return e.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var Z=async(n,{timeout:t,...e}={})=>{let r=G(),s=r&&!X(n),o;s?o=new T.ProxyAgent({uri:r}):t&&(o=new T.Agent({connect:{timeout:t}}));try{return await(0,T.fetch)(n,{signal:t?AbortSignal.timeout(t):void 0,...e,dispatcher:o})}catch(i){throw await o?.destroy(),i}};var de=/^[\x21-\x7e]+( [\x21-\x7e]+)*$/;function J(){let n=process.env.REDOCLY_ENVIRONMENT?.trim();return n&&de.test(n)?n:void 0}var u=class extends Error{status;constructor(t,e){super(t),this.status=e}},x=class{command;version;sunsetWarnings=[];constructor(t,e="2.0"){this.command=t,this.version=e}async request(t,e){let r=J(),s={...e.headers,"user-agent":`redocly-cli/${this.version} ${this.command}${r?` ${r}`:""}`};try{let o=await Z(t,{...e,headers:s});return this.collectSunsetWarning(o),o}catch(o){let i=o.cause??o,a=`Failed to fetch. Caused by ${i.message||i.name}.`;throw typeof i.code=="string"&&(a+=` Code: ${i.code}`),new Error(a)}}collectSunsetWarning(t){let e=this.getSunsetDate(t);if(!e)return;let r=new Date(e);e>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(t){let{headers:e}=t;if(!e)return;let r=e.get("sunset")||e.get("Sunset");if(r)return Date.parse(r)}},U=class{client;domain;apiKey;constructor(t,e,r){this.client=t,this.domain=e,this.apiKey=r}async getParsedResponse(t){let e=await t.json();if(t.ok)return e;throw new u(`${e.title||t.statusText||"Unknown error"}.`,t.status)}},N=class extends U{async find(t,e){try{let r=await this.client.request(`${this.domain}/api/orgs/${encodeURIComponent(t)}/projects/${encodeURIComponent(e)}`,{timeout:6e3,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return r.status===404?void 0:await this.getParsedResponse(r)}catch(r){let s=`Failed to fetch project. ${r.message}`;throw r instanceof u?new u(s,r.status):new Error(s)}}},j=class extends U{async getDefaultBranch(t,e){try{let r=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/source`,{timeout:6e3,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return(await this.getParsedResponse(r)).branchName}catch(r){let s=`Failed to fetch default branch. ${r.message}`;throw r instanceof u?new u(s,r.status):new Error(s)}}async upsert(t,e,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/remotes`,{timeout:6e3,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({mountPath:r.mountPath,mountBranchName:r.mountBranchName,type:"CICD",autoMerge:!0})});return await this.getParsedResponse(s)}catch(s){let o=`Failed to upsert remote. ${s.message}`;throw s instanceof u?new u(o,s.status):new Error(o)}}async push(t,e,r,s){let o=new Q.FormData;o.append("remoteId",r.remoteId),o.append("commit[message]",r.commit.message),o.append("commit[author][name]",r.commit.author.name),o.append("commit[author][email]",r.commit.author.email),o.append("commit[branchName]",r.commit.branchName),r.commit.url&&o.append("commit[url]",r.commit.url),r.commit.namespace&&o.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&o.append("commit[sha]",r.commit.sha),r.commit.repository&&o.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&o.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let a=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await he(i.stream)]);o.append(`files[${i.path}]`,a,i.path)}r.isMainBranch&&o.append("isMainBranch","true"),r.replace&&o.append("replace","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:o});return await this.getParsedResponse(i)}catch(i){let a=`Failed to push. ${i.message}`;throw i instanceof u?new u(a,i.status):new Error(a)}}async getPush({organizationId:t,projectId:e,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/pushes/${r}`,{timeout:6e3,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let o=`Failed to get push status. ${s.message}`;throw s instanceof u?new u(o,s.status):new Error(o)}}},g=class{apiClient;projects;remotes;constructor({domain:t,apiKey:e,command:r,version:s}){this.apiClient=new x(r,s),this.projects=new N(this.apiClient,t,e),this.remotes=new j(this.apiClient,t,e)}getSunsetWarning(){return ee(this.apiClient.sunsetWarnings)}};function ee(n){let[t]=[...n].sort((e,r)=>e.isSunsetExpired!==r.isSunsetExpired?e.isSunsetExpired?-1:1:e.sunsetDate>r.sunsetDate?1:-1);return t}async function he(n){let t=[];for await(let e of n)t.push(e);return Buffer.concat(t)}function fe(){if(process.env.REDOCLY_AUTHORIZATION)return process.env.REDOCLY_AUTHORIZATION;throw new Error("No api key provided, please use environment variable REDOCLY_AUTHORIZATION.")}var pe=/^http:\/\/(localhost|127\.0\.0\.1)(:\d+)?$/,R={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function me(){return process.env.REDOCLY_DOMAIN||R.us}var te=ge((n,t)=>{try{let e=t||n?.resolvedConfig.residency;return we(e)?R[e]:e?new URL(e).origin:n?.resolvedConfig.scorecard?.fromProjectUrl?new URL(n.resolvedConfig.scorecard.fromProjectUrl).origin:R.us}catch{throw new E}});function D(n){try{te(void 0,n)}catch{return!1}return!0}function ge(n){return(...t)=>{let e=n(...t);if(!e.startsWith("https://")&&!pe.test(e))throw new E;return e}}var E=class extends Error{constructor(){super("Invalid Reunite URL")}};function we(n){return typeof n=="string"&&n in R}import{Buffer as O}from"node:buffer";import F from"node:crypto";import{mkdirSync as ye,existsSync as ne,writeFileSync as ve,readFileSync as Te,rmSync as xe}from"node:fs";import{homedir as Ce}from"node:os";import se from"node:path";import*as re from"node:child_process";var w=class{baseUrl;apiClient;clientName="redocly-cli";constructor(t,e){this.baseUrl=t,this.apiClient=new x("login",e)}async run(t){let e=await this.getDeviceCode();t?.({verificationUri:e.verificationUri,verificationUriComplete:e.verificationUriComplete,userCode:e.userCode}),this.openBrowser(e.verificationUriComplete);let r=await this.pollingAccessToken(e.deviceCode,e.interval,e.expiresIn);return this.withResidency(r)}openBrowser(t){if(!/^https?:\/\//.test(t))return;let[e,r]=process.platform==="win32"?["rundll32",["url.dll,FileProtocolHandler",t]]:process.platform==="darwin"?["open",[t]]:["xdg-open",[t]];re.spawn(e,r,{stdio:"ignore",detached:!0}).on("error",()=>{}).unref()}async verifyToken(t){try{return!!(await this.sendRequest("/session","GET",void 0,{Cookie:`accessToken=${t};`})).user}catch{return!1}}async verifyApiKey(t){try{return!!(await this.sendRequest("/api-keys-verify","POST",{apiKey:t})).success}catch{return!1}}async refreshToken(t){let e=await this.sendRequest("/device-rotate-token","POST",{grant_type:"refresh_token",client_name:this.clientName,refresh_token:t});if(!e.access_token)throw new Error("Failed to refresh token");return this.withResidency({access_token:e.access_token,refresh_token:e.refresh_token,expires_in:e.expires_in})}async pollingAccessToken(t,e,r){return new Promise((s,o)=>{let i=setInterval(async()=>{let c=await this.getAccessToken(t);c.access_token&&(clearInterval(i),clearTimeout(a),s(c)),c.error&&c.error!=="authorization_pending"&&(clearInterval(i),clearTimeout(a),o(c.error_description))},e*1e3),a=setTimeout(async()=>{clearInterval(i),clearTimeout(a),o("Authorization has expired. Please try again.")},r*1e3)})}async getAccessToken(t){return await this.sendRequest("/device-token","POST",{client_name:this.clientName,device_code:t,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})}async getDeviceCode(){let{device_code:t,user_code:e,verification_uri:r,verification_uri_complete:s,interval:o=10,expires_in:i=300}=await this.sendRequest("/device-authorize","POST",{client_name:this.clientName});return{deviceCode:t,userCode:e,verificationUri:r,verificationUriComplete:s,interval:o,expiresIn:i}}async sendRequest(t,e="GET",r=void 0,s={}){let o=`${this.baseUrl}/api${t}`,i=await this.apiClient.request(o,{body:r&&JSON.stringify(r),method:e,headers:{"Content-Type":"application/json",...s},timeout:6e3});return i.status===204?{success:!0}:await i.json()}withResidency(t){return{...t,residency:this.baseUrl}}};var Pe="4618dbc9-8aed-4e27-aaf0-225f4603e5a4",oe="aes-256-cbc",k=class{version;credentialsFolderPath;credentialsFilePath;credentialsFileName;key;iv;constructor(t){this.version=t;let e=Ce();this.credentialsFolderPath=se.join(e,".redocly"),this.credentialsFileName="credentials",this.credentialsFilePath=se.join(this.credentialsFolderPath,this.credentialsFileName),this.key=F.createHash("sha256").update(`${this.credentialsFolderPath}${Pe}`).digest(),this.iv=F.createHash("md5").update(this.credentialsFolderPath).digest(),ye(this.credentialsFolderPath,{recursive:!0})}async login(t,e){let s=await new w(t,this.version).run(e);if(!s)throw new Error("Failed to login. No credentials received.");await this.saveCredentials(s)}async logout(){try{this.removeCredentials()}catch{}}async isAuthorized(t,e){return e?new w(t,this.version).verifyApiKey(e):!!await this.getAccessToken(t)}getAccessToken=async t=>{let e=new w(t,this.version),r=await this.readCredentials();if(!r||!D(t)||r.residency&&r.residency!==t)return null;if(await e.verifyToken(r.access_token))return r.access_token;try{let o=await e.refreshToken(r.refresh_token);return await this.saveCredentials(o),o.access_token}catch{return null}};async saveCredentials(t){try{let e=this.encryptCredentials(t);ve(this.credentialsFilePath,e,"utf8")}catch(e){throw new Error(`Failed to save credentials: ${e.message}`)}}async readCredentials(){if(!ne(this.credentialsFilePath))return null;try{let t=Te(this.credentialsFilePath,"utf8");return this.decryptCredentials(t)}catch{return null}}async removeCredentials(){ne(this.credentialsFilePath)&&xe(this.credentialsFilePath)}encryptCredentials(t){let e=F.createCipheriv(oe,this.key,this.iv);return O.concat([e.update(JSON.stringify(t),"utf8"),e.final()]).toString("hex")}decryptCredentials(t){let e=F.createDecipheriv(oe,this.key,this.iv),r=O.concat([e.update(O.from(t,"hex")),e.final()]);return JSON.parse(r.toString("utf8"))}};import*as y from"node:fs";import*as h from"node:path";var Re=/\/orgs\/([^/]+)\/projects\//,Ee=[401,403];async function C(n,{organization:t,project:e,onSlugDeprecated:r}){let s=await $e(n,t,e);if(!s)return{organizationId:t,projectId:e};let o={organizationId:_e(s.uri),projectId:s.id};return(o.organizationId!==t||o.projectId!==e)&&r?.(o),o}async function $e(n,t,e){try{let r=await n.projects.find(t,e);if(!r)throw new u(`Project "${e}" was not found in organization "${t}". Use the IDs from the organization and project settings in Reunite.`,404);return r}catch(r){if(r instanceof u&&Ee.includes(r.status))return;throw r}}function _e(n){let t=n.match(Re)?.[1];if(!t)throw new Error(`Could not read the organization ID from the project URI "${n}".`);return t}async function Se({domain:n,apiKey:t,organization:e,project:r,mountPath:s,files:o,defaultBranch:i,commit:a,version:c,replace:$,onUploadStart:_,onSunsetWarning:v,onSlugDeprecated:A}){let f=new g({domain:n,apiKey:t,command:"push",version:c});try{let{organizationId:d,projectId:l}=await C(f,{organization:e,project:r,onSlugDeprecated:A}),M=await f.remotes.getDefaultBranch(d,l),p=await f.remotes.upsert(d,l,{mountBranchName:M,mountPath:s});_?.(p);let{id:P}=await f.remotes.push(d,l,{remoteId:p.id,commit:a,isMainBranch:i===a.branchName,replace:$},o.map(W=>({path:H(W.name),stream:y.createReadStream(W.path)})));return{pushId:P,organizationId:d,projectId:l}}finally{let d=f.getSunsetWarning();d&&v?.(d)}}function Ue(n,t){let e={};for(let s of n)if(y.statSync(s).isDirectory()){let o=s;ie(o,[]).forEach(a=>r(a,o))}else r(s,h.dirname(s));function r(s,o){let i=h.relative(o,s);e[i]&&t?.(e[i],s),e[i]=s}return Object.entries(e).map(([s,o])=>({name:s,path:h.resolve(o)}))}function ie(n,t){let e=y.readdirSync(n);for(let r of e){let s=h.join(n,r);y.statSync(s).isDirectory()?t=ie(s,t):t.push(s)}return t}async function ae({operation:n,condition:t,onConditionNotMet:e,startTime:r=Date.now(),retryTimeoutMs:s=6e5,retryIntervalMs:o=5e3}){async function i(){let a=await n();if(t(a))return a;if(Date.now()-r>s)throw new Error("Timeout exceeded.");return await e?.(a),await z(o),i()}return i()}var Fe=1200,Ae=5e3,Ie=["pending","running"];async function Ne(n){let t=ce(n);try{let e=await C(t,n);return await le(t,e,n.pushId)}finally{ue(t,n)}}async function je({buildType:n,maxExecutionTime:t=Fe,retryIntervalMs:e=Ae,startTime:r=Date.now(),onRetry:s,...o}){let i=ce(o);try{let a=await C(i,o);return await ae({operation:()=>le(i,a,o.pushId),condition:c=>!Ie.includes(c.status[n].deploy.status),onConditionNotMet:s,startTime:r,retryTimeoutMs:t*1e3,retryIntervalMs:e})}finally{ue(i,o)}}function ce({domain:n,apiKey:t,version:e}){return new g({domain:n,apiKey:t,command:"push-status",version:e})}function ue(n,{onSunsetWarning:t}){let e=n.getSunsetWarning();e&&t?.(e)}function le(n,{organizationId:t,projectId:e},r){return n.remotes.getPush({organizationId:t,projectId:e,pushId:r})}async function De({projectUrl:n,auth:t,isApiKey:e=!1,onDebug:r}){let s=Oe(n);if(!s)throw new m(`Invalid project URL format: ${n}`);try{let o=await ke({...s,auth:t,isApiKey:e,onDebug:r}),i=o.config.scorecardClassic||o.config.scorecard;if(!i)throw new Error("No scorecard configuration found.");let a=o.config.pluginsUrl,c=a?await Le(a,r):void 0;return{scorecard:i,plugins:c,pluginsUrl:a}}catch(o){throw new m(o instanceof Error?o.message:String(o))}}function Oe(n){let t=new URL(n),e=t.pathname.match(/\/org\/(?<orgSlug>[^/]+)\/project\/(?<projectSlug>[^/]+)/);if(!e?.groups)return;let{orgSlug:r,projectSlug:s}=e.groups;return{residency:t.origin,orgSlug:r,projectSlug:s}}async function ke({residency:n,orgSlug:t,projectSlug:e,auth:r,isApiKey:s,onDebug:o}){let i=new URL(`${n}/api/orgs/${t}/projects/${e}`),a=await fetch(i,{headers:Be(r,s)});if(o?.(`Project fetch response status: ${a.status}`),a.status===401||a.status===403)throw o?.(`Authentication failed with status ${a.status}.`),o?.("Check that your credentials are valid and have the necessary permissions."),new Error(`Unauthorized access to project: ${e}. Please check your credentials.`);if(a.status!==200)throw new Error(`Failed to fetch project: ${e}. Status: ${a.status}`);return o?.("Successfully received project configuration."),a.json()}async function Le(n,t){t?.(`Fetching plugins from: ${n}`);try{let e=await fetch(n);if(t?.(`Plugins fetch response status: ${e.status}`),e.status!==200){t?.("Failed to fetch plugins");return}return e.text()}catch(e){t?.(`Error fetching plugins: ${e instanceof Error?e.message:String(e)}`);return}}function Be(n,t){return t?{Authorization:`Bearer ${n}`}:{Cookie:`accessToken=${n}`}}async function L(n,t,e=[],r=[],s){let o={};for(let i of e){let a={[i.name]:{root:n,rules:t}},c=await Y({apis:a,...i,plugins:r},{configPath:s});o[i.name]=c.forAlias(i.name)}return o}function B(n,t){if(n){for(let e of n)if(Object.entries(e.where?.metadata||{}).every(([s,o])=>Me(s,o,t)))return e}}function Me(n,t,e){if(t.match(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}Z)?\/(\d{4}-\d{2}-\d{2})?$/)){if(!e[n])return!1;let[r,s]=t.split("/"),o=new Date(e[n]);return!(o<new Date(r)||s&&o>new Date(s))}else if(t.match(/^\/.*\//)){if(!e[n])return!1;try{return q(t).test(e[n])}catch{throw new m(`Invalid regex in scorecard target "${n}": ${t}`)}}return e[n]===t}import{pathToFileURL as We}from"node:url";async function be(n,t){if(!n)return[];let e=We(t??process.cwd()).href+"/",r=n.replaceAll("__redocly_dirname",`"${e}"`);return(await import(`data:text/javascript;base64,${btoa(r)}`)).default.map(i=>i())}var ze=".redocly.com";function He(n){try{return new URL(n).hostname.toLowerCase().endsWith(ze)}catch{return!1}}async function qe({apiPath:n,document:t,externalRefResolver:e,scorecardConfig:r,configPath:s,plugins:o=[],targetLevel:i,metadata:a={},onDebug:c}){let $=[],_=new Map,v=r.levels||[];if(i&&!v.some(l=>l.name===i))throw new m(`Target level "${i}" not found in the scorecard configuration levels.
|
|
8
8
|
`);let A=B(r.targets,a)?.rules,f=await L(n,A,v,o,s||"");for(let l of v){c?.(`
|
|
9
9
|
Validating level: "${l.name}"`),o.length>0&&c?.(`Using ${o.length} ${I("plugin",o.length)} for this level.`),c?.("Linting document against level rules...");let p=(await V({document:t,externalRefResolver:e,config:f[l.name]})).filter(({ignored:P})=>!P).map(P=>({...P,scorecardLevel:l.name}));c?.(`Found ${p.length} ${I("problem",p.length)} for level "${l.name}".`),_.set(l.name,p),$.push(...p)}let d=Ye(_,v,i);return{problems:$,achievedLevel:d,targetLevelAchieved:i?d===i:!0}}function Ye(n,t,e){let r=null;for(let s of t){if((n.get(s.name)||[]).some(a=>a.severity==="error"))return r||"Non Conformant";if(r=s.name,e&&s.name===e)return s.name}return r||"Non Conformant"}export{u as a,x as b,g as c,ee as d,fe as e,R as f,me as g,te as h,D as i,E as j,w as k,k as l,C as m,Se as n,Ue as o,Ne as p,je as q,De as r,L as s,B as t,be as u,He as v,qe as w};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{h as g}from"./
|
|
7
|
+
import{h as g}from"./EWGN3O2F.js";import{f as C,m as u,n as p}from"./B3XVDFWU.js";import{c as j,d as v}from"./MASJ2JX2.js";import{ia as b}from"./NPUBXOHX.js";import{a as S,b as k}from"./UW4UC7ZI.js";import{join as $}from"node:path";function h(r){return(r??"").replace(/\s+/g," ").trim().replace(/\\/g,"\\\\").replace(/\|/g,"\\|")}function w(r){return[r.group===void 0?void 0:u(r.group),r.name].filter(Boolean).join(" ")}function T(r,e){return[r,w(e),...e.positionals.map(o=>`<${o.name}>`),...e.flags.filter(o=>o.required).map(o=>`--${o.name} <${o.type}>`),...e.body?[e.body.required?"--json '<json>'":"[--json '<json>']"]:[]].filter(o=>o!=="").join(" ")}function B(r,e){r.line("| Flag | Type | Required | Description |"),r.line("| ---- | ---- | -------- | ----------- |");for(let n of e){let o=[h(n.description),n.enum===void 0?"":`One of ${n.enum.map(t=>`\`${t}\``).join(", ")}.`,n.type==="array"?"Repeat the flag for multiple values.":""].filter(t=>t!=="").join(" ");r.line(`| \`--${n.name}\` | ${n.type} | ${n.required?"yes":"no"} | ${o} |`)}r.blank()}function D(r,e,n){if(r.line(`### \`${w(e)}\``),r.blank(),e.summary!==void 0&&(r.line(h(e.summary)),r.blank()),r.line(`\`${e.method} ${e.path}\``),r.blank(),r.line("```sh"),r.line(T(n.name,e)),r.line("```"),r.blank(),e.positionals.length>0){r.line("| Argument | Description |"),r.line("| -------- | ----------- |");for(let t of e.positionals)r.line(`| \`<${t.name}>\` | ${h(t.description)} |`);r.blank()}e.flags.length>0&&B(r,e.flags);let o=[e.body===void 0?"":`Takes a JSON body${e.body.required?" (required)":""}: \`--json '<json>'\`, \`--json @file.json\`, or \`--json @-\` for stdin.`,e.unsupportedBody===void 0?"":`Takes a \`${e.unsupportedBody}\` body, which the CLI cannot build \u2014 call this operation through the generated client instead.`,e.paginated===!0?"Paginated: `--page-all` follows every page, printing one JSON page per line.":"",e.sse===!0?"Streams server-sent events as one JSON object per line.":"",e.blob===!0?"Returns binary content, so `--output <path>` is required.":""].filter(t=>t!=="");for(let t of o)r.line(t);o.length>0&&r.blank()}function R(r,e){let n=new S;e.frontmatter&&(n.line("---"),n.line(`title: ${e.title}`),n.line("---"),n.blank()),n.line(`# ${e.title}`),n.blank(),n.line(`Generated command-line reference for \`${e.name}\`, produced from the API description by \`redocly generate-client\`.`),n.line("Re-run generation to update it \u2014 this file is not hand-edited."),n.blank(),n.line("## Usage"),n.blank(),n.line("```sh"),n.line(`${e.name} <command> [flags]`),n.line(`${e.name} --help`),n.line(`${e.name} schema <command> # request/response schemas`),n.line("```"),n.blank(),n.line("Install the file under any `bin` name: the command takes that name, and the credential variables below do not change."),n.blank(),n.line("## Global flags"),n.blank(),n.line("| Flag | Description |"),n.line("| ---- | ----------- |");let o=e.schemes.some(i=>i.kind==="bearer");for(let[i,s]of[["--server-url <url>","Override the server URL included in the client."],["--format <json\\|ndjson>","Output format."],["--dry-run","Print the prepared request, credentials redacted, without sending it."],["--page-all","Follow pagination, printing one JSON page per line."],["--output <path>","Write the response body to a file. Required for binary responses."],...o?[["--token <token>","Bearer token, overriding the environment."]]:[],["--json <json\\|@file\\|@->","Request body, inline or from a file or stdin."]])n.line(`| \`${i}\` | ${s} |`);n.blank();let t=p(e.name);if(n.line("## Credentials"),n.blank(),e.schemes.length===0)n.line("The description declares no security schemes, so no credentials are read.");else{n.line("Credentials come from the environment:"),n.blank(),n.line("| Scheme | Variable |"),n.line("| ------ | -------- |");for(let i of e.schemes){let s=i.kind==="bearer"?`\`${t}_TOKEN\` (or \`--token\`)`:i.kind==="basic"?`\`${t}_USERNAME\` and \`${t}_PASSWORD\``:`\`${t}_API_KEY_${p(i.key)}\``;n.line(`| ${i.kind} (\`${i.key}\`) | ${s} |`)}}n.blank(),n.line("## Exit codes"),n.blank(),n.line("| Code | Meaning |"),n.line("| ---- | ------- |");for(let[i,s]of[[0,"success"],[1,"API error (status other than 401 or 403)"],[2,"auth error (401 or 403)"],[3,"validation error"],[4,"usage error (unknown command or flag, bad `--json`)"]])n.line(`| ${i} | ${s} |`);n.blank(),n.line("Errors print one JSON object to stderr, so stdout stays clean for piping."),n.blank();let a=[...new Set(r.map(i=>i.group))];for(let i of a){let s=r.filter(l=>l.group===i);i===void 0?(n.line("## Commands"),n.blank()):(n.line(`## ${i}`),n.blank(),n.line(`Addressed as \`${e.name} ${u(i)} <command>\`.`),n.blank());for(let l of s)D(n,l,e)}return n.toString().replace(/\n{3,}/g,`
|
|
8
8
|
|
|
9
9
|
`).trimEnd()+`
|
|
10
10
|
`}function x(){return v["cli.ts"]}function E(){return j["cli.ts"]}var q="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function P(r){return k.snake(r).replace(/_/g,"-")}function O(r){let e=r.schema,n=e.kind==="array"?"array":e.kind==="scalar"&&(e.scalar==="integer"||e.scalar==="number")?"number":e.kind==="scalar"&&e.scalar==="boolean"?"boolean":"string";return{name:P(r.name),param:r.name,type:n,required:r.required,...e.kind==="enum"?{enum:e.values.map(String)}:{},...r.description!==void 0?{description:r.description}:{}}}function F(r){let e=r.successResponses;return e.some(n=>n.contentType.toLowerCase().includes("json"))?!1:e.some(n=>C(n.contentType))}function M(r){return r.successResponses.find(e=>e.contentType.toLowerCase().includes("json"))?.schema}function U(r,e,n){if(n!=="flat")return{};let o=g(r,e.schemas);return"mergeBody"in o&&o.mergeBody?{merged:!0}:{}}function _(r,e,n){return n!=="flat"?{}:"collisions"in g(r,e.schemas)?{argsStyle:"grouped"}:{}}function f(r,e){let n=[];for(let o of r.services)for(let t of o.operations){let a=t.requestBody?.contentType.toLowerCase().includes("json")?t.requestBody:void 0,i=M(t);n.push({...t.tags.length>0?{group:t.tags[0]}:{},name:t.name,...t.summary!==void 0?{summary:t.summary}:{},method:t.method.toUpperCase(),path:t.path,positionals:t.pathParams.map(s=>({name:s.name,type:O(s).type,...s.description!==void 0?{description:s.description}:{}})),flags:t.queryParams.map(O),...a?{body:{required:a.required,...U(t,r,e.argsStyle)}}:{},...a===void 0&&t.requestBody!==void 0?{unsupportedBody:t.requestBody.contentType}:{},...e.pagination?.has(t.name)===!0?{paginated:!0}:{},..._(t,r,e.argsStyle),...t.sse!==void 0?{sse:!0}:{},...F(t)?{blob:!0}:{},...a!==void 0||i!==void 0?{schemas:{...a?{request:a.schema}:{},...i!==void 0?{response:i}:{}}}:{}})}return n}var A=`function isProcessEntry(): boolean {
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as $,b as a,c,d as i,e as m,f}from"./
|
|
7
|
+
import{a as $,b as a,c,d as i,e as m,f}from"./C5G3PHMB.js";import{k as l}from"./LD5MEXEL.js";import{join as p}from"node:path";function k(t,n){let e=$(t,"swr");if(e.length===0)return"";let s=e.some(a),o=e.some(r=>!a(r));return[...s?['import useSWR from "swr";']:[],...o?['import useSWRMutation from "swr/mutation";']:[],f(e,n.sdkModule,s),...e.flatMap(r=>a(r)?g(r):[S(r)])].join(`
|
|
8
8
|
|
|
9
9
|
`)}function y(t,n,e){return`export function use${l(t.name)}(${n}) {
|
|
10
10
|
return ${e};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as F}from"./
|
|
7
|
+
import{a as F}from"./NL4BJZLQ.js";import{a as b,d as A,e as E,g as O,p as B,q as h}from"./4K56BI6R.js";import{f as I}from"./G5N5PSW7.js";import{$ as v,aa as j,ba as u,da as c,ea as d,ia as a,m as l,oa as m}from"./NPUBXOHX.js";var y=class extends Error{};async function Z({argv:t,version:e}){let n=performance.now(),o=new F,{organization:s,project:p,pushId:w,wait:g}=t,U=t.domain||O(),S=t["continue-on-deploy-failures"]||!1,M=t["start-time"]||Date.now(),R=[],f={organization:s,project:p};try{let $=E(),P={domain:U,apiKey:$,...f,pushId:w,version:e,onSunsetWarning:i=>R.push(i),onSlugDeprecated:i=>{K(i),f={organization:i.organizationId,project:i.projectId}}},D={...P,maxExecutionTime:t["max-execution-time"],retryIntervalMs:t["retry-interval"]?t["retry-interval"]*1e3:void 0,startTime:M},x=i=>T=>{let{status:C,url:N}=T.status[i].deploy;o.start(L({status:C,url:N,buildType:i,wait:g}))},r=g?await h({...D,buildType:"preview",onRetry:x("preview")}):await B(P);return W({buildType:"preview",spinner:o,push:r,continueOnDeployFailures:S}),z(r.status.preview.scorecard),g&&r.isMainBranch&&r.status.preview.deploy.status==="success"&&(r=await h({...D,...f,buildType:"production",onRetry:x("production")})),r.isMainBranch&&(W({buildType:"production",spinner:o,push:r,continueOnDeployFailures:S}),z(r.status.production.scorecard)),V({organization:s,project:p,pushId:w,startedAt:n}),{preview:r.status.preview,production:r.isMainBranch?r.status.production:null,commit:r.commit}}catch($){o.stop(),k("\u2717 Failed to get push status.",$)}finally{o.stop(),H("push-status",R)}}function k(t,e){throw e instanceof y?new m(e.message):e instanceof b?new m(`${t} Reason: ${e.message} (status: ${e.status})
|
|
8
8
|
`):new m(`${t} Reason: ${e.message}
|
|
9
9
|
`)}function K({organizationId:t,projectId:e}){a.warn(`Organization and project slugs are deprecated. Use the ids instead: --organization ${t} --project ${e}
|
|
10
10
|
`)}function H(t,e){let n=A(e);if(!n)return;let o='Update to the latest version by running "npm install @redocly/cli@latest".';n.isSunsetExpired?a.error(`The "${t}" command is not compatible with your version of Redocly CLI. ${o}
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{b as S,c as E,d as w,f as A,g as M,h as q,i as D,j as B,k as F}from"./
|
|
7
|
+
import{b as S,c as E,d as w,f as A,g as M,h as q,i as D,j as B,k as F}from"./EWGN3O2F.js";import{h as b,j as T}from"./B3XVDFWU.js";import{a as f,c as R,d as v,e as k}from"./MASJ2JX2.js";import{d as I,f as N,h as P,i as j,m as C}from"./LD5MEXEL.js";import{join as Y}from"node:path";var y="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function $(e){return e.filter(t=>t.length>0).join(`
|
|
8
8
|
|
|
9
9
|
`)+`
|
|
10
10
|
`}function O(e){let t=["/**",` * ${j(`${e.title} (v${e.version})`)}`];if(e.description)for(let n of C(j(e.description)))t.push(` * ${n}`.replace(/ +$/,""));return t.push(" */"),t.join(`
|
|
@@ -4,5 +4,5 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{u as o}from"./
|
|
7
|
+
import{u as o}from"./G5N5PSW7.js";import{ba as t}from"./NPUBXOHX.js";var r=" ",a=" ";function g(i){let p=Math.max(...i.map(n=>o(n).length)),e=p+a.length*2,c=r+t("\u2551"+" ".repeat(e)+"\u2551");return["",r+t("\u2554"+"\u2550".repeat(e)+"\u2557"),c,...i.map(n=>{let h=" ".repeat(p-o(n).length);return`${r}${t("\u2551")}${a}${n}${h}${a}${t("\u2551")}`}),c,r+t("\u255A"+"\u2550".repeat(e)+"\u255D"),"",""].join(`
|
|
8
8
|
`)}export{g as a};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as bs}from"./H4VN2RX3.js";import{c as xs,d as ni}from"./6NB3FKVN.js";import{$ as ot,A as rm,B as im,C as om,D as sm,E as am,F as lm,G as um,H as cm,I as fm,J as pm,K as mm,Q as ls,S as us,U as cs,V as fs,W as ps,Y as ms,aa as et,ba as ze,c as $t,ea as Me,g as os,ga as ds,ia as G,ka as ti,la as hs,ma as gs,pa as xn,q as ss,u as pt,ua as ys,w as as,x as nm}from"./22EANOP2.js";import"./NEWT5A6S.js";import{c as it,d as tm,e as Lt}from"./RFWIIJFG.js";var ws=it(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});var dm=am(),hm=lm(),gm=um(),ym=cm(),ks=fm(),xm=[dm.default,hm.default,(0,gm.default)(),ym.default,ks.metadataVocabulary,ks.contentVocabulary];ri.default=xm});var Ss=it((tw,bm)=>{bm.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Ls=it((Se,ii)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var km=sm(),wm=ws(),Sm=pm(),Cs=Ss(),Cm=["/properties"],Yn="http://json-schema.org/draft-07/schema",Ut=class extends km.default{_addVocabularies(){super._addVocabularies(),wm.default.forEach(n=>this.addVocabulary(n)),this.opts.discriminator&&this.addKeyword(Sm.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let n=this.opts.$data?this.$dataMetaSchema(Cs,Cm):Cs;this.addMetaSchema(n,Yn,!1),this.refs["http://json-schema.org/schema"]=Yn}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Yn)?Yn:void 0)}};Se.Ajv=Ut;ii.exports=Se=Ut;ii.exports.Ajv=Ut;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=Ut;var Lm=rm();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return Lm.KeywordCxt}});var Wt=nm();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Wt._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Wt.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Wt.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Wt.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Wt.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return Wt.CodeGen}});var Am=im();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return Am.default}});var Em=om();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return Em.default}})});var Sn=it((Nw,Ma)=>{"use strict";var _a="[^\\\\/]",pd="(?=.)",Fa="[^/]",Pi="(?:\\/|$)",Oa="(?:^|\\/)",Di=`\\.{1,2}${Pi}`,md="(?!\\.)",dd=`(?!${Oa}${Di})`,hd=`(?!\\.{0,1}${Pi})`,gd=`(?!${Di})`,yd="[^.\\/]",xd=`${Fa}*?`,bd="/",Na={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:pd,QMARK:Fa,END_ANCHOR:Pi,DOTS_SLASH:Di,NO_DOT:md,NO_DOTS:dd,NO_DOT_SLASH:hd,NO_DOTS_SLASH:gd,QMARK_NO_DOT:yd,STAR:xd,START_ANCHOR:Oa,SEP:bd},kd={...Na,SLASH_LITERAL:"[\\\\/]",QMARK:_a,STAR:`${_a}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},wd={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Ma.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:wd,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?kd:Na}}});var Cn=it(je=>{"use strict";var{REGEX_BACKSLASH:Sd,REGEX_REMOVE_BACKSLASH:Cd,REGEX_SPECIAL_CHARS:Ld,REGEX_SPECIAL_CHARS_GLOBAL:Ad}=Sn();je.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);je.hasRegexChars=e=>Ld.test(e);je.isRegexChar=e=>e.length===1&&je.hasRegexChars(e);je.escapeRegex=e=>e.replace(Ad,"\\$1");je.toPosixSlashes=e=>e.replace(Sd,"/");je.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};je.removeBackslashes=e=>e.replace(Cd,n=>n==="\\"?"":n);je.escapeLast=(e,n,t)=>{let r=e.lastIndexOf(n,t);return r===-1?e:e[r-1]==="\\"?je.escapeLast(e,n,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};je.removePrefix=(e,n={})=>{let t=e;return t.startsWith("./")&&(t=t.slice(2),n.prefix="./"),t};je.wrapOutput=(e,n={},t={})=>{let r=t.contains?"":"^",i=t.contains?"":"$",o=`${r}(?:${e})${i}`;return n.negated===!0&&(o=`(?:^(?!${o}).*$)`),o};je.basename=(e,{windows:n}={})=>{let t=e.split(n?/[\\/]/:"/"),r=t[t.length-1];return r===""?t[t.length-2]:r}});var Ua=it((Pw,ja)=>{"use strict";var Pa=Cn(),{CHAR_ASTERISK:Bi,CHAR_AT:Ed,CHAR_BACKWARD_SLASH:Kt,CHAR_COMMA:Td,CHAR_DOT:qi,CHAR_EXCLAMATION_MARK:Hi,CHAR_FORWARD_SLASH:za,CHAR_LEFT_CURLY_BRACE:zi,CHAR_LEFT_PARENTHESES:rr,CHAR_LEFT_SQUARE_BRACKET:Rd,CHAR_PLUS:vd,CHAR_QUESTION_MARK:Da,CHAR_RIGHT_CURLY_BRACE:Id,CHAR_RIGHT_PARENTHESES:Ba,CHAR_RIGHT_SQUARE_BRACKET:$d}=Sn(),qa=e=>e===za||e===Kt,Ha=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},_d=(e,n)=>{let t=n||{},r=e.length-1,i=t.parts===!0||t.tokens===!0||t.scanToEnd===!0,o=[],s=[],a=[],l=e,u=-1,c=0,p=0,m=!1,d=!1,h=!1,w=!1,k=!1,y=!1,S=!1,L=!1,_=!1,B=!1,R=0,I,N,v={value:"",depth:0,isGlob:!1},b=()=>u>=r,Z=()=>l.charCodeAt(u+1),X=()=>(I=N,l.charCodeAt(++u));for(;u<r;){N=X();let re;if(N===Kt){S=v.backslashes=!0,N=X(),N===zi&&(y=!0);continue}if(y===!0||N===zi){for(R++;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===zi){R++;continue}if(y!==!0&&N===qi&&(N=X())===qi){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(y!==!0&&N===Td){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Id&&(R--,R===0)){y=!1,m=v.isBrace=!0,B=!0;break}}if(i===!0)continue;break}if(N===za){if(o.push(u),s.push(v),v={value:"",depth:0,isGlob:!1},B===!0)continue;if(I===qi&&u===c+1){c+=2;continue}p=u+1;continue}if(t.noext!==!0&&(N===vd||N===Ed||N===Bi||N===Da||N===Hi)===!0&&Z()===rr){if(h=v.isGlob=!0,w=v.isExtglob=!0,B=!0,N===Hi&&u===c&&(_=!0),i===!0){let be=0;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){be++;continue}if(N===Ba&&--be===0){B=!0;break}}continue}break}if(N===Bi){if(I===Bi&&(k=v.isGlobstar=!0),h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Da){if(h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Rd){for(;b()!==!0&&(re=X());){if(re===Kt){S=v.backslashes=!0,X();continue}if(re===$d){d=v.isBracket=!0,h=v.isGlob=!0,B=!0;break}}if(i===!0)continue;break}if(t.nonegate!==!0&&N===Hi&&u===c){L=v.negated=!0,c++;continue}if(t.noparen!==!0&&N===rr){if(h=v.isGlob=!0,i===!0){let de=1;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){de++;continue}if(N===Ba&&--de===0){B=!0;break}}continue}break}if(h===!0){if(B=!0,i===!0)continue;break}}t.noext===!0&&(w=!1,h=!1);let Y=l,E="",x="";c>0&&(E=l.slice(0,c),l=l.slice(c),p-=c),Y&&h===!0&&p>0?(Y=l.slice(0,p),x=l.slice(p)):h===!0?(Y="",x=l):Y=l,Y&&Y!==""&&Y!=="/"&&Y!==l&&qa(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),t.unescape===!0&&(x&&(x=Pa.removeBackslashes(x)),Y&&S===!0&&(Y=Pa.removeBackslashes(Y)));let P={prefix:E,input:e,start:c,base:Y,glob:x,isBrace:m,isBracket:d,isGlob:h,isExtglob:w,isGlobstar:k,negated:L,negatedExtglob:_};if(t.tokens===!0&&(P.maxDepth=0,qa(N)||s.push(v),P.tokens=s),t.parts===!0||t.tokens===!0){let re;for(let C=0;C<o.length;C++){let le=re!==void 0?re+1:c,Le=o[C],A=e.slice(le,Le);t.tokens&&(C===0&&c!==0?(s[C].isPrefix=!0,s[C].value=E):s[C].value=A,Ha(s[C]),P.maxDepth+=s[C].depth),Le>=c&&(a.push(A),re=Le)}let de=re!==void 0?re+1:c,be=e.slice(de);a.push(be),t.tokens&&re&&re+1<e.length&&(s[s.length-1].value=be,Ha(s[s.length-1]),P.maxDepth+=s[s.length-1].depth),P.slashes=o,P.parts=a}return P};ja.exports=_d});var Ga=it((Dw,Ka)=>{"use strict";var Ln=Sn(),Ke=Cn(),{MAX_LENGTH:ir,POSIX_REGEX_SOURCE:Fd,REGEX_NON_SPECIAL_CHARS:Od,REGEX_SPECIAL_CHARS_BACKREF:Nd,REPLACEMENTS:Wa}=Ln,Md=(e,n)=>{if(typeof n.expandRange=="function")return n.expandRange(...e,n);e.sort();let t=`[${e.join("-")}]`;try{new RegExp(t)}catch{return e.map(i=>Ke.escapeRegex(i)).join("..")}return t},Gt=(e,n)=>`Missing ${e}: "${n}" - use "\\\\${n}" to match literal characters`,Va=e=>{let n=[],t=0,r=0,i=0,o="",s=!1;for(let a of e){if(s===!0){o+=a,s=!1;continue}if(a==="\\"){o+=a,s=!0;continue}if(a==='"'){i=i===1?0:1,o+=a;continue}if(i===0){if(a==="[")t++;else if(a==="]"&&t>0)t--;else if(t===0){if(a==="(")r++;else if(a===")"&&r>0)r--;else if(a==="|"&&r===0){n.push(o),o="";continue}}}o+=a}return n.push(o),n},Pd=e=>{let n=!1;for(let t of e){if(n===!0){n=!1;continue}if(t==="\\"){n=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},Ui=e=>{let n=e.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(n)&&(n=n.slice(2,-1),t=!0);if(Pd(n))return n.replace(/\\(.)/g,"$1")},Dd=e=>{let n=e.map(Ui).filter(Boolean);for(let t=0;t<n.length;t++)for(let r=t+1;r<n.length;r++){let i=n[t],o=n[r],s=i[0];if(!(!s||i!==s.repeat(i.length)||o!==s.repeat(o.length))&&(i===o||i.startsWith(o)||o.startsWith(i)))return!0}return!1},ji=(e,n=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let t=0,r=0,i=0,o=!1;for(let s=1;s<e.length;s++){let a=e[s];if(o===!0){o=!1;continue}if(a==="\\"){o=!0;continue}if(a==='"'){i=i===1?0:1;continue}if(i!==1){if(a==="["){t++;continue}if(a==="]"&&t>0){t--;continue}if(!(t>0)){if(a==="("){r++;continue}if(a===")"&&(r--,r===0))return n===!0&&s!==e.length-1?void 0:{type:e[0],body:e.slice(2,s),end:s}}}}},Bd=e=>`${e.length===1?Ke.escapeRegex(e[0]):`[${e.map(t=>Ke.escapeRegex(t)).join("")}]`}*`,qd=e=>{let n=0,t=[];for(;n<e.length;){let r=ji(e.slice(n),!1);if(!r||r.type!=="*")return;let i=Va(r.body).map(s=>s.trim());if(i.length!==1)return;let o=Ui(i[0]);if(!o||o.length!==1)return;t.push(o),n+=r.end+1}if(!(t.length<1))return t},Hd=e=>{let n=0,t=e.trim(),r=ji(t);for(;r;)n++,t=r.body.trim(),r=ji(t);return n},zd=(e,n)=>{if(n.maxExtglobRecursion===!1)return{risky:!1};let t=typeof n.maxExtglobRecursion=="number"?n.maxExtglobRecursion:Ln.DEFAULT_MAX_EXTGLOB_RECURSION,r=Va(e).map(a=>a.trim());if(r.length>1&&(r.some(a=>a==="")||r.some(a=>/^[*?]+$/.test(a))||Dd(r)))return{risky:!0};let i=[],o=!1,s=!0;for(let a of r){let l=qd(a);if(l){o=!0,i.push(...l);continue}let u=Ui(a);if(u&&u.length===1){i.push(u);continue}if(s=!1,Hd(a)>t)return{risky:!0}}return o?s?{risky:!0,safeOutput:Bd([...new Set(i)])}:{risky:!0}:{risky:!1}},Wi=(e,n)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Wa[e]||e;let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let o={type:"bos",value:"",output:t.prepend||""},s=[o],a=t.capture?"":"?:",l=Ln.globChars(t.windows),u=Ln.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:p,SLASH_LITERAL:m,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:w,NO_DOT_SLASH:k,NO_DOTS_SLASH:y,QMARK:S,QMARK_NO_DOT:L,STAR:_,START_ANCHOR:B}=l,R=j=>`(${a}(?:(?!${B}${j.dot?h:c}).)*?)`,I=t.dot?"":w,N=t.dot?S:L,v=t.bash===!0?R(t):_;t.capture&&(v=`(${v})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let b={input:e,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=Ke.removePrefix(e,b),i=e.length;let Z=[],X=[],Y=[],E=o,x,P=()=>b.index===i-1,re=b.peek=(j=1)=>e[b.index+j],de=b.advance=()=>e[++b.index]||"",be=()=>e.slice(b.index+1),C=(j="",ge=0)=>{b.consumed+=j,b.index+=ge},le=j=>{b.output+=j.output!=null?j.output:j.value,C(j.value)},Le=()=>{let j=1;for(;re()==="!"&&(re(2)!=="("||re(3)==="?");)de(),b.start++,j++;return j%2===0?!1:(b.negated=!0,b.start++,!0)},A=j=>{b[j]++,Y.push(j)},ke=j=>{b[j]--,Y.pop()},ee=j=>{if(E.type==="globstar"){let ge=b.braces>0&&(j.type==="comma"||j.type==="brace"),z=j.extglob===!0||Z.length&&(j.type==="pipe"||j.type==="paren");j.type!=="slash"&&j.type!=="paren"&&!ge&&!z&&(b.output=b.output.slice(0,-E.output.length),E.type="star",E.value="*",E.output=v,b.output+=E.output)}if(Z.length&&j.type!=="paren"&&(Z[Z.length-1].inner+=j.value),(j.value||j.output)&&le(j),E&&E.type==="text"&&j.type==="text"){E.output=(E.output||E.value)+j.value,E.value+=j.value;return}j.prev=E,s.push(j),E=j},$e=(j,ge)=>{let z={...u[ge],conditions:1,inner:""};z.prev=E,z.parens=b.parens,z.output=b.output,z.startIndex=b.index,z.tokensIndex=s.length;let oe=(t.capture?"(":"")+z.open;A("parens"),ee({type:j,value:ge,output:b.output?"":d}),ee({type:"paren",extglob:!0,value:de(),output:oe}),Z.push(z)},Qe=j=>{let ge=e.slice(j.startIndex,b.index+1),z=e.slice(j.startIndex+2,b.index),oe=zd(z,t);if((j.type==="plus"||j.type==="star")&&oe.risky){let ye=oe.safeOutput?(j.output?"":d)+(t.capture?`(${oe.safeOutput})`:oe.safeOutput):void 0,Oe=s[j.tokensIndex];Oe.type="text",Oe.value=ge,Oe.output=ye||Ke.escapeRegex(ge);for(let Xe=j.tokensIndex+1;Xe<s.length;Xe++)s[Xe].value="",s[Xe].output="",delete s[Xe].suffix;b.output=j.output+Oe.output,b.backtrack=!0,ee({type:"paren",extglob:!0,value:x,output:""}),ke("parens");return}let he=j.close+(t.capture?")":""),we;if(j.type==="negate"){let ye=v;if(j.inner&&j.inner.length>1&&j.inner.includes("/")&&(ye=R(t)),(ye!==v||P()||/^\)+$/.test(be()))&&(he=j.close=`)$))${ye}`),j.inner.includes("*")&&(we=be())&&/^\.[^\\/.]+$/.test(we)){let Oe=Wi(we,{...n,fastpaths:!1}).output;he=j.close=`)${Oe})${ye})`}j.prev.type==="bos"&&(b.negatedExtglob=!0)}ee({type:"paren",extglob:!0,value:x,output:he}),ke("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let j=!1,ge=e.replace(Nd,(z,oe,he,we,ye,Oe)=>we==="\\"?(j=!0,z):we==="?"?oe?oe+we+(ye?S.repeat(ye.length):""):Oe===0?N+(ye?S.repeat(ye.length):""):S.repeat(he.length):we==="."?c.repeat(he.length):we==="*"?oe?oe+we+(ye?v:""):v:oe?z:`\\${z}`);return j===!0&&(t.unescape===!0?ge=ge.replace(/\\/g,""):ge=ge.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),ge===e&&t.contains===!0?(b.output=e,b):(b.output=Ke.wrapOutput(ge,b,n),b)}for(;!P();){if(x=de(),x==="\0")continue;if(x==="\\"){let z=re();if(z==="/"&&t.bash!==!0||z==="."||z===";")continue;if(!z){x+="\\",ee({type:"text",value:x});continue}let oe=/^\\+/.exec(be()),he=0;if(oe&&oe[0].length>2&&(he=oe[0].length,b.index+=he,he%2!==0&&(x+="\\")),t.unescape===!0?x=de():x+=de(),b.brackets===0){ee({type:"text",value:x});continue}}if(b.brackets>0&&(x!=="]"||E.value==="["||E.value==="[^")){if(t.posix!==!1&&x===":"){let z=E.value.slice(1);if(z.includes("[")&&(E.posix=!0,z.includes(":"))){let oe=E.value.lastIndexOf("["),he=E.value.slice(0,oe),we=E.value.slice(oe+2),ye=Fd[we];if(ye){E.value=he+ye,b.backtrack=!0,de(),!o.output&&s.indexOf(E)===1&&(o.output=d);continue}}}(x==="["&&re()!==":"||x==="-"&&re()==="]")&&(x=`\\${x}`),x==="]"&&(E.value==="["||E.value==="[^")&&(x=`\\${x}`),t.posix===!0&&x==="!"&&E.value==="["&&(x="^"),E.value+=x,le({value:x});continue}if(b.quotes===1&&x!=='"'){x=Ke.escapeRegex(x),E.value+=x,le({value:x});continue}if(x==='"'){b.quotes=b.quotes===1?0:1,t.keepQuotes===!0&&ee({type:"text",value:x});continue}if(x==="("){A("parens"),ee({type:"paren",value:x});continue}if(x===")"){if(b.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Gt("opening","("));let z=Z[Z.length-1];if(z&&b.parens===z.parens+1){Qe(Z.pop());continue}ee({type:"paren",value:x,output:b.parens?")":"\\)"}),ke("parens");continue}if(x==="["){if(t.nobracket===!0||!be().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));x=`\\${x}`}else A("brackets");ee({type:"bracket",value:x});continue}if(x==="]"){if(t.nobracket===!0||E&&E.type==="bracket"&&E.value.length===1){ee({type:"text",value:x,output:`\\${x}`});continue}if(b.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Gt("opening","["));ee({type:"text",value:x,output:`\\${x}`});continue}ke("brackets");let z=E.value.slice(1);if(E.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(x=`/${x}`),E.value+=x,le({value:x}),t.literalBrackets===!1||Ke.hasRegexChars(z))continue;let oe=Ke.escapeRegex(E.value);if(b.output=b.output.slice(0,-E.value.length),t.literalBrackets===!0){b.output+=oe,E.value=oe;continue}E.value=`(${a}${oe}|${E.value})`,b.output+=E.value;continue}if(x==="{"&&t.nobrace!==!0){A("braces");let z={type:"brace",value:x,output:"(",outputIndex:b.output.length,tokensIndex:b.tokens.length};X.push(z),ee(z);continue}if(x==="}"){let z=X[X.length-1];if(t.nobrace===!0||!z){ee({type:"text",value:x,output:x});continue}let oe=")";if(z.dots===!0){let he=s.slice(),we=[];for(let ye=he.length-1;ye>=0&&(s.pop(),he[ye].type!=="brace");ye--)he[ye].type!=="dots"&&we.unshift(he[ye].value);oe=Md(we,t),b.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let he=b.output.slice(0,z.outputIndex),we=b.tokens.slice(z.tokensIndex);z.value=z.output="\\{",x=oe="\\}",b.output=he;for(let ye of we)b.output+=ye.output||ye.value}ee({type:"brace",value:x,output:oe}),ke("braces"),X.pop();continue}if(x==="|"){Z.length>0&&Z[Z.length-1].conditions++,ee({type:"text",value:x});continue}if(x===","){let z=x,oe=X[X.length-1];oe&&Y[Y.length-1]==="braces"&&(oe.comma=!0,z="|"),ee({type:"comma",value:x,output:z});continue}if(x==="/"){if(E.type==="dot"&&b.index===b.start+1){b.start=b.index+1,b.consumed="",b.output="",s.pop(),E=o;continue}ee({type:"slash",value:x,output:m});continue}if(x==="."){if(b.braces>0&&E.type==="dot"){E.value==="."&&(E.output=c);let z=X[X.length-1];E.type="dots",E.output+=x,E.value+=x,z.dots=!0;continue}if(b.braces+b.parens===0&&E.type!=="bos"&&E.type!=="slash"){ee({type:"text",value:x,output:c});continue}ee({type:"dot",value:x,output:c});continue}if(x==="?"){if(!(E&&E.value==="(")&&t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("qmark",x);continue}if(E&&E.type==="paren"){let oe=re(),he=x;(E.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(be()))&&(he=`\\${x}`),ee({type:"text",value:x,output:he});continue}if(t.dot!==!0&&(E.type==="slash"||E.type==="bos")){ee({type:"qmark",value:x,output:L});continue}ee({type:"qmark",value:x,output:S});continue}if(x==="!"){if(t.noextglob!==!0&&re()==="("&&(re(2)!=="?"||!/[!=<:]/.test(re(3)))){$e("negate",x);continue}if(t.nonegate!==!0&&b.index===0){Le();continue}}if(x==="+"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("plus",x);continue}if(E&&E.value==="("||t.regex===!1){ee({type:"plus",value:x,output:p});continue}if(E&&(E.type==="bracket"||E.type==="paren"||E.type==="brace")||b.parens>0){ee({type:"plus",value:x});continue}ee({type:"plus",value:p});continue}if(x==="@"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){ee({type:"at",extglob:!0,value:x,output:""});continue}ee({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let z=Od.exec(be());z&&(x+=z[0],b.index+=z[0].length),ee({type:"text",value:x});continue}if(E&&(E.type==="globstar"||E.star===!0)){E.type="star",E.star=!0,E.value+=x,E.output=v,b.backtrack=!0,b.globstar=!0,C(x);continue}let j=be();if(t.noextglob!==!0&&/^\([^?]/.test(j)){$e("star",x);continue}if(E.type==="star"){if(t.noglobstar===!0){C(x);continue}let z=E.prev,oe=z.prev,he=z.type==="slash"||z.type==="bos",we=oe&&(oe.type==="star"||oe.type==="globstar");if(t.bash===!0&&(!he||j[0]&&j[0]!=="/")){ee({type:"star",value:x,output:""});continue}let ye=b.braces>0&&(z.type==="comma"||z.type==="brace"),Oe=Z.length&&(z.type==="pipe"||z.type==="paren");if(!he&&z.type!=="paren"&&!ye&&!Oe){ee({type:"star",value:x,output:""});continue}for(;j.slice(0,3)==="/**";){let Ne=e[b.index+4];if(Ne&&Ne!=="/")break;j=j.slice(3),C("/**",3)}let Xe=P()||b.parens>0&&j===")".repeat(b.parens)&&!Z.some(Ne=>Ne.type==="negate");if(z.type==="bos"&&P()){E.type="globstar",E.value+=x,E.output=R(t),b.output=E.output,b.globstar=!0,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!we&&Xe){b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=R(t)+(t.strictSlashes?")":"|$)"),E.value+=x,b.globstar=!0,b.output+=z.output+E.output,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&j[0]==="/"){let Ne=j[1]!==void 0?"|$":"";b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=`${R(t)}${m}|${m}${Ne})`,E.value+=x,b.output+=z.output+E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&j[0]==="/"){E.type="globstar",E.value+=x,E.output=`(?:^|${m}|${R(t)}${m})`,b.output=E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}b.output=b.output.slice(0,-E.output.length),E.type="globstar",E.output=R(t),E.value+=x,b.output+=E.output,b.globstar=!0,C(x);continue}let ge={type:"star",value:x,output:v};if(t.bash===!0){ge.output=".*?",(E.type==="bos"||E.type==="slash")&&(ge.output=I+ge.output),ee(ge);continue}if(E&&(E.type==="bracket"||E.type==="paren")&&t.regex===!0){ge.output=x,ee(ge);continue}(b.index===b.start||E.type==="slash"||E.type==="dot")&&(E.type==="dot"?(b.output+=k,E.output+=k):t.dot===!0?(b.output+=y,E.output+=y):(b.output+=I,E.output+=I),re()!=="*"&&(b.output+=d,E.output+=d)),ee(ge)}for(;b.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));b.output=Ke.escapeLast(b.output,"["),ke("brackets")}for(;b.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing",")"));b.output=Ke.escapeLast(b.output,"("),ke("parens")}for(;b.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","}"));b.output=Ke.escapeLast(b.output,"{"),ke("braces")}if(t.strictSlashes!==!0&&(E.type==="star"||E.type==="bracket")&&ee({type:"maybe_slash",value:"",output:`${m}?`}),b.backtrack===!0){b.output="";for(let j of b.tokens)b.output+=j.output!=null?j.output:j.value,j.suffix&&(b.output+=j.suffix)}return b};Wi.fastpaths=(e,n)=>{let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);e=Wa[e]||e;let{DOT_LITERAL:o,SLASH_LITERAL:s,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:u,NO_DOTS:c,NO_DOTS_SLASH:p,STAR:m,START_ANCHOR:d}=Ln.globChars(t.windows),h=t.dot?c:u,w=t.dot?p:u,k=t.capture?"":"?:",y={negated:!1,prefix:""},S=t.bash===!0?".*?":m;t.capture&&(S=`(${S})`);let L=I=>I.noglobstar===!0?S:`(${k}(?:(?!${d}${I.dot?l:o}).)*?)`,_=I=>{switch(I){case"*":return`${h}${a}${S}`;case".*":return`${o}${a}${S}`;case"*.*":return`${h}${S}${o}${a}${S}`;case"*/*":return`${h}${S}${s}${a}${w}${S}`;case"**":return h+L(t);case"**/*":return`(?:${h}${L(t)}${s})?${w}${a}${S}`;case"**/*.*":return`(?:${h}${L(t)}${s})?${w}${S}${o}${a}${S}`;case"**/.*":return`(?:${h}${L(t)}${s})?${o}${a}${S}`;default:{let N=/^(.*?)\.(\w+)$/.exec(I);if(!N)return;let v=_(N[1]);return v?v+o+N[2]:void 0}}},B=Ke.removePrefix(e,y),R=_(B);return R&&t.strictSlashes!==!0&&(R+=`${s}?`),R};Ka.exports=Wi});var Xa=it((Bw,Qa)=>{"use strict";var jd=Ua(),Vi=Ga(),Ya=Cn(),Ud=Sn(),Wd=e=>e&&typeof e=="object"&&!Array.isArray(e),Ee=(e,n,t=!1)=>{if(Array.isArray(e)){let c=e.map(m=>Ee(m,n,t));return m=>{for(let d of c){let h=d(m);if(h)return h}return!1}}let r=Wd(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=n||{},o=i.windows,s=r?Ee.compileRe(e,n):Ee.makeRe(e,n,!1,!0),a=s.state;delete s.state;let l=()=>!1;if(i.ignore){let c={...n,ignore:null,onMatch:null,onResult:null};l=Ee(i.ignore,c,t)}let u=(c,p=!1)=>{let{isMatch:m,match:d,output:h}=Ee.test(c,s,n,{glob:e,posix:o}),w={glob:e,state:a,regex:s,posix:o,input:c,output:h,match:d,isMatch:m};return typeof i.onResult=="function"&&i.onResult(w),m===!1?(w.isMatch=!1,p?w:!1):l(c)?(typeof i.onIgnore=="function"&&i.onIgnore(w),w.isMatch=!1,p?w:!1):(typeof i.onMatch=="function"&&i.onMatch(w),p?w:!0)};return t&&(u.state=a),u};Ee.test=(e,n,t,{glob:r,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let o=t||{},s=o.format||(i?Ya.toPosixSlashes:null),a=e===r,l=a&&s?s(e):e;return a===!1&&(l=s?s(e):e,a=l===r),(a===!1||o.capture===!0)&&(o.matchBase===!0||o.basename===!0?a=Ee.matchBase(e,n,t,i):a=n.exec(l)),{isMatch:!!a,match:a,output:l}};Ee.matchBase=(e,n,t,r=t&&t.windows)=>(n instanceof RegExp?n:Ee.makeRe(n,t)).test(Ya.basename(e,{windows:r}));Ee.isMatch=(e,n,t)=>Ee(n,t)(e);Ee.parse=(e,n)=>Array.isArray(e)?e.map(t=>Ee.parse(t,n)):Vi(e,{...n,fastpaths:!1});Ee.scan=(e,n)=>jd(e,n);Ee.compileRe=(e,n,t=!1,r=!1)=>{if(t===!0)return e.output;let i=n||{},o=i.contains?"":"^",s=i.contains?"":"$",a=`${o}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let l=Ee.toRegex(a,n);return r===!0&&(l.state=e),l};Ee.makeRe=(e,n={},t=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return n.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=Vi.fastpaths(e,n)),i.output||(i=Vi(e,n)),Ee.compileRe(i,n,t,r)};Ee.toRegex=(e,n)=>{try{let t=n||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(t){if(n&&n.debug===!0)throw t;return/$^/}};Ee.constants=Ud;Qa.exports=Ee});var or=it((qw,el)=>{"use strict";var Za=Xa(),Vd=Cn();function Ja(e,n,t=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:Vd.isWindows()}),Za(e,n,t)}Object.assign(Ja,Za);el.exports=Ja});var $l=it((NL,mo)=>{(function(){var e;typeof mo<"u"?e=mo.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=t,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function t(i,o){return r.apply(null,[i].concat(o))}function r(i){for(var o=1,s=[].slice.call(arguments),a=0,l=i.length,u="",c,p=!1,m,d,h=!1,w,k=function(){return s[o++]},y=function(){for(var S="";/\d/.test(i[a]);)S+=i[a++],c=i[a];return S.length>0?parseInt(S):null};a<l;++a)if(c=i[a],p)switch(p=!1,c=="."?(h=!1,c=i[++a]):c=="0"&&i[a+1]=="."?(h=!0,a+=2,c=i[a]):h=!0,w=y(),c){case"b":u+=parseInt(k(),10).toString(2);break;case"c":m=k(),typeof m=="string"||m instanceof String?u+=m:u+=String.fromCharCode(parseInt(m,10));break;case"d":u+=parseInt(k(),10);break;case"f":d=String(parseFloat(k()).toFixed(w||6)),u+=h?d:d.replace(/^0/,"");break;case"j":u+=JSON.stringify(k());break;case"o":u+="0"+parseInt(k(),10).toString(8);break;case"s":u+=k();break;case"x":u+="0x"+parseInt(k(),10).toString(16);break;case"X":u+="0x"+parseInt(k(),10).toString(16).toUpperCase();break;default:u+=c;break}else c==="%"?p=!0:u+=c;return u}})()});var Gf=Lt(Ls(),1),Yf=Lt(ms(),1);function Tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e={},Qn={},At={},As;function bn(){if(As)return At;As=1;function e(s){return typeof s>"u"||s===null}function n(s){return typeof s=="object"&&s!==null}function t(s){return Array.isArray(s)?s:e(s)?[]:[s]}function r(s,a){if(a){let l=Object.keys(a);for(let u=0,c=l.length;u<c;u+=1){let p=l[u];s[p]=a[p]}}return s}function i(s,a){let l="";for(let u=0;u<a;u+=1)l+=s;return l}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return At.isNothing=e,At.isObject=n,At.toArray=t,At.repeat=i,At.isNegativeZero=o,At.extend=r,At}var oi,Es;function kn(){if(Es)return oi;Es=1;function e(t,r){let i="",o=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!r&&t.mark.snippet&&(i+=`
|
|
7
|
+
import{a as bs}from"./H4VN2RX3.js";import{c as xs,d as ni}from"./G5N5PSW7.js";import{$ as ot,A as rm,B as im,C as om,D as sm,E as am,F as lm,G as um,H as cm,I as fm,J as pm,K as mm,Q as ls,S as us,U as cs,V as fs,W as ps,Y as ms,aa as et,ba as ze,c as $t,ea as Me,g as os,ga as ds,ia as G,ka as ti,la as hs,ma as gs,pa as xn,q as ss,u as pt,ua as ys,w as as,x as nm}from"./NPUBXOHX.js";import"./NEWT5A6S.js";import{c as it,d as tm,e as Lt}from"./RFWIIJFG.js";var ws=it(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});var dm=am(),hm=lm(),gm=um(),ym=cm(),ks=fm(),xm=[dm.default,hm.default,(0,gm.default)(),ym.default,ks.metadataVocabulary,ks.contentVocabulary];ri.default=xm});var Ss=it((tw,bm)=>{bm.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Ls=it((Se,ii)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var km=sm(),wm=ws(),Sm=pm(),Cs=Ss(),Cm=["/properties"],Yn="http://json-schema.org/draft-07/schema",Ut=class extends km.default{_addVocabularies(){super._addVocabularies(),wm.default.forEach(n=>this.addVocabulary(n)),this.opts.discriminator&&this.addKeyword(Sm.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let n=this.opts.$data?this.$dataMetaSchema(Cs,Cm):Cs;this.addMetaSchema(n,Yn,!1),this.refs["http://json-schema.org/schema"]=Yn}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Yn)?Yn:void 0)}};Se.Ajv=Ut;ii.exports=Se=Ut;ii.exports.Ajv=Ut;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=Ut;var Lm=rm();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return Lm.KeywordCxt}});var Wt=nm();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Wt._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Wt.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Wt.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Wt.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Wt.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return Wt.CodeGen}});var Am=im();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return Am.default}});var Em=om();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return Em.default}})});var Sn=it((Nw,Ma)=>{"use strict";var _a="[^\\\\/]",pd="(?=.)",Fa="[^/]",Pi="(?:\\/|$)",Oa="(?:^|\\/)",Di=`\\.{1,2}${Pi}`,md="(?!\\.)",dd=`(?!${Oa}${Di})`,hd=`(?!\\.{0,1}${Pi})`,gd=`(?!${Di})`,yd="[^.\\/]",xd=`${Fa}*?`,bd="/",Na={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:pd,QMARK:Fa,END_ANCHOR:Pi,DOTS_SLASH:Di,NO_DOT:md,NO_DOTS:dd,NO_DOT_SLASH:hd,NO_DOTS_SLASH:gd,QMARK_NO_DOT:yd,STAR:xd,START_ANCHOR:Oa,SEP:bd},kd={...Na,SLASH_LITERAL:"[\\\\/]",QMARK:_a,STAR:`${_a}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},wd={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Ma.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:wd,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?kd:Na}}});var Cn=it(je=>{"use strict";var{REGEX_BACKSLASH:Sd,REGEX_REMOVE_BACKSLASH:Cd,REGEX_SPECIAL_CHARS:Ld,REGEX_SPECIAL_CHARS_GLOBAL:Ad}=Sn();je.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);je.hasRegexChars=e=>Ld.test(e);je.isRegexChar=e=>e.length===1&&je.hasRegexChars(e);je.escapeRegex=e=>e.replace(Ad,"\\$1");je.toPosixSlashes=e=>e.replace(Sd,"/");je.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};je.removeBackslashes=e=>e.replace(Cd,n=>n==="\\"?"":n);je.escapeLast=(e,n,t)=>{let r=e.lastIndexOf(n,t);return r===-1?e:e[r-1]==="\\"?je.escapeLast(e,n,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};je.removePrefix=(e,n={})=>{let t=e;return t.startsWith("./")&&(t=t.slice(2),n.prefix="./"),t};je.wrapOutput=(e,n={},t={})=>{let r=t.contains?"":"^",i=t.contains?"":"$",o=`${r}(?:${e})${i}`;return n.negated===!0&&(o=`(?:^(?!${o}).*$)`),o};je.basename=(e,{windows:n}={})=>{let t=e.split(n?/[\\/]/:"/"),r=t[t.length-1];return r===""?t[t.length-2]:r}});var Ua=it((Pw,ja)=>{"use strict";var Pa=Cn(),{CHAR_ASTERISK:Bi,CHAR_AT:Ed,CHAR_BACKWARD_SLASH:Kt,CHAR_COMMA:Td,CHAR_DOT:qi,CHAR_EXCLAMATION_MARK:Hi,CHAR_FORWARD_SLASH:za,CHAR_LEFT_CURLY_BRACE:zi,CHAR_LEFT_PARENTHESES:rr,CHAR_LEFT_SQUARE_BRACKET:Rd,CHAR_PLUS:vd,CHAR_QUESTION_MARK:Da,CHAR_RIGHT_CURLY_BRACE:Id,CHAR_RIGHT_PARENTHESES:Ba,CHAR_RIGHT_SQUARE_BRACKET:$d}=Sn(),qa=e=>e===za||e===Kt,Ha=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},_d=(e,n)=>{let t=n||{},r=e.length-1,i=t.parts===!0||t.tokens===!0||t.scanToEnd===!0,o=[],s=[],a=[],l=e,u=-1,c=0,p=0,m=!1,d=!1,h=!1,w=!1,k=!1,y=!1,S=!1,L=!1,_=!1,B=!1,R=0,I,N,v={value:"",depth:0,isGlob:!1},b=()=>u>=r,Z=()=>l.charCodeAt(u+1),X=()=>(I=N,l.charCodeAt(++u));for(;u<r;){N=X();let re;if(N===Kt){S=v.backslashes=!0,N=X(),N===zi&&(y=!0);continue}if(y===!0||N===zi){for(R++;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===zi){R++;continue}if(y!==!0&&N===qi&&(N=X())===qi){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(y!==!0&&N===Td){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Id&&(R--,R===0)){y=!1,m=v.isBrace=!0,B=!0;break}}if(i===!0)continue;break}if(N===za){if(o.push(u),s.push(v),v={value:"",depth:0,isGlob:!1},B===!0)continue;if(I===qi&&u===c+1){c+=2;continue}p=u+1;continue}if(t.noext!==!0&&(N===vd||N===Ed||N===Bi||N===Da||N===Hi)===!0&&Z()===rr){if(h=v.isGlob=!0,w=v.isExtglob=!0,B=!0,N===Hi&&u===c&&(_=!0),i===!0){let be=0;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){be++;continue}if(N===Ba&&--be===0){B=!0;break}}continue}break}if(N===Bi){if(I===Bi&&(k=v.isGlobstar=!0),h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Da){if(h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Rd){for(;b()!==!0&&(re=X());){if(re===Kt){S=v.backslashes=!0,X();continue}if(re===$d){d=v.isBracket=!0,h=v.isGlob=!0,B=!0;break}}if(i===!0)continue;break}if(t.nonegate!==!0&&N===Hi&&u===c){L=v.negated=!0,c++;continue}if(t.noparen!==!0&&N===rr){if(h=v.isGlob=!0,i===!0){let de=1;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){de++;continue}if(N===Ba&&--de===0){B=!0;break}}continue}break}if(h===!0){if(B=!0,i===!0)continue;break}}t.noext===!0&&(w=!1,h=!1);let Y=l,E="",x="";c>0&&(E=l.slice(0,c),l=l.slice(c),p-=c),Y&&h===!0&&p>0?(Y=l.slice(0,p),x=l.slice(p)):h===!0?(Y="",x=l):Y=l,Y&&Y!==""&&Y!=="/"&&Y!==l&&qa(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),t.unescape===!0&&(x&&(x=Pa.removeBackslashes(x)),Y&&S===!0&&(Y=Pa.removeBackslashes(Y)));let P={prefix:E,input:e,start:c,base:Y,glob:x,isBrace:m,isBracket:d,isGlob:h,isExtglob:w,isGlobstar:k,negated:L,negatedExtglob:_};if(t.tokens===!0&&(P.maxDepth=0,qa(N)||s.push(v),P.tokens=s),t.parts===!0||t.tokens===!0){let re;for(let C=0;C<o.length;C++){let le=re!==void 0?re+1:c,Le=o[C],A=e.slice(le,Le);t.tokens&&(C===0&&c!==0?(s[C].isPrefix=!0,s[C].value=E):s[C].value=A,Ha(s[C]),P.maxDepth+=s[C].depth),Le>=c&&(a.push(A),re=Le)}let de=re!==void 0?re+1:c,be=e.slice(de);a.push(be),t.tokens&&re&&re+1<e.length&&(s[s.length-1].value=be,Ha(s[s.length-1]),P.maxDepth+=s[s.length-1].depth),P.slashes=o,P.parts=a}return P};ja.exports=_d});var Ga=it((Dw,Ka)=>{"use strict";var Ln=Sn(),Ke=Cn(),{MAX_LENGTH:ir,POSIX_REGEX_SOURCE:Fd,REGEX_NON_SPECIAL_CHARS:Od,REGEX_SPECIAL_CHARS_BACKREF:Nd,REPLACEMENTS:Wa}=Ln,Md=(e,n)=>{if(typeof n.expandRange=="function")return n.expandRange(...e,n);e.sort();let t=`[${e.join("-")}]`;try{new RegExp(t)}catch{return e.map(i=>Ke.escapeRegex(i)).join("..")}return t},Gt=(e,n)=>`Missing ${e}: "${n}" - use "\\\\${n}" to match literal characters`,Va=e=>{let n=[],t=0,r=0,i=0,o="",s=!1;for(let a of e){if(s===!0){o+=a,s=!1;continue}if(a==="\\"){o+=a,s=!0;continue}if(a==='"'){i=i===1?0:1,o+=a;continue}if(i===0){if(a==="[")t++;else if(a==="]"&&t>0)t--;else if(t===0){if(a==="(")r++;else if(a===")"&&r>0)r--;else if(a==="|"&&r===0){n.push(o),o="";continue}}}o+=a}return n.push(o),n},Pd=e=>{let n=!1;for(let t of e){if(n===!0){n=!1;continue}if(t==="\\"){n=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},Ui=e=>{let n=e.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(n)&&(n=n.slice(2,-1),t=!0);if(Pd(n))return n.replace(/\\(.)/g,"$1")},Dd=e=>{let n=e.map(Ui).filter(Boolean);for(let t=0;t<n.length;t++)for(let r=t+1;r<n.length;r++){let i=n[t],o=n[r],s=i[0];if(!(!s||i!==s.repeat(i.length)||o!==s.repeat(o.length))&&(i===o||i.startsWith(o)||o.startsWith(i)))return!0}return!1},ji=(e,n=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let t=0,r=0,i=0,o=!1;for(let s=1;s<e.length;s++){let a=e[s];if(o===!0){o=!1;continue}if(a==="\\"){o=!0;continue}if(a==='"'){i=i===1?0:1;continue}if(i!==1){if(a==="["){t++;continue}if(a==="]"&&t>0){t--;continue}if(!(t>0)){if(a==="("){r++;continue}if(a===")"&&(r--,r===0))return n===!0&&s!==e.length-1?void 0:{type:e[0],body:e.slice(2,s),end:s}}}}},Bd=e=>`${e.length===1?Ke.escapeRegex(e[0]):`[${e.map(t=>Ke.escapeRegex(t)).join("")}]`}*`,qd=e=>{let n=0,t=[];for(;n<e.length;){let r=ji(e.slice(n),!1);if(!r||r.type!=="*")return;let i=Va(r.body).map(s=>s.trim());if(i.length!==1)return;let o=Ui(i[0]);if(!o||o.length!==1)return;t.push(o),n+=r.end+1}if(!(t.length<1))return t},Hd=e=>{let n=0,t=e.trim(),r=ji(t);for(;r;)n++,t=r.body.trim(),r=ji(t);return n},zd=(e,n)=>{if(n.maxExtglobRecursion===!1)return{risky:!1};let t=typeof n.maxExtglobRecursion=="number"?n.maxExtglobRecursion:Ln.DEFAULT_MAX_EXTGLOB_RECURSION,r=Va(e).map(a=>a.trim());if(r.length>1&&(r.some(a=>a==="")||r.some(a=>/^[*?]+$/.test(a))||Dd(r)))return{risky:!0};let i=[],o=!1,s=!0;for(let a of r){let l=qd(a);if(l){o=!0,i.push(...l);continue}let u=Ui(a);if(u&&u.length===1){i.push(u);continue}if(s=!1,Hd(a)>t)return{risky:!0}}return o?s?{risky:!0,safeOutput:Bd([...new Set(i)])}:{risky:!0}:{risky:!1}},Wi=(e,n)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Wa[e]||e;let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let o={type:"bos",value:"",output:t.prepend||""},s=[o],a=t.capture?"":"?:",l=Ln.globChars(t.windows),u=Ln.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:p,SLASH_LITERAL:m,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:w,NO_DOT_SLASH:k,NO_DOTS_SLASH:y,QMARK:S,QMARK_NO_DOT:L,STAR:_,START_ANCHOR:B}=l,R=j=>`(${a}(?:(?!${B}${j.dot?h:c}).)*?)`,I=t.dot?"":w,N=t.dot?S:L,v=t.bash===!0?R(t):_;t.capture&&(v=`(${v})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let b={input:e,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=Ke.removePrefix(e,b),i=e.length;let Z=[],X=[],Y=[],E=o,x,P=()=>b.index===i-1,re=b.peek=(j=1)=>e[b.index+j],de=b.advance=()=>e[++b.index]||"",be=()=>e.slice(b.index+1),C=(j="",ge=0)=>{b.consumed+=j,b.index+=ge},le=j=>{b.output+=j.output!=null?j.output:j.value,C(j.value)},Le=()=>{let j=1;for(;re()==="!"&&(re(2)!=="("||re(3)==="?");)de(),b.start++,j++;return j%2===0?!1:(b.negated=!0,b.start++,!0)},A=j=>{b[j]++,Y.push(j)},ke=j=>{b[j]--,Y.pop()},ee=j=>{if(E.type==="globstar"){let ge=b.braces>0&&(j.type==="comma"||j.type==="brace"),z=j.extglob===!0||Z.length&&(j.type==="pipe"||j.type==="paren");j.type!=="slash"&&j.type!=="paren"&&!ge&&!z&&(b.output=b.output.slice(0,-E.output.length),E.type="star",E.value="*",E.output=v,b.output+=E.output)}if(Z.length&&j.type!=="paren"&&(Z[Z.length-1].inner+=j.value),(j.value||j.output)&&le(j),E&&E.type==="text"&&j.type==="text"){E.output=(E.output||E.value)+j.value,E.value+=j.value;return}j.prev=E,s.push(j),E=j},$e=(j,ge)=>{let z={...u[ge],conditions:1,inner:""};z.prev=E,z.parens=b.parens,z.output=b.output,z.startIndex=b.index,z.tokensIndex=s.length;let oe=(t.capture?"(":"")+z.open;A("parens"),ee({type:j,value:ge,output:b.output?"":d}),ee({type:"paren",extglob:!0,value:de(),output:oe}),Z.push(z)},Qe=j=>{let ge=e.slice(j.startIndex,b.index+1),z=e.slice(j.startIndex+2,b.index),oe=zd(z,t);if((j.type==="plus"||j.type==="star")&&oe.risky){let ye=oe.safeOutput?(j.output?"":d)+(t.capture?`(${oe.safeOutput})`:oe.safeOutput):void 0,Oe=s[j.tokensIndex];Oe.type="text",Oe.value=ge,Oe.output=ye||Ke.escapeRegex(ge);for(let Xe=j.tokensIndex+1;Xe<s.length;Xe++)s[Xe].value="",s[Xe].output="",delete s[Xe].suffix;b.output=j.output+Oe.output,b.backtrack=!0,ee({type:"paren",extglob:!0,value:x,output:""}),ke("parens");return}let he=j.close+(t.capture?")":""),we;if(j.type==="negate"){let ye=v;if(j.inner&&j.inner.length>1&&j.inner.includes("/")&&(ye=R(t)),(ye!==v||P()||/^\)+$/.test(be()))&&(he=j.close=`)$))${ye}`),j.inner.includes("*")&&(we=be())&&/^\.[^\\/.]+$/.test(we)){let Oe=Wi(we,{...n,fastpaths:!1}).output;he=j.close=`)${Oe})${ye})`}j.prev.type==="bos"&&(b.negatedExtglob=!0)}ee({type:"paren",extglob:!0,value:x,output:he}),ke("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let j=!1,ge=e.replace(Nd,(z,oe,he,we,ye,Oe)=>we==="\\"?(j=!0,z):we==="?"?oe?oe+we+(ye?S.repeat(ye.length):""):Oe===0?N+(ye?S.repeat(ye.length):""):S.repeat(he.length):we==="."?c.repeat(he.length):we==="*"?oe?oe+we+(ye?v:""):v:oe?z:`\\${z}`);return j===!0&&(t.unescape===!0?ge=ge.replace(/\\/g,""):ge=ge.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),ge===e&&t.contains===!0?(b.output=e,b):(b.output=Ke.wrapOutput(ge,b,n),b)}for(;!P();){if(x=de(),x==="\0")continue;if(x==="\\"){let z=re();if(z==="/"&&t.bash!==!0||z==="."||z===";")continue;if(!z){x+="\\",ee({type:"text",value:x});continue}let oe=/^\\+/.exec(be()),he=0;if(oe&&oe[0].length>2&&(he=oe[0].length,b.index+=he,he%2!==0&&(x+="\\")),t.unescape===!0?x=de():x+=de(),b.brackets===0){ee({type:"text",value:x});continue}}if(b.brackets>0&&(x!=="]"||E.value==="["||E.value==="[^")){if(t.posix!==!1&&x===":"){let z=E.value.slice(1);if(z.includes("[")&&(E.posix=!0,z.includes(":"))){let oe=E.value.lastIndexOf("["),he=E.value.slice(0,oe),we=E.value.slice(oe+2),ye=Fd[we];if(ye){E.value=he+ye,b.backtrack=!0,de(),!o.output&&s.indexOf(E)===1&&(o.output=d);continue}}}(x==="["&&re()!==":"||x==="-"&&re()==="]")&&(x=`\\${x}`),x==="]"&&(E.value==="["||E.value==="[^")&&(x=`\\${x}`),t.posix===!0&&x==="!"&&E.value==="["&&(x="^"),E.value+=x,le({value:x});continue}if(b.quotes===1&&x!=='"'){x=Ke.escapeRegex(x),E.value+=x,le({value:x});continue}if(x==='"'){b.quotes=b.quotes===1?0:1,t.keepQuotes===!0&&ee({type:"text",value:x});continue}if(x==="("){A("parens"),ee({type:"paren",value:x});continue}if(x===")"){if(b.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Gt("opening","("));let z=Z[Z.length-1];if(z&&b.parens===z.parens+1){Qe(Z.pop());continue}ee({type:"paren",value:x,output:b.parens?")":"\\)"}),ke("parens");continue}if(x==="["){if(t.nobracket===!0||!be().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));x=`\\${x}`}else A("brackets");ee({type:"bracket",value:x});continue}if(x==="]"){if(t.nobracket===!0||E&&E.type==="bracket"&&E.value.length===1){ee({type:"text",value:x,output:`\\${x}`});continue}if(b.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Gt("opening","["));ee({type:"text",value:x,output:`\\${x}`});continue}ke("brackets");let z=E.value.slice(1);if(E.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(x=`/${x}`),E.value+=x,le({value:x}),t.literalBrackets===!1||Ke.hasRegexChars(z))continue;let oe=Ke.escapeRegex(E.value);if(b.output=b.output.slice(0,-E.value.length),t.literalBrackets===!0){b.output+=oe,E.value=oe;continue}E.value=`(${a}${oe}|${E.value})`,b.output+=E.value;continue}if(x==="{"&&t.nobrace!==!0){A("braces");let z={type:"brace",value:x,output:"(",outputIndex:b.output.length,tokensIndex:b.tokens.length};X.push(z),ee(z);continue}if(x==="}"){let z=X[X.length-1];if(t.nobrace===!0||!z){ee({type:"text",value:x,output:x});continue}let oe=")";if(z.dots===!0){let he=s.slice(),we=[];for(let ye=he.length-1;ye>=0&&(s.pop(),he[ye].type!=="brace");ye--)he[ye].type!=="dots"&&we.unshift(he[ye].value);oe=Md(we,t),b.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let he=b.output.slice(0,z.outputIndex),we=b.tokens.slice(z.tokensIndex);z.value=z.output="\\{",x=oe="\\}",b.output=he;for(let ye of we)b.output+=ye.output||ye.value}ee({type:"brace",value:x,output:oe}),ke("braces"),X.pop();continue}if(x==="|"){Z.length>0&&Z[Z.length-1].conditions++,ee({type:"text",value:x});continue}if(x===","){let z=x,oe=X[X.length-1];oe&&Y[Y.length-1]==="braces"&&(oe.comma=!0,z="|"),ee({type:"comma",value:x,output:z});continue}if(x==="/"){if(E.type==="dot"&&b.index===b.start+1){b.start=b.index+1,b.consumed="",b.output="",s.pop(),E=o;continue}ee({type:"slash",value:x,output:m});continue}if(x==="."){if(b.braces>0&&E.type==="dot"){E.value==="."&&(E.output=c);let z=X[X.length-1];E.type="dots",E.output+=x,E.value+=x,z.dots=!0;continue}if(b.braces+b.parens===0&&E.type!=="bos"&&E.type!=="slash"){ee({type:"text",value:x,output:c});continue}ee({type:"dot",value:x,output:c});continue}if(x==="?"){if(!(E&&E.value==="(")&&t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("qmark",x);continue}if(E&&E.type==="paren"){let oe=re(),he=x;(E.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(be()))&&(he=`\\${x}`),ee({type:"text",value:x,output:he});continue}if(t.dot!==!0&&(E.type==="slash"||E.type==="bos")){ee({type:"qmark",value:x,output:L});continue}ee({type:"qmark",value:x,output:S});continue}if(x==="!"){if(t.noextglob!==!0&&re()==="("&&(re(2)!=="?"||!/[!=<:]/.test(re(3)))){$e("negate",x);continue}if(t.nonegate!==!0&&b.index===0){Le();continue}}if(x==="+"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("plus",x);continue}if(E&&E.value==="("||t.regex===!1){ee({type:"plus",value:x,output:p});continue}if(E&&(E.type==="bracket"||E.type==="paren"||E.type==="brace")||b.parens>0){ee({type:"plus",value:x});continue}ee({type:"plus",value:p});continue}if(x==="@"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){ee({type:"at",extglob:!0,value:x,output:""});continue}ee({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let z=Od.exec(be());z&&(x+=z[0],b.index+=z[0].length),ee({type:"text",value:x});continue}if(E&&(E.type==="globstar"||E.star===!0)){E.type="star",E.star=!0,E.value+=x,E.output=v,b.backtrack=!0,b.globstar=!0,C(x);continue}let j=be();if(t.noextglob!==!0&&/^\([^?]/.test(j)){$e("star",x);continue}if(E.type==="star"){if(t.noglobstar===!0){C(x);continue}let z=E.prev,oe=z.prev,he=z.type==="slash"||z.type==="bos",we=oe&&(oe.type==="star"||oe.type==="globstar");if(t.bash===!0&&(!he||j[0]&&j[0]!=="/")){ee({type:"star",value:x,output:""});continue}let ye=b.braces>0&&(z.type==="comma"||z.type==="brace"),Oe=Z.length&&(z.type==="pipe"||z.type==="paren");if(!he&&z.type!=="paren"&&!ye&&!Oe){ee({type:"star",value:x,output:""});continue}for(;j.slice(0,3)==="/**";){let Ne=e[b.index+4];if(Ne&&Ne!=="/")break;j=j.slice(3),C("/**",3)}let Xe=P()||b.parens>0&&j===")".repeat(b.parens)&&!Z.some(Ne=>Ne.type==="negate");if(z.type==="bos"&&P()){E.type="globstar",E.value+=x,E.output=R(t),b.output=E.output,b.globstar=!0,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!we&&Xe){b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=R(t)+(t.strictSlashes?")":"|$)"),E.value+=x,b.globstar=!0,b.output+=z.output+E.output,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&j[0]==="/"){let Ne=j[1]!==void 0?"|$":"";b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=`${R(t)}${m}|${m}${Ne})`,E.value+=x,b.output+=z.output+E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&j[0]==="/"){E.type="globstar",E.value+=x,E.output=`(?:^|${m}|${R(t)}${m})`,b.output=E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}b.output=b.output.slice(0,-E.output.length),E.type="globstar",E.output=R(t),E.value+=x,b.output+=E.output,b.globstar=!0,C(x);continue}let ge={type:"star",value:x,output:v};if(t.bash===!0){ge.output=".*?",(E.type==="bos"||E.type==="slash")&&(ge.output=I+ge.output),ee(ge);continue}if(E&&(E.type==="bracket"||E.type==="paren")&&t.regex===!0){ge.output=x,ee(ge);continue}(b.index===b.start||E.type==="slash"||E.type==="dot")&&(E.type==="dot"?(b.output+=k,E.output+=k):t.dot===!0?(b.output+=y,E.output+=y):(b.output+=I,E.output+=I),re()!=="*"&&(b.output+=d,E.output+=d)),ee(ge)}for(;b.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));b.output=Ke.escapeLast(b.output,"["),ke("brackets")}for(;b.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing",")"));b.output=Ke.escapeLast(b.output,"("),ke("parens")}for(;b.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","}"));b.output=Ke.escapeLast(b.output,"{"),ke("braces")}if(t.strictSlashes!==!0&&(E.type==="star"||E.type==="bracket")&&ee({type:"maybe_slash",value:"",output:`${m}?`}),b.backtrack===!0){b.output="";for(let j of b.tokens)b.output+=j.output!=null?j.output:j.value,j.suffix&&(b.output+=j.suffix)}return b};Wi.fastpaths=(e,n)=>{let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);e=Wa[e]||e;let{DOT_LITERAL:o,SLASH_LITERAL:s,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:u,NO_DOTS:c,NO_DOTS_SLASH:p,STAR:m,START_ANCHOR:d}=Ln.globChars(t.windows),h=t.dot?c:u,w=t.dot?p:u,k=t.capture?"":"?:",y={negated:!1,prefix:""},S=t.bash===!0?".*?":m;t.capture&&(S=`(${S})`);let L=I=>I.noglobstar===!0?S:`(${k}(?:(?!${d}${I.dot?l:o}).)*?)`,_=I=>{switch(I){case"*":return`${h}${a}${S}`;case".*":return`${o}${a}${S}`;case"*.*":return`${h}${S}${o}${a}${S}`;case"*/*":return`${h}${S}${s}${a}${w}${S}`;case"**":return h+L(t);case"**/*":return`(?:${h}${L(t)}${s})?${w}${a}${S}`;case"**/*.*":return`(?:${h}${L(t)}${s})?${w}${S}${o}${a}${S}`;case"**/.*":return`(?:${h}${L(t)}${s})?${o}${a}${S}`;default:{let N=/^(.*?)\.(\w+)$/.exec(I);if(!N)return;let v=_(N[1]);return v?v+o+N[2]:void 0}}},B=Ke.removePrefix(e,y),R=_(B);return R&&t.strictSlashes!==!0&&(R+=`${s}?`),R};Ka.exports=Wi});var Xa=it((Bw,Qa)=>{"use strict";var jd=Ua(),Vi=Ga(),Ya=Cn(),Ud=Sn(),Wd=e=>e&&typeof e=="object"&&!Array.isArray(e),Ee=(e,n,t=!1)=>{if(Array.isArray(e)){let c=e.map(m=>Ee(m,n,t));return m=>{for(let d of c){let h=d(m);if(h)return h}return!1}}let r=Wd(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=n||{},o=i.windows,s=r?Ee.compileRe(e,n):Ee.makeRe(e,n,!1,!0),a=s.state;delete s.state;let l=()=>!1;if(i.ignore){let c={...n,ignore:null,onMatch:null,onResult:null};l=Ee(i.ignore,c,t)}let u=(c,p=!1)=>{let{isMatch:m,match:d,output:h}=Ee.test(c,s,n,{glob:e,posix:o}),w={glob:e,state:a,regex:s,posix:o,input:c,output:h,match:d,isMatch:m};return typeof i.onResult=="function"&&i.onResult(w),m===!1?(w.isMatch=!1,p?w:!1):l(c)?(typeof i.onIgnore=="function"&&i.onIgnore(w),w.isMatch=!1,p?w:!1):(typeof i.onMatch=="function"&&i.onMatch(w),p?w:!0)};return t&&(u.state=a),u};Ee.test=(e,n,t,{glob:r,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let o=t||{},s=o.format||(i?Ya.toPosixSlashes:null),a=e===r,l=a&&s?s(e):e;return a===!1&&(l=s?s(e):e,a=l===r),(a===!1||o.capture===!0)&&(o.matchBase===!0||o.basename===!0?a=Ee.matchBase(e,n,t,i):a=n.exec(l)),{isMatch:!!a,match:a,output:l}};Ee.matchBase=(e,n,t,r=t&&t.windows)=>(n instanceof RegExp?n:Ee.makeRe(n,t)).test(Ya.basename(e,{windows:r}));Ee.isMatch=(e,n,t)=>Ee(n,t)(e);Ee.parse=(e,n)=>Array.isArray(e)?e.map(t=>Ee.parse(t,n)):Vi(e,{...n,fastpaths:!1});Ee.scan=(e,n)=>jd(e,n);Ee.compileRe=(e,n,t=!1,r=!1)=>{if(t===!0)return e.output;let i=n||{},o=i.contains?"":"^",s=i.contains?"":"$",a=`${o}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let l=Ee.toRegex(a,n);return r===!0&&(l.state=e),l};Ee.makeRe=(e,n={},t=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return n.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=Vi.fastpaths(e,n)),i.output||(i=Vi(e,n)),Ee.compileRe(i,n,t,r)};Ee.toRegex=(e,n)=>{try{let t=n||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(t){if(n&&n.debug===!0)throw t;return/$^/}};Ee.constants=Ud;Qa.exports=Ee});var or=it((qw,el)=>{"use strict";var Za=Xa(),Vd=Cn();function Ja(e,n,t=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:Vd.isWindows()}),Za(e,n,t)}Object.assign(Ja,Za);el.exports=Ja});var $l=it((NL,mo)=>{(function(){var e;typeof mo<"u"?e=mo.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=t,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function t(i,o){return r.apply(null,[i].concat(o))}function r(i){for(var o=1,s=[].slice.call(arguments),a=0,l=i.length,u="",c,p=!1,m,d,h=!1,w,k=function(){return s[o++]},y=function(){for(var S="";/\d/.test(i[a]);)S+=i[a++],c=i[a];return S.length>0?parseInt(S):null};a<l;++a)if(c=i[a],p)switch(p=!1,c=="."?(h=!1,c=i[++a]):c=="0"&&i[a+1]=="."?(h=!0,a+=2,c=i[a]):h=!0,w=y(),c){case"b":u+=parseInt(k(),10).toString(2);break;case"c":m=k(),typeof m=="string"||m instanceof String?u+=m:u+=String.fromCharCode(parseInt(m,10));break;case"d":u+=parseInt(k(),10);break;case"f":d=String(parseFloat(k()).toFixed(w||6)),u+=h?d:d.replace(/^0/,"");break;case"j":u+=JSON.stringify(k());break;case"o":u+="0"+parseInt(k(),10).toString(8);break;case"s":u+=k();break;case"x":u+="0x"+parseInt(k(),10).toString(16);break;case"X":u+="0x"+parseInt(k(),10).toString(16).toUpperCase();break;default:u+=c;break}else c==="%"?p=!0:u+=c;return u}})()});var Gf=Lt(Ls(),1),Yf=Lt(ms(),1);function Tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e={},Qn={},At={},As;function bn(){if(As)return At;As=1;function e(s){return typeof s>"u"||s===null}function n(s){return typeof s=="object"&&s!==null}function t(s){return Array.isArray(s)?s:e(s)?[]:[s]}function r(s,a){if(a){let l=Object.keys(a);for(let u=0,c=l.length;u<c;u+=1){let p=l[u];s[p]=a[p]}}return s}function i(s,a){let l="";for(let u=0;u<a;u+=1)l+=s;return l}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return At.isNothing=e,At.isObject=n,At.toArray=t,At.repeat=i,At.isNegativeZero=o,At.extend=r,At}var oi,Es;function kn(){if(Es)return oi;Es=1;function e(t,r){let i="",o=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!r&&t.mark.snippet&&(i+=`
|
|
8
8
|
|
|
9
9
|
`+t.mark.snippet),o+" "+i):o}function n(t,r){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=r,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(r){return this.name+": "+e(this,r)},oi=n,oi}var si,Ts;function Rm(){if(Ts)return si;Ts=1;let e=bn();function n(i,o,s,a,l){let u="",c="",p=Math.floor(l/2)-1;return a-o>p&&(u=" ... ",o=a-p+u.length),s-a>p&&(c=" ...",s=a+p-c.length),{str:u+i.slice(o,s).replace(/\t/g,"\u2192")+c,pos:a-o+u.length}}function t(i,o){return e.repeat(" ",o-i.length)+i}function r(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],l=[],u,c=-1;for(;u=s.exec(i.buffer);)l.push(u.index),a.push(u.index+u[0].length),i.position<=u.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);let p="",m=Math.min(i.line+o.linesAfter,l.length).toString().length,d=o.maxLength-(o.indent+m+3);for(let w=1;w<=o.linesBefore&&!(c-w<0);w++){let k=n(i.buffer,a[c-w],l[c-w],i.position-(a[c]-a[c-w]),d);p=e.repeat(" ",o.indent)+t((i.line-w+1).toString(),m)+" | "+k.str+`
|
|
10
10
|
`+p}let h=n(i.buffer,a[c],l[c],i.position,d);p+=e.repeat(" ",o.indent)+t((i.line+1).toString(),m)+" | "+h.str+`
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as o,b as t,c as e}from"./HBUZKWXC.js";import{ia as r}from"./
|
|
7
|
+
import{a as o,b as t,c as e}from"./HBUZKWXC.js";import{ia as r}from"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as p}from"node:child_process";var u=async({argv:n})=>{r.info(`
|
|
8
8
|
Launching translate using NPX.
|
|
9
9
|
|
|
10
10
|
`);let{npxExecutableName:s,sanitize:a,shell:i}=e(),l=a(n["project-dir"],o),c=a(n.locale,t);p(s,["-y","@redocly/realm","translate",c,`-d=${l}`],{stdio:"inherit",shell:i}).on("error",m=>{throw r.info(`Translate launch failed: ${m.message}`),new Error("Translate launch failed.")})};export{u as handleTranslations};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{b as A,c as F,d as S,e as l}from"./
|
|
7
|
+
import{b as A,c as F,d as S,e as l}from"./5EHONRHV.js";import"./NL4BJZLQ.js";import{e as $,g as x,n as I,o as P}from"./4K56BI6R.js";import{f as p}from"./G5N5PSW7.js";import"./GKXY6U4S.js";import{aa as w,ia as n,l as u}from"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function O({argv:t,config:o,version:c}){let h=performance.now(),j=Date.now(),{organization:g,project:d,"mount-path":z,verbose:D}=t,f=t.domain||x(),e,r,y,b,s=[];try{let i=$();if(e=P(t.files,(a,T)=>{n.warn(`File ${a} is overwritten by ${T}
|
|
8
8
|
`)}),!e.length)return p("push",h,"No files to upload");let m=await I({domain:f,apiKey:i,organization:g,project:d,mountPath:z,files:e,defaultBranch:t["default-branch"],commit:{message:t.message,branchName:t.branch,sha:t["commit-sha"],url:t["commit-url"],createdAt:t["created-at"],namespace:t.namespace,repository:t.repository,author:U(t.author)},version:c,replace:t.replace,onUploadStart:a=>{n.info(`Uploading to ${a.mountPath} ${e.length} ${u("file",e.length)}:
|
|
9
9
|
`)},onSunsetWarning:a=>s.push(a),onSlugDeprecated:S});r=m.pushId,y=m.organizationId,b=m.projectId}catch(i){l("push",s),F("\u2717 File upload failed.",i)}for(let i of e)n.info(w(`\u2713 ${i.name}
|
|
10
10
|
`));return n.info(`
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a,b,c,d,e}from"./
|
|
7
|
+
import{a,b,c,d,e}from"./NZ5FSYRJ.js";import"./NR3R4HFM.js";import"./B3XVDFWU.js";import"./MASJ2JX2.js";import"./WZXA5XPB.js";import"./NPUBXOHX.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
|