@fern-api/fern-api-dev 5.67.1 → 5.68.0
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 +77 -10
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -67272,6 +67272,13 @@ var init_HeaderApiVersionScheme = __esm({
|
|
|
67272
67272
|
}
|
|
67273
67273
|
});
|
|
67274
67274
|
|
|
67275
|
+
// ../../ir-sdk/lib/sdk/api/resources/ir/types/IdempotencyKeyGeneration.js
|
|
67276
|
+
var init_IdempotencyKeyGeneration = __esm({
|
|
67277
|
+
"../../ir-sdk/lib/sdk/api/resources/ir/types/IdempotencyKeyGeneration.js"() {
|
|
67278
|
+
"use strict";
|
|
67279
|
+
}
|
|
67280
|
+
});
|
|
67281
|
+
|
|
67275
67282
|
// ../../ir-sdk/lib/sdk/api/resources/ir/types/IntermediateRepresentation.js
|
|
67276
67283
|
var init_IntermediateRepresentation = __esm({
|
|
67277
67284
|
"../../ir-sdk/lib/sdk/api/resources/ir/types/IntermediateRepresentation.js"() {
|
|
@@ -67400,6 +67407,7 @@ var init_types63 = __esm({
|
|
|
67400
67407
|
init_ExampleStyle();
|
|
67401
67408
|
init_GenerationMetadata();
|
|
67402
67409
|
init_HeaderApiVersionScheme();
|
|
67410
|
+
init_IdempotencyKeyGeneration();
|
|
67403
67411
|
init_IntermediateRepresentation();
|
|
67404
67412
|
init_InvocationSource();
|
|
67405
67413
|
init_Package();
|
|
@@ -79542,6 +79550,20 @@ var init_GenerationMetadata2 = __esm({
|
|
|
79542
79550
|
}
|
|
79543
79551
|
});
|
|
79544
79552
|
|
|
79553
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/ir/types/IdempotencyKeyGeneration.js
|
|
79554
|
+
var IdempotencyKeyGeneration;
|
|
79555
|
+
var init_IdempotencyKeyGeneration2 = __esm({
|
|
79556
|
+
"../../ir-sdk/lib/sdk/serialization/resources/ir/types/IdempotencyKeyGeneration.js"() {
|
|
79557
|
+
"use strict";
|
|
79558
|
+
init_core2();
|
|
79559
|
+
init_HttpMethod4();
|
|
79560
|
+
IdempotencyKeyGeneration = schemas_exports3.objectWithoutOptionalProperties({
|
|
79561
|
+
headerName: schemas_exports3.string(),
|
|
79562
|
+
methods: schemas_exports3.list(HttpMethod4)
|
|
79563
|
+
});
|
|
79564
|
+
}
|
|
79565
|
+
});
|
|
79566
|
+
|
|
79545
79567
|
// ../../ir-sdk/lib/sdk/serialization/resources/publish/types/CratesPublishTarget.js
|
|
79546
79568
|
var CratesPublishTarget;
|
|
79547
79569
|
var init_CratesPublishTarget2 = __esm({
|
|
@@ -81375,13 +81397,15 @@ var init_SdkConfig2 = __esm({
|
|
|
81375
81397
|
"../../ir-sdk/lib/sdk/serialization/resources/ir/types/SdkConfig.js"() {
|
|
81376
81398
|
"use strict";
|
|
81377
81399
|
init_core2();
|
|
81400
|
+
init_IdempotencyKeyGeneration2();
|
|
81378
81401
|
init_PlatformHeaders2();
|
|
81379
81402
|
SdkConfig = schemas_exports3.objectWithoutOptionalProperties({
|
|
81380
81403
|
isAuthMandatory: schemas_exports3.boolean(),
|
|
81381
81404
|
hasStreamingEndpoints: schemas_exports3.boolean(),
|
|
81382
81405
|
hasPaginatedEndpoints: schemas_exports3.boolean(),
|
|
81383
81406
|
hasFileDownloadEndpoints: schemas_exports3.boolean(),
|
|
81384
|
-
platformHeaders: PlatformHeaders
|
|
81407
|
+
platformHeaders: PlatformHeaders,
|
|
81408
|
+
idempotencyKeyGeneration: IdempotencyKeyGeneration.optional()
|
|
81385
81409
|
});
|
|
81386
81410
|
}
|
|
81387
81411
|
});
|
|
@@ -81521,6 +81545,7 @@ var init_types92 = __esm({
|
|
|
81521
81545
|
init_ExampleStyle2();
|
|
81522
81546
|
init_GenerationMetadata2();
|
|
81523
81547
|
init_HeaderApiVersionScheme2();
|
|
81548
|
+
init_IdempotencyKeyGeneration2();
|
|
81524
81549
|
init_IntermediateRepresentation2();
|
|
81525
81550
|
init_InvocationSource2();
|
|
81526
81551
|
init_Package2();
|
|
@@ -81549,6 +81574,7 @@ __export(ir_exports4, {
|
|
|
81549
81574
|
ExampleStyle: () => ExampleStyle2,
|
|
81550
81575
|
GenerationMetadata: () => GenerationMetadata,
|
|
81551
81576
|
HeaderApiVersionScheme: () => HeaderApiVersionScheme,
|
|
81577
|
+
IdempotencyKeyGeneration: () => IdempotencyKeyGeneration,
|
|
81552
81578
|
IntermediateRepresentation: () => IntermediateRepresentation,
|
|
81553
81579
|
InvocationSource: () => InvocationSource2,
|
|
81554
81580
|
Package: () => Package,
|
|
@@ -82851,6 +82877,7 @@ __export(serialization_exports2, {
|
|
|
82851
82877
|
HttpResponse: () => HttpResponse,
|
|
82852
82878
|
HttpResponseBody: () => HttpResponseBody2,
|
|
82853
82879
|
HttpService: () => HttpService,
|
|
82880
|
+
IdempotencyKeyGeneration: () => IdempotencyKeyGeneration,
|
|
82854
82881
|
InferredAuthScheme: () => InferredAuthScheme,
|
|
82855
82882
|
InferredAuthSchemeTokenEndpoint: () => InferredAuthSchemeTokenEndpoint,
|
|
82856
82883
|
InferredAuthenticatedRequestHeader: () => InferredAuthenticatedRequestHeader2,
|
|
@@ -83903,6 +83930,30 @@ function getUserAgentTemplateFromGeneratorConfig(generatorInvocation) {
|
|
|
83903
83930
|
}
|
|
83904
83931
|
return void 0;
|
|
83905
83932
|
}
|
|
83933
|
+
function parseIdempotencyKeyMethods(value2) {
|
|
83934
|
+
if (!Array.isArray(value2)) {
|
|
83935
|
+
return DEFAULT_IDEMPOTENCY_KEY_METHODS;
|
|
83936
|
+
}
|
|
83937
|
+
const methods = value2.filter((entry) => typeof entry === "string").map((entry) => entry.toUpperCase()).filter((entry) => ALL_HTTP_METHODS.has(entry));
|
|
83938
|
+
return methods.length > 0 ? methods : DEFAULT_IDEMPOTENCY_KEY_METHODS;
|
|
83939
|
+
}
|
|
83940
|
+
function getIdempotencyKeyGenerationFromGeneratorConfig(generatorInvocation) {
|
|
83941
|
+
if (typeof generatorInvocation.raw?.config !== "object" || generatorInvocation.raw?.config === null) {
|
|
83942
|
+
return void 0;
|
|
83943
|
+
}
|
|
83944
|
+
const value2 = generatorInvocation.raw.config["auto-generate-idempotency-key"];
|
|
83945
|
+
if (value2 === true) {
|
|
83946
|
+
return { headerName: DEFAULT_IDEMPOTENCY_KEY_HEADER, methods: DEFAULT_IDEMPOTENCY_KEY_METHODS };
|
|
83947
|
+
}
|
|
83948
|
+
if (typeof value2 === "object" && value2 !== null) {
|
|
83949
|
+
const headerName = value2["header-name"];
|
|
83950
|
+
return {
|
|
83951
|
+
headerName: typeof headerName === "string" ? headerName : DEFAULT_IDEMPOTENCY_KEY_HEADER,
|
|
83952
|
+
methods: parseIdempotencyKeyMethods(value2["methods"])
|
|
83953
|
+
};
|
|
83954
|
+
}
|
|
83955
|
+
return void 0;
|
|
83956
|
+
}
|
|
83906
83957
|
function stripCliConfigKeys(config5) {
|
|
83907
83958
|
if (typeof config5 !== "object" || config5 === null) {
|
|
83908
83959
|
return config5;
|
|
@@ -84068,13 +84119,16 @@ function getRegistryName(language) {
|
|
|
84068
84119
|
return language;
|
|
84069
84120
|
}
|
|
84070
84121
|
}
|
|
84071
|
-
var CLI_ONLY_CONFIG_KEYS, REGISTRY_TIMEOUT_MS;
|
|
84122
|
+
var DEFAULT_IDEMPOTENCY_KEY_HEADER, DEFAULT_IDEMPOTENCY_KEY_METHODS, ALL_HTTP_METHODS, CLI_ONLY_CONFIG_KEYS, REGISTRY_TIMEOUT_MS;
|
|
84072
84123
|
var init_checkVersionExists = __esm({
|
|
84073
84124
|
"../../commons/api-workspace-commons/lib/checkVersionExists.js"() {
|
|
84074
84125
|
"use strict";
|
|
84075
84126
|
init_lib4();
|
|
84076
84127
|
init_lib6();
|
|
84077
|
-
|
|
84128
|
+
DEFAULT_IDEMPOTENCY_KEY_HEADER = "Idempotency-Key";
|
|
84129
|
+
DEFAULT_IDEMPOTENCY_KEY_METHODS = ["POST", "PUT"];
|
|
84130
|
+
ALL_HTTP_METHODS = /* @__PURE__ */ new Set(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"]);
|
|
84131
|
+
CLI_ONLY_CONFIG_KEYS = /* @__PURE__ */ new Set(["user-agent", "auto-generate-idempotency-key"]);
|
|
84078
84132
|
REGISTRY_TIMEOUT_MS = 5e3;
|
|
84079
84133
|
}
|
|
84080
84134
|
});
|
|
@@ -276640,7 +276694,7 @@ var init_getIrGenerationSettings = __esm({
|
|
|
276640
276694
|
});
|
|
276641
276695
|
|
|
276642
276696
|
// ../generation/ir-generator/lib/generateIntermediateRepresentation.js
|
|
276643
|
-
function generateIntermediateRepresentation({ workspace, generationLanguage, keywords: keywords3, smartCasing, exampleGeneration, audiences, readme, packageName, userAgentTemplate, organization, version: version7, context: context3, fdrApiDefinitionId, sourceResolver, disableDynamicExamples, dynamicGeneratorConfig, generationMetadata }) {
|
|
276697
|
+
function generateIntermediateRepresentation({ workspace, generationLanguage, keywords: keywords3, smartCasing, exampleGeneration, audiences, readme, packageName, userAgentTemplate, idempotencyKeyGeneration, organization, version: version7, context: context3, fdrApiDefinitionId, sourceResolver, disableDynamicExamples, dynamicGeneratorConfig, generationMetadata }) {
|
|
276644
276698
|
const irSettings = getIrGenerationSettings({ workspace });
|
|
276645
276699
|
const casingsGenerator = constructCasingsGenerator({ generationLanguage, keywords: keywords3, smartCasing });
|
|
276646
276700
|
const irGraph = new IrGraph(audiences);
|
|
@@ -276978,6 +277032,7 @@ function generateIntermediateRepresentation({ workspace, generationLanguage, key
|
|
|
276978
277032
|
hasStreamingEndpoints,
|
|
276979
277033
|
hasPaginatedEndpoints,
|
|
276980
277034
|
hasFileDownloadEndpoints,
|
|
277035
|
+
idempotencyKeyGeneration,
|
|
276981
277036
|
platformHeaders: {
|
|
276982
277037
|
language: "X-Fern-Language",
|
|
276983
277038
|
sdkName: "X-Fern-SDK-Name",
|
|
@@ -342420,6 +342475,7 @@ var init_AbstractSpecConverter = __esm({
|
|
|
342420
342475
|
hasPaginatedEndpoints: false,
|
|
342421
342476
|
hasStreamingEndpoints: false,
|
|
342422
342477
|
isAuthMandatory: true,
|
|
342478
|
+
idempotencyKeyGeneration: void 0,
|
|
342423
342479
|
platformHeaders: {
|
|
342424
342480
|
language: "",
|
|
342425
342481
|
sdkName: "",
|
|
@@ -689087,7 +689143,7 @@ var AccessTokenPosthogManager = class {
|
|
|
689087
689143
|
properties: {
|
|
689088
689144
|
...event,
|
|
689089
689145
|
...event.properties,
|
|
689090
|
-
version: "5.
|
|
689146
|
+
version: "5.68.0",
|
|
689091
689147
|
usingAccessToken: true,
|
|
689092
689148
|
...getRunIdProperties()
|
|
689093
689149
|
}
|
|
@@ -689153,7 +689209,7 @@ var UserPosthogManager = class {
|
|
|
689153
689209
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
689154
689210
|
event: "CLI",
|
|
689155
689211
|
properties: {
|
|
689156
|
-
version: "5.
|
|
689212
|
+
version: "5.68.0",
|
|
689157
689213
|
...event,
|
|
689158
689214
|
...event.properties,
|
|
689159
689215
|
usingAccessToken: false,
|
|
@@ -870254,7 +870310,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
870254
870310
|
var LOGS_FOLDER_NAME = "logs";
|
|
870255
870311
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
870256
870312
|
function getCliSource() {
|
|
870257
|
-
const version7 = "5.
|
|
870313
|
+
const version7 = "5.68.0";
|
|
870258
870314
|
return `cli@${version7}`;
|
|
870259
870315
|
}
|
|
870260
870316
|
var DebugLogger = class {
|
|
@@ -900060,6 +900116,7 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
900060
900116
|
}
|
|
900061
900117
|
const effectiveIrVersion = resolvedVersion != null && (0, import_autoversion.isAutoVersion)(resolvedVersion) ? import_autoversion.MAGIC_VERSION : resolvedVersion;
|
|
900062
900118
|
const userAgentTemplate = getUserAgentTemplateFromGeneratorConfig(generatorInvocation);
|
|
900119
|
+
const idempotencyKeyGeneration = getIdempotencyKeyGenerationFromGeneratorConfig(generatorInvocation);
|
|
900063
900120
|
const ir3 = generateIntermediateRepresentation({
|
|
900064
900121
|
workspace,
|
|
900065
900122
|
generationLanguage: generatorInvocation.language,
|
|
@@ -900074,6 +900131,7 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
900074
900131
|
readme,
|
|
900075
900132
|
packageName,
|
|
900076
900133
|
userAgentTemplate,
|
|
900134
|
+
idempotencyKeyGeneration,
|
|
900077
900135
|
organization,
|
|
900078
900136
|
version: effectiveIrVersion,
|
|
900079
900137
|
context: interactiveTaskContext,
|
|
@@ -902813,7 +902871,7 @@ var LegacyDocsPublisher = class {
|
|
|
902813
902871
|
previewId,
|
|
902814
902872
|
disableTemplates: void 0,
|
|
902815
902873
|
skipUpload,
|
|
902816
|
-
cliVersion: "5.
|
|
902874
|
+
cliVersion: "5.68.0",
|
|
902817
902875
|
loginCommand: "fern auth login"
|
|
902818
902876
|
});
|
|
902819
902877
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -922377,6 +922435,8 @@ var Generation = class {
|
|
|
922377
922435
|
extraDependencies: () => this.customConfig["extra-dependencies"] ?? {},
|
|
922378
922436
|
/** When true, omits Fern platform headers (X-Fern-Language, SDK name/version, User-Agent) from generated SDK requests. Default: false. */
|
|
922379
922437
|
omitFernHeaders: () => this.customConfig["omit-fern-headers"] ?? false,
|
|
922438
|
+
/** When true, emits the platform observability headers (X-Fern-Runtime, X-Fern-Runtime-Version, X-Fern-Platform). Default: false. Still subject to omitFernHeaders. */
|
|
922439
|
+
includePlatformHeaders: () => this.customConfig["include-platform-headers"] ?? false,
|
|
922380
922440
|
/** When true, falls back to `<NuGetPackageId>/<version>` for the `User-Agent` header when the IR doesn't supply one. Default: false. */
|
|
922381
922441
|
userAgentNameFromPackage: () => this.customConfig["user-agent-name-from-package"] ?? false,
|
|
922382
922442
|
/** When true, moves auth params and IR headers into ClientOptions so the constructor takes only named arguments. Default: false. */
|
|
@@ -928964,6 +929024,7 @@ var BaseJavaCustomConfigSchema = external_exports2.object({
|
|
|
928964
929024
|
"output-directory": external_exports2.enum(["source-root", "project-root"]).optional(),
|
|
928965
929025
|
"custom-interceptors": external_exports2.boolean().optional(),
|
|
928966
929026
|
"omit-fern-headers": external_exports2.boolean().optional(),
|
|
929027
|
+
includePlatformHeaders: external_exports2.boolean().optional(),
|
|
928967
929028
|
"retry-status-codes": external_exports2.optional(external_exports2.enum(["legacy", "recommended"])),
|
|
928968
929029
|
// Hidden options (for debugging).
|
|
928969
929030
|
"enable-gradle-profiling": external_exports2.boolean().optional(),
|
|
@@ -952791,6 +952852,7 @@ var TypescriptCustomConfigSchema = external_exports2.strictObject({
|
|
|
952791
952852
|
fetchSupport: external_exports2.optional(external_exports2.enum(["node-fetch", "native"])),
|
|
952792
952853
|
packagePath: external_exports2.optional(external_exports2.string()),
|
|
952793
952854
|
omitFernHeaders: external_exports2.optional(external_exports2.boolean()),
|
|
952855
|
+
includePlatformHeaders: external_exports2.optional(external_exports2.boolean()),
|
|
952794
952856
|
useDefaultRequestParameterValues: external_exports2.optional(external_exports2.boolean()),
|
|
952795
952857
|
packageManager: external_exports2.optional(external_exports2.enum(["pnpm", "yarn"])),
|
|
952796
952858
|
flattenRequestParameters: external_exports2.optional(external_exports2.boolean()),
|
|
@@ -955667,6 +955729,7 @@ init_lib26();
|
|
|
955667
955729
|
init_lib22();
|
|
955668
955730
|
async function getIntermediateRepresentation({ workspace, audiences, generatorInvocation, context: context3, irVersionOverride, version: version7, packageName, userAgentTemplate, organization, sourceConfig, includeOptionalRequestPropertyExamples, ir: ir3 }) {
|
|
955669
955731
|
const resolvedUserAgentTemplate = userAgentTemplate ?? getUserAgentTemplateFromGeneratorConfig(generatorInvocation);
|
|
955732
|
+
const idempotencyKeyGeneration = getIdempotencyKeyGenerationFromGeneratorConfig(generatorInvocation);
|
|
955670
955733
|
const intermediateRepresentation = ir3 ?? generateIntermediateRepresentation({
|
|
955671
955734
|
workspace,
|
|
955672
955735
|
audiences,
|
|
@@ -955681,6 +955744,7 @@ async function getIntermediateRepresentation({ workspace, audiences, generatorIn
|
|
|
955681
955744
|
version: version7,
|
|
955682
955745
|
packageName,
|
|
955683
955746
|
userAgentTemplate: resolvedUserAgentTemplate,
|
|
955747
|
+
idempotencyKeyGeneration,
|
|
955684
955748
|
organization,
|
|
955685
955749
|
context: context3,
|
|
955686
955750
|
sourceResolver: new SourceResolverImpl(context3, workspace),
|
|
@@ -957005,6 +957069,7 @@ async function runLocalGenerationForWorkspace({ token, projectConfig, workspace,
|
|
|
957005
957069
|
});
|
|
957006
957070
|
const packageName = getPackageNameFromGeneratorConfig(generatorInvocation);
|
|
957007
957071
|
const userAgentTemplate = getUserAgentTemplateFromGeneratorConfig(generatorInvocation);
|
|
957072
|
+
const idempotencyKeyGeneration = getIdempotencyKeyGenerationFromGeneratorConfig(generatorInvocation);
|
|
957008
957073
|
version7 = version7 ?? await computeSemanticVersion({ packageName, generatorInvocation });
|
|
957009
957074
|
const irLanguage = generatorInvocation.language ?? (0, import_autoversion4.extractLanguageFromGeneratorName)(generatorInvocation.name);
|
|
957010
957075
|
const effectiveIrVersion = version7 != null && (0, import_autoversion4.isAutoVersion)(version7) ? (0, import_autoversion4.mapMagicVersionForLanguage)(import_autoversion4.MAGIC_VERSION, irLanguage) : version7;
|
|
@@ -957022,6 +957087,7 @@ async function runLocalGenerationForWorkspace({ token, projectConfig, workspace,
|
|
|
957022
957087
|
version: effectiveIrVersion,
|
|
957023
957088
|
packageName,
|
|
957024
957089
|
userAgentTemplate,
|
|
957090
|
+
idempotencyKeyGeneration,
|
|
957025
957091
|
organization: projectConfig.organization,
|
|
957026
957092
|
context: context3,
|
|
957027
957093
|
sourceResolver: new SourceResolverImpl(context3, fernWorkspace),
|
|
@@ -957564,6 +957630,7 @@ var GenerationRunner = class {
|
|
|
957564
957630
|
version: outputVersionOverride,
|
|
957565
957631
|
packageName: generators_yml_exports.getPackageName({ generatorInvocation }),
|
|
957566
957632
|
userAgentTemplate: getUserAgentTemplateFromGeneratorConfig(generatorInvocation),
|
|
957633
|
+
idempotencyKeyGeneration: getIdempotencyKeyGenerationFromGeneratorConfig(generatorInvocation),
|
|
957567
957634
|
organization,
|
|
957568
957635
|
context: context3,
|
|
957569
957636
|
sourceResolver: new SourceResolverImpl(context3, workspace),
|
|
@@ -969152,7 +969219,7 @@ function getAutomationContextFromEnv() {
|
|
|
969152
969219
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
969153
969220
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
969154
969221
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
969155
|
-
cli_version: "5.
|
|
969222
|
+
cli_version: "5.68.0"
|
|
969156
969223
|
};
|
|
969157
969224
|
}
|
|
969158
969225
|
function isAutomationMode() {
|
|
@@ -969984,7 +970051,7 @@ var CliContext = class _CliContext {
|
|
|
969984
970051
|
if (false) {
|
|
969985
970052
|
this.logger.error("CLI_VERSION is not defined");
|
|
969986
970053
|
}
|
|
969987
|
-
return "5.
|
|
970054
|
+
return "5.68.0";
|
|
969988
970055
|
}
|
|
969989
970056
|
getCliName() {
|
|
969990
970057
|
if (false) {
|
package/package.json
CHANGED