@fern-api/fern-api-dev 5.23.0 → 5.23.1-13-g41a864bc396

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 +39 -13
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -227089,7 +227089,7 @@ var require_cross_spawn = __commonJS({
227089
227089
  enoent.hookChildProcess(spawned, parsed);
227090
227090
  return spawned;
227091
227091
  }
227092
- function spawnSync7(command3, args, options2) {
227092
+ function spawnSync8(command3, args, options2) {
227093
227093
  const parsed = parse19(command3, args, options2);
227094
227094
  const result = cp11.spawnSync(parsed.command, parsed.args, parsed.options);
227095
227095
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
@@ -227097,7 +227097,7 @@ var require_cross_spawn = __commonJS({
227097
227097
  }
227098
227098
  module4.exports = spawn7;
227099
227099
  module4.exports.spawn = spawn7;
227100
- module4.exports.sync = spawnSync7;
227100
+ module4.exports.sync = spawnSync8;
227101
227101
  module4.exports._parse = parse19;
227102
227102
  module4.exports._enoent = enoent;
227103
227103
  }
@@ -357072,7 +357072,7 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
357072
357072
  var import_promises210 = require("fs/promises");
357073
357073
  var import_node_os22 = require("os");
357074
357074
  var import_node_path310 = require("path");
357075
- var import_node_child_process7 = require("child_process");
357075
+ var import_node_child_process8 = require("child_process");
357076
357076
  init_HybridReconstruction();
357077
357077
  function normalizeHunkBody(hunk) {
357078
357078
  let contextC = 0;
@@ -357293,7 +357293,7 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
357293
357293
  }
357294
357294
  function runGitDiffNoIndex(beforePath, afterPath) {
357295
357295
  return new Promise((resolve22, reject) => {
357296
- const proc2 = (0, import_node_child_process7.spawn)("git", ["diff", "--no-index", "--", beforePath, afterPath]);
357296
+ const proc2 = (0, import_node_child_process8.spawn)("git", ["diff", "--no-index", "--", beforePath, afterPath]);
357297
357297
  let stdout = "";
357298
357298
  let stderr = "";
357299
357299
  proc2.stdout.on("data", (d5) => stdout += d5.toString());
@@ -491552,6 +491552,9 @@ var require_undici2 = __commonJS({
491552
491552
  }
491553
491553
  });
491554
491554
 
491555
+ // src/cli.ts
491556
+ var import_node_child_process7 = require("child_process");
491557
+
491555
491558
  // ../../../node_modules/.pnpm/@bufbuild+protobuf@2.2.5/node_modules/@bufbuild/protobuf/dist/esm/is-message.js
491556
491559
  function isMessage(arg, schema2) {
491557
491560
  const isMessage2 = arg !== null && typeof arg == "object" && "$typeName" in arg && typeof arg.$typeName == "string";
@@ -605750,6 +605753,10 @@ function generateIntermediateRepresentation({ workspace, generationLanguage, key
605750
605753
  const hasFileDownloadEndpoints = Object.values(intermediateRepresentationForAudiences.services).some((service) => {
605751
605754
  return service.endpoints.some((endpoint3) => endpoint3.response?.body?.type === "fileDownload");
605752
605755
  });
605756
+ const hasCustomUserAgentHeader = intermediateRepresentationForAudiences.headers.some((header) => {
605757
+ const wireValue = typeof header.name === "string" ? header.name : header.name.wireValue;
605758
+ return wireValue.toLowerCase() === "user-agent";
605759
+ });
605753
605760
  const sdkConfig = {
605754
605761
  isAuthMandatory,
605755
605762
  hasStreamingEndpoints,
@@ -605759,7 +605766,7 @@ function generateIntermediateRepresentation({ workspace, generationLanguage, key
605759
605766
  language: "X-Fern-Language",
605760
605767
  sdkName: "X-Fern-SDK-Name",
605761
605768
  sdkVersion: "X-Fern-SDK-Version",
605762
- userAgent: version7 != null && packageName != null ? {
605769
+ userAgent: !hasCustomUserAgentHeader && version7 != null && packageName != null ? {
605763
605770
  header: "User-Agent",
605764
605771
  value: `${packageName}/${version7}`
605765
605772
  } : void 0
@@ -661751,7 +661758,7 @@ var AccessTokenPosthogManager = class {
661751
661758
  properties: {
661752
661759
  ...event,
661753
661760
  ...event.properties,
661754
- version: "5.23.0",
661761
+ version: "5.23.1-13-g41a864bc396",
661755
661762
  usingAccessToken: true,
661756
661763
  ...getRunIdProperties()
661757
661764
  }
@@ -661806,7 +661813,7 @@ var UserPosthogManager = class {
661806
661813
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
661807
661814
  event: "CLI",
661808
661815
  properties: {
661809
- version: "5.23.0",
661816
+ version: "5.23.1-13-g41a864bc396",
661810
661817
  ...event,
661811
661818
  ...event.properties,
661812
661819
  usingAccessToken: false,
@@ -853086,7 +853093,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
853086
853093
  var LOGS_FOLDER_NAME = "logs";
853087
853094
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
853088
853095
  function getCliSource() {
853089
- const version7 = "5.23.0";
853096
+ const version7 = "5.23.1-13-g41a864bc396";
853090
853097
  return `cli@${version7}`;
853091
853098
  }
853092
853099
  var DebugLogger = class {
@@ -853445,6 +853452,7 @@ var STANDALONE_FOLDER_NAME = "standalone";
853445
853452
  var LOCAL_STORAGE_FOLDER5 = ".fern-dev";
853446
853453
  var INSTRUMENTATION_PATH = "packages/fern-docs/bundle/.next/server/instrumentation.js";
853447
853454
  var COREPACK_MISSING_KEYID_ERROR_MESSAGE = 'Cannot find matching keyid: {"signatures":';
853455
+ var PNPM_IGNORED_BUILDS_ERROR = "ERR_PNPM_IGNORED_BUILDS";
853448
853456
  function assertLongPathsEnabled(logger4) {
853449
853457
  try {
853450
853458
  const output2 = (0, import_child_process6.execSync)('reg query "HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem" /v LongPathsEnabled', { encoding: "utf-8", timeout: 5e3 });
@@ -853797,7 +853805,9 @@ async function downloadBundle({ bucketUrl, logger: logger4, preferCached, app =
853797
853805
  });
853798
853806
  } catch (error50) {
853799
853807
  if (error50 instanceof Error) {
853800
- if (typeof error50?.message === "string" && error50.message.includes(COREPACK_MISSING_KEYID_ERROR_MESSAGE)) {
853808
+ if (typeof error50?.message === "string" && error50.message.includes(PNPM_IGNORED_BUILDS_ERROR)) {
853809
+ logger4.debug("pnpm blocked esbuild build scripts (ERR_PNPM_IGNORED_BUILDS) \u2014 continuing, install-esbuild.js will handle binary setup");
853810
+ } else if (typeof error50?.message === "string" && error50.message.includes(COREPACK_MISSING_KEYID_ERROR_MESSAGE)) {
853801
853811
  logger4.debug("Detected corepack missing keyid error. Attempting to upgrade corepack");
853802
853812
  try {
853803
853813
  await loggingExeca(logger4, "npm", ["install", "-g", "corepack@latest"], {
@@ -855123,8 +855133,14 @@ ${err.stack}`);
855123
855133
  }
855124
855134
  await cleanFernDocsCache(bundleRoot, context3);
855125
855135
  const polyfillPath = writeNodePolyfillScript(bundleRoot);
855136
+ const nodeMajor = parseInt(process.versions.node.split(".")[0] ?? "0", 10);
855137
+ const needsIoUringWorkaround = process.platform === "linux" && nodeMajor >= 26;
855138
+ if (needsIoUringWorkaround) {
855139
+ context3.logger.debug(`Node.js v${process.versions.node} on Linux detected \u2014 disabling io_uring to avoid libuv busy-loop`);
855140
+ }
855126
855141
  const env5 = {
855127
855142
  ...process.env,
855143
+ ...needsIoUringWorkaround ? { UV_USE_IO_URING: "0" } : {},
855128
855144
  PORT: port.toString(),
855129
855145
  HOSTNAME: "0.0.0.0",
855130
855146
  NEXT_PUBLIC_FDR_ORIGIN_PORT: backendPort.toString(),
@@ -865901,7 +865917,7 @@ var LegacyDocsPublisher = class {
865901
865917
  previewId,
865902
865918
  disableTemplates: void 0,
865903
865919
  skipUpload,
865904
- cliVersion: "5.23.0",
865920
+ cliVersion: "5.23.1-13-g41a864bc396",
865905
865921
  loginCommand: "fern auth login"
865906
865922
  });
865907
865923
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -940646,7 +940662,7 @@ var CliContext = class _CliContext {
940646
940662
  if (false) {
940647
940663
  this.logger.error("CLI_VERSION is not defined");
940648
940664
  }
940649
- return "5.23.0";
940665
+ return "5.23.1-13-g41a864bc396";
940650
940666
  }
940651
940667
  getCliName() {
940652
940668
  if (false) {
@@ -959919,6 +959935,16 @@ function evaluateRuntime4() {
959919
959935
  }
959920
959936
 
959921
959937
  // src/cli.ts
959938
+ if (process.platform === "linux" && parseInt(process.versions.node.split(".")[0] ?? "0", 10) >= 26 && process.env.UV_USE_IO_URING !== "0") {
959939
+ const result = (0, import_node_child_process7.spawnSync)(process.execPath, process.argv.slice(1), {
959940
+ env: { ...process.env, UV_USE_IO_URING: "0" },
959941
+ stdio: "inherit"
959942
+ });
959943
+ if (result.signal) {
959944
+ process.kill(process.pid, result.signal);
959945
+ }
959946
+ process.exit(result.status ?? 1);
959947
+ }
959922
959948
  void runCli();
959923
959949
  async function runCli() {
959924
959950
  const isCompletion = process.argv.includes("--get-yargs-completions");
@@ -960240,9 +960266,9 @@ function addDiffCommand(cli, cliContext) {
960240
960266
  const fromSize = fs28.statSync(fromPath, { throwIfNoEntry: false })?.size ?? 0;
960241
960267
  const toSize = fs28.statSync(toPath4, { throwIfNoEntry: false })?.size ?? 0;
960242
960268
  if (fromSize > ONE_GB || toSize > ONE_GB) {
960243
- const { spawnSync: spawnSync7 } = await import("child_process");
960269
+ const { spawnSync: spawnSync8 } = await import("child_process");
960244
960270
  const HEAP_SIZE_MB = 8192;
960245
- const child = spawnSync7(
960271
+ const child = spawnSync8(
960246
960272
  process.execPath,
960247
960273
  [`--max-old-space-size=${HEAP_SIZE_MB}`, ...process.execArgv, ...process.argv.slice(1)],
960248
960274
  {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.23.0",
2
+ "version": "5.23.1-13-g41a864bc396",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",