@fern-api/fern-api-dev 5.96.0 → 5.97.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 +32 -11
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -703038,7 +703038,7 @@ var AccessTokenPosthogManager = class {
|
|
|
703038
703038
|
properties: {
|
|
703039
703039
|
...event,
|
|
703040
703040
|
...event.properties,
|
|
703041
|
-
version: "5.
|
|
703041
|
+
version: "5.97.0",
|
|
703042
703042
|
usingAccessToken: true,
|
|
703043
703043
|
...getRunIdProperties()
|
|
703044
703044
|
}
|
|
@@ -703104,7 +703104,7 @@ var UserPosthogManager = class {
|
|
|
703104
703104
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
703105
703105
|
event: "CLI",
|
|
703106
703106
|
properties: {
|
|
703107
|
-
version: "5.
|
|
703107
|
+
version: "5.97.0",
|
|
703108
703108
|
...event,
|
|
703109
703109
|
...event.properties,
|
|
703110
703110
|
usingAccessToken: false,
|
|
@@ -848222,8 +848222,8 @@ var V67_TO_V66_MIGRATION = {
|
|
|
848222
848222
|
[GeneratorName.SWIFT_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR,
|
|
848223
848223
|
[GeneratorName.PHP_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR,
|
|
848224
848224
|
[GeneratorName.PHP_SDK]: "2.11.2-rc.0",
|
|
848225
|
-
[GeneratorName.RUST_MODEL]:
|
|
848226
|
-
[GeneratorName.RUST_SDK]:
|
|
848225
|
+
[GeneratorName.RUST_MODEL]: "0.6.0-rc.0",
|
|
848226
|
+
[GeneratorName.RUST_SDK]: "0.46.0",
|
|
848227
848227
|
[GeneratorName.CLI]: "0.0.1"
|
|
848228
848228
|
},
|
|
848229
848229
|
jsonifyEarlierVersion: (ir3) => IrSerialization_exports.V66.IntermediateRepresentation.jsonOrThrow(ir3, {
|
|
@@ -884270,7 +884270,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
884270
884270
|
var LOGS_FOLDER_NAME = "logs";
|
|
884271
884271
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
884272
884272
|
function getCliSource() {
|
|
884273
|
-
const version7 = "5.
|
|
884273
|
+
const version7 = "5.97.0";
|
|
884274
884274
|
return `cli@${version7}`;
|
|
884275
884275
|
}
|
|
884276
884276
|
var DebugLogger = class {
|
|
@@ -909586,7 +909586,7 @@ var LegacyDocsPublisher = class {
|
|
|
909586
909586
|
previewId,
|
|
909587
909587
|
disableTemplates: void 0,
|
|
909588
909588
|
skipUpload,
|
|
909589
|
-
cliVersion: "5.
|
|
909589
|
+
cliVersion: "5.97.0",
|
|
909590
909590
|
loginCommand: "fern auth login"
|
|
909591
909591
|
});
|
|
909592
909592
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -954849,18 +954849,39 @@ var EndpointSnippetGenerator7 = class {
|
|
|
954849
954849
|
}
|
|
954850
954850
|
getMethodArgsForBodyRequest({ request: request7, snippet }) {
|
|
954851
954851
|
const args = [];
|
|
954852
|
+
const bodyMayBeOmitted = this.bodyMayBeOmitted({ request: request7 });
|
|
954853
|
+
const omitsBody = bodyMayBeOmitted && this.callOmitsRequestBody({ snippet });
|
|
954852
954854
|
const requestComponents = this.buildRequestComponents({
|
|
954853
954855
|
pathParameters: [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []],
|
|
954854
954856
|
snippet,
|
|
954855
|
-
body: request7.body
|
|
954857
|
+
body: omitsBody ? void 0 : request7.body
|
|
954856
954858
|
});
|
|
954857
954859
|
args.push(...requestComponents.pathArgs);
|
|
954858
|
-
if (
|
|
954859
|
-
args.push(rust_exports.Expression.
|
|
954860
|
+
if (omitsBody) {
|
|
954861
|
+
args.push(rust_exports.Expression.raw("None"));
|
|
954862
|
+
} else if (requestComponents.bodyArg != null) {
|
|
954863
|
+
const bodyArg = rust_exports.Expression.referenceOf(requestComponents.bodyArg);
|
|
954864
|
+
args.push(bodyMayBeOmitted ? rust_exports.Expression.functionCall("Some", [bodyArg]) : bodyArg);
|
|
954860
954865
|
}
|
|
954861
954866
|
args.push(rust_exports.Expression.raw("None"));
|
|
954862
954867
|
return args;
|
|
954863
954868
|
}
|
|
954869
|
+
/**
|
|
954870
|
+
* Whether the generated body parameter is an `Option`, which mirrors the condition the SDK
|
|
954871
|
+
* generator applies before it lets a caller leave the body out. Reading `bodyRequired` at all is
|
|
954872
|
+
* opt-in so that existing snippets keep the shape they always had.
|
|
954873
|
+
*/
|
|
954874
|
+
bodyMayBeOmitted({ request: request7 }) {
|
|
954875
|
+
return this.context.customConfig?.respectOptionalRequestBody === true && request7.bodyRequired === false && request7.body?.type === "typeReference";
|
|
954876
|
+
}
|
|
954877
|
+
/**
|
|
954878
|
+
* Whether the call leaves the body out entirely, which `None` expresses. Only an absent body
|
|
954879
|
+
* counts: an example that documents an empty object still sends that object, so it keeps
|
|
954880
|
+
* rendering a body expression.
|
|
954881
|
+
*/
|
|
954882
|
+
callOmitsRequestBody({ snippet }) {
|
|
954883
|
+
return snippet.requestBody == null;
|
|
954884
|
+
}
|
|
954864
954885
|
getMethodArgsForInlinedRequest({ endpoint: endpoint3, request: request7, snippet }) {
|
|
954865
954886
|
const args = [];
|
|
954866
954887
|
this.context.errors.scope(Scope4.PathParameters);
|
|
@@ -976802,7 +976823,7 @@ function getAutomationContextFromEnv() {
|
|
|
976802
976823
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
976803
976824
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
976804
976825
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
976805
|
-
cli_version: "5.
|
|
976826
|
+
cli_version: "5.97.0"
|
|
976806
976827
|
};
|
|
976807
976828
|
}
|
|
976808
976829
|
function isAutomationMode() {
|
|
@@ -977634,7 +977655,7 @@ var CliContext = class _CliContext {
|
|
|
977634
977655
|
if (false) {
|
|
977635
977656
|
this.logger.error("CLI_VERSION is not defined");
|
|
977636
977657
|
}
|
|
977637
|
-
return "5.
|
|
977658
|
+
return "5.97.0";
|
|
977638
977659
|
}
|
|
977639
977660
|
getCliName() {
|
|
977640
977661
|
if (false) {
|
package/package.json
CHANGED