fern-api 0.41.0-rc0 → 0.41.0-rc1
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 +13 -14
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -1208726,7 +1208726,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1208726
1208726
|
properties: {
|
|
1208727
1208727
|
...event,
|
|
1208728
1208728
|
...event.properties,
|
|
1208729
|
-
version: "0.41.0-
|
|
1208729
|
+
version: "0.41.0-rc1",
|
|
1208730
1208730
|
usingAccessToken: true
|
|
1208731
1208731
|
}
|
|
1208732
1208732
|
});
|
|
@@ -1208788,7 +1208788,7 @@ var UserPosthogManager = class {
|
|
|
1208788
1208788
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1208789
1208789
|
event: "CLI",
|
|
1208790
1208790
|
properties: {
|
|
1208791
|
-
version: "0.41.0-
|
|
1208791
|
+
version: "0.41.0-rc1",
|
|
1208792
1208792
|
...event,
|
|
1208793
1208793
|
...event.properties
|
|
1208794
1208794
|
}
|
|
@@ -1213878,10 +1213878,10 @@ var CliContext = class {
|
|
|
1213878
1213878
|
return "fern-api";
|
|
1213879
1213879
|
}
|
|
1213880
1213880
|
getPackageVersion() {
|
|
1213881
|
-
if ("0.41.0-
|
|
1213881
|
+
if ("0.41.0-rc1" == null) {
|
|
1213882
1213882
|
this.logger.error("CLI_VERSION is not defined");
|
|
1213883
1213883
|
}
|
|
1213884
|
-
return "0.41.0-
|
|
1213884
|
+
return "0.41.0-rc1";
|
|
1213885
1213885
|
}
|
|
1213886
1213886
|
getCliName() {
|
|
1213887
1213887
|
if ("fern" == null) {
|
|
@@ -1322999,7 +1322999,7 @@ async function createAndStartJob({ projectConfig, workspace, organization, inter
|
|
|
1322999
1322999
|
return job;
|
|
1323000
1323000
|
}
|
|
1323001
1323001
|
async function createJob({ projectConfig, workspace, organization, generatorInvocation, version: version3, context, shouldLogS3Url, token, whitelabel, absolutePathToPreview }) {
|
|
1323002
|
-
const
|
|
1323002
|
+
const remoteGenerationService = createFiddleService({ token: token.value });
|
|
1323003
1323003
|
const generatorConfig = {
|
|
1323004
1323004
|
id: generatorInvocation.name,
|
|
1323005
1323005
|
version: generatorInvocation.version,
|
|
@@ -1323007,10 +1323007,6 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
|
|
|
1323007
1323007
|
customConfig: generatorInvocation.config,
|
|
1323008
1323008
|
publishMetadata: generatorInvocation.publishMetadata
|
|
1323009
1323009
|
};
|
|
1323010
|
-
const substituteEnvVars = (stringOrObject) => replaceEnvVariables(stringOrObject, { onError: (e) => context.failAndThrow(e) }, { substituteAsEmpty: isPreview });
|
|
1323011
|
-
const generatorConfigsWithEnvVarSubstitutions = substituteEnvVars(generatorConfig);
|
|
1323012
|
-
const whitelabelWithEnvVarSubstiutions = whitelabel != null ? substituteEnvVars(whitelabel) : void 0;
|
|
1323013
|
-
const remoteGenerationService = createFiddleService({ token: token.value });
|
|
1323014
1323010
|
let fernDefinitionMetadata;
|
|
1323015
1323011
|
if (generatorInvocation.outputMode.type.startsWith("github")) {
|
|
1323016
1323012
|
try {
|
|
@@ -1323073,14 +1323069,14 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
|
|
|
1323073
1323069
|
apiName: workspace.definition.rootApiFile.contents.name,
|
|
1323074
1323070
|
version: version3,
|
|
1323075
1323071
|
organizationName: organization,
|
|
1323076
|
-
generators: [
|
|
1323072
|
+
generators: [generatorConfig],
|
|
1323077
1323073
|
uploadToS3: shouldUploadToS3({
|
|
1323078
1323074
|
outputMode: generatorInvocation.outputMode,
|
|
1323079
1323075
|
generatorInvocation,
|
|
1323080
1323076
|
absolutePathToPreview,
|
|
1323081
1323077
|
shouldLogS3Url
|
|
1323082
1323078
|
}),
|
|
1323083
|
-
whitelabel
|
|
1323079
|
+
whitelabel,
|
|
1323084
1323080
|
fernDefinitionMetadata,
|
|
1323085
1323081
|
preview: absolutePathToPreview != null
|
|
1323086
1323082
|
});
|
|
@@ -1323516,20 +1323512,23 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
1323516
1323512
|
interactiveTaskContext.logger.debug("Setting IR source configuration ...");
|
|
1323517
1323513
|
ir.sourceConfig = sourceConfig;
|
|
1323518
1323514
|
}
|
|
1323515
|
+
const isPreview = absolutePathToPreview != null;
|
|
1323516
|
+
const substituteEnvVars = (stringOrObject) => replaceEnvVariables(stringOrObject, { onError: (e) => interactiveTaskContext.failAndThrow(e) }, { substituteAsEmpty: isPreview });
|
|
1323517
|
+
const generatorInvocationWithEnvVarSubstitutions = substituteEnvVars(generatorInvocation);
|
|
1323519
1323518
|
const job = await createAndStartJob({
|
|
1323520
1323519
|
projectConfig,
|
|
1323521
1323520
|
workspace,
|
|
1323522
1323521
|
organization,
|
|
1323523
|
-
generatorInvocation,
|
|
1323522
|
+
generatorInvocation: generatorInvocationWithEnvVarSubstitutions,
|
|
1323524
1323523
|
context: interactiveTaskContext,
|
|
1323525
1323524
|
version: version3,
|
|
1323526
1323525
|
intermediateRepresentation: {
|
|
1323527
1323526
|
...ir,
|
|
1323528
|
-
publishConfig: getPublishConfig({ generatorInvocation })
|
|
1323527
|
+
publishConfig: getPublishConfig({ generatorInvocation: generatorInvocationWithEnvVarSubstitutions })
|
|
1323529
1323528
|
},
|
|
1323530
1323529
|
shouldLogS3Url,
|
|
1323531
1323530
|
token,
|
|
1323532
|
-
whitelabel,
|
|
1323531
|
+
whitelabel: whitelabel != null ? substituteEnvVars(whitelabel) : void 0,
|
|
1323533
1323532
|
irVersionOverride,
|
|
1323534
1323533
|
absolutePathToPreview
|
|
1323535
1323534
|
});
|