@codraoss/node-adapters 0.9.12 → 0.9.13

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.js CHANGED
@@ -76,7 +76,10 @@ var RedisQueueAdapter = class {
76
76
  this.queue = queue;
77
77
  }
78
78
  async send(message, options) {
79
- const jobOptions = options?.delaySeconds ? { delay: options.delaySeconds * 1e3 } : void 0;
79
+ const jobOptions = options?.jobId ? { jobId: options.jobId } : {};
80
+ if (options?.delaySeconds) {
81
+ jobOptions.delay = options.delaySeconds * 1e3;
82
+ }
80
83
  await this.queue.add("review-job", message, jobOptions);
81
84
  }
82
85
  async deleteJob(jobId) {
@@ -107,7 +110,11 @@ var RedisSessionStore = class {
107
110
  if (!sessionString) {
108
111
  return null;
109
112
  }
110
- return JSON.parse(sessionString);
113
+ try {
114
+ return JSON.parse(sessionString);
115
+ } catch {
116
+ return null;
117
+ }
111
118
  }
112
119
  async destroySession(token) {
113
120
  await this.redis.del(this.sessionKey(token));
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/node-orchestrator.ts","../src/platform.ts","../src/redis-kv.ts","../src/redis-queue.ts","../src/redis-session-store.ts","../src/worker.ts"],"sourcesContent":["import type { JobOrchestrator, QueueProducer, ReviewRuntime } from '@codraoss/core';\nimport type { ReviewJobMessage } from '@codraoss/schema';\nimport { runReview } from '@codraoss/core';\nimport { runWithDb } from '@codraoss/db/client';\nimport type { DbEnv } from '@codraoss/db/env';\n\nexport class NodeOrchestrator implements JobOrchestrator {\n constructor(\n private readonly env: ReviewRuntime & DbEnv,\n private readonly queue: QueueProducer<ReviewJobMessage>\n ) {}\n\n async startReviewJob(id: string, params: ReviewJobMessage): Promise<void> {\n return runWithDb(this.env, async () => {\n const currentParams = { ...params };\n currentParams.phase = currentParams.phase ?? 'prepare';\n\n const result = await runReview(this.env, currentParams);\n\n if (result.action === 'next_phase') {\n const nextParams: ReviewJobMessage = {\n ...currentParams,\n phase: result.phase,\n };\n if (result.jobId) {\n nextParams.jobId = result.jobId;\n }\n await this.queue.send(nextParams, { delaySeconds: result.delaySeconds });\n } else if (result.action === 'retry') {\n await this.queue.send(currentParams, { delaySeconds: result.delaySeconds });\n } else if (result.action === 'ack') {\n // Job is done, nothing to enqueue\n }\n });\n }\n}\n","import type { Clock, IdGenerator, KvStore } from '@codraoss/core/ports';\n\nexport function makeKvStore(appKv: KvStore): KvStore {\n return {\n get: (key) => appKv.get(key),\n put: (key, value, options) => appKv.put(key, value, options),\n };\n}\n\nexport const systemClock: Clock = { now: () => Date.now() };\n\nexport const cryptoIds: IdGenerator = { randomUUID: () => crypto.randomUUID() };\n","import type { KeyValueStore } from '@codraoss/core/ports';\nimport type { Redis } from 'ioredis';\n\nexport class RedisKVAdapter implements KeyValueStore {\n constructor(private readonly redis: Redis) {}\n\n async get(key: string, type?: 'json' | 'text'): Promise<any> {\n const value = await this.redis.get(key);\n if (value === null) {\n return null;\n }\n \n if (type === 'json') {\n try {\n return JSON.parse(value);\n } catch (err) {\n return null;\n }\n }\n \n return value;\n }\n\n async put(key: string, value: any, options?: { expirationTtl?: number }): Promise<void> {\n const stringValue = typeof value === 'string' ? value : JSON.stringify(value);\n \n if (options?.expirationTtl) {\n // expirationTtl from Cloudflare KV is in seconds, EX parameter in Redis is also seconds\n await this.redis.set(key, stringValue, 'EX', options.expirationTtl);\n } else {\n await this.redis.set(key, stringValue);\n }\n }\n\n async delete(key: string): Promise<void> {\n await this.redis.del(key);\n }\n}\n","import type { QueueProducer } from '@codraoss/core/ports';\nimport type { Queue } from 'bullmq';\n\nexport class RedisQueueAdapter<T> implements QueueProducer<T> {\n constructor(private readonly queue: Queue) {}\n\n async send(message: T, options?: { delaySeconds?: number }): Promise<void> {\n const jobOptions = options?.delaySeconds\n ? { delay: options.delaySeconds * 1000 }\n : undefined;\n\n await this.queue.add('review-job', message, jobOptions);\n }\n\n async deleteJob(jobId: string): Promise<void> {\n const bullMqJob = await this.queue.getJob(jobId);\n if (bullMqJob) {\n await bullMqJob.remove();\n }\n }\n}\n","import type { DashboardSessionUser, SessionStore } from '@codraoss/core/ports';\nimport type Redis from 'ioredis';\nimport { customAlphabet } from 'nanoid';\n\nconst nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 21);\n\nexport class RedisSessionStore implements SessionStore {\n constructor(private readonly redis: Redis) {}\n\n private sessionKey(id: string): string {\n return `session:${id}`;\n }\n\n async createSession(session: DashboardSessionUser): Promise<string> {\n const id = nanoid();\n await this.redis.setex(this.sessionKey(id), 60 * 60 * 24 * 7, JSON.stringify(session)); // 7 days expiration\n return id;\n }\n\n async readSession(token: string): Promise<DashboardSessionUser | null> {\n const sessionString = await this.redis.get(this.sessionKey(token));\n if (!sessionString) {\n return null;\n }\n return JSON.parse(sessionString) as DashboardSessionUser;\n }\n\n async destroySession(token: string): Promise<void> {\n await this.redis.del(this.sessionKey(token));\n }\n\n async renewSession(token: string): Promise<void> {\n // Renew by extending the expiration, if it exists\n await this.redis.expire(this.sessionKey(token), 60 * 60 * 24 * 7); // 7 days expiration\n }\n}\n","import { Worker, type Job } from 'bullmq';\nimport { reviewJobMessageSchema, type ReviewJobMessage } from '@codraoss/schema';\nimport { NodeOrchestrator } from './node-orchestrator';\nimport type { ReviewRuntime } from '@codraoss/core/ports';\nimport type { QueueProducer } from '@codraoss/core/ports';\nimport type Redis from 'ioredis';\n\nexport function startWorker(\n redisConnection: Redis,\n queue: QueueProducer<ReviewJobMessage>,\n createRuntime: () => ReviewRuntime,\n logger: { info: (msg: string) => void, error: (msg: string, err?: any) => void }\n): Worker {\n const worker = new Worker(\n 'codra-reviews',\n async (job: Job) => {\n const parseResult = reviewJobMessageSchema.safeParse(job.data);\n if (!parseResult.success) {\n logger.error(`[Worker] Invalid job payload for job ${job.id}`, parseResult.error);\n throw new Error('Invalid job payload');\n }\n\n const reviewRuntime = createRuntime();\n // Need to cast to any since DbEnv is dynamically merged downstream\n const orchestrator = new NodeOrchestrator(reviewRuntime as any, queue);\n await orchestrator.startReviewJob(job.id ?? 'unknown', parseResult.data);\n },\n { connection: redisConnection }\n );\n\n worker.on('completed', (job) => {\n logger.info(`[Worker] Job ${job.id} completed successfully`);\n });\n\n worker.on('failed', (job, err) => {\n logger.error(`[Worker] Job ${job?.id} failed`, err);\n });\n\n return worker;\n}\n"],"mappings":";AAEA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAGnB,IAAM,mBAAN,MAAkD;AAAA,EACvD,YACmB,KACA,OACjB;AAFiB;AACA;AAAA,EAChB;AAAA,EAEH,MAAM,eAAe,IAAY,QAAyC;AACxE,WAAO,UAAU,KAAK,KAAK,YAAY;AACrC,YAAM,gBAAgB,EAAE,GAAG,OAAO;AAClC,oBAAc,QAAQ,cAAc,SAAS;AAE7C,YAAM,SAAS,MAAM,UAAU,KAAK,KAAK,aAAa;AAEtD,UAAI,OAAO,WAAW,cAAc;AAClC,cAAM,aAA+B;AAAA,UACnC,GAAG;AAAA,UACH,OAAO,OAAO;AAAA,QAChB;AACA,YAAI,OAAO,OAAO;AAChB,qBAAW,QAAQ,OAAO;AAAA,QAC5B;AACA,cAAM,KAAK,MAAM,KAAK,YAAY,EAAE,cAAc,OAAO,aAAa,CAAC;AAAA,MACzE,WAAW,OAAO,WAAW,SAAS;AACpC,cAAM,KAAK,MAAM,KAAK,eAAe,EAAE,cAAc,OAAO,aAAa,CAAC;AAAA,MAC5E,WAAW,OAAO,WAAW,OAAO;AAAA,MAEpC;AAAA,IACF,CAAC;AAAA,EACH;AACF;;;ACjCO,SAAS,YAAY,OAAyB;AACnD,SAAO;AAAA,IACL,KAAK,CAAC,QAAQ,MAAM,IAAI,GAAG;AAAA,IAC3B,KAAK,CAAC,KAAK,OAAO,YAAY,MAAM,IAAI,KAAK,OAAO,OAAO;AAAA,EAC7D;AACF;AAEO,IAAM,cAAqB,EAAE,KAAK,MAAM,KAAK,IAAI,EAAE;AAEnD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G,aAAa,CAAC,QAAQ;AAC9B,WAAO,KAAK,gBAAgB,IAAI,EAAE,yBAAyB;AAAA,EAC7D,CAAC;AAED,SAAO,GAAG,UAAU,CAAC,KAAK,QAAQ;AAChC,WAAO,MAAM,gBAAgB,KAAK,EAAE,WAAW,GAAG;AAAA,EACpD,CAAC;AAED,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../src/node-orchestrator.ts","../src/platform.ts","../src/redis-kv.ts","../src/redis-queue.ts","../src/redis-session-store.ts","../src/worker.ts"],"sourcesContent":["import type { JobOrchestrator, QueueProducer, ReviewRuntime } from '@codraoss/core';\nimport type { ReviewJobMessage } from '@codraoss/schema';\nimport { runReview } from '@codraoss/core';\nimport { runWithDb } from '@codraoss/db/client';\nimport type { DbEnv } from '@codraoss/db/env';\n\nexport class NodeOrchestrator implements JobOrchestrator {\n constructor(\n private readonly env: ReviewRuntime & DbEnv,\n private readonly queue: QueueProducer<ReviewJobMessage>\n ) {}\n\n async startReviewJob(id: string, params: ReviewJobMessage): Promise<void> {\n return runWithDb(this.env, async () => {\n const currentParams = { ...params };\n currentParams.phase = currentParams.phase ?? 'prepare';\n\n const result = await runReview(this.env, currentParams);\n\n if (result.action === 'next_phase') {\n const nextParams: ReviewJobMessage = {\n ...currentParams,\n phase: result.phase,\n };\n if (result.jobId) {\n nextParams.jobId = result.jobId;\n }\n await this.queue.send(nextParams, { delaySeconds: result.delaySeconds });\n } else if (result.action === 'retry') {\n await this.queue.send(currentParams, { delaySeconds: result.delaySeconds });\n } else if (result.action === 'ack') {\n // Job is done, nothing to enqueue\n }\n });\n }\n}\n","import type { Clock, IdGenerator, KvStore } from '@codraoss/core/ports';\n\nexport function makeKvStore(appKv: KvStore): KvStore {\n return {\n get: (key) => appKv.get(key),\n put: (key, value, options) => appKv.put(key, value, options),\n };\n}\n\nexport const systemClock: Clock = { now: () => Date.now() };\n\nexport const cryptoIds: IdGenerator = { randomUUID: () => crypto.randomUUID() };\n","import type { KeyValueStore } from '@codraoss/core/ports';\nimport type { Redis } from 'ioredis';\n\nexport class RedisKVAdapter implements KeyValueStore {\n constructor(private readonly redis: Redis) {}\n\n async get(key: string, type?: 'json' | 'text'): Promise<any> {\n const value = await this.redis.get(key);\n if (value === null) {\n return null;\n }\n \n if (type === 'json') {\n try {\n return JSON.parse(value);\n } catch (err) {\n return null;\n }\n }\n \n return value;\n }\n\n async put(key: string, value: any, options?: { expirationTtl?: number }): Promise<void> {\n const stringValue = typeof value === 'string' ? value : JSON.stringify(value);\n \n if (options?.expirationTtl) {\n // expirationTtl from Cloudflare KV is in seconds, EX parameter in Redis is also seconds\n await this.redis.set(key, stringValue, 'EX', options.expirationTtl);\n } else {\n await this.redis.set(key, stringValue);\n }\n }\n\n async delete(key: string): Promise<void> {\n await this.redis.del(key);\n }\n}\n","import type { QueueProducer } from '@codraoss/core/ports';\nimport type { Queue } from 'bullmq';\n\nexport class RedisQueueAdapter<T> implements QueueProducer<T> {\n constructor(private readonly queue: Queue) {}\n\n async send(message: T, options?: { delaySeconds?: number; jobId?: string }): Promise<void> {\n const jobOptions: any = options?.jobId ? { jobId: options.jobId } : {};\n if (options?.delaySeconds) {\n jobOptions.delay = options.delaySeconds * 1000;\n }\n\n await this.queue.add('review-job', message, jobOptions);\n }\n\n async deleteJob(jobId: string): Promise<void> {\n const bullMqJob = await this.queue.getJob(jobId);\n if (bullMqJob) {\n await bullMqJob.remove();\n }\n }\n}\n","import type { DashboardSessionUser, SessionStore } from '@codraoss/core/ports';\nimport type Redis from 'ioredis';\nimport { customAlphabet } from 'nanoid';\n\nconst nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 21);\n\nexport class RedisSessionStore implements SessionStore {\n constructor(private readonly redis: Redis) {}\n\n private sessionKey(id: string): string {\n return `session:${id}`;\n }\n\n async createSession(session: DashboardSessionUser): Promise<string> {\n const id = nanoid();\n await this.redis.setex(this.sessionKey(id), 60 * 60 * 24 * 7, JSON.stringify(session)); // 7 days expiration\n return id;\n }\n\n async readSession(token: string): Promise<DashboardSessionUser | null> {\n const sessionString = await this.redis.get(this.sessionKey(token));\n if (!sessionString) {\n return null;\n }\n try {\n return JSON.parse(sessionString) as DashboardSessionUser;\n } catch {\n // Return null if parsing fails (corrupted JSON)\n return null;\n }\n }\n\n async destroySession(token: string): Promise<void> {\n await this.redis.del(this.sessionKey(token));\n }\n\n async renewSession(token: string): Promise<void> {\n // Renew by extending the expiration, if it exists\n await this.redis.expire(this.sessionKey(token), 60 * 60 * 24 * 7); // 7 days expiration\n }\n}\n","import { Worker, type Job } from 'bullmq';\nimport { reviewJobMessageSchema, type ReviewJobMessage } from '@codraoss/schema';\nimport { NodeOrchestrator } from './node-orchestrator';\nimport type { ReviewRuntime, QueueProducer } from '@codraoss/core/ports';\nimport type Redis from 'ioredis';\n\nexport function startWorker(\n redisConnection: Redis,\n queue: QueueProducer<ReviewJobMessage>,\n createRuntime: () => ReviewRuntime,\n logger: { info: (msg: string) => void, error: (msg: string, err?: any) => void }\n): Worker {\n const worker = new Worker(\n 'codra-reviews',\n async (job: Job) => {\n const parseResult = reviewJobMessageSchema.safeParse(job.data);\n if (!parseResult.success) {\n logger.error(`[Worker] Invalid job payload for job ${job.id}`, parseResult.error);\n throw new Error('Invalid job payload');\n }\n\n const reviewRuntime = createRuntime();\n // Need to cast to any since DbEnv is dynamically merged downstream\n const orchestrator = new NodeOrchestrator(reviewRuntime as any, queue);\n await orchestrator.startReviewJob(job.id ?? 'unknown', parseResult.data);\n },\n { connection: redisConnection }\n );\n\n worker.on('completed', (job) => {\n logger.info(`[Worker] Job ${job.id} completed successfully`);\n });\n\n worker.on('failed', (job, err) => {\n logger.error(`[Worker] Job ${job?.id} failed`, err);\n });\n\n return worker;\n}\n"],"mappings":";AAEA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAGnB,IAAM,mBAAN,MAAkD;AAAA,EACvD,YACmB,KACA,OACjB;AAFiB;AACA;AAAA,EAChB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@
1
1
  {
2
2
  "name": "@codraoss/node-adapters",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
4
4
  "description": "Node.js platform adapters for Codra, including BullMQ, Redis, and Stateless Orchestration.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,16 +12,7 @@
12
12
  }
13
13
  },
14
14
  "publishConfig": {
15
- "access": "public",
16
- "main": "./dist/index.js",
17
- "module": "./dist/index.js",
18
- "types": "./dist/index.d.ts",
19
- "exports": {
20
- ".": {
21
- "import": "./dist/index.js",
22
- "types": "./dist/index.d.ts"
23
- }
24
- }
15
+ "access": "public"
25
16
  },
26
17
  "files": [
27
18
  "dist",
@@ -46,17 +37,17 @@
46
37
  "typecheck": "tsc -p tsconfig.json"
47
38
  },
48
39
  "dependencies": {
49
- "@codraoss/api": "*",
50
- "@codraoss/core": "*",
51
- "@codraoss/db": "*",
52
- "@codraoss/schema": "*",
40
+ "@codraoss/api": "workspace:*",
41
+ "@codraoss/core": "workspace:*",
42
+ "@codraoss/db": "workspace:*",
43
+ "@codraoss/schema": "workspace:*",
53
44
  "bullmq": "^6.3.8",
54
45
  "ioredis": "^6.0.0",
55
- "nanoid": "^5.0.7"
46
+ "nanoid": "^5.0.9"
56
47
  },
57
48
  "devDependencies": {
58
- "@types/node": "^22.0.0",
59
- "tsup": "^8.0.0"
49
+ "@types/node": "^22.0.3",
50
+ "tsup": "^8.0.2"
60
51
  },
61
52
  "module": "./dist/index.js"
62
53
  }