fern-api 0.31.12 → 0.31.14

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 +15 -9
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -1115837,7 +1115837,7 @@ var AccessTokenPosthogManager = class {
1115837
1115837
  properties: {
1115838
1115838
  ...event,
1115839
1115839
  ...event.properties,
1115840
- version: "0.31.12",
1115840
+ version: "0.31.14",
1115841
1115841
  usingAccessToken: true
1115842
1115842
  }
1115843
1115843
  });
@@ -1115899,7 +1115899,7 @@ var UserPosthogManager = class {
1115899
1115899
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1115900
1115900
  event: "CLI",
1115901
1115901
  properties: {
1115902
- version: "0.31.12",
1115902
+ version: "0.31.14",
1115903
1115903
  ...event,
1115904
1115904
  ...event.properties
1115905
1115905
  }
@@ -1151467,10 +1151467,10 @@ var CliContext = class {
1151467
1151467
  return "fern-api";
1151468
1151468
  }
1151469
1151469
  getPackageVersion() {
1151470
- if ("0.31.12" == null) {
1151470
+ if ("0.31.14" == null) {
1151471
1151471
  this.logger.error("CLI_VERSION is not defined");
1151472
1151472
  }
1151473
- return "0.31.12";
1151473
+ return "0.31.14";
1151474
1151474
  }
1151475
1151475
  getCliName() {
1151476
1151476
  if ("fern" == null) {
@@ -1188390,7 +1188390,7 @@ var ALLOWED_FILE_TYPES = /* @__PURE__ */ new Set([
1188390
1188390
  "font/ttf"
1188391
1188391
  ]);
1188392
1188392
  var ALLOWED_EXTENSIONS = /* @__PURE__ */ new Set(["js"]);
1188393
- var ALLOWED_ENCODINGS = /* @__PURE__ */ new Set(["UTF-8"]);
1188393
+ var ALLOWED_ENCODINGS = /* @__PURE__ */ new Set(["UTF-8", "ISO-8859-1"]);
1188394
1188394
  var ValidFileTypes = {
1188395
1188395
  name: "valid-file-types",
1188396
1188396
  create: () => {
@@ -1201997,9 +1201997,12 @@ var import_tmp_promise9 = __toESM(require_tmp_promise());
1201997
1201997
 
1201998
1201998
  // pnp:/home/circleci/project/packages/cli/generation/remote-generation/remote-workspace-runner/lib/substituteEnvVariables.js
1201999
1201999
  var ENV_VAR_REGEX = /\$\{(\w+)\}/g;
1202000
- function substituteEnvVariables(content5, context) {
1202000
+ function substituteEnvVariables(content5, context, options2 = {}) {
1202001
1202001
  if (typeof content5 === "string") {
1202002
1202002
  const transformed2 = content5.replace(ENV_VAR_REGEX, (_substring, envVarName) => {
1202003
+ if (options2.substituteAsEmpty) {
1202004
+ return "";
1202005
+ }
1202003
1202006
  const envVarValue = process.env[envVarName];
1202004
1202007
  if (envVarValue == null) {
1202005
1202008
  context.failAndThrow(`Environment variable ${envVarName} is not defined.`);
@@ -1202011,7 +1202014,7 @@ function substituteEnvVariables(content5, context) {
1202011
1202014
  if (!isPlainObject_default(content5)) {
1202012
1202015
  return content5;
1202013
1202016
  }
1202014
- const transformed = mapValues_default2(content5, (value) => substituteEnvVariables(value, context));
1202017
+ const transformed = mapValues_default2(content5, (value) => substituteEnvVariables(value, context, options2));
1202015
1202018
  return transformed;
1202016
1202019
  }
1202017
1202020
 
@@ -1202033,6 +1202036,7 @@ async function createAndStartJob({ projectConfig, workspace, organization, inter
1202033
1202036
  return job;
1202034
1202037
  }
1202035
1202038
  async function createJob({ projectConfig, workspace, organization, generatorInvocation, version: version3, context, shouldLogS3Url, token, whitelabel, absolutePathToPreview }) {
1202039
+ const isPreview = absolutePathToPreview != null;
1202036
1202040
  const generatorConfig = {
1202037
1202041
  id: generatorInvocation.name,
1202038
1202042
  version: generatorInvocation.version,
@@ -1202040,8 +1202044,10 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
1202040
1202044
  customConfig: generatorInvocation.config,
1202041
1202045
  publishMetadata: generatorInvocation.publishMetadata
1202042
1202046
  };
1202043
- const generatorConfigsWithEnvVarSubstitutions = substituteEnvVariables(generatorConfig, context);
1202044
- const whitelabelWithEnvVarSubstiutions = whitelabel != null ? substituteEnvVariables(whitelabel, context) : void 0;
1202047
+ const generatorConfigsWithEnvVarSubstitutions = substituteEnvVariables(generatorConfig, context, {
1202048
+ substituteAsEmpty: isPreview
1202049
+ });
1202050
+ const whitelabelWithEnvVarSubstiutions = whitelabel != null ? substituteEnvVariables(whitelabel, context, { substituteAsEmpty: isPreview }) : void 0;
1202045
1202051
  const remoteGenerationService = createFiddleService({ token: token.value });
1202046
1202052
  let fernDefinitionMetadata;
1202047
1202053
  if (generatorInvocation.outputMode.type.startsWith("github")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.31.12",
3
+ "version": "0.31.14",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",