@fern-api/fern-api-dev 5.98.3 → 5.99.1
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 +80 -17
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -130922,7 +130922,8 @@ var init_OpenApiSettingsSchema2 = __esm({
|
|
|
130922
130922
|
"default-integer-format": DefaultIntegerFormat2.optional(),
|
|
130923
130923
|
"infer-discriminated-union-base-properties": schemas_exports8.boolean().optional(),
|
|
130924
130924
|
"disambiguate-request-names": schemas_exports8.boolean().optional(),
|
|
130925
|
-
"ignore-tags": schemas_exports8.boolean().optional()
|
|
130925
|
+
"ignore-tags": schemas_exports8.boolean().optional(),
|
|
130926
|
+
"respect-parameter-content": schemas_exports8.boolean().optional()
|
|
130926
130927
|
}).extend(BaseApiSettingsSchema);
|
|
130927
130928
|
}
|
|
130928
130929
|
});
|
|
@@ -142700,6 +142701,8 @@ function isSchemaEqual(a3, b5) {
|
|
|
142700
142701
|
return a3.schema === b5.schema;
|
|
142701
142702
|
} else if (a3.type === "optional" && b5.type === "optional") {
|
|
142702
142703
|
return isSchemaEqual(a3.value, b5.value);
|
|
142704
|
+
} else if (a3.type === "nullable" && b5.type === "nullable") {
|
|
142705
|
+
return isSchemaEqual(a3.value, b5.value);
|
|
142703
142706
|
} else if (a3.type === "oneOf" && b5.type === "oneOf") {
|
|
142704
142707
|
return isOneOfEqual(a3.value, b5.value);
|
|
142705
142708
|
} else if (a3.type === "object" && b5.type === "object") {
|
|
@@ -152785,7 +152788,8 @@ var init_options2 = __esm({
|
|
|
152785
152788
|
respectByteFormat: false,
|
|
152786
152789
|
shouldInferDiscriminatedUnionBaseProperties: false,
|
|
152787
152790
|
disambiguateRequestNames: true,
|
|
152788
|
-
ignoreTags: false
|
|
152791
|
+
ignoreTags: false,
|
|
152792
|
+
respectParameterContent: false
|
|
152789
152793
|
};
|
|
152790
152794
|
}
|
|
152791
152795
|
});
|
|
@@ -165877,7 +165881,8 @@ function convertParameters({ path: path121, httpMethod, parameters: parameters2,
|
|
|
165877
165881
|
const generatedName = getGeneratedTypeName(parameterBreadcrumbs, context3.options.preserveSchemaIds);
|
|
165878
165882
|
const isHeader = resolvedParameter.in === "header";
|
|
165879
165883
|
const [isOptional, isNullable] = context3.options.coerceOptionalSchemasToNullable && !isHeader ? [false, !isRequired] : [!isRequired, false];
|
|
165880
|
-
|
|
165884
|
+
const parameterSchema = getParameterSchema(resolvedParameter, context3);
|
|
165885
|
+
let schema = parameterSchema != null ? convertSchema2(parameterSchema, isOptional, isNullable, context3, parameterBreadcrumbs, source2, context3.namespace, false, /* @__PURE__ */ new Set(), getParameterExample(resolvedParameter, context3)) : isRequired ? SchemaWithExample.primitive({
|
|
165881
165886
|
nameOverride: void 0,
|
|
165882
165887
|
generatedName,
|
|
165883
165888
|
title: void 0,
|
|
@@ -165975,6 +165980,16 @@ function convertParameters({ path: path121, httpMethod, parameters: parameters2,
|
|
|
165975
165980
|
}
|
|
165976
165981
|
return convertedParameters;
|
|
165977
165982
|
}
|
|
165983
|
+
function getParameterSchema(parameter6, context3) {
|
|
165984
|
+
if (parameter6.schema != null) {
|
|
165985
|
+
return parameter6.schema;
|
|
165986
|
+
}
|
|
165987
|
+
if (!context3.options.respectParameterContent || parameter6.in !== "header" || parameter6.content == null) {
|
|
165988
|
+
return void 0;
|
|
165989
|
+
}
|
|
165990
|
+
const jsonMediaType = findApplicationJsonRequest({ content: parameter6.content, context: context3 });
|
|
165991
|
+
return jsonMediaType?.[1].schema;
|
|
165992
|
+
}
|
|
165978
165993
|
function getParameterDescription(parameter6) {
|
|
165979
165994
|
if (parameter6.description != null) {
|
|
165980
165995
|
return parameter6.description;
|
|
@@ -166023,6 +166038,7 @@ var init_convertParameters = __esm({
|
|
|
166023
166038
|
init_fernExtensions();
|
|
166024
166039
|
init_getParameterName();
|
|
166025
166040
|
init_getVariableReference();
|
|
166041
|
+
init_getApplicationJsonSchema();
|
|
166026
166042
|
HEADERS_TO_SKIP = /* @__PURE__ */ new Set([
|
|
166027
166043
|
"user-agent",
|
|
166028
166044
|
"content-length",
|
|
@@ -199970,7 +199986,8 @@ var init_getAPIDefinitionSettings = __esm({
|
|
|
199970
199986
|
coerceConstsTo: "coerceConstsTo",
|
|
199971
199987
|
shouldInferDiscriminatedUnionBaseProperties: "shouldInferDiscriminatedUnionBaseProperties",
|
|
199972
199988
|
disambiguateRequestNames: "disambiguateRequestNames",
|
|
199973
|
-
ignoreTags: "ignoreTags"
|
|
199989
|
+
ignoreTags: "ignoreTags",
|
|
199990
|
+
respectParameterContent: "respectParameterContent"
|
|
199974
199991
|
};
|
|
199975
199992
|
}
|
|
199976
199993
|
});
|
|
@@ -264043,7 +264060,8 @@ function parseOpenApiDefinitionSettingsSchema(settings) {
|
|
|
264043
264060
|
pathParameterOrder: settings?.["path-parameter-order"],
|
|
264044
264061
|
shouldInferDiscriminatedUnionBaseProperties: settings?.["infer-discriminated-union-base-properties"],
|
|
264045
264062
|
disambiguateRequestNames: settings?.["disambiguate-request-names"],
|
|
264046
|
-
ignoreTags: settings?.["ignore-tags"]
|
|
264063
|
+
ignoreTags: settings?.["ignore-tags"],
|
|
264064
|
+
respectParameterContent: settings?.["respect-parameter-content"]
|
|
264047
264065
|
};
|
|
264048
264066
|
}
|
|
264049
264067
|
function parseAsyncApiDefinitionSettingsSchema(settings) {
|
|
@@ -264910,7 +264928,8 @@ var init_convertGeneratorsConfiguration = __esm({
|
|
|
264910
264928
|
coerceConstsTo: void 0,
|
|
264911
264929
|
shouldInferDiscriminatedUnionBaseProperties: void 0,
|
|
264912
264930
|
disambiguateRequestNames: void 0,
|
|
264913
|
-
ignoreTags: void 0
|
|
264931
|
+
ignoreTags: void 0,
|
|
264932
|
+
respectParameterContent: void 0
|
|
264914
264933
|
};
|
|
264915
264934
|
}
|
|
264916
264935
|
});
|
|
@@ -355209,6 +355228,7 @@ var ParameterConverter2;
|
|
|
355209
355228
|
var init_ParameterConverter2 = __esm({
|
|
355210
355229
|
"../api-importers/openapi-to-ir/lib/3.1/paths/ParameterConverter.js"() {
|
|
355211
355230
|
"use strict";
|
|
355231
|
+
init_lib4();
|
|
355212
355232
|
init_lib30();
|
|
355213
355233
|
ParameterConverter2 = class extends converters_exports.AbstractConverters.AbstractParameterConverter {
|
|
355214
355234
|
constructor({ context: context3, breadcrumbs, parameter: parameter6 }) {
|
|
@@ -355217,12 +355237,13 @@ var init_ParameterConverter2 = __esm({
|
|
|
355217
355237
|
convert() {
|
|
355218
355238
|
let typeReference2;
|
|
355219
355239
|
let inlinedTypes = {};
|
|
355220
|
-
|
|
355240
|
+
const schema = this.getSchema();
|
|
355241
|
+
if (schema != null) {
|
|
355221
355242
|
const schemaIdOverride = this.context.convertBreadcrumbsToName([...this.breadcrumbs, this.parameter.name]);
|
|
355222
355243
|
const schemaOrReferenceConverter = new converters_exports.SchemaConverters.SchemaOrReferenceConverter({
|
|
355223
355244
|
context: this.context,
|
|
355224
355245
|
breadcrumbs: [...this.breadcrumbs, this.parameter.name, "schema"],
|
|
355225
|
-
schemaOrReference:
|
|
355246
|
+
schemaOrReference: schema,
|
|
355226
355247
|
wrapAsOptional: this.parameter.required == null || !this.parameter.required,
|
|
355227
355248
|
schemaIdOverride
|
|
355228
355249
|
});
|
|
@@ -355233,11 +355254,34 @@ var init_ParameterConverter2 = __esm({
|
|
|
355233
355254
|
}
|
|
355234
355255
|
}
|
|
355235
355256
|
return this.convertToOutput({
|
|
355236
|
-
schema:
|
|
355257
|
+
schema: schema ?? { type: "string" },
|
|
355237
355258
|
typeReference: typeReference2,
|
|
355238
355259
|
inlinedTypes
|
|
355239
355260
|
});
|
|
355240
355261
|
}
|
|
355262
|
+
/**
|
|
355263
|
+
* Resolves the schema describing the parameter's value. Parameters normally declare `schema`
|
|
355264
|
+
* directly, but the OpenAPI spec also allows a `content` map for values serialized in a media
|
|
355265
|
+
* type — most commonly a header holding a JSON-encoded object.
|
|
355266
|
+
*
|
|
355267
|
+
* Only headers are resolved from `content`: header values are JSON-encoded when sent, whereas
|
|
355268
|
+
* an object query parameter is serialized as separate key/value pairs rather than as a single
|
|
355269
|
+
* JSON-encoded value, which is not what `content: application/json` describes.
|
|
355270
|
+
*/
|
|
355271
|
+
getSchema() {
|
|
355272
|
+
if (this.parameter.schema != null) {
|
|
355273
|
+
return this.parameter.schema;
|
|
355274
|
+
}
|
|
355275
|
+
if (!this.context.settings.respectParameterContent || this.parameter.in !== "header" || this.parameter.content == null) {
|
|
355276
|
+
return void 0;
|
|
355277
|
+
}
|
|
355278
|
+
for (const [contentType, mediaTypeObject] of Object.entries(this.parameter.content)) {
|
|
355279
|
+
if (mediaTypeObject.schema != null && MediaType.parse(contentType)?.isJSON()) {
|
|
355280
|
+
return mediaTypeObject.schema;
|
|
355281
|
+
}
|
|
355282
|
+
}
|
|
355283
|
+
return void 0;
|
|
355284
|
+
}
|
|
355241
355285
|
};
|
|
355242
355286
|
}
|
|
355243
355287
|
});
|
|
@@ -694295,7 +694339,14 @@ var OpenApiSettingsSchema2 = BaseApiSettingsSchema2.extend({
|
|
|
694295
694339
|
* names are derived from each operation's operationId.
|
|
694296
694340
|
* Defaults to false.
|
|
694297
694341
|
*/
|
|
694298
|
-
"ignore-tags": external_exports.boolean().optional()
|
|
694342
|
+
"ignore-tags": external_exports.boolean().optional(),
|
|
694343
|
+
/**
|
|
694344
|
+
* If true, header parameters that declare their schema under `content` (e.g. a header
|
|
694345
|
+
* whose value is a JSON-encoded object) are typed from that schema instead of falling
|
|
694346
|
+
* back to a string.
|
|
694347
|
+
* Defaults to false.
|
|
694348
|
+
*/
|
|
694349
|
+
"respect-parameter-content": external_exports.boolean().optional()
|
|
694299
694350
|
});
|
|
694300
694351
|
|
|
694301
694352
|
// ../config/lib/schemas/specs/OpenApiSpecSchema.js
|
|
@@ -702884,7 +702935,7 @@ var AccessTokenPosthogManager = class {
|
|
|
702884
702935
|
properties: {
|
|
702885
702936
|
...event,
|
|
702886
702937
|
...event.properties,
|
|
702887
|
-
version: "5.
|
|
702938
|
+
version: "5.99.1",
|
|
702888
702939
|
usingAccessToken: true,
|
|
702889
702940
|
...getRunIdProperties()
|
|
702890
702941
|
}
|
|
@@ -702950,7 +703001,7 @@ var UserPosthogManager = class {
|
|
|
702950
703001
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
702951
703002
|
event: "CLI",
|
|
702952
703003
|
properties: {
|
|
702953
|
-
version: "5.
|
|
703004
|
+
version: "5.99.1",
|
|
702954
703005
|
...event,
|
|
702955
703006
|
...event.properties,
|
|
702956
703007
|
usingAccessToken: false,
|
|
@@ -709766,7 +709817,8 @@ var LegacyApiSpecAdapter = class {
|
|
|
709766
709817
|
coerceConstsTo: settings.coerceConstsTo,
|
|
709767
709818
|
shouldInferDiscriminatedUnionBaseProperties: settings.inferDiscriminatedUnionBaseProperties,
|
|
709768
709819
|
disambiguateRequestNames: settings["disambiguate-request-names"],
|
|
709769
|
-
ignoreTags: settings["ignore-tags"]
|
|
709820
|
+
ignoreTags: settings["ignore-tags"],
|
|
709821
|
+
respectParameterContent: settings["respect-parameter-content"]
|
|
709770
709822
|
};
|
|
709771
709823
|
const hasSettings = Object.values(result).some((v3) => v3 != null);
|
|
709772
709824
|
return hasSettings ? result : void 0;
|
|
@@ -884331,7 +884383,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
884331
884383
|
var LOGS_FOLDER_NAME = "logs";
|
|
884332
884384
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
884333
884385
|
function getCliSource() {
|
|
884334
|
-
const version7 = "5.
|
|
884386
|
+
const version7 = "5.99.1";
|
|
884335
884387
|
return `cli@${version7}`;
|
|
884336
884388
|
}
|
|
884337
884389
|
var DebugLogger = class {
|
|
@@ -909651,7 +909703,7 @@ var LegacyDocsPublisher = class {
|
|
|
909651
909703
|
previewId,
|
|
909652
909704
|
disableTemplates: void 0,
|
|
909653
909705
|
skipUpload,
|
|
909654
|
-
cliVersion: "5.
|
|
909706
|
+
cliVersion: "5.99.1",
|
|
909655
909707
|
loginCommand: "fern auth login"
|
|
909656
909708
|
});
|
|
909657
909709
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -920729,6 +920781,17 @@ var ClassReference = class extends Node5 {
|
|
|
920729
920781
|
fullyQualified: true
|
|
920730
920782
|
});
|
|
920731
920783
|
}
|
|
920784
|
+
/**
|
|
920785
|
+
* returns this class reference as a fully qualified class reference with the `global::`
|
|
920786
|
+
* alias, making it immune to shadowing by locals, parameters or members in scope
|
|
920787
|
+
*/
|
|
920788
|
+
asGloballyQualified() {
|
|
920789
|
+
return this.csharp.classReferenceInternal({
|
|
920790
|
+
...this,
|
|
920791
|
+
fullyQualified: true,
|
|
920792
|
+
global: true
|
|
920793
|
+
});
|
|
920794
|
+
}
|
|
920732
920795
|
/** returns a class instantiation node for this class reference */
|
|
920733
920796
|
new(args) {
|
|
920734
920797
|
args = args ?? { arguments_: [] };
|
|
@@ -976884,7 +976947,7 @@ function getAutomationContextFromEnv() {
|
|
|
976884
976947
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
976885
976948
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
976886
976949
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
976887
|
-
cli_version: "5.
|
|
976950
|
+
cli_version: "5.99.1"
|
|
976888
976951
|
};
|
|
976889
976952
|
}
|
|
976890
976953
|
function isAutomationMode() {
|
|
@@ -977716,7 +977779,7 @@ var CliContext = class _CliContext {
|
|
|
977716
977779
|
if (false) {
|
|
977717
977780
|
this.logger.error("CLI_VERSION is not defined");
|
|
977718
977781
|
}
|
|
977719
|
-
return "5.
|
|
977782
|
+
return "5.99.1";
|
|
977720
977783
|
}
|
|
977721
977784
|
getCliName() {
|
|
977722
977785
|
if (false) {
|
package/package.json
CHANGED