@fern-api/fern-api-dev 4.107.0-6-g3c2cb45fcb9 → 4.107.0-65-g0230cd2035f
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 +45 -37
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -621305,7 +621305,7 @@ var AccessTokenPosthogManager = class {
|
|
|
621305
621305
|
properties: {
|
|
621306
621306
|
...event,
|
|
621307
621307
|
...event.properties,
|
|
621308
|
-
version: "4.107.0-
|
|
621308
|
+
version: "4.107.0-65-g0230cd2035f",
|
|
621309
621309
|
usingAccessToken: true
|
|
621310
621310
|
}
|
|
621311
621311
|
});
|
|
@@ -621359,7 +621359,7 @@ var UserPosthogManager = class {
|
|
|
621359
621359
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
621360
621360
|
event: "CLI",
|
|
621361
621361
|
properties: {
|
|
621362
|
-
version: "4.107.0-
|
|
621362
|
+
version: "4.107.0-65-g0230cd2035f",
|
|
621363
621363
|
...event,
|
|
621364
621364
|
...event.properties,
|
|
621365
621365
|
usingAccessToken: false,
|
|
@@ -833002,7 +833002,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
833002
833002
|
var LOGS_FOLDER_NAME = "logs";
|
|
833003
833003
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
833004
833004
|
function getCliSource() {
|
|
833005
|
-
const version7 = "4.107.0-
|
|
833005
|
+
const version7 = "4.107.0-65-g0230cd2035f";
|
|
833006
833006
|
return `cli@${version7}`;
|
|
833007
833007
|
}
|
|
833008
833008
|
var DebugLogger = class {
|
|
@@ -845411,7 +845411,7 @@ var LegacyDocsPublisher = class {
|
|
|
845411
845411
|
previewId,
|
|
845412
845412
|
disableTemplates: void 0,
|
|
845413
845413
|
skipUpload,
|
|
845414
|
-
cliVersion: "4.107.0-
|
|
845414
|
+
cliVersion: "4.107.0-65-g0230cd2035f",
|
|
845415
845415
|
loginCommand: "fern auth login"
|
|
845416
845416
|
});
|
|
845417
845417
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -873749,28 +873749,28 @@ var STRING_TYPE_REFERENCE = {
|
|
|
873749
873749
|
type: "primitive",
|
|
873750
873750
|
value: "STRING"
|
|
873751
873751
|
};
|
|
873752
|
-
function
|
|
873752
|
+
function stripOptionalAndNullable(item) {
|
|
873753
|
+
let current3 = item;
|
|
873754
|
+
while (current3.type === "optional" || current3.type === "nullable") {
|
|
873755
|
+
current3 = current3.value;
|
|
873756
|
+
}
|
|
873757
|
+
return current3;
|
|
873758
|
+
}
|
|
873759
|
+
function stripListItemWrappers(typeReference2) {
|
|
873753
873760
|
if (typeReference2.type === "optional" && typeReference2.value.type === "list") {
|
|
873754
|
-
const
|
|
873755
|
-
const
|
|
873756
|
-
if (
|
|
873757
|
-
return
|
|
873758
|
-
type: "optional",
|
|
873759
|
-
value: {
|
|
873760
|
-
type: "list",
|
|
873761
|
-
value: itemType.value
|
|
873762
|
-
}
|
|
873763
|
-
};
|
|
873761
|
+
const itemType = typeReference2.value.value;
|
|
873762
|
+
const stripped = stripOptionalAndNullable(itemType);
|
|
873763
|
+
if (stripped === itemType) {
|
|
873764
|
+
return typeReference2;
|
|
873764
873765
|
}
|
|
873766
|
+
return { type: "optional", value: { type: "list", value: stripped } };
|
|
873765
873767
|
}
|
|
873766
873768
|
if (typeReference2.type === "list") {
|
|
873767
|
-
const
|
|
873768
|
-
if (
|
|
873769
|
-
return
|
|
873770
|
-
type: "list",
|
|
873771
|
-
value: itemType.value
|
|
873772
|
-
};
|
|
873769
|
+
const stripped = stripOptionalAndNullable(typeReference2.value);
|
|
873770
|
+
if (stripped === typeReference2.value) {
|
|
873771
|
+
return typeReference2;
|
|
873773
873772
|
}
|
|
873773
|
+
return { type: "list", value: stripped };
|
|
873774
873774
|
}
|
|
873775
873775
|
return typeReference2;
|
|
873776
873776
|
}
|
|
@@ -874286,9 +874286,7 @@ var EndpointSnippetGenerator4 = class {
|
|
|
874286
874286
|
const queryParameterFields = sortedQueryParameters.map((queryParameter) => ({
|
|
874287
874287
|
name: this.context.getMethodName(queryParameter.name.name),
|
|
874288
874288
|
value: this.context.dynamicTypeLiteralMapper.convert({
|
|
874289
|
-
|
|
874290
|
-
// Java SDK builders have convenience overloads that accept List<T>.
|
|
874291
|
-
typeReference: unwrapOptionalFromListItems(queryParameter.typeReference),
|
|
874289
|
+
typeReference: stripListItemWrappers(queryParameter.typeReference),
|
|
874292
874290
|
value: queryParameter.value,
|
|
874293
874291
|
as: "request"
|
|
874294
874292
|
})
|
|
@@ -881498,7 +881496,8 @@ var Comment6 = class extends AstNode6 {
|
|
|
881498
881496
|
this.docs.split("\n").forEach((line) => {
|
|
881499
881497
|
const wrappedLines = this.wrapLine(line, writer2);
|
|
881500
881498
|
wrappedLines.forEach((wrappedLine) => {
|
|
881501
|
-
|
|
881499
|
+
const trimmed2 = wrappedLine.trimEnd();
|
|
881500
|
+
writer2.writeLine(trimmed2 === "" ? "#" : `# ${trimmed2}`);
|
|
881502
881501
|
});
|
|
881503
881502
|
});
|
|
881504
881503
|
}
|
|
@@ -919642,7 +919641,7 @@ var CliContext = class _CliContext {
|
|
|
919642
919641
|
if (false) {
|
|
919643
919642
|
this.logger.error("CLI_VERSION is not defined");
|
|
919644
919643
|
}
|
|
919645
|
-
return "4.107.0-
|
|
919644
|
+
return "4.107.0-65-g0230cd2035f";
|
|
919646
919645
|
}
|
|
919647
919646
|
getCliName() {
|
|
919648
919647
|
if (false) {
|
|
@@ -931068,6 +931067,7 @@ async function formatWorkspaces({
|
|
|
931068
931067
|
}
|
|
931069
931068
|
|
|
931070
931069
|
// src/commands/generate/generateDocsWorkspace.ts
|
|
931070
|
+
init_lib4();
|
|
931071
931071
|
init_js();
|
|
931072
931072
|
|
|
931073
931073
|
// src/utils/environment.ts
|
|
@@ -931269,27 +931269,35 @@ ${source_default.yellow("?")} Are you sure you want to continue?`,
|
|
|
931269
931269
|
errorOnBrokenLinks: strictBrokenLinks,
|
|
931270
931270
|
excludeRules: getExcludeRules(brokenLinks, strictBrokenLinks)
|
|
931271
931271
|
});
|
|
931272
|
+
const skippedWorkspacePaths = /* @__PURE__ */ new Set();
|
|
931272
931273
|
const ossWorkspacesForValidation = await filterOssWorkspaces(project);
|
|
931273
931274
|
for (const ossWorkspace of ossWorkspacesForValidation) {
|
|
931274
|
-
|
|
931275
|
-
|
|
931276
|
-
|
|
931277
|
-
|
|
931278
|
-
|
|
931275
|
+
try {
|
|
931276
|
+
const violations = await validateOSSWorkspace(ossWorkspace, context3);
|
|
931277
|
+
const errors4 = violations.filter((v9) => v9.severity === "fatal" || v9.severity === "error");
|
|
931278
|
+
if (errors4.length > 0) {
|
|
931279
|
+
for (const error50 of errors4) {
|
|
931280
|
+
context3.logger.warn(`${error50.relativeFilepath}: ${error50.message}`);
|
|
931281
|
+
}
|
|
931282
|
+
context3.logger.warn(
|
|
931283
|
+
`Skipping API workspace at ${ossWorkspace.absoluteFilePath} due to ${errors4.length} validation error${errors4.length !== 1 ? "s" : ""}. Run fern check for details.`
|
|
931284
|
+
);
|
|
931285
|
+
skippedWorkspacePaths.add(ossWorkspace.absoluteFilePath);
|
|
931279
931286
|
}
|
|
931280
|
-
|
|
931281
|
-
|
|
931282
|
-
|
|
931283
|
-
{ code: CliError.Code.ValidationError }
|
|
931287
|
+
} catch (error50) {
|
|
931288
|
+
context3.logger.warn(
|
|
931289
|
+
`Skipping API workspace at ${ossWorkspace.absoluteFilePath}: ${extractErrorMessage(error50)}`
|
|
931284
931290
|
);
|
|
931291
|
+
skippedWorkspacePaths.add(ossWorkspace.absoluteFilePath);
|
|
931285
931292
|
}
|
|
931286
931293
|
}
|
|
931287
931294
|
context3.logger.info("Validation complete, starting remote docs generation...");
|
|
931288
931295
|
const filterStart = performance.now();
|
|
931289
|
-
const
|
|
931296
|
+
const allOssWorkspaces = await filterOssWorkspaces(project);
|
|
931297
|
+
const ossWorkspaces = allOssWorkspaces.filter((ws5) => !skippedWorkspacePaths.has(ws5.absoluteFilePath));
|
|
931290
931298
|
const filterTime = performance.now() - filterStart;
|
|
931291
931299
|
context3.logger.debug(
|
|
931292
|
-
`Filtered OSS workspaces (${ossWorkspaces.length} workspaces) in ${filterTime.toFixed(0)}ms`
|
|
931300
|
+
`Filtered OSS workspaces (${ossWorkspaces.length} workspaces, ${skippedWorkspacePaths.size} skipped) in ${filterTime.toFixed(0)}ms`
|
|
931293
931301
|
);
|
|
931294
931302
|
const generationStart = performance.now();
|
|
931295
931303
|
await runRemoteGenerationForDocsWorkspace({
|
package/package.json
CHANGED