fern-api 0.37.14-rc0 → 0.37.14
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 +47 -43
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -1214100,6 +1214100,7 @@ __export(generators_yml_exports, {
|
|
|
1214100
1214100
|
addGenerator: () => addGenerator,
|
|
1214101
1214101
|
getGeneratorNameOrThrow: () => getGeneratorNameOrThrow,
|
|
1214102
1214102
|
getLatestGeneratorVersion: () => getLatestGeneratorVersion,
|
|
1214103
|
+
getPackageName: () => getPackageName,
|
|
1214103
1214104
|
getPathToGeneratorsConfiguration: () => getPathToGeneratorsConfiguration,
|
|
1214104
1214105
|
isRawProtobufAPIDefinitionSchema: () => isRawProtobufAPIDefinitionSchema,
|
|
1214105
1214106
|
loadGeneratorsConfiguration: () => loadGeneratorsConfiguration,
|
|
@@ -1214391,6 +1214392,38 @@ var GenerationLanguage = {
|
|
|
1214391
1214392
|
CSHARP: "csharp",
|
|
1214392
1214393
|
SWIFT: "swift"
|
|
1214393
1214394
|
};
|
|
1214395
|
+
function getPackageName({ generatorInvocation }) {
|
|
1214396
|
+
return generatorInvocation.outputMode._visit({
|
|
1214397
|
+
downloadFiles: () => void 0,
|
|
1214398
|
+
github: (val) => {
|
|
1214399
|
+
var _a6;
|
|
1214400
|
+
return (_a6 = val.publishInfo) == null ? void 0 : _a6._visit({
|
|
1214401
|
+
maven: (val2) => val2.coordinate,
|
|
1214402
|
+
npm: (val2) => val2.packageName,
|
|
1214403
|
+
pypi: (val2) => val2.packageName,
|
|
1214404
|
+
postman: () => void 0,
|
|
1214405
|
+
rubygems: (val2) => val2.packageName,
|
|
1214406
|
+
nuget: (val2) => val2.packageName,
|
|
1214407
|
+
_other: () => void 0
|
|
1214408
|
+
});
|
|
1214409
|
+
},
|
|
1214410
|
+
githubV2: (val) => {
|
|
1214411
|
+
var _a6;
|
|
1214412
|
+
return (_a6 = val.publishInfo) == null ? void 0 : _a6._visit({
|
|
1214413
|
+
maven: (val2) => val2.coordinate,
|
|
1214414
|
+
npm: (val2) => val2.packageName,
|
|
1214415
|
+
pypi: (val2) => val2.packageName,
|
|
1214416
|
+
postman: () => void 0,
|
|
1214417
|
+
rubygems: (val2) => val2.packageName,
|
|
1214418
|
+
nuget: (val2) => val2.packageName,
|
|
1214419
|
+
_other: () => void 0
|
|
1214420
|
+
});
|
|
1214421
|
+
},
|
|
1214422
|
+
publish: () => void 0,
|
|
1214423
|
+
publishV2: () => void 0,
|
|
1214424
|
+
_other: () => void 0
|
|
1214425
|
+
});
|
|
1214426
|
+
}
|
|
1214394
1214427
|
|
|
1214395
1214428
|
// pnp:/home/runner/work/fern/fern/packages/cli/configuration/lib/generators-yml/isRawProtobufAPIDefinitionSchema.js
|
|
1214396
1214429
|
function isRawProtobufAPIDefinitionSchema(rawApiConfiguration) {
|
|
@@ -1217590,7 +1217623,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1217590
1217623
|
properties: {
|
|
1217591
1217624
|
...event,
|
|
1217592
1217625
|
...event.properties,
|
|
1217593
|
-
version: "0.37.14
|
|
1217626
|
+
version: "0.37.14",
|
|
1217594
1217627
|
usingAccessToken: true
|
|
1217595
1217628
|
}
|
|
1217596
1217629
|
});
|
|
@@ -1217652,7 +1217685,7 @@ var UserPosthogManager = class {
|
|
|
1217652
1217685
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1217653
1217686
|
event: "CLI",
|
|
1217654
1217687
|
properties: {
|
|
1217655
|
-
version: "0.37.14
|
|
1217688
|
+
version: "0.37.14",
|
|
1217656
1217689
|
...event,
|
|
1217657
1217690
|
...event.properties
|
|
1217658
1217691
|
}
|
|
@@ -1246884,10 +1246917,10 @@ var CliContext = class {
|
|
|
1246884
1246917
|
return "fern-api";
|
|
1246885
1246918
|
}
|
|
1246886
1246919
|
getPackageVersion() {
|
|
1246887
|
-
if ("0.37.14
|
|
1246920
|
+
if ("0.37.14" == null) {
|
|
1246888
1246921
|
this.logger.error("CLI_VERSION is not defined");
|
|
1246889
1246922
|
}
|
|
1246890
|
-
return "0.37.14
|
|
1246923
|
+
return "0.37.14";
|
|
1246891
1246924
|
}
|
|
1246892
1246925
|
getCliName() {
|
|
1246893
1246926
|
if ("fern" == null) {
|
|
@@ -1315841,7 +1315874,7 @@ function newDummyPublishOutputConfig(version3, multipleOutputMode) {
|
|
|
1315841
1315874
|
}
|
|
1315842
1315875
|
|
|
1315843
1315876
|
// pnp:/home/runner/work/fern/fern/packages/cli/generation/local-generation/local-workspace-runner/lib/getIntermediateRepresentation.js
|
|
1315844
|
-
async function getIntermediateRepresentation2({ workspace, audiences, generatorInvocation, context, irVersionOverride }) {
|
|
1315877
|
+
async function getIntermediateRepresentation2({ workspace, audiences, generatorInvocation, context, irVersionOverride, version: version3, packageName }) {
|
|
1315845
1315878
|
const intermediateRepresentation = await generateIntermediateRepresentation({
|
|
1315846
1315879
|
workspace,
|
|
1315847
1315880
|
audiences,
|
|
@@ -1315850,8 +1315883,8 @@ async function getIntermediateRepresentation2({ workspace, audiences, generatorI
|
|
|
1315850
1315883
|
smartCasing: generatorInvocation.smartCasing,
|
|
1315851
1315884
|
disableExamples: generatorInvocation.disableExamples,
|
|
1315852
1315885
|
readme: generatorInvocation.readme,
|
|
1315853
|
-
version:
|
|
1315854
|
-
packageName
|
|
1315886
|
+
version: version3,
|
|
1315887
|
+
packageName
|
|
1315855
1315888
|
});
|
|
1315856
1315889
|
context.logger.debug("Generated IR");
|
|
1315857
1315890
|
const migratedIntermediateRepresentation = irVersionOverride != null ? await migrateIntermediateRepresentationThroughVersion({
|
|
@@ -1316067,7 +1316100,8 @@ async function writeFilesToDiskAndRunGenerator({ organization, workspace, genera
|
|
|
1316067
1316100
|
generatorInvocation,
|
|
1316068
1316101
|
workspaceTempDir,
|
|
1316069
1316102
|
context,
|
|
1316070
|
-
irVersionOverride
|
|
1316103
|
+
irVersionOverride,
|
|
1316104
|
+
outputVersionOverride
|
|
1316071
1316105
|
});
|
|
1316072
1316106
|
context.logger.debug("Wrote IR to: " + absolutePathToIr);
|
|
1316073
1316107
|
const configJsonFile = await import_tmp_promise7.default.file({
|
|
@@ -1316128,13 +1316162,15 @@ async function writeFilesToDiskAndRunGenerator({ organization, workspace, genera
|
|
|
1316128
1316162
|
absolutePathToConfigJson: absolutePathToWriteConfigJson
|
|
1316129
1316163
|
};
|
|
1316130
1316164
|
}
|
|
1316131
|
-
async function writeIrToFile({ workspace, audiences, generatorInvocation, workspaceTempDir, context, irVersionOverride }) {
|
|
1316165
|
+
async function writeIrToFile({ workspace, audiences, generatorInvocation, workspaceTempDir, context, irVersionOverride, outputVersionOverride }) {
|
|
1316132
1316166
|
const intermediateRepresentation = await getIntermediateRepresentation2({
|
|
1316133
1316167
|
workspace,
|
|
1316134
1316168
|
audiences,
|
|
1316135
1316169
|
generatorInvocation,
|
|
1316136
1316170
|
context,
|
|
1316137
|
-
irVersionOverride
|
|
1316171
|
+
irVersionOverride,
|
|
1316172
|
+
packageName: generators_yml_exports.getPackageName({ generatorInvocation }),
|
|
1316173
|
+
version: outputVersionOverride
|
|
1316138
1316174
|
});
|
|
1316139
1316175
|
context.logger.debug("Migrated IR");
|
|
1316140
1316176
|
const irFile = await import_tmp_promise7.default.file({
|
|
@@ -1316688,7 +1316724,7 @@ function convertLogLevel(logLevel) {
|
|
|
1316688
1316724
|
// pnp:/home/runner/work/fern/fern/packages/cli/generation/remote-generation/remote-workspace-runner/lib/runRemoteGenerationForGenerator.js
|
|
1316689
1316725
|
async function runRemoteGenerationForGenerator({ projectConfig, organization, workspace, interactiveTaskContext, generatorInvocation, version: version3, audiences, shouldLogS3Url, token, whitelabel, irVersionOverride, absolutePathToPreview, readme }) {
|
|
1316690
1316726
|
const fdr = createFdrService({ token: token.value });
|
|
1316691
|
-
const packageName = getPackageName({ generatorInvocation });
|
|
1316727
|
+
const packageName = generators_yml_exports.getPackageName({ generatorInvocation });
|
|
1316692
1316728
|
const ir = await generateIntermediateRepresentation({
|
|
1316693
1316729
|
workspace,
|
|
1316694
1316730
|
generationLanguage: generatorInvocation.language,
|
|
@@ -1316788,38 +1316824,6 @@ async function computeSemanticVersion({ fdr, packageName, generatorInvocation })
|
|
|
1316788
1316824
|
}
|
|
1316789
1316825
|
return response.body.version;
|
|
1316790
1316826
|
}
|
|
1316791
|
-
function getPackageName({ generatorInvocation }) {
|
|
1316792
|
-
return generatorInvocation.outputMode._visit({
|
|
1316793
|
-
downloadFiles: () => void 0,
|
|
1316794
|
-
github: (val) => {
|
|
1316795
|
-
var _a6;
|
|
1316796
|
-
return (_a6 = val.publishInfo) == null ? void 0 : _a6._visit({
|
|
1316797
|
-
maven: (val2) => val2.coordinate,
|
|
1316798
|
-
npm: (val2) => val2.packageName,
|
|
1316799
|
-
pypi: (val2) => val2.packageName,
|
|
1316800
|
-
postman: () => void 0,
|
|
1316801
|
-
rubygems: (val2) => val2.packageName,
|
|
1316802
|
-
nuget: (val2) => val2.packageName,
|
|
1316803
|
-
_other: () => void 0
|
|
1316804
|
-
});
|
|
1316805
|
-
},
|
|
1316806
|
-
githubV2: (val) => {
|
|
1316807
|
-
var _a6;
|
|
1316808
|
-
return (_a6 = val.publishInfo) == null ? void 0 : _a6._visit({
|
|
1316809
|
-
maven: (val2) => val2.coordinate,
|
|
1316810
|
-
npm: (val2) => val2.packageName,
|
|
1316811
|
-
pypi: (val2) => val2.packageName,
|
|
1316812
|
-
postman: () => void 0,
|
|
1316813
|
-
rubygems: (val2) => val2.packageName,
|
|
1316814
|
-
nuget: (val2) => val2.packageName,
|
|
1316815
|
-
_other: () => void 0
|
|
1316816
|
-
});
|
|
1316817
|
-
},
|
|
1316818
|
-
publish: () => void 0,
|
|
1316819
|
-
publishV2: () => void 0,
|
|
1316820
|
-
_other: () => void 0
|
|
1316821
|
-
});
|
|
1316822
|
-
}
|
|
1316823
1316827
|
|
|
1316824
1316828
|
// pnp:/home/runner/work/fern/fern/packages/cli/generation/remote-generation/remote-workspace-runner/lib/runRemoteGenerationForAPIWorkspace.js
|
|
1316825
1316829
|
async function runRemoteGenerationForAPIWorkspace({ projectConfig, organization, workspace, context, generatorGroup, version: version3, shouldLogS3Url, token, whitelabel, absolutePathToPreview, mode }) {
|