@fern-api/fern-api-dev 5.23.3-1330-g7edd76d9d56 → 5.23.3-1335-g2568e55bf04

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 +24 -10
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -83938,10 +83938,16 @@ function parseIdempotencyKeyMethods(value2) {
83938
83938
  return methods.length > 0 ? methods : DEFAULT_IDEMPOTENCY_KEY_METHODS;
83939
83939
  }
83940
83940
  function getIdempotencyKeyGenerationFromGeneratorConfig(generatorInvocation) {
83941
+ const value2 = generatorInvocation.idempotencyKeyGenerationConfig ?? getRawPerGeneratorIdempotencyKeyConfig(generatorInvocation);
83942
+ return resolveIdempotencyKeyGeneration(value2);
83943
+ }
83944
+ function getRawPerGeneratorIdempotencyKeyConfig(generatorInvocation) {
83941
83945
  if (typeof generatorInvocation.raw?.config !== "object" || generatorInvocation.raw?.config === null) {
83942
83946
  return void 0;
83943
83947
  }
83944
- const value2 = generatorInvocation.raw.config["auto-generate-idempotency-key"];
83948
+ return generatorInvocation.raw.config["auto-generate-idempotency-key"];
83949
+ }
83950
+ function resolveIdempotencyKeyGeneration(value2) {
83945
83951
  if (value2 === true) {
83946
83952
  return { headerName: DEFAULT_IDEMPOTENCY_KEY_HEADER, methods: DEFAULT_IDEMPOTENCY_KEY_METHODS };
83947
83953
  }
@@ -129759,7 +129765,9 @@ var init_ApiConfigurationV2SettingsSchema2 = __esm({
129759
129765
  init_core6();
129760
129766
  init_AsyncApiSettingsSchema2();
129761
129767
  init_OpenApiSettingsSchema2();
129762
- ApiConfigurationV2SettingsSchema = schemas_exports8.object({}).extend(OpenApiSettingsSchema).extend(AsyncApiSettingsSchema);
129768
+ ApiConfigurationV2SettingsSchema = schemas_exports8.object({
129769
+ "auto-generate-idempotency-key": schemas_exports8.unknown().optional()
129770
+ }).extend(OpenApiSettingsSchema).extend(AsyncApiSettingsSchema);
129763
129771
  }
129764
129772
  });
129765
129773
 
@@ -259646,6 +259654,8 @@ async function convertGeneratorsConfiguration({ absolutePathToGeneratorsConfigur
259646
259654
  const readme = rawGeneratorsConfiguration.readme;
259647
259655
  warnForDeprecatedConfiguration(context3, rawGeneratorsConfiguration);
259648
259656
  const parsedApiConfiguration = await parseAPIConfiguration(rawGeneratorsConfiguration);
259657
+ const apiConfiguration = rawGeneratorsConfiguration.api;
259658
+ const globalIdempotencyKeyGeneration = apiConfiguration != null && generators_yml_exports.isApiConfigurationV2Schema(apiConfiguration) ? apiConfiguration.settings?.["auto-generate-idempotency-key"] : void 0;
259649
259659
  return {
259650
259660
  absolutePathToConfiguration: absolutePathToGeneratorsConfiguration,
259651
259661
  api: parsedApiConfiguration,
@@ -259660,6 +259670,7 @@ async function convertGeneratorsConfiguration({ absolutePathToGeneratorsConfigur
259660
259670
  maybeTopLevelMetadata,
259661
259671
  maybeTopLevelReviewers: rawGeneratorsConfiguration.reviewers,
259662
259672
  maybeRootAutomation: rawGeneratorsConfiguration.automation,
259673
+ globalIdempotencyKeyGeneration,
259663
259674
  readme,
259664
259675
  context: context3
259665
259676
  }))) : [],
@@ -260044,7 +260055,7 @@ async function parseAPIConfiguration(rawGeneratorsConfiguration) {
260044
260055
  definitions: await parseAPIConfigurationToApiLocations(apiConfiguration, rawGeneratorsConfiguration, emptySettings)
260045
260056
  };
260046
260057
  }
260047
- async function convertGroup({ absolutePathToGeneratorsConfiguration, groupName, group, maybeTopLevelMetadata, maybeTopLevelReviewers, maybeRootAutomation, readme, context: context3 }) {
260058
+ async function convertGroup({ absolutePathToGeneratorsConfiguration, groupName, group, maybeTopLevelMetadata, maybeTopLevelReviewers, maybeRootAutomation, globalIdempotencyKeyGeneration, readme, context: context3 }) {
260048
260059
  const maybeGroupLevelMetadata = getOutputMetadata(group.metadata);
260049
260060
  return {
260050
260061
  groupName,
@@ -260059,6 +260070,7 @@ async function convertGroup({ absolutePathToGeneratorsConfiguration, groupName,
260059
260070
  maybeGroupLevelReviewers: group.reviewers,
260060
260071
  maybeRootAutomation,
260061
260072
  maybeGroupAutomation: group.automation,
260073
+ globalIdempotencyKeyGeneration,
260062
260074
  readme,
260063
260075
  context: context3
260064
260076
  })))
@@ -260080,10 +260092,12 @@ function getGeneratorNameAndImage(generator, context3) {
260080
260092
  containerImage: void 0
260081
260093
  };
260082
260094
  }
