@fern-api/fern-api-dev 4.52.0 → 4.52.1-2-g833f965ac3c

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 +24 -12
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -520171,12 +520171,13 @@ function convertSchemaObject(schema2, wrapAsOptional, wrapAsNullable, context3,
520171
520171
  }
520172
520172
  if (schema2.type === "boolean") {
520173
520173
  const literalValue = getExtension(schema2, FernOpenAPIExtension.BOOLEAN_LITERAL);
520174
- if (literalValue != null) {
520174
+ const resolvedLiteral = literalValue ?? getSingleBooleanEnumValue(schema2, blockConstCoercionToLiteral);
520175
+ if (resolvedLiteral != null) {
520175
520176
  return wrapLiteral({
520176
520177
  nameOverride,
520177
520178
  generatedName,
520178
520179
  title: title3,
520179
- literal: LiteralSchemaValue.boolean(literalValue),
520180
+ literal: LiteralSchemaValue.boolean(resolvedLiteral),
520180
520181
  wrapAsOptional,
520181
520182
  wrapAsNullable,
520182
520183
  description,
@@ -520915,6 +520916,15 @@ function convertSchemaObject(schema2, wrapAsOptional, wrapAsNullable, context3,
520915
520916
  });
520916
520917
  }
520917
520918
  }
520919
+ function getSingleBooleanEnumValue(schema2, blockConstCoercionToLiteral) {
520920
+ if (blockConstCoercionToLiteral) {
520921
+ return void 0;
520922
+ }
520923
+ if (schema2.enum != null && schema2.enum.length === 1 && typeof schema2.enum[0] === "boolean") {
520924
+ return schema2.enum[0];
520925
+ }
520926
+ return void 0;
520927
+ }
520918
520928
  function getBooleanFromDefault(defaultValue) {
520919
520929
  if (defaultValue == null) {
520920
520930
  return void 0;
@@ -542888,6 +542898,7 @@ var RESERVED_KEYWORDS = {
542888
542898
  "if",
542889
542899
  "import",
542890
542900
  "interface",
542901
+ "internal",
542891
542902
  "map",
542892
542903
  "package",
542893
542904
  "range",
@@ -602332,7 +602343,7 @@ var AccessTokenPosthogManager = class {
602332
602343
  properties: {
602333
602344
  ...event,
602334
602345
  ...event.properties,
602335
- version: "4.52.0",
602346
+ version: "4.52.1-2-g833f965ac3c",
602336
602347
  usingAccessToken: true
602337
602348
  }
602338
602349
  });
@@ -602383,7 +602394,7 @@ var UserPosthogManager = class {
602383
602394
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
602384
602395
  event: "CLI",
602385
602396
  properties: {
602386
- version: "4.52.0",
602397
+ version: "4.52.1-2-g833f965ac3c",
602387
602398
  ...event,
602388
602399
  ...event.properties,
602389
602400
  usingAccessToken: false,
@@ -826256,7 +826267,7 @@ var import_path54 = __toESM(require("path"), 1);
826256
826267
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
826257
826268
  var LOGS_FOLDER_NAME = "logs";
826258
826269
  function getCliSource() {
826259
- const version7 = "4.52.0";
826270
+ const version7 = "4.52.1-2-g833f965ac3c";
826260
826271
  return `cli@${version7}`;
826261
826272
  }
826262
826273
  var DebugLogger = class {
@@ -837268,7 +837279,7 @@ var LegacyDocsPublisher = class {
837268
837279
  previewId: void 0,
837269
837280
  disableTemplates: void 0,
837270
837281
  skipUpload,
837271
- cliVersion: "4.52.0"
837282
+ cliVersion: "4.52.1-2-g833f965ac3c"
837272
837283
  });
837273
837284
  if (taskContext.getResult() === TaskResult.Failure) {
837274
837285
  return { success: false };
@@ -861431,7 +861442,7 @@ var DynamicSnippetsGeneratorContext2 = class _DynamicSnippetsGeneratorContext ex
861431
861442
  return goExportedFieldName(name2.pascalCase.unsafeName);
861432
861443
  }
861433
861444
  getImportPath(fernFilepath) {
861434
- const parts = fernFilepath.packagePath.map((path97) => path97.pascalCase.unsafeName.toLowerCase());
861445
+ const parts = fernFilepath.packagePath.map((path97) => path97.camelCase.safeName.toLowerCase());
861435
861446
  return [this.rootImportPath, ...parts].join("/");
861436
861447
  }
861437
861448
  getImportPathForRequest(fernFilepath) {
@@ -864662,10 +864673,10 @@ var DynamicSnippetsGeneratorContext3 = class _DynamicSnippetsGeneratorContext ex
864662
864673
  dynamicTypeMapper;
864663
864674
  dynamicTypeLiteralMapper;
864664
864675
  filePropertyMapper;
864665
- constructor({ ir: ir15, config: config5, options: options2 }) {
864676
+ constructor({ ir: ir15, config: config5, options: options2, sharedCustomConfig }) {
864666
864677
  super({ ir: ir15, config: config5, options: options2 });
864667
864678
  this.ir = ir15;
864668
- this.customConfig = BaseJavaCustomConfigSchema.parse(config5.customConfig ?? {});
864679
+ this.customConfig = sharedCustomConfig ?? BaseJavaCustomConfigSchema.parse(config5.customConfig ?? {});
864669
864680
  this.dynamicTypeMapper = new DynamicTypeMapper3({ context: this });
864670
864681
  this.dynamicTypeLiteralMapper = new DynamicTypeLiteralMapper({ context: this });
864671
864682
  this.filePropertyMapper = new FilePropertyMapper3({ context: this });
@@ -864674,7 +864685,8 @@ var DynamicSnippetsGeneratorContext3 = class _DynamicSnippetsGeneratorContext ex
864674
864685
  return new _DynamicSnippetsGeneratorContext({
864675
864686
  ir: this.ir,
864676
864687
  config: this.config,
864677
- options: this.options
864688
+ options: this.options,
864689
+ sharedCustomConfig: this.customConfig
864678
864690
  });
864679
864691
  }
864680
864692
  getClassName(name2) {
@@ -883409,7 +883421,7 @@ var DynamicTypeLiteralMapper6 = class {
883409
883421
  if (typeReference2.value.type === "string") {
883410
883422
  return swift_exports.Expression.enumCaseShorthand(literal_enum_exports.generateEnumCaseLabel(typeReference2.value.value));
883411
883423
  } else if (typeReference2.value.type === "boolean") {
883412
- return swift_exports.Expression.nop();
883424
+ return swift_exports.Expression.boolLiteral(typeReference2.value.value);
883413
883425
  } else {
883414
883426
  assertNever(typeReference2.value);
883415
883427
  break;
@@ -910387,7 +910399,7 @@ var CliContext = class {
910387
910399
  if (false) {
910388
910400
  this.logger.error("CLI_VERSION is not defined");
910389
910401
  }
910390
- return "4.52.0";
910402
+ return "4.52.1-2-g833f965ac3c";
910391
910403
  }
910392
910404
  getCliName() {
910393
910405
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.52.0",
2
+ "version": "4.52.1-2-g833f965ac3c",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",