@fern-api/fern-api-dev 5.23.3-84-g4ddf0842ad3 → 5.23.3-94-g1434a7f90c8
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 +57 -37
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -667930,7 +667930,7 @@ var AccessTokenPosthogManager = class {
|
|
|
667930
667930
|
properties: {
|
|
667931
667931
|
...event,
|
|
667932
667932
|
...event.properties,
|
|
667933
|
-
version: "5.23.3-
|
|
667933
|
+
version: "5.23.3-94-g1434a7f90c8",
|
|
667934
667934
|
usingAccessToken: true,
|
|
667935
667935
|
...getRunIdProperties()
|
|
667936
667936
|
}
|
|
@@ -667985,7 +667985,7 @@ var UserPosthogManager = class {
|
|
|
667985
667985
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
667986
667986
|
event: "CLI",
|
|
667987
667987
|
properties: {
|
|
667988
|
-
version: "5.23.3-
|
|
667988
|
+
version: "5.23.3-94-g1434a7f90c8",
|
|
667989
667989
|
...event,
|
|
667990
667990
|
...event.properties,
|
|
667991
667991
|
usingAccessToken: false,
|
|
@@ -859541,7 +859541,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
859541
859541
|
var LOGS_FOLDER_NAME = "logs";
|
|
859542
859542
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
859543
859543
|
function getCliSource() {
|
|
859544
|
-
const version7 = "5.23.3-
|
|
859544
|
+
const version7 = "5.23.3-94-g1434a7f90c8";
|
|
859545
859545
|
return `cli@${version7}`;
|
|
859546
859546
|
}
|
|
859547
859547
|
var DebugLogger = class {
|
|
@@ -873514,7 +873514,7 @@ var LegacyDocsPublisher = class {
|
|
|
873514
873514
|
previewId,
|
|
873515
873515
|
disableTemplates: void 0,
|
|
873516
873516
|
skipUpload,
|
|
873517
|
-
cliVersion: "5.23.3-
|
|
873517
|
+
cliVersion: "5.23.3-94-g1434a7f90c8",
|
|
873518
873518
|
loginCommand: "fern auth login"
|
|
873519
873519
|
});
|
|
873520
873520
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -878121,23 +878121,16 @@ var AbstractDynamicSnippetsGeneratorContext = class {
|
|
|
878121
878121
|
}
|
|
878122
878122
|
associateByWireValue({ parameters: parameters2, values: values2, ignoreMissingParameters }) {
|
|
878123
878123
|
const instances2 = [];
|
|
878124
|
-
|
|
878124
|
+
const matchedWireValues = /* @__PURE__ */ new Set();
|
|
878125
|
+
for (const parameter6 of parameters2) {
|
|
878126
|
+
const wireValue = parameter6.name.wireValue;
|
|
878127
|
+
const value2 = values2[wireValue];
|
|
878125
878128
|
if (value2 === void 0) {
|
|
878126
878129
|
continue;
|
|
878127
878130
|
}
|
|
878128
|
-
|
|
878131
|
+
matchedWireValues.add(wireValue);
|
|
878132
|
+
this.errors.scope(wireValue);
|
|
878129
878133
|
try {
|
|
878130
|
-
const parameter6 = parameters2.find((param) => param.name.wireValue === key2);
|
|
878131
|
-
if (parameter6 == null) {
|
|
878132
|
-
if (ignoreMissingParameters) {
|
|
878133
|
-
continue;
|
|
878134
|
-
}
|
|
878135
|
-
this.errors.add({
|
|
878136
|
-
severity: Severity.Critical,
|
|
878137
|
-
message: this.newParameterNotRecognizedError(key2).message
|
|
878138
|
-
});
|
|
878139
|
-
continue;
|
|
878140
|
-
}
|
|
878141
878134
|
instances2.push({
|
|
878142
878135
|
name: parameter6.name,
|
|
878143
878136
|
typeReference: parameter6.typeReference,
|
|
@@ -878147,6 +878140,22 @@ var AbstractDynamicSnippetsGeneratorContext = class {
|
|
|
878147
878140
|
this.errors.unscope();
|
|
878148
878141
|
}
|
|
878149
878142
|
}
|
|
878143
|
+
if (!ignoreMissingParameters) {
|
|
878144
|
+
for (const [key2, value2] of Object.entries(values2)) {
|
|
878145
|
+
if (value2 === void 0 || matchedWireValues.has(key2)) {
|
|
878146
|
+
continue;
|
|
878147
|
+
}
|
|
878148
|
+
this.errors.scope(key2);
|
|
878149
|
+
try {
|
|
878150
|
+
this.errors.add({
|
|
878151
|
+
severity: Severity.Critical,
|
|
878152
|
+
message: this.newParameterNotRecognizedError(key2).message
|
|
878153
|
+
});
|
|
878154
|
+
} finally {
|
|
878155
|
+
this.errors.unscope();
|
|
878156
|
+
}
|
|
878157
|
+
}
|
|
878158
|
+
}
|
|
878150
878159
|
return instances2;
|
|
878151
878160
|
}
|
|
878152
878161
|
/**
|
|
@@ -902637,7 +902646,8 @@ var EndpointSnippetGenerator4 = class {
|
|
|
902637
902646
|
const args = [];
|
|
902638
902647
|
const pathParameters = this.context.associateByWireValue({
|
|
902639
902648
|
parameters: namedParameters,
|
|
902640
|
-
values: snippet2.pathParameters ?? {}
|
|
902649
|
+
values: snippet2.pathParameters ?? {},
|
|
902650
|
+
ignoreMissingParameters: true
|
|
902641
902651
|
});
|
|
902642
902652
|
for (const parameter6 of pathParameters) {
|
|
902643
902653
|
args.push({
|
|
@@ -908821,11 +908831,6 @@ var EndpointSnippetGenerator6 = class {
|
|
|
908821
908831
|
});
|
|
908822
908832
|
}
|
|
908823
908833
|
}
|
|
908824
|
-
this.context.errors.scope(Scope4.PathParameters);
|
|
908825
|
-
if (this.context.ir.pathParameters != null) {
|
|
908826
|
-
fields.push(...this.getPathParameters({ namedParameters: this.context.ir.pathParameters, snippet: snippet2 }));
|
|
908827
|
-
}
|
|
908828
|
-
this.context.errors.unscope();
|
|
908829
908834
|
this.context.errors.scope(Scope4.Headers);
|
|
908830
908835
|
if (this.context.ir.headers != null && snippet2.headers != null) {
|
|
908831
908836
|
fields.push(...this.getConstructorHeaderArgs({ headers: this.context.ir.headers, values: snippet2.headers }));
|
|
@@ -909309,9 +909314,10 @@ var EndpointSnippetGenerator6 = class {
|
|
|
909309
909314
|
const args = [];
|
|
909310
909315
|
const inlinePathParameters = this.context.shouldInlinePathParameters();
|
|
909311
909316
|
this.context.errors.scope(Scope4.PathParameters);
|
|
909317
|
+
const pathParameters = [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []];
|
|
909312
909318
|
const pathParameterFields = [];
|
|
909313
|
-
if (
|
|
909314
|
-
pathParameterFields.push(...this.getPathParameters({ namedParameters:
|
|
909319
|
+
if (pathParameters.length > 0) {
|
|
909320
|
+
pathParameterFields.push(...this.getPathParameters({ namedParameters: pathParameters, snippet: snippet2 }));
|
|
909315
909321
|
}
|
|
909316
909322
|
this.context.errors.unscope();
|
|
909317
909323
|
this.context.errors.scope(Scope4.RequestBody);
|
|
@@ -912089,9 +912095,10 @@ var EndpointSnippetGenerator7 = class {
|
|
|
912089
912095
|
}
|
|
912090
912096
|
getMethodArgsForInlinedRequest({ request: request7, snippet: snippet2 }) {
|
|
912091
912097
|
const args = [];
|
|
912098
|
+
const pathParameters = [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []];
|
|
912092
912099
|
args.push(...this.getNamedParameterArgs({
|
|
912093
912100
|
kind: "PathParameters",
|
|
912094
|
-
namedParameters:
|
|
912101
|
+
namedParameters: pathParameters,
|
|
912095
912102
|
values: snippet2.pathParameters
|
|
912096
912103
|
}));
|
|
912097
912104
|
args.push(...this.getNamedParameterArgs({
|
|
@@ -912199,9 +912206,10 @@ var EndpointSnippetGenerator7 = class {
|
|
|
912199
912206
|
}
|
|
912200
912207
|
getMethodArgsForBodyRequest({ request: request7, snippet: snippet2 }) {
|
|
912201
912208
|
const args = [];
|
|
912209
|
+
const pathParameters = [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []];
|
|
912202
912210
|
args.push(...this.getNamedParameterArgs({
|
|
912203
912211
|
kind: "PathParameters",
|
|
912204
|
-
namedParameters:
|
|
912212
|
+
namedParameters: pathParameters,
|
|
912205
912213
|
values: snippet2.pathParameters
|
|
912206
912214
|
}));
|
|
912207
912215
|
if (request7.body != null && snippet2.requestBody != null) {
|
|
@@ -922028,10 +922036,11 @@ var EndpointSnippetGenerator9 = class {
|
|
|
922028
922036
|
getEndpointMethodArgsForInlinedRequest({ request: request7, snippet: snippet2 }) {
|
|
922029
922037
|
const args = [];
|
|
922030
922038
|
this.context.errors.scope(Scope4.PathParameters);
|
|
922039
|
+
const pathParameters = [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []];
|
|
922031
922040
|
const pathParameterFields = [];
|
|
922032
|
-
if (
|
|
922041
|
+
if (pathParameters.length > 0) {
|
|
922033
922042
|
pathParameterFields.push(...this.getEndpointMethodPathParameters({
|
|
922034
|
-
namedParameters:
|
|
922043
|
+
namedParameters: pathParameters,
|
|
922035
922044
|
snippet: snippet2
|
|
922036
922045
|
}));
|
|
922037
922046
|
}
|
|
@@ -922070,21 +922079,33 @@ var EndpointSnippetGenerator9 = class {
|
|
|
922070
922079
|
return args;
|
|
922071
922080
|
}
|
|
922072
922081
|
getEndpointMethodPathParameters({ namedParameters, snippet: snippet2 }) {
|
|
922073
|
-
const moduleSymbol = this.context.nameRegistry.getRegisteredSourceModuleSymbolOrThrow();
|
|
922074
922082
|
return this.context.getExampleObjectProperties({
|
|
922075
922083
|
parameters: namedParameters,
|
|
922076
922084
|
snippetObject: snippet2.pathParameters ?? {}
|
|
922077
922085
|
}).map((parameter6) => {
|
|
922078
922086
|
return swift_exports.functionArgument({
|
|
922079
922087
|
label: parameter6.name.name.camelCase.unsafeName,
|
|
922080
|
-
|
|
922081
|
-
|
|
922082
|
-
|
|
922083
|
-
|
|
922084
|
-
|
|
922088
|
+
// Generated Swift SDKs declare every path parameter as `String` in
|
|
922089
|
+
// the endpoint method signature (the value is interpolated into the
|
|
922090
|
+
// URL string), so render non-string primitive literals as their
|
|
922091
|
+
// String representation here to keep the rendered snippet's
|
|
922092
|
+
// argument type compatible with the SDK signature.
|
|
922093
|
+
value: this.renderPathParameterValueAsSwiftString({ value: parameter6.value })
|
|
922085
922094
|
});
|
|
922086
922095
|
});
|
|
922087
922096
|
}
|
|
922097
|
+
renderPathParameterValueAsSwiftString({ value: value2 }) {
|
|
922098
|
+
if (typeof value2 === "string") {
|
|
922099
|
+
return swift_exports.Expression.escapedStringLiteral(value2);
|
|
922100
|
+
}
|
|
922101
|
+
if (typeof value2 === "number" || typeof value2 === "boolean" || typeof value2 === "bigint") {
|
|
922102
|
+
return swift_exports.Expression.escapedStringLiteral(String(value2));
|
|
922103
|
+
}
|
|
922104
|
+
if (value2 == null) {
|
|
922105
|
+
return swift_exports.Expression.nop();
|
|
922106
|
+
}
|
|
922107
|
+
return swift_exports.Expression.escapedStringLiteral(JSON.stringify(value2));
|
|
922108
|
+
}
|
|
922088
922109
|
getEndpointMethodQueryParameters({ namedParameters, snippet: snippet2 }) {
|
|
922089
922110
|
const moduleSymbol = this.context.nameRegistry.getRegisteredSourceModuleSymbolOrThrow();
|
|
922090
922111
|
return this.context.getExampleObjectProperties({
|
|
@@ -922191,7 +922212,6 @@ var EndpointSnippetGenerator9 = class {
|
|
|
922191
922212
|
}
|
|
922192
922213
|
getEndpointMethodArgsForBodyRequest({ request: request7, snippet: snippet2 }) {
|
|
922193
922214
|
const args = [];
|
|
922194
|
-
const moduleSymbol = this.context.nameRegistry.getRegisteredSourceModuleSymbolOrThrow();
|
|
922195
922215
|
this.context.errors.scope(Scope4.PathParameters);
|
|
922196
922216
|
const pathParameters = [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []];
|
|
922197
922217
|
if (pathParameters.length > 0) {
|
|
@@ -948394,7 +948414,7 @@ var CliContext = class _CliContext {
|
|
|
948394
948414
|
if (false) {
|
|
948395
948415
|
this.logger.error("CLI_VERSION is not defined");
|
|
948396
948416
|
}
|
|
948397
|
-
return "5.23.3-
|
|
948417
|
+
return "5.23.3-94-g1434a7f90c8";
|
|
948398
948418
|
}
|
|
948399
948419
|
getCliName() {
|
|
948400
948420
|
if (false) {
|
package/package.json
CHANGED