fern-api 0.16.2 → 0.16.4
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 +40 -5
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -736685,7 +736685,7 @@ var AccessTokenPosthogManager = class {
|
|
|
736685
736685
|
properties: {
|
|
736686
736686
|
...event,
|
|
736687
736687
|
...event.properties,
|
|
736688
|
-
version: "0.16.
|
|
736688
|
+
version: "0.16.4",
|
|
736689
736689
|
usingAccessToken: true
|
|
736690
736690
|
}
|
|
736691
736691
|
});
|
|
@@ -736747,7 +736747,7 @@ var UserPosthogManager = class {
|
|
|
736747
736747
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
736748
736748
|
event: "CLI",
|
|
736749
736749
|
properties: {
|
|
736750
|
-
version: "0.16.
|
|
736750
|
+
version: "0.16.4",
|
|
736751
736751
|
...event,
|
|
736752
736752
|
...event.properties
|
|
736753
736753
|
}
|
|
@@ -749339,8 +749339,12 @@ function convertPrimitive(primitiveExample) {
|
|
|
749339
749339
|
return primitiveExample.float;
|
|
749340
749340
|
case "double":
|
|
749341
749341
|
return primitiveExample.double;
|
|
749342
|
-
case "string":
|
|
749342
|
+
case "string": {
|
|
749343
|
+
if (primitiveExample.string.startsWith("$")) {
|
|
749344
|
+
return `\\$${primitiveExample.string}`;
|
|
749345
|
+
}
|
|
749343
749346
|
return primitiveExample.string;
|
|
749347
|
+
}
|
|
749344
749348
|
case "datetime":
|
|
749345
749349
|
return primitiveExample.datetime;
|
|
749346
749350
|
case "date":
|
|
@@ -750774,10 +750778,22 @@ function wrapEnum({ wrapAsNullable, nameOverride, generatedName, values: values3
|
|
|
750774
750778
|
groupName
|
|
750775
750779
|
});
|
|
750776
750780
|
}
|
|
750781
|
+
var HARDCODED_ENUM_NAMES = {
|
|
750782
|
+
"<": "LESS_THAN",
|
|
750783
|
+
">": "GREATER_THAN",
|
|
750784
|
+
">=": "GREATER_THAN_OR_EQUAL_TO",
|
|
750785
|
+
"<=": "LESS_THAN_OR_EQUAL_TO",
|
|
750786
|
+
"!=": "NOT_EQUALS",
|
|
750787
|
+
"=": "EQUAL_TO",
|
|
750788
|
+
"==": "EQUAL_TO"
|
|
750789
|
+
};
|
|
750777
750790
|
function generateEnumNameFromValue(value) {
|
|
750778
750791
|
const maybeParsedNumber = replaceStartingNumber(value);
|
|
750792
|
+
const maybeHardcodedEnumName = HARDCODED_ENUM_NAMES[value];
|
|
750779
750793
|
if (maybeParsedNumber != null) {
|
|
750780
750794
|
return upperFirst_default(camelCase_default(maybeParsedNumber));
|
|
750795
|
+
} else if (maybeHardcodedEnumName != null) {
|
|
750796
|
+
return maybeHardcodedEnumName;
|
|
750781
750797
|
} else {
|
|
750782
750798
|
if (value.toLowerCase() === "n/a") {
|
|
750783
750799
|
return "NOT_APPLICABLE";
|
|
@@ -751520,6 +751536,25 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
|
|
|
751520
751536
|
});
|
|
751521
751537
|
}
|
|
751522
751538
|
}
|
|
751539
|
+
if (isListOfStrings(schema2.type) && schema2.type.length > 1) {
|
|
751540
|
+
const wrapVariantAsNullable = schema2.type.includes("null");
|
|
751541
|
+
const subtypes = schema2.type.filter((val) => val !== "null").map((type2) => {
|
|
751542
|
+
return {
|
|
751543
|
+
type: type2,
|
|
751544
|
+
nullable: wrapVariantAsNullable
|
|
751545
|
+
};
|
|
751546
|
+
});
|
|
751547
|
+
return convertUndiscriminatedOneOf({
|
|
751548
|
+
nameOverride,
|
|
751549
|
+
generatedName,
|
|
751550
|
+
breadcrumbs,
|
|
751551
|
+
description,
|
|
751552
|
+
wrapAsNullable,
|
|
751553
|
+
context,
|
|
751554
|
+
subtypes,
|
|
751555
|
+
groupName
|
|
751556
|
+
});
|
|
751557
|
+
}
|
|
751523
751558
|
if (schema2 === "boolean" || schema2.type === "boolean") {
|
|
751524
751559
|
const literalValue = getExtension(schema2, FernOpenAPIExtension.BOOLEAN_LITERAL);
|
|
751525
751560
|
if (literalValue != null) {
|
|
@@ -761137,10 +761172,10 @@ var CliContext = class {
|
|
|
761137
761172
|
return "fern-api";
|
|
761138
761173
|
}
|
|
761139
761174
|
getPackageVersion() {
|
|
761140
|
-
if ("0.16.
|
|
761175
|
+
if ("0.16.4" == null) {
|
|
761141
761176
|
this.logger.error("CLI_VERSION is not defined");
|
|
761142
761177
|
}
|
|
761143
|
-
return "0.16.
|
|
761178
|
+
return "0.16.4";
|
|
761144
761179
|
}
|
|
761145
761180
|
getCliName() {
|
|
761146
761181
|
if ("fern" == null) {
|