@fern-api/fern-api-dev 4.65.2-2-g86685bdab73 → 4.65.3-2-gc801697ea62

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 +109 -34
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -16361,6 +16361,7 @@ var require_lib = __commonJS({
16361
16361
  // ../../commons/core-utils/lib/titleCase.js
16362
16362
  function titleCase(name2) {
16363
16363
  name2 = name2.replace(/([a-z])([A-Z])/g, "$1 $2");
16364
+ name2 = name2.replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
16364
16365
  name2 = name2.replace(/_/g, " ");
16365
16366
  name2 = name2.replace(/-/g, " ");
16366
16367
  const titleCased = (0, import_title.default)(name2, { special: SPECIAL_TOKENS });
@@ -232024,7 +232025,20 @@ var init_GraphQLConverter = __esm({
232024
232025
  } finally {
232025
232026
  this.processingTypes.delete(typeName);
232026
232027
  }
232027
- } else if (type8 instanceof GraphQLObjectType || type8 instanceof GraphQLInterfaceType) {
232028
+ } else if (type8 instanceof GraphQLInterfaceType) {
232029
+ this.processingTypes.add(typeName);
232030
+ try {
232031
+ this.types[typeId] = {
232032
+ name: this.getNamespacedTypeName(typeName),
232033
+ shape: this.convertInterfaceTypeDefinition(type8),
232034
+ displayName: void 0,
232035
+ description: type8.description ?? void 0,
232036
+ availability: void 0
232037
+ };
232038
+ } finally {
232039
+ this.processingTypes.delete(typeName);
232040
+ }
232041
+ } else if (type8 instanceof GraphQLObjectType) {
232028
232042
  this.processingTypes.add(typeName);
232029
232043
  try {
232030
232044
  this.types[typeId] = {
@@ -232294,16 +232308,60 @@ var init_GraphQLConverter = __esm({
232294
232308
  }
232295
232309
  convertObjectTypeDefinition(type8) {
232296
232310
  const fields = type8.getFields();
232297
- const properties7 = [];
232298
- for (const [fieldName, field5] of Object.entries(fields)) {
232299
- properties7.push({
232300
- key: FdrAPI_exports.PropertyKey(fieldName),
232301
- valueType: this.convertOutputType(field5.type),
232302
- description: field5.description ?? void 0,
232303
- availability: void 0,
232304
- propertyAccess: void 0
232305
- });
232311
+ const properties7 = Object.entries(fields).map(([fieldName, field5]) => ({
232312
+ key: FdrAPI_exports.PropertyKey(fieldName),
232313
+ valueType: this.convertOutputType(field5.type),
232314
+ description: field5.description ?? void 0,
232315
+ availability: void 0,
232316
+ propertyAccess: void 0
232317
+ }));
232318
+ const interfaces = type8.getInterfaces();
232319
+ const extendsIds = interfaces.filter((iface) => {
232320
+ if (!this.schema) {
232321
+ return true;
232322
+ }
232323
+ const implementations = this.schema.getPossibleTypes(iface);
232324
+ return implementations.length === 0;
232325
+ }).map((iface) => this.getNamespacedTypeId(iface.name));
232326
+ return {
232327
+ type: "object",
232328
+ extends: extendsIds,
232329
+ properties: properties7,
232330
+ extraProperties: void 0
232331
+ };
232332
+ }
232333
+ convertInterfaceTypeDefinition(type8) {
232334
+ if (!this.schema) {
232335
+ return this.convertInterfaceAsObject(type8);
232336
+ }
232337
+ const implementations = this.schema.getPossibleTypes(type8);
232338
+ if (implementations.length === 0) {
232339
+ return this.convertInterfaceAsObject(type8);
232306
232340
  }
232341
+ return {
232342
+ type: "undiscriminatedUnion",
232343
+ variants: implementations.map((impl) => ({
232344
+ typeName: impl.name,
232345
+ displayName: impl.name,
232346
+ type: {
232347
+ type: "id",
232348
+ value: this.getNamespacedTypeId(impl.name),
232349
+ default: void 0
232350
+ },
232351
+ description: impl.description ?? void 0,
232352
+ availability: void 0
232353
+ }))
232354
+ };
232355
+ }
232356
+ convertInterfaceAsObject(type8) {
232357
+ const fields = type8.getFields();
232358
+ const properties7 = Object.entries(fields).map(([fieldName, field5]) => ({
232359
+ key: FdrAPI_exports.PropertyKey(fieldName),
232360
+ valueType: this.convertOutputType(field5.type),
232361
+ description: field5.description ?? void 0,
232362
+ availability: void 0,
232363
+ propertyAccess: void 0
232364
+ }));
232307
232365
  return {
232308
232366
  type: "object",
232309
232367
  extends: [],
@@ -232313,16 +232371,13 @@ var init_GraphQLConverter = __esm({
232313
232371
  }
232314
232372
  convertInputObjectTypeDefinition(type8) {
232315
232373
  const fields = type8.getFields();
232316
- const properties7 = [];
232317
- for (const [fieldName, field5] of Object.entries(fields)) {
232318
- properties7.push({
232319
- key: FdrAPI_exports.PropertyKey(fieldName),
232320
- valueType: this.convertInputType(field5.type),
232321
- description: field5.description ?? void 0,
232322
- availability: void 0,
232323
- propertyAccess: void 0
232324
- });
232325
- }
232374
+ const properties7 = Object.entries(fields).map(([fieldName, field5]) => ({
232375
+ key: FdrAPI_exports.PropertyKey(fieldName),
232376
+ valueType: this.convertInputType(field5.type),
232377
+ description: field5.description ?? void 0,
232378
+ availability: void 0,
232379
+ propertyAccess: void 0
232380
+ }));
232326
232381
  return {
232327
232382
  type: "object",
232328
232383
  extends: [],
@@ -604230,7 +604285,7 @@ var AccessTokenPosthogManager = class {
604230
604285
  properties: {
604231
604286
  ...event,
604232
604287
  ...event.properties,
604233
- version: "4.65.2-2-g86685bdab73",
604288
+ version: "4.65.3-2-gc801697ea62",
604234
604289
  usingAccessToken: true
604235
604290
  }
604236
604291
  });
@@ -604281,7 +604336,7 @@ var UserPosthogManager = class {
604281
604336
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
604282
604337
  event: "CLI",
604283
604338
  properties: {
604284
- version: "4.65.2-2-g86685bdab73",
604339
+ version: "4.65.3-2-gc801697ea62",
604285
604340
  ...event,
604286
604341
  ...event.properties,
604287
604342
  usingAccessToken: false,
@@ -796359,7 +796414,7 @@ var ApiReferenceNodeConverter = class {
796359
796414
  const relativeFilePath = `tag-${subpackageName}.md`;
796360
796415
  const virtualAbsolutePath = AbsoluteFilePath2.of(`/${relativeFilePath}`);
796361
796416
  const pageId = navigation_exports2.V1.PageId(relativeFilePath);
796362
- const markdownContent = `# ${titleCase3(tagInfo.id.replace(/[_-]/g, " "))}
796417
+ const markdownContent = `# ${titleCase(tagInfo.id.replace(/[_-]/g, " "))}
796363
796418
 
796364
796419
  ${tagInfo.description}`;
796365
796420
  this.#tagDescriptionContent.set(virtualAbsolutePath, markdownContent);
@@ -796428,7 +796483,7 @@ ${tagInfo.description}`;
796428
796483
  id: subpackageNodeId,
796429
796484
  type: "apiPackage",
796430
796485
  children: convertedItems,
796431
- title: pkg2.title ?? (isSubpackage3(subpackage) ? subpackage.displayName ?? titleCase3(subpackage.name) : this.apiSection.title),
796486
+ title: pkg2.title ?? (isSubpackage3(subpackage) ? subpackage.displayName ?? titleCase(subpackage.name) : this.apiSection.title),
796432
796487
  slug: slug.get(),
796433
796488
  icon: this.resolveIconFileId(pkg2.icon),
796434
796489
  hidden: this.hideChildren || pkg2.hidden,
@@ -796546,7 +796601,7 @@ ${tagInfo.description}`;
796546
796601
  id: subpackageNodeId,
796547
796602
  type: "apiPackage",
796548
796603
  children: [],
796549
- title: isSubpackage3(subpackage) ? subpackage.displayName ?? titleCase3(subpackage.name) : this.apiSection.title,
796604
+ title: isSubpackage3(subpackage) ? subpackage.displayName ?? titleCase(subpackage.name) : this.apiSection.title,
796550
796605
  slug: slug.get(),
796551
796606
  icon: void 0,
796552
796607
  hidden: this.hideChildren,
@@ -796896,7 +796951,7 @@ ${tagInfo.description}`;
796896
796951
  type: "webhook",
796897
796952
  webhookId,
796898
796953
  method: webhook.method,
796899
- title: webhook.name ?? titleCase3(webhook.id),
796954
+ title: webhook.name ?? titleCase(webhook.id),
796900
796955
  slug: parentSlug.apply(webhook).get(),
796901
796956
  icon: void 0,
796902
796957
  hidden: this.hideChildren,
@@ -796930,7 +796985,7 @@ ${tagInfo.description}`;
796930
796985
  id: navigation_exports2.V1.NodeId(`${this.apiDefinitionId}:${subpackageId}`),
796931
796986
  type: "apiPackage",
796932
796987
  children: subpackageChildren,
796933
- title: isSubpackage3(subpackage) ? subpackage.displayName ?? titleCase3(subpackage.name) : this.apiSection.title,
796988
+ title: isSubpackage3(subpackage) ? subpackage.displayName ?? titleCase(subpackage.name) : this.apiSection.title,
796934
796989
  slug: slug.get(),
796935
796990
  icon: void 0,
796936
796991
  hidden: this.hideChildren,
@@ -797053,7 +797108,7 @@ ${tagInfo.description}`;
797053
797108
  id: this.#idgen.get(`${this.apiDefinitionId}:graphql:namespace:${namespace}`),
797054
797109
  type: "apiPackage",
797055
797110
  children: namespaceChildren,
797056
- title: titleCase3(namespace),
797111
+ title: titleCase(namespace),
797057
797112
  slug: namespaceSlug.get(),
797058
797113
  icon: void 0,
797059
797114
  hidden: this.hideChildren,
@@ -836224,7 +836279,7 @@ function withBasepath2(source2, basePath) {
836224
836279
  }
836225
836280
 
836226
836281
  // ../yaml/docs-validator/lib/rules/valid-markdown-link/check-if-pathname-exists.js
836227
- async function checkIfPathnameExists({ pathname, markdown, absoluteFilepath, workspaceAbsoluteFilePath, pageSlugs, absoluteFilePathsToSlugs, redirects = [], baseUrl }) {
836282
+ async function checkIfPathnameExists({ pathname, markdown, absoluteFilepath, workspaceAbsoluteFilePath, pageSlugs, absoluteFilePathsToSlugs, redirects = [], baseUrl, versionSlugs = [], productSlugs = [] }) {
836228
836283
  pathname = removeTrailingSlash3(pathname);
836229
836284
  const slugs = absoluteFilepath != null ? absoluteFilePathsToSlugs.get(absoluteFilepath) ?? [] : [];
836230
836285
  if (pathname.trim() === "") {
@@ -836246,6 +836301,20 @@ async function checkIfPathnameExists({ pathname, markdown, absoluteFilepath, wor
836246
836301
  if (markdown && pageSlugs.has(removeLeadingSlash(redirectedPath))) {
836247
836302
  return true;
836248
836303
  }
836304
+ const contextSlugs = [...versionSlugs, ...productSlugs];
836305
+ if (markdown && contextSlugs.length > 0) {
836306
+ for (const slug of slugs) {
836307
+ for (const contextSlug of contextSlugs) {
836308
+ if (slug.startsWith(contextSlug + "/") || slug === contextSlug) {
836309
+ const prefixedPath = `${contextSlug}/${removeLeadingSlash(redirectedPath)}`;
836310
+ if (pageSlugs.has(prefixedPath)) {
836311
+ return true;
836312
+ }
836313
+ break;
836314
+ }
836315
+ }
836316
+ }
836317
+ }
836249
836318
  const absolutePath = join2(workspaceAbsoluteFilePath, RelativeFilePath2.of(removeLeadingSlash(pathname)));
836250
836319
  if (await doesPathExist(absolutePath, "file")) {
836251
836320
  return true;
@@ -836564,6 +836633,8 @@ var ValidMarkdownLinks = {
836564
836633
  slugs.push(slug);
836565
836634
  absoluteFilePathsToSlugs.set(absoluteFilePath, slugs);
836566
836635
  });
836636
+ const versionSlugs = collector.getVersionNodes().map((v23) => v23.slug);
836637
+ const productSlugs = collector.getProductNodes().filter(navigation_exports2.isInternalProductNode).map((p10) => p10.slug);
836567
836638
  const specialDocPages = ["/llms-full.txt", "/llms.txt"];
836568
836639
  for (const specialPage of specialDocPages) {
836569
836640
  const pageWithBasePath = baseUrl.basePath ? `${removeLeadingSlash(baseUrl.basePath)}${specialPage}` : removeLeadingSlash(specialPage);
@@ -836594,7 +836665,9 @@ var ValidMarkdownLinks = {
836594
836665
  pageSlugs: visitableSlugs,
836595
836666
  absoluteFilePathsToSlugs,
836596
836667
  redirects: workspace.config.redirects,
836597
- baseUrl
836668
+ baseUrl,
836669
+ versionSlugs,
836670
+ productSlugs
836598
836671
  });
836599
836672
  if (exists2 === true) {
836600
836673
  return [];
@@ -836654,7 +836727,9 @@ var ValidMarkdownLinks = {
836654
836727
  pageSlugs: visitableSlugs,
836655
836728
  absoluteFilePathsToSlugs,
836656
836729
  redirects: workspace.config.redirects,
836657
- baseUrl
836730
+ baseUrl,
836731
+ versionSlugs,
836732
+ productSlugs
836658
836733
  });
836659
836734
  if (exists2 === true) {
836660
836735
  return [];
@@ -841262,7 +841337,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
841262
841337
  var LOGS_FOLDER_NAME = "logs";
841263
841338
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
841264
841339
  function getCliSource() {
841265
- const version7 = "4.65.2-2-g86685bdab73";
841340
+ const version7 = "4.65.3-2-gc801697ea62";
841266
841341
  return `cli@${version7}`;
841267
841342
  }
841268
841343
  var DebugLogger = class {
@@ -852460,7 +852535,7 @@ var LegacyDocsPublisher = class {
852460
852535
  previewId,
852461
852536
  disableTemplates: void 0,
852462
852537
  skipUpload,
852463
- cliVersion: "4.65.2-2-g86685bdab73"
852538
+ cliVersion: "4.65.3-2-gc801697ea62"
852464
852539
  });
852465
852540
  if (taskContext.getResult() === TaskResult.Failure) {
852466
852541
  return { success: false };
@@ -926049,7 +926124,7 @@ var CliContext = class {
926049
926124
  if (false) {
926050
926125
  this.logger.error("CLI_VERSION is not defined");
926051
926126
  }
926052
- return "4.65.2-2-g86685bdab73";
926127
+ return "4.65.3-2-gc801697ea62";
926053
926128
  }
926054
926129
  getCliName() {
926055
926130
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.65.2-2-g86685bdab73",
2
+ "version": "4.65.3-2-gc801697ea62",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",