@redocly/cli 2.71.1 → 2.72.0

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 (161) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES +29 -7
  3. package/lib/chunks/{Q3IJURM3.js → 2DXUH2SS.js} +1 -1
  4. package/lib/chunks/{UYZXI3NO.js → 2X2KHSF3.js} +1 -1
  5. package/lib/chunks/{CX76LEFC.js → 42X6IAVM.js} +1 -1
  6. package/lib/chunks/44US4AGQ.js +13 -0
  7. package/lib/chunks/{DP3T6VZX.js → 4AXMK6B2.js} +1 -1
  8. package/lib/chunks/4ZCKAKVF.js +199 -0
  9. package/lib/chunks/5F7XFPS7.js +8 -0
  10. package/lib/chunks/{WJ3YDHQA.js → 6234PJEZ.js} +1 -1
  11. package/lib/chunks/{TNRIBQHV.js → 62SOICN7.js} +1 -1
  12. package/lib/chunks/{BPSWCUZE.js → 6JFL6L56.js} +1 -1
  13. package/lib/chunks/{NEWT5A6S.js → 6RTITFQA.js} +1 -1
  14. package/lib/chunks/{2IUGP2IH.js → 6XDKNFYM.js} +3 -3
  15. package/lib/chunks/{IYV7EO2J.js → 76AJ5P4Y.js} +1 -1
  16. package/lib/chunks/{6TCEQRVX.js → 7HTKK26B.js} +1 -1
  17. package/lib/chunks/{BXXX3ZCV.js → A7XJ7Y3N.js} +1 -1
  18. package/lib/chunks/AB4FYNJN.js +22 -0
  19. package/lib/chunks/BJ6Z66KZ.js +7 -0
  20. package/lib/chunks/{3N7LKSDD.js → BL2KWYMY.js} +1 -1
  21. package/lib/chunks/{PBQOGZ5C.js → BTLP7Z6A.js} +1 -1
  22. package/lib/chunks/{5DW3QRJB.js → BXMYSHQY.js} +2 -2
  23. package/lib/chunks/{ILYXMZRT.js → BY22HEXP.js} +1 -1
  24. package/lib/chunks/D2BBHPMR.js +7 -0
  25. package/lib/chunks/{ACAPGKSR.js → D3C6XIMY.js} +3 -3
  26. package/lib/chunks/{INGAWMLB.js → DNDYWJHC.js} +1 -1
  27. package/lib/chunks/{KJIUDCYZ.js → E6QTRG6I.js} +1 -1
  28. package/lib/chunks/EHMG7I34.js +9 -0
  29. package/lib/chunks/{MH5X2EVH.js → EL6MGCYE.js} +1 -1
  30. package/lib/chunks/EVCSNWMN.js +7 -0
  31. package/lib/chunks/{RBNQC5ZB.js → FJBULQ4P.js} +1 -1
  32. package/lib/chunks/{Y5DDX2MU.js → FLL7MTDS.js} +1 -1
  33. package/lib/chunks/{X7C43UBI.js → FM7Y6KMP.js} +1 -1
  34. package/lib/chunks/{ZQTHHPK3.js → FMMOQ6SE.js} +2 -2
  35. package/lib/chunks/{FBEEMKTB.js → FRC2YJS4.js} +1 -1
  36. package/lib/chunks/{5SSWNONM.js → GHJGHHQP.js} +1 -1
  37. package/lib/chunks/{CHX7O5AM.js → GKPSJEG5.js} +1 -1
  38. package/lib/chunks/{TN3JQHMS.js → GMMFZFKJ.js} +1 -1
  39. package/lib/chunks/{DVLD4FET.js → GW4PLLFM.js} +1 -1
  40. package/lib/chunks/{L2O63VRM.js → HIMEF7J2.js} +1 -1
  41. package/lib/chunks/{Y3LDWYZD.js → HJ5KS42K.js} +1 -1
  42. package/lib/chunks/{IZMDARCL.js → HXOTKK2E.js} +1 -1
  43. package/lib/chunks/{HBWCMTP3.js → IFGXTL5P.js} +1 -1
  44. package/lib/chunks/{NLAPR7D4.js → IHUHQ7PO.js} +1 -1
  45. package/lib/chunks/{EO65RJ4Z.js → IJYEZR53.js} +1 -1
  46. package/lib/chunks/{BOWZV5S6.js → IKSSZYHA.js} +1 -1
  47. package/lib/chunks/{QZJAXPYF.js → IMNPDC6N.js} +1 -1
  48. package/lib/chunks/{25RSTUQA.js → IO7M7MGV.js} +1 -1
  49. package/lib/chunks/{QXHFS5G6.js → J3TXBQDL.js} +1 -1
  50. package/lib/chunks/{7HFLPQAB.js → JZV7EL4R.js} +1 -1
  51. package/lib/chunks/{2NYYNBAC.js → K6HV4EJS.js} +1 -1
  52. package/lib/chunks/{WLI2XLEP.js → KVXVR5Y4.js} +33 -33
  53. package/lib/chunks/{RNA6JDRC.js → L4HVZOFP.js} +1 -1
  54. package/lib/chunks/{WCJ2HAN3.js → L5AG5NJZ.js} +1 -1
  55. package/lib/chunks/{ZBB6PS6I.js → LTJXST6M.js} +1 -1
  56. package/lib/chunks/MO6NEDYO.js +17 -0
  57. package/lib/chunks/{S6W63XAS.js → NDECHUWV.js} +1 -1
  58. package/lib/chunks/{XZIK3H6V.js → NFGCHP5P.js} +1 -1
  59. package/lib/chunks/{W2CABGMW.js → NNBSSORJ.js} +1 -1
  60. package/lib/chunks/{XGPGFZMH.js → OLAN2CVV.js} +1 -1
  61. package/lib/chunks/{TZROZMVE.js → OOKU5T7P.js} +7 -7
  62. package/lib/chunks/{DURXFJ7H.js → OQRUWVII.js} +1 -1
  63. package/lib/chunks/{HWOL3HHR.js → Q5WCA45H.js} +8 -8
  64. package/lib/chunks/{HAGYQ4BK.js → QGKTPGO7.js} +1 -1
  65. package/lib/chunks/{UMN7TKTH.js → QQ2PGWE6.js} +2 -2
  66. package/lib/chunks/QYBWIG5Y.js +59 -0
  67. package/lib/chunks/{CJWIDJTB.js → RC4LK3ZS.js} +2 -2
  68. package/lib/chunks/{O53IFFP3.js → RL2EIWFM.js} +1 -1
  69. package/lib/chunks/{5BQNATJZ.js → RQMFL6Q4.js} +1 -1
  70. package/lib/chunks/S3B562IT.js +7 -0
  71. package/lib/chunks/{EQOFXQKD.js → SPIFPTTE.js} +1 -1
  72. package/lib/chunks/SUQ7ZWYJ.js +7 -0
  73. package/lib/chunks/{BE4Z5FOC.js → TFPMT2XD.js} +1603 -16
  74. package/lib/chunks/{AH6ANNYP.js → TVUYXOSQ.js} +1 -1
  75. package/lib/chunks/{ACECCMWJ.js → UFDBFVRI.js} +1 -1
  76. package/lib/chunks/UH4Q6U6X.js +7 -0
  77. package/lib/chunks/{YL3LVBZF.js → UKVHQIBO.js} +1 -1
  78. package/lib/chunks/{4DUOPCYP.js → VF2YOZ3U.js} +1 -1
  79. package/lib/chunks/{6ZNJ7RDX.js → VO775J6V.js} +2 -2
  80. package/lib/chunks/WKBXTA7Y.js +53 -0
  81. package/lib/chunks/{RUPTJCF5.js → WRGAJXOK.js} +1 -1
  82. package/lib/chunks/{EBHQXW6Z.js → XKENZH7W.js} +1 -1
  83. package/lib/chunks/{B5SUTVG4.js → YB52VXMW.js} +1 -1
  84. package/lib/chunks/{G6SB4ZP5.js → ZSQF6YOF.js} +1 -1
  85. package/lib/chunks/{54EKLNNI.js → ZYHLWT2C.js} +1 -1
  86. package/lib/eject-assets/AGENTS.md +1 -1
  87. package/lib/eject-assets/generators/cli/docs.ts +1 -1
  88. package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
  89. package/lib/eject-assets/generators/cli/index.ts +2 -2
  90. package/lib/eject-assets/generators/cli/render.ts +1 -1
  91. package/lib/eject-assets/generators/go/client.ts +1 -1
  92. package/lib/eject-assets/generators/go/descriptor.ts +1 -1
  93. package/lib/eject-assets/generators/go/index.ts +2 -2
  94. package/lib/eject-assets/generators/go/models.ts +1 -1
  95. package/lib/eject-assets/generators/go/naming.ts +1 -1
  96. package/lib/eject-assets/generators/go/operations.ts +1 -1
  97. package/lib/eject-assets/generators/go/pagination.ts +1 -1
  98. package/lib/eject-assets/generators/go/types.ts +1 -1
  99. package/lib/eject-assets/generators/java/client.ts +66 -0
  100. package/lib/eject-assets/generators/java/descriptor.ts +72 -0
  101. package/lib/eject-assets/generators/java/index.ts +245 -0
  102. package/lib/eject-assets/generators/java/models.ts +362 -0
  103. package/lib/eject-assets/generators/java/naming.ts +135 -0
  104. package/lib/eject-assets/generators/java/operations.ts +300 -0
  105. package/lib/eject-assets/generators/java/pagination.ts +94 -0
  106. package/lib/eject-assets/generators/java/types.ts +103 -0
  107. package/lib/eject-assets/generators/mock/faker.ts +1 -1
  108. package/lib/eject-assets/generators/mock/index.ts +2 -2
  109. package/lib/eject-assets/generators/mock/render.ts +1 -1
  110. package/lib/eject-assets/generators/mock/sample.ts +1 -1
  111. package/lib/eject-assets/generators/mock/values.ts +1 -1
  112. package/lib/eject-assets/generators/php/client.ts +1 -1
  113. package/lib/eject-assets/generators/php/descriptor.ts +1 -1
  114. package/lib/eject-assets/generators/php/index.ts +2 -2
  115. package/lib/eject-assets/generators/php/models.ts +1 -1
  116. package/lib/eject-assets/generators/php/naming.ts +1 -1
  117. package/lib/eject-assets/generators/php/operations.ts +1 -1
  118. package/lib/eject-assets/generators/php/pagination.ts +1 -1
  119. package/lib/eject-assets/generators/php/types.ts +1 -1
  120. package/lib/eject-assets/generators/python/client.ts +1 -1
  121. package/lib/eject-assets/generators/python/descriptor.ts +1 -1
  122. package/lib/eject-assets/generators/python/index.ts +2 -2
  123. package/lib/eject-assets/generators/python/models.ts +1 -1
  124. package/lib/eject-assets/generators/python/naming.ts +1 -1
  125. package/lib/eject-assets/generators/python/operations.ts +1 -1
  126. package/lib/eject-assets/generators/python/pagination.ts +1 -1
  127. package/lib/eject-assets/generators/python/types.ts +1 -1
  128. package/lib/eject-assets/generators/swr/index.ts +2 -2
  129. package/lib/eject-assets/generators/swr/render.ts +1 -1
  130. package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
  131. package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
  132. package/lib/eject-assets/generators/transformers/index.ts +2 -2
  133. package/lib/eject-assets/generators/transformers/render.ts +1 -1
  134. package/lib/eject-assets/generators/typescript/banner.ts +1 -1
  135. package/lib/eject-assets/generators/typescript/client.ts +1 -1
  136. package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
  137. package/lib/eject-assets/generators/typescript/index.ts +2 -2
  138. package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
  139. package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
  140. package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
  141. package/lib/eject-assets/generators/typescript/operations.ts +1 -1
  142. package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
  143. package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
  144. package/lib/eject-assets/generators/typescript/types.ts +1 -1
  145. package/lib/eject-assets/generators/zod/index.ts +2 -2
  146. package/lib/eject-assets/generators/zod/schemas.ts +1 -1
  147. package/lib/eject-assets/skills/client-generators/SKILL.md +1 -1
  148. package/lib/eject-assets/skills/java-generator/SKILL.md +161 -0
  149. package/lib/index.js +91 -90
  150. package/lib/skills/redocly-cli/SKILL.md +3 -1
  151. package/package.json +1 -1
  152. package/lib/chunks/DORXGE7Z.js +0 -199
  153. package/lib/chunks/EAFZ6DNQ.js +0 -53
  154. package/lib/chunks/FGJDZKD2.js +0 -13
  155. package/lib/chunks/GAKWND4S.js +0 -8
  156. package/lib/chunks/JOWPA3MJ.js +0 -7
  157. package/lib/chunks/RBJCAITC.js +0 -9
  158. package/lib/chunks/RNL7TC2W.js +0 -17
  159. package/lib/chunks/U5DIFWGH.js +0 -7
  160. package/lib/chunks/U7KIB7CD.js +0 -7
  161. package/lib/chunks/V34D5CUU.js +0 -7
