@fern-api/fern-api-dev 5.11.0-6-gc2ebeea80bc → 5.12.0-4-g281037f5a95
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 +43 -6
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -623368,7 +623368,7 @@ var AccessTokenPosthogManager = class {
|
|
|
623368
623368
|
properties: {
|
|
623369
623369
|
...event,
|
|
623370
623370
|
...event.properties,
|
|
623371
|
-
version: "5.
|
|
623371
|
+
version: "5.12.0-4-g281037f5a95",
|
|
623372
623372
|
usingAccessToken: true
|
|
623373
623373
|
}
|
|
623374
623374
|
});
|
|
@@ -623422,7 +623422,7 @@ var UserPosthogManager = class {
|
|
|
623422
623422
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
623423
623423
|
event: "CLI",
|
|
623424
623424
|
properties: {
|
|
623425
|
-
version: "5.
|
|
623425
|
+
version: "5.12.0-4-g281037f5a95",
|
|
623426
623426
|
...event,
|
|
623427
623427
|
...event.properties,
|
|
623428
623428
|
usingAccessToken: false,
|
|
@@ -848373,7 +848373,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
848373
848373
|
var LOGS_FOLDER_NAME = "logs";
|
|
848374
848374
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
848375
848375
|
function getCliSource() {
|
|
848376
|
-
const version7 = "5.
|
|
848376
|
+
const version7 = "5.12.0-4-g281037f5a95";
|
|
848377
848377
|
return `cli@${version7}`;
|
|
848378
848378
|
}
|
|
848379
848379
|
var DebugLogger = class {
|
|
@@ -861037,7 +861037,7 @@ var LegacyDocsPublisher = class {
|
|
|
861037
861037
|
previewId,
|
|
861038
861038
|
disableTemplates: void 0,
|
|
861039
861039
|
skipUpload,
|
|
861040
|
-
cliVersion: "5.
|
|
861040
|
+
cliVersion: "5.12.0-4-g281037f5a95",
|
|
861041
861041
|
loginCommand: "fern auth login"
|
|
861042
861042
|
});
|
|
861043
861043
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -895555,6 +895555,28 @@ var DynamicTypeLiteralMapper3 = class {
|
|
|
895555
895555
|
multiline: true
|
|
895556
895556
|
}));
|
|
895557
895557
|
}
|
|
895558
|
+
convertDiscriminatedUnionToFlatKwargs({ discriminatedUnion: discriminatedUnion2, value: value2 }) {
|
|
895559
|
+
const discriminatedUnionTypeInstance = this.context.resolveDiscriminatedUnionTypeInstance({
|
|
895560
|
+
discriminatedUnion: discriminatedUnion2,
|
|
895561
|
+
value: value2
|
|
895562
|
+
});
|
|
895563
|
+
if (discriminatedUnionTypeInstance == null) {
|
|
895564
|
+
return void 0;
|
|
895565
|
+
}
|
|
895566
|
+
const unionVariant = discriminatedUnionTypeInstance.singleDiscriminatedUnionType;
|
|
895567
|
+
const unionProperties = this.convertDiscriminatedUnionProperties({
|
|
895568
|
+
discriminatedUnionTypeInstance,
|
|
895569
|
+
unionVariant
|
|
895570
|
+
});
|
|
895571
|
+
if (unionProperties == null) {
|
|
895572
|
+
return void 0;
|
|
895573
|
+
}
|
|
895574
|
+
const discriminantEntry = {
|
|
895575
|
+
name: this.context.getPropertyName(discriminatedUnion2.discriminant.name),
|
|
895576
|
+
value: python_exports.TypeInstantiation.str(discriminatedUnionTypeInstance.discriminantValue.wireValue)
|
|
895577
|
+
};
|
|
895578
|
+
return [...unionProperties, discriminantEntry];
|
|
895579
|
+
}
|
|
895558
895580
|
convertDiscriminatedUnionProperties({ discriminatedUnionTypeInstance, unionVariant }) {
|
|
895559
895581
|
const baseFields = this.getBaseFields({
|
|
895560
895582
|
discriminatedUnionTypeInstance,
|
|
@@ -896641,8 +896663,23 @@ var EndpointSnippetGenerator6 = class {
|
|
|
896641
896663
|
switch (named.type) {
|
|
896642
896664
|
case "alias":
|
|
896643
896665
|
return this.getBodyRequestArgsForTypeReference({ typeReference: named.typeReference, value: value2 });
|
|
896644
|
-
case "enum":
|
|
896645
896666
|
case "discriminatedUnion":
|
|
896667
|
+
if (this.context.customConfig.flatten_union_request_bodies === true) {
|
|
896668
|
+
const flatKwargs = this.context.dynamicTypeLiteralMapper.convertDiscriminatedUnionToFlatKwargs({
|
|
896669
|
+
discriminatedUnion: named,
|
|
896670
|
+
value: value2
|
|
896671
|
+
});
|
|
896672
|
+
if (flatKwargs != null) {
|
|
896673
|
+
return flatKwargs;
|
|
896674
|
+
}
|
|
896675
|
+
}
|
|
896676
|
+
return [
|
|
896677
|
+
{
|
|
896678
|
+
name: REQUEST_BODY_ARG_NAME,
|
|
896679
|
+
value: this.context.dynamicTypeLiteralMapper.convert({ typeReference: typeReference2, value: value2 })
|
|
896680
|
+
}
|
|
896681
|
+
];
|
|
896682
|
+
case "enum":
|
|
896646
896683
|
case "undiscriminatedUnion":
|
|
896647
896684
|
return [
|
|
896648
896685
|
{
|
|
@@ -935601,7 +935638,7 @@ var CliContext = class _CliContext {
|
|
|
935601
935638
|
if (false) {
|
|
935602
935639
|
this.logger.error("CLI_VERSION is not defined");
|
|
935603
935640
|
}
|
|
935604
|
-
return "5.
|
|
935641
|
+
return "5.12.0-4-g281037f5a95";
|
|
935605
935642
|
}
|
|
935606
935643
|
getCliName() {
|
|
935607
935644
|
if (false) {
|
package/package.json
CHANGED