@fern-api/fern-api-dev 3.49.7-1-gca137f47802 → 3.49.8
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 +54 -8
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1430941,7 +1430941,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1430941
1430941
|
properties: {
|
|
1430942
1430942
|
...event,
|
|
1430943
1430943
|
...event.properties,
|
|
1430944
|
-
version: "3.49.
|
|
1430944
|
+
version: "3.49.8",
|
|
1430945
1430945
|
usingAccessToken: true
|
|
1430946
1430946
|
}
|
|
1430947
1430947
|
});
|
|
@@ -1431040,7 +1431040,7 @@ var UserPosthogManager = class {
|
|
|
1431040
1431040
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1431041
1431041
|
event: "CLI",
|
|
1431042
1431042
|
properties: {
|
|
1431043
|
-
version: "3.49.
|
|
1431043
|
+
version: "3.49.8",
|
|
1431044
1431044
|
...event,
|
|
1431045
1431045
|
...event.properties,
|
|
1431046
1431046
|
usingAccessToken: false,
|
|
@@ -1510475,7 +1510475,7 @@ var CliContext = class {
|
|
|
1510475
1510475
|
if (false) {
|
|
1510476
1510476
|
this.logger.error("CLI_VERSION is not defined");
|
|
1510477
1510477
|
}
|
|
1510478
|
-
return "3.49.
|
|
1510478
|
+
return "3.49.8";
|
|
1510479
1510479
|
}
|
|
1510480
1510480
|
getCliName() {
|
|
1510481
1510481
|
if (false) {
|
|
@@ -1558190,20 +1558190,22 @@ var ResponseErrorConverter = class extends converters_exports.AbstractConverters
|
|
|
1558190
1558190
|
errorName,
|
|
1558191
1558191
|
errorId,
|
|
1558192
1558192
|
fernFilepath: convertedSchema.schema.typeDeclaration.name.fernFilepath,
|
|
1558193
|
-
convertedSchema
|
|
1558193
|
+
convertedSchema,
|
|
1558194
|
+
mediaTypeObject
|
|
1558194
1558195
|
});
|
|
1558195
1558196
|
} else if (convertedSchema.type.type === "named") {
|
|
1558196
1558197
|
return this.constructErrorConverterOutput({
|
|
1558197
1558198
|
errorName,
|
|
1558198
1558199
|
errorId,
|
|
1558199
1558200
|
fernFilepath: convertedSchema.type.fernFilepath,
|
|
1558200
|
-
convertedSchema
|
|
1558201
|
+
convertedSchema,
|
|
1558202
|
+
mediaTypeObject
|
|
1558201
1558203
|
});
|
|
1558202
1558204
|
}
|
|
1558203
1558205
|
}
|
|
1558204
1558206
|
return void 0;
|
|
1558205
1558207
|
}
|
|
1558206
|
-
constructErrorConverterOutput({ errorName, errorId, fernFilepath, convertedSchema }) {
|
|
1558208
|
+
constructErrorConverterOutput({ errorName, errorId, fernFilepath, convertedSchema, mediaTypeObject }) {
|
|
1558207
1558209
|
return {
|
|
1558208
1558210
|
error: {
|
|
1558209
1558211
|
error: {
|
|
@@ -1558218,10 +1558220,54 @@ var ResponseErrorConverter = class extends converters_exports.AbstractConverters
|
|
|
1558218
1558220
|
statusCode: this.statusCode,
|
|
1558219
1558221
|
isWildcardStatusCode: this.isWildcardStatusCode,
|
|
1558220
1558222
|
inlinedTypes: convertedSchema.inlinedTypes,
|
|
1558221
|
-
examples:
|
|
1558223
|
+
examples: this.convertErrorExamples({ mediaTypeObject }),
|
|
1558222
1558224
|
headers: this.convertResponseHeaders()
|
|
1558223
1558225
|
};
|
|
1558224
1558226
|
}
|
|
1558227
|
+
/**
|
|
1558228
|
+
* Converts error examples from the media type object, using the summary field
|
|
1558229
|
+
* as the example name when available (similar to how endpoint examples work).
|
|
1558230
|
+
*/
|
|
1558231
|
+
convertErrorExamples({ mediaTypeObject }) {
|
|
1558232
|
+
const examples = this.context.getNamedExamplesFromMediaTypeObject({
|
|
1558233
|
+
mediaTypeObject,
|
|
1558234
|
+
breadcrumbs: this.breadcrumbs,
|
|
1558235
|
+
defaultExampleName: `${[...this.group, this.method].join("_")}_error_example`
|
|
1558236
|
+
});
|
|
1558237
|
+
if (examples.length === 0) {
|
|
1558238
|
+
return void 0;
|
|
1558239
|
+
}
|
|
1558240
|
+
const usedExampleNames = /* @__PURE__ */ new Set();
|
|
1558241
|
+
const result = {};
|
|
1558242
|
+
for (const [key, example] of examples) {
|
|
1558243
|
+
const resolvedExample = this.context.resolveExampleWithValue(example);
|
|
1558244
|
+
const resolvedExampleObject = this.context.resolveExampleRecursively({
|
|
1558245
|
+
example,
|
|
1558246
|
+
breadcrumbs: this.breadcrumbs
|
|
1558247
|
+
});
|
|
1558248
|
+
const exampleName = this.getIdForErrorExample({ key, example: resolvedExampleObject, usedExampleNames });
|
|
1558249
|
+
usedExampleNames.add(exampleName);
|
|
1558250
|
+
if (resolvedExample != null) {
|
|
1558251
|
+
result[exampleName] = resolvedExample;
|
|
1558252
|
+
}
|
|
1558253
|
+
}
|
|
1558254
|
+
return Object.keys(result).length > 0 ? result : void 0;
|
|
1558255
|
+
}
|
|
1558256
|
+
/**
|
|
1558257
|
+
* Determines the unique identifier for an error example, using the summary field
|
|
1558258
|
+
* when available and handling duplicate collisions.
|
|
1558259
|
+
*/
|
|
1558260
|
+
getIdForErrorExample({ key, example, usedExampleNames }) {
|
|
1558261
|
+
if (this.context.isExampleWithSummary(example)) {
|
|
1558262
|
+
const summary = example.summary;
|
|
1558263
|
+
if (!usedExampleNames.has(summary)) {
|
|
1558264
|
+
return summary;
|
|
1558265
|
+
}
|
|
1558266
|
+
const disambiguatedName = `${summary} (${key})`;
|
|
1558267
|
+
return usedExampleNames.has(disambiguatedName) ? key : disambiguatedName;
|
|
1558268
|
+
}
|
|
1558269
|
+
return key;
|
|
1558270
|
+
}
|
|
1558225
1558271
|
getErrorNameForStatusCode(statusCode, isWildcard) {
|
|
1558226
1558272
|
if (isWildcard) {
|
|
1558227
1558273
|
if (statusCode === 400) {
|
|
@@ -1611500,7 +1611546,7 @@ var import_path40 = __toESM(require("path"), 1);
|
|
|
1611500
1611546
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
1611501
1611547
|
var LOGS_FOLDER_NAME = "logs";
|
|
1611502
1611548
|
function getCliSource() {
|
|
1611503
|
-
const version7 = "3.49.
|
|
1611549
|
+
const version7 = "3.49.8";
|
|
1611504
1611550
|
return `cli@${version7}`;
|
|
1611505
1611551
|
}
|
|
1611506
1611552
|
var DebugLogger = class {
|
package/package.json
CHANGED