@fern-api/fern-api-dev 4.63.5-50-g5cbad6140d5 → 4.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.cjs +73 -39
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -477979,6 +477979,7 @@ var UnionTypeDeclaration = schemas_exports3.objectWithoutOptionalProperties({
|
|
|
477979
477979
|
extends: schemas_exports3.list(DeclaredTypeName),
|
|
477980
477980
|
types: schemas_exports3.list(SingleUnionType),
|
|
477981
477981
|
baseProperties: schemas_exports3.list(ObjectProperty),
|
|
477982
|
+
default: SingleUnionType.optional(),
|
|
477982
477983
|
discriminatorContext: UnionDiscriminatorContext4.optional()
|
|
477983
477984
|
});
|
|
477984
477985
|
|
|
@@ -480292,6 +480293,7 @@ function visitTypeDeclaration({ typeName, declaration, visitor, nodePathForType
|
|
|
480292
480293
|
}
|
|
480293
480294
|
},
|
|
480294
480295
|
"base-properties": noop2,
|
|
480296
|
+
"default-variant": noop2,
|
|
480295
480297
|
availability: noop2,
|
|
480296
480298
|
audiences: noop2,
|
|
480297
480299
|
encoding: noop2,
|
|
@@ -507513,6 +507515,7 @@ var DiscriminatedOneOfSchema = schemas_exports9.objectWithoutOptionalProperties(
|
|
|
507513
507515
|
discriminantProperty: schemas_exports9.string(),
|
|
507514
507516
|
discriminantPropertyNameOverride: schemas_exports9.string().optional(),
|
|
507515
507517
|
discriminatorContext: DiscriminatorContext2.optional(),
|
|
507518
|
+
defaultDiscriminantValue: schemas_exports9.string().optional(),
|
|
507516
507519
|
commonProperties: schemas_exports9.list(schemas_exports9.lazyObject(() => CommonProperty)),
|
|
507517
507520
|
schemas: schemas_exports9.record(schemas_exports9.string(), schemas_exports9.lazy(() => Schema2))
|
|
507518
507521
|
}).extend(WithSdkGroupName).extend(WithNamespace).extend(WithName3).extend(WithDescription).extend(WithAvailability3).extend(WithEncoding).extend(WithSource).extend(WithTitle).extend(WithInline);
|
|
@@ -508392,6 +508395,7 @@ var DiscriminatedOneOfSchemaWithExample = schemas_exports9.objectWithoutOptional
|
|
|
508392
508395
|
discriminantProperty: schemas_exports9.string(),
|
|
508393
508396
|
discriminantPropertyNameOverride: schemas_exports9.string().optional(),
|
|
508394
508397
|
discriminatorContext: DiscriminatorContext2.optional(),
|
|
508398
|
+
defaultDiscriminantValue: schemas_exports9.string().optional(),
|
|
508395
508399
|
commonProperties: schemas_exports9.list(schemas_exports9.lazyObject(() => CommonPropertyWithExample)),
|
|
508396
508400
|
schemas: schemas_exports9.record(schemas_exports9.string(), schemas_exports9.lazy(() => SchemaWithExample2))
|
|
508397
508401
|
}).extend(WithSdkGroupName).extend(WithNamespace).extend(WithName3).extend(WithDescription).extend(WithAvailability3).extend(WithEncoding).extend(WithSource).extend(WithTitle).extend(WithInline);
|
|
@@ -510403,6 +510407,7 @@ function buildOneOfTypeDeclaration({ schema: schema2, context: context3, declara
|
|
|
510403
510407
|
docs: schema2.description ?? void 0,
|
|
510404
510408
|
availability: schema2.availability != null ? convertAvailability(schema2.availability) : void 0,
|
|
510405
510409
|
union: union22,
|
|
510410
|
+
"default-variant": schema2.defaultDiscriminantValue ?? void 0,
|
|
510406
510411
|
encoding,
|
|
510407
510412
|
source: schema2.source != null ? convertToSourceSchema(schema2.source) : void 0
|
|
510408
510413
|
}
|
|
@@ -519002,12 +519007,13 @@ function convertDiscriminatedOneOf({ nameOverride, generatedName, title: title3,
|
|
|
519002
519007
|
discriminantNameOverride,
|
|
519003
519008
|
discriminatorContext,
|
|
519004
519009
|
subtypes: unionSubTypes,
|
|
519010
|
+
defaultDiscriminantValue: void 0,
|
|
519005
519011
|
namespace,
|
|
519006
519012
|
groupName,
|
|
519007
519013
|
source: source2
|
|
519008
519014
|
});
|
|
519009
519015
|
}
|
|
519010
|
-
function convertDiscriminatedOneOfWithVariants({ nameOverride, generatedName, title: title3, breadcrumbs, properties: properties7, description, availability, required: required6, wrapAsOptional, wrapAsNullable, discriminant: discriminant20, variants, context: context3, namespace, groupName, encoding, source: source2 }) {
|
|
519016
|
+
function convertDiscriminatedOneOfWithVariants({ nameOverride, generatedName, title: title3, breadcrumbs, properties: properties7, description, availability, required: required6, wrapAsOptional, wrapAsNullable, discriminant: discriminant20, variants, defaultDiscriminantValue, context: context3, namespace, groupName, encoding, source: source2 }) {
|
|
519011
519017
|
const unionSubTypes = Object.fromEntries(Object.entries(variants).map(([discriminantValue, schema2]) => {
|
|
519012
519018
|
if (isReferenceObject(schema2)) {
|
|
519013
519019
|
const subtypeReference = convertReferenceObject(schema2, false, false, context3, [schema2.$ref], encoding, source2, namespace);
|
|
@@ -519042,18 +519048,20 @@ function convertDiscriminatedOneOfWithVariants({ nameOverride, generatedName, ti
|
|
|
519042
519048
|
discriminantNameOverride: void 0,
|
|
519043
519049
|
discriminatorContext: inferDiscriminatorContextFromVariants({ variants, context: context3 }),
|
|
519044
519050
|
subtypes: unionSubTypes,
|
|
519051
|
+
defaultDiscriminantValue,
|
|
519045
519052
|
namespace,
|
|
519046
519053
|
groupName,
|
|
519047
519054
|
source: source2
|
|
519048
519055
|
});
|
|
519049
519056
|
}
|
|
519050
|
-
function wrapDiscriminatedOneOf({ nameOverride, generatedName, title: title3, wrapAsOptional, wrapAsNullable, properties: properties7, description, availability, discriminant: discriminant20, discriminantNameOverride, discriminatorContext, subtypes, namespace, groupName, source: source2 }) {
|
|
519057
|
+
function wrapDiscriminatedOneOf({ nameOverride, generatedName, title: title3, wrapAsOptional, wrapAsNullable, properties: properties7, description, availability, discriminant: discriminant20, discriminantNameOverride, discriminatorContext, subtypes, defaultDiscriminantValue, namespace, groupName, source: source2 }) {
|
|
519051
519058
|
let result = SchemaWithExample.oneOf(OneOfSchemaWithExample.discriminated({
|
|
519052
519059
|
description,
|
|
519053
519060
|
availability,
|
|
519054
519061
|
discriminantProperty: discriminant20,
|
|
519055
519062
|
discriminantPropertyNameOverride: discriminantNameOverride,
|
|
519056
519063
|
discriminatorContext,
|
|
519064
|
+
defaultDiscriminantValue,
|
|
519057
519065
|
nameOverride,
|
|
519058
519066
|
generatedName,
|
|
519059
519067
|
title: title3,
|
|
@@ -519743,6 +519751,7 @@ function convertToOneOf(oneOfSchema) {
|
|
|
519743
519751
|
discriminantProperty: oneOfSchema.discriminantProperty,
|
|
519744
519752
|
discriminantPropertyNameOverride: oneOfSchema.discriminantPropertyNameOverride,
|
|
519745
519753
|
discriminatorContext: oneOfSchema.discriminatorContext,
|
|
519754
|
+
defaultDiscriminantValue: oneOfSchema.defaultDiscriminantValue,
|
|
519746
519755
|
generatedName: oneOfSchema.generatedName,
|
|
519747
519756
|
title: oneOfSchema.title,
|
|
519748
519757
|
nameOverride: oneOfSchema.nameOverride,
|
|
@@ -521321,6 +521330,7 @@ function convertSchemaObject(schema2, wrapAsOptional, wrapAsNullable, context3,
|
|
|
521321
521330
|
wrapAsNullable,
|
|
521322
521331
|
discriminant: maybeDiscriminant.discriminant,
|
|
521323
521332
|
variants: maybeDiscriminant.schemas,
|
|
521333
|
+
defaultDiscriminantValue: maybeDiscriminant.defaultDiscriminantValue,
|
|
521324
521334
|
context: context3,
|
|
521325
521335
|
namespace,
|
|
521326
521336
|
groupName,
|
|
@@ -521386,6 +521396,7 @@ function convertSchemaObject(schema2, wrapAsOptional, wrapAsNullable, context3,
|
|
|
521386
521396
|
wrapAsNullable,
|
|
521387
521397
|
discriminant: maybeDiscriminant.discriminant,
|
|
521388
521398
|
variants: maybeDiscriminant.schemas,
|
|
521399
|
+
defaultDiscriminantValue: maybeDiscriminant.defaultDiscriminantValue,
|
|
521389
521400
|
context: context3,
|
|
521390
521401
|
namespace,
|
|
521391
521402
|
groupName,
|
|
@@ -521855,9 +521866,23 @@ function getDiscriminant({ schemas, context: context3 }) {
|
|
|
521855
521866
|
}
|
|
521856
521867
|
for (const [discriminant20, variants] of Object.entries(discriminantToVariants)) {
|
|
521857
521868
|
if (Object.keys(variants).length === schemas.length) {
|
|
521869
|
+
let defaultDiscriminantValue;
|
|
521870
|
+
for (const [discriminantValue, variantSchema] of Object.entries(variants)) {
|
|
521871
|
+
const resolved = isReferenceObject(variantSchema) ? context3.resolveSchemaReference(variantSchema) : variantSchema;
|
|
521872
|
+
const discriminantPropertySchema = resolved.properties?.[discriminant20];
|
|
521873
|
+
if (discriminantPropertySchema != null && !isReferenceObject(discriminantPropertySchema)) {
|
|
521874
|
+
const fernDefault = getExtension(discriminantPropertySchema, FernOpenAPIExtension.FERN_DEFAULT);
|
|
521875
|
+
const defaultValue = fernDefault ?? discriminantPropertySchema.default;
|
|
521876
|
+
if (defaultValue === discriminantValue) {
|
|
521877
|
+
defaultDiscriminantValue = discriminantValue;
|
|
521878
|
+
break;
|
|
521879
|
+
}
|
|
521880
|
+
}
|
|
521881
|
+
}
|
|
521858
521882
|
return {
|
|
521859
521883
|
discriminant: discriminant20,
|
|
521860
|
-
schemas: variants
|
|
521884
|
+
schemas: variants,
|
|
521885
|
+
defaultDiscriminantValue
|
|
521861
521886
|
};
|
|
521862
521887
|
}
|
|
521863
521888
|
}
|
|
@@ -523209,6 +523234,7 @@ function convertToOneOf2(oneOfSchema) {
|
|
|
523209
523234
|
discriminantProperty: oneOfSchema.discriminantProperty,
|
|
523210
523235
|
discriminantPropertyNameOverride: oneOfSchema.discriminantPropertyNameOverride,
|
|
523211
523236
|
discriminatorContext: oneOfSchema.discriminatorContext,
|
|
523237
|
+
defaultDiscriminantValue: oneOfSchema.defaultDiscriminantValue,
|
|
523212
523238
|
generatedName: oneOfSchema.generatedName,
|
|
523213
523239
|
nameOverride: oneOfSchema.nameOverride,
|
|
523214
523240
|
title: oneOfSchema.title,
|
|
@@ -543998,6 +544024,42 @@ function getDocs(field5) {
|
|
|
543998
544024
|
var DEFAULT_UNION_VALUE_PROPERTY_VALUE = "value";
|
|
543999
544025
|
function convertDiscriminatedUnionTypeDeclaration({ union: union21, file: file4, typeResolver }) {
|
|
544000
544026
|
const discriminant20 = getUnionDiscriminant(union21);
|
|
544027
|
+
const defaultVariantKey = union21["default-variant"];
|
|
544028
|
+
const unionTypes = Object.entries(union21.union).map(([unionKey, rawSingleUnionType]) => {
|
|
544029
|
+
const rawType = typeof rawSingleUnionType === "string" ? rawSingleUnionType : typeof rawSingleUnionType.type === "string" ? rawSingleUnionType.type : void 0;
|
|
544030
|
+
const discriminantValue = file4.casingsGenerator.generateNameAndWireValue({
|
|
544031
|
+
wireValue: unionKey,
|
|
544032
|
+
name: getSingleUnionTypeName({ unionKey, rawSingleUnionType }).name
|
|
544033
|
+
});
|
|
544034
|
+
const docs = getDocs(rawSingleUnionType);
|
|
544035
|
+
if (rawType == null) {
|
|
544036
|
+
return {
|
|
544037
|
+
discriminantValue,
|
|
544038
|
+
docs,
|
|
544039
|
+
shape: SingleUnionTypeProperties.noProperties(),
|
|
544040
|
+
displayName: void 0,
|
|
544041
|
+
availability: void 0
|
|
544042
|
+
};
|
|
544043
|
+
}
|
|
544044
|
+
const parsedValueType = file4.parseTypeReference(rawType);
|
|
544045
|
+
return {
|
|
544046
|
+
discriminantValue,
|
|
544047
|
+
shape: getSingleUnionTypeProperties({
|
|
544048
|
+
rawSingleUnionType,
|
|
544049
|
+
rawValueType: rawType,
|
|
544050
|
+
parsedValueType,
|
|
544051
|
+
file: file4,
|
|
544052
|
+
typeResolver
|
|
544053
|
+
}),
|
|
544054
|
+
docs: getDocs(rawSingleUnionType),
|
|
544055
|
+
displayName: getDisplayName2(rawSingleUnionType),
|
|
544056
|
+
availability: getAvailability(rawSingleUnionType)
|
|
544057
|
+
};
|
|
544058
|
+
});
|
|
544059
|
+
const defaultUnionType = defaultVariantKey != null ? unionTypes.find((ut11) => {
|
|
544060
|
+
const wireValue = typeof ut11.discriminantValue === "string" ? ut11.discriminantValue : ut11.discriminantValue.wireValue;
|
|
544061
|
+
return wireValue === defaultVariantKey;
|
|
544062
|
+
}) : void 0;
|
|
544001
544063
|
return Type.union({
|
|
544002
544064
|
discriminant: file4.casingsGenerator.generateNameAndWireValue({
|
|
544003
544065
|
wireValue: discriminant20,
|
|
@@ -544017,37 +544079,8 @@ function convertDiscriminatedUnionTypeDeclaration({ union: union21, file: file4,
|
|
|
544017
544079
|
autogeneratedExamples: {}
|
|
544018
544080
|
}
|
|
544019
544081
|
})) : [],
|
|
544020
|
-
types:
|
|
544021
|
-
|
|
544022
|
-
const discriminantValue = file4.casingsGenerator.generateNameAndWireValue({
|
|
544023
|
-
wireValue: unionKey,
|
|
544024
|
-
name: getSingleUnionTypeName({ unionKey, rawSingleUnionType }).name
|
|
544025
|
-
});
|
|
544026
|
-
const docs = getDocs(rawSingleUnionType);
|
|
544027
|
-
if (rawType == null) {
|
|
544028
|
-
return {
|
|
544029
|
-
discriminantValue,
|
|
544030
|
-
docs,
|
|
544031
|
-
shape: SingleUnionTypeProperties.noProperties(),
|
|
544032
|
-
displayName: void 0,
|
|
544033
|
-
availability: void 0
|
|
544034
|
-
};
|
|
544035
|
-
}
|
|
544036
|
-
const parsedValueType = file4.parseTypeReference(rawType);
|
|
544037
|
-
return {
|
|
544038
|
-
discriminantValue,
|
|
544039
|
-
shape: getSingleUnionTypeProperties({
|
|
544040
|
-
rawSingleUnionType,
|
|
544041
|
-
rawValueType: rawType,
|
|
544042
|
-
parsedValueType,
|
|
544043
|
-
file: file4,
|
|
544044
|
-
typeResolver
|
|
544045
|
-
}),
|
|
544046
|
-
docs: getDocs(rawSingleUnionType),
|
|
544047
|
-
displayName: getDisplayName2(rawSingleUnionType),
|
|
544048
|
-
availability: getAvailability(rawSingleUnionType)
|
|
544049
|
-
};
|
|
544050
|
-
}),
|
|
544082
|
+
types: unionTypes,
|
|
544083
|
+
default: defaultUnionType,
|
|
544051
544084
|
discriminatorContext: getDiscriminatorContext({ union: union21 })
|
|
544052
544085
|
});
|
|
544053
544086
|
}
|
|
@@ -585493,6 +585526,7 @@ var OneOfSchemaConverter = class extends AbstractConverter {
|
|
|
585493
585526
|
}),
|
|
585494
585527
|
extends: extends_,
|
|
585495
585528
|
types: unionTypes,
|
|
585529
|
+
default: void 0,
|
|
585496
585530
|
discriminatorContext: void 0
|
|
585497
585531
|
}),
|
|
585498
585532
|
referencedTypes,
|
|
@@ -603739,7 +603773,7 @@ var AccessTokenPosthogManager = class {
|
|
|
603739
603773
|
properties: {
|
|
603740
603774
|
...event,
|
|
603741
603775
|
...event.properties,
|
|
603742
|
-
version: "4.
|
|
603776
|
+
version: "4.64.0",
|
|
603743
603777
|
usingAccessToken: true
|
|
603744
603778
|
}
|
|
603745
603779
|
});
|
|
@@ -603790,7 +603824,7 @@ var UserPosthogManager = class {
|
|
|
603790
603824
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
603791
603825
|
event: "CLI",
|
|
603792
603826
|
properties: {
|
|
603793
|
-
version: "4.
|
|
603827
|
+
version: "4.64.0",
|
|
603794
603828
|
...event,
|
|
603795
603829
|
...event.properties,
|
|
603796
603830
|
usingAccessToken: false,
|
|
@@ -840757,7 +840791,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
840757
840791
|
var LOGS_FOLDER_NAME = "logs";
|
|
840758
840792
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
840759
840793
|
function getCliSource() {
|
|
840760
|
-
const version7 = "4.
|
|
840794
|
+
const version7 = "4.64.0";
|
|
840761
840795
|
return `cli@${version7}`;
|
|
840762
840796
|
}
|
|
840763
840797
|
var DebugLogger = class {
|
|
@@ -851955,7 +851989,7 @@ var LegacyDocsPublisher = class {
|
|
|
851955
851989
|
previewId,
|
|
851956
851990
|
disableTemplates: void 0,
|
|
851957
851991
|
skipUpload,
|
|
851958
|
-
cliVersion: "4.
|
|
851992
|
+
cliVersion: "4.64.0"
|
|
851959
851993
|
});
|
|
851960
851994
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
851961
851995
|
return { success: false };
|
|
@@ -925368,7 +925402,7 @@ var CliContext = class {
|
|
|
925368
925402
|
if (false) {
|
|
925369
925403
|
this.logger.error("CLI_VERSION is not defined");
|
|
925370
925404
|
}
|
|
925371
|
-
return "4.
|
|
925405
|
+
return "4.64.0";
|
|
925372
925406
|
}
|
|
925373
925407
|
getCliName() {
|
|
925374
925408
|
if (false) {
|
package/package.json
CHANGED