🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@pgpmjs/types

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pgpmjs/types - npm Package Compare versions

Comparing version
2.35.1
to
2.36.0
+0
-1
esm/index.js

@@ -6,3 +6,2 @@ export * from './driver';

export * from './pgpm';
export * from './jobs';
export * from './update';
+5
-2
import { execSync } from 'child_process';
import { jobsDefaults } from './jobs';
/**
* Default directory (relative to the workspace root) where pgpm modules are installed.
*/
export const DEFAULT_EXTENSIONS_DIR = 'extensions';
/**
* Default configuration values for PGPM framework

@@ -65,3 +68,2 @@ */

},
jobs: jobsDefaults,
errorOutput: {

@@ -72,2 +74,3 @@ queryHistoryLimit: 30,

},
extensionsDir: DEFAULT_EXTENSIONS_DIR,
smtp: {

@@ -74,0 +77,0 @@ port: 587,

@@ -6,3 +6,2 @@ export * from './driver';

export * from './pgpm';
export * from './jobs';
export * from './update';

@@ -22,3 +22,2 @@ "use strict";

__exportStar(require("./pgpm"), exports);
__exportStar(require("./jobs"), exports);
__exportStar(require("./update"), exports);
{
"name": "@pgpmjs/types",
"version": "2.35.1",
"version": "2.36.0",
"author": "Constructive <developers@constructive.io>",

@@ -45,3 +45,3 @@ "description": "PGPM types",

},
"gitHead": "e53a570a4a70987e82dc074bd73501971fd82828"
"gitHead": "39db6d576bce7bc1de8123849f237b1695779d88"
}
import { PgConfig } from 'pg-env';
import { PgpmDriverConfig } from './driver';
import { JobsConfig } from './jobs';
/**

@@ -203,2 +202,8 @@ * Authentication options for test client sessions

/**
* Directory (relative to the workspace root) where pgpm modules are installed.
* Defaults to `extensions`. Useful for keeping ephemeral test/fixture installs
* out of a committed `extensions/` directory.
*/
extensionsDir?: string;
/**
* Template source recorded at scaffold time when the workspace is created

@@ -258,4 +263,2 @@ * from a non-default boilerplate repo (e.g. via `pgpm init workspace --pglite`

migrations?: MigrationOptions;
/** Job system configuration */
jobs?: JobsConfig;
/** Error output formatting options */

@@ -266,2 +269,7 @@ errorOutput?: ErrorOutputOptions;

