@fern-api/fern-api-dev 4.76.0 → 4.76.1-2-g6b9106e3061
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 +216 -140
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -345167,6 +345167,7 @@ var require_GithubStep = __commonJS({
|
|
|
345167
345167
|
exports2.GithubStep = void 0;
|
|
345168
345168
|
exports2.enrichPrBodyForAutomation = enrichPrBodyForAutomation;
|
|
345169
345169
|
exports2.shouldEnableAutomerge = shouldEnableAutomerge;
|
|
345170
|
+
exports2.shouldPushGenerationBaseTag = shouldPushGenerationBaseTag;
|
|
345170
345171
|
exports2.resolveBranchAction = resolveBranchAction;
|
|
345171
345172
|
var core_utils_1 = (init_lib4(), __toCommonJS(lib_exports));
|
|
345172
345173
|
var github_1 = (init_lib7(), __toCommonJS(lib_exports3));
|
|
@@ -345246,7 +345247,11 @@ var require_GithubStep = __commonJS({
|
|
|
345246
345247
|
});
|
|
345247
345248
|
switch (branchAction) {
|
|
345248
345249
|
case "replay-branch":
|
|
345249
|
-
|
|
345250
|
+
if (shouldPushGenerationBaseTag(replayResult)) {
|
|
345251
|
+
generationBaseSha = await (0, createReplayBranch_1.createReplayBranch)(repository, prBranch, this.config.commitMessage, replayConflictInfo, this.logger);
|
|
345252
|
+
} else {
|
|
345253
|
+
await repository.createBranchFromHead(prBranch);
|
|
345254
|
+
}
|
|
345250
345255
|
break;
|
|
345251
345256
|
case "create-from-head":
|
|
345252
345257
|
await repository.createBranchFromHead(prBranch);
|
|
@@ -345444,6 +345449,9 @@ _Fern Run ID: \`${config5.runId}\`_`;
|
|
|
345444
345449
|
function shouldEnableAutomerge(config5) {
|
|
345445
345450
|
return config5.automationMode === true && config5.autoMerge === true && config5.hasBreakingChanges !== true;
|
|
345446
345451
|
}
|
|
345452
|
+
function shouldPushGenerationBaseTag(replayResult) {
|
|
345453
|
+
return (replayResult?.patchesWithConflicts ?? 0) > 0;
|
|
345454
|
+
}
|
|
345447
345455
|
function resolveBranchAction({ automationMode, skipCommit, existingPR }) {
|
|
345448
345456
|
if (skipCommit) {
|
|
345449
345457
|
return "replay-branch";
|
|
@@ -354642,6 +354650,7 @@ var require_replay_run = __commonJS({
|
|
|
354642
354650
|
"use strict";
|
|
354643
354651
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
354644
354652
|
exports2.replayRun = replayRun;
|
|
354653
|
+
exports2.isTagMergedIntoHead = isTagMergedIntoHead;
|
|
354645
354654
|
var replay_1 = require_dist14();
|
|
354646
354655
|
var child_process_1 = require("child_process");
|
|
354647
354656
|
var fs_1 = require("fs");
|
|
@@ -354686,18 +354695,22 @@ var require_replay_run = __commonJS({
|
|
|
354686
354695
|
}
|
|
354687
354696
|
}
|
|
354688
354697
|
if (shouldSync && tagSha != null) {
|
|
354689
|
-
|
|
354690
|
-
|
|
354691
|
-
|
|
354692
|
-
|
|
354693
|
-
|
|
354694
|
-
|
|
354695
|
-
|
|
354696
|
-
|
|
354697
|
-
|
|
354698
|
-
|
|
354698
|
+
if (!isTagMergedIntoHead(outputDir, tagSha)) {
|
|
354699
|
+
logger4?.warn(`fern-generation-base tag ${tagSha} is not reachable from HEAD \u2014 skipping divergent-merge sync. The tag likely points at an unmerged generation (PR closed without merge).`);
|
|
354700
|
+
} else {
|
|
354701
|
+
const syncService = new replay_1.ReplayService(outputDir, { enabled: true });
|
|
354702
|
+
await syncService.syncFromDivergentMerge(tagSha, {
|
|
354703
|
+
cliVersion,
|
|
354704
|
+
generatorVersions,
|
|
354705
|
+
baseBranchHead: baseBranchHead ?? void 0
|
|
354706
|
+
});
|
|
354707
|
+
try {
|
|
354708
|
+
const freshLockManager = new replay_1.LockfileManager(outputDir);
|
|
354709
|
+
if (freshLockManager.exists()) {
|
|
354710
|
+
previousGenerationSha = freshLockManager.read().current_generation;
|
|
354711
|
+
}
|
|
354712
|
+
} catch {
|
|
354699
354713
|
}
|
|
354700
|
-
} catch {
|
|
354701
354714
|
}
|
|
354702
354715
|
}
|
|
354703
354716
|
}
|
|
@@ -354747,6 +354760,30 @@ var require_replay_run = __commonJS({
|
|
|
354747
354760
|
baseBranchHead: resolvedBaseBranchHead
|
|
354748
354761
|
};
|
|
354749
354762
|
}
|
|
354763
|
+
function isTagMergedIntoHead(cwd2, tagSha) {
|
|
354764
|
+
try {
|
|
354765
|
+
(0, child_process_1.execFileSync)("git", ["merge-base", "--is-ancestor", tagSha, "HEAD"], {
|
|
354766
|
+
cwd: cwd2,
|
|
354767
|
+
stdio: "pipe"
|
|
354768
|
+
});
|
|
354769
|
+
return true;
|
|
354770
|
+
} catch {
|
|
354771
|
+
}
|
|
354772
|
+
const tagTree = gitRevParse(cwd2, `${tagSha}^{tree}`);
|
|
354773
|
+
if (tagTree == null) {
|
|
354774
|
+
return false;
|
|
354775
|
+
}
|
|
354776
|
+
try {
|
|
354777
|
+
const trees = (0, child_process_1.execFileSync)("git", ["log", "HEAD", "--format=%T", "--max-count=500"], {
|
|
354778
|
+
cwd: cwd2,
|
|
354779
|
+
encoding: "utf-8",
|
|
354780
|
+
stdio: "pipe"
|
|
354781
|
+
});
|
|
354782
|
+
return trees.split("\n").some((t3) => t3.trim() === tagTree);
|
|
354783
|
+
} catch {
|
|
354784
|
+
return false;
|
|
354785
|
+
}
|
|
354786
|
+
}
|
|
354750
354787
|
function gitRevParse(cwd2, rev) {
|
|
354751
354788
|
try {
|
|
354752
354789
|
return (0, child_process_1.execFileSync)("git", ["rev-parse", "--verify", rev], {
|
|
@@ -393548,9 +393585,9 @@ var require_file2 = __commonJS({
|
|
|
393548
393585
|
}
|
|
393549
393586
|
});
|
|
393550
393587
|
|
|
393551
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
393588
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseControlResponse.js
|
|
393552
393589
|
var require_parseControlResponse = __commonJS({
|
|
393553
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
393590
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseControlResponse.js"(exports2) {
|
|
393554
393591
|
"use strict";
|
|
393555
393592
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
393556
393593
|
exports2.parseControlResponse = parseControlResponse;
|
|
@@ -393600,9 +393637,9 @@ var require_parseControlResponse = __commonJS({
|
|
|
393600
393637
|
}
|
|
393601
393638
|
});
|
|
393602
393639
|
|
|
393603
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
393640
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/FtpContext.js
|
|
393604
393641
|
var require_FtpContext = __commonJS({
|
|
393605
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
393642
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/FtpContext.js"(exports2) {
|
|
393606
393643
|
"use strict";
|
|
393607
393644
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
393608
393645
|
exports2.FTPContext = exports2.FTPError = void 0;
|
|
@@ -393920,9 +393957,60 @@ Closing reason: ${this._closingError.stack}`;
|
|
|
393920
393957
|
}
|
|
393921
393958
|
});
|
|
393922
393959
|
|
|
393923
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
393960
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/netUtils.js
|
|
393961
|
+
var require_netUtils = __commonJS({
|
|
393962
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/netUtils.js"(exports2) {
|
|
393963
|
+
"use strict";
|
|
393964
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
393965
|
+
exports2.describeTLS = describeTLS;
|
|
393966
|
+
exports2.describeAddress = describeAddress;
|
|
393967
|
+
exports2.upgradeSocket = upgradeSocket;
|
|
393968
|
+
exports2.ipIsPrivateV4Address = ipIsPrivateV4Address;
|
|
393969
|
+
var tls_1 = require("tls");
|
|
393970
|
+
function describeTLS(socket) {
|
|
393971
|
+
if (socket instanceof tls_1.TLSSocket) {
|
|
393972
|
+
const protocol2 = socket.getProtocol();
|
|
393973
|
+
return protocol2 ? protocol2 : "Server socket or disconnected client socket";
|
|
393974
|
+
}
|
|
393975
|
+
return "No encryption";
|
|
393976
|
+
}
|
|
393977
|
+
function describeAddress(socket) {
|
|
393978
|
+
if (socket.remoteFamily === "IPv6") {
|
|
393979
|
+
return `[${socket.remoteAddress}]:${socket.remotePort}`;
|
|
393980
|
+
}
|
|
393981
|
+
return `${socket.remoteAddress}:${socket.remotePort}`;
|
|
393982
|
+
}
|
|
393983
|
+
function upgradeSocket(socket, options2) {
|
|
393984
|
+
return new Promise((resolve13, reject) => {
|
|
393985
|
+
const tlsOptions = Object.assign({}, options2, {
|
|
393986
|
+
socket
|
|
393987
|
+
});
|
|
393988
|
+
const tlsSocket = (0, tls_1.connect)(tlsOptions, () => {
|
|
393989
|
+
const expectCertificate = tlsOptions.rejectUnauthorized !== false;
|
|
393990
|
+
if (expectCertificate && !tlsSocket.authorized) {
|
|
393991
|
+
reject(tlsSocket.authorizationError);
|
|
393992
|
+
} else {
|
|
393993
|
+
tlsSocket.removeAllListeners("error");
|
|
393994
|
+
resolve13(tlsSocket);
|
|
393995
|
+
}
|
|
393996
|
+
}).once("error", (error50) => {
|
|
393997
|
+
reject(error50);
|
|
393998
|
+
});
|
|
393999
|
+
});
|
|
394000
|
+
}
|
|
394001
|
+
function ipIsPrivateV4Address(ip4 = "") {
|
|
394002
|
+
if (ip4.startsWith("::ffff:")) {
|
|
394003
|
+
ip4 = ip4.substr(7);
|
|
394004
|
+
}
|
|
394005
|
+
const octets = ip4.split(".").map((o14) => parseInt(o14, 10));
|
|
394006
|
+
return octets[0] === 10 || octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31 || octets[0] === 192 && octets[1] === 168 || ip4 === "127.0.0.1";
|
|
394007
|
+
}
|
|
394008
|
+
}
|
|
394009
|
+
});
|
|
394010
|
+
|
|
394011
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/FileInfo.js
|
|
393924
394012
|
var require_FileInfo = __commonJS({
|
|
393925
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
394013
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/FileInfo.js"(exports2) {
|
|
393926
394014
|
"use strict";
|
|
393927
394015
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
393928
394016
|
exports2.FileInfo = exports2.FileType = void 0;
|
|
@@ -393977,9 +394065,9 @@ var require_FileInfo = __commonJS({
|
|
|
393977
394065
|
}
|
|
393978
394066
|
});
|
|
393979
394067
|
|
|
393980
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
394068
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseListDOS.js
|
|
393981
394069
|
var require_parseListDOS = __commonJS({
|
|
393982
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
394070
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseListDOS.js"(exports2) {
|
|
393983
394071
|
"use strict";
|
|
393984
394072
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
393985
394073
|
exports2.testLine = testLine;
|
|
@@ -394020,9 +394108,9 @@ var require_parseListDOS = __commonJS({
|
|
|
394020
394108
|
}
|
|
394021
394109
|
});
|
|
394022
394110
|
|
|
394023
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
394111
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseListUnix.js
|
|
394024
394112
|
var require_parseListUnix = __commonJS({
|
|
394025
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
394113
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseListUnix.js"(exports2) {
|
|
394026
394114
|
"use strict";
|
|
394027
394115
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
394028
394116
|
exports2.testLine = testLine;
|
|
@@ -394106,9 +394194,9 @@ var require_parseListUnix = __commonJS({
|
|
|
394106
394194
|
}
|
|
394107
394195
|
});
|
|
394108
394196
|
|
|
394109
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
394197
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseListMLSD.js
|
|
394110
394198
|
var require_parseListMLSD = __commonJS({
|
|
394111
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
394199
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseListMLSD.js"(exports2) {
|
|
394112
394200
|
"use strict";
|
|
394113
394201
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
394114
394202
|
exports2.testLine = testLine;
|
|
@@ -394271,9 +394359,9 @@ var require_parseListMLSD = __commonJS({
|
|
|
394271
394359
|
}
|
|
394272
394360
|
});
|
|
394273
394361
|
|
|
394274
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
394362
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseList.js
|
|
394275
394363
|
var require_parseList = __commonJS({
|
|
394276
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
394364
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/parseList.js"(exports2) {
|
|
394277
394365
|
"use strict";
|
|
394278
394366
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o14, m11, k19, k23) {
|
|
394279
394367
|
if (k23 === void 0) k23 = k19;
|
|
@@ -394349,9 +394437,9 @@ var require_parseList = __commonJS({
|
|
|
394349
394437
|
}
|
|
394350
394438
|
});
|
|
394351
394439
|
|
|
394352
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
394440
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/ProgressTracker.js
|
|
394353
394441
|
var require_ProgressTracker = __commonJS({
|
|
394354
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
394442
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/ProgressTracker.js"(exports2) {
|
|
394355
394443
|
"use strict";
|
|
394356
394444
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
394357
394445
|
exports2.ProgressTracker = void 0;
|
|
@@ -394420,88 +394508,44 @@ var require_ProgressTracker = __commonJS({
|
|
|
394420
394508
|
}
|
|
394421
394509
|
});
|
|
394422
394510
|
|
|
394423
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
394511
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/StringWriter.js
|
|
394424
394512
|
var require_StringWriter = __commonJS({
|
|
394425
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
394513
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/StringWriter.js"(exports2) {
|
|
394426
394514
|
"use strict";
|
|
394427
394515
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
394428
394516
|
exports2.StringWriter = void 0;
|
|
394429
394517
|
var stream_1 = require("stream");
|
|
394430
394518
|
var StringWriter = class extends stream_1.Writable {
|
|
394431
|
-
constructor() {
|
|
394432
|
-
super(
|
|
394433
|
-
this.
|
|
394519
|
+
constructor(maxByteLength = 1 * 1024 * 1024) {
|
|
394520
|
+
super();
|
|
394521
|
+
this.maxByteLength = maxByteLength;
|
|
394522
|
+
this.byteLength = 0;
|
|
394523
|
+
this.bufs = [];
|
|
394434
394524
|
}
|
|
394435
394525
|
_write(chunk2, _16, callback) {
|
|
394436
|
-
if (chunk2 instanceof Buffer) {
|
|
394437
|
-
|
|
394438
|
-
|
|
394439
|
-
}
|
|
394440
|
-
|
|
394526
|
+
if (!(chunk2 instanceof Buffer)) {
|
|
394527
|
+
callback(new Error("StringWriter: expects chunks of type 'Buffer'."));
|
|
394528
|
+
return;
|
|
394529
|
+
}
|
|
394530
|
+
if (this.byteLength + chunk2.byteLength > this.maxByteLength) {
|
|
394531
|
+
callback(new Error(`StringWriter: Maximum bytes exceeded, maxByteLength=${this.maxByteLength}.`));
|
|
394532
|
+
return;
|
|
394441
394533
|
}
|
|
394534
|
+
this.byteLength += chunk2.byteLength;
|
|
394535
|
+
this.bufs.push(chunk2);
|
|
394536
|
+
callback(null);
|
|
394442
394537
|
}
|
|
394443
394538
|
getText(encoding) {
|
|
394444
|
-
return this.
|
|
394539
|
+
return Buffer.concat(this.bufs).toString(encoding);
|
|
394445
394540
|
}
|
|
394446
394541
|
};
|
|
394447
394542
|
exports2.StringWriter = StringWriter;
|
|
394448
394543
|
}
|
|
394449
394544
|
});
|
|
394450
394545
|
|
|
394451
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
394452
|
-
var require_netUtils = __commonJS({
|
|
394453
|
-
"../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/netUtils.js"(exports2) {
|
|
394454
|
-
"use strict";
|
|
394455
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
394456
|
-
exports2.describeTLS = describeTLS;
|
|
394457
|
-
exports2.describeAddress = describeAddress;
|
|
394458
|
-
exports2.upgradeSocket = upgradeSocket;
|
|
394459
|
-
exports2.ipIsPrivateV4Address = ipIsPrivateV4Address;
|
|
394460
|
-
var tls_1 = require("tls");
|
|
394461
|
-
function describeTLS(socket) {
|
|
394462
|
-
if (socket instanceof tls_1.TLSSocket) {
|
|
394463
|
-
const protocol2 = socket.getProtocol();
|
|
394464
|
-
return protocol2 ? protocol2 : "Server socket or disconnected client socket";
|
|
394465
|
-
}
|
|
394466
|
-
return "No encryption";
|
|
394467
|
-
}
|
|
394468
|
-
function describeAddress(socket) {
|
|
394469
|
-
if (socket.remoteFamily === "IPv6") {
|
|
394470
|
-
return `[${socket.remoteAddress}]:${socket.remotePort}`;
|
|
394471
|
-
}
|
|
394472
|
-
return `${socket.remoteAddress}:${socket.remotePort}`;
|
|
394473
|
-
}
|
|
394474
|
-
function upgradeSocket(socket, options2) {
|
|
394475
|
-
return new Promise((resolve13, reject) => {
|
|
394476
|
-
const tlsOptions = Object.assign({}, options2, {
|
|
394477
|
-
socket
|
|
394478
|
-
});
|
|
394479
|
-
const tlsSocket = (0, tls_1.connect)(tlsOptions, () => {
|
|
394480
|
-
const expectCertificate = tlsOptions.rejectUnauthorized !== false;
|
|
394481
|
-
if (expectCertificate && !tlsSocket.authorized) {
|
|
394482
|
-
reject(tlsSocket.authorizationError);
|
|
394483
|
-
} else {
|
|
394484
|
-
tlsSocket.removeAllListeners("error");
|
|
394485
|
-
resolve13(tlsSocket);
|
|
394486
|
-
}
|
|
394487
|
-
}).once("error", (error50) => {
|
|
394488
|
-
reject(error50);
|
|
394489
|
-
});
|
|
394490
|
-
});
|
|
394491
|
-
}
|
|
394492
|
-
function ipIsPrivateV4Address(ip4 = "") {
|
|
394493
|
-
if (ip4.startsWith("::ffff:")) {
|
|
394494
|
-
ip4 = ip4.substr(7);
|
|
394495
|
-
}
|
|
394496
|
-
const octets = ip4.split(".").map((o14) => parseInt(o14, 10));
|
|
394497
|
-
return octets[0] === 10 || octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31 || octets[0] === 192 && octets[1] === 168 || ip4 === "127.0.0.1";
|
|
394498
|
-
}
|
|
394499
|
-
}
|
|
394500
|
-
});
|
|
394501
|
-
|
|
394502
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/transfer.js
|
|
394546
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/transfer.js
|
|
394503
394547
|
var require_transfer = __commonJS({
|
|
394504
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
394548
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/transfer.js"(exports2) {
|
|
394505
394549
|
"use strict";
|
|
394506
394550
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
394507
394551
|
exports2.enterPassiveModeIPv6 = enterPassiveModeIPv6;
|
|
@@ -394751,9 +394795,9 @@ var require_transfer = __commonJS({
|
|
|
394751
394795
|
}
|
|
394752
394796
|
});
|
|
394753
394797
|
|
|
394754
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
394798
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/Client.js
|
|
394755
394799
|
var require_Client9 = __commonJS({
|
|
394756
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
394800
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/Client.js"(exports2) {
|
|
394757
394801
|
"use strict";
|
|
394758
394802
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
394759
394803
|
exports2.Client = void 0;
|
|
@@ -394762,13 +394806,13 @@ var require_Client9 = __commonJS({
|
|
|
394762
394806
|
var tls_1 = require("tls");
|
|
394763
394807
|
var util_1 = require("util");
|
|
394764
394808
|
var FtpContext_1 = require_FtpContext();
|
|
394809
|
+
var netUtils_1 = require_netUtils();
|
|
394810
|
+
var parseControlResponse_1 = require_parseControlResponse();
|
|
394765
394811
|
var parseList_1 = require_parseList();
|
|
394812
|
+
var parseListMLSD_1 = require_parseListMLSD();
|
|
394766
394813
|
var ProgressTracker_1 = require_ProgressTracker();
|
|
394767
394814
|
var StringWriter_1 = require_StringWriter();
|
|
394768
|
-
var parseListMLSD_1 = require_parseListMLSD();
|
|
394769
|
-
var netUtils_1 = require_netUtils();
|
|
394770
394815
|
var transfer_1 = require_transfer();
|
|
394771
|
-
var parseControlResponse_1 = require_parseControlResponse();
|
|
394772
394816
|
var fsReadDir = (0, util_1.promisify)(fs_1.readdir);
|
|
394773
394817
|
var fsMkDir = (0, util_1.promisify)(fs_1.mkdir);
|
|
394774
394818
|
var fsStat2 = (0, util_1.promisify)(fs_1.stat);
|
|
@@ -394776,7 +394820,8 @@ var require_Client9 = __commonJS({
|
|
|
394776
394820
|
var fsClose = (0, util_1.promisify)(fs_1.close);
|
|
394777
394821
|
var fsUnlink = (0, util_1.promisify)(fs_1.unlink);
|
|
394778
394822
|
var defaultClientOptions = {
|
|
394779
|
-
allowSeparateTransferHost: true
|
|
394823
|
+
allowSeparateTransferHost: true,
|
|
394824
|
+
maxListingBytes: 40 * 1024 * 1024
|
|
394780
394825
|
};
|
|
394781
394826
|
var LIST_COMMANDS_DEFAULT = () => ["LIST -a", "LIST"];
|
|
394782
394827
|
var LIST_COMMANDS_MLSD = () => ["MLSD", "LIST -a", "LIST"];
|
|
@@ -394786,13 +394831,15 @@ var require_Client9 = __commonJS({
|
|
|
394786
394831
|
*
|
|
394787
394832
|
* @param timeout Timeout in milliseconds, use 0 for no timeout. Optional, default is 30 seconds.
|
|
394788
394833
|
*/
|
|
394789
|
-
constructor(timeout4 = 3e4,
|
|
394834
|
+
constructor(timeout4 = 3e4, userOptions2 = defaultClientOptions) {
|
|
394790
394835
|
this.availableListCommands = LIST_COMMANDS_DEFAULT();
|
|
394836
|
+
const options2 = { ...defaultClientOptions, ...userOptions2 };
|
|
394791
394837
|
this.ftp = new FtpContext_1.FTPContext(timeout4);
|
|
394792
394838
|
this.prepareTransfer = this._enterFirstCompatibleMode([
|
|
394793
394839
|
transfer_1.enterPassiveModeIPv6,
|
|
394794
394840
|
options2.allowSeparateTransferHost ? transfer_1.enterPassiveModeIPv4 : transfer_1.enterPassiveModeIPv4_forceControlHostIP
|
|
394795
394841
|
]);
|
|
394842
|
+
this.options = options2;
|
|
394796
394843
|
this.parseList = parseList_1.parseList;
|
|
394797
394844
|
this._progressTracker = new ProgressTracker_1.ProgressTracker();
|
|
394798
394845
|
}
|
|
@@ -395229,7 +395276,7 @@ var require_Client9 = __commonJS({
|
|
|
395229
395276
|
* @protected
|
|
395230
395277
|
*/
|
|
395231
395278
|
async _requestListWithCommand(command3) {
|
|
395232
|
-
const buffer = new StringWriter_1.StringWriter();
|
|
395279
|
+
const buffer = new StringWriter_1.StringWriter(this.options.maxListingBytes);
|
|
395233
395280
|
await (0, transfer_1.downloadTo)(buffer, {
|
|
395234
395281
|
ftp: this.ftp,
|
|
395235
395282
|
tracker: this._progressTracker,
|
|
@@ -395484,17 +395531,17 @@ var require_Client9 = __commonJS({
|
|
|
395484
395531
|
}
|
|
395485
395532
|
});
|
|
395486
395533
|
|
|
395487
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
395534
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/StringEncoding.js
|
|
395488
395535
|
var require_StringEncoding = __commonJS({
|
|
395489
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
395536
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/StringEncoding.js"(exports2) {
|
|
395490
395537
|
"use strict";
|
|
395491
395538
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
395492
395539
|
}
|
|
395493
395540
|
});
|
|
395494
395541
|
|
|
395495
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.
|
|
395542
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/index.js
|
|
395496
395543
|
var require_dist17 = __commonJS({
|
|
395497
|
-
"../../../node_modules/.pnpm/basic-ftp@5.
|
|
395544
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.0/node_modules/basic-ftp/dist/index.js"(exports2) {
|
|
395498
395545
|
"use strict";
|
|
395499
395546
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o14, m11, k19, k23) {
|
|
395500
395547
|
if (k23 === void 0) k23 = k19;
|
|
@@ -522266,9 +522313,7 @@ function convertQueryParameterExample2(namedFullExamples) {
|
|
|
522266
522313
|
const result = {};
|
|
522267
522314
|
namedFullExamples.forEach((namedFullExample) => {
|
|
522268
522315
|
const convertedExample = convertFullExample2(namedFullExample.value);
|
|
522269
|
-
if (
|
|
522270
|
-
result[namedFullExample.name] = convertedExample[0];
|
|
522271
|
-
} else if (convertedExample != null) {
|
|
522316
|
+
if (convertedExample != null) {
|
|
522272
522317
|
result[namedFullExample.name] = convertedExample;
|
|
522273
522318
|
}
|
|
522274
522319
|
});
|
|
@@ -533560,8 +533605,8 @@ var ExampleEndpointFactory = class {
|
|
|
533560
533605
|
ignoreOptionals: true
|
|
533561
533606
|
}
|
|
533562
533607
|
});
|
|
533563
|
-
if (example != null && !isExamplePrimitive(example)) {
|
|
533564
|
-
this.logger.debug(`Expected a primitive example but got ${example.type} for query parameter ${queryParameter.name} for ${endpoint3.method.toUpperCase()} ${endpoint3.path}`);
|
|
533608
|
+
if (example != null && !isExamplePrimitive(example) && example.type !== "array") {
|
|
533609
|
+
this.logger.debug(`Expected a primitive or array example but got ${example.type} for query parameter ${queryParameter.name} for ${endpoint3.method.toUpperCase()} ${endpoint3.path}`);
|
|
533565
533610
|
example = void 0;
|
|
533566
533611
|
}
|
|
533567
533612
|
if (required6 && example == null) {
|
|
@@ -540070,10 +540115,7 @@ function convertParameters({ path: path98, httpMethod, parameters: parameters2,
|
|
|
540070
540115
|
const generatedName = getGeneratedTypeName(parameterBreadcrumbs, context3.options.preserveSchemaIds);
|
|
540071
540116
|
const isHeader = resolvedParameter.in === "header";
|
|
540072
540117
|
const [isOptional, isNullable] = context3.options.coerceOptionalSchemasToNullable && !isHeader ? [false, !isRequired2] : [!isRequired2, false];
|
|
540073
|
-
let schema2 = resolvedParameter.schema != null ? convertSchema2(resolvedParameter.schema, isOptional, isNullable, context3, parameterBreadcrumbs, source2, context3.namespace, false, /* @__PURE__ */ new Set(),
|
|
540074
|
-
schema: resolvedParameter,
|
|
540075
|
-
logger: context3.logger
|
|
540076
|
-
})) : isRequired2 ? SchemaWithExample.primitive({
|
|
540118
|
+
let schema2 = resolvedParameter.schema != null ? convertSchema2(resolvedParameter.schema, isOptional, isNullable, context3, parameterBreadcrumbs, source2, context3.namespace, false, /* @__PURE__ */ new Set(), getParameterExample(resolvedParameter, context3)) : isRequired2 ? SchemaWithExample.primitive({
|
|
540077
540119
|
nameOverride: void 0,
|
|
540078
540120
|
generatedName,
|
|
540079
540121
|
title: void 0,
|
|
@@ -540192,6 +540234,13 @@ function getExplodeForQueryParameter(parameter6) {
|
|
|
540192
540234
|
}
|
|
540193
540235
|
return explode === false ? void 0 : explode;
|
|
540194
540236
|
}
|
|
540237
|
+
function getParameterExample(parameter6, context3) {
|
|
540238
|
+
const arrayExample = getExampleAsArray({ schema: parameter6, logger: context3.logger });
|
|
540239
|
+
if (arrayExample != null) {
|
|
540240
|
+
return arrayExample;
|
|
540241
|
+
}
|
|
540242
|
+
return getExamplesString({ schema: parameter6, logger: context3.logger });
|
|
540243
|
+
}
|
|
540195
540244
|
function getExplodeForPathParameter(parameter6) {
|
|
540196
540245
|
const explode = parameter6.explode;
|
|
540197
540246
|
if (explode === void 0) {
|
|
@@ -562065,6 +562114,37 @@ function convertExampleEndpointCall2({ service, endpoint: endpoint3, example, ty
|
|
|
562065
562114
|
if (queryParameterDeclaration == null) {
|
|
562066
562115
|
throw new Error(`Query parameter ${wireKey} does not exist`);
|
|
562067
562116
|
}
|
|
562117
|
+
const isAllowMultiple = typeof queryParameterDeclaration !== "string" && queryParameterDeclaration["allow-multiple"] === true;
|
|
562118
|
+
const rawType = typeof queryParameterDeclaration === "string" ? queryParameterDeclaration : queryParameterDeclaration.type;
|
|
562119
|
+
let convertedValue;
|
|
562120
|
+
if (isAllowMultiple && Array.isArray(value)) {
|
|
562121
|
+
const items = value.map((item) => convertTypeReferenceExample({
|
|
562122
|
+
example: item,
|
|
562123
|
+
rawTypeBeingExemplified: rawType,
|
|
562124
|
+
typeResolver,
|
|
562125
|
+
exampleResolver,
|
|
562126
|
+
fileContainingRawTypeReference: file4,
|
|
562127
|
+
fileContainingExample: file4,
|
|
562128
|
+
workspace
|
|
562129
|
+
}));
|
|
562130
|
+
convertedValue = {
|
|
562131
|
+
jsonExample: value,
|
|
562132
|
+
shape: ExampleTypeReferenceShape.container(ExampleContainer.list({
|
|
562133
|
+
list: items,
|
|
562134
|
+
itemType: file4.parseTypeReference(rawType)
|
|
562135
|
+
}))
|
|
562136
|
+
};
|
|
562137
|
+
} else {
|
|
562138
|
+
convertedValue = convertTypeReferenceExample({
|
|
562139
|
+
example: value,
|
|
562140
|
+
rawTypeBeingExemplified: rawType,
|
|
562141
|
+
typeResolver,
|
|
562142
|
+
exampleResolver,
|
|
562143
|
+
fileContainingRawTypeReference: file4,
|
|
562144
|
+
fileContainingExample: file4,
|
|
562145
|
+
workspace
|
|
562146
|
+
});
|
|
562147
|
+
}
|
|
562068
562148
|
return {
|
|
562069
562149
|
name: file4.casingsGenerator.generateNameAndWireValue({
|
|
562070
562150
|
name: getQueryParameterName({
|
|
@@ -562073,15 +562153,7 @@ function convertExampleEndpointCall2({ service, endpoint: endpoint3, example, ty
|
|
|
562073
562153
|
}).name,
|
|
562074
562154
|
wireValue: wireKey
|
|
562075
562155
|
}),
|
|
562076
|
-
value:
|
|
562077
|
-
example: value,
|
|
562078
|
-
rawTypeBeingExemplified: typeof queryParameterDeclaration === "string" ? queryParameterDeclaration : queryParameterDeclaration.type,
|
|
562079
|
-
typeResolver,
|
|
562080
|
-
exampleResolver,
|
|
562081
|
-
fileContainingRawTypeReference: file4,
|
|
562082
|
-
fileContainingExample: file4,
|
|
562083
|
-
workspace
|
|
562084
|
-
}),
|
|
562156
|
+
value: convertedValue,
|
|
562085
562157
|
shape: getQueryParamaterDeclationShape({ queryParameter: queryParameterDeclaration })
|
|
562086
562158
|
};
|
|
562087
562159
|
}) : [],
|
|
@@ -569530,7 +569602,7 @@ var ValidEndpointPathRule = {
|
|
|
569530
569602
|
};
|
|
569531
569603
|
|
|
569532
569604
|
// ../fern-definition/validator/lib/rules/valid-example-endpoint-call/validateExampleEndpointCallParameters.js
|
|
569533
|
-
function validateExampleEndpointCallParameters({ allDeclarations = {}, examples, parameterDisplayName, typeResolver, exampleResolver, workspace, getRawType, breadcrumbs }) {
|
|
569605
|
+
function validateExampleEndpointCallParameters({ allDeclarations = {}, examples, parameterDisplayName, typeResolver, exampleResolver, workspace, getRawType, isAllowMultiple, breadcrumbs }) {
|
|
569534
569606
|
const violations = [];
|
|
569535
569607
|
const requiredParameters = Object.entries(allDeclarations).reduce((acc, [key2, parameter6]) => {
|
|
569536
569608
|
const rawType = getRawType(parameter6);
|
|
@@ -569565,18 +569637,21 @@ function validateExampleEndpointCallParameters({ allDeclarations = {}, examples,
|
|
|
569565
569637
|
} else {
|
|
569566
569638
|
const rawType = getRawType(expectedType);
|
|
569567
569639
|
if (rawType != null) {
|
|
569568
|
-
|
|
569569
|
-
|
|
569570
|
-
|
|
569571
|
-
|
|
569572
|
-
|
|
569573
|
-
|
|
569574
|
-
|
|
569575
|
-
|
|
569576
|
-
|
|
569577
|
-
|
|
569578
|
-
|
|
569579
|
-
|
|
569640
|
+
const examplesToValidate = isAllowMultiple?.(expectedType) && Array.isArray(exampleParameter) ? exampleParameter : [exampleParameter];
|
|
569641
|
+
for (const singleExample of examplesToValidate) {
|
|
569642
|
+
violations.push(...examples_exports6.validateTypeReferenceExample({
|
|
569643
|
+
rawTypeReference: rawType.rawType,
|
|
569644
|
+
example: singleExample,
|
|
569645
|
+
file: rawType.file,
|
|
569646
|
+
workspace,
|
|
569647
|
+
typeResolver,
|
|
569648
|
+
exampleResolver,
|
|
569649
|
+
breadcrumbs,
|
|
569650
|
+
depth: 0
|
|
569651
|
+
}).map((val) => {
|
|
569652
|
+
return { severity: val.severity ?? "fatal", message: val.message };
|
|
569653
|
+
}));
|
|
569654
|
+
}
|
|
569580
569655
|
}
|
|
569581
569656
|
}
|
|
569582
569657
|
}
|
|
@@ -569865,6 +569940,7 @@ var ValidExampleEndpointCallRule = {
|
|
|
569865
569940
|
}),
|
|
569866
569941
|
rawType: typeof queryParameter === "string" ? queryParameter : queryParameter.type
|
|
569867
569942
|
}),
|
|
569943
|
+
isAllowMultiple: (queryParameter) => typeof queryParameter !== "string" && queryParameter["allow-multiple"] === true,
|
|
569868
569944
|
breadcrumbs: ["query-parameters"]
|
|
569869
569945
|
});
|
|
569870
569946
|
},
|
|
@@ -621915,7 +621991,7 @@ var AccessTokenPosthogManager = class {
|
|
|
621915
621991
|
properties: {
|
|
621916
621992
|
...event,
|
|
621917
621993
|
...event.properties,
|
|
621918
|
-
version: "4.76.
|
|
621994
|
+
version: "4.76.1-2-g6b9106e3061",
|
|
621919
621995
|
usingAccessToken: true
|
|
621920
621996
|
}
|
|
621921
621997
|
});
|
|
@@ -621969,7 +622045,7 @@ var UserPosthogManager = class {
|
|
|
621969
622045
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
621970
622046
|
event: "CLI",
|
|
621971
622047
|
properties: {
|
|
621972
|
-
version: "4.76.
|
|
622048
|
+
version: "4.76.1-2-g6b9106e3061",
|
|
621973
622049
|
...event,
|
|
621974
622050
|
...event.properties,
|
|
621975
622051
|
usingAccessToken: false,
|
|
@@ -839179,7 +839255,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
839179
839255
|
var LOGS_FOLDER_NAME = "logs";
|
|
839180
839256
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
839181
839257
|
function getCliSource() {
|
|
839182
|
-
const version7 = "4.76.
|
|
839258
|
+
const version7 = "4.76.1-2-g6b9106e3061";
|
|
839183
839259
|
return `cli@${version7}`;
|
|
839184
839260
|
}
|
|
839185
839261
|
var DebugLogger = class {
|
|
@@ -850494,7 +850570,7 @@ var LegacyDocsPublisher = class {
|
|
|
850494
850570
|
previewId,
|
|
850495
850571
|
disableTemplates: void 0,
|
|
850496
850572
|
skipUpload,
|
|
850497
|
-
cliVersion: "4.76.
|
|
850573
|
+
cliVersion: "4.76.1-2-g6b9106e3061"
|
|
850498
850574
|
});
|
|
850499
850575
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
850500
850576
|
return { success: false };
|
|
@@ -924952,7 +925028,7 @@ var CliContext = class _CliContext {
|
|
|
924952
925028
|
if (false) {
|
|
924953
925029
|
this.logger.error("CLI_VERSION is not defined");
|
|
924954
925030
|
}
|
|
924955
|
-
return "4.76.
|
|
925031
|
+
return "4.76.1-2-g6b9106e3061";
|
|
924956
925032
|
}
|
|
924957
925033
|
getCliName() {
|
|
924958
925034
|
if (false) {
|
package/package.json
CHANGED