@qodalis/cli-server-abstractions 1.0.0-beta.2 → 1.0.0-beta.4
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/jobs/cli-job-execution-context.d.ts +5 -0
- package/dist/jobs/cli-job-execution-context.d.ts.map +1 -0
- package/dist/jobs/cli-job-execution-context.js +3 -0
- package/dist/jobs/cli-job-execution-context.js.map +1 -0
- package/dist/jobs/cli-job-logger.d.ts +7 -0
- package/dist/jobs/cli-job-logger.d.ts.map +1 -0
- package/dist/jobs/cli-job-logger.js +3 -0
- package/dist/jobs/cli-job-logger.js.map +1 -0
- package/dist/jobs/cli-job-options.d.ts +27 -0
- package/dist/jobs/cli-job-options.d.ts.map +1 -0
- package/dist/jobs/cli-job-options.js +3 -0
- package/dist/jobs/cli-job-options.js.map +1 -0
- package/dist/jobs/cli-job-storage-provider.d.ts +18 -0
- package/dist/jobs/cli-job-storage-provider.d.ts.map +1 -0
- package/dist/jobs/cli-job-storage-provider.js +3 -0
- package/dist/jobs/cli-job-storage-provider.js.map +1 -0
- package/dist/jobs/cli-job.d.ts +5 -0
- package/dist/jobs/cli-job.d.ts.map +1 -0
- package/dist/jobs/cli-job.js +3 -0
- package/dist/jobs/cli-job.js.map +1 -0
- package/dist/jobs/index.d.ts +9 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +3 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/job-execution.d.ts +15 -0
- package/dist/jobs/job-execution.d.ts.map +1 -0
- package/dist/jobs/job-execution.js +3 -0
- package/dist/jobs/job-execution.js.map +1 -0
- package/dist/jobs/job-state.d.ts +7 -0
- package/dist/jobs/job-state.d.ts.map +1 -0
- package/dist/jobs/job-state.js +3 -0
- package/dist/jobs/job-state.js.map +1 -0
- package/dist/jobs/log-entry.d.ts +7 -0
- package/dist/jobs/log-entry.d.ts.map +1 -0
- package/dist/jobs/log-entry.js +3 -0
- package/dist/jobs/log-entry.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export { CliProcessCommand } from './cli-process-command';
|
|
|
3
3
|
export { ICliCommandParameterDescriptor, CliCommandParameterDescriptor } from './cli-command-parameter-descriptor';
|
|
4
4
|
export { ICliCommandProcessor, CliCommandProcessor } from './cli-command-processor';
|
|
5
5
|
export { ICliModule, CliModule } from './cli-module';
|
|
6
|
+
export { ICliJob, ICliJobExecutionContext, ICliJobLogger, CliJobOptions, JobOverlapPolicy, ICliJobStorageProvider, JobExecution, JobExecutionStatus, JobState, JobStatus, JobLogEntry, JobLogLevel, } from './jobs';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnH,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnH,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACH,OAAO,EACP,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,GACd,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job-execution-context.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,aAAa,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job-execution-context.js","sourceRoot":"","sources":["../../src/jobs/cli-job-execution-context.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job-logger.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-logger.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job-logger.js","sourceRoot":"","sources":["../../src/jobs/cli-job-logger.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type JobOverlapPolicy = 'skip' | 'queue' | 'cancel';
|
|
2
|
+
export type JobRetryStrategy = 'fixed' | 'linear' | 'exponential';
|
|
3
|
+
export interface CliJobOptions {
|
|
4
|
+
/** Display name for the job. Defaults to class name. */
|
|
5
|
+
name?: string;
|
|
6
|
+
/** Description of what the job does. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Optional grouping key (e.g., "maintenance"). */
|
|
9
|
+
group?: string;
|
|
10
|
+
/** Cron expression for scheduling. Mutually exclusive with `interval`. */
|
|
11
|
+
schedule?: string;
|
|
12
|
+
/** Simple interval string: "30s", "5m", "1h", "1d". Mutually exclusive with `schedule`. */
|
|
13
|
+
interval?: string;
|
|
14
|
+
/** Whether the job starts in active state. Default true. */
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
/** Number of retries on failure. Default 1. */
|
|
17
|
+
maxRetries?: number;
|
|
18
|
+
/** Delay before first retry (e.g., "5s", "1m"). Default "5s". */
|
|
19
|
+
retryDelay?: string;
|
|
20
|
+
/** Retry backoff strategy: 'fixed' (constant delay), 'linear' (delay * attempt), 'exponential' (delay * 2^attempt). Default 'exponential'. */
|
|
21
|
+
retryStrategy?: JobRetryStrategy;
|
|
22
|
+
/** Maximum execution time before cancellation (e.g., "5m"). */
|
|
23
|
+
timeout?: string;
|
|
24
|
+
/** Behavior when timer fires while job is already running. Default 'skip'. */
|
|
25
|
+
overlapPolicy?: JobOverlapPolicy;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=cli-job-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job-options.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC3D,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAa,CAAC;AAElE,MAAM,WAAW,aAAa;IAC1B,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8IAA8I;IAC9I,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,gBAAgB,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job-options.js","sourceRoot":"","sources":["../../src/jobs/cli-job-options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JobExecution, JobExecutionStatus } from './job-execution';
|
|
2
|
+
import { JobState } from './job-state';
|
|
3
|
+
export interface ICliJobStorageProvider {
|
|
4
|
+
saveExecution(execution: JobExecution): Promise<void>;
|
|
5
|
+
getExecutions(jobId: string, options?: {
|
|
6
|
+
limit?: number;
|
|
7
|
+
offset?: number;
|
|
8
|
+
status?: JobExecutionStatus;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
items: JobExecution[];
|
|
11
|
+
total: number;
|
|
12
|
+
}>;
|
|
13
|
+
getExecution(executionId: string): Promise<JobExecution | null>;
|
|
14
|
+
saveJobState(jobId: string, state: JobState): Promise<void>;
|
|
15
|
+
getJobState(jobId: string): Promise<JobState | null>;
|
|
16
|
+
getAllJobStates(): Promise<Map<string, JobState>>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=cli-job-storage-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job-storage-provider.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-storage-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,WAAW,sBAAsB;IACnC,aAAa,CAAC,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,aAAa,CACT,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,kBAAkB,CAAA;KAAE,GAC3E,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrD,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAChE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACrD,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;CACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job-storage-provider.js","sourceRoot":"","sources":["../../src/jobs/cli-job-storage-provider.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,WAAW,OAAO;IACpB,YAAY,CAAC,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-job.js","sourceRoot":"","sources":["../../src/jobs/cli-job.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { ICliJob } from './cli-job';
|
|
2
|
+
export { ICliJobExecutionContext } from './cli-job-execution-context';
|
|
3
|
+
export { ICliJobLogger } from './cli-job-logger';
|
|
4
|
+
export { CliJobOptions, JobOverlapPolicy } from './cli-job-options';
|
|
5
|
+
export { ICliJobStorageProvider } from './cli-job-storage-provider';
|
|
6
|
+
export { JobExecution, JobExecutionStatus } from './job-execution';
|
|
7
|
+
export { JobState, JobStatus } from './job-state';
|
|
8
|
+
export { JobLogEntry, JobLogLevel } from './log-entry';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jobs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/jobs/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JobLogEntry } from './log-entry';
|
|
2
|
+
export type JobExecutionStatus = 'running' | 'completed' | 'failed' | 'cancelled' | 'timed_out';
|
|
3
|
+
export interface JobExecution {
|
|
4
|
+
id: string;
|
|
5
|
+
jobId: string;
|
|
6
|
+
jobName: string;
|
|
7
|
+
status: JobExecutionStatus;
|
|
8
|
+
startedAt: string;
|
|
9
|
+
completedAt?: string;
|
|
10
|
+
duration?: number;
|
|
11
|
+
error?: string;
|
|
12
|
+
logs: JobLogEntry[];
|
|
13
|
+
retryAttempt: number;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=job-execution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-execution.d.ts","sourceRoot":"","sources":["../../src/jobs/job-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AAEhG,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-execution.js","sourceRoot":"","sources":["../../src/jobs/job-execution.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-state.d.ts","sourceRoot":"","sources":["../../src/jobs/job-state.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExD,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-state.js","sourceRoot":"","sources":["../../src/jobs/job-state.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-entry.d.ts","sourceRoot":"","sources":["../../src/jobs/log-entry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjE,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-entry.js","sourceRoot":"","sources":["../../src/jobs/log-entry.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qodalis/cli-server-abstractions",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.4",
|
|
4
4
|
"description": "Shared interfaces and base classes for Qodalis CLI command processors — zero framework dependencies",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|