fern-api 0.39.3 → 0.39.5

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 +99 -9
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -25872,7 +25872,10 @@ var init_AnalyticsConfig = __esm({
25872
25872
  "use strict";
25873
25873
  init_core();
25874
25874
  AnalyticsConfig = schemas_exports.object({
25875
- segment: schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).SegmentConfig).optional()
25875
+ segment: schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).SegmentConfig).optional(),
25876
+ fullstory: schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).FullStoryAnalyticsConfig).optional(),
25877
+ intercom: schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).IntercomConfig).optional(),
25878
+ posthog: schemas_exports.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization(), serialization_exports))).PostHogConfig).optional()
25876
25879
  });
25877
25880
  }
25878
25881
  });
@@ -25889,6 +25892,44 @@ var init_SegmentConfig = __esm({
25889
25892
  }
25890
25893
  });
25891
25894
 
25895
+ // ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/FullStoryAnalyticsConfig.js
25896
+ var FullStoryAnalyticsConfig;
25897
+ var init_FullStoryAnalyticsConfig = __esm({
25898
+ "../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/FullStoryAnalyticsConfig.js"() {
25899
+ "use strict";
25900
+ init_core();
25901
+ FullStoryAnalyticsConfig = schemas_exports.object({
25902
+ orgId: schemas_exports.property("org-id", schemas_exports.string())
25903
+ });
25904
+ }
25905
+ });
25906
+
25907
+ // ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/IntercomConfig.js
25908
+ var IntercomConfig;
25909
+ var init_IntercomConfig = __esm({
25910
+ "../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/IntercomConfig.js"() {
25911
+ "use strict";
25912
+ init_core();
25913
+ IntercomConfig = schemas_exports.object({
25914
+ appId: schemas_exports.property("app-id", schemas_exports.string()),
25915
+ apiBase: schemas_exports.property("api-base", schemas_exports.string().optional())
25916
+ });
25917
+ }
25918
+ });
25919
+
25920
+ // ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/PostHogConfig.js
25921
+ var PostHogConfig;
25922
+ var init_PostHogConfig = __esm({
25923
+ "../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/PostHogConfig.js"() {
25924
+ "use strict";
25925
+ init_core();
25926
+ PostHogConfig = schemas_exports.object({
25927
+ apiKey: schemas_exports.property("api-key", schemas_exports.string()),
25928
+ endpoint: schemas_exports.string().optional()
25929
+ });
25930
+ }
25931
+ });
25932
+
25892
25933
  // ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/DocsConfiguration.js
25893
25934
  var DocsConfiguration;
