@intelligo-dev/jobs 1.0.0-beta.2 → 1.0.0-beta.5

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/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # @intelligo-dev/jobs
2
+
3
+ A Postgres-backed job queue. No Redis.
4
+
5
+ Part of [Intelligo](https://github.com/intelligo-mn/framework), an application
6
+ framework and operational platform for vertical AI SaaS products. This package
7
+ is published from that repository and is not meant to be used on its own.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pnpm add @intelligo-dev/jobs
13
+ ```
14
+
15
+ Enqueue, claim with `FOR UPDATE SKIP LOCKED`, retry with backoff, prune. One
16
+ fewer moving part in an operational stack that already has Postgres.
17
+
18
+ ## Licence
19
+
20
+ Apache-2.0
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  * cron invocations, a long-running process, a local script) can drain
10
10
  * the same queue without double-processing.
11
11
  */
12
- import type { Job } from "./db/schema";
12
+ import type { Job } from "./db/schema.js";
13
13
  export type EnqueueInput = {
14
14
  kind: string;
15
15
  payload?: Record<string, unknown>;
@@ -56,6 +56,6 @@ export declare function listFailedJobs(limit?: number): Promise<{
56
56
  export declare function pruneJobs(before: Date): Promise<number>;
57
57
  /** The default Postgres-backed queue. */
58
58
  export declare const postgresJobQueue: JobQueue;
59
- export { jobs } from "./db/schema";
60
- export type { Job, InsertJob } from "./db/schema";
59
+ export { jobs } from "./db/schema.js";
60
+ export type { Job, InsertJob } from "./db/schema.js";
61
61
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@
12
12
  import { db } from "@intelligo-dev/core/db";
13
13
  import { createLogger } from "@intelligo-dev/core/logger";
14
14
  import { and, eq, lte, sql } from "drizzle-orm";
15
- import { jobs } from "./db/schema";
15
+ import { jobs } from "./db/schema.js";
16
16
  const log = createLogger("Jobs");
17
17
  export async function enqueue(input) {
18
18
  const id = crypto.randomUUID();
@@ -125,5 +125,5 @@ export async function pruneJobs(before) {
125
125
  }
126
126
  /** The default Postgres-backed queue. */
127
127
  export const postgresJobQueue = { enqueue, drain };
128
- export { jobs } from "./db/schema";
128
+ export { jobs } from "./db/schema.js";
129
129
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intelligo-dev/jobs",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.5",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,22 +23,32 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "drizzle-orm": "^0.45.1",
27
- "@intelligo-dev/core": "1.0.0-beta.2"
26
+ "@intelligo-dev/core": "1.0.0-beta.5"
28
27
  },
29
28
  "devDependencies": {
30
29
  "@types/node": "^22.0.0",
30
+ "drizzle-orm": "^0.45.1",
31
31
  "typescript": "^5.7.2"
32
32
  },
33
33
  "files": [
34
- "dist"
34
+ "dist",
35
+ "LICENSE",
36
+ "README.md",
37
+ "!dist/**/*.tsbuildinfo"
35
38
  ],
36
39
  "publishConfig": {
37
40
  "access": "public"
38
41
  },
42
+ "peerDependencies": {
43
+ "drizzle-orm": "^0.45.1"
44
+ },
45
+ "engines": {
46
+ "node": ">=22"
47
+ },
48
+ "sideEffects": false,
39
49
  "scripts": {
40
50
  "type-check": "tsc --noEmit",
41
51
  "lint": "eslint .",
42
- "build": "tsc -p tsconfig.build.json"
52
+ "build": "tsc -p tsconfig.build.json && node ../../scripts/fix-esm-extensions.mjs dist"
43
53
  }
44
54
  }