fern-api 0.18.3-rc1 → 0.18.3
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.
- package/bundle.cjs +38 -7
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -797715,7 +797715,7 @@ var AccessTokenPosthogManager = class {
|
|
|
797715
797715
|
properties: {
|
|
797716
797716
|
...event,
|
|
797717
797717
|
...event.properties,
|
|
797718
|
-
version: "0.18.3
|
|
797718
|
+
version: "0.18.3",
|
|
797719
797719
|
usingAccessToken: true
|
|
797720
797720
|
}
|
|
797721
797721
|
});
|
|
@@ -797777,7 +797777,7 @@ var UserPosthogManager = class {
|
|
|
797777
797777
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
797778
797778
|
event: "CLI",
|
|
797779
797779
|
properties: {
|
|
797780
|
-
version: "0.18.3
|
|
797780
|
+
version: "0.18.3",
|
|
797781
797781
|
...event,
|
|
797782
797782
|
...event.properties
|
|
797783
797783
|
}
|
|
@@ -816597,10 +816597,15 @@ function maybeGetFastApiEndpointLocation({ operationId, tag, path: path33, metho
|
|
|
816597
816597
|
|
|
816598
816598
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-to-fern/lib/buildServices.js
|
|
816599
816599
|
function buildServices(context) {
|
|
816600
|
+
const sdkGroups = /* @__PURE__ */ new Set();
|
|
816600
816601
|
const { endpoints, tags } = context.ir;
|
|
816601
816602
|
let schemaIdsToExclude = [];
|
|
816602
816603
|
for (const endpoint of endpoints) {
|
|
816603
816604
|
const { endpointId, file, tag } = getEndpointLocation(endpoint);
|
|
816605
|
+
const sdkGroup = file.split(".")[0];
|
|
816606
|
+
if (sdkGroup != null) {
|
|
816607
|
+
sdkGroups.add(sdkGroup);
|
|
816608
|
+
}
|
|
816604
816609
|
const irTag = tag == null ? void 0 : tags.tagsById[tag];
|
|
816605
816610
|
const convertedEndpoint = buildEndpoint({
|
|
816606
816611
|
context,
|
|
@@ -816617,7 +816622,7 @@ function buildServices(context) {
|
|
|
816617
816622
|
docs: (irTag == null ? void 0 : irTag.description) ?? void 0
|
|
816618
816623
|
});
|
|
816619
816624
|
}
|
|
816620
|
-
return { schemaIdsToExclude };
|
|
816625
|
+
return { schemaIdsToExclude, sdkGroups };
|
|
816621
816626
|
}
|
|
816622
816627
|
|
|
816623
816628
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-to-fern/lib/buildVariables.js
|
|
@@ -816765,7 +816770,7 @@ function buildFernDefinition(context) {
|
|
|
816765
816770
|
if (context.ir.hasEndpointsMarkedInternal) {
|
|
816766
816771
|
context.builder.addAudience(EXTERNAL_AUDIENCE);
|
|
816767
816772
|
}
|
|
816768
|
-
const { schemaIdsToExclude } = buildServices(context);
|
|
816773
|
+
const { schemaIdsToExclude, sdkGroups } = buildServices(context);
|
|
816769
816774
|
buildWebhooks(context);
|
|
816770
816775
|
for (const channel of context.ir.channel) {
|
|
816771
816776
|
const declarationFile = RelativeFilePath.of(`${channel.groupName.join("/")}.yml`);
|
|
@@ -816805,6 +816810,16 @@ function buildFernDefinition(context) {
|
|
|
816805
816810
|
schema: errorDeclaration
|
|
816806
816811
|
});
|
|
816807
816812
|
}
|
|
816813
|
+
if (context.ir.tags.orderedTagIds != null && context.ir.tags.orderedTagIds.length > 0) {
|
|
816814
|
+
const containsValidTagIds = context.ir.tags.orderedTagIds.every((tagId) => {
|
|
816815
|
+
return sdkGroups.has(tagId);
|
|
816816
|
+
});
|
|
816817
|
+
if (containsValidTagIds) {
|
|
816818
|
+
context.builder.addNavigation({
|
|
816819
|
+
navigation: context.ir.tags.orderedTagIds
|
|
816820
|
+
});
|
|
816821
|
+
}
|
|
816822
|
+
}
|
|
816808
816823
|
return context.builder.build();
|
|
816809
816824
|
}
|
|
816810
816825
|
|
|
@@ -816827,6 +816842,9 @@ var FernDefinitionBuilderImpl = class {
|
|
|
816827
816842
|
this.rootApiFile["display-name"] = ir.title;
|
|
816828
816843
|
}
|
|
816829
816844
|
}
|
|
816845
|
+
addNavigation({ navigation }) {
|
|
816846
|
+
this.packageMarkerFile.navigation = navigation;
|
|
816847
|
+
}
|
|
816830
816848
|
setServiceInfo(file, { displayName, docs }) {
|
|
816831
816849
|
const fernFile = this.getOrCreateFile(file);
|
|
816832
816850
|
if (fernFile.service == null) {
|
|
@@ -824382,10 +824400,10 @@ var CliContext = class {
|
|
|
824382
824400
|
return "fern-api";
|
|
824383
824401
|
}
|
|
824384
824402
|
getPackageVersion() {
|
|
824385
|
-
if ("0.18.3
|
|
824403
|
+
if ("0.18.3" == null) {
|
|
824386
824404
|
this.logger.error("CLI_VERSION is not defined");
|
|
824387
824405
|
}
|
|
824388
|
-
return "0.18.3
|
|
824406
|
+
return "0.18.3";
|
|
824389
824407
|
}
|
|
824390
824408
|
getCliName() {
|
|
824391
824409
|
if ("fern" == null) {
|
|
@@ -830784,7 +830802,7 @@ var ComplexQueryParamTypeDetector = class {
|
|
|
830784
830802
|
return false;
|
|
830785
830803
|
}
|
|
830786
830804
|
visited.add(type2.rawName);
|
|
830787
|
-
if (isRawDiscriminatedUnionDefinition(type2.declaration)
|
|
830805
|
+
if (isRawDiscriminatedUnionDefinition(type2.declaration)) {
|
|
830788
830806
|
return true;
|
|
830789
830807
|
}
|
|
830790
830808
|
if (isRawEnumDefinition(type2.declaration)) {
|
|
@@ -830798,6 +830816,19 @@ var ComplexQueryParamTypeDetector = class {
|
|
|
830798
830816
|
visited
|
|
830799
830817
|
});
|
|
830800
830818
|
}
|
|
830819
|
+
if (isRawUndiscriminatedUnionDefinition(type2.declaration)) {
|
|
830820
|
+
for (const variant of type2.declaration.union) {
|
|
830821
|
+
const variantType = typeof variant === "string" ? variant : variant.type;
|
|
830822
|
+
const isVariantComplex = this.isTypeComplex(variantType, {
|
|
830823
|
+
contents: file.definitionFile,
|
|
830824
|
+
relativeFilepath: file.relativeFilepath
|
|
830825
|
+
});
|
|
830826
|
+
if (isVariantComplex != null && isVariantComplex) {
|
|
830827
|
+
return true;
|
|
830828
|
+
}
|
|
830829
|
+
}
|
|
830830
|
+
return false;
|
|
830831
|
+
}
|
|
830801
830832
|
assertNever(type2.declaration);
|
|
830802
830833
|
}
|
|
830803
830834
|
objectHasComplexProperties({ typeName, objectDeclaration, file, visited }) {
|