Add semi-colons and correct formatting in database.types.ts

This commit implements proper syntax standards throughout the file. Every necessary line now ends with a semicolon, providing better readability and avoiding potential errors in future code interpretation.
This commit is contained in:
giancarlo
2024-04-17 16:15:57 +08:00
parent bf43c48dff
commit a188ca92e1
7 changed files with 2093 additions and 2077 deletions

View File

@@ -1,19 +1,18 @@
import { getOrder, getVariant } from '@lemonsqueezy/lemonsqueezy.js';
import { BillingConfig, BillingWebhookHandlerService, getLineItemTypeById } from '@kit/billing';
import {
BillingConfig,
BillingWebhookHandlerService,
getLineItemTypeById,
} from '@kit/billing';
import { getLogger } from '@kit/shared/logger';
import { Database } from '@kit/supabase/database';
import { getLemonSqueezyEnv } from '../schema/lemon-squeezy-server-env.schema';
import { OrderWebhook } from '../types/order-webhook';
import { SubscriptionWebhook } from '../types/subscription-webhook';
import { initializeLemonSqueezyClient } from './lemon-squeezy-sdk';
import { createHmac } from "./verify-hmac";
import { createHmac } from './verify-hmac';
type UpsertSubscriptionParams =
Database['public']['Functions']['upsert_subscription']['Args'];
@@ -419,7 +418,7 @@ async function isSigningSecretValid(rawBody: string, signatureHeader: string) {
const { hex: digest } = await createHmac({
key: webhooksSecret,
data: rawBody
data: rawBody,
});
const signature = Buffer.from(signatureHeader, 'utf8');

View File

@@ -40,15 +40,20 @@ async function getKeystaticClient() {
return new KeystaticClient();
}
console.error(`[CMS] Keystatic client is only available in Node.js runtime. Please choose a different CMS client. Returning a mock client instead of throwing an error.`);
console.error(
`[CMS] Keystatic client is only available in Node.js runtime. Please choose a different CMS client. Returning a mock client instead of throwing an error.`,
);
return mockCMSClient();
return mockCMSClient() as unknown as CmsClient;
}
function mockCMSClient() {
return {
async getContentItems() {
return [];
getContentItems() {
return Promise.resolve([]);
},
getContentItemBySlug() {
return Promise.resolve(undefined);
},
};
}

File diff suppressed because it is too large Load Diff