@fern-api/fern-api-dev 5.33.6 → 5.33.7
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 +25 -14
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -645818,9 +645818,11 @@ async function parseOverlayFile(absoluteFilePathToOverlay, context3) {
|
|
|
645818
645818
|
}
|
|
645819
645819
|
try {
|
|
645820
645820
|
try {
|
|
645821
|
-
|
|
645821
|
+
const parsedJson = JSON.parse(contents);
|
|
645822
|
+
return parsedJson;
|
|
645822
645823
|
} catch {
|
|
645823
|
-
|
|
645824
|
+
const parsedYaml = jsYaml.load(contents, { json: true });
|
|
645825
|
+
return parsedYaml;
|
|
645824
645826
|
}
|
|
645825
645827
|
} catch (err) {
|
|
645826
645828
|
return context3.failAndThrow(`Failed to parse overlay file at ${absoluteFilePathToOverlay}: ${err}`, void 0, {
|
|
@@ -645829,21 +645831,27 @@ async function parseOverlayFile(absoluteFilePathToOverlay, context3) {
|
|
|
645829
645831
|
}
|
|
645830
645832
|
}
|
|
645831
645833
|
function validateOverlay(overlay, context3) {
|
|
645832
|
-
if (!overlay
|
|
645834
|
+
if (!isRecord(overlay)) {
|
|
645835
|
+
context3.logger.error("Overlay file must be a YAML or JSON object");
|
|
645836
|
+
return false;
|
|
645837
|
+
}
|
|
645838
|
+
if (typeof overlay.overlay !== "string" || overlay.overlay.length === 0) {
|
|
645833
645839
|
context3.logger.error("Overlay file missing required 'overlay' version field");
|
|
645834
645840
|
return false;
|
|
645835
645841
|
}
|
|
645836
|
-
|
|
645842
|
+
const info = overlay.info;
|
|
645843
|
+
if (!isRecord(info) || typeof info.title !== "string" || info.title.length === 0 || typeof info.version !== "string" || info.version.length === 0) {
|
|
645837
645844
|
context3.logger.error("Overlay file missing required 'info.title' or 'info.version' field");
|
|
645838
645845
|
return false;
|
|
645839
645846
|
}
|
|
645840
|
-
|
|
645847
|
+
const actions = overlay.actions;
|
|
645848
|
+
if (!Array.isArray(actions) || actions.length === 0) {
|
|
645841
645849
|
context3.logger.error("Overlay file must have at least one action");
|
|
645842
645850
|
return false;
|
|
645843
645851
|
}
|
|
645844
|
-
for (let i9 = 0; i9 <
|
|
645845
|
-
const action =
|
|
645846
|
-
if (!action
|
|
645852
|
+
for (let i9 = 0; i9 < actions.length; i9++) {
|
|
645853
|
+
const action = actions[i9];
|
|
645854
|
+
if (!isRecord(action) || !action.target) {
|
|
645847
645855
|
context3.logger.error(`Overlay action at index ${i9} missing required 'target' field`);
|
|
645848
645856
|
return false;
|
|
645849
645857
|
}
|
|
@@ -645854,6 +645862,9 @@ function validateOverlay(overlay, context3) {
|
|
|
645854
645862
|
}
|
|
645855
645863
|
return true;
|
|
645856
645864
|
}
|
|
645865
|
+
function isRecord(value2) {
|
|
645866
|
+
return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
|
|
645867
|
+
}
|
|
645857
645868
|
|
|
645858
645869
|
// ../workspace/lazy-fern-workspace/lib/utils/parseOpenAPI.js
|
|
645859
645870
|
var import_openapi_core3 = __toESM(require_lib2(), 1);
|
|
@@ -668484,7 +668495,7 @@ var AccessTokenPosthogManager = class {
|
|
|
668484
668495
|
properties: {
|
|
668485
668496
|
...event,
|
|
668486
668497
|
...event.properties,
|
|
668487
|
-
version: "5.33.
|
|
668498
|
+
version: "5.33.7",
|
|
668488
668499
|
usingAccessToken: true,
|
|
668489
668500
|
...getRunIdProperties()
|
|
668490
668501
|
}
|
|
@@ -668548,7 +668559,7 @@ var UserPosthogManager = class {
|
|
|
668548
668559
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
668549
668560
|
event: "CLI",
|
|
668550
668561
|
properties: {
|
|
668551
|
-
version: "5.33.
|
|
668562
|
+
version: "5.33.7",
|
|
668552
668563
|
...event,
|
|
668553
668564
|
...event.properties,
|
|
668554
668565
|
usingAccessToken: false,
|
|
@@ -860345,7 +860356,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
860345
860356
|
var LOGS_FOLDER_NAME = "logs";
|
|
860346
860357
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
860347
860358
|
function getCliSource() {
|
|
860348
|
-
const version7 = "5.33.
|
|
860359
|
+
const version7 = "5.33.7";
|
|
860349
860360
|
return `cli@${version7}`;
|
|
860350
860361
|
}
|
|
860351
860362
|
var DebugLogger = class {
|
|
@@ -879191,7 +879202,7 @@ var LegacyDocsPublisher = class {
|
|
|
879191
879202
|
previewId,
|
|
879192
879203
|
disableTemplates: void 0,
|
|
879193
879204
|
skipUpload,
|
|
879194
|
-
cliVersion: "5.33.
|
|
879205
|
+
cliVersion: "5.33.7",
|
|
879195
879206
|
loginCommand: "fern auth login"
|
|
879196
879207
|
});
|
|
879197
879208
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -953891,7 +953902,7 @@ function getAutomationContextFromEnv() {
|
|
|
953891
953902
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
953892
953903
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
953893
953904
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
953894
|
-
cli_version: "5.33.
|
|
953905
|
+
cli_version: "5.33.7"
|
|
953895
953906
|
};
|
|
953896
953907
|
}
|
|
953897
953908
|
function isAutomationMode() {
|
|
@@ -954717,7 +954728,7 @@ var CliContext = class _CliContext {
|
|
|
954717
954728
|
if (false) {
|
|
954718
954729
|
this.logger.error("CLI_VERSION is not defined");
|
|
954719
954730
|
}
|
|
954720
|
-
return "5.33.
|
|
954731
|
+
return "5.33.7";
|
|
954721
954732
|
}
|
|
954722
954733
|
getCliName() {
|
|
954723
954734
|
if (false) {
|
package/package.json
CHANGED