260083
- async function convertGenerator({ absolutePathToGeneratorsConfiguration, generator, maybeGroupLevelMetadata, maybeTopLevelMetadata, maybeGroupLevelReviewers, maybeTopLevelReviewers, maybeRootAutomation, maybeGroupAutomation, readme, context: context3 }) {
260095
+ async function convertGenerator({ absolutePathToGeneratorsConfiguration, generator, maybeGroupLevelMetadata, maybeTopLevelMetadata, maybeGroupLevelReviewers, maybeTopLevelReviewers, maybeRootAutomation, maybeGroupAutomation, globalIdempotencyKeyGeneration, readme, context: context3 }) {
260084
260096
  const { normalizedName, containerImage } = getGeneratorNameAndImage(generator, context3);
260097
+ const perGeneratorIdempotencyKeyGeneration = typeof generator.config === "object" && generator.config !== null ? generator.config["auto-generate-idempotency-key"] : void 0;
260085
260098
  return {
260086
260099
  raw: generator,
260100
+ idempotencyKeyGenerationConfig: perGeneratorIdempotencyKeyGeneration ?? globalIdempotencyKeyGeneration,
260087
260101
  automation: generators_yml_exports.resolveAutomationConfig({
260088
260102
  rootAutomation: maybeRootAutomation,
260089
260103
  groupAutomation: maybeGroupAutomation,
@@ -689229,7 +689243,7 @@ var AccessTokenPosthogManager = class {
689229
689243
  properties: {
689230
689244
  ...event,
689231
689245
  ...event.properties,
689232
- version: "5.23.3-1330-g7edd76d9d56",
689246
+ version: "5.23.3-1335-g2568e55bf04",
689233
689247
  usingAccessToken: true,
689234
689248
  ...getRunIdProperties()
689235
689249
  }
@@ -689295,7 +689309,7 @@ var UserPosthogManager = class {
689295
689309
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
689296
689310
  event: "CLI",
689297
689311
  properties: {
689298
- version: "5.23.3-1330-g7edd76d9d56",
689312
+ version: "5.23.3-1335-g2568e55bf04",
689299
689313
  ...event,
689300
689314
  ...event.properties,
689301
689315
  usingAccessToken: false,
@@ -870396,7 +870410,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
870396
870410
  var LOGS_FOLDER_NAME = "logs";
870397
870411
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
870398
870412
  function getCliSource() {
870399
- const version7 = "5.23.3-1330-g7edd76d9d56";
870413
+ const version7 = "5.23.3-1335-g2568e55bf04";
870400
870414
  return `cli@${version7}`;
870401
870415
  }
870402
870416
  var DebugLogger = class {
@@ -902957,7 +902971,7 @@ var LegacyDocsPublisher = class {
902957
902971
  previewId,
902958
902972
  disableTemplates: void 0,
902959
902973
  skipUpload,
902960
- cliVersion: "5.23.3-1330-g7edd76d9d56",
902974
+ cliVersion: "5.23.3-1335-g2568e55bf04",
902961
902975
  loginCommand: "fern auth login"
902962
902976
  });
902963
902977
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -969318,7 +969332,7 @@ function getAutomationContextFromEnv() {
969318
969332
  config_branch: process.env.FERN_CONFIG_BRANCH,
969319
969333
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
969320
969334
  trigger: process.env.GITHUB_EVENT_NAME,
969321
- cli_version: "5.23.3-1330-g7edd76d9d56"
969335
+ cli_version: "5.23.3-1335-g2568e55bf04"
969322
969336
  };
969323
969337
  }
969324
969338
  function isAutomationMode() {
@@ -970150,7 +970164,7 @@ var CliContext = class _CliContext {
970150
970164
  if (false) {
970151
970165
  this.logger.error("CLI_VERSION is not defined");
970152
970166
  }
970153
- return "5.23.3-1330-g7edd76d9d56";
970167
+ return "5.23.3-1335-g2568e55bf04";
970154
970168
  }
970155
970169
  getCliName() {
970156
970170
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.23.3-1330-g7edd76d9d56",
2
+ "version": "5.23.3-1335-g2568e55bf04",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",