/**
* Directory (relative to the workspace root) where pgpm modules are installed
* by `pgpm install`. Defaults to `extensions`.
*/
extensionsDir?: string;
/**
* Pluggable migration backend. Undefined = built-in `pg` (server) path.

@@ -274,2 +282,6 @@ * Set `driver.plugin` to a package (e.g. `@pgpmjs/pglite-adapter`) resolved

/**
* Default directory (relative to the workspace root) where pgpm modules are installed.
*/
export declare const DEFAULT_EXTENSIONS_DIR = "extensions";
/**
* Default configuration values for PGPM framework

@@ -276,0 +288,0 @@ */

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pgpmDefaults = void 0;
exports.pgpmDefaults = exports.DEFAULT_EXTENSIONS_DIR = void 0;
exports.getGitConfigInfo = getGitConfigInfo;
const child_process_1 = require("child_process");
const jobs_1 = require("./jobs");
/**
* Default directory (relative to the workspace root) where pgpm modules are installed.
*/
exports.DEFAULT_EXTENSIONS_DIR = 'extensions';
/**
* Default configuration values for PGPM framework

@@ -69,3 +72,2 @@ */

},
jobs: jobs_1.jobsDefaults,
errorOutput: {

@@ -76,2 +78,3 @@ queryHistoryLimit: 30,

},
extensionsDir: exports.DEFAULT_EXTENSIONS_DIR,
smtp: {

@@ -78,0 +81,0 @@ port: 587,

/**
* Default configuration values for job system
*/
export const jobsDefaults = {
schema: {
schema: 'app_jobs'
},
worker: {
schema: 'app_jobs',
hostname: 'worker-0',
supportAny: true,
supported: [],
pollInterval: 1000,
gracefulShutdown: true
},
scheduler: {
schema: 'app_jobs',
hostname: 'scheduler-0',
supportAny: true,
supported: [],
pollInterval: 1000,
gracefulShutdown: true
},
gateway: {
gatewayUrl: 'http://gateway:8080',
callbackUrl: 'http://callback:12345',
callbackPort: 12345
}
};
/**
* Job schema configuration
*/
export interface JobSchemaConfig {
/** PostgreSQL schema name for job tables and functions (defaults to 'app_jobs') */
schema: string;
}
/**
* Worker/Scheduler hostname configuration
*/
export interface JobHostnameConfig {
/** Unique identifier for the worker or scheduler instance */
hostname: string;
}
/**
* Job task support configuration
*/
export interface JobTaskSupportConfig {
/** Whether to support any/all task types (defaults to true) */
supportAny: boolean;
/** Array of explicitly supported task names */
supported: string[];
}
/**
* Job HTTP gateway configuration
*/
export interface JobGatewayConfig {
/** Internal gateway URL for job HTTP function calls */
gatewayUrl: string;
/** Callback URL for job completion notifications */
callbackUrl: string;
/** Port for internal job callback server (defaults to 12345) */
callbackPort: number;
}
/**
* Parameters for failing a job
*/
export interface FailJobParams {
/** Worker ID that is failing the job */
workerId: string;
/** Job ID to fail */
jobId: number | string;
/** Error message or reason for failure */
message: string;
}
/**
* Parameters for completing a job
*/
export interface CompleteJobParams {
/** Worker ID that completed the job */
workerId: string;
/** Job ID to mark as complete */
jobId: number | string;
}
/**
* Parameters for getting a job from the queue
*/
export interface GetJobParams {
/** Worker ID requesting a job */
workerId: string;
/**
* Array of task names this worker supports.
* When `null`, the job system will consider any task as supported.
*/
supportedTaskNames: string[] | null;
}
/**
* Parameters for getting a scheduled job
*/
export interface GetScheduledJobParams {
/** Worker ID requesting a scheduled job */
workerId: string;
/**
* Array of task names this worker supports.
* When `null`, the scheduler will consider any task as supported.
*/
supportedTaskNames: string[] | null;
}
/**
* Parameters for running a scheduled job
*/
export interface RunScheduledJobParams {
/** Job ID to run */
jobId: number | string;
}
/**
* Parameters for releasing scheduled jobs
*/
export interface ReleaseScheduledJobsParams {
/** Worker ID releasing the jobs */
workerId: string;
/**
* Array of job IDs to release.
* When omitted, all scheduled jobs for the worker may be released.
*/
ids?: Array<number | string>;
}
/**
* Parameters for releasing all jobs held by a worker
*/
export interface ReleaseJobsParams {
/** Worker ID releasing all its jobs */
workerId: string;
}
/**
* Job record structure from database
*/
export interface Job {
/** Unique job identifier */
id: number | string;
/** Task name/type for this job */
task_name: string;
/** JSON payload data for the job */
payload?: any;
/** Worker ID currently assigned to this job */
worker_id?: string;
/** Maximum number of retry attempts */
max_attempts?: number;
/** Current attempt number */
attempts?: number;
/** Priority level for job execution */
priority?: number;
/** Timestamp when job was created */
created_at?: Date | string;
/** Timestamp when job was last updated */
updated_at?: Date | string;
/** Timestamp when job should run (for scheduled jobs) */
run_at?: Date | string;
/** Last error message if job failed */
last_error?: string;
}
/**
* Worker configuration options
*/
export interface JobWorkerConfig extends JobSchemaConfig, JobHostnameConfig, JobTaskSupportConfig {
/** Polling interval in milliseconds */
pollInterval?: number;
/** Whether to enable graceful shutdown */
gracefulShutdown?: boolean;
}
/**
* Scheduler configuration options
*/
export interface JobSchedulerConfig extends JobSchemaConfig, JobHostnameConfig, JobTaskSupportConfig {
/** Polling interval in milliseconds for checking scheduled jobs */
pollInterval?: number;
/** Whether to enable graceful shutdown */
gracefulShutdown?: boolean;
}
/**
* Complete job system configuration
*/
export interface JobsConfig {
/** Job schema configuration */
schema?: Partial<JobSchemaConfig>;
/** Worker configuration */
worker?: Partial<JobWorkerConfig>;
/** Scheduler configuration */
scheduler?: Partial<JobSchedulerConfig>;
/** Job HTTP gateway configuration */
gateway?: Partial<JobGatewayConfig>;
}
/**
* Default configuration values for job system
*/
export declare const jobsDefaults: JobsConfig;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.jobsDefaults = void 0;
/**
* Default configuration values for job system
*/
exports.jobsDefaults = {
schema: {
schema: 'app_jobs'
},
worker: {
schema: 'app_jobs',
hostname: 'worker-0',
supportAny: true,
supported: [],
pollInterval: 1000,
gracefulShutdown: true
},
scheduler: {
schema: 'app_jobs',
hostname: 'scheduler-0',
supportAny: true,
supported: [],
pollInterval: 1000,
gracefulShutdown: true
},
gateway: {
gatewayUrl: 'http://gateway:8080',
callbackUrl: 'http://callback:12345',
callbackPort: 12345
}
};