@fern-api/fern-api-dev 5.89.1 → 5.89.3
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 +27 -11
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -147333,6 +147333,9 @@ function resolveEndpointLocationWithNamespaceOverride({ location: location2, nam
|
|
|
147333
147333
|
}
|
|
147334
147334
|
return location2;
|
|
147335
147335
|
}
|
|
147336
|
+
function sanitizeEndpointId(operationId) {
|
|
147337
|
+
return operationId.includes(".") ? camelCase_default(operationId) : operationId;
|
|
147338
|
+
}
|
|
147336
147339
|
function getUnresolvedEndpointLocation(endpoint3) {
|
|
147337
147340
|
const namespace = endpoint3.namespace;
|
|
147338
147341
|
const tag2 = endpoint3.tags.filter((tag3) => tag3 !== namespace)[0];
|
|
@@ -147358,7 +147361,7 @@ function getUnresolvedEndpointLocation(endpoint3) {
|
|
|
147358
147361
|
if (tag2 == null) {
|
|
147359
147362
|
return {
|
|
147360
147363
|
file: RelativeFilePath.of(FERN_PACKAGE_MARKER_FILENAME),
|
|
147361
|
-
endpointId: operationId
|
|
147364
|
+
endpointId: sanitizeEndpointId(operationId)
|
|
147362
147365
|
};
|
|
147363
147366
|
}
|
|
147364
147367
|
const tagTokens = tokenizeString(tag2);
|
|
@@ -147387,7 +147390,7 @@ function getUnresolvedEndpointLocation(endpoint3) {
|
|
|
147387
147390
|
const camelCasedTag = camelCase_default(tag2);
|
|
147388
147391
|
return {
|
|
147389
147392
|
file: RelativeFilePath.of(`${camelCasedTag}.yml`),
|
|
147390
|
-
endpointId: operationId,
|
|
147393
|
+
endpointId: sanitizeEndpointId(operationId),
|
|
147391
147394
|
tag: tag2
|
|
147392
147395
|
};
|
|
147393
147396
|
}
|
|
@@ -155498,11 +155501,17 @@ function getSiblingExampleFromRef(schema) {
|
|
|
155498
155501
|
}
|
|
155499
155502
|
return void 0;
|
|
155500
155503
|
}
|
|
155504
|
+
function schemaHasNullBranch(subschemas) {
|
|
155505
|
+
if (subschemas == null) {
|
|
155506
|
+
return false;
|
|
155507
|
+
}
|
|
155508
|
+
return subschemas.some((subschema) => !isReferenceObject(subschema) && subschema.type === "null");
|
|
155509
|
+
}
|
|
155501
155510
|
function convertReferenceObject(schema, wrapAsOptional, wrapAsNullable, context3, breadcrumbs, encoding, source2, namespace) {
|
|
155502
155511
|
let result = schema.$ref.includes("properties") ? convertSchemaObject(context3.resolveSchemaReference(schema), wrapAsOptional, wrapAsNullable, context3, breadcrumbs, encoding, source2, namespace, /* @__PURE__ */ new Set()) : SchemaWithExample.reference(convertToReferencedSchema(schema, breadcrumbs, source2, context3.options.preserveSchemaIds, context3));
|
|
155503
155512
|
if (wrapAsNullable === false) {
|
|
155504
155513
|
const referencedSchema = context3.resolveSchemaReference(schema);
|
|
155505
|
-
if (referencedSchema.nullable === true || Array.isArray(referencedSchema.type) && referencedSchema.type.length >= 2 && referencedSchema.type.includes("null")) {
|
|
155514
|
+
if (referencedSchema.nullable === true || Array.isArray(referencedSchema.type) && referencedSchema.type.length >= 2 && referencedSchema.type.includes("null") || schemaHasNullBranch(referencedSchema.anyOf) || schemaHasNullBranch(referencedSchema.oneOf)) {
|
|
155506
155515
|
wrapAsNullable = true;
|
|
155507
155516
|
}
|
|
155508
155517
|
}
|
|
@@ -353641,11 +353650,17 @@ var init_AbstractOperationConverter = __esm({
|
|
|
353641
353650
|
}
|
|
353642
353651
|
return operationId;
|
|
353643
353652
|
}
|
|
353653
|
+
// A dot in a method name is parsed as a reference to another file (`import.endpoint`),
|
|
353654
|
+
// so dotted operation ids must be collapsed into a single name. This runs after
|
|
353655
|
+
// tokenization so that grouping still sees the individual tokens.
|
|
353656
|
+
sanitizeMethodName(methodName) {
|
|
353657
|
+
return methodName.includes(".") ? camelCase_default(methodName) : methodName;
|
|
353658
|
+
}
|
|
353644
353659
|
computeGroupNameFromTagAndOperationId() {
|
|
353645
353660
|
const tag2 = this.operation.tags?.[0];
|
|
353646
353661
|
const methodName = this.evaluateMethodNameFromOperation();
|
|
353647
353662
|
if (tag2 == null) {
|
|
353648
|
-
return { method: methodName };
|
|
353663
|
+
return { method: this.sanitizeMethodName(methodName) };
|
|
353649
353664
|
}
|
|
353650
353665
|
const tagTokens = tokenizeString2(tag2);
|
|
353651
353666
|
const methodNameTokens = tokenizeString2(methodName);
|
|
@@ -353666,7 +353681,7 @@ var init_AbstractOperationConverter = __esm({
|
|
|
353666
353681
|
if (tagIsNotPrefixOfMethodName) {
|
|
353667
353682
|
return {
|
|
353668
353683
|
group: [tag2],
|
|
353669
|
-
method: methodName
|
|
353684
|
+
method: this.sanitizeMethodName(methodName)
|
|
353670
353685
|
};
|
|
353671
353686
|
}
|
|
353672
353687
|
const methodTokens = methodNameTokens.slice(tagTokens.length);
|
|
@@ -694311,7 +694326,7 @@ var AccessTokenPosthogManager = class {
|
|
|
694311
694326
|
properties: {
|
|
694312
694327
|
...event,
|
|
694313
694328
|
...event.properties,
|
|
694314
|
-
version: "5.89.
|
|
694329
|
+
version: "5.89.3",
|
|
694315
694330
|
usingAccessToken: true,
|
|
694316
694331
|
...getRunIdProperties()
|
|
694317
694332
|
}
|
|
@@ -694377,7 +694392,7 @@ var UserPosthogManager = class {
|
|
|
694377
694392
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
694378
694393
|
event: "CLI",
|
|
694379
694394
|
properties: {
|
|
694380
|
-
version: "5.89.
|
|
694395
|
+
version: "5.89.3",
|
|
694381
694396
|
...event,
|
|
694382
694397
|
...event.properties,
|
|
694383
694398
|
usingAccessToken: false,
|
|
@@ -875507,7 +875522,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
875507
875522
|
var LOGS_FOLDER_NAME = "logs";
|
|
875508
875523
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
875509
875524
|
function getCliSource() {
|
|
875510
|
-
const version7 = "5.89.
|
|
875525
|
+
const version7 = "5.89.3";
|
|
875511
875526
|
return `cli@${version7}`;
|
|
875512
875527
|
}
|
|
875513
875528
|
var DebugLogger = class {
|
|
@@ -908217,7 +908232,7 @@ var LegacyDocsPublisher = class {
|
|
|
908217
908232
|
previewId,
|
|
908218
908233
|
disableTemplates: void 0,
|
|
908219
908234
|
skipUpload,
|
|
908220
|
-
cliVersion: "5.89.
|
|
908235
|
+
cliVersion: "5.89.3",
|
|
908221
908236
|
loginCommand: "fern auth login"
|
|
908222
908237
|
});
|
|
908223
908238
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -958723,6 +958738,7 @@ var TypescriptCustomConfigSchema = external_exports2.strictObject({
|
|
|
958723
958738
|
packagePath: external_exports2.optional(external_exports2.string()),
|
|
958724
958739
|
omitFernHeaders: external_exports2.optional(external_exports2.boolean()),
|
|
958725
958740
|
includePlatformHeaders: external_exports2.optional(external_exports2.boolean()),
|
|
958741
|
+
allowUserAgentAppInfo: external_exports2.optional(external_exports2.boolean()),
|
|
958726
958742
|
useDefaultRequestParameterValues: external_exports2.optional(external_exports2.boolean()),
|
|
958727
958743
|
packageManager: external_exports2.optional(external_exports2.enum(["pnpm", "yarn"])),
|
|
958728
958744
|
flattenRequestParameters: external_exports2.optional(external_exports2.boolean()),
|
|
@@ -975092,7 +975108,7 @@ function getAutomationContextFromEnv() {
|
|
|
975092
975108
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
975093
975109
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
975094
975110
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
975095
|
-
cli_version: "5.89.
|
|
975111
|
+
cli_version: "5.89.3"
|
|
975096
975112
|
};
|
|
975097
975113
|
}
|
|
975098
975114
|
function isAutomationMode() {
|
|
@@ -975924,7 +975940,7 @@ var CliContext = class _CliContext {
|
|
|
975924
975940
|
if (false) {
|
|
975925
975941
|
this.logger.error("CLI_VERSION is not defined");
|
|
975926
975942
|
}
|
|
975927
|
-
return "5.89.
|
|
975943
|
+
return "5.89.3";
|
|
975928
975944
|
}
|
|
975929
975945
|
getCliName() {
|
|
975930
975946
|
if (false) {
|
package/package.json
CHANGED