@redocly/cli 0.0.0-snapshot.1785856098 → 0.0.0-snapshot.1785935173

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/THIRD_PARTY_NOTICES +4 -4
  2. package/lib/chunks/{BNMX4BYY.js → 4VEC5QQ5.js} +1 -1
  3. package/lib/chunks/{7GZL3NWE.js → 53K3ZVCM.js} +86 -86
  4. package/lib/chunks/{XDIXVUAG.js → 7K6PYPKL.js} +1 -1
  5. package/lib/chunks/BCPSMPMX.js +8 -0
  6. package/lib/chunks/BXI4SF2U.js +59 -0
  7. package/lib/chunks/CF4MVP77.js +2542 -0
  8. package/lib/chunks/{X6BAHJ7F.js → CHVKBAVV.js} +7 -7
  9. package/lib/chunks/{U5ZBDK6A.js → D5ZEYUAL.js} +1 -1
  10. package/lib/chunks/{64UKKAAA.js → HHO7IWOY.js} +1 -1
  11. package/lib/chunks/{ODLD5SFN.js → IFK6ZEAO.js} +1 -1
  12. package/lib/chunks/{75FSLHZK.js → JK66AU25.js} +1 -1
  13. package/lib/chunks/{ZF56BNML.js → KIILLIDR.js} +1 -1
  14. package/lib/chunks/{Y2HODN7E.js → NPU7UXK3.js} +122 -122
  15. package/lib/chunks/{GM7Y7TL7.js → O7RBWPJT.js} +1 -1
  16. package/lib/chunks/{HTEE2OWV.js → SCYQIGUP.js} +1 -1
  17. package/lib/chunks/{HR42VWLX.js → SMB572YO.js} +1 -1
  18. package/lib/chunks/{LZ3SSARF.js → U2QTS6KO.js} +1 -1
  19. package/lib/chunks/{VULVMZ5T.js → UHQJTZST.js} +1 -1
  20. package/lib/chunks/{BRVSCPSD.js → Y2L4DX4K.js} +1 -1
  21. package/lib/chunks/{CXZNUC37.js → YULFUHLK.js} +1 -1
  22. package/lib/index.js +183 -214
  23. package/package.json +1 -1
  24. package/lib/chunks/3GFYSU6P.js +0 -7
  25. package/lib/chunks/3XBPOSEL.js +0 -9
  26. package/lib/chunks/5JBNN43P.js +0 -9
  27. package/lib/chunks/5UTAQHOL.js +0 -15
  28. package/lib/chunks/6LLNYQRK.js +0 -12
  29. package/lib/chunks/BRCHLWGE.js +0 -839
  30. package/lib/chunks/BTWR6W7P.js +0 -8
  31. package/lib/chunks/CIMA4SX2.js +0 -25
  32. package/lib/chunks/ECCIW547.js +0 -8
  33. package/lib/chunks/EG5RJVOK.js +0 -7
  34. package/lib/chunks/EJAVSZVD.js +0 -7
  35. package/lib/chunks/HAFKSMGA.js +0 -7
  36. package/lib/chunks/HAQDKIT7.js +0 -164
  37. package/lib/chunks/HPQ5ND2D.js +0 -26
  38. package/lib/chunks/HXNNCRLT.js +0 -12
  39. package/lib/chunks/IV2TJDNV.js +0 -41
  40. package/lib/chunks/KITREDQN.js +0 -2212
  41. package/lib/chunks/NRJNLKVZ.js +0 -871
  42. package/lib/chunks/NV6XILNR.js +0 -21
  43. package/lib/chunks/O6MCQRCP.js +0 -59
  44. package/lib/chunks/OAHVR5VG.js +0 -7
  45. package/lib/chunks/OH2TOYQZ.js +0 -460
  46. package/lib/chunks/PSMLR5SA.js +0 -11
  47. package/lib/chunks/UKQECL5J.js +0 -7
  48. package/lib/chunks/VCDLRBVW.js +0 -53
  49. package/lib/chunks/WYW7554L.js +0 -517
  50. package/lib/chunks/XNPM2Q3S.js +0 -9
  51. package/lib/chunks/YSMUBJCG.js +0 -7
  52. package/lib/chunks/ZOVFANDY.js +0 -9
  53. package/lib/eject-assets/AGENTS.md +0 -82
  54. package/lib/eject-assets/generators/go.AGENTS.md +0 -50
  55. package/lib/eject-assets/generators/go.mjs +0 -679
  56. package/lib/eject-assets/generators/php.AGENTS.md +0 -76
  57. package/lib/eject-assets/generators/php.mjs +0 -689
  58. package/lib/eject-assets/generators/python.AGENTS.md +0 -53
  59. package/lib/eject-assets/generators/python.mjs +0 -635