@@ -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{fa as r}from"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as p}from"node:child_process";var u=async({argv:n})=>{r.info(`
7
+ import{a as o,b as t,c as e}from"./HBUZKWXC.js";import{ka as r}from"./4ZCKAKVF.js";import"./6RTITFQA.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{a as q}from"./DURXFJ7H.js";import{A as _,h as H,l as B,v as z,x as K,y as V,z as Z}from"./AH6ANNYP.js";import"./KFQC57GK.js";import{b as J,d as M,e as Y,v as L}from"./CHX7O5AM.js";import{$ as b,S as N,W as v,Y as O,Z as A,_ as j,ba as y,ca as C,da as R,fa as e,k as h,la as w,ma as D,ra as S,ua as g}from"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{dirname as le}from"node:path";function W(r,t,o,n){n&&e.info(C(v(`
7
+ import{a as q}from"./OQRUWVII.js";import{A as _,h as H,l as B,v as z,x as K,y as V,z as Z}from"./TVUYXOSQ.js";import"./KFQC57GK.js";import{b as J,d as M,e as Y,v as L}from"./GKPSJEG5.js";import{$ as v,X as N,ba as O,ca as A,da as j,ea as b,ga as y,ha as C,ia as R,k as h,ka as e,qa as w,ra as D,wa as S,za as g}from"./4ZCKAKVF.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";import{dirname as le}from"node:path";function W(r,t,o,n){n&&e.info(C(v(`
8
8
  \u2611\uFE0F Achieved Level: ${y(o)}
9
9
 
10
10
  `))),e.output(`<?xml version="1.0" encoding="UTF-8"?>
@@ -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 $,e as T,o as E,p as F,r as I,t as L,v as m}from"./CHX7O5AM.js";import{$ as w,da as l,fa as n,k as x,ma as h,sa as A,ta as g,va as k}from"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as O}from"perf_hooks";async function X({argv:e,config:t,version:u,collectSpecData:P,collectResults:R}){let c=await $(e.apis,t),r={errors:0,warnings:0,ignored:0},p=0,b=e.format==="checkstyle"||e.format==="junit",y=[];for(let{path:o,alias:f}of c)try{let d=O.now(),s=t.forAlias(f);L(s.rules),s.skipRules(e["skip-rule"]),s.skipPreprocessors(e["skip-preprocessor"]),typeof t.document?.parsed>"u"&&!e.extends&&n.info(`No configurations were provided -- using built in ${w("recommended")} configuration by default.
7
+ import{b as $,e as T,o as E,p as F,r as I,t as L,v as m}from"./GKPSJEG5.js";import{Aa as k,ea as w,ia as l,k as x,ka as n,ra as h,xa as A,ya as g}from"./4ZCKAKVF.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";import{performance as O}from"perf_hooks";async function X({argv:e,config:t,version:u,collectSpecData:P,collectResults:R}){let c=await $(e.apis,t),r={errors:0,warnings:0,ignored:0},p=0,b=e.format==="checkstyle"||e.format==="junit",y=[];for(let{path:o,alias:f}of c)try{let d=O.now(),s=t.forAlias(f);L(s.rules),s.skipRules(e["skip-rule"]),s.skipPreprocessors(e["skip-preprocessor"]),typeof t.document?.parsed>"u"&&!e.extends&&n.info(`No configurations were provided -- using built in ${w("recommended")} configuration by default.
8
8
 
9
9
  `),f===void 0?n.info(l(`validating ${m(o)}...
10
10
  `)):n.info(l(`validating ${m(o)} using lint rules for api '${f}'...
@@ -0,0 +1,17 @@
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 k,b as E,c as I,d as v}from"./Q5WCA45H.js";import{a as O}from"./XKENZH7W.js";import{c as d,d as F}from"./5F7XFPS7.js";import{f as A}from"./GKPSJEG5.js";import{$ as C,ba as R,ca as $,da as S,ga as b,ka as s,qa as g,ra as M}from"./4ZCKAKVF.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";import{mkdir as V,writeFile as W}from"node:fs/promises";import _ from"node:path";import{performance as q}from"node:perf_hooks";var T=20;function B(e){return e.total===0?void 0:Math.floor(e.covered/e.total*100)}function z(e){return e===void 0?"n/a":`${e}%`}function J(e,o){let t=e===void 0?0:Math.floor(e/100*T),r=`${"\u2588".repeat(t)}${"\u2591".repeat(T-t)}`;return!o||e===void 0?r:e>=80?$(r):e>=50?S(r):R(r)}function P(e,o){let t=[["operations",e.totals.operations],["parameters",e.totals.parameters],["schema properties",e.totals.properties],["response codes",e.totals.responses]],r=Math.max(...t.map(([,c])=>`${c.covered}/${c.total}`.length)),n="API coverage",a=[o?C(b(n)):n];for(let[c,i]of t){let f=B(i);a.push(` ${c.padEnd(18)} ${J(f,o)} ${z(f).padStart(5)} ${`${i.covered}/${i.total}`.padStart(r+3)}`)}return`${a.join(`
8
+ `)}
9
+ `}function L(e,o){let t={version:1,meta:{...o,exchanges:e.exchanges},totals:e.totals,operations:e.operations};return`${JSON.stringify(t,null,2)}
10
+ `}async function j(e){let o=await F(e.trafficPath);if(o.length===0)throw new Error("No traffic files found in the provided traffic path.");let t=E.create({openApiIndex:e.openApiIndex,matchMode:e.matchMode,ignoreCookies:e.ignoreCookies,ignoreHeaders:e.ignoreHeaders,previewFindingsLimit:e.previewFindingsLimit,activeRules:e.activeRules,server:e.server,minSeverity:e.minSeverity,coverage:e.coverage}),r=0,n=0;for(let a of o){let c=await O(a,e.format);if(!c){s.warn(`Skipping traffic file with unrecognized format: ${a}
11
+ `);continue}r+=1;for await(let i of c.parse(a))await t.process({...i,index:n}),n+=1}if(r===0)throw new Error("No supported traffic files found. In auto mode, files must match built-in traffic parser signatures.");if(n===0)throw new Error("No HTTP exchanges were parsed from the provided traffic files.");return t.finalize()}var N=!!process.stdout.isTTY&&process.env.NO_COLOR===void 0;function Y(e){let o=new Set;for(let t of e.operationsByMethod.values())for(let r of t)for(let n of r.servers)o.add(n.rawUrl);return Array.from(o).sort()}function G(e,o,t){let r=e.totalExchanges-e.skippedExchanges;if(r===0&&e.skippedExchanges>0){s.warn(`All ${e.skippedExchanges} exchange(s) were outside the --server "${t}" and were skipped. Check that the server matches the traffic URLs.
12
+ `);return}if(e.documentedExchanges>0||r===0)return;let n=Y(o),a=t?`Check that the --server "${t}" matches the traffic URLs and that the description paths align with the remainder.`:e.hostCompatibleExchanges===r?`The traffic hosts are compatible with the description servers (${n.join(", ")}), so the endpoints are likely undocumented; if they should be documented, check that the description base paths and paths align with the traffic URLs, or use --server to declare the server the traffic was captured against.`:`Check that the traffic host and base path match the description servers (${n.join(", ")}), or use --server to declare the server the traffic was captured against.`;s.warn(`None of the ${r} validated exchange(s) matched a documented operation. ${a}
13
+ `)}async function U(e,o){let t=d(e);await V(_.dirname(t),{recursive:!0}),await W(t,o,"utf8")}async function ue({argv:e,config:o}){let t=q.now(),r=d(e.traffic),n=e["traffic-format"],a=e.rules?v(e.rules):void 0,c=e["ignore-headers"]?v(e["ignore-headers"]):void 0,i=e.server;if(i&&e["match-mode"])throw new g("The --server and --match-mode options are mutually exclusive: --match-mode controls how requests are located via the description servers, while --server replaces the description servers with the one the traffic was captured against.");let f=e["match-mode"]??"strict-host",p=d(e.api),u=await I(p,o);if(u.loadedOperations===0)throw new g(`No OpenAPI operations were loaded from: ${p}`);let h=e["coverage-output"],{runId:D,summary:l,findings:H,coverage:m}=await j({trafficPath:r,format:n,matchMode:f,ignoreCookies:e["ignore-cookies"],ignoreHeaders:c,previewFindingsLimit:e["max-findings"],activeRules:a,openApiIndex:u,server:i,minSeverity:e["min-severity"],coverage:e.coverage||h!==void 0});G(l,u,i);let w=k({runId:D,summary:l,findings:H,meta:{specSource:p,trafficPath:r,format:n,matchMode:f,server:i}},{format:e["report-format"],color:N&&e["report-format"]==="pretty"&&!e.output,maxFindings:e["max-findings"]});e.output?(await U(e.output,w),s.info(`Drift report written to: ${d(e.output)}
14
+ `)):s.output(w);let x=e["report-format"]!=="pretty"&&!e.output;if(e.coverage&&m){let y=P(m,N&&!x);x?s.info(`
15
+ ${y}`):s.output(`
16
+ ${y}`)}if(h&&m&&(await U(h,L(m,{spec:p,traffic:r,matchMode:f,server:i})),s.info(`Coverage report written to: ${d(h)}
17
+ `)),A("drift",t,e.api),l.findingsBySeverity.error>0)throw new M("Drift detected.")}export{ue as handleDrift};
@@ -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"./NLAPR7D4.js";import{a as b,d as A,e as E,g as O,t as B,u as h}from"./AH6ANNYP.js";import{f as I}from"./CHX7O5AM.js";import{Y as v,Z as j,_ as u,aa as c,ba as d,fa as a,l,la as m}from"./DORXGE7Z.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})
7
+ import{a as F}from"./IHUHQ7PO.js";import{a as b,d as A,e as E,g as O,t as B,u as h}from"./TVUYXOSQ.js";import{f as I}from"./GKPSJEG5.js";import{ba as v,ca as j,da as u,fa as c,ga as d,ka as a,l,qa as m}from"./4ZCKAKVF.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{d as L}from"./BE4Z5FOC.js";import{b as $,c as w,d as M,f as D,g as q,h as B,i as _,j as F,k as U}from"./IYV7EO2J.js";import{d as k,f as C,h as P,i as j,m as A}from"./DP3T6VZX.js";import{h as T,j as E}from"./UMN7TKTH.js";import{o as f,q as b,r as N,s as I,u as v}from"./ACAPGKSR.js";import{join as x}from"node:path";var d="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function S(e){return e.filter(t=>t.length>0).join(`
7
+ import{e as L}from"./TFPMT2XD.js";import{b as $,c as w,d as M,f as D,g as q,h as B,i as _,j as F,k as U}from"./76AJ5P4Y.js";import{h as T,j as E}from"./QQ2PGWE6.js";import{d as k,f as C,h as P,i as j,m as A}from"./4AXMK6B2.js";import{o as f,q as b,r as N,s as I,u as v}from"./D3C6XIMY.js";import{join as x}from"node:path";var d="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function S(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 A(j(e.description)))t.push(` * ${n}`.replace(/ +$/,""));return t.push(" */"),t.join(`