Skip to content

Commit

Permalink
chore: replace simple comments with jsdoc (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekhmet authored Jan 31, 2025
1 parent fbe6bf7 commit 1644cad
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const checkpointConfigSchema = z.object({
});

export const overridesConfigSchema = z.object({
/** Decimal types to define for use in your schema. */
decimal_types: z
.record(
z.object({
Expand Down
19 changes: 11 additions & 8 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@ export type TemplateSource = {
};

export interface CheckpointOptions {
// Setting to true will trigger reset of database on config changes.
/** Setting this to true will trigger reset of database on config changes. */
resetOnConfigChange?: boolean;
// Set the log output levels for checkpoint. Defaults to Error.
// Note, this does not affect the log outputs in writers.
/**
* Set the log output levels for checkpoint. Defaults to Error.
* Note, this does not affect the log outputs in writers.
*/
logLevel?: LogLevel;
// optionally format logs to pretty output.
// Not recommended for production.
/** Format logs to pretty output. Not recommended for production. */
prettifyLogs?: boolean;
// Optional database connection string. For now only accepts PostgreSQL and MySQL/MariaDB
// connection string. If no provided will default to looking up a value in
// the DATABASE_URL environment.
/**
* Optional database connection string. Must be PostgreSQL connection string.
* If not provided connection strinng will be read from DATABASE_URL environment variable.
*/
dbConnection?: string;
/** Overrides for database types. */
overridesConfig?: OverridesConfig;
}

Expand Down
15 changes: 7 additions & 8 deletions src/utils/logger.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import pino, { Logger as PinoLogger, LoggerOptions } from 'pino';

// LogLevel to control what levels of logs are
// required.
/** The minimum level to log. */
export enum LogLevel {
// silent to disable all logging
/** Disable all logs. */
Silent = 'silent',
// fatal to log unrecoverable errors
/** Log unrecoverable errors. */
Fatal = 'fatal',
// error to log general errors
/** Log general errors. */
Error = 'error',
// warn to log alerts or notices
/** Log alerts or notices */
Warn = 'warn',
// info to log useful information
/** Log useful information. */
Info = 'info',
// debug to log debug and trace information
/** Log debug and trace information. */
Debug = 'debug'
}

Expand Down

0 comments on commit 1644cad

Please sign in to comment.