fern-api 0.31.5 → 0.31.6
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 +23 -8
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -1101274,7 +1101274,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1101274
1101274
|
properties: {
|
|
1101275
1101275
|
...event,
|
|
1101276
1101276
|
...event.properties,
|
|
1101277
|
-
version: "0.31.
|
|
1101277
|
+
version: "0.31.6",
|
|
1101278
1101278
|
usingAccessToken: true
|
|
1101279
1101279
|
}
|
|
1101280
1101280
|
});
|
|
@@ -1101336,7 +1101336,7 @@ var UserPosthogManager = class {
|
|
|
1101336
1101336
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1101337
1101337
|
event: "CLI",
|
|
1101338
1101338
|
properties: {
|
|
1101339
|
-
version: "0.31.
|
|
1101339
|
+
version: "0.31.6",
|
|
1101340
1101340
|
...event,
|
|
1101341
1101341
|
...event.properties
|
|
1101342
1101342
|
}
|
|
@@ -1113960,6 +1113960,10 @@ function getValidationFromTypeReference(typeReference) {
|
|
|
1113960
1113960
|
}
|
|
1113961
1113961
|
|
|
1113962
1113962
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-to-fern/lib/buildTypeReference.js
|
|
1113963
|
+
var MIN_INT_32 = -2147483648;
|
|
1113964
|
+
var MAX_INT_32 = 2147483647;
|
|
1113965
|
+
var MIN_DOUBLE_64 = -17976931348623157e292;
|
|
1113966
|
+
var MAX_DOUBLE_64 = 17976931348623157e292;
|
|
1113963
1113967
|
function buildTypeReference({
|
|
1113964
1113968
|
schema: schema2,
|
|
1113965
1113969
|
fileContainingReference,
|
|
@@ -1114054,7 +1114058,7 @@ function buildStringTypeReference({ description, schema: schema2 }) {
|
|
|
1114054
1114058
|
}
|
|
1114055
1114059
|
function buildIntegerTypeReference({ description, schema: schema2 }) {
|
|
1114056
1114060
|
const type2 = "integer";
|
|
1114057
|
-
const validation = maybeNumberValidation(schema2);
|
|
1114061
|
+
const validation = maybeNumberValidation(schema2, type2);
|
|
1114058
1114062
|
if (description == null && schema2.default == null && validation == null) {
|
|
1114059
1114063
|
return type2;
|
|
1114060
1114064
|
}
|
|
@@ -1114074,7 +1114078,7 @@ function buildIntegerTypeReference({ description, schema: schema2 }) {
|
|
|
1114074
1114078
|
}
|
|
1114075
1114079
|
function buildDoubleTypeReference({ description, schema: schema2 }) {
|
|
1114076
1114080
|
const type2 = "double";
|
|
1114077
|
-
const validation = maybeNumberValidation(schema2);
|
|
1114081
|
+
const validation = maybeNumberValidation(schema2, type2);
|
|
1114078
1114082
|
if (description == null && schema2.default == null && validation == null) {
|
|
1114079
1114083
|
return type2;
|
|
1114080
1114084
|
}
|
|
@@ -1114107,11 +1114111,15 @@ function maybeStringValidation(schema2) {
|
|
|
1114107
1114111
|
maxLength
|
|
1114108
1114112
|
};
|
|
1114109
1114113
|
}
|
|
1114110
|
-
function maybeNumberValidation(schema2) {
|
|
1114114
|
+
function maybeNumberValidation(schema2, type2) {
|
|
1114111
1114115
|
if (schema2 == null) {
|
|
1114112
1114116
|
return void 0;
|
|
1114113
1114117
|
}
|
|
1114114
|
-
|
|
1114118
|
+
let { minimum, maximum, multipleOf } = schema2;
|
|
1114119
|
+
const { exclusiveMinimum, exclusiveMaximum } = schema2;
|
|
1114120
|
+
minimum = makeUndefinedIfOutsideRange(minimum, type2);
|
|
1114121
|
+
maximum = makeUndefinedIfOutsideRange(maximum, type2);
|
|
1114122
|
+
multipleOf = makeUndefinedIfOutsideRange(multipleOf, type2);
|
|
1114115
1114123
|
if (minimum == null && maximum == null && exclusiveMinimum == null && exclusiveMaximum == null && multipleOf == null) {
|
|
1114116
1114124
|
return void 0;
|
|
1114117
1114125
|
}
|
|
@@ -1114123,6 +1114131,13 @@ function maybeNumberValidation(schema2) {
|
|
|
1114123
1114131
|
multipleOf
|
|
1114124
1114132
|
};
|
|
1114125
1114133
|
}
|
|
1114134
|
+
function makeUndefinedIfOutsideRange(num, type2) {
|
|
1114135
|
+
if (num === void 0) {
|
|
1114136
|
+
return void 0;
|
|
1114137
|
+
}
|
|
1114138
|
+
const [min2, max2] = type2 === "integer" ? [MIN_INT_32, MAX_INT_32] : [MIN_DOUBLE_64, MAX_DOUBLE_64];
|
|
1114139
|
+
return num < min2 || num > max2 ? void 0 : num;
|
|
1114140
|
+
}
|
|
1114126
1114141
|
function buildReferenceTypeReference({ schema: schema2, fileContainingReference, context }) {
|
|
1114127
1114142
|
const resolvedSchema = context.getSchema(schema2.schema);
|
|
1114128
1114143
|
if (resolvedSchema == null) {
|
|
@@ -1127342,10 +1127357,10 @@ var CliContext = class {
|
|
|
1127342
1127357
|
return "fern-api";
|
|
1127343
1127358
|
}
|
|
1127344
1127359
|
getPackageVersion() {
|
|
1127345
|
-
if ("0.31.
|
|
1127360
|
+
if ("0.31.6" == null) {
|
|
1127346
1127361
|
this.logger.error("CLI_VERSION is not defined");
|
|
1127347
1127362
|
}
|
|
1127348
|
-
return "0.31.
|
|
1127363
|
+
return "0.31.6";
|
|
1127349
1127364
|
}
|
|
1127350
1127365
|
getCliName() {
|
|
1127351
1127366
|
if ("fern" == null) {
|