@fern-api/fern-api-dev 5.120.2 → 5.120.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/cli.cjs +105 -80
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -354166,7 +354166,9 @@ function convertResponseHeaders({ context: context3, breadcrumbs, headers: respo
|
|
|
354166
354166
|
continue;
|
|
354167
354167
|
}
|
|
354168
354168
|
const headerSchema2 = getHeaderSchema({ context: context3, header: resolvedHeader });
|
|
354169
|
-
|
|
354169
|
+
const isHeaderRequired = resolvedHeader.required === true;
|
|
354170
|
+
const maybeWrapOptional = (typeReference2) => isHeaderRequired ? typeReference2 : TypeReference2.container(ContainerType.optional(typeReference2));
|
|
354171
|
+
let valueType = maybeWrapOptional(AbstractConverter.STRING);
|
|
354170
354172
|
let resolvedSchema;
|
|
354171
354173
|
const availability = context3.getAvailability({
|
|
354172
354174
|
node: resolvedHeader,
|
|
@@ -354178,21 +354180,21 @@ function convertResponseHeaders({ context: context3, breadcrumbs, headers: respo
|
|
|
354178
354180
|
breadcrumbs: [...headerBreadcrumbs, "headers", headerName, "schema"]
|
|
354179
354181
|
});
|
|
354180
354182
|
if (resolvedSchema?.type === "number" || resolvedSchema?.type === "integer") {
|
|
354181
|
-
valueType = TypeReference2.primitive({
|
|
354183
|
+
valueType = maybeWrapOptional(TypeReference2.primitive({
|
|
354182
354184
|
v1: resolvedSchema.type === "integer" ? "INTEGER" : "DOUBLE",
|
|
354183
354185
|
v2: resolvedSchema.type === "integer" ? PrimitiveTypeV2.integer({ default: void 0, validation: void 0 }) : PrimitiveTypeV2.double({ default: void 0, validation: void 0 })
|
|
354184
|
-
});
|
|
354186
|
+
}));
|
|
354185
354187
|
} else if (resolvedSchema?.type === "boolean") {
|
|
354186
|
-
valueType = TypeReference2.primitive({
|
|
354188
|
+
valueType = maybeWrapOptional(TypeReference2.primitive({
|
|
354187
354189
|
v1: "BOOLEAN",
|
|
354188
354190
|
v2: PrimitiveTypeV2.boolean({ default: void 0 })
|
|
354189
|
-
});
|
|
354191
|
+
}));
|
|
354190
354192
|
} else {
|
|
354191
354193
|
const convertedHeaderSchema = new SchemaOrReferenceConverter({
|
|
354192
354194
|
context: context3,
|
|
354193
354195
|
breadcrumbs: [...headerBreadcrumbs, "headers", headerName, "schema"],
|
|
354194
354196
|
schemaOrReference: headerSchema2,
|
|
354195
|
-
wrapAsOptional:
|
|
354197
|
+
wrapAsOptional: !isHeaderRequired,
|
|
354196
354198
|
schemaIdOverride: context3.convertBreadcrumbsToName([...headerBreadcrumbs, "headers", headerName])
|
|
354197
354199
|
}).convert();
|
|
354198
354200
|
if (convertedHeaderSchema != null) {
|
|
@@ -706738,7 +706740,7 @@ var AccessTokenPosthogManager = class {
|
|
|
706738
706740
|
properties: {
|
|
706739
706741
|
...event,
|
|
706740
706742
|
...event.properties,
|
|
706741
|
-
version: "5.120.
|
|
706743
|
+
version: "5.120.4",
|
|
706742
706744
|
usingAccessToken: true,
|
|
706743
706745
|
...getRunIdProperties()
|
|
706744
706746
|
}
|
|
@@ -706804,7 +706806,7 @@ var UserPosthogManager = class {
|
|
|
706804
706806
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
706805
706807
|
event: "CLI",
|
|
706806
706808
|
properties: {
|
|
706807
|
-
version: "5.120.
|
|
706809
|
+
version: "5.120.4",
|
|
706808
706810
|
...event,
|
|
706809
706811
|
...event.properties,
|
|
706810
706812
|
usingAccessToken: false,
|
|
@@ -859817,6 +859819,43 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
|
|
|
859817
859819
|
await visitor.file?.({
|
|
859818
859820
|
config: contents
|
|
859819
859821
|
}, []);
|
|
859822
|
+
const visitVersion = async ({ version: version7, product, nodePath }) => {
|
|
859823
|
+
await visitor.version?.({ version: version7 }, nodePath);
|
|
859824
|
+
if (version7.path == null) {
|
|
859825
|
+
return;
|
|
859826
|
+
}
|
|
859827
|
+
const versionPath = version7.path;
|
|
859828
|
+
await visitFilepath({
|
|
859829
|
+
absoluteFilepathToConfiguration,
|
|
859830
|
+
rawUnresolvedFilepath: versionPath,
|
|
859831
|
+
visitor,
|
|
859832
|
+
nodePath,
|
|
859833
|
+
willBeUploaded: false
|
|
859834
|
+
});
|
|
859835
|
+
const absoluteFilepath = resolve6(dirname6(absoluteFilepathToConfiguration), versionPath);
|
|
859836
|
+
if (!await doesPathExist(absoluteFilepath)) {
|
|
859837
|
+
return;
|
|
859838
|
+
}
|
|
859839
|
+
const content5 = index_vite_proxy_tmp_default.load((await (0, import_promises84.readFile)(absoluteFilepath)).toString());
|
|
859840
|
+
await visitor.versionFile?.({
|
|
859841
|
+
path: versionPath,
|
|
859842
|
+
content: content5,
|
|
859843
|
+
version: version7,
|
|
859844
|
+
product
|
|
859845
|
+
}, [versionPath]);
|
|
859846
|
+
const parsedVersionFile = await validateVersionConfigFileSchema({ value: content5 });
|
|
859847
|
+
if (parsedVersionFile.type === "success") {
|
|
859848
|
+
await visitNavigationAst2({
|
|
859849
|
+
absolutePathToFernFolder,
|
|
859850
|
+
navigation: parsedVersionFile.contents.navigation,
|
|
859851
|
+
visitor,
|
|
859852
|
+
nodePath: ["navigation"],
|
|
859853
|
+
absoluteFilepathToConfiguration: absoluteFilepath,
|
|
859854
|
+
apiWorkspaces,
|
|
859855
|
+
context: context3
|
|
859856
|
+
});
|
|
859857
|
+
}
|
|
859858
|
+
};
|
|
859820
859859
|
await visitObjectAsync(contents, {
|
|
859821
859860
|
instances: noop2,
|
|
859822
859861
|
analytics: noop2,
|
|
@@ -860045,6 +860084,14 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
|
|
|
860045
860084
|
product
|
|
860046
860085
|
}, [product.path]);
|
|
860047
860086
|
}
|
|
860087
|
+
if (product.versions != null && product.versions.length > 0) {
|
|
860088
|
+
await Promise.all(product.versions.map((version7, versionIdx) => visitVersion({
|
|
860089
|
+
version: version7,
|
|
860090
|
+
product,
|
|
860091
|
+
nodePath: ["products", `${idx}`, "versions", `${versionIdx}`]
|
|
860092
|
+
})));
|
|
860093
|
+
return;
|
|
860094
|
+
}
|
|
860048
860095
|
const parsedProductFile = await validateProductConfigFileSchema({ value: content5 });
|
|
860049
860096
|
if (parsedProductFile.type === "success") {
|
|
860050
860097
|
await visitNavigationAst2({
|
|
@@ -860113,41 +860160,7 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
|
|
|
860113
860160
|
}
|
|
860114
860161
|
const versionsStart = performance.now();
|
|
860115
860162
|
context3.logger.debug(`[docs-ast] Processing ${versions.length} versions...`);
|
|
860116
|
-
await Promise.all(versions.map(
|
|
860117
|
-
await visitor.version?.({ version: version7 }, ["versions", `${idx}`]);
|
|
860118
|
-
if (version7.path == null) {
|
|
860119
|
-
return;
|
|
860120
|
-
}
|
|
860121
|
-
const versionPath = version7.path;
|
|
860122
|
-
await visitFilepath({
|
|
860123
|
-
absoluteFilepathToConfiguration,
|
|
860124
|
-
rawUnresolvedFilepath: versionPath,
|
|
860125
|
-
visitor,
|
|
860126
|
-
nodePath: ["versions", `${idx}`],
|
|
860127
|
-
willBeUploaded: false
|
|
860128
|
-
});
|
|
860129
|
-
const absoluteFilepath = resolve6(dirname6(absoluteFilepathToConfiguration), versionPath);
|
|
860130
|
-
const content5 = index_vite_proxy_tmp_default.load((await (0, import_promises84.readFile)(absoluteFilepath)).toString());
|
|
860131
|
-
if (await doesPathExist(absoluteFilepath)) {
|
|
860132
|
-
await visitor.versionFile?.({
|
|
860133
|
-
path: version7.path,
|
|
860134
|
-
content: content5,
|
|
860135
|
-
version: version7
|
|
860136
|
-
}, [version7.path]);
|
|
860137
|
-
}
|
|
860138
|
-
const parsedVersionFile = await validateVersionConfigFileSchema({ value: content5 });
|
|
860139
|
-
if (parsedVersionFile.type === "success") {
|
|
860140
|
-
await visitNavigationAst2({
|
|
860141
|
-
absolutePathToFernFolder,
|
|
860142
|
-
navigation: parsedVersionFile.contents.navigation,
|
|
860143
|
-
visitor,
|
|
860144
|
-
nodePath: ["navigation"],
|
|
860145
|
-
absoluteFilepathToConfiguration: absoluteFilepath,
|
|
860146
|
-
apiWorkspaces,
|
|
860147
|
-
context: context3
|
|
860148
|
-
});
|
|
860149
|
-
}
|
|
860150
|
-
}));
|
|
860163
|
+
await Promise.all(versions.map((version7, idx) => visitVersion({ version: version7, nodePath: ["versions", `${idx}`] })));
|
|
860151
860164
|
context3.logger.debug(`[docs-ast] Versions processing complete in ${(performance.now() - versionsStart).toFixed(0)}ms`);
|
|
860152
860165
|
},
|
|
860153
860166
|
roles: noop2,
|
|
@@ -861484,13 +861497,16 @@ var ValidChangelogSlugRule = {
|
|
|
861484
861497
|
];
|
|
861485
861498
|
return violationsForLocations(locations);
|
|
861486
861499
|
},
|
|
861487
|
-
versionFile: async ({ path: path124, content: content5, version: version7 }) => {
|
|
861500
|
+
versionFile: async ({ path: path124, content: content5, version: version7, product }) => {
|
|
861488
861501
|
const parseResult = await validateVersionConfigFileSchema({ value: content5 });
|
|
861489
861502
|
if (parseResult.type !== "success") {
|
|
861490
861503
|
return [];
|
|
861491
861504
|
}
|
|
861492
861505
|
const versionConfig = parseResult.contents;
|
|
861493
|
-
const versionSegments =
|
|
861506
|
+
const versionSegments = [
|
|
861507
|
+
...product != null ? ancestorSlugSegments({ slug: product.slug, displayName: product.displayName }) : [],
|
|
861508
|
+
...ancestorSlugSegments({ slug: version7.slug, displayName: version7.displayName })
|
|
861509
|
+
];
|
|
861494
861510
|
const locations = [
|
|
861495
861511
|
...collectFromNavigation(versionConfig.navigation, versionConfig.tabs, `version "${path124}" navigation`, versionSegments),
|
|
861496
861512
|
...collectFromTabs(versionConfig.tabs, `version "${path124}" tabs`, versionSegments)
|
|
@@ -861498,6 +861514,9 @@ var ValidChangelogSlugRule = {
|
|
|
861498
861514
|
return violationsForLocations(locations);
|
|
861499
861515
|
},
|
|
861500
861516
|
productFile: async ({ path: path124, content: content5, product }) => {
|
|
861517
|
+
if (product.versions != null && product.versions.length > 0) {
|
|
861518
|
+
return [];
|
|
861519
|
+
}
|
|
861501
861520
|
const parseResult = await validateProductConfigFileSchema({ value: content5 });
|
|
861502
861521
|
if (parseResult.type !== "success") {
|
|
861503
861522
|
return [];
|
|
@@ -888490,7 +888509,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
888490
888509
|
var LOGS_FOLDER_NAME = "logs";
|
|
888491
888510
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
888492
888511
|
function getCliSource() {
|
|
888493
|
-
const version7 = "5.120.
|
|
888512
|
+
const version7 = "5.120.4";
|
|
888494
888513
|
return `cli@${version7}`;
|
|
888495
888514
|
}
|
|
888496
888515
|
var DebugLogger = class {
|
|
@@ -915838,7 +915857,7 @@ var LegacyDocsPublisher = class {
|
|
|
915838
915857
|
previewId,
|
|
915839
915858
|
disableTemplates: void 0,
|
|
915840
915859
|
skipUpload,
|
|
915841
|
-
cliVersion: "5.120.
|
|
915860
|
+
cliVersion: "5.120.4",
|
|
915842
915861
|
loginCommand: "fern auth login"
|
|
915843
915862
|
});
|
|
915844
915863
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -954545,11 +954564,16 @@ var IfElse = class extends AstNode6 {
|
|
|
954545
954564
|
ifBranch;
|
|
954546
954565
|
elseIfs;
|
|
954547
954566
|
elseBody;
|
|
954548
|
-
|
|
954567
|
+
negated;
|
|
954568
|
+
constructor({ if: ifBranch, elseIf, elseBody, negated }) {
|
|
954549
954569
|
super();
|
|
954550
954570
|
this.ifBranch = ifBranch;
|
|
954551
954571
|
this.elseIfs = elseIf ?? [];
|
|
954552
954572
|
this.elseBody = elseBody ? Array.isArray(elseBody) ? elseBody : [elseBody] : void 0;
|
|
954573
|
+
this.negated = negated ?? false;
|
|
954574
|
+
if (this.negated && this.elseIfs.length > 0) {
|
|
954575
|
+
throw new Error("Ruby has no `elsunless`; a negated IfElse cannot have elseIf branches");
|
|
954576
|
+
}
|
|
954553
954577
|
}
|
|
954554
954578
|
write(writer2) {
|
|
954555
954579
|
const modifier = this.renderAsModifier(writer2);
|
|
@@ -954558,7 +954582,7 @@ var IfElse = class extends AstNode6 {
|
|
|
954558
954582
|
writer2.writeNewLineIfLastLineNot();
|
|
954559
954583
|
return;
|
|
954560
954584
|
}
|
|
954561
|
-
writer2.write("if ");
|
|
954585
|
+
writer2.write(this.negated ? "unless " : "if ");
|
|
954562
954586
|
this.ifBranch.condition.write(writer2);
|
|
954563
954587
|
writer2.writeLine();
|
|
954564
954588
|
writer2.indent();
|
|
@@ -954591,8 +954615,8 @@ var IfElse = class extends AstNode6 {
|
|
|
954591
954615
|
writer2.writeNewLineIfLastLineNot();
|
|
954592
954616
|
}
|
|
954593
954617
|
/**
|
|
954594
|
-
* Returns the modifier-form rendering (`stmt if cond
|
|
954595
|
-
* eligible:
|
|
954618
|
+
* Returns the modifier-form rendering (`stmt if cond`, or `stmt unless cond`
|
|
954619
|
+
* when negated) when this if is eligible:
|
|
954596
954620
|
* - exactly one statement in the then-body
|
|
954597
954621
|
* - no elsif and no else
|
|
954598
954622
|
* - the single statement is not an intrinsically multi-line AST node
|
|
@@ -954632,7 +954656,7 @@ var IfElse = class extends AstNode6 {
|
|
|
954632
954656
|
if (stmtRendered.includes("\n") || conditionRendered.includes("\n")) {
|
|
954633
954657
|
return void 0;
|
|
954634
954658
|
}
|
|
954635
|
-
return `${stmtRendered} if ${conditionRendered}`;
|
|
954659
|
+
return `${stmtRendered} ${this.negated ? "unless" : "if"} ${conditionRendered}`;
|
|
954636
954660
|
}
|
|
954637
954661
|
};
|
|
954638
954662
|
function isKnownMultiLineNode(node4) {
|
|
@@ -954773,17 +954797,19 @@ var MethodInvocation6 = class extends AstNode6 {
|
|
|
954773
954797
|
arguments_;
|
|
954774
954798
|
keywordArguments;
|
|
954775
954799
|
block;
|
|
954776
|
-
|
|
954800
|
+
safeNavigation;
|
|
954801
|
+
constructor({ on: on2, method: method8, arguments_, keywordArguments, block: block2, safeNavigation }) {
|
|
954777
954802
|
super();
|
|
954778
954803
|
this.on = on2;
|
|
954779
954804
|
this.method = method8;
|
|
954780
954805
|
this.arguments_ = arguments_;
|
|
954781
954806
|
this.keywordArguments = keywordArguments;
|
|
954782
954807
|
this.block = block2;
|
|
954808
|
+
this.safeNavigation = safeNavigation ?? false;
|
|
954783
954809
|
}
|
|
954784
954810
|
write(writer2) {
|
|
954785
954811
|
this.on.write(writer2);
|
|
954786
|
-
writer2.write(".");
|
|
954812
|
+
writer2.write(this.safeNavigation ? "&." : ".");
|
|
954787
954813
|
writer2.write(this.method);
|
|
954788
954814
|
const allArguments = [];
|
|
954789
954815
|
for (const node4 of this.arguments_) {
|
|
@@ -954792,31 +954818,30 @@ var MethodInvocation6 = class extends AstNode6 {
|
|
|
954792
954818
|
for (const arg of this.keywordArguments || []) {
|
|
954793
954819
|
allArguments.push({ kind: "keyword", arg });
|
|
954794
954820
|
}
|
|
954795
|
-
if (allArguments.length
|
|
954796
|
-
|
|
954797
|
-
|
|
954798
|
-
|
|
954799
|
-
|
|
954800
|
-
|
|
954801
|
-
|
|
954802
|
-
|
|
954803
|
-
|
|
954804
|
-
|
|
954805
|
-
writer2
|
|
954806
|
-
}
|
|
954807
|
-
|
|
954808
|
-
|
|
954809
|
-
|
|
954810
|
-
|
|
954811
|
-
|
|
954812
|
-
|
|
954813
|
-
|
|
954814
|
-
writer2
|
|
954815
|
-
}
|
|
954816
|
-
|
|
954817
|
-
|
|
954821
|
+
if (allArguments.length > 0) {
|
|
954822
|
+
writer2.write("(");
|
|
954823
|
+
if (allArguments.length > 1) {
|
|
954824
|
+
writer2.indent();
|
|
954825
|
+
writer2.newLine();
|
|
954826
|
+
allArguments.forEach((argument, index3) => {
|
|
954827
|
+
if (index3 > 0) {
|
|
954828
|
+
writer2.write(",");
|
|
954829
|
+
writer2.newLine();
|
|
954830
|
+
}
|
|
954831
|
+
writeArgument3(writer2, argument);
|
|
954832
|
+
});
|
|
954833
|
+
writer2.newLine();
|
|
954834
|
+
writer2.dedent();
|
|
954835
|
+
} else {
|
|
954836
|
+
allArguments.forEach((argument, index3) => {
|
|
954837
|
+
if (index3 > 0) {
|
|
954838
|
+
writer2.write(", ");
|
|
954839
|
+
}
|
|
954840
|
+
writeArgument3(writer2, argument);
|
|
954841
|
+
});
|
|
954842
|
+
}
|
|
954843
|
+
writer2.write(")");
|
|
954818
954844
|
}
|
|
954819
|
-
writer2.write(")");
|
|
954820
954845
|
if (this.block) {
|
|
954821
954846
|
const [args, codelines] = this.block;
|
|
954822
954847
|
writer2.write(" do");
|
|
@@ -983256,7 +983281,7 @@ function getAutomationContextFromEnv() {
|
|
|
983256
983281
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
983257
983282
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
983258
983283
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
983259
|
-
cli_version: "5.120.
|
|
983284
|
+
cli_version: "5.120.4"
|
|
983260
983285
|
};
|
|
983261
983286
|
}
|
|
983262
983287
|
function isAutomationMode() {
|
|
@@ -984088,7 +984113,7 @@ var CliContext = class _CliContext {
|
|
|
984088
984113
|
if (false) {
|
|
984089
984114
|
this.logger.error("CLI_VERSION is not defined");
|
|
984090
984115
|
}
|
|
984091
|
-
return "5.120.
|
|
984116
|
+
return "5.120.4";
|
|
984092
984117
|
}
|
|
984093
984118
|
getCliName() {
|
|
984094
984119
|
if (false) {
|
package/package.json
CHANGED