@@ -574,7 +574,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
574
574
  BSD-3-Clause
575
575
 
576
576
  Packages:
577
- fast-uri@3.1.4 — Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
577
+ fast-uri@3.1.5 — Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
578
578
  source-map@0.6.1 — Copyright (c) 2009-2011, Mozilla Foundation and contributors
579
579
 
580
580
  License text:
@@ -647,7 +647,7 @@ Packages:
647
647
  @noble/hashes@1.8.0 — Copyright (c) 2022 Paul Miller (https://paulmillr.com)
648
648
  @redocly/ajv@8.11.2 — Copyright (c) 2015-2021 Evgeny Poberezkin
649
649
  @redocly/ajv@8.18.3 — Copyright (c) 2015-2021 Evgeny Poberezkin
650
- @redocly/cli-otel@0.3.4 — Copyright 2025 Redocly Inc, all rights reserved.
650
+ @redocly/cli-otel@0.3.5 — Copyright 2025 Redocly Inc, all rights reserved.
651
651
  @redocly/config@0.22.0 — Copyright 2024 Redocly Inc.
652
652
  @redocly/config@0.53.1 — Copyright 2024 Redocly Inc.
653
653
  @redocly/openapi-core@1.34.18
@@ -656,7 +656,7 @@ Packages:
656
656
  ajv@8.20.0 — Copyright (c) 2015-2021 Evgeny Poberezkin
657
657
  ansi-styles@4.3.0
658
658
  balanced-match@1.0.2 — Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
659
- brace-expansion@2.1.3 — Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
659
+ brace-expansion@2.1.4 — Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
660
660
  call-me-maybe@1.0.2 — Copyright (c) 2015 Eric McCarthy
661
661
  chalk@4.1.2
662
662
  classnames@2.5.1 — Copyright (c) 2018 Jed Watson
@@ -711,7 +711,7 @@ Packages:
711
711
  supports-color@7.2.0
712
712
  ulid@2.4.0 — Copyright (c) 2017 Alizain Feerasta
713
713
  ulid@3.0.2 — Copyright (c) 2017 Alizain Feerasta
714
- undici@6.27.0 — Copyright (c) Matteo Collina and Undici contributors
714
+ undici@6.28.0 — Copyright (c) Matteo Collina and Undici contributors
715
715
  uri-js-replace@1.0.1
716
716
  use-sync-external-store@1.6.0 — Copyright (c) Meta Platforms, Inc. and affiliates.
717
717
  yargs@17.0.1 — Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com)
