@redocly/cli 2.41.2 → 2.43.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 +15 -0
- package/THIRD_PARTY_NOTICES +3 -2
- package/lib/chunks/32XCOMOR.js +7 -0
- package/lib/chunks/3BCHPW6T.js +22 -0
- package/lib/chunks/3VZLNQK3.js +47 -0
- package/lib/chunks/4VF6MPJJ.js +11 -0
- package/lib/chunks/55GMSQDD.js +7 -0
- package/lib/chunks/5E3VKU5T.js +7 -0
- package/lib/chunks/AE6JGTY4.js +7 -0
- package/lib/chunks/C35TOMVY.js +8 -0
- package/lib/chunks/D5T6ETPZ.js +8 -0
- package/lib/chunks/DNOXLF53.js +8 -0
- package/lib/chunks/E36IFTLX.js +59 -0
- package/lib/chunks/ECZUPR2N.js +7 -0
- package/lib/chunks/EU6GURJZ.js +7 -0
- package/lib/chunks/HXYO6QS2.js +3132 -0
- package/lib/chunks/IW4HG6VD.js +19 -0
- package/lib/chunks/KIVPQZDC.js +31 -0
- package/lib/chunks/KLY5RV3W.js +7 -0
- package/lib/chunks/KM7RL6C4.js +2317 -0
- package/lib/chunks/L3YH7RCT.js +8 -0
- package/lib/chunks/NEWT5A6S.js +159 -0
- package/lib/chunks/NGPG6D6W.js +7 -0
- package/lib/chunks/O6MCQRCP.js +59 -0
- package/lib/chunks/O6PRCLSV.js +13 -0
- package/lib/chunks/OFAMJNQ6.js +7 -0
- package/lib/chunks/P26PQ2RU.js +7 -0
- package/lib/chunks/PFD7KGH7.js +93 -0
- package/lib/chunks/QFG7TTKG.js +22 -0
- package/lib/chunks/RFWIIJFG.js +7 -0
- package/lib/chunks/RS5PUOTT.js +18 -0
- package/lib/chunks/TMQJQANP.js +7 -0
- package/lib/chunks/UPPWQBGX.js +7 -0
- package/lib/chunks/UXH3ZSSV.js +9 -0
- package/lib/chunks/UYZXI3NO.js +7 -0
- package/lib/chunks/WNTLDT6L.js +184 -0
- package/lib/chunks/WZXA5XPB.js +7 -0
- package/lib/chunks/X6IKW6K4.js +7 -0
- package/lib/index.js +226 -13885
- package/package.json +1 -1
- package/lib/chunks/3CX2Z7JI.js +0 -496
- package/lib/chunks/3UUTQVCJ.js +0 -3614
- package/lib/chunks/4FB5ZIPP.js +0 -1133
- package/lib/chunks/5ILQMFXK.js +0 -59
- package/lib/chunks/7F5O43EU.js +0 -1756
- package/lib/chunks/7IX44JLO.js +0 -16
- package/lib/chunks/7MOL2QVN.js +0 -92635
- package/lib/chunks/A3VFVVHD.js +0 -25
- package/lib/chunks/A6JSOHCP.js +0 -41
- package/lib/chunks/AIT3U3JT.js +0 -22
- package/lib/chunks/ASYQPOQY.js +0 -681
- package/lib/chunks/BVP23YP7.js +0 -13374
- package/lib/chunks/FO6BDVGE.js +0 -25
- package/lib/chunks/GFU5KGSW.js +0 -92
- package/lib/chunks/ICPYP2LP.js +0 -401
- package/lib/chunks/KPMZLKQG.js +0 -79
- package/lib/chunks/KRMBH6JF.js +0 -17902
- package/lib/chunks/NLIKC7UP.js +0 -528
- package/lib/chunks/NW3XJZXQ.js +0 -175
- package/lib/chunks/P6UGG7F6.js +0 -414
- package/lib/chunks/RRC5IDC3.js +0 -2416
- package/lib/chunks/T6UZU3XM.js +0 -17
- package/lib/chunks/TS33ZDKX.js +0 -35
- package/lib/chunks/UUU33DK3.js +0 -125
- package/lib/chunks/VUDTNFRL.js +0 -42
- package/lib/chunks/VXIQEZPR.js +0 -2564
- package/lib/chunks/W7G5WVPB.js +0 -44
- package/lib/chunks/XB6C62FW.js +0 -18497
- package/lib/chunks/XHPY6UJF.js +0 -1638
- package/lib/chunks/Y6DTFCLS.js +0 -15
- package/lib/chunks/Z2664VV5.js +0 -39331
- package/lib/chunks/Z2I5YXYN.js +0 -20272
- package/lib/chunks/ZK3QRKL5.js +0 -129
package/lib/chunks/FO6BDVGE.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
const require = __createRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
esm_exports,
|
|
5
|
-
init_esm
|
|
6
|
-
} from "./XHPY6UJF.js";
|
|
7
|
-
import {
|
|
8
|
-
__commonJS,
|
|
9
|
-
__toCommonJS
|
|
10
|
-
} from "./5ILQMFXK.js";
|
|
11
|
-
|
|
12
|
-
// ../../node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js
|
|
13
|
-
var require_getMachineId_unsupported = __commonJS({
|
|
14
|
-
"../../node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js"(exports) {
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.getMachineId = void 0;
|
|
17
|
-
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
18
|
-
async function getMachineId() {
|
|
19
|
-
api_1.diag.debug("could not read machine-id: unsupported platform");
|
|
20
|
-
return void 0;
|
|
21
|
-
}
|
|
22
|
-
exports.getMachineId = getMachineId;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
export default require_getMachineId_unsupported();
|
package/lib/chunks/GFU5KGSW.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
const require = __createRequire(import.meta.url);
|
|
3
|
-
|
|
4
|
-
// package.json
|
|
5
|
-
var package_default = {
|
|
6
|
-
name: "@redocly/cli",
|
|
7
|
-
version: "2.41.2",
|
|
8
|
-
description: "",
|
|
9
|
-
license: "MIT",
|
|
10
|
-
bin: {
|
|
11
|
-
redocly: "bin/cli.js",
|
|
12
|
-
openapi: "bin/cli.js"
|
|
13
|
-
},
|
|
14
|
-
type: "module",
|
|
15
|
-
engines: {
|
|
16
|
-
node: ">=22.12.0 || >=20.19.0 <21.0.0",
|
|
17
|
-
npm: ">=10"
|
|
18
|
-
},
|
|
19
|
-
engineStrict: true,
|
|
20
|
-
scripts: {
|
|
21
|
-
build: "node ./scripts/build.mjs",
|
|
22
|
-
"prepare:publish-dir": "node ./scripts/prepare-publish-dir.mjs",
|
|
23
|
-
"clean:publish-dir": `node -e "require('fs').rmSync('.publish', {recursive:true, force:true})"`
|
|
24
|
-
},
|
|
25
|
-
publishConfig: {
|
|
26
|
-
directory: ".publish"
|
|
27
|
-
},
|
|
28
|
-
repository: {
|
|
29
|
-
type: "git",
|
|
30
|
-
url: "https://github.com/Redocly/redocly-cli.git"
|
|
31
|
-
},
|
|
32
|
-
homepage: "https://github.com/Redocly/redocly-cli",
|
|
33
|
-
keywords: [
|
|
34
|
-
"linter",
|
|
35
|
-
"OpenAPI",
|
|
36
|
-
"Swagger",
|
|
37
|
-
"OpenAPI linter",
|
|
38
|
-
"Swagger linter",
|
|
39
|
-
"AsyncAPI linter",
|
|
40
|
-
"Arazzo linter",
|
|
41
|
-
"oas"
|
|
42
|
-
],
|
|
43
|
-
contributors: [
|
|
44
|
-
"Roman Hotsiy <roman@redocly.com> (https://redocly.com/)"
|
|
45
|
-
],
|
|
46
|
-
devDependencies: {
|
|
47
|
-
"@opentelemetry/exporter-trace-otlp-http": "0.219.0",
|
|
48
|
-
"@opentelemetry/resources": "2.8.0",
|
|
49
|
-
"@opentelemetry/sdk-trace-node": "2.8.0",
|
|
50
|
-
"@opentelemetry/semantic-conventions": "1.41.1",
|
|
51
|
-
"@redocly/cli-otel": "0.3.4",
|
|
52
|
-
"@redocly/openapi-core": "2.41.2",
|
|
53
|
-
"@redocly/respect-core": "2.41.2",
|
|
54
|
-
"@types/cookie": "0.6.0",
|
|
55
|
-
"@types/har-format": "^1.2.16",
|
|
56
|
-
"@types/react": "^17.0.0 || ^18.2.21 || ^19.2.16",
|
|
57
|
-
"@types/react-dom": "^17.0.0 || ^18.2.7 || ^19.2.3",
|
|
58
|
-
"@types/semver": "^7.5.0",
|
|
59
|
-
"@types/set-cookie-parser": "2.4.10",
|
|
60
|
-
"@types/yargs": "17.0.32",
|
|
61
|
-
colorette: "^1.2.0",
|
|
62
|
-
cookie: "^0.7.2",
|
|
63
|
-
dotenv: "16.4.7",
|
|
64
|
-
esbuild: "^0.28.0",
|
|
65
|
-
glob: "^13.0.5",
|
|
66
|
-
handlebars: "^4.7.9",
|
|
67
|
-
"https-proxy-agent": "^7.0.5",
|
|
68
|
-
react: "^17.0.0 || ^18.2.0 || ^19.2.7",
|
|
69
|
-
"react-dom": "^17.0.0 || ^18.2.0 || ^19.2.7",
|
|
70
|
-
redoc: "2.5.3",
|
|
71
|
-
semver: "^7.5.2",
|
|
72
|
-
"set-cookie-parser": "^2.3.5",
|
|
73
|
-
"styled-components": "6.4.2",
|
|
74
|
-
typescript: "6.0.2",
|
|
75
|
-
ulid: "^3.0.1",
|
|
76
|
-
undici: "^6.27.0",
|
|
77
|
-
yargs: "17.0.1"
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
// src/utils/package.ts
|
|
82
|
-
var { version, name, engines } = package_default;
|
|
83
|
-
var redocVersion = package_default.devDependencies.redoc;
|
|
84
|
-
var redocStandaloneSri = "sha384-xiEssMQFSpSfLbzRZCGfxxIM5QDb2DTrU6vyoZdp2sV1L6pmOMy6MpTtUoLbpC96";
|
|
85
|
-
|
|
86
|
-
export {
|
|
87
|
-
version,
|
|
88
|
-
name,
|
|
89
|
-
engines,
|
|
90
|
-
redocVersion,
|
|
91
|
-
redocStandaloneSri
|
|
92
|
-
};
|
package/lib/chunks/ICPYP2LP.js
DELETED
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
const require = __createRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
__commonJS,
|
|
5
|
-
__require,
|
|
6
|
-
__toESM
|
|
7
|
-
} from "./5ILQMFXK.js";
|
|
8
|
-
|
|
9
|
-
// ../../node_modules/@redocly/cli-otel/node_modules/ulid/dist/index.umd.js
|
|
10
|
-
var require_index_umd = __commonJS({
|
|
11
|
-
"../../node_modules/@redocly/cli-otel/node_modules/ulid/dist/index.umd.js"(exports, module) {
|
|
12
|
-
(function(global2, factory) {
|
|
13
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.ULID = {}));
|
|
14
|
-
})(exports, (function(exports2) {
|
|
15
|
-
"use strict";
|
|
16
|
-
function createError(message) {
|
|
17
|
-
const err = new Error(message);
|
|
18
|
-
err.source = "ulid";
|
|
19
|
-
return err;
|
|
20
|
-
}
|
|
21
|
-
const ENCODING2 = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
22
|
-
const ENCODING_LEN2 = ENCODING2.length;
|
|
23
|
-
const TIME_MAX2 = Math.pow(2, 48) - 1;
|
|
24
|
-
const TIME_LEN2 = 10;
|
|
25
|
-
const RANDOM_LEN2 = 16;
|
|
26
|
-
function replaceCharAt(str, index, char) {
|
|
27
|
-
if (index > str.length - 1) {
|
|
28
|
-
return str;
|
|
29
|
-
}
|
|
30
|
-
return str.substr(0, index) + char + str.substr(index + 1);
|
|
31
|
-
}
|
|
32
|
-
function incrementBase32(str) {
|
|
33
|
-
let done = void 0;
|
|
34
|
-
let index = str.length;
|
|
35
|
-
let char;
|
|
36
|
-
let charIndex;
|
|
37
|
-
const maxCharIndex = ENCODING_LEN2 - 1;
|
|
38
|
-
while (!done && index-- >= 0) {
|
|
39
|
-
char = str[index];
|
|
40
|
-
charIndex = ENCODING2.indexOf(char);
|
|
41
|
-
if (charIndex === -1) {
|
|
42
|
-
throw createError("incorrectly encoded string");
|
|
43
|
-
}
|
|
44
|
-
if (charIndex === maxCharIndex) {
|
|
45
|
-
str = replaceCharAt(str, index, ENCODING2[0]);
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
done = replaceCharAt(str, index, ENCODING2[charIndex + 1]);
|
|
49
|
-
}
|
|
50
|
-
if (typeof done === "string") {
|
|
51
|
-
return done;
|
|
52
|
-
}
|
|
53
|
-
throw createError("cannot increment this string");
|
|
54
|
-
}
|
|
55
|
-
function randomChar2(prng) {
|
|
56
|
-
let rand = Math.floor(prng() * ENCODING_LEN2);
|
|
57
|
-
if (rand === ENCODING_LEN2) {
|
|
58
|
-
rand = ENCODING_LEN2 - 1;
|
|
59
|
-
}
|
|
60
|
-
return ENCODING2.charAt(rand);
|
|
61
|
-
}
|
|
62
|
-
function encodeTime2(now, len) {
|
|
63
|
-
if (isNaN(now)) {
|
|
64
|
-
throw new Error(now + " must be a number");
|
|
65
|
-
}
|
|
66
|
-
if (now > TIME_MAX2) {
|
|
67
|
-
throw createError("cannot encode time greater than " + TIME_MAX2);
|
|
68
|
-
}
|
|
69
|
-
if (now < 0) {
|
|
70
|
-
throw createError("time must be positive");
|
|
71
|
-
}
|
|
72
|
-
if (Number.isInteger(Number(now)) === false) {
|
|
73
|
-
throw createError("time must be an integer");
|
|
74
|
-
}
|
|
75
|
-
let mod;
|
|
76
|
-
let str = "";
|
|
77
|
-
for (; len > 0; len--) {
|
|
78
|
-
mod = now % ENCODING_LEN2;
|
|
79
|
-
str = ENCODING2.charAt(mod) + str;
|
|
80
|
-
now = (now - mod) / ENCODING_LEN2;
|
|
81
|
-
}
|
|
82
|
-
return str;
|
|
83
|
-
}
|
|
84
|
-
function encodeRandom2(len, prng) {
|
|
85
|
-
let str = "";
|
|
86
|
-
for (; len > 0; len--) {
|
|
87
|
-
str = randomChar2(prng) + str;
|
|
88
|
-
}
|
|
89
|
-
return str;
|
|
90
|
-
}
|
|
91
|
-
function decodeTime(id) {
|
|
92
|
-
if (id.length !== TIME_LEN2 + RANDOM_LEN2) {
|
|
93
|
-
throw createError("malformed ulid");
|
|
94
|
-
}
|
|
95
|
-
var time = id.substr(0, TIME_LEN2).split("").reverse().reduce((carry, char, index) => {
|
|
96
|
-
const encodingIndex = ENCODING2.indexOf(char);
|
|
97
|
-
if (encodingIndex === -1) {
|
|
98
|
-
throw createError("invalid character found: " + char);
|
|
99
|
-
}
|
|
100
|
-
return carry += encodingIndex * Math.pow(ENCODING_LEN2, index);
|
|
101
|
-
}, 0);
|
|
102
|
-
if (time > TIME_MAX2) {
|
|
103
|
-
throw createError("malformed ulid, timestamp too large");
|
|
104
|
-
}
|
|
105
|
-
return time;
|
|
106
|
-
}
|
|
107
|
-
function detectPrng(allowInsecure = false, root) {
|
|
108
|
-
if (!root) {
|
|
109
|
-
root = typeof window !== "undefined" ? window : null;
|
|
110
|
-
}
|
|
111
|
-
const browserCrypto = root && (root.crypto || root.msCrypto);
|
|
112
|
-
if (browserCrypto) {
|
|
113
|
-
return () => {
|
|
114
|
-
const buffer = new Uint8Array(1);
|
|
115
|
-
browserCrypto.getRandomValues(buffer);
|
|
116
|
-
return buffer[0] / 255;
|
|
117
|
-
};
|
|
118
|
-
} else {
|
|
119
|
-
try {
|
|
120
|
-
const nodeCrypto = __require("crypto");
|
|
121
|
-
return () => nodeCrypto.randomBytes(1).readUInt8() / 255;
|
|
122
|
-
} catch (e) {
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
if (allowInsecure) {
|
|
126
|
-
try {
|
|
127
|
-
console.error("secure crypto unusable, falling back to insecure Math.random()!");
|
|
128
|
-
} catch (e) {
|
|
129
|
-
}
|
|
130
|
-
return () => Math.random();
|
|
131
|
-
}
|
|
132
|
-
throw createError("secure crypto unusable, insecure Math.random not allowed");
|
|
133
|
-
}
|
|
134
|
-
function factory(currPrng) {
|
|
135
|
-
if (!currPrng) {
|
|
136
|
-
currPrng = detectPrng();
|
|
137
|
-
}
|
|
138
|
-
return function ulid3(seedTime) {
|
|
139
|
-
if (isNaN(seedTime)) {
|
|
140
|
-
seedTime = Date.now();
|
|
141
|
-
}
|
|
142
|
-
return encodeTime2(seedTime, TIME_LEN2) + encodeRandom2(RANDOM_LEN2, currPrng);
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
function monotonicFactory(currPrng) {
|
|
146
|
-
if (!currPrng) {
|
|
147
|
-
currPrng = detectPrng();
|
|
148
|
-
}
|
|
149
|
-
let lastTime = 0;
|
|
150
|
-
let lastRandom;
|
|
151
|
-
return function ulid3(seedTime) {
|
|
152
|
-
if (isNaN(seedTime)) {
|
|
153
|
-
seedTime = Date.now();
|
|
154
|
-
}
|
|
155
|
-
if (seedTime <= lastTime) {
|
|
156
|
-
const incrementedRandom = lastRandom = incrementBase32(lastRandom);
|
|
157
|
-
return encodeTime2(lastTime, TIME_LEN2) + incrementedRandom;
|
|
158
|
-
}
|
|
159
|
-
lastTime = seedTime;
|
|
160
|
-
const newRandom = lastRandom = encodeRandom2(RANDOM_LEN2, currPrng);
|
|
161
|
-
return encodeTime2(seedTime, TIME_LEN2) + newRandom;
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
const ulid2 = factory();
|
|
165
|
-
exports2.decodeTime = decodeTime;
|
|
166
|
-
exports2.detectPrng = detectPrng;
|
|
167
|
-
exports2.encodeRandom = encodeRandom2;
|
|
168
|
-
exports2.encodeTime = encodeTime2;
|
|
169
|
-
exports2.factory = factory;
|
|
170
|
-
exports2.incrementBase32 = incrementBase32;
|
|
171
|
-
exports2.monotonicFactory = monotonicFactory;
|
|
172
|
-
exports2.randomChar = randomChar2;
|
|
173
|
-
exports2.replaceCharAt = replaceCharAt;
|
|
174
|
-
exports2.ulid = ulid2;
|
|
175
|
-
}));
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
// ../../node_modules/@redocly/cli-otel/lib/index.js
|
|
180
|
-
var import_ulid = __toESM(require_index_umd(), 1);
|
|
181
|
-
var K = Object.defineProperty;
|
|
182
|
-
var q = (e, t) => {
|
|
183
|
-
for (var n in t) K(e, n, { get: t[n], enumerable: true });
|
|
184
|
-
};
|
|
185
|
-
var E = {};
|
|
186
|
-
q(E, { CLOUD_EVENT_STANDARD_KEYS: () => C, mapToCloudEvent: () => G });
|
|
187
|
-
var C = ["id", "specversion", "object", "datacontenttype", "type", "time", "origin", "env", "category", "signal", "source", "subject", "subjects", "data", "actor", "requestId", "clientIp", "organizationId", "organizationSlug", "projectId", "projectSlug", "osPlatform", "userAgent", "sessionId"];
|
|
188
|
-
function G(e) {
|
|
189
|
-
let { type: t, data: n, actor: o, requestId: s, clientIp: r, origin: i, env: c, source: u, organizationId: a, organizationSlug: g, projectId: d, projectSlug: I, category: N = "product", signal: $ = "log", osPlatform: B, userAgent: U, sessionId: W } = e, L = !!(n && Array.isArray(n)), m = o ? { id: o.id ?? `ann_${(0, import_ulid.ulid)()}`, object: o.object ?? "user", uri: o.uri ?? "" } : null, T = `evt_${(0, import_ulid.ulid)()}`.toLowerCase(), S = /* @__PURE__ */ new Date(), M = u ?? m?.uri ?? null, O = { ...a !== void 0 && { organizationId: a }, ...g !== void 0 && { organizationSlug: g }, ...d !== void 0 && { projectId: d }, ...I !== void 0 && { projectSlug: I } }, j = { specversion: "1.0", object: "event", datacontenttype: "application/json; charset=utf-8", origin: i, env: c, category: N, signal: $, osPlatform: B, userAgent: U, clientIp: r, sessionId: W };
|
|
190
|
-
if (L) {
|
|
191
|
-
let p = n, V = p.map((A) => ({ id: A.id ?? "", object: A.object ?? "", uri: A.uri ?? "" })), z = p[0]?.id ?? null;
|
|
192
|
-
Object.assign(j, { ...O, id: T, type: t, time: S, source: M, actor: m, subject: z, subjects: V, data: p, requestId: s ?? "" });
|
|
193
|
-
} else {
|
|
194
|
-
let p = (Array.isArray(n) ? n[0] : n)?.id ?? null;
|
|
195
|
-
Object.assign(j, { ...O, id: T, type: t, time: S, source: M, actor: m, subject: p, requestId: s ?? "", data: n, ...u != null && { request: { source: u } } });
|
|
196
|
-
}
|
|
197
|
-
return j;
|
|
198
|
-
}
|
|
199
|
-
function l(e) {
|
|
200
|
-
return e.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
201
|
-
}
|
|
202
|
-
function v(e) {
|
|
203
|
-
return e != null;
|
|
204
|
-
}
|
|
205
|
-
function y(e) {
|
|
206
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
|
|
207
|
-
}
|
|
208
|
-
function x(e, t, n, o = true, s) {
|
|
209
|
-
let r = s?.length ? new Set(s) : null;
|
|
210
|
-
for (let [i, c] of Object.entries(e)) if (!r?.has(i) && c !== void 0) {
|
|
211
|
-
let u = o ? l(i) : i;
|
|
212
|
-
n[`${t}${u}`] = c;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
function f(e, t, n, o) {
|
|
216
|
-
let s = o?.currentDepth ?? 0, r = o?.useSnakeCase ?? true, i = o?.maxNestingLevels ?? 3, c = t.endsWith(".") ? t.slice(0, -1) : t;
|
|
217
|
-
for (let [u, a] of Object.entries(e)) {
|
|
218
|
-
if (!v(a)) continue;
|
|
219
|
-
let g = r ? l(u) : u, d = `${c}.${g}`;
|
|
220
|
-
typeof a == "object" && !Array.isArray(a) ? s < i && f(a, d, n, { currentDepth: s + 1, useSnakeCase: r, maxNestingLevels: i }) : y(a) && (n[d] = a);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
var _ = "context";
|
|
224
|
-
var h = [_];
|
|
225
|
-
function w(e) {
|
|
226
|
-
let t = { updated: [], notUpdated: [] };
|
|
227
|
-
for (let n of e) {
|
|
228
|
-
if (!n || typeof n != "object") continue;
|
|
229
|
-
let o = n.object;
|
|
230
|
-
if (typeof o != "string") continue;
|
|
231
|
-
let s = n, r = t.notUpdated.find((i) => i.object === o);
|
|
232
|
-
r ? (t.updated = [r, s], t.notUpdated = t.notUpdated.filter((i) => i.object !== o)) : t.updated.some((i) => i.object === o) || t.notUpdated.push(s);
|
|
233
|
-
}
|
|
234
|
-
return t;
|
|
235
|
-
}
|
|
236
|
-
function b(e, t, n) {
|
|
237
|
-
let o = n ? `${n}.` : "", s = t === "" ? "" : `${l(t)}.`;
|
|
238
|
-
return `${e}.${o}${s}`;
|
|
239
|
-
}
|
|
240
|
-
function P(e, t) {
|
|
241
|
-
let n = e[_];
|
|
242
|
-
return n === "before" || n === "after" ? n : t === 0 ? "after" : "before";
|
|
243
|
-
}
|
|
244
|
-
function k(e) {
|
|
245
|
-
let { [_]: t, ...n } = e;
|
|
246
|
-
return n;
|
|
247
|
-
}
|
|
248
|
-
function D(e) {
|
|
249
|
-
return e.endsWith(".") ? e : `${e}.`;
|
|
250
|
-
}
|
|
251
|
-
function Y(e, t, n) {
|
|
252
|
-
let o = t instanceof Date ? t.toISOString() : new Date(t).toISOString();
|
|
253
|
-
return { "cloudevents.event_id": e.id, "cloudevents.event_type": e.type, "cloudevents.event_source": e.source ?? void 0, "cloudevents.event_spec_version": e.specversion, "cloudevents.event_data_content_type": e.datacontenttype ?? "application/json; charset=utf-8", "cloudevents.event_time": o, "cloudevents.event_subject": e.subject ?? "", "cloudevents.event_version": n?.version, "cloudevents.event_origin": e.origin ?? n?.serviceName, "cloudevents.event_env": e.env, "cloudevents.event_client_ip": e.clientIp, "cloudevents.event_object": e.object || "event", "cloudevents.event_category": e.category, "cloudevents.event_signal": e.signal, "cloudevents.event_actor.id": e.actor?.id ?? void 0, "cloudevents.event_actor.object": e.actor?.object ?? void 0, "cloudevents.event_actor.uri": e.actor?.uri ?? void 0, "cloudevents.event_organization_id": e.organizationId, "cloudevents.event_organization_slug": e.organizationSlug, "cloudevents.event_project_id": e.projectId, "cloudevents.event_project_slug": e.projectSlug, "cloudevents.event_request_id": e.requestId, "cloudevents.event_os_platform": e.osPlatform, "cloudevents.event_user_agent": e.userAgent, "cloudevents.event_session_id": e.sessionId };
|
|
254
|
-
}
|
|
255
|
-
function F(e, t, n) {
|
|
256
|
-
let o = e.data, s = { ...Y(e, t, n) };
|
|
257
|
-
return X(o, s), ee(e, s), te(e, s), s;
|
|
258
|
-
}
|
|
259
|
-
function X(e, t) {
|
|
260
|
-
!e || typeof e != "object" || (Array.isArray(e) ? H(e, t) : Q(e, t));
|
|
261
|
-
}
|
|
262
|
-
function H(e, t) {
|
|
263
|
-
e.some((o) => o && typeof o == "object" && typeof o.object == "string") ? Z(e, t) : J(e, t);
|
|
264
|
-
}
|
|
265
|
-
function Z(e, t) {
|
|
266
|
-
let n = w(e);
|
|
267
|
-
n.updated.forEach((o, s) => {
|
|
268
|
-
let r = b("cloudevents.event_data", o.object, P(o, s));
|
|
269
|
-
f(k(o), D(r), t);
|
|
270
|
-
}), n.notUpdated.forEach((o) => {
|
|
271
|
-
let s = b("cloudevents.event_data", o.object, void 0);
|
|
272
|
-
f(k(o), D(s), t);
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
function J(e, t) {
|
|
276
|
-
for (let n of e) !n || typeof n != "object" || f(n, "cloudevents.event_data.", t);
|
|
277
|
-
}
|
|
278
|
-
function Q(e, t) {
|
|
279
|
-
for (let [n, o] of Object.entries(e)) {
|
|
280
|
-
if (!v(o)) continue;
|
|
281
|
-
let s = l(n);
|
|
282
|
-
if (typeof o == "object" && !Array.isArray(o)) for (let [r, i] of Object.entries(o)) v(i) && y(i) && (t[`cloudevents.event_data.${s}.${r}`] = i);
|
|
283
|
-
else y(o) && (t[`cloudevents.event_data.${s}`] = o);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
function ee(e, t) {
|
|
287
|
-
if (!e.subjects || !Array.isArray(e.subjects)) return;
|
|
288
|
-
let n = w(e.subjects);
|
|
289
|
-
n.updated.forEach((o, s) => {
|
|
290
|
-
let r = b("cloudevents.event_subjects", o.object, P(o, s));
|
|
291
|
-
x(o, r, t, false, h);
|
|
292
|
-
}), n.notUpdated.forEach((o) => {
|
|
293
|
-
let s = b("cloudevents.event_subjects", o.object, void 0);
|
|
294
|
-
x(o, s, t, false, h);
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
function te(e, t) {
|
|
298
|
-
for (let [n, o] of Object.entries(e)) if (!(C.includes(n) || o === void 0)) if (o instanceof Object) for (let [s, r] of Object.entries(o)) r !== void 0 && (t[`cloudevents.${n}.${s}`] = r);
|
|
299
|
-
else t[`cloudevents.${n}`] = o;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// ../../node_modules/ulid/dist/node/index.js
|
|
303
|
-
import crypto from "node:crypto";
|
|
304
|
-
var ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
305
|
-
var ENCODING_LEN = 32;
|
|
306
|
-
var RANDOM_LEN = 16;
|
|
307
|
-
var TIME_LEN = 10;
|
|
308
|
-
var TIME_MAX = 281474976710655;
|
|
309
|
-
var ULIDErrorCode;
|
|
310
|
-
(function(ULIDErrorCode2) {
|
|
311
|
-
ULIDErrorCode2["Base32IncorrectEncoding"] = "B32_ENC_INVALID";
|
|
312
|
-
ULIDErrorCode2["DecodeTimeInvalidCharacter"] = "DEC_TIME_CHAR";
|
|
313
|
-
ULIDErrorCode2["DecodeTimeValueMalformed"] = "DEC_TIME_MALFORMED";
|
|
314
|
-
ULIDErrorCode2["EncodeTimeNegative"] = "ENC_TIME_NEG";
|
|
315
|
-
ULIDErrorCode2["EncodeTimeSizeExceeded"] = "ENC_TIME_SIZE_EXCEED";
|
|
316
|
-
ULIDErrorCode2["EncodeTimeValueMalformed"] = "ENC_TIME_MALFORMED";
|
|
317
|
-
ULIDErrorCode2["PRNGDetectFailure"] = "PRNG_DETECT";
|
|
318
|
-
ULIDErrorCode2["ULIDInvalid"] = "ULID_INVALID";
|
|
319
|
-
ULIDErrorCode2["Unexpected"] = "UNEXPECTED";
|
|
320
|
-
ULIDErrorCode2["UUIDInvalid"] = "UUID_INVALID";
|
|
321
|
-
})(ULIDErrorCode || (ULIDErrorCode = {}));
|
|
322
|
-
var ULIDError = class extends Error {
|
|
323
|
-
constructor(errorCode, message) {
|
|
324
|
-
super(`${message} (${errorCode})`);
|
|
325
|
-
this.name = "ULIDError";
|
|
326
|
-
this.code = errorCode;
|
|
327
|
-
}
|
|
328
|
-
};
|
|
329
|
-
function randomChar(prng) {
|
|
330
|
-
const randomPosition = Math.floor(prng() * ENCODING_LEN) % ENCODING_LEN;
|
|
331
|
-
return ENCODING.charAt(randomPosition);
|
|
332
|
-
}
|
|
333
|
-
function detectPRNG(root) {
|
|
334
|
-
const rootLookup = detectRoot();
|
|
335
|
-
const globalCrypto = rootLookup && (rootLookup.crypto || rootLookup.msCrypto) || (typeof crypto !== "undefined" ? crypto : null);
|
|
336
|
-
if (typeof globalCrypto?.getRandomValues === "function") {
|
|
337
|
-
return () => {
|
|
338
|
-
const buffer = new Uint8Array(1);
|
|
339
|
-
globalCrypto.getRandomValues(buffer);
|
|
340
|
-
return buffer[0] / 256;
|
|
341
|
-
};
|
|
342
|
-
} else if (typeof globalCrypto?.randomBytes === "function") {
|
|
343
|
-
return () => globalCrypto.randomBytes(1).readUInt8() / 256;
|
|
344
|
-
} else if (crypto?.randomBytes) {
|
|
345
|
-
return () => crypto.randomBytes(1).readUInt8() / 256;
|
|
346
|
-
}
|
|
347
|
-
throw new ULIDError(ULIDErrorCode.PRNGDetectFailure, "Failed to find a reliable PRNG");
|
|
348
|
-
}
|
|
349
|
-
function detectRoot() {
|
|
350
|
-
if (inWebWorker())
|
|
351
|
-
return self;
|
|
352
|
-
if (typeof window !== "undefined") {
|
|
353
|
-
return window;
|
|
354
|
-
}
|
|
355
|
-
if (typeof global !== "undefined") {
|
|
356
|
-
return global;
|
|
357
|
-
}
|
|
358
|
-
if (typeof globalThis !== "undefined") {
|
|
359
|
-
return globalThis;
|
|
360
|
-
}
|
|
361
|
-
return null;
|
|
362
|
-
}
|
|
363
|
-
function encodeRandom(len, prng) {
|
|
364
|
-
let str = "";
|
|
365
|
-
for (; len > 0; len--) {
|
|
366
|
-
str = randomChar(prng) + str;
|
|
367
|
-
}
|
|
368
|
-
return str;
|
|
369
|
-
}
|
|
370
|
-
function encodeTime(now, len = TIME_LEN) {
|
|
371
|
-
if (isNaN(now)) {
|
|
372
|
-
throw new ULIDError(ULIDErrorCode.EncodeTimeValueMalformed, `Time must be a number: ${now}`);
|
|
373
|
-
} else if (now > TIME_MAX) {
|
|
374
|
-
throw new ULIDError(ULIDErrorCode.EncodeTimeSizeExceeded, `Cannot encode a time larger than ${TIME_MAX}: ${now}`);
|
|
375
|
-
} else if (now < 0) {
|
|
376
|
-
throw new ULIDError(ULIDErrorCode.EncodeTimeNegative, `Time must be positive: ${now}`);
|
|
377
|
-
} else if (Number.isInteger(now) === false) {
|
|
378
|
-
throw new ULIDError(ULIDErrorCode.EncodeTimeValueMalformed, `Time must be an integer: ${now}`);
|
|
379
|
-
}
|
|
380
|
-
let mod, str = "";
|
|
381
|
-
for (let currentLen = len; currentLen > 0; currentLen--) {
|
|
382
|
-
mod = now % ENCODING_LEN;
|
|
383
|
-
str = ENCODING.charAt(mod) + str;
|
|
384
|
-
now = (now - mod) / ENCODING_LEN;
|
|
385
|
-
}
|
|
386
|
-
return str;
|
|
387
|
-
}
|
|
388
|
-
function inWebWorker() {
|
|
389
|
-
return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope;
|
|
390
|
-
}
|
|
391
|
-
function ulid(seedTime, prng) {
|
|
392
|
-
const currentPRNG = prng || detectPRNG();
|
|
393
|
-
const seed = !seedTime || isNaN(seedTime) ? Date.now() : seedTime;
|
|
394
|
-
return encodeTime(seed, TIME_LEN) + encodeRandom(RANDOM_LEN, currentPRNG);
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export {
|
|
398
|
-
E,
|
|
399
|
-
F,
|
|
400
|
-
ulid
|
|
401
|
-
};
|
package/lib/chunks/KPMZLKQG.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
const require = __createRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
logger
|
|
5
|
-
} from "./Z2664VV5.js";
|
|
6
|
-
|
|
7
|
-
// src/commands/split/oas/constants.ts
|
|
8
|
-
var OPENAPI3_METHOD_NAMES = [
|
|
9
|
-
"get",
|
|
10
|
-
"put",
|
|
11
|
-
"post",
|
|
12
|
-
"delete",
|
|
13
|
-
"options",
|
|
14
|
-
"head",
|
|
15
|
-
"patch",
|
|
16
|
-
"trace",
|
|
17
|
-
"query"
|
|
18
|
-
];
|
|
19
|
-
var OPENAPI3_COMPONENT_NAMES = [
|
|
20
|
-
"schemas",
|
|
21
|
-
"responses",
|
|
22
|
-
"parameters",
|
|
23
|
-
"examples",
|
|
24
|
-
"headers",
|
|
25
|
-
"requestBodies",
|
|
26
|
-
"links",
|
|
27
|
-
"callbacks",
|
|
28
|
-
"securitySchemes"
|
|
29
|
-
];
|
|
30
|
-
|
|
31
|
-
// src/utils/spinner.ts
|
|
32
|
-
import * as process from "node:process";
|
|
33
|
-
var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
34
|
-
var Spinner = class {
|
|
35
|
-
frames;
|
|
36
|
-
currentFrame;
|
|
37
|
-
intervalId;
|
|
38
|
-
message;
|
|
39
|
-
constructor() {
|
|
40
|
-
this.frames = SPINNER_FRAMES;
|
|
41
|
-
this.currentFrame = 0;
|
|
42
|
-
this.intervalId = null;
|
|
43
|
-
this.message = "";
|
|
44
|
-
}
|
|
45
|
-
showFrame() {
|
|
46
|
-
logger.info("\r" + this.frames[this.currentFrame] + " " + this.message);
|
|
47
|
-
this.currentFrame = (this.currentFrame + 1) % this.frames.length;
|
|
48
|
-
}
|
|
49
|
-
start(message) {
|
|
50
|
-
if (this.message === message) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this.message = message;
|
|
54
|
-
if (!process.stderr.isTTY) {
|
|
55
|
-
logger.info(`${message}...
|
|
56
|
-
`);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
if (this.intervalId === null) {
|
|
60
|
-
this.intervalId = setInterval(() => {
|
|
61
|
-
this.showFrame();
|
|
62
|
-
}, 100);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
stop() {
|
|
66
|
-
if (this.intervalId !== null) {
|
|
67
|
-
clearInterval(this.intervalId);
|
|
68
|
-
this.intervalId = null;
|
|
69
|
-
logger.info("\r");
|
|
70
|
-
}
|
|
71
|
-
this.message = "";
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export {
|
|
76
|
-
OPENAPI3_METHOD_NAMES,
|
|
77
|
-
OPENAPI3_COMPONENT_NAMES,
|
|
78
|
-
Spinner
|
|
79
|
-
};
|