@fern-api/fern-api-dev 3.95.0 → 3.95.1
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 +17 -17
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -577366,7 +577366,7 @@ var AccessTokenPosthogManager = class {
|
|
|
577366
577366
|
properties: {
|
|
577367
577367
|
...event,
|
|
577368
577368
|
...event.properties,
|
|
577369
|
-
version: "3.95.
|
|
577369
|
+
version: "3.95.1",
|
|
577370
577370
|
usingAccessToken: true
|
|
577371
577371
|
}
|
|
577372
577372
|
});
|
|
@@ -577475,7 +577475,7 @@ var UserPosthogManager = class {
|
|
|
577475
577475
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
577476
577476
|
event: "CLI",
|
|
577477
577477
|
properties: {
|
|
577478
|
-
version: "3.95.
|
|
577478
|
+
version: "3.95.1",
|
|
577479
577479
|
...event,
|
|
577480
577480
|
...event.properties,
|
|
577481
577481
|
usingAccessToken: false,
|
|
@@ -654944,9 +654944,15 @@ function convertWebhookExamples(payloadExamples) {
|
|
|
654944
654944
|
return webhookExampleCalls;
|
|
654945
654945
|
}
|
|
654946
654946
|
function generateWebhookOperationId({ path: path91, method: method8, sdkMethodName }) {
|
|
654947
|
-
|
|
654947
|
+
if (sdkMethodName?.methodName != null) {
|
|
654948
|
+
return sdkMethodName.methodName;
|
|
654949
|
+
}
|
|
654950
|
+
const sanitized = sanitizePathExpression(path91);
|
|
654951
|
+
if (sanitized === path91.toLowerCase()) {
|
|
654952
|
+
return path91;
|
|
654953
|
+
}
|
|
654948
654954
|
const hash5 = (0, import_crypto7.createHash)("sha256").update(path91).digest("hex").slice(0, 8);
|
|
654949
|
-
return toCamelCase2(`${
|
|
654955
|
+
return toCamelCase2(`${sanitized}_${method8.toLowerCase()}_${hash5}`);
|
|
654950
654956
|
}
|
|
654951
654957
|
function sanitizePathExpression(path91) {
|
|
654952
654958
|
return path91.replace(/[{$}#]/g, "").replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").replace(/_+/g, "_").toLowerCase().slice(0, 64);
|
|
@@ -706329,7 +706335,7 @@ var OpenAPIConverter = class extends AbstractSpecConverter {
|
|
|
706329
706335
|
}
|
|
706330
706336
|
}
|
|
706331
706337
|
convertWebhooks() {
|
|
706332
|
-
for (const [, webhookItem] of Object.entries(this.context.spec.webhooks ?? {})) {
|
|
706338
|
+
for (const [webhookName, webhookItem] of Object.entries(this.context.spec.webhooks ?? {})) {
|
|
706333
706339
|
if (webhookItem == null) {
|
|
706334
706340
|
this.context.errorCollector.collect({
|
|
706335
706341
|
message: "Skipping empty webhook",
|
|
@@ -706337,25 +706343,19 @@ var OpenAPIConverter = class extends AbstractSpecConverter {
|
|
|
706337
706343
|
});
|
|
706338
706344
|
continue;
|
|
706339
706345
|
}
|
|
706340
|
-
if (!("post" in webhookItem)) {
|
|
706346
|
+
if (!("post" in webhookItem) || webhookItem.post == null) {
|
|
706341
706347
|
this.context.errorCollector.collect({
|
|
706342
706348
|
message: "Skipping webhook as it is not a POST method",
|
|
706343
706349
|
path: this.breadcrumbs
|
|
706344
706350
|
});
|
|
706345
706351
|
continue;
|
|
706346
706352
|
}
|
|
706347
|
-
|
|
706348
|
-
|
|
706349
|
-
message: "Skipping webhook as no operationId is present",
|
|
706350
|
-
path: this.breadcrumbs
|
|
706351
|
-
});
|
|
706352
|
-
continue;
|
|
706353
|
-
}
|
|
706354
|
-
const operationId = webhookItem.post.operationId;
|
|
706353
|
+
const operationId = webhookItem.post.operationId ?? webhookName;
|
|
706354
|
+
const operation = webhookItem.post.operationId != null ? webhookItem.post : { ...webhookItem.post, operationId };
|
|
706355
706355
|
const webHookConverter = new WebhookConverter({
|
|
706356
706356
|
context: this.context,
|
|
706357
706357
|
breadcrumbs: ["webhooks", operationId],
|
|
706358
|
-
operation
|
|
706358
|
+
operation,
|
|
706359
706359
|
method: import_openapi_types2.OpenAPIV3.HttpMethods.POST,
|
|
706360
706360
|
path: operationId
|
|
706361
706361
|
});
|
|
@@ -763344,7 +763344,7 @@ var import_path40 = __toESM(require("path"), 1);
|
|
|
763344
763344
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
763345
763345
|
var LOGS_FOLDER_NAME = "logs";
|
|
763346
763346
|
function getCliSource() {
|
|
763347
|
-
const version7 = "3.95.
|
|
763347
|
+
const version7 = "3.95.1";
|
|
763348
763348
|
return `cli@${version7}`;
|
|
763349
763349
|
}
|
|
763350
763350
|
var DebugLogger = class {
|
|
@@ -1127046,7 +1127046,7 @@ var CliContext = class {
|
|
|
1127046
1127046
|
if (false) {
|
|
1127047
1127047
|
this.logger.error("CLI_VERSION is not defined");
|
|
1127048
1127048
|
}
|
|
1127049
|
-
return "3.95.
|
|
1127049
|
+
return "3.95.1";
|
|
1127050
1127050
|
}
|
|
1127051
1127051
|
getCliName() {
|
|
1127052
1127052
|
if (false) {
|
package/package.json
CHANGED