fern-api 0.16.38 → 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 +50 -14
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -735809,6 +735809,14 @@ var NpmOutputLocationSchema = z.strictObject({
|
|
|
735809
735809
|
token: z.optional(z.string())
|
|
735810
735810
|
});
|
|
735811
735811
|
|
|
735812
|
+
// pnp:/home/circleci/project/packages/cli/config-management/generators-configuration/lib/schemas/NugetOutputLocationSchema.js
|
|
735813
|
+
var NugetOutputLocationSchema = z.strictObject({
|
|
735814
|
+
location: z.literal("nuget"),
|
|
735815
|
+
url: z.optional(z.string()),
|
|
735816
|
+
"package-name": z.string(),
|
|
735817
|
+
"api-key": z.optional(z.string())
|
|
735818
|
+
});
|
|
735819
|
+
|
|
735812
735820
|
// pnp:/home/circleci/project/packages/cli/config-management/generators-configuration/lib/schemas/PostmanOutputLocationSchema.js
|
|
735813
735821
|
var PostmanOutputLocationSchema = z.strictObject({
|
|
735814
735822
|
location: z.literal("postman"),
|
|
@@ -735832,7 +735840,8 @@ var GeneratorOutputSchema = z.discriminatedUnion("location", [
|
|
|
735832
735840
|
MavenOutputLocationSchema,
|
|
735833
735841
|
PypiOutputLocationSchema,
|
|
735834
735842
|
PostmanOutputLocationSchema,
|
|
735835
|
-
LocalFileSystemOutputLocationSchema
|
|
735843
|
+
LocalFileSystemOutputLocationSchema,
|
|
735844
|
+
NugetOutputLocationSchema
|
|
735836
735845
|
]);
|
|
735837
735846
|
|
|
735838
735847
|
// pnp:/home/circleci/project/packages/cli/config-management/generators-configuration/lib/schemas/GithubLicenseCustomSchema.js
|
|
@@ -735879,7 +735888,8 @@ var GeneratorInvocationSchema = z.strictObject({
|
|
|
735879
735888
|
version: z.string(),
|
|
735880
735889
|
output: z.optional(GeneratorOutputSchema),
|
|
735881
735890
|
github: z.optional(GithubConfigurationSchema),
|
|
735882
|
-
config: z.unknown()
|
|
735891
|
+
config: z.unknown(),
|
|
735892
|
+
"disable-examples": z.optional(z.boolean())
|
|
735883
735893
|
});
|
|
735884
735894
|
|
|
735885
735895
|
// pnp:/home/circleci/project/packages/cli/config-management/generators-configuration/lib/schemas/GeneratorGroupSchema.js
|
|
@@ -735934,6 +735944,7 @@ async function convertGenerator({ absolutePathToGeneratorsConfiguration, generat
|
|
|
735934
735944
|
version: generator.version,
|
|
735935
735945
|
config: generator.config,
|
|
735936
735946
|
outputMode: await convertOutputMode({ absolutePathToGeneratorsConfiguration, generator }),
|
|
735947
|
+
disableExamples: generator["disable-examples"] ?? false,
|
|
735937
735948
|
absolutePathToLocalOutput: ((_a2 = generator.output) == null ? void 0 : _a2.location) === "local-file-system" ? resolve(dirname(absolutePathToGeneratorsConfiguration), generator.output.path) : void 0,
|
|
735938
735949
|
language: getLanguageFromGeneratorName(generator.name)
|
|
735939
735950
|
};
|
|
@@ -736008,6 +736019,8 @@ async function convertOutputMode({ absolutePathToGeneratorsConfiguration, genera
|
|
|
736008
736019
|
password: generator.output.token ?? generator.output.password ?? "",
|
|
736009
736020
|
coordinate: generator.output["package-name"]
|
|
736010
736021
|
}));
|
|
736022
|
+
case "nuget":
|
|
736023
|
+
throw new Error("Nuget is not supported");
|
|
736011
736024
|
default:
|
|
736012
736025
|
assertNever(generator.output);
|
|
736013
736026
|
}
|
|
@@ -736069,6 +736082,8 @@ function getGithubPublishInfo(output) {
|
|
|
736069
736082
|
password: output.password ?? ""
|
|
736070
736083
|
}
|
|
736071
736084
|
});
|
|
736085
|
+
case "nuget":
|
|
736086
|
+
throw new Error("Nuget is not supported");
|
|
736072
736087
|
default:
|
|
736073
736088
|
assertNever(output);
|
|
736074
736089
|
}
|
|
@@ -739545,7 +739560,7 @@ var AccessTokenPosthogManager = class {
|
|
|
739545
739560
|
properties: {
|
|
739546
739561
|
...event,
|
|
739547
739562
|
...event.properties,
|
|
739548
|
-
version: "0.16.
|
|
739563
|
+
version: "0.16.40",
|
|
739549
739564
|
usingAccessToken: true
|
|
739550
739565
|
}
|
|
739551
739566
|
});
|
|
@@ -739607,7 +739622,7 @@ var UserPosthogManager = class {
|
|
|
739607
739622
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
739608
739623
|
event: "CLI",
|
|
739609
739624
|
properties: {
|
|
739610
|
-
version: "0.16.
|
|
739625
|
+
version: "0.16.40",
|
|
739611
739626
|
...event,
|
|
739612
739627
|
...event.properties
|
|
739613
739628
|
}
|
|
@@ -764961,10 +764976,10 @@ var CliContext = class {
|
|
|
764961
764976
|
return "fern-api";
|
|
764962
764977
|
}
|
|
764963
764978
|
getPackageVersion() {
|
|
764964
|
-
if ("0.16.
|
|
764979
|
+
if ("0.16.40" == null) {
|
|
764965
764980
|
this.logger.error("CLI_VERSION is not defined");
|
|
764966
764981
|
}
|
|
764967
|
-
return "0.16.
|
|
764982
|
+
return "0.16.40";
|
|
764968
764983
|
}
|
|
764969
764984
|
getCliName() {
|
|
764970
764985
|
if ("fern" == null) {
|
|
@@ -765185,7 +765200,11 @@ var GENERATOR_INVOCATIONS = {
|
|
|
765185
765200
|
}
|
|
765186
765201
|
},
|
|
765187
765202
|
[GeneratorName.PYTHON_SDK]: {
|
|
765188
|
-
version: "0.
|
|
765203
|
+
version: "0.8.1",
|
|
765204
|
+
output: {
|
|
765205
|
+
location: "local-file-system",
|
|
765206
|
+
path: "../generated/python"
|
|
765207
|
+
}
|
|
765189
765208
|
},
|
|
765190
765209
|
[GeneratorName.GO_FIBER]: {
|
|
765191
765210
|
version: "0.9.0"
|
|
@@ -770053,7 +770072,7 @@ var VariableResolverImpl = _VariableResolverImpl;
|
|
|
770053
770072
|
__publicField(VariableResolverImpl, "VARIABLE_PREFIX", "$");
|
|
770054
770073
|
|
|
770055
770074
|
// pnp:/home/circleci/project/packages/cli/generation/ir-generator/lib/generateIntermediateRepresentation.js
|
|
770056
|
-
async function generateIntermediateRepresentation({ workspace, generationLanguage, audiences }) {
|
|
770075
|
+
async function generateIntermediateRepresentation({ workspace, generationLanguage, disableExamples, audiences }) {
|
|
770057
770076
|
const casingsGenerator = constructCasingsGenerator(generationLanguage);
|
|
770058
770077
|
const irGraph = new IrGraph(audiences);
|
|
770059
770078
|
const rootApiFileContext = constructRootApiFileContext({
|
|
@@ -770133,6 +770152,9 @@ async function generateIntermediateRepresentation({ workspace, generationLanguag
|
|
|
770133
770152
|
workspace
|
|
770134
770153
|
});
|
|
770135
770154
|
const convertedTypeDeclaration = convertedTypeDeclarationWithFilepaths.typeDeclaration;
|
|
770155
|
+
if (disableExamples) {
|
|
770156
|
+
convertedTypeDeclaration.examples = [];
|
|
770157
|
+
}
|
|
770136
770158
|
const subpackageFilepaths = convertedTypeDeclarationWithFilepaths.descendantFilepaths;
|
|
770137
770159
|
const typeId = IdGenerator.generateTypeId(convertedTypeDeclaration.name);
|
|
770138
770160
|
intermediateRepresentation.types[typeId] = convertedTypeDeclaration;
|
|
@@ -770187,6 +770209,9 @@ async function generateIntermediateRepresentation({ workspace, generationLanguag
|
|
|
770187
770209
|
packageTreeGenerator.addService(serviceId, convertedHttpService);
|
|
770188
770210
|
const convertedEndpoints = {};
|
|
770189
770211
|
convertedHttpService.endpoints.forEach((httpEndpoint) => {
|
|
770212
|
+
if (disableExamples) {
|
|
770213
|
+
httpEndpoint.examples = [];
|
|
770214
|
+
}
|
|
770190
770215
|
const rawEndpointSchema = service.endpoints[httpEndpoint.name.originalName];
|
|
770191
770216
|
irGraph.addEndpoint(convertedHttpService, httpEndpoint, rawEndpointSchema);
|
|
770192
770217
|
convertedEndpoints[httpEndpoint.name.originalName] = httpEndpoint;
|
|
@@ -770376,7 +770401,8 @@ async function registerApi({ organization, workspace, context, token, audiences,
|
|
|
770376
770401
|
const ir = await generateIntermediateRepresentation({
|
|
770377
770402
|
workspace,
|
|
770378
770403
|
audiences,
|
|
770379
|
-
generationLanguage: void 0
|
|
770404
|
+
generationLanguage: void 0,
|
|
770405
|
+
disableExamples: false
|
|
770380
770406
|
});
|
|
770381
770407
|
const fdrService = createFdrService({
|
|
770382
770408
|
token: token.value
|
|
@@ -772970,12 +772996,14 @@ async function generateIrForFernWorkspace({
|
|
|
772970
772996
|
workspace,
|
|
772971
772997
|
context,
|
|
772972
772998
|
generationLanguage,
|
|
772999
|
+
disableExamples,
|
|
772973
773000
|
audiences
|
|
772974
773001
|
}) {
|
|
772975
773002
|
await validateAPIWorkspaceAndLogIssues({ workspace, context, logWarnings: false });
|
|
772976
773003
|
return generateIntermediateRepresentation({
|
|
772977
773004
|
workspace,
|
|
772978
773005
|
generationLanguage,
|
|
773006
|
+
disableExamples,
|
|
772979
773007
|
audiences
|
|
772980
773008
|
});
|
|
772981
773009
|
}
|
|
@@ -772995,7 +773023,8 @@ async function generateFdrApiDefinitionForWorkspaces({
|
|
|
772995
773023
|
workspace: fernWorkspace,
|
|
772996
773024
|
context,
|
|
772997
773025
|
generationLanguage: void 0,
|
|
772998
|
-
audiences
|
|
773026
|
+
audiences,
|
|
773027
|
+
disableExamples: false
|
|
772999
773028
|
});
|
|
773000
773029
|
const apiDefinition = convertIrToFdrApi(intermediateRepresentation, {});
|
|
773001
773030
|
const resolvedOutputFilePath = import_path29.default.resolve(outputFilepath);
|
|
@@ -778787,6 +778816,7 @@ async function generateIrForWorkspaces({
|
|
|
778787
778816
|
workspace: fernWorkspace,
|
|
778788
778817
|
context,
|
|
778789
778818
|
generationLanguage,
|
|
778819
|
+
disableExamples: false,
|
|
778790
778820
|
audiences,
|
|
778791
778821
|
version: version3
|
|
778792
778822
|
});
|
|
@@ -778805,13 +778835,15 @@ async function getIntermediateRepresentation({
|
|
|
778805
778835
|
context,
|
|
778806
778836
|
generationLanguage,
|
|
778807
778837
|
audiences,
|
|
778838
|
+
disableExamples,
|
|
778808
778839
|
version: version3
|
|
778809
778840
|
}) {
|
|
778810
778841
|
const intermediateRepresentation = await generateIrForFernWorkspace({
|
|
778811
778842
|
workspace,
|
|
778812
778843
|
context,
|
|
778813
778844
|
generationLanguage,
|
|
778814
|
-
audiences
|
|
778845
|
+
audiences,
|
|
778846
|
+
disableExamples
|
|
778815
778847
|
});
|
|
778816
778848
|
if (version3 == null) {
|
|
778817
778849
|
return IrSerialization2.IntermediateRepresentation.jsonOrThrow(intermediateRepresentation, {
|
|
@@ -779314,7 +779346,8 @@ async function writeIrToFile({ workspace, audiences, generatorInvocation, worksp
|
|
|
779314
779346
|
const intermediateRepresentation = await generateIntermediateRepresentation({
|
|
779315
779347
|
workspace,
|
|
779316
779348
|
audiences,
|
|
779317
|
-
generationLanguage: generatorInvocation.language
|
|
779349
|
+
generationLanguage: generatorInvocation.language,
|
|
779350
|
+
disableExamples: generatorInvocation.disableExamples
|
|
779318
779351
|
});
|
|
779319
779352
|
context.logger.debug("Generated IR");
|
|
779320
779353
|
const migratedIntermediateRepresentation = irVersionOverride != null ? await migrateIntermediateRepresentationThroughVersion({
|
|
@@ -779651,6 +779684,7 @@ async function runRemoteGenerationForGenerator({ organization, workspace, intera
|
|
|
779651
779684
|
const intermediateRepresentation = await generateIntermediateRepresentation({
|
|
779652
779685
|
workspace,
|
|
779653
779686
|
generationLanguage: generatorInvocation.language,
|
|
779687
|
+
disableExamples: generatorInvocation.disableExamples,
|
|
779654
779688
|
audiences
|
|
779655
779689
|
});
|
|
779656
779690
|
const job = await createAndStartJob({
|
|
@@ -806500,7 +806534,8 @@ async function mockServer({
|
|
|
806500
806534
|
const ir = await generateIntermediateRepresentation({
|
|
806501
806535
|
workspace: fernWorkspace,
|
|
806502
806536
|
audiences: { type: "all" },
|
|
806503
|
-
generationLanguage: void 0
|
|
806537
|
+
generationLanguage: void 0,
|
|
806538
|
+
disableExamples: false
|
|
806504
806539
|
});
|
|
806505
806540
|
await runMockServer({
|
|
806506
806541
|
context,
|
|
@@ -806575,7 +806610,8 @@ var ReferencedAPICollector = class {
|
|
|
806575
806610
|
const ir = await generateIntermediateRepresentation({
|
|
806576
806611
|
workspace: fernWorkspace,
|
|
806577
806612
|
audiences: api.audiences,
|
|
806578
|
-
generationLanguage: void 0
|
|
806613
|
+
generationLanguage: void 0,
|
|
806614
|
+
disableExamples: false
|
|
806579
806615
|
});
|
|
806580
806616
|
const apiDefinition = convertIrToFdrApi(ir, {});
|
|
806581
806617
|
const dbApiDefinition = (0, import_fdr_sdk4.convertAPIDefinitionToDb)(apiDefinition, "", new import_fdr_sdk4.SDKSnippetHolder({
|