@fern-api/fern-api-dev 4.51.0 → 4.52.0-2-g08d6be6181f

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 +61 -11
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -496040,7 +496040,8 @@ var CheckConfig = external_exports.object({
496040
496040
  rules: CheckRulesConfig.optional()
496041
496041
  });
496042
496042
  var IntegrationsConfig = external_exports.object({
496043
- intercom: external_exports.string().optional()
496043
+ intercom: external_exports.string().optional(),
496044
+ context7: external_exports.string().optional()
496044
496045
  });
496045
496046
  var ExperimentalConfig = external_exports.object({
496046
496047
  "mdx-components": external_exports.array(external_exports.string()).optional(),
@@ -499085,7 +499086,8 @@ var FooterLinksConfig2 = schemas_exports6.object({
499085
499086
 
499086
499087
  // ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/IntegrationsConfig.js
499087
499088
  var IntegrationsConfig2 = schemas_exports6.object({
499088
- intercom: schemas_exports6.string().optional()
499089
+ intercom: schemas_exports6.string().optional(),
499090
+ context7: schemas_exports6.string().optional()
499089
499091
  });
499090
499092
 
499091
499093
  // ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/JsScriptStrategy.js
@@ -533515,13 +533517,19 @@ async function parseDocsConfiguration({ rawDocsConfiguration, absolutePathToFern
533515
533517
  const cssPromise = convertCssConfig(rawCssConfig, absoluteFilepathToDocsConfig);
533516
533518
  const jsPromise = convertJsConfig(rawJsConfig, absoluteFilepathToDocsConfig);
533517
533519
  const metadataPromise = convertMetadata(rawMetadata, absoluteFilepathToDocsConfig);
533518
- const [navigation, pages, typography, css, js5, metadata] = await Promise.all([
533520
+ const context7FilePromise = parseContext7File({
533521
+ rawPath: rawDocsConfiguration.integrations?.context7,
533522
+ absoluteFilepathToDocsConfig,
533523
+ context: context3
533524
+ });
533525
+ const [navigation, pages, typography, css, js5, metadata, context7File] = await Promise.all([
533519
533526
  convertedNavigationPromise,
533520
533527
  pagesPromise,
533521
533528
  typographyPromise,
533522
533529
  cssPromise,
533523
533530
  jsPromise,
533524
- metadataPromise
533531
+ metadataPromise,
533532
+ context7FilePromise
533525
533533
  ]);
533526
533534
  const resolvedTheme = convertThemeConfig(rawDocsConfiguration.theme);
533527
533535
  const tabsObj = resolvedTheme?.tabs != null && typeof resolvedTheme.tabs === "object" ? resolvedTheme.tabs : void 0;
@@ -533561,6 +533569,7 @@ async function parseDocsConfiguration({ rawDocsConfiguration, absolutePathToFern
533561
533569
  typography,
533562
533570
  layout: convertLayoutConfig(layout, tabsObj?.alignment, tabsObj?.placement),
533563
533571
  settings: convertSettingsConfig(rawDocsConfiguration.settings),
533572
+ context7File,
533564
533573
  theme: resolvedTheme,
533565
533574
  analyticsConfig: {
533566
533575
  ...rawDocsConfiguration.analytics,
@@ -533760,6 +533769,19 @@ function convertSettingsConfig(settings) {
533760
533769
  disableAnalytics: settings.disableAnalytics ?? false
533761
533770
  };
533762
533771
  }
533772
+ async function parseContext7File({ rawPath, absoluteFilepathToDocsConfig, context: context3 }) {
533773
+ if (rawPath == null) {
533774
+ return void 0;
533775
+ }
533776
+ const absolutePath = resolveFilepath(rawPath, absoluteFilepathToDocsConfig);
533777
+ const contents = await (0, import_promises14.readFile)(absolutePath, "utf8");
533778
+ try {
533779
+ JSON.parse(contents);
533780
+ } catch (error50) {
533781
+ context3.failAndThrow(`Invalid JSON in Context7 config file: ${rawPath}`, error50 instanceof Error ? error50.message : String(error50));
533782
+ }
533783
+ return absolutePath;
533784
+ }
533763
533785
  function convertLayoutConfig(layout, themeTabsAlignment, themeTabsPlacement) {
533764
533786
  if (layout == null && themeTabsAlignment == null && themeTabsPlacement == null) {
533765
533787
  return void 0;
@@ -602310,7 +602332,7 @@ var AccessTokenPosthogManager = class {
602310
602332
  properties: {
602311
602333
  ...event,
602312
602334
  ...event.properties,
602313
- version: "4.51.0",
602335
+ version: "4.52.0-2-g08d6be6181f",
602314
602336
  usingAccessToken: true
602315
602337
  }
602316
602338
  });
@@ -602361,7 +602383,7 @@ var UserPosthogManager = class {
602361
602383
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
602362
602384
  event: "CLI",
602363
602385
  properties: {
602364
- version: "4.51.0",
602386
+ version: "4.52.0-2-g08d6be6181f",
602365
602387
  ...event,
602366
602388
  ...event.properties,
602367
602389
  usingAccessToken: false,
@@ -785921,6 +785943,9 @@ async function collectFilesFromDocsConfig({ parsedDocsConfig }) {
785921
785943
  filepaths.add(file4.absolutePath);
785922
785944
  });
785923
785945
  }
785946
+ if (parsedDocsConfig.context7File != null) {
785947
+ filepaths.add(parsedDocsConfig.context7File);
785948
+ }
785924
785949
  if (parsedDocsConfig.pageActions?.options?.custom != null) {
785925
785950
  await Promise.all(parsedDocsConfig.pageActions.options.custom.map(async (customAction) => {
785926
785951
  if (customAction.icon != null) {
@@ -786682,6 +786707,10 @@ var DocsDefinitionResolver = class {
786682
786707
  return url3.pathname;
786683
786708
  }
786684
786709
  async convertDocsConfiguration(root6) {
786710
+ const integrations = this.parsedDocsConfig.integrations != null || this.parsedDocsConfig.context7File != null ? {
786711
+ ...this.parsedDocsConfig.integrations,
786712
+ context7: this.getFileId(this.parsedDocsConfig.context7File)
786713
+ } : void 0;
786685
786714
  const config5 = {
786686
786715
  aiChatConfig: this.parsedDocsConfig.aiChatConfig != null ? {
786687
786716
  model: this.parsedDocsConfig.aiChatConfig.model,
@@ -786736,7 +786765,7 @@ var DocsDefinitionResolver = class {
786736
786765
  js: this.convertJavascriptConfiguration(),
786737
786766
  metadata: this.convertMetadata(),
786738
786767
  redirects: this.parsedDocsConfig.redirects,
786739
- integrations: this.parsedDocsConfig.integrations,
786768
+ integrations,
786740
786769
  footerLinks: this.parsedDocsConfig.footerLinks?.map((footerLink) => ({
786741
786770
  ...footerLink,
786742
786771
  value: DocsV1Write_exports.Url(footerLink.value)
@@ -798690,7 +798719,18 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
798690
798719
  willBeUploaded: false
798691
798720
  });
798692
798721
  },
798693
- integrations: noop2,
798722
+ integrations: async (integrations) => {
798723
+ if (integrations?.context7 == null) {
798724
+ return;
798725
+ }
798726
+ await visitFilepath({
798727
+ absoluteFilepathToConfiguration,
798728
+ rawUnresolvedFilepath: integrations.context7,
798729
+ visitor,
798730
+ nodePath: ["integrations", "context7"],
798731
+ willBeUploaded: true
798732
+ });
798733
+ },
798694
798734
  js: async (js5) => {
798695
798735
  if (js5 == null) {
798696
798736
  return;
@@ -826216,7 +826256,7 @@ var import_path54 = __toESM(require("path"), 1);
826216
826256
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
826217
826257
  var LOGS_FOLDER_NAME = "logs";
826218
826258
  function getCliSource() {
826219
- const version7 = "4.51.0";
826259
+ const version7 = "4.52.0-2-g08d6be6181f";
826220
826260
  return `cli@${version7}`;
826221
826261
  }
826222
826262
  var DebugLogger = class {
@@ -834921,6 +834961,16 @@ var definitions6 = {
834921
834961
  type: "null"
834922
834962
  }
834923
834963
  ]
834964
+ },
834965
+ context7: {
834966
+ oneOf: [
834967
+ {
834968
+ type: "string"
834969
+ },
834970
+ {
834971
+ type: "null"
834972
+ }
834973
+ ]
834924
834974
  }
834925
834975
  },
834926
834976
  additionalProperties: false
@@ -837218,7 +837268,7 @@ var LegacyDocsPublisher = class {
837218
837268
  previewId: void 0,
837219
837269
  disableTemplates: void 0,
837220
837270
  skipUpload,
837221
- cliVersion: "4.51.0"
837271
+ cliVersion: "4.52.0-2-g08d6be6181f"
837222
837272
  });
837223
837273
  if (taskContext.getResult() === TaskResult.Failure) {
837224
837274
  return { success: false };
@@ -910337,7 +910387,7 @@ var CliContext = class {
910337
910387
  if (false) {
910338
910388
  this.logger.error("CLI_VERSION is not defined");
910339
910389
  }
910340
- return "4.51.0";
910390
+ return "4.52.0-2-g08d6be6181f";
910341
910391
  }
910342
910392
  getCliName() {
910343
910393
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.51.0",
2
+ "version": "4.52.0-2-g08d6be6181f",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",