@fern-api/fern-api-dev 4.107.0-6-g3c2cb45fcb9 → 4.107.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 +43 -36
- 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.
|
|
621308
|
+
version: "4.107.1",
|
|
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.
|
|
621362
|
+
version: "4.107.1",
|
|
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.
|
|
833005
|
+
const version7 = "4.107.1";
|
|
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.
|
|
845414
|
+
cliVersion: "4.107.1",
|
|
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
|
})
|
|
@@ -919642,7 +919640,7 @@ var CliContext = class _CliContext {
|
|
|
919642
919640
|
if (false) {
|
|
919643
919641
|
this.logger.error("CLI_VERSION is not defined");
|
|
919644
919642
|
}
|
|
919645
|
-
return "4.107.
|
|
919643
|
+
return "4.107.1";
|
|
919646
919644
|
}
|
|
919647
919645
|
getCliName() {
|
|
919648
919646
|
if (false) {
|
|
@@ -931068,6 +931066,7 @@ async function formatWorkspaces({
|
|
|
931068
931066
|
}
|
|
931069
931067
|
|
|
931070
931068
|
// src/commands/generate/generateDocsWorkspace.ts
|
|
931069
|
+
init_lib4();
|
|
931071
931070
|
init_js();
|
|
931072
931071
|
|
|
931073
931072
|
// src/utils/environment.ts
|
|
@@ -931269,27 +931268,35 @@ ${source_default.yellow("?")} Are you sure you want to continue?`,
|
|
|
931269
931268
|
errorOnBrokenLinks: strictBrokenLinks,
|
|
931270
931269
|
excludeRules: getExcludeRules(brokenLinks, strictBrokenLinks)
|
|
931271
931270
|
});
|
|
931271
|
+
const skippedWorkspacePaths = /* @__PURE__ */ new Set();
|
|
931272
931272
|
const ossWorkspacesForValidation = await filterOssWorkspaces(project);
|
|
931273
931273
|
for (const ossWorkspace of ossWorkspacesForValidation) {
|
|
931274
|
-
|
|
931275
|
-
|
|
931276
|
-
|
|
931277
|
-
|
|
931278
|
-
|
|
931274
|
+
try {
|
|
931275
|
+
const violations = await validateOSSWorkspace(ossWorkspace, context3);
|
|
931276
|
+
const errors4 = violations.filter((v9) => v9.severity === "fatal" || v9.severity === "error");
|
|
931277
|
+
if (errors4.length > 0) {
|
|
931278
|
+
for (const error50 of errors4) {
|
|
931279
|
+
context3.logger.warn(`${error50.relativeFilepath}: ${error50.message}`);
|
|
931280
|
+
}
|
|
931281
|
+
context3.logger.warn(
|
|
931282
|
+
`Skipping API workspace at ${ossWorkspace.absoluteFilePath} due to ${errors4.length} validation error${errors4.length !== 1 ? "s" : ""}. Run fern check for details.`
|
|
931283
|
+
);
|
|
931284
|
+
skippedWorkspacePaths.add(ossWorkspace.absoluteFilePath);
|
|
931279
931285
|
}
|
|
931280
|
-
|
|
931281
|
-
|
|
931282
|
-
|
|
931283
|
-
{ code: CliError.Code.ValidationError }
|
|
931286
|
+
} catch (error50) {
|
|
931287
|
+
context3.logger.warn(
|
|
931288
|
+
`Skipping API workspace at ${ossWorkspace.absoluteFilePath}: ${extractErrorMessage(error50)}`
|
|
931284
931289
|
);
|
|
931290
|
+
skippedWorkspacePaths.add(ossWorkspace.absoluteFilePath);
|
|
931285
931291
|
}
|
|
931286
931292
|
}
|
|
931287
931293
|
context3.logger.info("Validation complete, starting remote docs generation...");
|
|
931288
931294
|
const filterStart = performance.now();
|
|
931289
|
-
const
|
|
931295
|
+
const allOssWorkspaces = await filterOssWorkspaces(project);
|
|
931296
|
+
const ossWorkspaces = allOssWorkspaces.filter((ws5) => !skippedWorkspacePaths.has(ws5.absoluteFilePath));
|
|
931290
931297
|
const filterTime = performance.now() - filterStart;
|
|
931291
931298
|
context3.logger.debug(
|
|
931292
|
-
`Filtered OSS workspaces (${ossWorkspaces.length} workspaces) in ${filterTime.toFixed(0)}ms`
|
|
931299
|
+
`Filtered OSS workspaces (${ossWorkspaces.length} workspaces, ${skippedWorkspacePaths.size} skipped) in ${filterTime.toFixed(0)}ms`
|
|
931293
931300
|
);
|
|
931294
931301
|
const generationStart = performance.now();
|
|
931295
931302
|
await runRemoteGenerationForDocsWorkspace({
|
package/package.json
CHANGED