@fern-api/fern-api-dev 4.62.2 → 4.62.3-1-g4f6e811596d
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/cli.cjs +49 -18
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -602754,7 +602754,7 @@ var AccessTokenPosthogManager = class {
|
|
|
602754
602754
|
properties: {
|
|
602755
602755
|
...event,
|
|
602756
602756
|
...event.properties,
|
|
602757
|
-
version: "4.62.
|
|
602757
|
+
version: "4.62.3-1-g4f6e811596d",
|
|
602758
602758
|
usingAccessToken: true
|
|
602759
602759
|
}
|
|
602760
602760
|
});
|
|
@@ -602805,7 +602805,7 @@ var UserPosthogManager = class {
|
|
|
602805
602805
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
602806
602806
|
event: "CLI",
|
|
602807
602807
|
properties: {
|
|
602808
|
-
version: "4.62.
|
|
602808
|
+
version: "4.62.3-1-g4f6e811596d",
|
|
602809
602809
|
...event,
|
|
602810
602810
|
...event.properties,
|
|
602811
602811
|
usingAccessToken: false,
|
|
@@ -603850,9 +603850,17 @@ function constructAuth0Url({ origin: origin2, auth0Domain: auth0Domain2, auth0Cl
|
|
|
603850
603850
|
|
|
603851
603851
|
// ../login/lib/auth0-login/resolveSsoConnection.js
|
|
603852
603852
|
async function resolveSsoConnection({ dashboardBaseUrl, email: email3 }) {
|
|
603853
|
-
|
|
603854
|
-
|
|
603855
|
-
|
|
603853
|
+
let response;
|
|
603854
|
+
try {
|
|
603855
|
+
response = await axios_default.post(`${dashboardBaseUrl}/api/sso/resolve`, { email: email3 }, {
|
|
603856
|
+
headers: { "Content-Type": "application/json" }
|
|
603857
|
+
});
|
|
603858
|
+
} catch (error50) {
|
|
603859
|
+
if (axios_default.isAxiosError(error50) && error50.response?.status === 404) {
|
|
603860
|
+
throw new Error(`No SSO connection associated with email: ${email3}`);
|
|
603861
|
+
}
|
|
603862
|
+
throw error50;
|
|
603863
|
+
}
|
|
603856
603864
|
const responseData = response.data;
|
|
603857
603865
|
if (typeof responseData !== "object" || responseData == null) {
|
|
603858
603866
|
throw new Error("Invalid response format from SSO resolve endpoint");
|
|
@@ -840093,7 +840101,7 @@ var import_path54 = __toESM(require("path"), 1);
|
|
|
840093
840101
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
840094
840102
|
var LOGS_FOLDER_NAME = "logs";
|
|
840095
840103
|
function getCliSource() {
|
|
840096
|
-
const version7 = "4.62.
|
|
840104
|
+
const version7 = "4.62.3-1-g4f6e811596d";
|
|
840097
840105
|
return `cli@${version7}`;
|
|
840098
840106
|
}
|
|
840099
840107
|
var DebugLogger = class {
|
|
@@ -851186,7 +851194,7 @@ var LegacyDocsPublisher = class {
|
|
|
851186
851194
|
/**
|
|
851187
851195
|
* Publish the docs workspace to the given instance.
|
|
851188
851196
|
*/
|
|
851189
|
-
async publish({ instanceUrl, preview, skipUpload }) {
|
|
851197
|
+
async publish({ instanceUrl, preview, previewId, skipUpload }) {
|
|
851190
851198
|
const taskContext = new TaskContextAdapter({ context: this.context, task: this.task });
|
|
851191
851199
|
try {
|
|
851192
851200
|
const url3 = await runRemoteGenerationForDocsWorkspace({
|
|
@@ -851198,10 +851206,10 @@ var LegacyDocsPublisher = class {
|
|
|
851198
851206
|
token: this.token,
|
|
851199
851207
|
instanceUrl,
|
|
851200
851208
|
preview,
|
|
851201
|
-
previewId
|
|
851209
|
+
previewId,
|
|
851202
851210
|
disableTemplates: void 0,
|
|
851203
851211
|
skipUpload,
|
|
851204
|
-
cliVersion: "4.62.
|
|
851212
|
+
cliVersion: "4.62.3-1-g4f6e811596d"
|
|
851205
851213
|
});
|
|
851206
851214
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
851207
851215
|
return { success: false };
|
|
@@ -851856,6 +851864,7 @@ var PublishCommand = class {
|
|
|
851856
851864
|
const result = await publisher.publish({
|
|
851857
851865
|
instanceUrl,
|
|
851858
851866
|
preview: args.preview,
|
|
851867
|
+
previewId: args.previewId,
|
|
851859
851868
|
skipUpload: args["skip-upload"] || void 0
|
|
851860
851869
|
});
|
|
851861
851870
|
if (!result.success) {
|
|
@@ -852039,6 +852048,7 @@ var PreviewCommand = class {
|
|
|
852039
852048
|
await this.publishCommand.handle(context3, {
|
|
852040
852049
|
...args,
|
|
852041
852050
|
preview: true,
|
|
852051
|
+
previewId: args.id,
|
|
852042
852052
|
force: true
|
|
852043
852053
|
});
|
|
852044
852054
|
}
|
|
@@ -852057,6 +852067,9 @@ function addPreviewCommand(cli) {
|
|
|
852057
852067
|
type: "boolean",
|
|
852058
852068
|
default: false,
|
|
852059
852069
|
description: "Treat all validation warnings as errors"
|
|
852070
|
+
}).option("id", {
|
|
852071
|
+
type: "string",
|
|
852072
|
+
description: "A stable identifier for the preview. Reusing the same ID overwrites the previous preview, keeping the URL stable."
|
|
852060
852073
|
}).option("skip-upload", {
|
|
852061
852074
|
type: "boolean",
|
|
852062
852075
|
default: false,
|
|
@@ -903893,7 +903906,8 @@ var LegacyLocalGenerationRunner = class {
|
|
|
903893
903906
|
absolutePathToPreview: void 0,
|
|
903894
903907
|
inspect: false,
|
|
903895
903908
|
ai: void 0,
|
|
903896
|
-
skipFernignore: args.skipFernignore
|
|
903909
|
+
skipFernignore: args.skipFernignore,
|
|
903910
|
+
requireEnvVars: args.requireEnvVars
|
|
903897
903911
|
});
|
|
903898
903912
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
903899
903913
|
return {
|
|
@@ -904001,7 +904015,7 @@ var LegacyRemoteGenerationRunner = class {
|
|
|
904001
904015
|
whitelabel: void 0,
|
|
904002
904016
|
dynamicIrOnly: false,
|
|
904003
904017
|
retryRateLimited: false,
|
|
904004
|
-
requireEnvVars: true
|
|
904018
|
+
requireEnvVars: args.requireEnvVars ?? true
|
|
904005
904019
|
});
|
|
904006
904020
|
if (this.isLocalGitCombo(args) && absolutePathToPreview != null) {
|
|
904007
904021
|
const generatorName = basename2(generatorInvocation.name);
|
|
@@ -904139,7 +904153,8 @@ var GeneratorPipeline = class {
|
|
|
904139
904153
|
outputPath: args.outputPath,
|
|
904140
904154
|
containerEngine: args.containerEngine,
|
|
904141
904155
|
token: args.token,
|
|
904142
|
-
skipFernignore: args.skipFernignore
|
|
904156
|
+
skipFernignore: args.skipFernignore,
|
|
904157
|
+
requireEnvVars: args.requireEnvVars
|
|
904143
904158
|
});
|
|
904144
904159
|
if (!result.success) {
|
|
904145
904160
|
return {
|
|
@@ -904175,7 +904190,8 @@ var GeneratorPipeline = class {
|
|
|
904175
904190
|
preview: args.preview,
|
|
904176
904191
|
outputPath: args.outputPath,
|
|
904177
904192
|
fernignorePath: args.fernignorePath,
|
|
904178
|
-
skipFernignore: args.skipFernignore
|
|
904193
|
+
skipFernignore: args.skipFernignore,
|
|
904194
|
+
requireEnvVars: args.requireEnvVars
|
|
904179
904195
|
});
|
|
904180
904196
|
if (!result.success) {
|
|
904181
904197
|
return {
|
|
@@ -904550,7 +904566,8 @@ var GenerateCommand = class {
|
|
|
904550
904566
|
token,
|
|
904551
904567
|
version: args["output-version"],
|
|
904552
904568
|
fernignorePath: args.fernignore,
|
|
904553
|
-
skipFernignore: args["skip-fernignore"]
|
|
904569
|
+
skipFernignore: args["skip-fernignore"],
|
|
904570
|
+
requireEnvVars: args["require-env-vars"]
|
|
904554
904571
|
});
|
|
904555
904572
|
if (!pipelineResult.success) {
|
|
904556
904573
|
task.stage.generator.fail(pipelineResult.error);
|
|
@@ -904824,6 +904841,10 @@ function addGenerateCommand(cli) {
|
|
|
904824
904841
|
type: "boolean",
|
|
904825
904842
|
default: false,
|
|
904826
904843
|
description: "Skip the .fernignore file and generate all files. For remote generation, uploads an empty .fernignore. For local generation, skips reading .fernignore from the output directory."
|
|
904844
|
+
}).option("require-env-vars", {
|
|
904845
|
+
type: "boolean",
|
|
904846
|
+
default: true,
|
|
904847
|
+
description: "Require all referenced environment variables to be defined (use --no-require-env-vars to substitute empty strings for missing variables)"
|
|
904827
904848
|
}));
|
|
904828
904849
|
}
|
|
904829
904850
|
|
|
@@ -904888,6 +904909,10 @@ function addPreviewCommand2(cli) {
|
|
|
904888
904909
|
type: "string",
|
|
904889
904910
|
description: "Path to .fernignore file",
|
|
904890
904911
|
hidden: true
|
|
904912
|
+
}).option("require-env-vars", {
|
|
904913
|
+
type: "boolean",
|
|
904914
|
+
default: true,
|
|
904915
|
+
description: "Require all referenced environment variables to be defined (use --no-require-env-vars to substitute empty strings for missing variables)"
|
|
904891
904916
|
}));
|
|
904892
904917
|
}
|
|
904893
904918
|
|
|
@@ -924484,7 +924509,7 @@ var CliContext = class {
|
|
|
924484
924509
|
if (false) {
|
|
924485
924510
|
this.logger.error("CLI_VERSION is not defined");
|
|
924486
924511
|
}
|
|
924487
|
-
return "4.62.
|
|
924512
|
+
return "4.62.3-1-g4f6e811596d";
|
|
924488
924513
|
}
|
|
924489
924514
|
getCliName() {
|
|
924490
924515
|
if (false) {
|
|
@@ -944338,9 +944363,15 @@ function addReplayInitCommand(cli, cliContext) {
|
|
|
944338
944363
|
githubRepo = githubRepo ?? resolved.githubRepo;
|
|
944339
944364
|
token = token ?? resolved.token;
|
|
944340
944365
|
}
|
|
944341
|
-
if (githubRepo == null
|
|
944342
|
-
|
|
944343
|
-
|
|
944366
|
+
if (githubRepo == null) {
|
|
944367
|
+
return cliContext.failAndThrow(
|
|
944368
|
+
"Missing required github config. Either use --group to read from generators.yml, or provide --github directly."
|
|
944369
|
+
);
|
|
944370
|
+
}
|
|
944371
|
+
if (token == null) {
|
|
944372
|
+
cliContext.logger.warn(
|
|
944373
|
+
"No GitHub token found. Clone may fail for private repos. Set GITHUB_TOKEN or pass --token."
|
|
944374
|
+
);
|
|
944344
944375
|
}
|
|
944345
944376
|
cliContext.logger.info(`Initializing Replay for: ${githubRepo}`);
|
|
944346
944377
|
if (argv.dryRun) {
|
package/package.json
CHANGED