fern-api 0.39.15 → 0.39.16
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/bundle.cjs +22 -19
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -1192625,7 +1192625,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1192625
1192625
|
properties: {
|
|
1192626
1192626
|
...event,
|
|
1192627
1192627
|
...event.properties,
|
|
1192628
|
-
version: "0.39.
|
|
1192628
|
+
version: "0.39.16",
|
|
1192629
1192629
|
usingAccessToken: true
|
|
1192630
1192630
|
}
|
|
1192631
1192631
|
});
|
|
@@ -1192687,7 +1192687,7 @@ var UserPosthogManager = class {
|
|
|
1192687
1192687
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1192688
1192688
|
event: "CLI",
|
|
1192689
1192689
|
properties: {
|
|
1192690
|
-
version: "0.39.
|
|
1192690
|
+
version: "0.39.16",
|
|
1192691
1192691
|
...event,
|
|
1192692
1192692
|
...event.properties
|
|
1192693
1192693
|
}
|
|
@@ -1197750,10 +1197750,10 @@ var CliContext = class {
|
|
|
1197750
1197750
|
return "fern-api";
|
|
1197751
1197751
|
}
|
|
1197752
1197752
|
getPackageVersion() {
|
|
1197753
|
-
if ("0.39.
|
|
1197753
|
+
if ("0.39.16" == null) {
|
|
1197754
1197754
|
this.logger.error("CLI_VERSION is not defined");
|
|
1197755
1197755
|
}
|
|
1197756
|
-
return "0.39.
|
|
1197756
|
+
return "0.39.16";
|
|
1197757
1197757
|
}
|
|
1197758
1197758
|
getCliName() {
|
|
1197759
1197759
|
if ("fern" == null) {
|
|
@@ -1242092,23 +1242092,23 @@ var ExampleGenerator = class {
|
|
|
1242092
1242092
|
}
|
|
1242093
1242093
|
this.flattenedProperties = /* @__PURE__ */ new Map();
|
|
1242094
1242094
|
for (const typeId of this.types.keys()) {
|
|
1242095
|
-
this.flattenedProperties.set(typeId, this.getFlattenedProperties(typeId));
|
|
1242095
|
+
this.flattenedProperties.set(typeId, this.getFlattenedProperties(typeId, 0));
|
|
1242096
1242096
|
}
|
|
1242097
1242097
|
}
|
|
1242098
|
-
convertPropertyToExampleProperty(originalType, property5) {
|
|
1242098
|
+
convertPropertyToExampleProperty(originalType, property5, depth) {
|
|
1242099
1242099
|
return {
|
|
1242100
1242100
|
name: property5.name,
|
|
1242101
|
-
value: this.generateExampleTypeReference(property5.valueType,
|
|
1242101
|
+
value: this.generateExampleTypeReference(property5.valueType, depth),
|
|
1242102
1242102
|
originalTypeDeclaration: originalType
|
|
1242103
1242103
|
};
|
|
1242104
1242104
|
}
|
|
1242105
|
-
getFlattenedProperties(typeId) {
|
|
1242105
|
+
getFlattenedProperties(typeId, depth) {
|
|
1242106
1242106
|
const td = this.types.get(typeId);
|
|
1242107
1242107
|
const foundTd = td === void 0 ? [] : this.flattenedProperties.get(typeId) ?? td.shape._visit({
|
|
1242108
1242108
|
alias: (atd) => {
|
|
1242109
1242109
|
return atd.aliasOf._visit({
|
|
1242110
1242110
|
container: () => [],
|
|
1242111
|
-
named: (dtn) => this.getFlattenedProperties(dtn.typeId),
|
|
1242111
|
+
named: (dtn) => this.getFlattenedProperties(dtn.typeId, depth),
|
|
1242112
1242112
|
primitive: () => [],
|
|
1242113
1242113
|
unknown: () => [],
|
|
1242114
1242114
|
_other: () => []
|
|
@@ -1242120,16 +1242120,16 @@ var ExampleGenerator = class {
|
|
|
1242120
1242120
|
},
|
|
1242121
1242121
|
object: (otd) => {
|
|
1242122
1242122
|
const props = [
|
|
1242123
|
-
...otd.properties.map((prop) => this.convertPropertyToExampleProperty(td.name, prop)),
|
|
1242124
|
-
...otd.extends.flatMap((eo) => this.getFlattenedProperties(eo.typeId))
|
|
1242123
|
+
...otd.properties.map((prop) => this.convertPropertyToExampleProperty(td.name, prop, depth)),
|
|
1242124
|
+
...otd.extends.flatMap((eo) => this.getFlattenedProperties(eo.typeId, depth))
|
|
1242125
1242125
|
];
|
|
1242126
1242126
|
this.flattenedProperties.set(typeId, props);
|
|
1242127
1242127
|
return props;
|
|
1242128
1242128
|
},
|
|
1242129
1242129
|
union: (utd) => {
|
|
1242130
1242130
|
const props = [
|
|
1242131
|
-
...utd.baseProperties.map((prop) => this.convertPropertyToExampleProperty(td.name, prop)),
|
|
1242132
|
-
...utd.extends.flatMap((eo) => this.getFlattenedProperties(eo.typeId))
|
|
1242131
|
+
...utd.baseProperties.map((prop) => this.convertPropertyToExampleProperty(td.name, prop, depth)),
|
|
1242132
|
+
...utd.extends.flatMap((eo) => this.getFlattenedProperties(eo.typeId, depth))
|
|
1242133
1242133
|
];
|
|
1242134
1242134
|
this.flattenedProperties.set(typeId, props);
|
|
1242135
1242135
|
return props;
|
|
@@ -1242375,11 +1242375,11 @@ var ExampleGenerator = class {
|
|
|
1242375
1242375
|
case "enum":
|
|
1242376
1242376
|
return this.generateExampleTypeForEnum(typeDeclaration.shape);
|
|
1242377
1242377
|
case "object":
|
|
1242378
|
-
return this.generateExampleTypeForObject(typeDeclaration.name);
|
|
1242378
|
+
return this.generateExampleTypeForObject(typeDeclaration.name, depth);
|
|
1242379
1242379
|
case "union":
|
|
1242380
1242380
|
return this.generateExampleTypeForUnion(typeDeclaration.name.typeId, typeDeclaration.shape, depth);
|
|
1242381
1242381
|
case "undiscriminatedUnion":
|
|
1242382
|
-
return this.generateExampleTypeForUndiscriminatedUnion(typeDeclaration.shape);
|
|
1242382
|
+
return this.generateExampleTypeForUndiscriminatedUnion(typeDeclaration.shape, depth);
|
|
1242383
1242383
|
default:
|
|
1242384
1242384
|
assertNever(typeDeclaration.shape);
|
|
1242385
1242385
|
}
|
|
@@ -1242405,8 +1242405,11 @@ var ExampleGenerator = class {
|
|
|
1242405
1242405
|
})
|
|
1242406
1242406
|
});
|
|
1242407
1242407
|
}
|
|
1242408
|
-
generateExampleTypeForObject(declaredTypeName) {
|
|
1242408
|
+
generateExampleTypeForObject(declaredTypeName, depth) {
|
|
1242409
1242409
|
const providedExample = this.userProvidedTypeExamples.get(declaredTypeName.typeId);
|
|
1242410
|
+
if (!this.flattenedProperties.has(declaredTypeName.typeId)) {
|
|
1242411
|
+
this.flattenedProperties.set(declaredTypeName.typeId, this.getFlattenedProperties(declaredTypeName.typeId, depth));
|
|
1242412
|
+
}
|
|
1242410
1242413
|
const exampleProperties = this.flattenedProperties.get(declaredTypeName.typeId);
|
|
1242411
1242414
|
const jsonExample = {};
|
|
1242412
1242415
|
exampleProperties == null ? void 0 : exampleProperties.forEach((prop) => jsonExample[prop.name.wireValue] = prop.value.jsonExample);
|
|
@@ -1242474,9 +1242477,9 @@ var ExampleGenerator = class {
|
|
|
1242474
1242477
|
});
|
|
1242475
1242478
|
});
|
|
1242476
1242479
|
}
|
|
1242477
|
-
generateExampleTypeForUndiscriminatedUnion(undiscriminatedUnionDeclaration) {
|
|
1242480
|
+
generateExampleTypeForUndiscriminatedUnion(undiscriminatedUnionDeclaration, depth) {
|
|
1242478
1242481
|
return undiscriminatedUnionDeclaration.members.map((member, index2) => {
|
|
1242479
|
-
const memberExample = this.generateExampleTypeReference(member.type,
|
|
1242482
|
+
const memberExample = this.generateExampleTypeReference(member.type, depth);
|
|
1242480
1242483
|
return this.newNamelessExampleType({
|
|
1242481
1242484
|
jsonExample: memberExample.jsonExample,
|
|
1242482
1242485
|
shape: ExampleTypeShape.undiscriminatedUnion({
|
|
@@ -1304024,7 +1304027,7 @@ var V53_TO_V52_MIGRATION = {
|
|
|
1304024
1304027
|
[GeneratorName.OPENAPI_PYTHON_CLIENT]: GeneratorWasNeverUpdatedToConsumeNewIR,
|
|
1304025
1304028
|
[GeneratorName.OPENAPI]: GeneratorWasNeverUpdatedToConsumeNewIR,
|
|
1304026
1304029
|
[GeneratorName.STOPLIGHT]: GeneratorWasNeverUpdatedToConsumeNewIR,
|
|
1304027
|
-
[GeneratorName.POSTMAN]:
|
|
1304030
|
+
[GeneratorName.POSTMAN]: "0.2.0",
|
|
1304028
1304031
|
[GeneratorName.PYTHON_SDK]: "3.3.0-rc0",
|
|
1304029
1304032
|
[GeneratorName.GO_FIBER]: GeneratorWasNeverUpdatedToConsumeNewIR,
|
|
1304030
1304033
|
[GeneratorName.GO_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR,
|