@fern-api/fern-api-dev 5.33.5 → 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.
Files changed (2) hide show
  1. package/cli.cjs +33 -16
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -609347,8 +609347,8 @@ var ReadmeEndpointCache = class {
609347
609347
  const endpoint3 = this.getEndpointForReadme(readmeEndpoint);
609348
609348
  if (endpoint3 == null) {
609349
609349
  throw new CliError({
609350
- message: `Endpoint not found for ${JSON.stringify(readmeEndpoint)}`,
609351
- code: CliError.Code.ResolutionError
609350
+ message: `Endpoint not found in generators.yml readme config for ${formatReadmeEndpoint(readmeEndpoint)}`,
609351
+ code: CliError.Code.ConfigError
609352
609352
  });
609353
609353
  }
609354
609354
  return endpoint3;
@@ -609406,6 +609406,12 @@ function getReadmeEndpointObject({ endpoint: endpoint3 }) {
609406
609406
  }
609407
609407
  return endpoint3;
609408
609408
  }
609409
+ function formatReadmeEndpoint(readmeEndpoint) {
609410
+ if (typeof readmeEndpoint === "string") {
609411
+ return readmeEndpoint;
609412
+ }
609413
+ return JSON.stringify(readmeEndpoint);
609414
+ }
609409
609415
 
609410
609416
  // ../generation/ir-generator/lib/converters/convertWebhookGroup.js
609411
609417
  init_lib4();
@@ -645812,9 +645818,11 @@ async function parseOverlayFile(absoluteFilePathToOverlay, context3) {
645812
645818
  }
645813
645819
  try {
645814
645820
  try {
645815
- return JSON.parse(contents);
645821
+ const parsedJson = JSON.parse(contents);
645822
+ return parsedJson;
645816
645823
  } catch {
645817
- return jsYaml.load(contents, { json: true });
645824
+ const parsedYaml = jsYaml.load(contents, { json: true });
645825
+ return parsedYaml;
645818
645826
  }
645819
645827
  } catch (err) {
645820
645828
  return context3.failAndThrow(`Failed to parse overlay file at ${absoluteFilePathToOverlay}: ${err}`, void 0, {
@@ -645823,21 +645831,27 @@ async function parseOverlayFile(absoluteFilePathToOverlay, context3) {
645823
645831
  }
645824
645832
  }
645825
645833
  function validateOverlay(overlay, context3) {
645826
- if (!overlay.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) {
645827
645839
  context3.logger.error("Overlay file missing required 'overlay' version field");
645828
645840
  return false;
645829
645841
  }
645830
- if (!overlay.info?.title || !overlay.info?.version) {
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) {
645831
645844
  context3.logger.error("Overlay file missing required 'info.title' or 'info.version' field");
645832
645845
  return false;
645833
645846
  }
645834
- if (!Array.isArray(overlay.actions) || overlay.actions.length === 0) {
645847
+ const actions = overlay.actions;
645848
+ if (!Array.isArray(actions) || actions.length === 0) {
645835
645849
  context3.logger.error("Overlay file must have at least one action");
645836
645850
  return false;
645837
645851
  }
645838
- for (let i9 = 0; i9 < overlay.actions.length; i9++) {
645839
- const action = overlay.actions[i9];
645840
- if (!action?.target) {
645852
+ for (let i9 = 0; i9 < actions.length; i9++) {
645853
+ const action = actions[i9];
645854
+ if (!isRecord(action) || !action.target) {
645841
645855
  context3.logger.error(`Overlay action at index ${i9} missing required 'target' field`);
645842
645856
  return false;
645843
645857
  }
@@ -645848,6 +645862,9 @@ function validateOverlay(overlay, context3) {
645848
645862
  }
645849
645863
  return true;
645850
645864
  }
645865
+ function isRecord(value2) {
645866
+ return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
645867
+ }
645851
645868
 
645852
645869
  // ../workspace/lazy-fern-workspace/lib/utils/parseOpenAPI.js
645853
645870
  var import_openapi_core3 = __toESM(require_lib2(), 1);
@@ -668478,7 +668495,7 @@ var AccessTokenPosthogManager = class {
668478
668495
  properties: {
668479
668496
  ...event,
668480
668497
  ...event.properties,
668481
- version: "5.33.5",
668498
+ version: "5.33.7",
668482
668499
  usingAccessToken: true,
668483
668500
  ...getRunIdProperties()
668484
668501
  }
@@ -668542,7 +668559,7 @@ var UserPosthogManager = class {
668542
668559
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
668543
668560
  event: "CLI",
668544
668561
  properties: {
668545
- version: "5.33.5",
668562
+ version: "5.33.7",
668546
668563
  ...event,
668547
668564
  ...event.properties,
668548
668565
  usingAccessToken: false,
@@ -860339,7 +860356,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
860339
860356
  var LOGS_FOLDER_NAME = "logs";
860340
860357
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
860341
860358
  function getCliSource() {
860342
- const version7 = "5.33.5";
860359
+ const version7 = "5.33.7";
860343
860360
  return `cli@${version7}`;
860344
860361
  }
860345
860362
  var DebugLogger = class {
@@ -879185,7 +879202,7 @@ var LegacyDocsPublisher = class {
879185
879202
  previewId,
879186
879203
  disableTemplates: void 0,
879187
879204
  skipUpload,
879188
- cliVersion: "5.33.5",
879205
+ cliVersion: "5.33.7",
879189
879206
  loginCommand: "fern auth login"
879190
879207
  });
879191
879208
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -953885,7 +953902,7 @@ function getAutomationContextFromEnv() {
953885
953902
  config_branch: process.env.FERN_CONFIG_BRANCH,
953886
953903
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
953887
953904
  trigger: process.env.GITHUB_EVENT_NAME,
953888
- cli_version: "5.33.5"
953905
+ cli_version: "5.33.7"
953889
953906
  };
953890
953907
  }
953891
953908
  function isAutomationMode() {
@@ -954711,7 +954728,7 @@ var CliContext = class _CliContext {
954711
954728
  if (false) {
954712
954729
  this.logger.error("CLI_VERSION is not defined");
954713
954730
  }
954714
- return "5.33.5";
954731
+ return "5.33.7";
954715
954732
  }
954716
954733
  getCliName() {
954717
954734
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.33.5",
2
+ "version": "5.33.7",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",