@fern-api/fern-api-dev 4.62.2 → 4.62.3

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.
Files changed (2) hide show
  1. package/cli.cjs +38 -15
  2. 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.2",
602757
+ version: "4.62.3",
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.2",
602808
+ version: "4.62.3",
602809
602809
  ...event,
602810
602810
  ...event.properties,
602811
602811
  usingAccessToken: false,
@@ -840093,7 +840093,7 @@ var import_path54 = __toESM(require("path"), 1);
840093
840093
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
840094
840094
  var LOGS_FOLDER_NAME = "logs";
840095
840095
  function getCliSource() {
840096
- const version7 = "4.62.2";
840096
+ const version7 = "4.62.3";
840097
840097
  return `cli@${version7}`;
840098
840098
  }
840099
840099
  var DebugLogger = class {
@@ -851186,7 +851186,7 @@ var LegacyDocsPublisher = class {
851186
851186
  /**
851187
851187
  * Publish the docs workspace to the given instance.
851188
851188
  */
851189
- async publish({ instanceUrl, preview, skipUpload }) {
851189
+ async publish({ instanceUrl, preview, previewId, skipUpload }) {
851190
851190
  const taskContext = new TaskContextAdapter({ context: this.context, task: this.task });
851191
851191
  try {
851192
851192
  const url3 = await runRemoteGenerationForDocsWorkspace({
@@ -851198,10 +851198,10 @@ var LegacyDocsPublisher = class {
851198
851198
  token: this.token,
851199
851199
  instanceUrl,
851200
851200
  preview,
851201
- previewId: void 0,
851201
+ previewId,
851202
851202
  disableTemplates: void 0,
851203
851203
  skipUpload,
851204
- cliVersion: "4.62.2"
851204
+ cliVersion: "4.62.3"
851205
851205
  });
851206
851206
  if (taskContext.getResult() === TaskResult.Failure) {
851207
851207
  return { success: false };
@@ -851856,6 +851856,7 @@ var PublishCommand = class {
851856
851856
  const result = await publisher.publish({
851857
851857
  instanceUrl,
851858
851858
  preview: args.preview,
851859
+ previewId: args.previewId,
851859
851860
  skipUpload: args["skip-upload"] || void 0
851860
851861
  });
851861
851862
  if (!result.success) {
@@ -852039,6 +852040,7 @@ var PreviewCommand = class {
852039
852040
  await this.publishCommand.handle(context3, {
852040
852041
  ...args,
852041
852042
  preview: true,
852043
+ previewId: args.id,
852042
852044
  force: true
852043
852045
  });
852044
852046
  }
@@ -852057,6 +852059,9 @@ function addPreviewCommand(cli) {
852057
852059
  type: "boolean",
852058
852060
  default: false,
852059
852061
  description: "Treat all validation warnings as errors"
852062
+ }).option("id", {
852063
+ type: "string",
852064
+ description: "A stable identifier for the preview. Reusing the same ID overwrites the previous preview, keeping the URL stable."
852060
852065
  }).option("skip-upload", {
852061
852066
  type: "boolean",
852062
852067
  default: false,
@@ -903893,7 +903898,8 @@ var LegacyLocalGenerationRunner = class {
903893
903898
  absolutePathToPreview: void 0,
903894
903899
  inspect: false,
903895
903900
  ai: void 0,
903896
- skipFernignore: args.skipFernignore
903901
+ skipFernignore: args.skipFernignore,
903902
+ requireEnvVars: args.requireEnvVars
903897
903903
  });
903898
903904
  if (taskContext.getResult() === TaskResult.Failure) {
903899
903905
  return {
@@ -904001,7 +904007,7 @@ var LegacyRemoteGenerationRunner = class {
904001
904007
  whitelabel: void 0,
904002
904008
  dynamicIrOnly: false,
904003
904009
  retryRateLimited: false,
904004
- requireEnvVars: true
904010
+ requireEnvVars: args.requireEnvVars ?? true
904005
904011
  });
904006
904012
  if (this.isLocalGitCombo(args) && absolutePathToPreview != null) {
904007
904013
  const generatorName = basename2(generatorInvocation.name);
@@ -904139,7 +904145,8 @@ var GeneratorPipeline = class {
904139
904145
  outputPath: args.outputPath,
904140
904146
  containerEngine: args.containerEngine,
904141
904147
  token: args.token,
904142
- skipFernignore: args.skipFernignore
904148
+ skipFernignore: args.skipFernignore,
904149
+ requireEnvVars: args.requireEnvVars
904143
904150
  });
904144
904151
  if (!result.success) {
904145
904152
  return {
@@ -904175,7 +904182,8 @@ var GeneratorPipeline = class {
904175
904182
  preview: args.preview,
904176
904183
  outputPath: args.outputPath,
904177
904184
  fernignorePath: args.fernignorePath,
904178
- skipFernignore: args.skipFernignore
904185
+ skipFernignore: args.skipFernignore,
904186
+ requireEnvVars: args.requireEnvVars
904179
904187
  });
904180
904188
  if (!result.success) {
904181
904189
  return {
@@ -904550,7 +904558,8 @@ var GenerateCommand = class {
904550
904558
  token,
904551
904559
  version: args["output-version"],
904552
904560
  fernignorePath: args.fernignore,
904553
- skipFernignore: args["skip-fernignore"]
904561
+ skipFernignore: args["skip-fernignore"],
904562
+ requireEnvVars: args["require-env-vars"]
904554
904563
  });
904555
904564
  if (!pipelineResult.success) {
904556
904565
  task.stage.generator.fail(pipelineResult.error);
@@ -904824,6 +904833,10 @@ function addGenerateCommand(cli) {
904824
904833
  type: "boolean",
904825
904834
  default: false,
904826
904835
  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."
904836
+ }).option("require-env-vars", {
904837
+ type: "boolean",
904838
+ default: true,
904839
+ description: "Require all referenced environment variables to be defined (use --no-require-env-vars to substitute empty strings for missing variables)"
904827
904840
  }));
904828
904841
  }
904829
904842
 
@@ -904888,6 +904901,10 @@ function addPreviewCommand2(cli) {
904888
904901
  type: "string",
904889
904902
  description: "Path to .fernignore file",
904890
904903
  hidden: true
904904
+ }).option("require-env-vars", {
904905
+ type: "boolean",
904906
+ default: true,
904907
+ description: "Require all referenced environment variables to be defined (use --no-require-env-vars to substitute empty strings for missing variables)"
904891
904908
  }));
904892
904909
  }
904893
904910
 
@@ -924484,7 +924501,7 @@ var CliContext = class {
924484
924501
  if (false) {
924485
924502
  this.logger.error("CLI_VERSION is not defined");
924486
924503
  }
924487
- return "4.62.2";
924504
+ return "4.62.3";
924488
924505
  }
924489
924506
  getCliName() {
924490
924507
  if (false) {
@@ -944338,9 +944355,15 @@ function addReplayInitCommand(cli, cliContext) {
944338
944355
  githubRepo = githubRepo ?? resolved.githubRepo;
944339
944356
  token = token ?? resolved.token;
944340
944357
  }
944341
- if (githubRepo == null || token == null) {
944342
- const hint = githubRepo != null ? "Repository found but no token. Pass --token or set GITHUB_TOKEN environment variable." : "Either use --group to read from generators.yml, or provide --github and --token directly.";
944343
- return cliContext.failAndThrow(`Missing required github config. ${hint}`);
944358
+ if (githubRepo == null) {
944359
+ return cliContext.failAndThrow(
944360
+ "Missing required github config. Either use --group to read from generators.yml, or provide --github directly."
944361
+ );
944362
+ }
944363
+ if (token == null) {
944364
+ cliContext.logger.warn(
944365
+ "No GitHub token found. Clone may fail for private repos. Set GITHUB_TOKEN or pass --token."
944366
+ );
944344
944367
  }
944345
944368
  cliContext.logger.info(`Initializing Replay for: ${githubRepo}`);
944346
944369
  if (argv.dryRun) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.62.2",
2
+ "version": "4.62.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",