@@ -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 I}from"./O6MCQRCP.js";import{c as p}from"./P26PQ2RU.js";import{a as O}from"./RS5PUOTT.js";import{a as R}from"./XDIXVUAG.js";import{G as T,I as w,O as a}from"./7GZL3NWE.js";import{e as C}from"./RFWIIJFG.js";import{Buffer as P}from"node:buffer";import y from"node:crypto";import{mkdirSync as j,existsSync as F,writeFileSync as q,readFileSync as z,rmSync as M}from"node:fs";import{homedir as H}from"node:os";import B from"node:path";var l={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function G(){return process.env.REDOCLY_DOMAIN||l.us}var U=D((o,e)=>{try{let t=e||o?.resolvedConfig.residency;return W(t)?l[t]:t?new URL(t).origin:o?.resolvedConfig.scorecard?.fromProjectUrl?new URL(o.resolvedConfig.scorecard.fromProjectUrl).origin:l.us}catch{throw new f}});function x(o){try{U(void 0,o)}catch{return!1}return!0}function D(o){return(...e)=>{let t=o(...e);if(!t.startsWith("https://"))throw new f;return t}}var f=class extends Error{constructor(){super("Invalid Reunite URL")}};function W(o){return typeof o=="string"&&o in l}import*as k from"node:child_process";var g=C(I(),1);var N=C(O(),1);function b(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function S(o){let e=process.env.NO_PROXY||process.env.no_proxy;if(!e)return!1;let t=e.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!1;let r;try{r=new URL(o).hostname.toLowerCase()}catch{return!1}return t.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var _=async(o,{timeout:e,...t}={})=>{let r=b(),s=r&&!S(o),n,i=e?{connect:{timeout:e}}:{};return s?n=new g.ProxyAgent({uri:r,...i}):e&&(n=new g.Agent(i)),await fetch(o,{signal:e?AbortSignal.timeout(e):void 0,...t,dispatcher:n})};var c=class extends Error{constructor(t,r){super(t);this.status=r}status},h=class{constructor(e){this.command=e}command;sunsetWarnings=[];async request(e,t){let r={...t.headers,"user-agent":`redocly-cli/${R} ${this.command}`};try{let s=await _(e,{...t,headers:r});return this.collectSunsetWarning(s),s}catch(s){let n="Failed to fetch.";throw s.cause&&(n+=` Caused by ${s.cause.message||s.cause.name}.`),(s.code||s.cause?.code)&&(n+=` Code: ${s.code||s.cause?.code}`),new Error(n)}}collectSunsetWarning(e){let t=this.getSunsetDate(e);if(!t)return;let r=new Date(t);t>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(e){let{headers:t}=e;if(!t)return;let r=t.get("sunset")||t.get("Sunset");if(r)return Date.parse(r)}},v=class{constructor(e,t,r){this.client=e;this.domain=t;this.apiKey=r}client;domain;apiKey;async getParsedResponse(e){let t=await e.json();if(e.ok)return t;throw new c(`${t.title||e.statusText||"Unknown error"}.`,e.status)}async getDefaultBranch(e,t){try{let r=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/source`,{timeout:p,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 c?new c(s,r.status):new Error(s)}}async upsert(e,t,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes`,{timeout:p,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 n=`Failed to upsert remote. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async push(e,t,r,s){let n=new globalThis.FormData;n.append("remoteId",r.remoteId),n.append("commit[message]",r.commit.message),n.append("commit[author][name]",r.commit.author.name),n.append("commit[author][email]",r.commit.author.email),n.append("commit[branchName]",r.commit.branchName),r.commit.url&&n.append("commit[url]",r.commit.url),r.commit.namespace&&n.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&n.append("commit[sha]",r.commit.sha),r.commit.repository&&n.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&n.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let u=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await L(i.stream)]);n.append(`files[${i.path}]`,u,i.path)}r.isMainBranch&&n.append("isMainBranch","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:n});return await this.getParsedResponse(i)}catch(i){let u=`Failed to push. ${i.message}`;throw i instanceof c?new c(u,i.status):new Error(u)}}async getRemotesList({organizationId:e,projectId:t,mountPath:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes?filter=mountPath:/${r}/`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get remote list. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async getPush({organizationId:e,projectId:t,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes/${r}`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get push status. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}},$=class{apiClient;command;remotes;constructor({domain:e,apiKey:t,command:r}){this.command=r,this.apiClient=new h(this.command),this.remotes=new v(this.apiClient,e,t)}reportSunsetWarnings(){let e=this.apiClient.sunsetWarnings;if(e.length){let[{isSunsetExpired:t,sunsetDate:r}]=e.sort((n,i)=>n.isSunsetExpired!==i.isSunsetExpired?n.isSunsetExpired?-1:1:n.sunsetDate>i.sunsetDate?1:-1),s='Update to the latest version by running "npm install @redocly/cli@latest".';t?a.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${s}
7
+ import{c as p}from"./P26PQ2RU.js";import{a as O}from"./RS5PUOTT.js";import{a as R}from"./7K6PYPKL.js";import{a as I}from"./BXI4SF2U.js";import{G as T,I as w,O as a}from"./53K3ZVCM.js";import{e as C}from"./RFWIIJFG.js";import{Buffer as P}from"node:buffer";import y from"node:crypto";import{mkdirSync as j,existsSync as F,writeFileSync as q,readFileSync as z,rmSync as M}from"node:fs";import{homedir as H}from"node:os";import B from"node:path";var l={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function G(){return process.env.REDOCLY_DOMAIN||l.us}var U=D((o,e)=>{try{let t=e||o?.resolvedConfig.residency;return W(t)?l[t]:t?new URL(t).origin:o?.resolvedConfig.scorecard?.fromProjectUrl?new URL(o.resolvedConfig.scorecard.fromProjectUrl).origin:l.us}catch{throw new f}});function x(o){try{U(void 0,o)}catch{return!1}return!0}function D(o){return(...e)=>{let t=o(...e);if(!t.startsWith("https://"))throw new f;return t}}var f=class extends Error{constructor(){super("Invalid Reunite URL")}};function W(o){return typeof o=="string"&&o in l}import*as k from"node:child_process";var g=C(I(),1);var N=C(O(),1);function b(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function S(o){let e=process.env.NO_PROXY||process.env.no_proxy;if(!e)return!1;let t=e.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!1;let r;try{r=new URL(o).hostname.toLowerCase()}catch{return!1}return t.some(s=>!!(s==="*"||r===s||s.startsWith(".")&&r.endsWith(s)||!s.startsWith(".")&&r.endsWith("."+s)))}var _=async(o,{timeout:e,...t}={})=>{let r=b(),s=r&&!S(o),n,i=e?{connect:{timeout:e}}:{};return s?n=new g.ProxyAgent({uri:r,...i}):e&&(n=new g.Agent(i)),await fetch(o,{signal:e?AbortSignal.timeout(e):void 0,...t,dispatcher:n})};var c=class extends Error{constructor(t,r){super(t);this.status=r}status},h=class{constructor(e){this.command=e}command;sunsetWarnings=[];async request(e,t){let r={...t.headers,"user-agent":`redocly-cli/${R} ${this.command}`};try{let s=await _(e,{...t,headers:r});return this.collectSunsetWarning(s),s}catch(s){let n="Failed to fetch.";throw s.cause&&(n+=` Caused by ${s.cause.message||s.cause.name}.`),(s.code||s.cause?.code)&&(n+=` Code: ${s.code||s.cause?.code}`),new Error(n)}}collectSunsetWarning(e){let t=this.getSunsetDate(e);if(!t)return;let r=new Date(t);t>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(e){let{headers:t}=e;if(!t)return;let r=t.get("sunset")||t.get("Sunset");if(r)return Date.parse(r)}},v=class{constructor(e,t,r){this.client=e;this.domain=t;this.apiKey=r}client;domain;apiKey;async getParsedResponse(e){let t=await e.json();if(e.ok)return t;throw new c(`${t.title||e.statusText||"Unknown error"}.`,e.status)}async getDefaultBranch(e,t){try{let r=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/source`,{timeout:p,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 c?new c(s,r.status):new Error(s)}}async upsert(e,t,r){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes`,{timeout:p,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 n=`Failed to upsert remote. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async push(e,t,r,s){let n=new globalThis.FormData;n.append("remoteId",r.remoteId),n.append("commit[message]",r.commit.message),n.append("commit[author][name]",r.commit.author.name),n.append("commit[author][email]",r.commit.author.email),n.append("commit[branchName]",r.commit.branchName),r.commit.url&&n.append("commit[url]",r.commit.url),r.commit.namespace&&n.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&n.append("commit[sha]",r.commit.sha),r.commit.repository&&n.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&n.append("commit[createdAt]",r.commit.createdAt);for(let i of s){let u=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await L(i.stream)]);n.append(`files[${i.path}]`,u,i.path)}r.isMainBranch&&n.append("isMainBranch","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:n});return await this.getParsedResponse(i)}catch(i){let u=`Failed to push. ${i.message}`;throw i instanceof c?new c(u,i.status):new Error(u)}}async getRemotesList({organizationId:e,projectId:t,mountPath:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/remotes?filter=mountPath:/${r}/`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get remote list. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}async getPush({organizationId:e,projectId:t,pushId:r}){try{let s=await this.client.request(`${this.domain}/api/orgs/${e}/projects/${t}/pushes/${r}`,{timeout:p,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(s)}catch(s){let n=`Failed to get push status. ${s.message}`;throw s instanceof c?new c(n,s.status):new Error(n)}}},$=class{apiClient;command;remotes;constructor({domain:e,apiKey:t,command:r}){this.command=r,this.apiClient=new h(this.command),this.remotes=new v(this.apiClient,e,t)}reportSunsetWarnings(){let e=this.apiClient.sunsetWarnings;if(e.length){let[{isSunsetExpired:t,sunsetDate:r}]=e.sort((n,i)=>n.isSunsetExpired!==i.isSunsetExpired?n.isSunsetExpired?-1:1:n.sunsetDate>i.sunsetDate?1:-1),s='Update to the latest version by running "npm install @redocly/cli@latest".';t?a.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${s}
8
8
 
9
9
  `):a.warn(`The "${this.command}" command will be incompatible with your version of Redocly CLI after ${r.toLocaleString()}. ${s}
10
10