@fern-api/fern-api-dev 5.89.6 → 5.90.0
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 +81 -19
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -32839,19 +32839,57 @@ var init_mediaType = __esm({
|
|
|
32839
32839
|
|
|
32840
32840
|
// ../../commons/core-utils/lib/mergeWithOverrides.js
|
|
32841
32841
|
function mergeWithOverrides({ data: data2, overrides, allowNullKeys }) {
|
|
32842
|
-
const merged = mergeWith_default(data2, mergeWith_default, overrides,
|
|
32843
|
-
// nested arrays of objects are merged
|
|
32844
|
-
void 0
|
|
32845
|
-
) : (
|
|
32846
|
-
// nested arrays of primitives are replaced
|
|
32847
|
-
[...src]
|
|
32848
|
-
) : void 0);
|
|
32842
|
+
const merged = mergeWith_default(data2, mergeWith_default, overrides, overridesCustomizer);
|
|
32849
32843
|
const filtered = omitDeepBy(merged, isNull_default, {
|
|
32850
32844
|
ancestorKeys: allowNullKeys ?? [],
|
|
32851
32845
|
allowOmissionCursor: false
|
|
32852
32846
|
});
|
|
32853
32847
|
return filtered;
|
|
32854
32848
|
}
|
|
32849
|
+
function overridesCustomizer(obj, src) {
|
|
32850
|
+
if (!Array.isArray(obj) || !Array.isArray(src)) {
|
|
32851
|
+
return void 0;
|
|
32852
|
+
}
|
|
32853
|
+
if (!src.every((element4) => typeof element4 === "object") || !obj.every((element4) => typeof element4 === "object")) {
|
|
32854
|
+
return [...src];
|
|
32855
|
+
}
|
|
32856
|
+
return mergeParametersByIdentity(obj, src) ?? void 0;
|
|
32857
|
+
}
|
|
32858
|
+
function isParameterEntry(value2) {
|
|
32859
|
+
if (!isPlainObject_default(value2)) {
|
|
32860
|
+
return false;
|
|
32861
|
+
}
|
|
32862
|
+
const { name: name2, in: location2 } = value2;
|
|
32863
|
+
return typeof name2 === "string" && typeof location2 === "string";
|
|
32864
|
+
}
|
|
32865
|
+
function identityOf(entry) {
|
|
32866
|
+
return `${entry.in}:${entry.name}`;
|
|
32867
|
+
}
|
|
32868
|
+
function mergeParametersByIdentity(obj, src) {
|
|
32869
|
+
if (!obj.every(isParameterEntry) || !src.every(isParameterEntry)) {
|
|
32870
|
+
return void 0;
|
|
32871
|
+
}
|
|
32872
|
+
const unmatchedIndices = /* @__PURE__ */ new Map();
|
|
32873
|
+
obj.forEach((entry, index3) => {
|
|
32874
|
+
const indices = unmatchedIndices.get(identityOf(entry));
|
|
32875
|
+
if (indices != null) {
|
|
32876
|
+
indices.push(index3);
|
|
32877
|
+
} else {
|
|
32878
|
+
unmatchedIndices.set(identityOf(entry), [index3]);
|
|
32879
|
+
}
|
|
32880
|
+
});
|
|
32881
|
+
const merged = [...obj];
|
|
32882
|
+
for (const override of src) {
|
|
32883
|
+
const identity5 = identityOf(override);
|
|
32884
|
+
const matchIndex = unmatchedIndices.get(identity5)?.shift();
|
|
32885
|
+
if (matchIndex == null) {
|
|
32886
|
+
merged.push(override);
|
|
32887
|
+
continue;
|
|
32888
|
+
}
|
|
32889
|
+
merged[matchIndex] = mergeWith_default(obj[matchIndex], override, overridesCustomizer);
|
|
32890
|
+
}
|
|
32891
|
+
return merged;
|
|
32892
|
+
}
|
|
32855
32893
|
var omitDeepBy;
|
|
32856
32894
|
var init_mergeWithOverrides = __esm({
|
|
32857
32895
|
"../../commons/core-utils/lib/mergeWithOverrides.js"() {
|
|
@@ -118352,7 +118390,8 @@ var init_DocsYmlSchemas = __esm({
|
|
|
118352
118390
|
});
|
|
118353
118391
|
GitLibraryInputSchema = external_exports.object({
|
|
118354
118392
|
git: external_exports.string(),
|
|
118355
|
-
subpath: external_exports.string().optional()
|
|
118393
|
+
subpath: external_exports.string().optional(),
|
|
118394
|
+
ref: external_exports.string().optional()
|
|
118356
118395
|
});
|
|
118357
118396
|
PathLibraryInputSchema = external_exports.object({
|
|
118358
118397
|
path: external_exports.string()
|
|
@@ -123729,7 +123768,8 @@ var init_GitLibraryInputSchema2 = __esm({
|
|
|
123729
123768
|
init_core5();
|
|
123730
123769
|
GitLibraryInputSchema2 = schemas_exports6.object({
|
|
123731
123770
|
git: schemas_exports6.string(),
|
|
123732
|
-
subpath: schemas_exports6.string().optional()
|
|
123771
|
+
subpath: schemas_exports6.string().optional(),
|
|
123772
|
+
ref: schemas_exports6.string().optional()
|
|
123733
123773
|
});
|
|
123734
123774
|
}
|
|
123735
123775
|
});
|
|
@@ -165758,7 +165798,7 @@ function convertParameters({ path: path120, httpMethod, parameters: parameters2,
|
|
|
165758
165798
|
const convertedParameter = {
|
|
165759
165799
|
name: resolvedParameter.name,
|
|
165760
165800
|
schema,
|
|
165761
|
-
description: resolvedParameter
|
|
165801
|
+
description: getParameterDescription(resolvedParameter),
|
|
165762
165802
|
parameterNameOverride: getParameterName(resolvedParameter),
|
|
165763
165803
|
availability,
|
|
165764
165804
|
source: source2,
|
|
@@ -165787,6 +165827,15 @@ function convertParameters({ path: path120, httpMethod, parameters: parameters2,
|
|
|
165787
165827
|
}
|
|
165788
165828
|
return convertedParameters;
|
|
165789
165829
|
}
|
|
165830
|
+
function getParameterDescription(parameter6) {
|
|
165831
|
+
if (parameter6.description != null) {
|
|
165832
|
+
return parameter6.description;
|
|
165833
|
+
}
|
|
165834
|
+
if (parameter6.schema == null || isReferenceObject(parameter6.schema)) {
|
|
165835
|
+
return void 0;
|
|
165836
|
+
}
|
|
165837
|
+
return parameter6.schema.description;
|
|
165838
|
+
}
|
|
165790
165839
|
function getExplodeForQueryParameter(parameter6) {
|
|
165791
165840
|
const style2 = parameter6.style ?? "form";
|
|
165792
165841
|
const explode = parameter6.explode;
|
|
@@ -235585,7 +235634,7 @@ function parseLibrariesConfiguration(libraries) {
|
|
|
235585
235634
|
}
|
|
235586
235635
|
const result = {};
|
|
235587
235636
|
for (const [name2, config5] of Object.entries(libraries)) {
|
|
235588
|
-
const input3 = isGitLibraryInput(config5.input) ? { type: "git", git: config5.input.git, subpath: config5.input.subpath } : { type: "path", path: config5.input.path };
|
|
235637
|
+
const input3 = isGitLibraryInput(config5.input) ? { type: "git", git: config5.input.git, subpath: config5.input.subpath, ref: config5.input.ref } : { type: "path", path: config5.input.path };
|
|
235589
235638
|
result[name2] = {
|
|
235590
235639
|
input: input3,
|
|
235591
235640
|
output: {
|
|
@@ -694451,7 +694500,7 @@ var AccessTokenPosthogManager = class {
|
|
|
694451
694500
|
properties: {
|
|
694452
694501
|
...event,
|
|
694453
694502
|
...event.properties,
|
|
694454
|
-
version: "5.
|
|
694503
|
+
version: "5.90.0",
|
|
694455
694504
|
usingAccessToken: true,
|
|
694456
694505
|
...getRunIdProperties()
|
|
694457
694506
|
}
|
|
@@ -694517,7 +694566,7 @@ var UserPosthogManager = class {
|
|
|
694517
694566
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
694518
694567
|
event: "CLI",
|
|
694519
694568
|
properties: {
|
|
694520
|
-
version: "5.
|
|
694569
|
+
version: "5.90.0",
|
|
694521
694570
|
...event,
|
|
694522
694571
|
...event.properties,
|
|
694523
694572
|
usingAccessToken: false,
|
|
@@ -875647,7 +875696,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
875647
875696
|
var LOGS_FOLDER_NAME = "logs";
|
|
875648
875697
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
875649
875698
|
function getCliSource() {
|
|
875650
|
-
const version7 = "5.
|
|
875699
|
+
const version7 = "5.90.0";
|
|
875651
875700
|
return `cli@${version7}`;
|
|
875652
875701
|
}
|
|
875653
875702
|
var DebugLogger = class {
|
|
@@ -896164,13 +896213,14 @@ async function generateIrRemotely({ client: client3, name: name2, config: config
|
|
|
896164
896213
|
}
|
|
896165
896214
|
const gitInput = config5.input;
|
|
896166
896215
|
const jobId = await wrapStep({
|
|
896167
|
-
message: `Library '${name2}': starting generation from ${gitInput.git}`,
|
|
896216
|
+
message: `Library '${name2}': starting generation from ${gitInput.git}${gitInput.ref != null ? ` (ref: ${gitInput.ref})` : ""}`,
|
|
896168
896217
|
operation: () => startGeneration(client3, {
|
|
896169
896218
|
name: name2,
|
|
896170
896219
|
orgId,
|
|
896171
896220
|
githubUrl: gitInput.git,
|
|
896172
896221
|
language,
|
|
896173
896222
|
packagePath: gitInput.subpath,
|
|
896223
|
+
ref: gitInput.ref,
|
|
896174
896224
|
doxyfileContent
|
|
896175
896225
|
})
|
|
896176
896226
|
});
|
|
@@ -896205,7 +896255,8 @@ async function startGeneration(client3, opts) {
|
|
|
896205
896255
|
githubUrl: opts.githubUrl,
|
|
896206
896256
|
language: opts.language,
|
|
896207
896257
|
config: {
|
|
896208
|
-
branch
|
|
896258
|
+
// FDR's library-docs API accepts any git ref (branch, tag, or SHA) via `branch`.
|
|
896259
|
+
branch: opts.ref,
|
|
896209
896260
|
packagePath: opts.packagePath,
|
|
896210
896261
|
title: opts.name,
|
|
896211
896262
|
slug: opts.name,
|
|
@@ -898369,6 +898420,17 @@ var definitions6 = {
|
|
|
898369
898420
|
}
|
|
898370
898421
|
],
|
|
898371
898422
|
description: "Optional path within the repository to the library source.\nExample: django/core"
|
|
898423
|
+
},
|
|
898424
|
+
ref: {
|
|
898425
|
+
oneOf: [
|
|
898426
|
+
{
|
|
898427
|
+
type: "string"
|
|
898428
|
+
},
|
|
898429
|
+
{
|
|
898430
|
+
type: "null"
|
|
898431
|
+
}
|
|
898432
|
+
],
|
|
898433
|
+
description: "Git ref (branch, tag, or commit SHA) to check out.\nDefaults to the repository's default branch when omitted.\nExample: feature/my-fix"
|
|
898372
898434
|
}
|
|
898373
898435
|
},
|
|
898374
898436
|
required: [
|
|
@@ -908357,7 +908419,7 @@ var LegacyDocsPublisher = class {
|
|
|
908357
908419
|
previewId,
|
|
908358
908420
|
disableTemplates: void 0,
|
|
908359
908421
|
skipUpload,
|
|
908360
|
-
cliVersion: "5.
|
|
908422
|
+
cliVersion: "5.90.0",
|
|
908361
908423
|
loginCommand: "fern auth login"
|
|
908362
908424
|
});
|
|
908363
908425
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -975265,7 +975327,7 @@ function getAutomationContextFromEnv() {
|
|
|
975265
975327
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
975266
975328
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
975267
975329
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
975268
|
-
cli_version: "5.
|
|
975330
|
+
cli_version: "5.90.0"
|
|
975269
975331
|
};
|
|
975270
975332
|
}
|
|
975271
975333
|
function isAutomationMode() {
|
|
@@ -976097,7 +976159,7 @@ var CliContext = class _CliContext {
|
|
|
976097
976159
|
if (false) {
|
|
976098
976160
|
this.logger.error("CLI_VERSION is not defined");
|
|
976099
976161
|
}
|
|
976100
|
-
return "5.
|
|
976162
|
+
return "5.90.0";
|
|
976101
976163
|
}
|
|
976102
976164
|
getCliName() {
|
|
976103
976165
|
if (false) {
|
package/package.json
CHANGED