fern-api 0.31.8 → 0.31.9

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/bundle.cjs +16 -9
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -1110535,7 +1110535,7 @@ var AccessTokenPosthogManager = class {
1110535
1110535
  properties: {
1110536
1110536
  ...event,
1110537
1110537
  ...event.properties,
1110538
- version: "0.31.8",
1110538
+ version: "0.31.9",
1110539
1110539
  usingAccessToken: true
1110540
1110540
  }
1110541
1110541
  });
@@ -1110597,7 +1110597,7 @@ var UserPosthogManager = class {
1110597
1110597
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1110598
1110598
  event: "CLI",
1110599
1110599
  properties: {
1110600
- version: "0.31.8",
1110600
+ version: "0.31.9",
1110601
1110601
  ...event,
1110602
1110602
  ...event.properties
1110603
1110603
  }
@@ -1130944,14 +1130944,16 @@ async function visitDocsConfigFileYamlAst(contents, visitor, absoluteFilepathToC
1130944
1130944
  absoluteFilepathToConfiguration,
1130945
1130945
  rawUnresolvedFilepath: stylesheet,
1130946
1130946
  visitor,
1130947
- nodePath: ["css", `${idx}`]
1130947
+ nodePath: ["css", `${idx}`],
1130948
+ willBeUploaded: false
1130948
1130949
  })));
1130949
1130950
  } else {
1130950
1130951
  await visitFilepath({
1130951
1130952
  absoluteFilepathToConfiguration,
1130952
1130953
  rawUnresolvedFilepath: contents.css,
1130953
1130954
  visitor,
1130954
- nodePath: ["css"]
1130955
+ nodePath: ["css"],
1130956
+ willBeUploaded: false
1130955
1130957
  });
1130956
1130958
  }
1130957
1130959
  }
@@ -1146094,10 +1146096,10 @@ var CliContext = class {
1146094
1146096
  return "fern-api";
1146095
1146097
  }
1146096
1146098
  getPackageVersion() {
1146097
- if ("0.31.8" == null) {
1146099
+ if ("0.31.9" == null) {
1146098
1146100
  this.logger.error("CLI_VERSION is not defined");
1146099
1146101
  }
1146100
- return "0.31.8";
1146102
+ return "0.31.9";
1146101
1146103
  }
1146102
1146104
  getCliName() {
1146103
1146105
  if ("fern" == null) {
@@ -1183009,7 +1183011,8 @@ var ALLOWED_FILE_TYPES = /* @__PURE__ */ new Set([
1183009
1183011
  "font/otf",
1183010
1183012
  "font/ttf"
1183011
1183013
  ]);
1183012
- var ALLOWED_UTF8_EXTENSIONS = /* @__PURE__ */ new Set(["js", "css"]);
1183014
+ var ALLOWED_EXTENSIONS = /* @__PURE__ */ new Set(["js"]);
1183015
+ var ALLOWED_ENCODINGS = /* @__PURE__ */ new Set(["UTF-8"]);
1183013
1183016
  var ValidFileTypes = {
1183014
1183017
  name: "valid-file-types",
1183015
1183018
  create: () => {
@@ -1183041,10 +1183044,14 @@ var isValidFileType = async (absoluteFilepath) => {
1183041
1183044
  return true;
1183042
1183045
  }
1183043
1183046
  const fileType = await fileTypeFromBuffer(file);
1183044
- if (fileType) {
1183047
+ if (fileType != null) {
1183045
1183048
  return ALLOWED_FILE_TYPES.has(fileType.mime);
1183046
1183049
  }
1183047
- if (ALLOWED_UTF8_EXTENSIONS.has(import_path32.default.extname(absoluteFilepath).toLowerCase()) && import_chardet.default.detect(file) === "UTF-8") {
1183050
+ let extension3 = import_path32.default.extname(absoluteFilepath).toLowerCase();
1183051
+ if (extension3.startsWith(".")) {
1183052
+ extension3 = extension3.substring(1);
1183053
+ }
1183054
+ if (ALLOWED_EXTENSIONS.has(extension3) && ALLOWED_ENCODINGS.has(import_chardet.default.detect(file) ?? "")) {
1183048
1183055
  return true;
1183049
1183056
  }
1183050
1183057
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.31.8",
3
+ "version": "0.31.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",