@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.
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES +29 -7
- package/lib/chunks/{Q3IJURM3.js → 2DXUH2SS.js} +1 -1
- package/lib/chunks/{UYZXI3NO.js → 2X2KHSF3.js} +1 -1
- package/lib/chunks/{CX76LEFC.js → 42X6IAVM.js} +1 -1
- package/lib/chunks/44US4AGQ.js +13 -0
- package/lib/chunks/{DP3T6VZX.js → 4AXMK6B2.js} +1 -1
- package/lib/chunks/4ZCKAKVF.js +199 -0
- package/lib/chunks/5F7XFPS7.js +8 -0
- package/lib/chunks/{WJ3YDHQA.js → 6234PJEZ.js} +1 -1
- package/lib/chunks/{TNRIBQHV.js → 62SOICN7.js} +1 -1
- package/lib/chunks/{BPSWCUZE.js → 6JFL6L56.js} +1 -1
- package/lib/chunks/{NEWT5A6S.js → 6RTITFQA.js} +1 -1
- package/lib/chunks/{2IUGP2IH.js → 6XDKNFYM.js} +3 -3
- package/lib/chunks/{IYV7EO2J.js → 76AJ5P4Y.js} +1 -1
- package/lib/chunks/{6TCEQRVX.js → 7HTKK26B.js} +1 -1
- package/lib/chunks/{BXXX3ZCV.js → A7XJ7Y3N.js} +1 -1
- package/lib/chunks/AB4FYNJN.js +22 -0
- package/lib/chunks/BJ6Z66KZ.js +7 -0
- package/lib/chunks/{3N7LKSDD.js → BL2KWYMY.js} +1 -1
- package/lib/chunks/{PBQOGZ5C.js → BTLP7Z6A.js} +1 -1
- package/lib/chunks/{5DW3QRJB.js → BXMYSHQY.js} +2 -2
- package/lib/chunks/{ILYXMZRT.js → BY22HEXP.js} +1 -1
- package/lib/chunks/D2BBHPMR.js +7 -0
- package/lib/chunks/{ACAPGKSR.js → D3C6XIMY.js} +3 -3
- package/lib/chunks/{INGAWMLB.js → DNDYWJHC.js} +1 -1
- package/lib/chunks/{KJIUDCYZ.js → E6QTRG6I.js} +1 -1
- package/lib/chunks/EHMG7I34.js +9 -0
- package/lib/chunks/{MH5X2EVH.js → EL6MGCYE.js} +1 -1
- package/lib/chunks/EVCSNWMN.js +7 -0
- package/lib/chunks/{RBNQC5ZB.js → FJBULQ4P.js} +1 -1
- package/lib/chunks/{Y5DDX2MU.js → FLL7MTDS.js} +1 -1
- package/lib/chunks/{X7C43UBI.js → FM7Y6KMP.js} +1 -1
- package/lib/chunks/{ZQTHHPK3.js → FMMOQ6SE.js} +2 -2
- package/lib/chunks/{FBEEMKTB.js → FRC2YJS4.js} +1 -1
- package/lib/chunks/{5SSWNONM.js → GHJGHHQP.js} +1 -1
- package/lib/chunks/{CHX7O5AM.js → GKPSJEG5.js} +1 -1
- package/lib/chunks/{TN3JQHMS.js → GMMFZFKJ.js} +1 -1
- package/lib/chunks/{DVLD4FET.js → GW4PLLFM.js} +1 -1
- package/lib/chunks/{L2O63VRM.js → HIMEF7J2.js} +1 -1
- package/lib/chunks/{Y3LDWYZD.js → HJ5KS42K.js} +1 -1
- package/lib/chunks/{IZMDARCL.js → HXOTKK2E.js} +1 -1
- package/lib/chunks/{HBWCMTP3.js → IFGXTL5P.js} +1 -1
- package/lib/chunks/{NLAPR7D4.js → IHUHQ7PO.js} +1 -1
- package/lib/chunks/{EO65RJ4Z.js → IJYEZR53.js} +1 -1
- package/lib/chunks/{BOWZV5S6.js → IKSSZYHA.js} +1 -1
- package/lib/chunks/{QZJAXPYF.js → IMNPDC6N.js} +1 -1
- package/lib/chunks/{25RSTUQA.js → IO7M7MGV.js} +1 -1
- package/lib/chunks/{QXHFS5G6.js → J3TXBQDL.js} +1 -1
- package/lib/chunks/{7HFLPQAB.js → JZV7EL4R.js} +1 -1
- package/lib/chunks/{2NYYNBAC.js → K6HV4EJS.js} +1 -1
- package/lib/chunks/{WLI2XLEP.js → KVXVR5Y4.js} +33 -33
- package/lib/chunks/{RNA6JDRC.js → L4HVZOFP.js} +1 -1
- package/lib/chunks/{WCJ2HAN3.js → L5AG5NJZ.js} +1 -1
- package/lib/chunks/{ZBB6PS6I.js → LTJXST6M.js} +1 -1
- package/lib/chunks/MO6NEDYO.js +17 -0
- package/lib/chunks/{S6W63XAS.js → NDECHUWV.js} +1 -1
- package/lib/chunks/{XZIK3H6V.js → NFGCHP5P.js} +1 -1
- package/lib/chunks/{W2CABGMW.js → NNBSSORJ.js} +1 -1
- package/lib/chunks/{XGPGFZMH.js → OLAN2CVV.js} +1 -1
- package/lib/chunks/{TZROZMVE.js → OOKU5T7P.js} +7 -7
- package/lib/chunks/{DURXFJ7H.js → OQRUWVII.js} +1 -1
- package/lib/chunks/{HWOL3HHR.js → Q5WCA45H.js} +8 -8
- package/lib/chunks/{HAGYQ4BK.js → QGKTPGO7.js} +1 -1
- package/lib/chunks/{UMN7TKTH.js → QQ2PGWE6.js} +2 -2
- package/lib/chunks/QYBWIG5Y.js +59 -0
- package/lib/chunks/{CJWIDJTB.js → RC4LK3ZS.js} +2 -2
- package/lib/chunks/{O53IFFP3.js → RL2EIWFM.js} +1 -1
- package/lib/chunks/{5BQNATJZ.js → RQMFL6Q4.js} +1 -1
- package/lib/chunks/S3B562IT.js +7 -0
- package/lib/chunks/{EQOFXQKD.js → SPIFPTTE.js} +1 -1
- package/lib/chunks/SUQ7ZWYJ.js +7 -0
- package/lib/chunks/{BE4Z5FOC.js → TFPMT2XD.js} +1603 -16
- package/lib/chunks/{AH6ANNYP.js → TVUYXOSQ.js} +1 -1
- package/lib/chunks/{ACECCMWJ.js → UFDBFVRI.js} +1 -1
- package/lib/chunks/UH4Q6U6X.js +7 -0
- package/lib/chunks/{YL3LVBZF.js → UKVHQIBO.js} +1 -1
- package/lib/chunks/{4DUOPCYP.js → VF2YOZ3U.js} +1 -1
- package/lib/chunks/{6ZNJ7RDX.js → VO775J6V.js} +2 -2
- package/lib/chunks/WKBXTA7Y.js +53 -0
- package/lib/chunks/{RUPTJCF5.js → WRGAJXOK.js} +1 -1
- package/lib/chunks/{EBHQXW6Z.js → XKENZH7W.js} +1 -1
- package/lib/chunks/{B5SUTVG4.js → YB52VXMW.js} +1 -1
- package/lib/chunks/{G6SB4ZP5.js → ZSQF6YOF.js} +1 -1
- package/lib/chunks/{54EKLNNI.js → ZYHLWT2C.js} +1 -1
- package/lib/eject-assets/AGENTS.md +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 +1 -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/java/client.ts +66 -0
- package/lib/eject-assets/generators/java/descriptor.ts +72 -0
- package/lib/eject-assets/generators/java/index.ts +245 -0
- package/lib/eject-assets/generators/java/models.ts +362 -0
- package/lib/eject-assets/generators/java/naming.ts +135 -0
- package/lib/eject-assets/generators/java/operations.ts +300 -0
- package/lib/eject-assets/generators/java/pagination.ts +94 -0
- package/lib/eject-assets/generators/java/types.ts +103 -0
- 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 +1 -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 +1 -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 +1 -1
- 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/client-generators/SKILL.md +1 -1
- package/lib/eject-assets/skills/java-generator/SKILL.md +161 -0
- package/lib/index.js +91 -90
- package/lib/skills/redocly-cli/SKILL.md +3 -1
- package/package.json +1 -1
- package/lib/chunks/DORXGE7Z.js +0 -199
- package/lib/chunks/EAFZ6DNQ.js +0 -53
- package/lib/chunks/FGJDZKD2.js +0 -13
- package/lib/chunks/GAKWND4S.js +0 -8
- package/lib/chunks/JOWPA3MJ.js +0 -7
- package/lib/chunks/RBJCAITC.js +0 -9
- package/lib/chunks/RNL7TC2W.js +0 -17
- package/lib/chunks/U5DIFWGH.js +0 -7
- package/lib/chunks/U7KIB7CD.js +0 -7
- package/lib/chunks/V34D5CUU.js +0 -7
package/README.md
CHANGED
|
@@ -190,7 +190,7 @@ You can opt out by setting the `REDOCLY_TELEMETRY` environment variable to `off`
|
|
|
190
190
|
## Update notifications
|
|
191
191
|
|
|
192
192
|
Redocly CLI checks for updates on startup.
|
|
193
|
-
You can disable
|
|
193
|
+
You can disable notifications by setting the `REDOCLY_SUPPRESS_NOTIFICATIONS` environment variable to `true`.
|
|
194
194
|
|
|
195
195
|
## More resources
|
|
196
196
|
|
package/THIRD_PARTY_NOTICES
CHANGED
|
@@ -387,9 +387,9 @@ Packages:
|
|
|
387
387
|
zod-to-json-schema@3.25.2 — Copyright (c) 2020, Stefan Terdell
|
|
388
388
|
|
|
389
389
|
License text:
|
|
390
|
-
|
|
390
|
+
ISC License
|
|
391
391
|
|
|
392
|
-
Copyright (c)
|
|
392
|
+
Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov
|
|
393
393
|
|
|
394
394
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
395
395
|
purpose with or without fee is hereby granted, provided that the above
|
|
@@ -400,8 +400,8 @@ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
400
400
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
401
401
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
402
402
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
403
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
404
|
-
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
403
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
404
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
405
405
|
|
|
406
406
|
============================================================
|
|
407
407
|
MIT
|
|
@@ -416,7 +416,7 @@ Packages:
|
|
|
416
416
|
@noble/hashes@1.8.0 — Copyright (c) 2022 Paul Miller (https://paulmillr.com)
|
|
417
417
|
@redocly/ajv@8.18.3 — Copyright (c) 2015-2021 Evgeny Poberezkin
|
|
418
418
|
@redocly/cli-otel@0.3.7 — Copyright 2025 Redocly Inc, all rights reserved.
|
|
419
|
-
@redocly/config@0.
|
|
419
|
+
@redocly/config@0.69.0 — Copyright 2024 Redocly Inc.
|
|
420
420
|
ajv-formats@3.0.1 — Copyright (c) 2020 Evgeny Poberezkin
|
|
421
421
|
ajv@8.20.0 — Copyright (c) 2015-2021 Evgeny Poberezkin
|
|
422
422
|
ansi-regex@6.4.0
|
|
@@ -435,6 +435,7 @@ Packages:
|
|
|
435
435
|
eventsource-parser@3.1.1 — Copyright (c) 2026 Espen Hovlandsdal <espen@hovlandsdal.com>
|
|
436
436
|
eventsource@3.0.7 — Copyright (c) EventSource GitHub organisation
|
|
437
437
|
fast-deep-equal@3.1.3 — Copyright (c) 2017 Evgeny Poberezkin
|
|
438
|
+
fastest-levenshtein@1.0.16 — Copyright (c) 2020 Kasper Unn Weihe
|
|
438
439
|
fault@2.0.1
|
|
439
440
|
foreach@2.0.6 — Copyright (c) 2013 Manuel Stofer
|
|
440
441
|
get-east-asian-width@1.7.0
|
|
@@ -442,7 +443,6 @@ Packages:
|
|
|
442
443
|
handlebars@4.7.10 — Copyright (C) 2011-2019 by Yehuda Katz
|
|
443
444
|
has-flag@4.0.0
|
|
444
445
|
is-buffer@2.0.5 — Copyright (c) Feross Aboukhadijeh
|
|
445
|
-
js-levenshtein@1.1.6 — Copyright (c) 2017 Gustaf Andersson
|
|
446
446
|
js-tokens@4.0.0 — Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell
|
|
447
447
|
js-yaml@4.3.2 — Copyright (C) 2011-2015 by Vitaly Puzrin
|
|
448
448
|
js-yaml@5.4.3 — Copyright (C) 2011-2015 by Vitaly Puzrin
|
|
@@ -500,7 +500,29 @@ Packages:
|
|
|
500
500
|
zod@4.6.7 — Copyright (c) 2025 Colin McDonnell
|
|
501
501
|
|
|
502
502
|
License text:
|
|
503
|
-
(
|
|
503
|
+
(The MIT License)
|
|
504
|
+
|
|
505
|
+
Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>
|
|
506
|
+
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
|
507
|
+
|
|
508
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
509
|
+
a copy of this software and associated documentation files (the
|
|
510
|
+
'Software'), to deal in the Software without restriction, including
|
|
511
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
512
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
513
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
514
|
+
the following conditions:
|
|
515
|
+
|
|
516
|
+
The above copyright notice and this permission notice shall be
|
|
517
|
+
included in all copies or substantial portions of the Software.
|
|
518
|
+
|
|
519
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
520
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
521
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
522
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
523
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
524
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
525
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
504
526
|
|
|
505
527
|
============================================================
|
|
506
528
|
unknown
|
|
@@ -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"./ZYHLWT2C.js";import"./GKPSJEG5.js";import"./4ZCKAKVF.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";export{a as bundleTelemetry,b as handleBundle};
|
|
@@ -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{b as g,
|
|
7
|
+
import{b as g,d as y}from"./6RTITFQA.js";import{e as m}from"./RFWIIJFG.js";var l=m(y(),1);var p=m(y(),1);function v(t,o){let e={};for(let n of Object.keys(t)){let r=t[n];if(!r)continue;let c=typeof r=="function"?r:r.enter,s=typeof r=="function"?void 0:r.leave;e[n]={...c?{enter:h(c,o)}:{},...s?{leave:h(s,o)}:{}}}return e}function h(t,o){return(e,n,r,c,s)=>{t(e,q(e,o,s))}}function q(t,o,e=[]){let{ruleId:n,severity:r,message:c,source:s,config:a,problems:u}=o,f=e.filter(i=>!Array.isArray(i));return{source:s,config:a,ancestors:f,report(i){let I=i.node??t,d=i.loc??G(I),x={source:s,pointer:void 0,start:d?.start??{line:1,col:1},end:d?.end};u.push({ruleId:i.ruleId??n,severity:i.severity??r,message:c?c.replace("{{message}}",i.message):i.message,suggest:i.suggest??[],location:[x]})}}}function G(t){if(!t?.loc)return;let o=(0,p.getLocation)(t.loc.source,t.loc.start),e=(0,p.getLocation)(t.loc.source,t.loc.end);return{start:{line:o.line,col:o.column},end:{line:e.line,col:e.column}}}function R(t){let{document:o,config:e}=t,n=o.source;if(n.body.trim()==="")return[{ruleId:"struct",severity:"error",message:"The GraphQL document is empty. Expected at least one type definition.",suggest:[],location:[{source:n,pointer:void 0,start:{line:1,col:1}}]}];let r;try{r=(0,l.parse)(new l.Source(n.body,n.absoluteRef))}catch(u){if(u instanceof l.GraphQLError)return[V(u,n)];throw u}let c=e.getRulesForSpecVersion("graphql")??[],s=g(c,e,"rules","graphql");return b({ast:r,source:n,config:e,rules:s}).map(u=>e.addProblemToIgnore(u))}function V(t,o){let e=t.locations?.[0];return{ruleId:"struct",severity:"error",message:t.message,suggest:[],location:[{source:o,pointer:void 0,start:e?{line:e.line,col:e.column}:{line:1,col:1}}]}}function b(t){let{ast:o,source:e,config:n,rules:r}=t,c=[],s=r.map(({ruleId:a,severity:u,message:f,visitor:i})=>v(i,{ruleId:a,severity:u,message:f,source:e,config:n,problems:c}));return s.length>0&&(0,l.visit)(o,(0,l.visitInParallel)(s)),c}export{R as lintGraphqlDocument};
|
|
@@ -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{i as c,l as a}from"./
|
|
7
|
+
import{i as c,l as a}from"./TVUYXOSQ.js";import"./KFQC57GK.js";import{ka as s}from"./4ZCKAKVF.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";async function g({operation:i,input:r,version:n}){let t=await l(r),e=`${t.protocol}://${t.host}`;if(i!=="get"||!c(e))return"";let o=process.env.REDOCLY_AUTHORIZATION||await new a(n).getAccessToken(e);return o?`username=redocly
|
|
8
8
|
password=${o}
|
|
9
9
|
`:(s.error(`You are not logged in to ${e}. Run \`redocly login --residency ${e}\` or set the REDOCLY_AUTHORIZATION environment variable.
|
|
10
10
|
`),`quit=1
|
|
@@ -0,0 +1,13 @@
|
|
|
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 $,b as y,c as I}from"./IHUHQ7PO.js";import{e as P}from"./GKPSJEG5.js";import{Ba as x,ka as h}from"./4ZCKAKVF.js";function F(t){let e=t.trim(),n=e.match(/^```(?:ya?ml|json)?\s*\n([\s\S]*?)\n```$/);return n?n[1]:e}async function M(t,e){let r=(await x({source:t,config:e})).filter(o=>o.severity==="error");if(r.length>0){let o=r.slice(0,5).map(s=>`${s.ruleId}: ${s.message}`).join("; ");throw new Error(`the result has ${r.length} validation problem(s): ${o}`)}}import{spawn as v}from"node:child_process";import{mkdtemp as R}from"node:fs/promises";import{tmpdir as S}from"node:os";import L from"node:path";var E=3e5,m=class extends Error{},C;function A(){return C??=R(L.join(S(),"redocly-ai-")),C}async function w(t,e,n,r){let o=await A();return new Promise((s,u)=>{let i=v(t,e,{stdio:["pipe","pipe","pipe"],cwd:o,env:{...process.env,...r}}),l="",f="",g=!1,d=setTimeout(()=>{g=!0,i.kill("SIGKILL")},E);i.stdout.on("data",c=>{l+=c.toString()}),i.stderr.on("data",c=>{f+=c.toString()}),i.on("error",c=>{if(clearTimeout(d),c.code==="ENOENT"){u(new m(`Could not find the "${t}" CLI on PATH. Is it installed?`));return}u(c)}),i.on("close",c=>{if(clearTimeout(d),g){u(new Error(`The "${t}" CLI did not respond within ${E/1e3} seconds.`));return}s({stdout:l,stderr:f,code:c})}),i.stdin.on("error",()=>{}),i.stdin.end(n)})}async function b(t){let e=["-p","--output-format","text","--tools","","--strict-mcp-config","--setting-sources","","--no-session-persistence","--append-system-prompt",t.system];t.model&&e.push("--model",t.model);let{stdout:n,stderr:r,code:o}=await w("claude",e,t.user,{CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC:"1"});if(o!==0)throw new Error(`claude CLI exited with code ${o}: ${r.trim()||n.trim()}`);if(!n.trim())throw new Error("claude CLI returned no output.");return{text:n}}async function _(t){let e=["exec","--skip-git-repo-check","--sandbox","read-only","-c","mcp_servers={}","-c","project_doc_max_bytes=0"];t.model&&e.push("--model",t.model),e.push("-");let n=`${t.system}
|
|
8
|
+
|
|
9
|
+
${t.user}`,{stdout:r,stderr:o,code:s}=await w("codex",e,n);if(s!==0)throw new Error(`codex CLI exited with code ${s}: ${o.trim()||r.trim()}`);if(!r.trim())throw new Error("codex CLI returned no output.");return{text:r}}async function k(t){let e=["-p","--output-format","text","--trust"];t.model&&e.push("--model",t.model);let n=`${t.system}
|
|
10
|
+
|
|
11
|
+
${t.user}`,r;try{r=await w("cursor-agent",e,n)}catch(i){if(!(i instanceof m))throw i;try{r=await w("agent",e,n)}catch(l){throw l instanceof m?new m('Could not find the Cursor CLI ("cursor-agent" or "agent") on PATH. Is it installed?'):l}}let{stdout:o,stderr:s,code:u}=r;if(u!==0)throw new Error(`cursor CLI exited with code ${u}: ${s.trim()||o.trim()}`);if(!o.trim())throw new Error("cursor CLI returned no output.");return{text:o}}async function H(t,e){switch(t){case"claude":return b(e);case"codex":return _(e);case"cursor":return k(e);default:throw new Error(`Unknown AI provider: ${t}`)}}import{performance as N}from"node:perf_hooks";async function X(t){let{items:e}=t,n=new Array(e.length).fill(null),r=new $,o=new Set,s=0,u=0,i=!1,l=()=>I(r,{action:t.action,inFlight:o,position:s+1,total:e.length}),f=async()=>{for(;!i&&u<e.length;){let d=u++,c=e[d],a=t.label(c),T=N.now();o.add(a),l();try{n[d]=await t.run(c,d),s+=1,o.delete(a),y(r),h.info(`[${s}/${e.length}] ${a} \u2014 ${t.successNote} (${P(T)})
|
|
12
|
+
`)}catch(p){if(s+=1,o.delete(a),y(r),p instanceof m)throw i=!0,p;h.warn(`[${s}/${e.length}] ${a} \u2014 ${t.failureNote}: ${p instanceof Error?p.message:String(p)}
|
|
13
|
+
`)}l()}},g=Math.max(1,Math.min(t.concurrency,e.length));for(let d of await Promise.allSettled(Array.from({length:g},f)))if(d.status==="rejected")throw d.reason;return n}export{F as a,M as b,H as c,X as d};
|
|
@@ -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{c as f}from"./
|
|
7
|
+
import{c as f}from"./D3C6XIMY.js";var u=/^[A-Za-z_$][A-Za-z0-9_$]*$/,o=f.typescript;function m(e){return u.test(e)}function E(e){return u.test(e)&&!o.has(e)}function p(e){let i=e.replace(/[^A-Za-z0-9_$]/g,"_");return(i===""||/^[0-9]/.test(i)||o.has(i))&&(i=`_${i}`),i}var l={"<":"\\u003C",">":"\\u003E","\u2028":"\\u2028","\u2029":"\\u2029"};function s(e){return JSON.stringify(e).replace(/[<>\u2028\u2029]/g,i=>l[i])}function L(e){return u.test(e)&&!o.has(e)?e:s(e)}function S(e,i){let n=p(e),r=n,t=2;for(;i.has(r);)r=`${n}_${t++}`;return i.add(r),r}var _=s;function c(e){if(typeof e=="string")return s(e);if(typeof e=="boolean"||e===null||typeof e=="number")return String(e);if(Array.isArray(e))return`[${e.map(c).join(", ")}]`;let i=Object.entries(e).map(([n,r])=>`${m(n)?n:s(n)}: ${c(r)}`);return i.length===0?"{}":`{ ${i.join(", ")} }`}function x(e){return e.replace(/\*\//g,"*\\/")}function y(e,i){let n=h(e,i);return n.length===0?void 0:n.join(`
|
|
8
8
|
`)}function h(e,i){let n=[];return e&&e.trim()&&n.push(...g($(e))),i&&n.push(...d(i)),n}function d(e){let i=[],n=(r,t)=>{t===void 0?i.push(`@${r}`):i.push(`@${r} ${t}`)};return e.minimum!==void 0&&n("minimum",e.minimum),e.maximum!==void 0&&n("maximum",e.maximum),e.exclusiveMinimum!==void 0&&n("exclusiveMinimum",e.exclusiveMinimum),e.exclusiveMaximum!==void 0&&n("exclusiveMaximum",e.exclusiveMaximum),e.minLength!==void 0&&n("minLength",e.minLength),e.maxLength!==void 0&&n("maxLength",e.maxLength),e.pattern!==void 0&&n("pattern",x(e.pattern)),e.minItems!==void 0&&n("minItems",e.minItems),e.maxItems!==void 0&&n("maxItems",e.maxItems),e.uniqueItems===!0&&n("uniqueItems"),e.format!==void 0&&n("format",e.format),e.deprecated===!0&&n("deprecated"),i}function g(e){let i=0,n=e.length;for(;i<n&&e[i]==="";)i++;for(;n>i&&e[n-1]==="";)n--;return e.slice(i,n)}function C(e){return e[0].toUpperCase()+e.slice(1)}function j(e){let i=e.split(/[-_]/).filter(n=>n.length>0).map((n,r)=>{let t=n.toLowerCase();return r===0?t:t.charAt(0).toUpperCase()+t.slice(1)}).join("");return p(i)}function $(e){return e.replace(/\r\n/g,`
|
|
9
9
|
`).split(`
|
|
10
10
|
`).map(i=>i.trimEnd())}export{m as a,E as b,p as c,s as d,L as e,S as f,_ as g,c as h,x as i,y as j,C as k,j as l,$ as m};
|