@fern-api/fern-api-dev 5.18.1 → 5.19.0-2-ga23646779fb
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 +289 -164
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -386136,7 +386136,7 @@ var require_replay_init = __commonJS({
|
|
|
386136
386136
|
lockfileContent,
|
|
386137
386137
|
fernignoreEntries: fernignore_1.REPLAY_FERNIGNORE_ENTRIES,
|
|
386138
386138
|
gitattributesEntries: fernignore_1.GITATTRIBUTES_ENTRIES,
|
|
386139
|
-
prBody:
|
|
386139
|
+
prBody: buildPrBody2(bootstrapResult)
|
|
386140
386140
|
};
|
|
386141
386141
|
}
|
|
386142
386142
|
function formatBootstrapSummary3(result) {
|
|
@@ -386197,7 +386197,7 @@ var require_replay_init = __commonJS({
|
|
|
386197
386197
|
}
|
|
386198
386198
|
return entries24;
|
|
386199
386199
|
}
|
|
386200
|
-
function
|
|
386200
|
+
function buildPrBody2(result) {
|
|
386201
386201
|
const lines = [
|
|
386202
386202
|
"## Replay Initialization",
|
|
386203
386203
|
"",
|
|
@@ -435370,9 +435370,9 @@ var require_file2 = __commonJS({
|
|
|
435370
435370
|
}
|
|
435371
435371
|
});
|
|
435372
435372
|
|
|
435373
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435373
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseControlResponse.js
|
|
435374
435374
|
var require_parseControlResponse = __commonJS({
|
|
435375
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435375
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseControlResponse.js"(exports2) {
|
|
435376
435376
|
"use strict";
|
|
435377
435377
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
435378
435378
|
exports2.parseControlResponse = parseControlResponse;
|
|
@@ -435422,9 +435422,9 @@ var require_parseControlResponse = __commonJS({
|
|
|
435422
435422
|
}
|
|
435423
435423
|
});
|
|
435424
435424
|
|
|
435425
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435425
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/FtpContext.js
|
|
435426
435426
|
var require_FtpContext = __commonJS({
|
|
435427
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435427
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/FtpContext.js"(exports2) {
|
|
435428
435428
|
"use strict";
|
|
435429
435429
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
435430
435430
|
exports2.FTPContext = exports2.FTPError = void 0;
|
|
@@ -435440,6 +435440,7 @@ var require_FtpContext = __commonJS({
|
|
|
435440
435440
|
exports2.FTPError = FTPError;
|
|
435441
435441
|
function doNothing() {
|
|
435442
435442
|
}
|
|
435443
|
+
var maxControlResponseLength = 2 ** 16;
|
|
435443
435444
|
var FTPContext = class {
|
|
435444
435445
|
/**
|
|
435445
435446
|
* Instantiate an FTP context.
|
|
@@ -435657,6 +435658,10 @@ Closing reason: ${this._closingError.stack}`;
|
|
|
435657
435658
|
*/
|
|
435658
435659
|
_onControlSocketData(chunk2) {
|
|
435659
435660
|
this.log(`< ${chunk2}`);
|
|
435661
|
+
if (this._partialResponse.length + chunk2.length > maxControlResponseLength) {
|
|
435662
|
+
this.closeWithError(new Error("FTP control response exceeded maximum allowed size"));
|
|
435663
|
+
return;
|
|
435664
|
+
}
|
|
435660
435665
|
const completeResponse = this._partialResponse + chunk2;
|
|
435661
435666
|
const parsed = (0, parseControlResponse_1.parseControlResponse)(completeResponse);
|
|
435662
435667
|
this._partialResponse = parsed.rest;
|
|
@@ -435742,9 +435747,9 @@ Closing reason: ${this._closingError.stack}`;
|
|
|
435742
435747
|
}
|
|
435743
435748
|
});
|
|
435744
435749
|
|
|
435745
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435750
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/netUtils.js
|
|
435746
435751
|
var require_netUtils = __commonJS({
|
|
435747
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435752
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/netUtils.js"(exports2) {
|
|
435748
435753
|
"use strict";
|
|
435749
435754
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
435750
435755
|
exports2.describeTLS = describeTLS;
|
|
@@ -435793,9 +435798,9 @@ var require_netUtils = __commonJS({
|
|
|
435793
435798
|
}
|
|
435794
435799
|
});
|
|
435795
435800
|
|
|
435796
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435801
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/FileInfo.js
|
|
435797
435802
|
var require_FileInfo = __commonJS({
|
|
435798
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435803
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/FileInfo.js"(exports2) {
|
|
435799
435804
|
"use strict";
|
|
435800
435805
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
435801
435806
|
exports2.FileInfo = exports2.FileType = void 0;
|
|
@@ -435850,9 +435855,9 @@ var require_FileInfo = __commonJS({
|
|
|
435850
435855
|
}
|
|
435851
435856
|
});
|
|
435852
435857
|
|
|
435853
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435858
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseListDOS.js
|
|
435854
435859
|
var require_parseListDOS = __commonJS({
|
|
435855
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435860
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseListDOS.js"(exports2) {
|
|
435856
435861
|
"use strict";
|
|
435857
435862
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
435858
435863
|
exports2.testLine = testLine;
|
|
@@ -435893,9 +435898,9 @@ var require_parseListDOS = __commonJS({
|
|
|
435893
435898
|
}
|
|
435894
435899
|
});
|
|
435895
435900
|
|
|
435896
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435901
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseListUnix.js
|
|
435897
435902
|
var require_parseListUnix = __commonJS({
|
|
435898
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435903
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseListUnix.js"(exports2) {
|
|
435899
435904
|
"use strict";
|
|
435900
435905
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
435901
435906
|
exports2.testLine = testLine;
|
|
@@ -435979,9 +435984,9 @@ var require_parseListUnix = __commonJS({
|
|
|
435979
435984
|
}
|
|
435980
435985
|
});
|
|
435981
435986
|
|
|
435982
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435987
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseListMLSD.js
|
|
435983
435988
|
var require_parseListMLSD = __commonJS({
|
|
435984
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
435989
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseListMLSD.js"(exports2) {
|
|
435985
435990
|
"use strict";
|
|
435986
435991
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
435987
435992
|
exports2.testLine = testLine;
|
|
@@ -436144,9 +436149,9 @@ var require_parseListMLSD = __commonJS({
|
|
|
436144
436149
|
}
|
|
436145
436150
|
});
|
|
436146
436151
|
|
|
436147
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436152
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseList.js
|
|
436148
436153
|
var require_parseList = __commonJS({
|
|
436149
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436154
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/parseList.js"(exports2) {
|
|
436150
436155
|
"use strict";
|
|
436151
436156
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o3, m7, k5, k22) {
|
|
436152
436157
|
if (k22 === void 0) k22 = k5;
|
|
@@ -436222,9 +436227,9 @@ var require_parseList = __commonJS({
|
|
|
436222
436227
|
}
|
|
436223
436228
|
});
|
|
436224
436229
|
|
|
436225
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436230
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/ProgressTracker.js
|
|
436226
436231
|
var require_ProgressTracker = __commonJS({
|
|
436227
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436232
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/ProgressTracker.js"(exports2) {
|
|
436228
436233
|
"use strict";
|
|
436229
436234
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
436230
436235
|
exports2.ProgressTracker = void 0;
|
|
@@ -436293,9 +436298,9 @@ var require_ProgressTracker = __commonJS({
|
|
|
436293
436298
|
}
|
|
436294
436299
|
});
|
|
436295
436300
|
|
|
436296
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436301
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/StringWriter.js
|
|
436297
436302
|
var require_StringWriter = __commonJS({
|
|
436298
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436303
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/StringWriter.js"(exports2) {
|
|
436299
436304
|
"use strict";
|
|
436300
436305
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
436301
436306
|
exports2.StringWriter = void 0;
|
|
@@ -436328,9 +436333,9 @@ var require_StringWriter = __commonJS({
|
|
|
436328
436333
|
}
|
|
436329
436334
|
});
|
|
436330
436335
|
|
|
436331
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436336
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/transfer.js
|
|
436332
436337
|
var require_transfer = __commonJS({
|
|
436333
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436338
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/transfer.js"(exports2) {
|
|
436334
436339
|
"use strict";
|
|
436335
436340
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
436336
436341
|
exports2.enterPassiveModeIPv6 = enterPassiveModeIPv6;
|
|
@@ -436580,9 +436585,9 @@ var require_transfer = __commonJS({
|
|
|
436580
436585
|
}
|
|
436581
436586
|
});
|
|
436582
436587
|
|
|
436583
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436588
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/Client.js
|
|
436584
436589
|
var require_Client9 = __commonJS({
|
|
436585
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
436590
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/Client.js"(exports2) {
|
|
436586
436591
|
"use strict";
|
|
436587
436592
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
436588
436593
|
exports2.Client = void 0;
|
|
@@ -437316,17 +437321,17 @@ var require_Client9 = __commonJS({
|
|
|
437316
437321
|
}
|
|
437317
437322
|
});
|
|
437318
437323
|
|
|
437319
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
437324
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/StringEncoding.js
|
|
437320
437325
|
var require_StringEncoding = __commonJS({
|
|
437321
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
437326
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/StringEncoding.js"(exports2) {
|
|
437322
437327
|
"use strict";
|
|
437323
437328
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
437324
437329
|
}
|
|
437325
437330
|
});
|
|
437326
437331
|
|
|
437327
|
-
// ../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
437332
|
+
// ../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/index.js
|
|
437328
437333
|
var require_dist17 = __commonJS({
|
|
437329
|
-
"../../../node_modules/.pnpm/basic-ftp@5.3.
|
|
437334
|
+
"../../../node_modules/.pnpm/basic-ftp@5.3.1/node_modules/basic-ftp/dist/index.js"(exports2) {
|
|
437330
437335
|
"use strict";
|
|
437331
437336
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o3, m7, k5, k22) {
|
|
437332
437337
|
if (k22 === void 0) k22 = k5;
|
|
@@ -594330,6 +594335,18 @@ init_lodash();
|
|
|
594330
594335
|
|
|
594331
594336
|
// ../../commons/ir-utils/lib/filtered-ir/filterExamples.js
|
|
594332
594337
|
init_lib4();
|
|
594338
|
+
function filterJsonExampleObjectKeys(jsonExample, allowedKeys) {
|
|
594339
|
+
if (jsonExample == null || typeof jsonExample !== "object" || Array.isArray(jsonExample)) {
|
|
594340
|
+
return jsonExample;
|
|
594341
|
+
}
|
|
594342
|
+
const filtered = {};
|
|
594343
|
+
for (const [key2, value2] of Object.entries(jsonExample)) {
|
|
594344
|
+
if (allowedKeys.has(key2)) {
|
|
594345
|
+
filtered[key2] = value2;
|
|
594346
|
+
}
|
|
594347
|
+
}
|
|
594348
|
+
return filtered;
|
|
594349
|
+
}
|
|
594333
594350
|
function filterExampleSingleUnionTypeProperties({ filteredIr, singleUnionTypeProperties }) {
|
|
594334
594351
|
return singleUnionTypeProperties._visit({
|
|
594335
594352
|
samePropertiesAsObject: (s9) => {
|
|
@@ -594436,22 +594453,27 @@ function filterExampleTypeReference({ filteredIr, exampleTypeReference }) {
|
|
|
594436
594453
|
...exampleTypeReference,
|
|
594437
594454
|
shape: ExampleTypeReferenceShape.named({ ...n19, shape: ExampleTypeShape.enum(e8) })
|
|
594438
594455
|
}),
|
|
594439
|
-
object: (o3) =>
|
|
594440
|
-
|
|
594441
|
-
|
|
594442
|
-
|
|
594443
|
-
|
|
594444
|
-
|
|
594445
|
-
properties: o3.properties.filter((p14) => filteredIr.hasProperty(p14.originalTypeDeclaration.typeId, getWireValue(p14.name))).map((p14) => ({
|
|
594446
|
-
...p14,
|
|
594447
|
-
value: filterExampleTypeReference({
|
|
594448
|
-
filteredIr,
|
|
594449
|
-
exampleTypeReference: p14.value
|
|
594450
|
-
})
|
|
594451
|
-
})).filter((p14) => p14.value !== void 0)
|
|
594456
|
+
object: (o3) => {
|
|
594457
|
+
const filteredProperties = o3.properties.filter((p14) => filteredIr.hasProperty(p14.originalTypeDeclaration.typeId, getWireValue(p14.name))).map((p14) => ({
|
|
594458
|
+
...p14,
|
|
594459
|
+
value: filterExampleTypeReference({
|
|
594460
|
+
filteredIr,
|
|
594461
|
+
exampleTypeReference: p14.value
|
|
594452
594462
|
})
|
|
594453
|
-
})
|
|
594454
|
-
|
|
594463
|
+
})).filter((p14) => p14.value !== void 0);
|
|
594464
|
+
const allowedKeys = new Set(filteredProperties.map((p14) => getWireValue(p14.name)));
|
|
594465
|
+
return {
|
|
594466
|
+
...exampleTypeReference,
|
|
594467
|
+
jsonExample: filterJsonExampleObjectKeys(exampleTypeReference.jsonExample, allowedKeys),
|
|
594468
|
+
shape: ExampleTypeReferenceShape.named({
|
|
594469
|
+
...n19,
|
|
594470
|
+
shape: ExampleTypeShape.object({
|
|
594471
|
+
...o3,
|
|
594472
|
+
properties: filteredProperties
|
|
594473
|
+
})
|
|
594474
|
+
})
|
|
594475
|
+
};
|
|
594476
|
+
},
|
|
594455
594477
|
union: (u6) => {
|
|
594456
594478
|
const filteredUnion = filterExampleSingleUnionTypeProperties({
|
|
594457
594479
|
filteredIr,
|
|
@@ -594501,8 +594523,8 @@ function filterExamplePathParameters({ filteredIr, pathParameters }) {
|
|
|
594501
594523
|
} : void 0;
|
|
594502
594524
|
}).filter((param) => param !== void 0);
|
|
594503
594525
|
}
|
|
594504
|
-
function filterExampleQueryParameters({ filteredIr, queryParameters }) {
|
|
594505
|
-
return queryParameters.map((queryParameter) => {
|
|
594526
|
+
function filterExampleQueryParameters({ filteredIr, queryParameters, endpointId }) {
|
|
594527
|
+
return queryParameters.filter((queryParameter) => endpointId == null || filteredIr.hasQueryParameter(endpointId, getWireValue(queryParameter.name))).map((queryParameter) => {
|
|
594506
594528
|
const filteredQueryParameter = filterExampleTypeReference({
|
|
594507
594529
|
filteredIr,
|
|
594508
594530
|
exampleTypeReference: queryParameter.value
|
|
@@ -594522,21 +594544,27 @@ function filterExampleHeader({ filteredIr, headers: headers2 }) {
|
|
|
594522
594544
|
} : void 0;
|
|
594523
594545
|
}).filter((header) => header !== void 0);
|
|
594524
594546
|
}
|
|
594525
|
-
function filterExampleRequestBody({ filteredIr, requestBody }) {
|
|
594547
|
+
function filterExampleRequestBody({ filteredIr, requestBody, endpointId }) {
|
|
594526
594548
|
return requestBody._visit({
|
|
594527
594549
|
inlinedRequestBody: (inlined) => {
|
|
594550
|
+
const filteredProperties = inlined.properties.filter((p14) => {
|
|
594551
|
+
const wireName = getWireValue(p14.name);
|
|
594552
|
+
if (p14.originalTypeDeclaration == null) {
|
|
594553
|
+
return endpointId != null ? filteredIr.hasRequestProperty(endpointId, wireName) : true;
|
|
594554
|
+
}
|
|
594555
|
+
return filteredIr.hasProperty(p14.originalTypeDeclaration.typeId, wireName);
|
|
594556
|
+
}).map((property24) => {
|
|
594557
|
+
const filteredValue = filterExampleTypeReference({
|
|
594558
|
+
filteredIr,
|
|
594559
|
+
exampleTypeReference: property24.value
|
|
594560
|
+
});
|
|
594561
|
+
return filteredValue !== void 0 ? { ...property24, value: filteredValue } : void 0;
|
|
594562
|
+
}).filter((property24) => property24 !== void 0);
|
|
594563
|
+
const allowedKeys = new Set(filteredProperties.map((p14) => getWireValue(p14.name)));
|
|
594528
594564
|
return {
|
|
594529
594565
|
...requestBody,
|
|
594530
|
-
|
|
594531
|
-
|
|
594532
|
-
filteredIr,
|
|
594533
|
-
exampleTypeReference: property24.value
|
|
594534
|
-
});
|
|
594535
|
-
return filteredProperty !== void 0 ? {
|
|
594536
|
-
...property24,
|
|
594537
|
-
value: filteredProperty
|
|
594538
|
-
} : void 0;
|
|
594539
|
-
}).filter((property24) => property24 !== void 0)
|
|
594566
|
+
jsonExample: filterJsonExampleObjectKeys(inlined.jsonExample, allowedKeys),
|
|
594567
|
+
properties: filteredProperties
|
|
594540
594568
|
};
|
|
594541
594569
|
},
|
|
594542
594570
|
reference: (reference4) => {
|
|
@@ -594573,7 +594601,7 @@ function filterExampleResponse({ filteredIr, response }) {
|
|
|
594573
594601
|
}
|
|
594574
594602
|
});
|
|
594575
594603
|
}
|
|
594576
|
-
function filterEndpointExample({ filteredIr, example }) {
|
|
594604
|
+
function filterEndpointExample({ filteredIr, example, endpointId }) {
|
|
594577
594605
|
return {
|
|
594578
594606
|
...example,
|
|
594579
594607
|
rootPathParameters: filterExamplePathParameters({ filteredIr, pathParameters: example.rootPathParameters }),
|
|
@@ -594587,11 +594615,52 @@ function filterEndpointExample({ filteredIr, example }) {
|
|
|
594587
594615
|
}),
|
|
594588
594616
|
serviceHeaders: filterExampleHeader({ filteredIr, headers: example.serviceHeaders }),
|
|
594589
594617
|
endpointHeaders: filterExampleHeader({ filteredIr, headers: example.endpointHeaders }),
|
|
594590
|
-
queryParameters: filterExampleQueryParameters({
|
|
594591
|
-
|
|
594618
|
+
queryParameters: filterExampleQueryParameters({
|
|
594619
|
+
filteredIr,
|
|
594620
|
+
queryParameters: example.queryParameters,
|
|
594621
|
+
endpointId
|
|
594622
|
+
}),
|
|
594623
|
+
request: example.request !== void 0 ? filterExampleRequestBody({ filteredIr, requestBody: example.request, endpointId }) : void 0,
|
|
594592
594624
|
response: filterExampleResponse({ filteredIr, response: example.response })
|
|
594593
594625
|
};
|
|
594594
594626
|
}
|
|
594627
|
+
function filterWebhookExamplePayload({ filteredIr, payload, webhookId }) {
|
|
594628
|
+
if (webhookId == null) {
|
|
594629
|
+
return payload;
|
|
594630
|
+
}
|
|
594631
|
+
const isAllowed = (wireName) => filteredIr.hasWebhookPayloadProperty(webhookId, wireName);
|
|
594632
|
+
if (payload.shape.type === "named" && payload.shape.shape.type === "object") {
|
|
594633
|
+
const named = payload.shape;
|
|
594634
|
+
const objectShape = named.shape;
|
|
594635
|
+
if (objectShape.type !== "object") {
|
|
594636
|
+
return payload;
|
|
594637
|
+
}
|
|
594638
|
+
const filteredProperties = objectShape.properties.filter((p14) => isAllowed(getWireValue(p14.name)));
|
|
594639
|
+
const allowedKeys = new Set(filteredProperties.map((p14) => getWireValue(p14.name)));
|
|
594640
|
+
return {
|
|
594641
|
+
...payload,
|
|
594642
|
+
jsonExample: filterJsonExampleObjectKeys(payload.jsonExample, allowedKeys),
|
|
594643
|
+
shape: ExampleTypeReferenceShape.named({
|
|
594644
|
+
...named,
|
|
594645
|
+
shape: ExampleTypeShape.object({ ...objectShape, properties: filteredProperties })
|
|
594646
|
+
})
|
|
594647
|
+
};
|
|
594648
|
+
}
|
|
594649
|
+
if (payload.shape.type === "container" && payload.shape.container.type === "map") {
|
|
594650
|
+
const mapContainer = payload.shape.container;
|
|
594651
|
+
const filteredEntries = mapContainer.map.filter((entry) => {
|
|
594652
|
+
const keyJson = entry.key.jsonExample;
|
|
594653
|
+
return typeof keyJson === "string" && isAllowed(keyJson);
|
|
594654
|
+
});
|
|
594655
|
+
const allowedKeys = new Set(filteredEntries.map((entry) => entry.key.jsonExample).filter((key2) => typeof key2 === "string"));
|
|
594656
|
+
return {
|
|
594657
|
+
...payload,
|
|
594658
|
+
jsonExample: filterJsonExampleObjectKeys(payload.jsonExample, allowedKeys),
|
|
594659
|
+
shape: ExampleTypeReferenceShape.container(ExampleContainer.map({ ...mapContainer, map: filteredEntries }))
|
|
594660
|
+
};
|
|
594661
|
+
}
|
|
594662
|
+
return payload;
|
|
594663
|
+
}
|
|
594595
594664
|
function filterExampleType({ filteredIr, exampleType }) {
|
|
594596
594665
|
return exampleType.shape._visit({
|
|
594597
594666
|
alias: (a3) => {
|
|
@@ -594599,16 +594668,18 @@ function filterExampleType({ filteredIr, exampleType }) {
|
|
|
594599
594668
|
return filteredAlias !== void 0 ? { ...exampleType, shape: ExampleTypeShape.alias({ ...a3, value: filteredAlias }) } : void 0;
|
|
594600
594669
|
},
|
|
594601
594670
|
enum: () => exampleType,
|
|
594602
|
-
object: (o3) =>
|
|
594603
|
-
|
|
594604
|
-
|
|
594605
|
-
|
|
594606
|
-
|
|
594607
|
-
|
|
594608
|
-
|
|
594609
|
-
|
|
594610
|
-
|
|
594611
|
-
|
|
594671
|
+
object: (o3) => {
|
|
594672
|
+
const filteredProperties = o3.properties.filter((p14) => filteredIr.hasProperty(p14.originalTypeDeclaration.typeId, getWireValue(p14.name))).map((p14) => ({
|
|
594673
|
+
...p14,
|
|
594674
|
+
value: filterExampleTypeReference({ filteredIr, exampleTypeReference: p14.value })
|
|
594675
|
+
})).filter((p14) => p14.value !== void 0);
|
|
594676
|
+
const allowedKeys = new Set(filteredProperties.map((p14) => getWireValue(p14.name)));
|
|
594677
|
+
return {
|
|
594678
|
+
...exampleType,
|
|
594679
|
+
jsonExample: filterJsonExampleObjectKeys(exampleType.jsonExample, allowedKeys),
|
|
594680
|
+
shape: ExampleTypeShape.object({ ...o3, properties: filteredProperties })
|
|
594681
|
+
};
|
|
594682
|
+
},
|
|
594612
594683
|
union: (u6) => {
|
|
594613
594684
|
const filteredUnion = filterExampleSingleUnionTypeProperties({
|
|
594614
594685
|
filteredIr,
|
|
@@ -594678,6 +594749,16 @@ function filterIntermediateRepresentationForAudiences(intermediateRepresentation
|
|
|
594678
594749
|
})
|
|
594679
594750
|
};
|
|
594680
594751
|
}
|
|
594752
|
+
if (webhook.examples != null && webhookId != null) {
|
|
594753
|
+
webhook.examples = webhook.examples.map((example) => ({
|
|
594754
|
+
...example,
|
|
594755
|
+
payload: filterWebhookExamplePayload({
|
|
594756
|
+
filteredIr,
|
|
594757
|
+
payload: example.payload,
|
|
594758
|
+
webhookId
|
|
594759
|
+
})
|
|
594760
|
+
}));
|
|
594761
|
+
}
|
|
594681
594762
|
return webhook;
|
|
594682
594763
|
});
|
|
594683
594764
|
return [webhookGroupId, filteredWebhooks];
|
|
@@ -594718,16 +594799,25 @@ function filterIntermediateRepresentationForAudiences(intermediateRepresentation
|
|
|
594718
594799
|
services: mapValues_default(pickBy_default(intermediateRepresentation.services, (httpService) => filteredIr.hasService(httpService)), (httpService) => ({
|
|
594719
594800
|
...httpService,
|
|
594720
594801
|
endpoints: httpService.endpoints.filter((httpEndpoint) => filteredIr.hasEndpoint(httpEndpoint)).map((httpEndpoint) => {
|
|
594802
|
+
const endpointId = httpEndpoint.id;
|
|
594721
594803
|
httpEndpoint.autogeneratedExamples = httpEndpoint.autogeneratedExamples.map((autogenerated) => {
|
|
594722
594804
|
return {
|
|
594723
594805
|
...autogenerated,
|
|
594724
|
-
example: filterEndpointExample({
|
|
594806
|
+
example: filterEndpointExample({
|
|
594807
|
+
filteredIr,
|
|
594808
|
+
example: autogenerated.example,
|
|
594809
|
+
endpointId
|
|
594810
|
+
})
|
|
594725
594811
|
};
|
|
594726
594812
|
});
|
|
594727
594813
|
httpEndpoint.userSpecifiedExamples = httpEndpoint.userSpecifiedExamples.map((userSpecified) => {
|
|
594728
594814
|
return {
|
|
594729
594815
|
...userSpecified,
|
|
594730
|
-
example: userSpecified.example != null ? filterEndpointExample({
|
|
594816
|
+
example: userSpecified.example != null ? filterEndpointExample({
|
|
594817
|
+
filteredIr,
|
|
594818
|
+
example: userSpecified.example,
|
|
594819
|
+
endpointId
|
|
594820
|
+
}) : void 0
|
|
594731
594821
|
};
|
|
594732
594822
|
});
|
|
594733
594823
|
if (httpEndpoint.queryParameters.length > 0) {
|
|
@@ -594845,28 +594935,30 @@ function isReferencedWebhookPayloadSchema(payload) {
|
|
|
594845
594935
|
var FilteredIrImpl = class {
|
|
594846
594936
|
environments = /* @__PURE__ */ new Set();
|
|
594847
594937
|
types = /* @__PURE__ */ new Set();
|
|
594848
|
-
|
|
594938
|
+
// Property wire-names to exclude per type/endpoint/webhook. `undefined` means no
|
|
594939
|
+
// filtering applies and every property is kept.
|
|
594940
|
+
excludedProperties;
|
|
594849
594941
|
errors = /* @__PURE__ */ new Set();
|
|
594850
594942
|
services = /* @__PURE__ */ new Set();
|
|
594851
594943
|
endpoints = /* @__PURE__ */ new Set();
|
|
594852
|
-
|
|
594853
|
-
|
|
594944
|
+
excludedRequestProperties;
|
|
594945
|
+
excludedQueryParameters;
|
|
594854
594946
|
webhooks = /* @__PURE__ */ new Set();
|
|
594855
|
-
|
|
594947
|
+
excludedWebhookPayloadProperties;
|
|
594856
594948
|
channels = /* @__PURE__ */ new Set();
|
|
594857
594949
|
subpackages = /* @__PURE__ */ new Set();
|
|
594858
|
-
constructor({ types: types4,
|
|
594950
|
+
constructor({ types: types4, excludedProperties, errors: errors4, environments: environments2, services, endpoints, webhooks: webhooks2, subpackages, excludedQueryParameters, excludedRequestProperties, excludedWebhookPayloadProperties, channels }) {
|
|
594859
594951
|
this.environments = environments2;
|
|
594860
594952
|
this.types = types4;
|
|
594861
|
-
this.
|
|
594953
|
+
this.excludedProperties = excludedProperties;
|
|
594862
594954
|
this.errors = errors4;
|
|
594863
594955
|
this.services = services;
|
|
594864
594956
|
this.endpoints = endpoints;
|
|
594865
594957
|
this.webhooks = webhooks2;
|
|
594866
|
-
this.
|
|
594958
|
+
this.excludedWebhookPayloadProperties = excludedWebhookPayloadProperties;
|
|
594867
594959
|
this.subpackages = subpackages;
|
|
594868
|
-
this.
|
|
594869
|
-
this.
|
|
594960
|
+
this.excludedRequestProperties = excludedRequestProperties;
|
|
594961
|
+
this.excludedQueryParameters = excludedQueryParameters;
|
|
594870
594962
|
this.channels = channels;
|
|
594871
594963
|
}
|
|
594872
594964
|
hasTypeId(typeId) {
|
|
@@ -594886,11 +594978,8 @@ var FilteredIrImpl = class {
|
|
|
594886
594978
|
return this.types.has(typeId);
|
|
594887
594979
|
}
|
|
594888
594980
|
hasProperty(typeId, property24) {
|
|
594889
|
-
const
|
|
594890
|
-
|
|
594891
|
-
return true;
|
|
594892
|
-
}
|
|
594893
|
-
return properties7.has(property24);
|
|
594981
|
+
const excluded = this.excludedProperties[typeId];
|
|
594982
|
+
return excluded == null || !excluded.has(property24);
|
|
594894
594983
|
}
|
|
594895
594984
|
hasError(error50) {
|
|
594896
594985
|
const errorId = IdGenerator.generateErrorId(error50.name);
|
|
@@ -594907,18 +594996,12 @@ var FilteredIrImpl = class {
|
|
|
594907
594996
|
return this.endpoints.has(endpoint3.id);
|
|
594908
594997
|
}
|
|
594909
594998
|
hasRequestProperty(endpoint3, property24) {
|
|
594910
|
-
const
|
|
594911
|
-
|
|
594912
|
-
return true;
|
|
594913
|
-
}
|
|
594914
|
-
return properties7.has(property24);
|
|
594999
|
+
const excluded = this.excludedRequestProperties[endpoint3];
|
|
595000
|
+
return excluded == null || !excluded.has(property24);
|
|
594915
595001
|
}
|
|
594916
595002
|
hasQueryParameter(endpoint3, parameter6) {
|
|
594917
|
-
const
|
|
594918
|
-
|
|
594919
|
-
return true;
|
|
594920
|
-
}
|
|
594921
|
-
return parameters2.has(parameter6);
|
|
595003
|
+
const excluded = this.excludedQueryParameters[endpoint3];
|
|
595004
|
+
return excluded == null || !excluded.has(parameter6);
|
|
594922
595005
|
}
|
|
594923
595006
|
hasSubpackage(subpackageId) {
|
|
594924
595007
|
return this.subpackages.has(subpackageId);
|
|
@@ -594936,11 +595019,8 @@ var FilteredIrImpl = class {
|
|
|
594936
595019
|
return true;
|
|
594937
595020
|
}
|
|
594938
595021
|
hasWebhookPayloadProperty(webhookId, property24) {
|
|
594939
|
-
const
|
|
594940
|
-
|
|
594941
|
-
return true;
|
|
594942
|
-
}
|
|
594943
|
-
return properties7.has(property24);
|
|
595022
|
+
const excluded = this.excludedWebhookPayloadProperties[webhookId];
|
|
595023
|
+
return excluded == null || !excluded.has(property24);
|
|
594944
595024
|
}
|
|
594945
595025
|
};
|
|
594946
595026
|
|
|
@@ -595278,86 +595358,48 @@ var IrGraph = class {
|
|
|
595278
595358
|
const channelNode = this.getChannelNode(channelId);
|
|
595279
595359
|
this.addReferencedTypes(typeIds, channelNode.referencedTypes);
|
|
595280
595360
|
}
|
|
595281
|
-
const
|
|
595282
|
-
const
|
|
595283
|
-
const
|
|
595284
|
-
const
|
|
595361
|
+
const excludedProperties = {};
|
|
595362
|
+
const excludedRequestProperties = {};
|
|
595363
|
+
const excludedQueryParameters = {};
|
|
595364
|
+
const excludedWebhookPayloadProperties = {};
|
|
595285
595365
|
if (this.audiences.type === "filtered") {
|
|
595366
|
+
const activeAudiences = this.audiences.audiences;
|
|
595286
595367
|
for (const [typeId, typePropertiesNode] of Object.entries(this.properties)) {
|
|
595287
595368
|
if (!typeIds.has(typeId)) {
|
|
595288
595369
|
continue;
|
|
595289
595370
|
}
|
|
595290
|
-
|
|
595291
|
-
for (const audience of this.audiences.audiences) {
|
|
595292
|
-
const propertiesForAudience = typePropertiesNode.propertiesByAudience[audience];
|
|
595293
|
-
if (propertiesForAudience != null) {
|
|
595294
|
-
propertiesForAudience.forEach((property24) => {
|
|
595295
|
-
propertiesForTypeId.add(property24);
|
|
595296
|
-
});
|
|
595297
|
-
}
|
|
595298
|
-
}
|
|
595299
|
-
if (propertiesForTypeId.size > 0) {
|
|
595300
|
-
properties7[typeId] = propertiesForTypeId;
|
|
595301
|
-
}
|
|
595302
|
-
properties7[typeId] = propertiesForTypeId.size > 0 ? propertiesForTypeId : void 0;
|
|
595371
|
+
excludedProperties[typeId] = computeExcludedKeys(typePropertiesNode.propertiesByAudience, activeAudiences);
|
|
595303
595372
|
}
|
|
595304
595373
|
for (const [endpointId, requestPropertiesNode] of Object.entries(this.requestProperties)) {
|
|
595305
595374
|
if (!this.endpointsNeededForAudience.has(endpointId)) {
|
|
595306
595375
|
continue;
|
|
595307
595376
|
}
|
|
595308
|
-
|
|
595309
|
-
for (const audience of this.audiences.audiences) {
|
|
595310
|
-
const propertiesForAudience = requestPropertiesNode.propertiesByAudience[audience];
|
|
595311
|
-
if (propertiesForAudience != null) {
|
|
595312
|
-
propertiesForAudience.forEach((property24) => {
|
|
595313
|
-
propertiesForEndpoint.add(property24);
|
|
595314
|
-
});
|
|
595315
|
-
}
|
|
595316
|
-
}
|
|
595317
|
-
requestProperties[endpointId] = propertiesForEndpoint.size > 0 ? propertiesForEndpoint : void 0;
|
|
595377
|
+
excludedRequestProperties[endpointId] = computeExcludedKeys(requestPropertiesNode.propertiesByAudience, activeAudiences);
|
|
595318
595378
|
}
|
|
595319
595379
|
for (const [endpointId, queryParametersNode] of Object.entries(this.queryParameters)) {
|
|
595320
595380
|
if (!this.endpointsNeededForAudience.has(endpointId)) {
|
|
595321
595381
|
continue;
|
|
595322
595382
|
}
|
|
595323
|
-
|
|
595324
|
-
for (const audience of this.audiences.audiences) {
|
|
595325
|
-
const parametersByAudience = queryParametersNode.parametersByAudience[audience];
|
|
595326
|
-
if (parametersByAudience != null) {
|
|
595327
|
-
parametersByAudience.forEach((parameter6) => {
|
|
595328
|
-
parametersForEndpoint.add(parameter6);
|
|
595329
|
-
});
|
|
595330
|
-
}
|
|
595331
|
-
}
|
|
595332
|
-
queryParameters[endpointId] = parametersForEndpoint.size > 0 ? parametersForEndpoint : void 0;
|
|
595383
|
+
excludedQueryParameters[endpointId] = computeExcludedKeys(queryParametersNode.parametersByAudience, activeAudiences);
|
|
595333
595384
|
}
|
|
595334
595385
|
for (const [webhookId, webhookPaylodPropertiesNode] of Object.entries(this.webhookProperties)) {
|
|
595335
595386
|
if (!this.webhooksNeededForAudience.has(webhookId)) {
|
|
595336
595387
|
continue;
|
|
595337
595388
|
}
|
|
595338
|
-
|
|
595339
|
-
for (const audience of this.audiences.audiences) {
|
|
595340
|
-
const propertiesForAudience = webhookPaylodPropertiesNode.propertiesByAudience[audience];
|
|
595341
|
-
if (propertiesForAudience != null) {
|
|
595342
|
-
propertiesForAudience.forEach((property24) => {
|
|
595343
|
-
propertiesForWebhook.add(property24);
|
|
595344
|
-
});
|
|
595345
|
-
}
|
|
595346
|
-
}
|
|
595347
|
-
webhookPayloadProperties[webhookId] = propertiesForWebhook.size > 0 ? propertiesForWebhook : void 0;
|
|
595389
|
+
excludedWebhookPayloadProperties[webhookId] = computeExcludedKeys(webhookPaylodPropertiesNode.propertiesByAudience, activeAudiences);
|
|
595348
595390
|
}
|
|
595349
595391
|
}
|
|
595350
595392
|
return new FilteredIrImpl({
|
|
595351
595393
|
types: typeIds,
|
|
595352
|
-
|
|
595394
|
+
excludedProperties,
|
|
595353
595395
|
errors: errorIds,
|
|
595354
|
-
|
|
595355
|
-
|
|
595396
|
+
excludedRequestProperties,
|
|
595397
|
+
excludedQueryParameters,
|
|
595356
595398
|
environments: this.environmentsNeededForAudience,
|
|
595357
595399
|
services: this.servicesNeededForAudience,
|
|
595358
595400
|
endpoints: this.endpointsNeededForAudience,
|
|
595359
595401
|
webhooks: this.webhooksNeededForAudience,
|
|
595360
|
-
|
|
595402
|
+
excludedWebhookPayloadProperties,
|
|
595361
595403
|
subpackages: this.subpackagesNeededForAudience,
|
|
595362
595404
|
channels: this.channelsNeededForAudience
|
|
595363
595405
|
});
|
|
@@ -595460,6 +595502,21 @@ var IrGraph = class {
|
|
|
595460
595502
|
}
|
|
595461
595503
|
}
|
|
595462
595504
|
};
|
|
595505
|
+
function computeExcludedKeys(keysByAudience, activeAudiences) {
|
|
595506
|
+
const matched = /* @__PURE__ */ new Set();
|
|
595507
|
+
for (const audience of activeAudiences) {
|
|
595508
|
+
keysByAudience[audience]?.forEach((key2) => matched.add(key2));
|
|
595509
|
+
}
|
|
595510
|
+
const excluded = /* @__PURE__ */ new Set();
|
|
595511
|
+
for (const keys25 of Object.values(keysByAudience)) {
|
|
595512
|
+
keys25.forEach((key2) => {
|
|
595513
|
+
if (!matched.has(key2)) {
|
|
595514
|
+
excluded.add(key2);
|
|
595515
|
+
}
|
|
595516
|
+
});
|
|
595517
|
+
}
|
|
595518
|
+
return excluded;
|
|
595519
|
+
}
|
|
595463
595520
|
function audiencesFromConfig(configAudiences) {
|
|
595464
595521
|
switch (configAudiences.type) {
|
|
595465
595522
|
case "all":
|
|
@@ -661091,7 +661148,7 @@ var AccessTokenPosthogManager = class {
|
|
|
661091
661148
|
properties: {
|
|
661092
661149
|
...event,
|
|
661093
661150
|
...event.properties,
|
|
661094
|
-
version: "5.
|
|
661151
|
+
version: "5.19.0-2-ga23646779fb",
|
|
661095
661152
|
usingAccessToken: true,
|
|
661096
661153
|
...getRunIdProperties()
|
|
661097
661154
|
}
|
|
@@ -661146,7 +661203,7 @@ var UserPosthogManager = class {
|
|
|
661146
661203
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
661147
661204
|
event: "CLI",
|
|
661148
661205
|
properties: {
|
|
661149
|
-
version: "5.
|
|
661206
|
+
version: "5.19.0-2-ga23646779fb",
|
|
661150
661207
|
...event,
|
|
661151
661208
|
...event.properties,
|
|
661152
661209
|
usingAccessToken: false,
|
|
@@ -852129,7 +852186,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
852129
852186
|
var LOGS_FOLDER_NAME = "logs";
|
|
852130
852187
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
852131
852188
|
function getCliSource() {
|
|
852132
|
-
const version7 = "5.
|
|
852189
|
+
const version7 = "5.19.0-2-ga23646779fb";
|
|
852133
852190
|
return `cli@${version7}`;
|
|
852134
852191
|
}
|
|
852135
852192
|
var DebugLogger = class {
|
|
@@ -864938,7 +864995,7 @@ var LegacyDocsPublisher = class {
|
|
|
864938
864995
|
previewId,
|
|
864939
864996
|
disableTemplates: void 0,
|
|
864940
864997
|
skipUpload,
|
|
864941
|
-
cliVersion: "5.
|
|
864998
|
+
cliVersion: "5.19.0-2-ga23646779fb",
|
|
864942
864999
|
loginCommand: "fern auth login"
|
|
864943
865000
|
});
|
|
864944
865001
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -939552,7 +939609,7 @@ var CliContext = class _CliContext {
|
|
|
939552
939609
|
if (false) {
|
|
939553
939610
|
this.logger.error("CLI_VERSION is not defined");
|
|
939554
939611
|
}
|
|
939555
|
-
return "5.
|
|
939612
|
+
return "5.19.0-2-ga23646779fb";
|
|
939556
939613
|
}
|
|
939557
939614
|
getCliName() {
|
|
939558
939615
|
if (false) {
|
|
@@ -947050,15 +947107,19 @@ async function executeAutomationsUpgrade({
|
|
|
947050
947107
|
project,
|
|
947051
947108
|
includeMajor: options2.includeMajor
|
|
947052
947109
|
});
|
|
947110
|
+
const cliResult = {
|
|
947111
|
+
from: cliVersionBefore,
|
|
947112
|
+
to: cliVersionAfter,
|
|
947113
|
+
upgraded: cliUpgraded
|
|
947114
|
+
};
|
|
947115
|
+
const hasChanges2 = cliUpgraded || generatorResults.generators.length > 0;
|
|
947116
|
+
const pr11 = hasChanges2 ? buildPrSuggestion({ cli: cliResult, generators: generatorResults.generators }) : null;
|
|
947053
947117
|
const result = {
|
|
947054
|
-
cli:
|
|
947055
|
-
from: cliVersionBefore,
|
|
947056
|
-
to: cliVersionAfter,
|
|
947057
|
-
upgraded: cliUpgraded
|
|
947058
|
-
},
|
|
947118
|
+
cli: cliResult,
|
|
947059
947119
|
generators: generatorResults.generators,
|
|
947060
947120
|
skippedMajor: generatorResults.skippedMajor,
|
|
947061
|
-
alreadyUpToDate: generatorResults.alreadyUpToDate
|
|
947121
|
+
alreadyUpToDate: generatorResults.alreadyUpToDate,
|
|
947122
|
+
pr: pr11
|
|
947062
947123
|
};
|
|
947063
947124
|
return result;
|
|
947064
947125
|
}
|
|
@@ -947127,6 +947188,70 @@ async function upgradeGeneratorsForAllWorkspaces({
|
|
|
947127
947188
|
alreadyUpToDate.sort((a3, b8) => a3.name.localeCompare(b8.name));
|
|
947128
947189
|
return { generators, skippedMajor, alreadyUpToDate };
|
|
947129
947190
|
}
|
|
947191
|
+
function getShortGeneratorName(name2) {
|
|
947192
|
+
return name2.replace(/^fernapi\/fern-/, "");
|
|
947193
|
+
}
|
|
947194
|
+
function buildPrTitle({
|
|
947195
|
+
cli,
|
|
947196
|
+
generators
|
|
947197
|
+
}) {
|
|
947198
|
+
const parts = [];
|
|
947199
|
+
if (cli.upgraded) {
|
|
947200
|
+
parts.push(`CLI ${cli.from} \u2192 ${cli.to}`);
|
|
947201
|
+
}
|
|
947202
|
+
if (generators.length > 0) {
|
|
947203
|
+
parts.push(`${generators.length} generator${generators.length === 1 ? "" : "s"}`);
|
|
947204
|
+
}
|
|
947205
|
+
return `chore(fern): upgrade ${parts.join(" and ")}`;
|
|
947206
|
+
}
|
|
947207
|
+
function buildPrBody({
|
|
947208
|
+
cli,
|
|
947209
|
+
generators
|
|
947210
|
+
}) {
|
|
947211
|
+
const sections = ["## Fern Upgrade\n"];
|
|
947212
|
+
if (cli.upgraded) {
|
|
947213
|
+
sections.push(`### CLI
|
|
947214
|
+
- \`${cli.from}\` \u2192 \`${cli.to}\`
|
|
947215
|
+
`);
|
|
947216
|
+
}
|
|
947217
|
+
if (generators.length > 0) {
|
|
947218
|
+
sections.push("### Generators");
|
|
947219
|
+
sections.push("| Generator | From | To | Changelog |");
|
|
947220
|
+
sections.push("|-----------|------|----|-----------|");
|
|
947221
|
+
for (const g8 of generators) {
|
|
947222
|
+
const link3 = g8.changelog != null ? `[View](${g8.changelog})` : "\u2014";
|
|
947223
|
+
sections.push(`| ${g8.name} | ${g8.from} | ${g8.to} | ${link3} |`);
|
|
947224
|
+
}
|
|
947225
|
+
sections.push("");
|
|
947226
|
+
}
|
|
947227
|
+
sections.push(
|
|
947228
|
+
"---\n\u{1F916} This PR was automatically created by [fern-upgrade](https://github.com/fern-api/actions/tree/main/upgrade)"
|
|
947229
|
+
);
|
|
947230
|
+
return sections.join("\n");
|
|
947231
|
+
}
|
|
947232
|
+
function buildCommitMessage({
|
|
947233
|
+
cli,
|
|
947234
|
+
generators
|
|
947235
|
+
}) {
|
|
947236
|
+
const parts = [];
|
|
947237
|
+
if (cli.upgraded) {
|
|
947238
|
+
parts.push(`cli ${cli.from} -> ${cli.to}`);
|
|
947239
|
+
}
|
|
947240
|
+
for (const g8 of generators) {
|
|
947241
|
+
parts.push(`${getShortGeneratorName(g8.name)} ${g8.from} -> ${g8.to}`);
|
|
947242
|
+
}
|
|
947243
|
+
return `chore: upgrade fern ${parts.join(", ")}`;
|
|
947244
|
+
}
|
|
947245
|
+
function buildPrSuggestion({
|
|
947246
|
+
cli,
|
|
947247
|
+
generators
|
|
947248
|
+
}) {
|
|
947249
|
+
return {
|
|
947250
|
+
title: buildPrTitle({ cli, generators }),
|
|
947251
|
+
body: buildPrBody({ cli, generators }),
|
|
947252
|
+
commitMessage: buildCommitMessage({ cli, generators })
|
|
947253
|
+
};
|
|
947254
|
+
}
|
|
947130
947255
|
|
|
947131
947256
|
// src/commands/diff/diff.ts
|
|
947132
947257
|
init_lib4();
|
package/package.json
CHANGED