25894
25935
  var init_DocsConfiguration = __esm({
@@ -26851,6 +26892,9 @@ var init_types = __esm({
26851
26892
  init_ProgrammingLanguage();
26852
26893
  init_AnalyticsConfig();
26853
26894
  init_SegmentConfig();
26895
+ init_FullStoryAnalyticsConfig();
26896
+ init_IntercomConfig();
26897
+ init_PostHogConfig();
26854
26898
  init_DocsConfiguration();
26855
26899
  init_TabId();
26856
26900
  init_TabConfig();
@@ -26953,9 +26997,11 @@ __export(docs_exports2, {
26953
26997
  FontStyle: () => FontStyle2,
26954
26998
  FontWeight: () => FontWeight,
26955
26999
  FooterLinksConfig: () => FooterLinksConfig,
27000
+ FullStoryAnalyticsConfig: () => FullStoryAnalyticsConfig,
26956
27001
  GithubEditThisPageConfig: () => GithubEditThisPageConfig,
26957
27002
  HeaderPosition: () => HeaderPosition2,
26958
27003
  IntegrationsConfig: () => IntegrationsConfig,
27004
+ IntercomConfig: () => IntercomConfig,
26959
27005
  JsConfig: () => JsConfig,
26960
27006
  JsConfigOptions: () => JsConfigOptions,
26961
27007
  JsFileConfig: () => JsFileConfig,
@@ -26974,6 +27020,7 @@ __export(docs_exports2, {
26974
27020
  PageConfiguration: () => PageConfiguration,
26975
27021
  PlaygroundButtonSettings: () => PlaygroundButtonSettings,
26976
27022
  PlaygroundSettings: () => PlaygroundSettings,
27023
+ PostHogConfig: () => PostHogConfig,
26977
27024
  ProgrammingLanguage: () => ProgrammingLanguage2,
26978
27025
  RedirectConfig: () => RedirectConfig,
26979
27026
  SearchbarPlacement: () => SearchbarPlacement2,
@@ -27042,9 +27089,11 @@ __export(serialization_exports, {
27042
27089
  FontStyle: () => FontStyle2,
27043
27090
  FontWeight: () => FontWeight,
27044
27091
  FooterLinksConfig: () => FooterLinksConfig,
27092
+ FullStoryAnalyticsConfig: () => FullStoryAnalyticsConfig,
27045
27093
  GithubEditThisPageConfig: () => GithubEditThisPageConfig,
27046
27094
  HeaderPosition: () => HeaderPosition2,
27047
27095
  IntegrationsConfig: () => IntegrationsConfig,
27096
+ IntercomConfig: () => IntercomConfig,
27048
27097
  JsConfig: () => JsConfig,
27049
27098
  JsConfigOptions: () => JsConfigOptions,
27050
27099
  JsFileConfig: () => JsFileConfig,
@@ -27063,6 +27112,7 @@ __export(serialization_exports, {
27063
27112
  PageConfiguration: () => PageConfiguration,
27064
27113
  PlaygroundButtonSettings: () => PlaygroundButtonSettings,
27065
27114
  PlaygroundSettings: () => PlaygroundSettings,
27115
+ PostHogConfig: () => PostHogConfig,
27066
27116
  ProgrammingLanguage: () => ProgrammingLanguage2,
27067
27117
  RedirectConfig: () => RedirectConfig,
27068
27118
  SearchbarPlacement: () => SearchbarPlacement2,
@@ -1192575,7 +1192625,7 @@ var AccessTokenPosthogManager = class {
1192575
1192625
  properties: {
1192576
1192626
  ...event,
1192577
1192627
  ...event.properties,
1192578
- version: "0.39.3",
1192628
+ version: "0.39.5",
1192579
1192629
  usingAccessToken: true
1192580
1192630
  }
1192581
1192631
  });
@@ -1192637,7 +1192687,7 @@ var UserPosthogManager = class {
1192637
1192687
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1192638
1192688
  event: "CLI",
1192639
1192689
  properties: {
1192640
- version: "0.39.3",
1192690
+ version: "0.39.5",
1192641
1192691
  ...event,
1192642
1192692
  ...event.properties
1192643
1192693
  }
@@ -1212048,6 +1212098,13 @@ var AbstractAsyncAPIV2ParserContext = class {
1212048
1212098
  this.options = options2;
1212049
1212099
  this.namespace = namespace;
1212050
1212100
  }
1212101
+ resolveTags(operationTags, fallback2) {
1212102
+ if (this.namespace == null && operationTags == null && fallback2 != null) {
1212103
+ return [fallback2];
1212104
+ }
1212105
+ const tags = this.namespace ? [this.namespace] : [];
1212106
+ return tags.concat(operationTags ?? []);
1212107
+ }
1212051
1212108
  resolveSchemaReference(schema2) {
1212052
1212109
  var _a6;
1212053
1212110
  if (this.document.components == null || this.document.components.schemas == null || !schema2.$ref.startsWith(SCHEMA_REFERENCE_PREFIX)) {
@@ -1213723,7 +1213780,7 @@ function getFernExamples(channel) {
1213723
1213780
 
1213724
1213781
  // ../openapi-parser/lib/asyncapi/parse.js
1213725
1213782
  function parseAsyncAPI({ document: document4, taskContext, options: options2, source, asyncApiOptions, namespace }) {
1213726
- var _a6, _b4, _c4, _d2;
1213783
+ var _a6, _b4, _c4, _d2, _e, _f;
1213727
1213784
  const breadcrumbs = [];
1213728
1213785
  if (namespace != null) {
1213729
1213786
  breadcrumbs.push(namespace);
@@ -1213862,7 +1213919,7 @@ function parseAsyncAPI({ document: document4, taskContext, options: options2, so
1213862
1213919
  examples.push(autogenExample);
1213863
1213920
  }
1213864
1213921
  }
1213865
- const tag = (_d2 = document4.tags) == null ? void 0 : _d2[0];
1213922
+ const tags = ((_e = (_d2 = document4.tags) == null ? void 0 : _d2[0]) == null ? void 0 : _e.name) != null ? [(_f = document4.tags) == null ? void 0 : _f[0].name] : void 0;
1213866
1213923
  parsedChannel = {
1213867
1213924
  handshake: {
1213868
1213925
  headers: headers.map((header) => {
@@ -1213885,7 +1213942,7 @@ function parseAsyncAPI({ document: document4, taskContext, options: options2, so
1213885
1213942
  };
1213886
1213943
  })
1213887
1213944
  },
1213888
- groupName: (tag == null ? void 0 : tag.name) != null ? [tag.name] : ["Websocket"],
1213945
+ groupName: context.resolveTags(tags, "Websocket"),
1213889
1213946
  publish: publishSchema != null ? convertSchemaWithExampleToSchema(publishSchema) : publishSchema,
1213890
1213947
  subscribe: subscribeSchema != null ? convertSchemaWithExampleToSchema(subscribeSchema) : subscribeSchema,
1213891
1213948
  summary: getExtension(channel, FernAsyncAPIExtension.FERN_DISPLAY_NAME),
@@ -1222741,10 +1222798,10 @@ var CliContext = class {
1222741
1222798
  return "fern-api";
1222742
1222799
  }
1222743
1222800
  getPackageVersion() {
1222744
- if ("0.39.3" == null) {
1222801
+ if ("0.39.5" == null) {
1222745
1222802
  this.logger.error("CLI_VERSION is not defined");
1222746
1222803
  }
1222747
- return "0.39.3";
1222804
+ return "0.39.5";
1222748
1222805
  }
1222749
1222806
  getCliName() {
1222750
1222807
  if ("fern" == null) {
@@ -1292299,6 +1292356,38 @@ function getExistingEnviromentIds(availableEnvironmentIds) {
1292299
1292356
  return `Existing enviroments include ${availableEnvironmentIds.join(", ")}.`;
1292300
1292357
  }
1292301
1292358
 
1292359
+ // ../yaml/docs-validator/lib/rules/valid-docs-endpoints/valid-docs-endpoints.js
1292360
+ var ValidDocsEndpoints = {
1292361
+ name: "valid-docs-endpoints",
1292362
+ create: () => ({
1292363
+ file: async ({ config }) => {
1292364
+ var _a6, _b4;
1292365
+ if (!config.analytics || !Object.keys(config.analytics).length) {
1292366
+ return [];
1292367
+ }
1292368
+ const endpoints = [
1292369
+ [(_a6 = config.analytics.intercom) == null ? void 0 : _a6.apiBase, "Intercom API Base"],
1292370
+ [(_b4 = config.analytics.posthog) == null ? void 0 : _b4.endpoint, "Posthog Host Endpoint"]
1292371
+ ];
1292372
+ const violations = endpoints.filter(([endpoint]) => endpoint && !validEndpoint(endpoint)).map(([endpoint, name2]) => {
1292373
+ return {
1292374
+ severity: "warning",
1292375
+ message: `${name2} <${endpoint}> is malformed. Make sure it includes a protocol (e.g. 'https://')!`
1292376
+ };
1292377
+ });
1292378
+ return violations;
1292379
+ }
1292380
+ })
1292381
+ };
1292382
+ function validEndpoint(endpoint) {
1292383
+ try {
1292384
+ const url = new URL(endpoint);
1292385
+ return Boolean(url.protocol);
1292386
+ } catch (e) {
1292387
+ return false;
1292388
+ }
1292389
+ }
1292390
+
1292302
1292391
  // ../yaml/docs-validator/lib/rules/valid-file-types/valid-file-types.js
1292303
1292392
  var import_chardet = __toESM(require_lib28(), 1);
1292304
1292393
 
@@ -1294621,7 +1294710,8 @@ function getAllRules2() {
1294621
1294710
  AccentColorContrastRule,
1294622
1294711
  ValidMarkdownLinks,
1294623
1294712
  ValidFileTypes,
1294624
- PlaygroundEnvironmentsExistRule
1294713
+ PlaygroundEnvironmentsExistRule,
1294714
+ ValidDocsEndpoints
1294625
1294715
  ];
1294626
1294716
  }
1294627
1294717
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.39.3",
3
+ "version": "0.39.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",