@fern-api/fern-api-dev 5.89.6 → 5.90.1

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 +136 -20
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -32839,19 +32839,57 @@ var init_mediaType = __esm({
32839
32839
 
32840
32840
  // ../../commons/core-utils/lib/mergeWithOverrides.js
32841
32841
  function mergeWithOverrides({ data: data2, overrides, allowNullKeys }) {
32842
- const merged = mergeWith_default(data2, mergeWith_default, overrides, (obj, src) => Array.isArray(obj) && Array.isArray(src) ? src.every((element4) => typeof element4 === "object") && obj.every((element4) => typeof element4 === "object") ? (
32843
- // nested arrays of objects are merged
32844
- void 0
32845
- ) : (
32846
- // nested arrays of primitives are replaced
32847
- [...src]
32848
- ) : void 0);
32842
+ const merged = mergeWith_default(data2, mergeWith_default, overrides, overridesCustomizer);
32849
32843
  const filtered = omitDeepBy(merged, isNull_default, {
32850
32844
  ancestorKeys: allowNullKeys ?? [],
32851
32845
  allowOmissionCursor: false
32852
32846
  });
32853
32847
  return filtered;
32854
32848
  }
32849
+ function overridesCustomizer(obj, src) {
32850
+ if (!Array.isArray(obj) || !Array.isArray(src)) {
32851
+ return void 0;
32852
+ }
32853
+ if (!src.every((element4) => typeof element4 === "object") || !obj.every((element4) => typeof element4 === "object")) {
32854
+ return [...src];
32855
+ }
32856
+ return mergeParametersByIdentity(obj, src) ?? void 0;
32857
+ }
32858
+ function isParameterEntry(value2) {
32859
+ if (!isPlainObject_default(value2)) {
32860
+ return false;
32861
+ }
32862
+ const { name: name2, in: location2 } = value2;
32863
+ return typeof name2 === "string" && typeof location2 === "string";
32864
+ }
32865
+ function identityOf(entry) {
32866
+ return `${entry.in}:${entry.name}`;
32867
+ }
32868
+ function mergeParametersByIdentity(obj, src) {
32869
+ if (!obj.every(isParameterEntry) || !src.every(isParameterEntry)) {
32870
+ return void 0;
32871
+ }
32872
+ const unmatchedIndices = /* @__PURE__ */ new Map();
32873
+ obj.forEach((entry, index3) => {
32874
+ const indices = unmatchedIndices.get(identityOf(entry));
32875
+ if (indices != null) {
32876
+ indices.push(index3);
32877
+ } else {
32878
+ unmatchedIndices.set(identityOf(entry), [index3]);
32879
+ }
32880
+ });
32881
+ const merged = [...obj];
32882
+ for (const override of src) {
32883
+ const identity5 = identityOf(override);
32884
+ const matchIndex = unmatchedIndices.get(identity5)?.shift();
32885
+ if (matchIndex == null) {
32886
+ merged.push(override);
32887
+ continue;
32888
+ }
32889
+ merged[matchIndex] = mergeWith_default(obj[matchIndex], override, overridesCustomizer);
32890
+ }
32891
+ return merged;
32892
+ }
32855
32893
  var omitDeepBy;
32856
32894
  var init_mergeWithOverrides = __esm({
32857
32895
  "../../commons/core-utils/lib/mergeWithOverrides.js"() {
@@ -68308,6 +68346,13 @@ var init_NugetPublishTarget = __esm({
68308
68346
  }
68309
68347
  });
68310
68348
 
68349
+ // ../../ir-sdk/lib/sdk/api/resources/publish/types/PackagistPublishTarget.js
68350
+ var init_PackagistPublishTarget = __esm({
68351
+ "../../ir-sdk/lib/sdk/api/resources/publish/types/PackagistPublishTarget.js"() {
68352
+ "use strict";
68353
+ }
68354
+ });
68355
+
68311
68356
  // ../../ir-sdk/lib/sdk/api/resources/publish/types/PostmanPublishTarget.js
68312
68357
  var init_PostmanPublishTarget = __esm({
68313
68358
  "../../ir-sdk/lib/sdk/api/resources/publish/types/PostmanPublishTarget.js"() {
@@ -68444,6 +68489,15 @@ var init_PublishTarget = __esm({
68444
68489
  }
68445
68490
  };
68446
68491
  },
68492
+ packagist: (value2) => {
68493
+ return {
68494
+ ...value2,
68495
+ type: "packagist",
68496
+ _visit: function(visitor) {
68497
+ return PublishTarget._visit(this, visitor);
68498
+ }
68499
+ };
68500
+ },
68447
68501
  _visit: (value2, visitor) => {
68448
68502
  switch (value2.type) {
68449
68503
  case "postman":
@@ -68462,6 +68516,8 @@ var init_PublishTarget = __esm({
68462
68516
  return visitor.nuget(value2);
68463
68517
  case "rubygems":
68464
68518
  return visitor.rubygems(value2);
68519
+ case "packagist":
68520
+ return visitor.packagist(value2);
68465
68521
  default:
68466
68522
  return visitor._other(value2);
68467
68523
  }
@@ -68496,6 +68552,7 @@ var init_types65 = __esm({
68496
68552
  init_MavenPublishTarget();
68497
68553
  init_NpmPublishTarget();
68498
68554
  init_NugetPublishTarget();
68555
+ init_PackagistPublishTarget();
68499
68556
  init_PostmanPublishTarget();
68500
68557
  init_PublishingConfig();
68501
68558
  init_PublishTarget();
@@ -80247,6 +80304,19 @@ var init_NugetPublishTarget2 = __esm({
80247
80304
  }
80248
80305
  });
80249
80306
 
80307
+ // ../../ir-sdk/lib/sdk/serialization/resources/publish/types/PackagistPublishTarget.js
80308
+ var PackagistPublishTarget;
80309
+ var init_PackagistPublishTarget2 = __esm({
80310
+ "../../ir-sdk/lib/sdk/serialization/resources/publish/types/PackagistPublishTarget.js"() {
80311
+ "use strict";
80312
+ init_core2();
80313
+ PackagistPublishTarget = schemas_exports3.objectWithoutOptionalProperties({
80314
+ version: schemas_exports3.string().optional(),
80315
+ packageName: schemas_exports3.string().optional()
80316
+ });
80317
+ }
80318
+ });
80319
+
80250
80320
  // ../../ir-sdk/lib/sdk/serialization/resources/publish/types/PostmanPublishTarget.js
80251
80321
  var PostmanPublishTarget;
80252
80322
  var init_PostmanPublishTarget2 = __esm({
@@ -80299,6 +80369,7 @@ var init_PublishTarget2 = __esm({
80299
80369
  init_MavenPublishTarget2();
80300
80370
  init_NpmPublishTarget2();
80301
80371
  init_NugetPublishTarget2();
80372
+ init_PackagistPublishTarget2();
80302
80373
  init_PostmanPublishTarget2();
80303
80374
  init_PypiPublishTarget2();
80304
80375
  init_RubyGemsPublishTarget2();
@@ -80310,7 +80381,8 @@ var init_PublishTarget2 = __esm({
80310
80381
  crates: CratesPublishTarget,
80311
80382
  go: GoPublishTarget,
80312
80383
  nuget: NugetPublishTarget,
80313
- rubygems: RubyGemsPublishTarget
80384
+ rubygems: RubyGemsPublishTarget,
80385
+ packagist: PackagistPublishTarget
80314
80386
  }).transform({
80315
80387
  transform: (value2) => {
80316
80388
  switch (value2.type) {
@@ -80330,6 +80402,8 @@ var init_PublishTarget2 = __esm({
80330
80402
  return PublishTarget.nuget(value2);
80331
80403
  case "rubygems":
80332
80404
  return PublishTarget.rubygems(value2);
80405
+ case "packagist":
80406
+ return PublishTarget.packagist(value2);
80333
80407
  default:
80334
80408
  return value2;
80335
80409
  }
@@ -82374,6 +82448,7 @@ var init_types94 = __esm({
82374
82448
  init_MavenPublishTarget2();
82375
82449
  init_NpmPublishTarget2();
82376
82450
  init_NugetPublishTarget2();
82451
+ init_PackagistPublishTarget2();
82377
82452
  init_PostmanPublishTarget2();
82378
82453
  init_PublishingConfig2();
82379
82454
  init_PublishTarget2();
@@ -82393,6 +82468,7 @@ __export(publish_exports2, {
82393
82468
  MavenPublishTarget: () => MavenPublishTarget,
82394
82469
  NpmPublishTarget: () => NpmPublishTarget,
82395
82470
  NugetPublishTarget: () => NugetPublishTarget,
82471
+ PackagistPublishTarget: () => PackagistPublishTarget,
82396
82472
  PostmanPublishTarget: () => PostmanPublishTarget,
82397
82473
  PublishTarget: () => PublishTarget2,
82398
82474
  PublishingConfig: () => PublishingConfig2,
@@ -83680,6 +83756,7 @@ __export(serialization_exports2, {
83680
83756
  OffsetPagination: () => OffsetPagination,
83681
83757
  Package: () => Package,
83682
83758
  PackageNavigationConfig: () => PackageNavigationConfig,
83759
+ PackagistPublishTarget: () => PackagistPublishTarget,
83683
83760
  Pagination: () => Pagination3,
83684
83761
  PathPagination: () => PathPagination,
83685
83762
  PathParameter: () => PathParameter,
@@ -103237,6 +103314,21 @@ function getFilesystemPublishTarget({ generatorInvocation, version: version7, us
103237
103314
  });
103238
103315
  context3.logger.debug(`Created RubyGemsPublishTarget: version ${version7} package name: ${packageName}`);
103239
103316
  return publishTarget;
103317
+ } else if (generatorInvocation.language === "php") {
103318
+ const phpPackageName = packageName ?? (() => {
103319
+ const config5 = generatorInvocation.raw?.config;
103320
+ if (typeof config5 !== "object" || config5 === null) {
103321
+ return void 0;
103322
+ }
103323
+ const configPackageName = config5.packageName;
103324
+ return typeof configPackageName === "string" ? configPackageName : void 0;
103325
+ })();
103326
+ const publishTarget = PublishTarget.packagist({
103327
+ version: version7,
103328
+ packageName: phpPackageName
103329
+ });
103330
+ context3.logger.debug(`Created PackagistPublishTarget: version ${version7} package name: ${phpPackageName}`);
103331
+ return publishTarget;
103240
103332
  } else if (generatorInvocation.language === "csharp") {
103241
103333
  if (userProvidedVersion != null) {
103242
103334
  const csharpPackageName = packageName ?? (typeof generatorInvocation.raw?.config === "object" && generatorInvocation.raw?.config !== null ? generatorInvocation.raw.config["package-id"] : void 0);
@@ -118352,7 +118444,8 @@ var init_DocsYmlSchemas = __esm({
118352
118444
  });
118353
118445
  GitLibraryInputSchema = external_exports.object({
118354
118446
  git: external_exports.string(),
118355
- subpath: external_exports.string().optional()
118447
+ subpath: external_exports.string().optional(),
118448
+ ref: external_exports.string().optional()
118356
118449
  });
118357
118450
  PathLibraryInputSchema = external_exports.object({
118358
118451
  path: external_exports.string()
@@ -123729,7 +123822,8 @@ var init_GitLibraryInputSchema2 = __esm({
123729
123822
  init_core5();
123730
123823
  GitLibraryInputSchema2 = schemas_exports6.object({
123731
123824
  git: schemas_exports6.string(),
123732
- subpath: schemas_exports6.string().optional()
123825
+ subpath: schemas_exports6.string().optional(),
123826
+ ref: schemas_exports6.string().optional()
123733
123827
  });
123734
123828
  }
123735
123829
  });
@@ -165758,7 +165852,7 @@ function convertParameters({ path: path120, httpMethod, parameters: parameters2,
165758
165852
  const convertedParameter = {
165759
165853
  name: resolvedParameter.name,
165760
165854
  schema,
165761
- description: resolvedParameter.description,
165855
+ description: getParameterDescription(resolvedParameter),
165762
165856
  parameterNameOverride: getParameterName(resolvedParameter),
165763
165857
  availability,
165764
165858
  source: source2,
@@ -165787,6 +165881,15 @@ function convertParameters({ path: path120, httpMethod, parameters: parameters2,
165787
165881
  }
165788
165882
  return convertedParameters;
165789
165883
  }
165884
+ function getParameterDescription(parameter6) {
165885
+ if (parameter6.description != null) {
165886
+ return parameter6.description;
165887
+ }
165888
+ if (parameter6.schema == null || isReferenceObject(parameter6.schema)) {
165889
+ return void 0;
165890
+ }
165891
+ return parameter6.schema.description;
165892
+ }
165790
165893
  function getExplodeForQueryParameter(parameter6) {
165791
165894
  const style2 = parameter6.style ?? "form";
165792
165895
  const explode = parameter6.explode;
@@ -235585,7 +235688,7 @@ function parseLibrariesConfiguration(libraries) {
235585
235688
  }
235586
235689
  const result = {};
235587
235690
  for (const [name2, config5] of Object.entries(libraries)) {
235588
- const input3 = isGitLibraryInput(config5.input) ? { type: "git", git: config5.input.git, subpath: config5.input.subpath } : { type: "path", path: config5.input.path };
235691
+ const input3 = isGitLibraryInput(config5.input) ? { type: "git", git: config5.input.git, subpath: config5.input.subpath, ref: config5.input.ref } : { type: "path", path: config5.input.path };
235589
235692
  result[name2] = {
235590
235693
  input: input3,
235591
235694
  output: {
@@ -694451,7 +694554,7 @@ var AccessTokenPosthogManager = class {
694451
694554
  properties: {
694452
694555
  ...event,
694453
694556
  ...event.properties,
694454
- version: "5.89.6",
694557
+ version: "5.90.1",
694455
694558
  usingAccessToken: true,
694456
694559
  ...getRunIdProperties()
694457
694560
  }
@@ -694517,7 +694620,7 @@ var UserPosthogManager = class {
694517
694620
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
694518
694621
  event: "CLI",
694519
694622
  properties: {
694520
- version: "5.89.6",
694623
+ version: "5.90.1",
694521
694624
  ...event,
694522
694625
  ...event.properties,
694523
694626
  usingAccessToken: false,
@@ -875647,7 +875750,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
875647
875750
  var LOGS_FOLDER_NAME = "logs";
875648
875751
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
875649
875752
  function getCliSource() {
875650
- const version7 = "5.89.6";
875753
+ const version7 = "5.90.1";
875651
875754
  return `cli@${version7}`;
875652
875755
  }
875653
875756
  var DebugLogger = class {
@@ -896164,13 +896267,14 @@ async function generateIrRemotely({ client: client3, name: name2, config: config
896164
896267
  }
896165
896268
  const gitInput = config5.input;
896166
896269
  const jobId = await wrapStep({
896167
- message: `Library '${name2}': starting generation from ${gitInput.git}`,
896270
+ message: `Library '${name2}': starting generation from ${gitInput.git}${gitInput.ref != null ? ` (ref: ${gitInput.ref})` : ""}`,
896168
896271
  operation: () => startGeneration(client3, {
896169
896272
  name: name2,
896170
896273
  orgId,
896171
896274
  githubUrl: gitInput.git,
896172
896275
  language,
896173
896276
  packagePath: gitInput.subpath,
896277
+ ref: gitInput.ref,
896174
896278
  doxyfileContent
896175
896279
  })
896176
896280
  });
@@ -896205,7 +896309,8 @@ async function startGeneration(client3, opts) {
896205
896309
  githubUrl: opts.githubUrl,
896206
896310
  language: opts.language,
896207
896311
  config: {
896208
- branch: void 0,
896312
+ // FDR's library-docs API accepts any git ref (branch, tag, or SHA) via `branch`.
896313
+ branch: opts.ref,
896209
896314
  packagePath: opts.packagePath,
896210
896315
  title: opts.name,
896211
896316
  slug: opts.name,
@@ -898369,6 +898474,17 @@ var definitions6 = {
898369
898474
  }
898370
898475
  ],
898371
898476
  description: "Optional path within the repository to the library source.\nExample: django/core"
898477
+ },
898478
+ ref: {
898479
+ oneOf: [
898480
+ {
898481
+ type: "string"
898482
+ },
898483
+ {
898484
+ type: "null"
898485
+ }
898486
+ ],
898487
+ description: "Git ref (branch, tag, or commit SHA) to check out.\nDefaults to the repository's default branch when omitted.\nExample: feature/my-fix"
898372
898488
  }
898373
898489
  },
898374
898490
  required: [
@@ -908357,7 +908473,7 @@ var LegacyDocsPublisher = class {
908357
908473
  previewId,
908358
908474
  disableTemplates: void 0,
908359
908475
  skipUpload,
908360
- cliVersion: "5.89.6",
908476
+ cliVersion: "5.90.1",
908361
908477
  loginCommand: "fern auth login"
908362
908478
  });
908363
908479
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -975265,7 +975381,7 @@ function getAutomationContextFromEnv() {
975265
975381
  config_branch: process.env.FERN_CONFIG_BRANCH,
975266
975382
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
975267
975383
  trigger: process.env.GITHUB_EVENT_NAME,
975268
- cli_version: "5.89.6"
975384
+ cli_version: "5.90.1"
975269
975385
  };
975270
975386
  }
975271
975387
  function isAutomationMode() {
@@ -976097,7 +976213,7 @@ var CliContext = class _CliContext {
976097
976213
  if (false) {
976098
976214
  this.logger.error("CLI_VERSION is not defined");
976099
976215
  }
976100
- return "5.89.6";
976216
+ return "5.90.1";
976101
976217
  }
976102
976218
  getCliName() {
976103
976219
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.89.6",
2
+ "version": "5.90.1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",