@fern-api/fern-api-dev 4.53.0 → 4.53.1-15-g4f2ceb97072
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 +59 -37
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -602380,7 +602380,7 @@ var AccessTokenPosthogManager = class {
|
|
|
602380
602380
|
properties: {
|
|
602381
602381
|
...event,
|
|
602382
602382
|
...event.properties,
|
|
602383
|
-
version: "4.53.
|
|
602383
|
+
version: "4.53.1-15-g4f2ceb97072",
|
|
602384
602384
|
usingAccessToken: true
|
|
602385
602385
|
}
|
|
602386
602386
|
});
|
|
@@ -602431,7 +602431,7 @@ var UserPosthogManager = class {
|
|
|
602431
602431
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
602432
602432
|
event: "CLI",
|
|
602433
602433
|
properties: {
|
|
602434
|
-
version: "4.53.
|
|
602434
|
+
version: "4.53.1-15-g4f2ceb97072",
|
|
602435
602435
|
...event,
|
|
602436
602436
|
...event.properties,
|
|
602437
602437
|
usingAccessToken: false,
|
|
@@ -826304,7 +826304,7 @@ var import_path54 = __toESM(require("path"), 1);
|
|
|
826304
826304
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
826305
826305
|
var LOGS_FOLDER_NAME = "logs";
|
|
826306
826306
|
function getCliSource() {
|
|
826307
|
-
const version7 = "4.53.
|
|
826307
|
+
const version7 = "4.53.1-15-g4f2ceb97072";
|
|
826308
826308
|
return `cli@${version7}`;
|
|
826309
826309
|
}
|
|
826310
826310
|
var DebugLogger = class {
|
|
@@ -837316,7 +837316,7 @@ var LegacyDocsPublisher = class {
|
|
|
837316
837316
|
previewId: void 0,
|
|
837317
837317
|
disableTemplates: void 0,
|
|
837318
837318
|
skipUpload,
|
|
837319
|
-
cliVersion: "4.53.
|
|
837319
|
+
cliVersion: "4.53.1-15-g4f2ceb97072"
|
|
837320
837320
|
});
|
|
837321
837321
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
837322
837322
|
return { success: false };
|
|
@@ -875310,6 +875310,28 @@ var RustFilenameRegistry = class _RustFilenameRegistry {
|
|
|
875310
875310
|
baseTypeName
|
|
875311
875311
|
]);
|
|
875312
875312
|
}
|
|
875313
|
+
/**
|
|
875314
|
+
* Register filename for bytes request body types
|
|
875315
|
+
* @param endpointId - Unique endpoint ID from IR
|
|
875316
|
+
* @param baseFilename - Base filename in snake_case (without .rs extension)
|
|
875317
|
+
* @returns The registered unique filename (without .rs extension)
|
|
875318
|
+
*/
|
|
875319
|
+
registerBytesRequestFilename(endpointId, baseFilename) {
|
|
875320
|
+
return this.filenameRegistry.registerSymbol(this.getBytesRequestFilenameId(endpointId), [
|
|
875321
|
+
baseFilename,
|
|
875322
|
+
`${baseFilename}_request`,
|
|
875323
|
+
`${baseFilename}_bytes`
|
|
875324
|
+
]);
|
|
875325
|
+
}
|
|
875326
|
+
/**
|
|
875327
|
+
* Register type name for bytes request body
|
|
875328
|
+
* @param endpointId - Unique endpoint ID from IR
|
|
875329
|
+
* @param baseTypeName - Base type name in PascalCase
|
|
875330
|
+
* @returns The registered unique type name
|
|
875331
|
+
*/
|
|
875332
|
+
registerBytesRequestTypeName(endpointId, baseTypeName) {
|
|
875333
|
+
return this.typenameRegistry.registerSymbol(this.getBytesRequestTypeNameId(endpointId), [baseTypeName]);
|
|
875334
|
+
}
|
|
875313
875335
|
/**
|
|
875314
875336
|
* Register client name for a subpackage or root client
|
|
875315
875337
|
* @param clientId - Unique identifier for the client (subpackage ID or "root")
|
|
@@ -875451,6 +875473,28 @@ var RustFilenameRegistry = class _RustFilenameRegistry {
|
|
|
875451
875473
|
assertDefined(typename, `Type name not found for referenced request with query ${endpointId}`);
|
|
875452
875474
|
return typename;
|
|
875453
875475
|
}
|
|
875476
|
+
/**
|
|
875477
|
+
* Get registered filename for bytes request body
|
|
875478
|
+
* @param endpointId - Unique endpoint ID from IR
|
|
875479
|
+
* @returns Filename with .rs extension
|
|
875480
|
+
* @throws Error if filename not registered
|
|
875481
|
+
*/
|
|
875482
|
+
getBytesRequestFilenameOrThrow(endpointId) {
|
|
875483
|
+
const filename = this.filenameRegistry.getSymbolNameById(this.getBytesRequestFilenameId(endpointId));
|
|
875484
|
+
assertDefined(filename, `Filename not found for bytes request ${endpointId}`);
|
|
875485
|
+
return `${filename}.rs`;
|
|
875486
|
+
}
|
|
875487
|
+
/**
|
|
875488
|
+
* Get registered type name for bytes request body
|
|
875489
|
+
* @param endpointId - Unique endpoint ID from IR
|
|
875490
|
+
* @returns The unique type name
|
|
875491
|
+
* @throws Error if type name not registered
|
|
875492
|
+
*/
|
|
875493
|
+
getBytesRequestTypeNameOrThrow(endpointId) {
|
|
875494
|
+
const typename = this.typenameRegistry.getSymbolNameById(this.getBytesRequestTypeNameId(endpointId));
|
|
875495
|
+
assertDefined(typename, `Type name not found for bytes request ${endpointId}`);
|
|
875496
|
+
return typename;
|
|
875497
|
+
}
|
|
875454
875498
|
// =====================================
|
|
875455
875499
|
// Private Helper Methods
|
|
875456
875500
|
// =====================================
|
|
@@ -875487,6 +875531,12 @@ var RustFilenameRegistry = class _RustFilenameRegistry {
|
|
|
875487
875531
|
getReferencedRequestWithQueryTypeNameId(endpointId) {
|
|
875488
875532
|
return `${TYPENAME_ID_PREFIX}referenced_request_with_query_${endpointId}`;
|
|
875489
875533
|
}
|
|
875534
|
+
getBytesRequestFilenameId(endpointId) {
|
|
875535
|
+
return `${FILENAME_ID_PREFIX}bytes_request_${endpointId}`;
|
|
875536
|
+
}
|
|
875537
|
+
getBytesRequestTypeNameId(endpointId) {
|
|
875538
|
+
return `${TYPENAME_ID_PREFIX}bytes_request_${endpointId}`;
|
|
875539
|
+
}
|
|
875490
875540
|
};
|
|
875491
875541
|
|
|
875492
875542
|
// ../../../generators/rust/base/lib/utils/index.js
|
|
@@ -879814,10 +879864,7 @@ var EndpointSnippetGenerator8 = class {
|
|
|
879814
879864
|
const hasBody = request7.body != null;
|
|
879815
879865
|
const body = request7.body;
|
|
879816
879866
|
const isReferencedBodyOnly = body != null && !hasQueryParams && body.type === "referenced";
|
|
879817
|
-
|
|
879818
|
-
if (isBytesWithQueryParams) {
|
|
879819
|
-
args.push(...this.getBytesEndpointArgs({ request: request7, snippet: snippet2 }));
|
|
879820
|
-
} else if (isReferencedBodyOnly && body.type === "referenced") {
|
|
879867
|
+
if (isReferencedBodyOnly && body.type === "referenced") {
|
|
879821
879868
|
const bodyExpr = this.getReferencedRequestBodyPropertyExpression({
|
|
879822
879869
|
body: body.bodyType,
|
|
879823
879870
|
value: snippet2.requestBody
|
|
@@ -879834,34 +879881,6 @@ var EndpointSnippetGenerator8 = class {
|
|
|
879834
879881
|
}
|
|
879835
879882
|
return args;
|
|
879836
879883
|
}
|
|
879837
|
-
getBytesEndpointArgs({ request: request7, snippet: snippet2 }) {
|
|
879838
|
-
const args = [];
|
|
879839
|
-
const queryParameters = this.context.associateQueryParametersByWireValue({
|
|
879840
|
-
parameters: request7.queryParameters ?? [],
|
|
879841
|
-
values: snippet2.queryParameters ?? {}
|
|
879842
|
-
});
|
|
879843
|
-
const providedValues = /* @__PURE__ */ new Map();
|
|
879844
|
-
for (const qp4 of queryParameters) {
|
|
879845
|
-
const fieldName = this.context.getPropertyName(qp4.name.name);
|
|
879846
|
-
providedValues.set(fieldName, this.context.dynamicTypeLiteralMapper.convert(qp4));
|
|
879847
|
-
}
|
|
879848
|
-
const allQueryParams = request7.queryParameters ?? [];
|
|
879849
|
-
for (const param of allQueryParams) {
|
|
879850
|
-
const fieldName = this.context.getPropertyName(param.name.name);
|
|
879851
|
-
const value = providedValues.get(fieldName);
|
|
879852
|
-
if (value != null) {
|
|
879853
|
-
args.push(rust_exports.Expression.referenceOf(value));
|
|
879854
|
-
} else {
|
|
879855
|
-
args.push(rust_exports.Expression.referenceOf(rust_exports.Expression.raw("None")));
|
|
879856
|
-
}
|
|
879857
|
-
}
|
|
879858
|
-
if (snippet2.requestBody != null && typeof snippet2.requestBody === "string" && snippet2.requestBody !== "") {
|
|
879859
|
-
args.push(rust_exports.Expression.referenceOf(rust_exports.Expression.raw(`"${snippet2.requestBody}".as_bytes().to_vec()`)));
|
|
879860
|
-
} else {
|
|
879861
|
-
args.push(rust_exports.Expression.referenceOf(rust_exports.Expression.raw("vec![]")));
|
|
879862
|
-
}
|
|
879863
|
-
return args;
|
|
879864
|
-
}
|
|
879865
879884
|
getBodyRequestArg({ body, value }) {
|
|
879866
879885
|
switch (body.type) {
|
|
879867
879886
|
case "bytes":
|
|
@@ -879873,6 +879892,9 @@ var EndpointSnippetGenerator8 = class {
|
|
|
879873
879892
|
}
|
|
879874
879893
|
}
|
|
879875
879894
|
getBytesBodyRequestArg({ value }) {
|
|
879895
|
+
if (value == null) {
|
|
879896
|
+
return rust_exports.Expression.raw("vec![]");
|
|
879897
|
+
}
|
|
879876
879898
|
if (typeof value !== "string") {
|
|
879877
879899
|
this.context.errors.add({
|
|
879878
879900
|
severity: Severity.Critical,
|
|
@@ -910436,7 +910458,7 @@ var CliContext = class {
|
|
|
910436
910458
|
if (false) {
|
|
910437
910459
|
this.logger.error("CLI_VERSION is not defined");
|
|
910438
910460
|
}
|
|
910439
|
-
return "4.53.
|
|
910461
|
+
return "4.53.1-15-g4f2ceb97072";
|
|
910440
910462
|
}
|
|
910441
910463
|
getCliName() {
|
|
910442
910464
|
if (false) {
|
package/package.json
CHANGED