@fern-api/fern-api-dev 4.64.0 → 4.64.1
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/cli.cjs +248 -73
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -31993,7 +31993,7 @@ var require_tmp = __commonJS({
|
|
|
31993
31993
|
var fs28 = require("fs");
|
|
31994
31994
|
var os26 = require("os");
|
|
31995
31995
|
var path97 = require("path");
|
|
31996
|
-
var
|
|
31996
|
+
var crypto8 = require("crypto");
|
|
31997
31997
|
var _c4 = { fs: fs28.constants, os: os26.constants };
|
|
31998
31998
|
var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
31999
31999
|
var TEMPLATE_PATTERN = /XXXXXX/;
|
|
@@ -32173,9 +32173,9 @@ var require_tmp = __commonJS({
|
|
|
32173
32173
|
function _randomChars(howMany) {
|
|
32174
32174
|
let value = [], rnd = null;
|
|
32175
32175
|
try {
|
|
32176
|
-
rnd =
|
|
32176
|
+
rnd = crypto8.randomBytes(howMany);
|
|
32177
32177
|
} catch (e6) {
|
|
32178
|
-
rnd =
|
|
32178
|
+
rnd = crypto8.pseudoRandomBytes(howMany);
|
|
32179
32179
|
}
|
|
32180
32180
|
for (let i11 = 0; i11 < howMany; i11++) {
|
|
32181
32181
|
value.push(RANDOM_CHARS[rnd[i11] % RANDOM_CHARS.length]);
|
|
@@ -192234,7 +192234,7 @@ var require_form_data = __commonJS({
|
|
|
192234
192234
|
var parseUrl5 = require("url").parse;
|
|
192235
192235
|
var fs28 = require("fs");
|
|
192236
192236
|
var Stream5 = require("stream").Stream;
|
|
192237
|
-
var
|
|
192237
|
+
var crypto8 = require("crypto");
|
|
192238
192238
|
var mime2 = require_mime_types();
|
|
192239
192239
|
var asynckit = require_asynckit();
|
|
192240
192240
|
var setToStringTag = require_es_set_tostringtag();
|
|
@@ -192440,7 +192440,7 @@ var require_form_data = __commonJS({
|
|
|
192440
192440
|
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
|
|
192441
192441
|
};
|
|
192442
192442
|
FormData6.prototype._generateBoundary = function() {
|
|
192443
|
-
this._boundary = "--------------------------" +
|
|
192443
|
+
this._boundary = "--------------------------" + crypto8.randomBytes(12).toString("hex");
|
|
192444
192444
|
};
|
|
192445
192445
|
FormData6.prototype.getLengthSync = function() {
|
|
192446
192446
|
var knownLength = this._overheadLength + this._valueLength;
|
|
@@ -202128,7 +202128,7 @@ var require_fiddle_sdk = __commonJS({
|
|
|
202128
202128
|
var require_object_hash = __commonJS({
|
|
202129
202129
|
"../../../node_modules/.pnpm/object-hash@3.0.0/node_modules/object-hash/index.js"(exports2, module4) {
|
|
202130
202130
|
"use strict";
|
|
202131
|
-
var
|
|
202131
|
+
var crypto8 = require("crypto");
|
|
202132
202132
|
exports2 = module4.exports = objectHash;
|
|
202133
202133
|
function objectHash(object21, options2) {
|
|
202134
202134
|
options2 = applyDefaults(object21, options2);
|
|
@@ -202146,7 +202146,7 @@ var require_object_hash = __commonJS({
|
|
|
202146
202146
|
exports2.keysMD5 = function(object21) {
|
|
202147
202147
|
return objectHash(object21, { algorithm: "md5", encoding: "hex", excludeValues: true });
|
|
202148
202148
|
};
|
|
202149
|
-
var hashes =
|
|
202149
|
+
var hashes = crypto8.getHashes ? crypto8.getHashes().slice() : ["sha1", "md5"];
|
|
202150
202150
|
hashes.push("passthrough");
|
|
202151
202151
|
var encodings = ["buffer", "hex", "binary", "base64"];
|
|
202152
202152
|
function applyDefaults(object21, sourceOptions) {
|
|
@@ -202192,7 +202192,7 @@ var require_object_hash = __commonJS({
|
|
|
202192
202192
|
function hash5(object21, options2) {
|
|
202193
202193
|
var hashingStream;
|
|
202194
202194
|
if (options2.algorithm !== "passthrough") {
|
|
202195
|
-
hashingStream =
|
|
202195
|
+
hashingStream = crypto8.createHash(options2.algorithm);
|
|
202196
202196
|
} else {
|
|
202197
202197
|
hashingStream = new PassThrough5();
|
|
202198
202198
|
}
|
|
@@ -232746,14 +232746,14 @@ var require_jwa = __commonJS({
|
|
|
232746
232746
|
"../../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js"(exports2, module4) {
|
|
232747
232747
|
"use strict";
|
|
232748
232748
|
var Buffer5 = require_safe_buffer().Buffer;
|
|
232749
|
-
var
|
|
232749
|
+
var crypto8 = require("crypto");
|
|
232750
232750
|
var formatEcdsa = require_ecdsa_sig_formatter();
|
|
232751
232751
|
var util5 = require("util");
|
|
232752
232752
|
var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".';
|
|
232753
232753
|
var MSG_INVALID_SECRET = "secret must be a string or buffer";
|
|
232754
232754
|
var MSG_INVALID_VERIFIER_KEY = "key must be a string or a buffer";
|
|
232755
232755
|
var MSG_INVALID_SIGNER_KEY = "key must be a string, a buffer or an object";
|
|
232756
|
-
var supportsKeyObjects = typeof
|
|
232756
|
+
var supportsKeyObjects = typeof crypto8.createPublicKey === "function";
|
|
232757
232757
|
if (supportsKeyObjects) {
|
|
232758
232758
|
MSG_INVALID_VERIFIER_KEY += " or a KeyObject";
|
|
232759
232759
|
MSG_INVALID_SECRET += "or a KeyObject";
|
|
@@ -232843,17 +232843,17 @@ var require_jwa = __commonJS({
|
|
|
232843
232843
|
return function sign2(thing, secret) {
|
|
232844
232844
|
checkIsSecretKey(secret);
|
|
232845
232845
|
thing = normalizeInput(thing);
|
|
232846
|
-
var hmac =
|
|
232846
|
+
var hmac = crypto8.createHmac("sha" + bits, secret);
|
|
232847
232847
|
var sig = (hmac.update(thing), hmac.digest("base64"));
|
|
232848
232848
|
return fromBase642(sig);
|
|
232849
232849
|
};
|
|
232850
232850
|
}
|
|
232851
232851
|
var bufferEqual;
|
|
232852
|
-
var timingSafeEqual2 = "timingSafeEqual" in
|
|
232852
|
+
var timingSafeEqual2 = "timingSafeEqual" in crypto8 ? function timingSafeEqual3(a10, b19) {
|
|
232853
232853
|
if (a10.byteLength !== b19.byteLength) {
|
|
232854
232854
|
return false;
|
|
232855
232855
|
}
|
|
232856
|
-
return
|
|
232856
|
+
return crypto8.timingSafeEqual(a10, b19);
|
|
232857
232857
|
} : function timingSafeEqual3(a10, b19) {
|
|
232858
232858
|
if (!bufferEqual) {
|
|
232859
232859
|
bufferEqual = require_buffer_equal_constant_time();
|
|
@@ -232870,7 +232870,7 @@ var require_jwa = __commonJS({
|
|
|
232870
232870
|
return function sign2(thing, privateKey) {
|
|
232871
232871
|
checkIsPrivateKey(privateKey);
|
|
232872
232872
|
thing = normalizeInput(thing);
|
|
232873
|
-
var signer =
|
|
232873
|
+
var signer = crypto8.createSign("RSA-SHA" + bits);
|
|
232874
232874
|
var sig = (signer.update(thing), signer.sign(privateKey, "base64"));
|
|
232875
232875
|
return fromBase642(sig);
|
|
232876
232876
|
};
|
|
@@ -232880,7 +232880,7 @@ var require_jwa = __commonJS({
|
|
|
232880
232880
|
checkIsPublicKey(publicKey);
|
|
232881
232881
|
thing = normalizeInput(thing);
|
|
232882
232882
|
signature = toBase64(signature);
|
|
232883
|
-
var verifier =
|
|
232883
|
+
var verifier = crypto8.createVerify("RSA-SHA" + bits);
|
|
232884
232884
|
verifier.update(thing);
|
|
232885
232885
|
return verifier.verify(publicKey, signature, "base64");
|
|
232886
232886
|
};
|
|
@@ -232889,11 +232889,11 @@ var require_jwa = __commonJS({
|
|
|
232889
232889
|
return function sign2(thing, privateKey) {
|
|
232890
232890
|
checkIsPrivateKey(privateKey);
|
|
232891
232891
|
thing = normalizeInput(thing);
|
|
232892
|
-
var signer =
|
|
232892
|
+
var signer = crypto8.createSign("RSA-SHA" + bits);
|
|
232893
232893
|
var sig = (signer.update(thing), signer.sign({
|
|
232894
232894
|
key: privateKey,
|
|
232895
|
-
padding:
|
|
232896
|
-
saltLength:
|
|
232895
|
+
padding: crypto8.constants.RSA_PKCS1_PSS_PADDING,
|
|
232896
|
+
saltLength: crypto8.constants.RSA_PSS_SALTLEN_DIGEST
|
|
232897
232897
|
}, "base64"));
|
|
232898
232898
|
return fromBase642(sig);
|
|
232899
232899
|
};
|
|
@@ -232903,12 +232903,12 @@ var require_jwa = __commonJS({
|
|
|
232903
232903
|
checkIsPublicKey(publicKey);
|
|
232904
232904
|
thing = normalizeInput(thing);
|
|
232905
232905
|
signature = toBase64(signature);
|
|
232906
|
-
var verifier =
|
|
232906
|
+
var verifier = crypto8.createVerify("RSA-SHA" + bits);
|
|
232907
232907
|
verifier.update(thing);
|
|
232908
232908
|
return verifier.verify({
|
|
232909
232909
|
key: publicKey,
|
|
232910
|
-
padding:
|
|
232911
|
-
saltLength:
|
|
232910
|
+
padding: crypto8.constants.RSA_PKCS1_PSS_PADDING,
|
|
232911
|
+
saltLength: crypto8.constants.RSA_PSS_SALTLEN_DIGEST
|
|
232912
232912
|
}, signature, "base64");
|
|
232913
232913
|
};
|
|
232914
232914
|
}
|
|
@@ -234716,9 +234716,9 @@ var require_webcrypto = __commonJS({
|
|
|
234716
234716
|
"use strict";
|
|
234717
234717
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
234718
234718
|
exports2.isCryptoKey = void 0;
|
|
234719
|
-
var
|
|
234719
|
+
var crypto8 = require("crypto");
|
|
234720
234720
|
var util5 = require("util");
|
|
234721
|
-
var webcrypto =
|
|
234721
|
+
var webcrypto = crypto8.webcrypto;
|
|
234722
234722
|
exports2.default = webcrypto;
|
|
234723
234723
|
exports2.isCryptoKey = util5.types.isCryptoKey ? (key2) => util5.types.isCryptoKey(key2) : (key2) => false;
|
|
234724
234724
|
}
|
|
@@ -237369,22 +237369,22 @@ var require_sign3 = __commonJS({
|
|
|
237369
237369
|
"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/node/cjs/runtime/sign.js"(exports2) {
|
|
237370
237370
|
"use strict";
|
|
237371
237371
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
237372
|
-
var
|
|
237372
|
+
var crypto8 = require("crypto");
|
|
237373
237373
|
var util_1 = require("util");
|
|
237374
237374
|
var dsa_digest_js_1 = require_dsa_digest();
|
|
237375
237375
|
var hmac_digest_js_1 = require_hmac_digest();
|
|
237376
237376
|
var node_key_js_1 = require_node_key();
|
|
237377
237377
|
var get_sign_verify_key_js_1 = require_get_sign_verify_key();
|
|
237378
237378
|
var oneShotSign;
|
|
237379
|
-
if (
|
|
237380
|
-
oneShotSign = (0, util_1.promisify)(
|
|
237379
|
+
if (crypto8.sign.length > 3) {
|
|
237380
|
+
oneShotSign = (0, util_1.promisify)(crypto8.sign);
|
|
237381
237381
|
} else {
|
|
237382
|
-
oneShotSign =
|
|
237382
|
+
oneShotSign = crypto8.sign;
|
|
237383
237383
|
}
|
|
237384
237384
|
var sign2 = async (alg, key2, data2) => {
|
|
237385
237385
|
const keyObject = (0, get_sign_verify_key_js_1.default)(alg, key2, "sign");
|
|
237386
237386
|
if (alg.startsWith("HS")) {
|
|
237387
|
-
const hmac =
|
|
237387
|
+
const hmac = crypto8.createHmac((0, hmac_digest_js_1.default)(alg), keyObject);
|
|
237388
237388
|
hmac.update(data2);
|
|
237389
237389
|
return hmac.digest();
|
|
237390
237390
|
}
|
|
@@ -237399,7 +237399,7 @@ var require_verify2 = __commonJS({
|
|
|
237399
237399
|
"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/node/cjs/runtime/verify.js"(exports2) {
|
|
237400
237400
|
"use strict";
|
|
237401
237401
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
237402
|
-
var
|
|
237402
|
+
var crypto8 = require("crypto");
|
|
237403
237403
|
var util_1 = require("util");
|
|
237404
237404
|
var dsa_digest_js_1 = require_dsa_digest();
|
|
237405
237405
|
var node_key_js_1 = require_node_key();
|
|
@@ -237407,10 +237407,10 @@ var require_verify2 = __commonJS({
|
|
|
237407
237407
|
var get_sign_verify_key_js_1 = require_get_sign_verify_key();
|
|
237408
237408
|
var flags_js_1 = require_flags();
|
|
237409
237409
|
var oneShotVerify;
|
|
237410
|
-
if (
|
|
237411
|
-
oneShotVerify = (0, util_1.promisify)(
|
|
237410
|
+
if (crypto8.verify.length > 4 && flags_js_1.oneShotCallback) {
|
|
237411
|
+
oneShotVerify = (0, util_1.promisify)(crypto8.verify);
|
|
237412
237412
|
} else {
|
|
237413
|
-
oneShotVerify =
|
|
237413
|
+
oneShotVerify = crypto8.verify;
|
|
237414
237414
|
}
|
|
237415
237415
|
var verify2 = async (alg, key2, signature, data2) => {
|
|
237416
237416
|
const keyObject = (0, get_sign_verify_key_js_1.default)(alg, key2, "verify");
|
|
@@ -237418,7 +237418,7 @@ var require_verify2 = __commonJS({
|
|
|
237418
237418
|
const expected = await (0, sign_js_1.default)(alg, keyObject, data2);
|
|
237419
237419
|
const actual = signature;
|
|
237420
237420
|
try {
|
|
237421
|
-
return
|
|
237421
|
+
return crypto8.timingSafeEqual(actual, expected);
|
|
237422
237422
|
} catch {
|
|
237423
237423
|
return false;
|
|
237424
237424
|
}
|
|
@@ -297745,14 +297745,14 @@ var require_etag = __commonJS({
|
|
|
297745
297745
|
"../../../node_modules/.pnpm/etag@1.8.1/node_modules/etag/index.js"(exports2, module4) {
|
|
297746
297746
|
"use strict";
|
|
297747
297747
|
module4.exports = etag;
|
|
297748
|
-
var
|
|
297748
|
+
var crypto8 = require("crypto");
|
|
297749
297749
|
var Stats = require("fs").Stats;
|
|
297750
297750
|
var toString11 = Object.prototype.toString;
|
|
297751
297751
|
function entitytag(entity) {
|
|
297752
297752
|
if (entity.length === 0) {
|
|
297753
297753
|
return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"';
|
|
297754
297754
|
}
|
|
297755
|
-
var hash5 =
|
|
297755
|
+
var hash5 = crypto8.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27);
|
|
297756
297756
|
var len = typeof entity === "string" ? Buffer.byteLength(entity, "utf8") : entity.length;
|
|
297757
297757
|
return '"' + len.toString(16) + "-" + hash5 + '"';
|
|
297758
297758
|
}
|
|
@@ -300531,11 +300531,11 @@ var require_request3 = __commonJS({
|
|
|
300531
300531
|
var require_cookie_signature = __commonJS({
|
|
300532
300532
|
"../../../node_modules/.pnpm/cookie-signature@1.0.7/node_modules/cookie-signature/index.js"(exports2) {
|
|
300533
300533
|
"use strict";
|
|
300534
|
-
var
|
|
300534
|
+
var crypto8 = require("crypto");
|
|
300535
300535
|
exports2.sign = function(val, secret) {
|
|
300536
300536
|
if ("string" !== typeof val) throw new TypeError("Cookie value must be provided as a string.");
|
|
300537
300537
|
if (null == secret) throw new TypeError("Secret key must be provided.");
|
|
300538
|
-
return val + "." +
|
|
300538
|
+
return val + "." + crypto8.createHmac("sha256", secret).update(val).digest("base64").replace(/\=+$/, "");
|
|
300539
300539
|
};
|
|
300540
300540
|
exports2.unsign = function(val, secret) {
|
|
300541
300541
|
if ("string" !== typeof val) throw new TypeError("Signed cookie string must be provided.");
|
|
@@ -300544,7 +300544,7 @@ var require_cookie_signature = __commonJS({
|
|
|
300544
300544
|
return sha1(mac3) == sha1(val) ? str3 : false;
|
|
300545
300545
|
};
|
|
300546
300546
|
function sha1(str3) {
|
|
300547
|
-
return
|
|
300547
|
+
return crypto8.createHash("sha1").update(str3).digest("hex");
|
|
300548
300548
|
}
|
|
300549
300549
|
}
|
|
300550
300550
|
});
|
|
@@ -425931,7 +425931,7 @@ var require_dist22 = __commonJS({
|
|
|
425931
425931
|
exports2.PacProxyAgent = void 0;
|
|
425932
425932
|
var net4 = __importStar2(require("net"));
|
|
425933
425933
|
var tls2 = __importStar2(require("tls"));
|
|
425934
|
-
var
|
|
425934
|
+
var crypto8 = __importStar2(require("crypto"));
|
|
425935
425935
|
var events_1 = require("events");
|
|
425936
425936
|
var debug_1 = __importDefault2(require_src());
|
|
425937
425937
|
var url_1 = require("url");
|
|
@@ -425984,7 +425984,7 @@ var require_dist22 = __commonJS({
|
|
|
425984
425984
|
(0, quickjs_emscripten_1.getQuickJS)(),
|
|
425985
425985
|
this.loadPacFile()
|
|
425986
425986
|
]);
|
|
425987
|
-
const hash5 =
|
|
425987
|
+
const hash5 = crypto8.createHash("sha1").update(code5).digest("hex");
|
|
425988
425988
|
if (this.resolver && this.resolverHash === hash5) {
|
|
425989
425989
|
debug9("Same sha1 hash for code - contents have not changed, reusing previous proxy resolver");
|
|
425990
425990
|
return this.resolver;
|
|
@@ -445834,11 +445834,11 @@ var require_util11 = __commonJS({
|
|
|
445834
445834
|
var { isUint8Array: isUint8Array3 } = require("util/types");
|
|
445835
445835
|
var { webidl } = require_webidl();
|
|
445836
445836
|
var supportedHashes = [];
|
|
445837
|
-
var
|
|
445837
|
+
var crypto8;
|
|
445838
445838
|
try {
|
|
445839
|
-
|
|
445839
|
+
crypto8 = require("crypto");
|
|
445840
445840
|
const possibleRelevantHashes = ["sha256", "sha384", "sha512"];
|
|
445841
|
-
supportedHashes =
|
|
445841
|
+
supportedHashes = crypto8.getHashes().filter((hash5) => possibleRelevantHashes.includes(hash5));
|
|
445842
445842
|
} catch {
|
|
445843
445843
|
}
|
|
445844
445844
|
function responseURL(response) {
|
|
@@ -446111,7 +446111,7 @@ var require_util11 = __commonJS({
|
|
|
446111
446111
|
}
|
|
446112
446112
|
}
|
|
446113
446113
|
function bytesMatch(bytes, metadataList) {
|
|
446114
|
-
if (
|
|
446114
|
+
if (crypto8 === void 0) {
|
|
446115
446115
|
return true;
|
|
446116
446116
|
}
|
|
446117
446117
|
const parsedMetadata = parseMetadata(metadataList);
|
|
@@ -446126,7 +446126,7 @@ var require_util11 = __commonJS({
|
|
|
446126
446126
|
for (const item of metadata) {
|
|
446127
446127
|
const algorithm = item.algo;
|
|
446128
446128
|
const expectedValue = item.hash;
|
|
446129
|
-
let actualValue =
|
|
446129
|
+
let actualValue = crypto8.createHash(algorithm).update(bytes).digest("base64");
|
|
446130
446130
|
if (actualValue[actualValue.length - 1] === "=") {
|
|
446131
446131
|
if (actualValue[actualValue.length - 2] === "=") {
|
|
446132
446132
|
actualValue = actualValue.slice(0, -2);
|
|
@@ -447190,8 +447190,8 @@ var require_body = __commonJS({
|
|
|
447190
447190
|
var { multipartFormDataParser } = require_formdata_parser();
|
|
447191
447191
|
var random;
|
|
447192
447192
|
try {
|
|
447193
|
-
const
|
|
447194
|
-
random = (max) =>
|
|
447193
|
+
const crypto8 = require("crypto");
|
|
447194
|
+
random = (max) => crypto8.randomInt(0, max);
|
|
447195
447195
|
} catch {
|
|
447196
447196
|
random = (max) => Math.floor(Math.random(max));
|
|
447197
447197
|
}
|
|
@@ -458602,13 +458602,13 @@ var require_frame = __commonJS({
|
|
|
458602
458602
|
"use strict";
|
|
458603
458603
|
var { maxUnsigned16Bit } = require_constants13();
|
|
458604
458604
|
var BUFFER_SIZE = 16386;
|
|
458605
|
-
var
|
|
458605
|
+
var crypto8;
|
|
458606
458606
|
var buffer = null;
|
|
458607
458607
|
var bufIdx = BUFFER_SIZE;
|
|
458608
458608
|
try {
|
|
458609
|
-
|
|
458609
|
+
crypto8 = require("crypto");
|
|
458610
458610
|
} catch {
|
|
458611
|
-
|
|
458611
|
+
crypto8 = {
|
|
458612
458612
|
// not full compatibility, but minimum.
|
|
458613
458613
|
randomFillSync: function randomFillSync(buffer2, _offset, _size2) {
|
|
458614
458614
|
for (let i11 = 0; i11 < buffer2.length; ++i11) {
|
|
@@ -458621,7 +458621,7 @@ var require_frame = __commonJS({
|
|
|
458621
458621
|
function generateMask() {
|
|
458622
458622
|
if (bufIdx === BUFFER_SIZE) {
|
|
458623
458623
|
bufIdx = 0;
|
|
458624
|
-
|
|
458624
|
+
crypto8.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE);
|
|
458625
458625
|
}
|
|
458626
458626
|
return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]];
|
|
458627
458627
|
}
|
|
@@ -458693,9 +458693,9 @@ var require_connection = __commonJS({
|
|
|
458693
458693
|
var { Headers: Headers5, getHeadersList } = require_headers3();
|
|
458694
458694
|
var { getDecodeSplit } = require_util11();
|
|
458695
458695
|
var { WebsocketFrameSend } = require_frame();
|
|
458696
|
-
var
|
|
458696
|
+
var crypto8;
|
|
458697
458697
|
try {
|
|
458698
|
-
|
|
458698
|
+
crypto8 = require("crypto");
|
|
458699
458699
|
} catch {
|
|
458700
458700
|
}
|
|
458701
458701
|
function establishWebSocketConnection(url3, protocols, client3, ws8, onEstablish, options2) {
|
|
@@ -458715,7 +458715,7 @@ var require_connection = __commonJS({
|
|
|
458715
458715
|
const headersList = getHeadersList(new Headers5(options2.headers));
|
|
458716
458716
|
request7.headersList = headersList;
|
|
458717
458717
|
}
|
|
458718
|
-
const keyValue =
|
|
458718
|
+
const keyValue = crypto8.randomBytes(16).toString("base64");
|
|
458719
458719
|
request7.headersList.append("sec-websocket-key", keyValue);
|
|
458720
458720
|
request7.headersList.append("sec-websocket-version", "13");
|
|
458721
458721
|
for (const protocol2 of protocols) {
|
|
@@ -458745,7 +458745,7 @@ var require_connection = __commonJS({
|
|
|
458745
458745
|
return;
|
|
458746
458746
|
}
|
|
458747
458747
|
const secWSAccept = response.headersList.get("Sec-WebSocket-Accept");
|
|
458748
|
-
const digest =
|
|
458748
|
+
const digest = crypto8.createHash("sha1").update(keyValue + uid).digest("base64");
|
|
458749
458749
|
if (secWSAccept !== digest) {
|
|
458750
458750
|
failWebsocketConnection(ws8, "Incorrect hash received in Sec-WebSocket-Accept header.");
|
|
458751
458751
|
return;
|
|
@@ -603773,7 +603773,7 @@ var AccessTokenPosthogManager = class {
|
|
|
603773
603773
|
properties: {
|
|
603774
603774
|
...event,
|
|
603775
603775
|
...event.properties,
|
|
603776
|
-
version: "4.64.
|
|
603776
|
+
version: "4.64.1",
|
|
603777
603777
|
usingAccessToken: true
|
|
603778
603778
|
}
|
|
603779
603779
|
});
|
|
@@ -603824,7 +603824,7 @@ var UserPosthogManager = class {
|
|
|
603824
603824
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
603825
603825
|
event: "CLI",
|
|
603826
603826
|
properties: {
|
|
603827
|
-
version: "4.64.
|
|
603827
|
+
version: "4.64.1",
|
|
603828
603828
|
...event,
|
|
603829
603829
|
...event.properties,
|
|
603830
603830
|
usingAccessToken: false,
|
|
@@ -607836,10 +607836,10 @@ var emptyUuid;
|
|
|
607836
607836
|
function getRandomByte() {
|
|
607837
607837
|
return safeMathRandom() * 16;
|
|
607838
607838
|
}
|
|
607839
|
-
function uuid42(
|
|
607839
|
+
function uuid42(crypto8 = getCrypto()) {
|
|
607840
607840
|
try {
|
|
607841
|
-
if (
|
|
607842
|
-
return withRandomSafeContext(() =>
|
|
607841
|
+
if (crypto8?.randomUUID) {
|
|
607842
|
+
return withRandomSafeContext(() => crypto8.randomUUID()).replace(/-/g, "");
|
|
607843
607843
|
}
|
|
607844
607844
|
} catch {
|
|
607845
607845
|
}
|
|
@@ -611239,6 +611239,9 @@ function captureException(exception2, hint) {
|
|
|
611239
611239
|
function captureEvent(event, hint) {
|
|
611240
611240
|
return getCurrentScope().captureEvent(event, hint);
|
|
611241
611241
|
}
|
|
611242
|
+
function setTag7(key2, value) {
|
|
611243
|
+
getIsolationScope().setTag(key2, value);
|
|
611244
|
+
}
|
|
611242
611245
|
async function flush(timeout4) {
|
|
611243
611246
|
const client3 = getClient();
|
|
611244
611247
|
if (client3) {
|
|
@@ -840791,7 +840794,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
840791
840794
|
var LOGS_FOLDER_NAME = "logs";
|
|
840792
840795
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
840793
840796
|
function getCliSource() {
|
|
840794
|
-
const version7 = "4.64.
|
|
840797
|
+
const version7 = "4.64.1";
|
|
840795
840798
|
return `cli@${version7}`;
|
|
840796
840799
|
}
|
|
840797
840800
|
var DebugLogger = class {
|
|
@@ -851989,7 +851992,7 @@ var LegacyDocsPublisher = class {
|
|
|
851989
851992
|
previewId,
|
|
851990
851993
|
disableTemplates: void 0,
|
|
851991
851994
|
skipUpload,
|
|
851992
|
-
cliVersion: "4.64.
|
|
851995
|
+
cliVersion: "4.64.1"
|
|
851993
851996
|
});
|
|
851994
851997
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
851995
851998
|
return { success: false };
|
|
@@ -872386,28 +872389,162 @@ var DynamicLiteralMapper = class extends WithGeneration {
|
|
|
872386
872389
|
}));
|
|
872387
872390
|
}
|
|
872388
872391
|
convertObject({ object_, value, fallbackToDefault }) {
|
|
872392
|
+
const record21 = this.context.getRecord(value) ?? {};
|
|
872389
872393
|
const properties7 = this.context.associateByWireValue({
|
|
872390
872394
|
parameters: object_.properties,
|
|
872391
|
-
values:
|
|
872395
|
+
values: record21
|
|
872392
872396
|
});
|
|
872397
|
+
const fields = properties7.map((property23) => {
|
|
872398
|
+
this.context.errors.scope(property23.name.wireValue);
|
|
872399
|
+
try {
|
|
872400
|
+
return {
|
|
872401
|
+
name: this.context.getClassName(property23.name.name),
|
|
872402
|
+
value: this.convert(property23)
|
|
872403
|
+
};
|
|
872404
|
+
} finally {
|
|
872405
|
+
this.context.errors.unscope();
|
|
872406
|
+
}
|
|
872407
|
+
});
|
|
872408
|
+
const providedWireValues = new Set(Object.keys(record21));
|
|
872409
|
+
for (const property23 of object_.properties) {
|
|
872410
|
+
const fieldName = this.context.getClassName(property23.name.name);
|
|
872411
|
+
if (providedWireValues.has(property23.name.wireValue)) {
|
|
872412
|
+
if (this.isRequiredProperty(property23.typeReference)) {
|
|
872413
|
+
const existing = fields.find((f10) => f10.name === fieldName);
|
|
872414
|
+
if (existing != null && is9.Literal.nop(existing.value)) {
|
|
872415
|
+
const defaultValue = this.getDefaultLiteralForType(property23.typeReference);
|
|
872416
|
+
if (defaultValue != null) {
|
|
872417
|
+
existing.value = defaultValue;
|
|
872418
|
+
}
|
|
872419
|
+
}
|
|
872420
|
+
}
|
|
872421
|
+
continue;
|
|
872422
|
+
}
|
|
872423
|
+
if (this.isRequiredProperty(property23.typeReference)) {
|
|
872424
|
+
const defaultValue = this.getDefaultLiteralForType(property23.typeReference);
|
|
872425
|
+
if (defaultValue != null) {
|
|
872426
|
+
fields.push({
|
|
872427
|
+
name: fieldName,
|
|
872428
|
+
value: defaultValue
|
|
872429
|
+
});
|
|
872430
|
+
}
|
|
872431
|
+
}
|
|
872432
|
+
}
|
|
872393
872433
|
return this.csharp.Literal.class_({
|
|
872394
872434
|
reference: this.csharp.classReference({
|
|
872395
872435
|
origin: object_.declaration,
|
|
872396
872436
|
namespace: this.context.getNamespace(object_.declaration.fernFilepath)
|
|
872397
872437
|
}),
|
|
872398
|
-
fields
|
|
872399
|
-
|
|
872400
|
-
|
|
872401
|
-
|
|
872438
|
+
fields
|
|
872439
|
+
});
|
|
872440
|
+
}
|
|
872441
|
+
isRequiredProperty(typeReference2) {
|
|
872442
|
+
if (this.context.isOptional(typeReference2) || this.context.isNullable(typeReference2)) {
|
|
872443
|
+
return false;
|
|
872444
|
+
}
|
|
872445
|
+
if (typeReference2.type === "list" || typeReference2.type === "set" || typeReference2.type === "map") {
|
|
872446
|
+
return false;
|
|
872447
|
+
}
|
|
872448
|
+
return true;
|
|
872449
|
+
}
|
|
872450
|
+
getDefaultLiteralForType(typeReference2, visitedTypeIds) {
|
|
872451
|
+
switch (typeReference2.type) {
|
|
872452
|
+
case "primitive":
|
|
872453
|
+
return this.getDefaultLiteralForPrimitive(typeReference2.value);
|
|
872454
|
+
case "literal":
|
|
872455
|
+
return this.convertLiteral({ literal: typeReference2.value, value: typeReference2.value.value });
|
|
872456
|
+
case "named": {
|
|
872457
|
+
const named = this.context.resolveNamedType({ typeId: typeReference2.value });
|
|
872458
|
+
if (named == null) {
|
|
872459
|
+
return void 0;
|
|
872460
|
+
}
|
|
872461
|
+
if (named.type === "alias") {
|
|
872462
|
+
return this.getDefaultLiteralForType(named.typeReference, visitedTypeIds);
|
|
872463
|
+
}
|
|
872464
|
+
if (named.type === "enum" && named.values.length > 0) {
|
|
872465
|
+
const firstEnumValue = named.values[0];
|
|
872466
|
+
if (firstEnumValue != null) {
|
|
872467
|
+
return this.getEnumValue(named, firstEnumValue.wireValue);
|
|
872468
|
+
}
|
|
872469
|
+
}
|
|
872470
|
+
if (named.type === "undiscriminatedUnion") {
|
|
872471
|
+
return this.getDefaultLiteralForUndiscriminatedUnion(named, visitedTypeIds);
|
|
872472
|
+
}
|
|
872473
|
+
if (named.type === "object") {
|
|
872474
|
+
return this.getDefaultLiteralForObject(named, typeReference2.value, visitedTypeIds);
|
|
872475
|
+
}
|
|
872476
|
+
return void 0;
|
|
872477
|
+
}
|
|
872478
|
+
default:
|
|
872479
|
+
return void 0;
|
|
872480
|
+
}
|
|
872481
|
+
}
|
|
872482
|
+
getDefaultLiteralForObject(object_, typeId, visitedTypeIds) {
|
|
872483
|
+
const visited = visitedTypeIds ?? /* @__PURE__ */ new Set();
|
|
872484
|
+
if (visited.has(typeId)) {
|
|
872485
|
+
return void 0;
|
|
872486
|
+
}
|
|
872487
|
+
visited.add(typeId);
|
|
872488
|
+
const fields = [];
|
|
872489
|
+
for (const property23 of object_.properties) {
|
|
872490
|
+
if (this.isRequiredProperty(property23.typeReference)) {
|
|
872491
|
+
const defaultValue = this.getDefaultLiteralForType(property23.typeReference, visited);
|
|
872492
|
+
if (defaultValue != null) {
|
|
872493
|
+
fields.push({
|
|
872402
872494
|
name: this.context.getClassName(property23.name.name),
|
|
872403
|
-
value:
|
|
872404
|
-
};
|
|
872405
|
-
} finally {
|
|
872406
|
-
this.context.errors.unscope();
|
|
872495
|
+
value: defaultValue
|
|
872496
|
+
});
|
|
872407
872497
|
}
|
|
872408
|
-
}
|
|
872498
|
+
}
|
|
872499
|
+
}
|
|
872500
|
+
visited.delete(typeId);
|
|
872501
|
+
return this.csharp.Literal.class_({
|
|
872502
|
+
reference: this.csharp.classReference({
|
|
872503
|
+
origin: object_.declaration,
|
|
872504
|
+
namespace: this.context.getNamespace(object_.declaration.fernFilepath)
|
|
872505
|
+
}),
|
|
872506
|
+
fields
|
|
872409
872507
|
});
|
|
872410
872508
|
}
|
|
872509
|
+
getDefaultLiteralForUndiscriminatedUnion(union21, visitedTypeIds) {
|
|
872510
|
+
for (const typeReference2 of union21.types) {
|
|
872511
|
+
const defaultValue = this.getDefaultLiteralForType(typeReference2, visitedTypeIds);
|
|
872512
|
+
if (defaultValue != null) {
|
|
872513
|
+
return defaultValue;
|
|
872514
|
+
}
|
|
872515
|
+
}
|
|
872516
|
+
return void 0;
|
|
872517
|
+
}
|
|
872518
|
+
getDefaultLiteralForPrimitive(primitive) {
|
|
872519
|
+
switch (primitive) {
|
|
872520
|
+
case "INTEGER":
|
|
872521
|
+
return this.csharp.Literal.integer(0);
|
|
872522
|
+
case "LONG":
|
|
872523
|
+
return this.csharp.Literal.long(0);
|
|
872524
|
+
case "UINT":
|
|
872525
|
+
return this.csharp.Literal.uint(0);
|
|
872526
|
+
case "UINT_64":
|
|
872527
|
+
return this.csharp.Literal.ulong(0);
|
|
872528
|
+
case "FLOAT":
|
|
872529
|
+
return this.csharp.Literal.float(0);
|
|
872530
|
+
case "DOUBLE":
|
|
872531
|
+
return this.csharp.Literal.double(0);
|
|
872532
|
+
case "BOOLEAN":
|
|
872533
|
+
return this.csharp.Literal.boolean(false);
|
|
872534
|
+
case "STRING":
|
|
872535
|
+
case "UUID":
|
|
872536
|
+
case "BASE_64":
|
|
872537
|
+
case "BIG_INTEGER":
|
|
872538
|
+
return this.csharp.Literal.string("");
|
|
872539
|
+
case "DATE":
|
|
872540
|
+
return this.csharp.Literal.date("0001-01-01");
|
|
872541
|
+
case "DATE_TIME":
|
|
872542
|
+
case "DATE_TIME_RFC_2822":
|
|
872543
|
+
return this.csharp.Literal.datetime("0001-01-01T00:00:00.000Z");
|
|
872544
|
+
default:
|
|
872545
|
+
assertNever(primitive);
|
|
872546
|
+
}
|
|
872547
|
+
}
|
|
872411
872548
|
convertUndiscriminatedUnion({ undiscriminatedUnion: undiscriminatedUnion20, value, fallbackToDefault }) {
|
|
872412
872549
|
const result = this.findMatchingUndiscriminatedUnionType({
|
|
872413
872550
|
undiscriminatedUnion: undiscriminatedUnion20,
|
|
@@ -886519,6 +886656,10 @@ var DynamicSnippetsGeneratorContext5 = class _DynamicSnippetsGeneratorContext ex
|
|
|
886519
886656
|
if (this.customConfig.use_api_name_in_package) {
|
|
886520
886657
|
return [cleanOrganizationName, this.getApiName()];
|
|
886521
886658
|
}
|
|
886659
|
+
if (this.customConfig.package_path != null) {
|
|
886660
|
+
const pathSegments = this.customConfig.package_path.replace(/\//g, ".").split(".");
|
|
886661
|
+
return [cleanOrganizationName, ...pathSegments];
|
|
886662
|
+
}
|
|
886522
886663
|
return [cleanOrganizationName];
|
|
886523
886664
|
}
|
|
886524
886665
|
getCoreModulePath() {
|
|
@@ -924836,6 +924977,38 @@ var esm_default16 = createPrompt((config5, done) => {
|
|
|
924836
924977
|
// src/cli-context/CliContext.ts
|
|
924837
924978
|
init_lodash();
|
|
924838
924979
|
|
|
924980
|
+
// src/fernRunId.ts
|
|
924981
|
+
var FERN_RUN_ID_ENV_VAR = "FERN_RUN_ID";
|
|
924982
|
+
function getOrCreateFernRunId() {
|
|
924983
|
+
const existing = process.env[FERN_RUN_ID_ENV_VAR];
|
|
924984
|
+
if (existing != null && existing.length > 0) {
|
|
924985
|
+
return existing;
|
|
924986
|
+
}
|
|
924987
|
+
const runId = crypto.randomUUID();
|
|
924988
|
+
process.env[FERN_RUN_ID_ENV_VAR] = runId;
|
|
924989
|
+
return runId;
|
|
924990
|
+
}
|
|
924991
|
+
function getFernRunId() {
|
|
924992
|
+
return process.env[FERN_RUN_ID_ENV_VAR];
|
|
924993
|
+
}
|
|
924994
|
+
|
|
924995
|
+
// src/telemetry/sentryRunId.ts
|
|
924996
|
+
function setSentryFernRunIdTag() {
|
|
924997
|
+
const fernRunId = getFernRunId();
|
|
924998
|
+
if (fernRunId != null) {
|
|
924999
|
+
setTag7("fern_run_id", fernRunId);
|
|
925000
|
+
}
|
|
925001
|
+
}
|
|
925002
|
+
function setSentryGithubRunIdTag() {
|
|
925003
|
+
if (process.env.GITHUB_RUN_ID != null) {
|
|
925004
|
+
setTag7("github_run_id", process.env.GITHUB_RUN_ID);
|
|
925005
|
+
}
|
|
925006
|
+
}
|
|
925007
|
+
function setSentryRunIdTags() {
|
|
925008
|
+
setSentryFernRunIdTag();
|
|
925009
|
+
setSentryGithubRunIdTag();
|
|
925010
|
+
}
|
|
925011
|
+
|
|
924839
925012
|
// src/telemetry/SentryClient.ts
|
|
924840
925013
|
var SentryClient = class {
|
|
924841
925014
|
sentry;
|
|
@@ -924855,6 +925028,7 @@ var SentryClient = class {
|
|
|
924855
925028
|
integrations: [rewriteFramesIntegration()],
|
|
924856
925029
|
tracesSampleRate: 0
|
|
924857
925030
|
});
|
|
925031
|
+
setSentryRunIdTags();
|
|
924858
925032
|
}
|
|
924859
925033
|
}
|
|
924860
925034
|
async captureException(error50) {
|
|
@@ -925402,7 +925576,7 @@ var CliContext = class {
|
|
|
925402
925576
|
if (false) {
|
|
925403
925577
|
this.logger.error("CLI_VERSION is not defined");
|
|
925404
925578
|
}
|
|
925405
|
-
return "4.64.
|
|
925579
|
+
return "4.64.1";
|
|
925406
925580
|
}
|
|
925407
925581
|
getCliName() {
|
|
925408
925582
|
if (false) {
|
|
@@ -943322,6 +943496,7 @@ function evaluateRuntime4() {
|
|
|
943322
943496
|
void runCli();
|
|
943323
943497
|
var USE_NODE_18_OR_ABOVE_MESSAGE = "The Fern CLI requires Node 18+ or above.";
|
|
943324
943498
|
async function runCli() {
|
|
943499
|
+
getOrCreateFernRunId();
|
|
943325
943500
|
const isLocal = process.argv.includes("--local");
|
|
943326
943501
|
const cliContext = new CliContext(process.stdout, process.stderr, { isLocal });
|
|
943327
943502
|
const exit3 = async () => {
|
package/package.json
CHANGED