fern-api 0.16.39 → 0.16.40
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 +31 -12
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -735888,7 +735888,8 @@ var GeneratorInvocationSchema = z.strictObject({
|
|
|
735888
735888
|
version: z.string(),
|
|
735889
735889
|
output: z.optional(GeneratorOutputSchema),
|
|
735890
735890
|
github: z.optional(GithubConfigurationSchema),
|
|
735891
|
-
config: z.unknown()
|
|
735891
|
+
config: z.unknown(),
|
|
735892
|
+
"disable-examples": z.optional(z.boolean())
|
|
735892
735893
|
});
|
|
735893
735894
|
|
|
735894
735895
|
// pnp:/home/circleci/project/packages/cli/config-management/generators-configuration/lib/schemas/GeneratorGroupSchema.js
|
|
@@ -735943,6 +735944,7 @@ async function convertGenerator({ absolutePathToGeneratorsConfiguration, generat
|
|
|
735943
735944
|
version: generator.version,
|
|
735944
735945
|
config: generator.config,
|
|
735945
735946
|
outputMode: await convertOutputMode({ absolutePathToGeneratorsConfiguration, generator }),
|
|
735947
|
+
disableExamples: generator["disable-examples"] ?? false,
|
|
735946
735948
|
absolutePathToLocalOutput: ((_a2 = generator.output) == null ? void 0 : _a2.location) === "local-file-system" ? resolve(dirname(absolutePathToGeneratorsConfiguration), generator.output.path) : void 0,
|
|
735947
735949
|
language: getLanguageFromGeneratorName(generator.name)
|
|
735948
735950
|
};
|
|
@@ -739558,7 +739560,7 @@ var AccessTokenPosthogManager = class {
|
|
|
739558
739560
|
properties: {
|
|
739559
739561
|
...event,
|
|
739560
739562
|
...event.properties,
|
|
739561
|
-
version: "0.16.
|
|
739563
|
+
version: "0.16.40",
|
|
739562
739564
|
usingAccessToken: true
|
|
739563
739565
|
}
|
|
739564
739566
|
});
|
|
@@ -739620,7 +739622,7 @@ var UserPosthogManager = class {
|
|
|
739620
739622
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
739621
739623
|
event: "CLI",
|
|
739622
739624
|
properties: {
|
|
739623
|
-
version: "0.16.
|
|
739625
|
+
version: "0.16.40",
|
|
739624
739626
|
...event,
|
|
739625
739627
|
...event.properties
|
|
739626
739628
|
}
|
|
@@ -764974,10 +764976,10 @@ var CliContext = class {
|
|
|
764974
764976
|
return "fern-api";
|
|
764975
764977
|
}
|
|
764976
764978
|
getPackageVersion() {
|
|
764977
|
-
if ("0.16.
|
|
764979
|
+
if ("0.16.40" == null) {
|
|
764978
764980
|
this.logger.error("CLI_VERSION is not defined");
|
|
764979
764981
|
}
|
|
764980
|
-
return "0.16.
|
|
764982
|
+
return "0.16.40";
|
|
764981
764983
|
}
|
|
764982
764984
|
getCliName() {
|
|
764983
764985
|
if ("fern" == null) {
|
|
@@ -770070,7 +770072,7 @@ var VariableResolverImpl = _VariableResolverImpl;
|
|
|
770070
770072
|
__publicField(VariableResolverImpl, "VARIABLE_PREFIX", "$");
|
|
770071
770073
|
|
|
770072
770074
|
// pnp:/home/circleci/project/packages/cli/generation/ir-generator/lib/generateIntermediateRepresentation.js
|
|
770073
|
-
async function generateIntermediateRepresentation({ workspace, generationLanguage, audiences }) {
|
|
770075
|
+
async function generateIntermediateRepresentation({ workspace, generationLanguage, disableExamples, audiences }) {
|
|
770074
770076
|
const casingsGenerator = constructCasingsGenerator(generationLanguage);
|
|
770075
770077
|
const irGraph = new IrGraph(audiences);
|
|
770076
770078
|
const rootApiFileContext = constructRootApiFileContext({
|
|
@@ -770150,6 +770152,9 @@ async function generateIntermediateRepresentation({ workspace, generationLanguag
|
|
|
770150
770152
|
workspace
|
|
770151
770153
|
});
|
|
770152
770154
|
const convertedTypeDeclaration = convertedTypeDeclarationWithFilepaths.typeDeclaration;
|
|
770155
|
+
if (disableExamples) {
|
|
770156
|
+
convertedTypeDeclaration.examples = [];
|
|
770157
|
+
}
|
|
770153
770158
|
const subpackageFilepaths = convertedTypeDeclarationWithFilepaths.descendantFilepaths;
|
|
770154
770159
|
const typeId = IdGenerator.generateTypeId(convertedTypeDeclaration.name);
|
|
770155
770160
|
intermediateRepresentation.types[typeId] = convertedTypeDeclaration;
|
|
@@ -770204,6 +770209,9 @@ async function generateIntermediateRepresentation({ workspace, generationLanguag
|
|
|
770204
770209
|
packageTreeGenerator.addService(serviceId, convertedHttpService);
|
|
770205
770210
|
const convertedEndpoints = {};
|
|
770206
770211
|
convertedHttpService.endpoints.forEach((httpEndpoint) => {
|
|
770212
|
+
if (disableExamples) {
|
|
770213
|
+
httpEndpoint.examples = [];
|
|
770214
|
+
}
|
|
770207
770215
|
const rawEndpointSchema = service.endpoints[httpEndpoint.name.originalName];
|
|
770208
770216
|
irGraph.addEndpoint(convertedHttpService, httpEndpoint, rawEndpointSchema);
|
|
770209
770217
|
convertedEndpoints[httpEndpoint.name.originalName] = httpEndpoint;
|
|
@@ -770393,7 +770401,8 @@ async function registerApi({ organization, workspace, context, token, audiences,
|
|
|
770393
770401
|
const ir = await generateIntermediateRepresentation({
|
|
770394
770402
|
workspace,
|
|
770395
770403
|
audiences,
|
|
770396
|
-
generationLanguage: void 0
|
|
770404
|
+
generationLanguage: void 0,
|
|
770405
|
+
disableExamples: false
|
|
770397
770406
|
});
|
|
770398
770407
|
const fdrService = createFdrService({
|
|
770399
770408
|
token: token.value
|
|
@@ -772987,12 +772996,14 @@ async function generateIrForFernWorkspace({
|
|
|
772987
772996
|
workspace,
|
|
772988
772997
|
context,
|
|
772989
772998
|
generationLanguage,
|
|
772999
|
+
disableExamples,
|
|
772990
773000
|
audiences
|
|
772991
773001
|
}) {
|
|
772992
773002
|
await validateAPIWorkspaceAndLogIssues({ workspace, context, logWarnings: false });
|
|
772993
773003
|
return generateIntermediateRepresentation({
|
|
772994
773004
|
workspace,
|
|
772995
773005
|
generationLanguage,
|
|
773006
|
+
disableExamples,
|
|
772996
773007
|
audiences
|
|
772997
773008
|
});
|
|
772998
773009
|
}
|
|
@@ -773012,7 +773023,8 @@ async function generateFdrApiDefinitionForWorkspaces({
|
|
|
773012
773023
|
workspace: fernWorkspace,
|
|
773013
773024
|
context,
|
|
773014
773025
|
generationLanguage: void 0,
|
|
773015
|
-
audiences
|
|
773026
|
+
audiences,
|
|
773027
|
+
disableExamples: false
|
|
773016
773028
|
});
|
|
773017
773029
|
const apiDefinition = convertIrToFdrApi(intermediateRepresentation, {});
|
|
773018
773030
|
const resolvedOutputFilePath = import_path29.default.resolve(outputFilepath);
|
|
@@ -778804,6 +778816,7 @@ async function generateIrForWorkspaces({
|
|
|
778804
778816
|
workspace: fernWorkspace,
|
|
778805
778817
|
context,
|
|
778806
778818
|
generationLanguage,
|
|
778819
|
+
disableExamples: false,
|
|
778807
778820
|
audiences,
|
|
778808
778821
|
version: version3
|
|
778809
778822
|
});
|
|
@@ -778822,13 +778835,15 @@ async function getIntermediateRepresentation({
|
|
|
778822
778835
|
context,
|
|
778823
778836
|
generationLanguage,
|
|
778824
778837
|
audiences,
|
|
778838
|
+
disableExamples,
|
|
778825
778839
|
version: version3
|
|
778826
778840
|
}) {
|
|
778827
778841
|
const intermediateRepresentation = await generateIrForFernWorkspace({
|
|
778828
778842
|
workspace,
|
|
778829
778843
|
context,
|
|
778830
778844
|
generationLanguage,
|
|
778831
|
-
audiences
|
|
778845
|
+
audiences,
|
|
778846
|
+
disableExamples
|
|
778832
778847
|
});
|
|
778833
778848
|
if (version3 == null) {
|
|
778834
778849
|
return IrSerialization2.IntermediateRepresentation.jsonOrThrow(intermediateRepresentation, {
|
|
@@ -779331,7 +779346,8 @@ async function writeIrToFile({ workspace, audiences, generatorInvocation, worksp
|
|
|
779331
779346
|
const intermediateRepresentation = await generateIntermediateRepresentation({
|
|
779332
779347
|
workspace,
|
|
779333
779348
|
audiences,
|
|
779334
|
-
generationLanguage: generatorInvocation.language
|
|
779349
|
+
generationLanguage: generatorInvocation.language,
|
|
779350
|
+
disableExamples: generatorInvocation.disableExamples
|
|
779335
779351
|
});
|
|
779336
779352
|
context.logger.debug("Generated IR");
|
|
779337
779353
|
const migratedIntermediateRepresentation = irVersionOverride != null ? await migrateIntermediateRepresentationThroughVersion({
|
|
@@ -779668,6 +779684,7 @@ async function runRemoteGenerationForGenerator({ organization, workspace, intera
|
|
|
779668
779684
|
const intermediateRepresentation = await generateIntermediateRepresentation({
|
|
779669
779685
|
workspace,
|
|
779670
779686
|
generationLanguage: generatorInvocation.language,
|
|
779687
|
+
disableExamples: generatorInvocation.disableExamples,
|
|
779671
779688
|
audiences
|
|
779672
779689
|
});
|
|
779673
779690
|
const job = await createAndStartJob({
|
|
@@ -806517,7 +806534,8 @@ async function mockServer({
|
|
|
806517
806534
|
const ir = await generateIntermediateRepresentation({
|
|
806518
806535
|
workspace: fernWorkspace,
|
|
806519
806536
|
audiences: { type: "all" },
|
|
806520
|
-
generationLanguage: void 0
|
|
806537
|
+
generationLanguage: void 0,
|
|
806538
|
+
disableExamples: false
|
|
806521
806539
|
});
|
|
806522
806540
|
await runMockServer({
|
|
806523
806541
|
context,
|
|
@@ -806592,7 +806610,8 @@ var ReferencedAPICollector = class {
|
|
|
806592
806610
|
const ir = await generateIntermediateRepresentation({
|
|
806593
806611
|
workspace: fernWorkspace,
|
|
806594
806612
|
audiences: api.audiences,
|
|
806595
|
-
generationLanguage: void 0
|
|
806613
|
+
generationLanguage: void 0,
|
|
806614
|
+
disableExamples: false
|
|
806596
806615
|
});
|
|
806597
806616
|
const apiDefinition = convertIrToFdrApi(ir, {});
|
|
806598
806617
|
const dbApiDefinition = (0, import_fdr_sdk4.convertAPIDefinitionToDb)(apiDefinition, "", new import_fdr_sdk4.SDKSnippetHolder({
|