@fern-api/fern-api-dev 4.68.2-1-ge641e90bb18 → 4.68.2-3-ge30ff58476d
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 +68 -7
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -612978,7 +612978,7 @@ var FernGlobalHeadersExtension = class extends AbstractExtension {
|
|
|
612978
612978
|
}
|
|
612979
612979
|
};
|
|
612980
612980
|
|
|
612981
|
-
// ../api-importers/openapi-to-ir/lib/utils/
|
|
612981
|
+
// ../api-importers/openapi-to-ir/lib/utils/convertGlobalHeaderOverrides.js
|
|
612982
612982
|
function convertDefaultToLiteral2(defaultValue) {
|
|
612983
612983
|
if (defaultValue == null) {
|
|
612984
612984
|
return void 0;
|
|
@@ -612991,6 +612991,60 @@ function convertDefaultToLiteral2(defaultValue) {
|
|
|
612991
612991
|
}
|
|
612992
612992
|
return void 0;
|
|
612993
612993
|
}
|
|
612994
|
+
function convertGlobalHeaderOverrides({ globalHeaderOverrides, context: context3 }) {
|
|
612995
|
+
const headers2 = [];
|
|
612996
|
+
for (const [headerKey, headerSchema] of Object.entries(globalHeaderOverrides.headers ?? {})) {
|
|
612997
|
+
if (typeof headerSchema === "string") {
|
|
612998
|
+
headers2.push({
|
|
612999
|
+
name: context3.casingsGenerator.generateNameAndWireValue({
|
|
613000
|
+
name: headerKey,
|
|
613001
|
+
wireValue: headerKey
|
|
613002
|
+
}),
|
|
613003
|
+
valueType: AbstractConverter.STRING,
|
|
613004
|
+
env: void 0,
|
|
613005
|
+
v2Examples: {
|
|
613006
|
+
userSpecifiedExamples: {},
|
|
613007
|
+
autogeneratedExamples: {}
|
|
613008
|
+
},
|
|
613009
|
+
availability: void 0,
|
|
613010
|
+
docs: void 0,
|
|
613011
|
+
clientDefault: void 0
|
|
613012
|
+
});
|
|
613013
|
+
} else {
|
|
613014
|
+
const name2 = headerSchema.name ?? headerKey;
|
|
613015
|
+
headers2.push({
|
|
613016
|
+
name: context3.casingsGenerator.generateNameAndWireValue({
|
|
613017
|
+
name: name2,
|
|
613018
|
+
wireValue: headerKey
|
|
613019
|
+
}),
|
|
613020
|
+
valueType: AbstractConverter.STRING,
|
|
613021
|
+
env: headerSchema.env,
|
|
613022
|
+
v2Examples: {
|
|
613023
|
+
userSpecifiedExamples: {},
|
|
613024
|
+
autogeneratedExamples: {}
|
|
613025
|
+
},
|
|
613026
|
+
availability: void 0,
|
|
613027
|
+
docs: headerSchema.docs,
|
|
613028
|
+
clientDefault: convertDefaultToLiteral2(headerSchema.default)
|
|
613029
|
+
});
|
|
613030
|
+
}
|
|
613031
|
+
}
|
|
613032
|
+
return headers2;
|
|
613033
|
+
}
|
|
613034
|
+
|
|
613035
|
+
// ../api-importers/openapi-to-ir/lib/utils/convertGlobalHeadersExtension.js
|
|
613036
|
+
function convertDefaultToLiteral3(defaultValue) {
|
|
613037
|
+
if (defaultValue == null) {
|
|
613038
|
+
return void 0;
|
|
613039
|
+
}
|
|
613040
|
+
if (typeof defaultValue === "string") {
|
|
613041
|
+
return api_exports.Literal.string(defaultValue);
|
|
613042
|
+
}
|
|
613043
|
+
if (typeof defaultValue === "boolean") {
|
|
613044
|
+
return api_exports.Literal.boolean(defaultValue);
|
|
613045
|
+
}
|
|
613046
|
+
return void 0;
|
|
613047
|
+
}
|
|
612994
613048
|
function convertGlobalHeadersExtension({ globalHeaders, context: context3 }) {
|
|
612995
613049
|
return globalHeaders.map((header) => ({
|
|
612996
613050
|
name: context3.casingsGenerator.generateNameAndWireValue({
|
|
@@ -613002,7 +613056,7 @@ function convertGlobalHeadersExtension({ globalHeaders, context: context3 }) {
|
|
|
613002
613056
|
v2Examples: header.optional ? void 0 : constructGlobalHeaderExample({ header, context: context3 }),
|
|
613003
613057
|
availability: void 0,
|
|
613004
613058
|
docs: void 0,
|
|
613005
|
-
clientDefault:
|
|
613059
|
+
clientDefault: convertDefaultToLiteral3(header["x-fern-default"])
|
|
613006
613060
|
}));
|
|
613007
613061
|
}
|
|
613008
613062
|
function constructGlobalHeaderExample({ header, context: context3 }) {
|
|
@@ -616023,6 +616077,13 @@ var OpenAPIConverter = class extends AbstractSpecConverter {
|
|
|
616023
616077
|
}
|
|
616024
616078
|
convertGlobalHeaders() {
|
|
616025
616079
|
if (this.context.globalHeaderOverrides) {
|
|
616080
|
+
const globalHeaders = convertGlobalHeaderOverrides({
|
|
616081
|
+
globalHeaderOverrides: this.context.globalHeaderOverrides,
|
|
616082
|
+
context: this.context
|
|
616083
|
+
});
|
|
616084
|
+
this.addGlobalHeadersToIr(globalHeaders);
|
|
616085
|
+
this.context.setGlobalHeaders(globalHeaders);
|
|
616086
|
+
return;
|
|
616026
616087
|
}
|
|
616027
616088
|
const globalHeadersExtension = new FernGlobalHeadersExtension({
|
|
616028
616089
|
breadcrumbs: ["x-fern-global-headers"],
|
|
@@ -627639,7 +627700,7 @@ var AccessTokenPosthogManager = class {
|
|
|
627639
627700
|
properties: {
|
|
627640
627701
|
...event,
|
|
627641
627702
|
...event.properties,
|
|
627642
|
-
version: "4.68.2-
|
|
627703
|
+
version: "4.68.2-3-ge30ff58476d",
|
|
627643
627704
|
usingAccessToken: true
|
|
627644
627705
|
}
|
|
627645
627706
|
});
|
|
@@ -627693,7 +627754,7 @@ var UserPosthogManager = class {
|
|
|
627693
627754
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
627694
627755
|
event: "CLI",
|
|
627695
627756
|
properties: {
|
|
627696
|
-
version: "4.68.2-
|
|
627757
|
+
version: "4.68.2-3-ge30ff58476d",
|
|
627697
627758
|
...event,
|
|
627698
627759
|
...event.properties,
|
|
627699
627760
|
usingAccessToken: false,
|
|
@@ -843968,7 +844029,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
843968
844029
|
var LOGS_FOLDER_NAME = "logs";
|
|
843969
844030
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
843970
844031
|
function getCliSource() {
|
|
843971
|
-
const version7 = "4.68.2-
|
|
844032
|
+
const version7 = "4.68.2-3-ge30ff58476d";
|
|
843972
844033
|
return `cli@${version7}`;
|
|
843973
844034
|
}
|
|
843974
844035
|
var DebugLogger = class {
|
|
@@ -855217,7 +855278,7 @@ var LegacyDocsPublisher = class {
|
|
|
855217
855278
|
previewId,
|
|
855218
855279
|
disableTemplates: void 0,
|
|
855219
855280
|
skipUpload,
|
|
855220
|
-
cliVersion: "4.68.2-
|
|
855281
|
+
cliVersion: "4.68.2-3-ge30ff58476d"
|
|
855221
855282
|
});
|
|
855222
855283
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
855223
855284
|
return { success: false };
|
|
@@ -928957,7 +929018,7 @@ var CliContext = class _CliContext {
|
|
|
928957
929018
|
if (false) {
|
|
928958
929019
|
this.logger.error("CLI_VERSION is not defined");
|
|
928959
929020
|
}
|
|
928960
|
-
return "4.68.2-
|
|
929021
|
+
return "4.68.2-3-ge30ff58476d";
|
|
928961
929022
|
}
|
|
928962
929023
|
getCliName() {
|
|
928963
929024
|
if (false) {
|
package/package.json
CHANGED