@yieldkit/jobs 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +307 -2
- package/dist/_virtual/_rolldown/runtime.js +12 -0
- package/dist/activity.d.ts +81 -0
- package/dist/activity.js +151 -0
- package/dist/calendar.d.ts +33 -0
- package/dist/calendar.js +205 -0
- package/dist/cluster.d.ts +54 -0
- package/dist/cluster.js +115 -0
- package/dist/cron.d.ts +21 -0
- package/dist/cron.js +80 -0
- package/dist/dispatch.d.ts +97 -0
- package/dist/dispatch.js +140 -0
- package/dist/errors.d.ts +194 -0
- package/dist/errors.js +132 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +22 -0
- package/dist/job.d.ts +306 -0
- package/dist/job.js +45 -0
- package/dist/ledger-memory.d.ts +64 -0
- package/dist/ledger-memory.js +246 -0
- package/dist/ledger-retry.js +21 -0
- package/dist/ledger-sql-deadline.js +39 -0
- package/dist/ledger-sql.d.ts +5 -0
- package/dist/ledger-sql.js +332 -0
- package/dist/ledger-types.d.ts +340 -0
- package/dist/ledger-types.js +71 -0
- package/dist/ledger.d.ts +51 -0
- package/dist/ledger.js +66 -0
- package/dist/logging.d.ts +83 -0
- package/dist/logging.js +117 -0
- package/dist/maintenance.d.ts +6 -0
- package/dist/maintenance.js +115 -0
- package/dist/metrics.d.ts +14 -0
- package/dist/metrics.js +35 -0
- package/dist/migrations.d.ts +21 -0
- package/dist/migrations.js +194 -0
- package/dist/omit-undefined.js +10 -0
- package/dist/params.d.ts +58 -0
- package/dist/params.js +97 -0
- package/dist/policy.d.ts +225 -0
- package/dist/policy.js +247 -0
- package/dist/probe.js +67 -0
- package/dist/requests-memory.d.ts +36 -0
- package/dist/requests-memory.js +142 -0
- package/dist/requests.d.ts +195 -0
- package/dist/requests.js +242 -0
- package/dist/run-key.d.ts +25 -0
- package/dist/run-key.js +85 -0
- package/dist/run-support.js +212 -0
- package/dist/run.d.ts +163 -0
- package/dist/run.js +258 -0
- package/dist/scheduler.d.ts +56 -0
- package/dist/scheduler.js +227 -0
- package/dist/settle-hook.d.ts +3 -0
- package/dist/settle-hook.js +33 -0
- package/dist/storage-options.d.ts +25 -0
- package/dist/storage-options.js +60 -0
- package/dist/storage.d.ts +53 -0
- package/dist/storage.js +75 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.js +4 -0
- package/dist/time-zone.js +83 -0
- package/dist/workflow-activities.js +227 -0
- package/dist/workflow-retry.js +80 -0
- package/dist/workflow-schema.d.ts +207 -0
- package/dist/workflow-schema.js +360 -0
- package/dist/workflow-settle.js +234 -0
- package/dist/workflow.d.ts +17 -0
- package/dist/workflow.js +202 -0
- package/docs/deployment.md +167 -0
- package/docs/jobs.md +200 -0
- package/docs/logs-and-metrics.md +129 -0
- package/docs/migrations.md +66 -0
- package/docs/policy.md +75 -0
- package/docs/scheduling.md +149 -0
- package/docs/storage.md +138 -0
- package/docs/testing.md +144 -0
- package/docs/workers-and-clients.md +100 -0
- package/package.json +82 -3
package/docs/testing.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Testing
|
|
2
|
+
|
|
3
|
+
`@yieldkit/jobs/testing` replaces PostgreSQL and Cluster with in-memory versions. Time comes from the Effect `Clock`, so `TestClock` drives leases, backoff and durable sleeps.
|
|
4
|
+
|
|
5
|
+
## The ledger and request store
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { defineJob, runJob } from '@yieldkit/jobs';
|
|
9
|
+
import { makeJobRunsMemory } from '@yieldkit/jobs/testing';
|
|
10
|
+
import { Effect, Schema } from 'effect';
|
|
11
|
+
|
|
12
|
+
const job = defineJob({
|
|
13
|
+
name: 'count',
|
|
14
|
+
description: 'Counts to three',
|
|
15
|
+
cadence: { _tag: 'Daily' },
|
|
16
|
+
params: { schema: Schema.Struct({}), defaults: {} },
|
|
17
|
+
stats: Schema.Struct({ count: Schema.Int }),
|
|
18
|
+
run: () => Effect.succeed({ count: 3 }),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const test = Effect.gen(function* () {
|
|
22
|
+
const ledger = yield* makeJobRunsMemory({ policy: { lease: { duration: '20 seconds' } } });
|
|
23
|
+
const outcome = yield* runJob(job, { trigger: 'schedule' }).pipe(Effect.provide(ledger.layer));
|
|
24
|
+
return { outcome, rows: ledger.rows(), settles: ledger.settles() };
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
| Factory | Returns |
|
|
29
|
+
| ------------------------------------------- | ---------------------------------------- |
|
|
30
|
+
| `makeJobRunsMemory({ onSettle?, policy? })` | `layer`, `rows()` and `settles()` |
|
|
31
|
+
| `makeJobRequestsMemory({ findRun? })` | `layer`, a `service` handle and `rows()` |
|
|
32
|
+
|
|
33
|
+
The memory ledger has the SQL ledger's claim, lease, fence, backoff, query and prune rules. Its `layer` also provides the `SecureRandom` that `runJob` needs. `settles()` lists each successful settle with its `RunResult` and the `JobSettled` event the hook received.
|
|
34
|
+
|
|
35
|
+
## Workflows on an in-memory cluster
|
|
36
|
+
|
|
37
|
+
`makeTestClusterLayer(allJobs, only?)` runs workflows, crons and singletons without sockets, and provides a `ShardingConfig` with the jobs' groups. Run the scheduler on it to test cadences:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { defineJob, makeSchedulerLayer } from '@yieldkit/jobs';
|
|
41
|
+
import {
|
|
42
|
+
makeJobRequestsMemory,
|
|
43
|
+
makeJobRunsMemory,
|
|
44
|
+
makeTestClusterLayer,
|
|
45
|
+
} from '@yieldkit/jobs/testing';
|
|
46
|
+
import { Effect, Layer, Schema } from 'effect';
|
|
47
|
+
import { TestClock } from 'effect/testing';
|
|
48
|
+
|
|
49
|
+
const report = defineJob({
|
|
50
|
+
name: 'report',
|
|
51
|
+
description: 'Builds a report',
|
|
52
|
+
cadence: { _tag: 'Every', interval: '5 minutes' },
|
|
53
|
+
params: { schema: Schema.Struct({}), defaults: {} },
|
|
54
|
+
stats: Schema.Struct({}),
|
|
55
|
+
run: () => Effect.succeed({}),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const test = Effect.gen(function* () {
|
|
59
|
+
const ledger = yield* makeJobRunsMemory();
|
|
60
|
+
const requests = yield* makeJobRequestsMemory();
|
|
61
|
+
const cluster = makeTestClusterLayer([report]);
|
|
62
|
+
yield* Layer.build(
|
|
63
|
+
makeSchedulerLayer([report]).pipe(Layer.provide([cluster, ledger.layer, requests.layer])),
|
|
64
|
+
);
|
|
65
|
+
// Runs finish after real async work the test clock does not wait for, and a tick handled after
|
|
66
|
+
// the clock passed the next one skips it, so move one tick at a time and wait for its row.
|
|
67
|
+
const rowsOnceThere = (count: number) =>
|
|
68
|
+
Effect.yieldNow.pipe(
|
|
69
|
+
Effect.map(() => ledger.rows()),
|
|
70
|
+
Effect.repeat({ until: (rows) => rows.length >= count }),
|
|
71
|
+
);
|
|
72
|
+
yield* rowsOnceThere(1);
|
|
73
|
+
yield* TestClock.adjust('5 minutes');
|
|
74
|
+
yield* rowsOnceThere(2);
|
|
75
|
+
yield* TestClock.adjust('5 minutes');
|
|
76
|
+
const rows = yield* rowsOnceThere(3);
|
|
77
|
+
return rows.map((row) => row.runKey); // ['1970-01-01T00:00Z', '...T00:05Z', '...T00:10Z']
|
|
78
|
+
}).pipe(Effect.scoped, Effect.provide(TestClock.layer()));
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
To drive one workflow directly:
|
|
82
|
+
|
|
83
|
+
<!-- prettier-ignore -->
|
|
84
|
+
```ts
|
|
85
|
+
import { defineJob, makeJobWorkflow, makeJobWorkflowLayer } from '@yieldkit/jobs';
|
|
86
|
+
import { makeJobRunsMemory, makeTestClusterLayer } from '@yieldkit/jobs/testing';
|
|
87
|
+
import { Effect, Fiber, Layer, Schema } from 'effect';
|
|
88
|
+
import { TestClock } from 'effect/testing';
|
|
89
|
+
|
|
90
|
+
const job = defineJob({
|
|
91
|
+
name: 'report',
|
|
92
|
+
description: 'Builds a report',
|
|
93
|
+
cadence: { _tag: 'Daily' },
|
|
94
|
+
params: { schema: Schema.Struct({}), defaults: {} },
|
|
95
|
+
stats: Schema.Struct({}),
|
|
96
|
+
run: () => Effect.succeed({}),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const test = Effect.gen(function* () {
|
|
100
|
+
const ledger = yield* makeJobRunsMemory();
|
|
101
|
+
const cluster = makeTestClusterLayer([job]);
|
|
102
|
+
const env = Layer.mergeAll(
|
|
103
|
+
cluster,
|
|
104
|
+
ledger.layer,
|
|
105
|
+
makeJobWorkflowLayer(job).pipe(Layer.provide([ledger.layer, cluster])),
|
|
106
|
+
);
|
|
107
|
+
return yield* Effect.gen(function* () {
|
|
108
|
+
const fiber = yield* makeJobWorkflow(job)
|
|
109
|
+
.execute({ runKey: '2026-11-25', trigger: 'schedule', params: {}, force: false, requestId: null, attemptNonce: null })
|
|
110
|
+
.pipe(Effect.forkChild);
|
|
111
|
+
// The workflow reaches each durable sleep through real async work, so keep advancing.
|
|
112
|
+
while (fiber.pollUnsafe() === undefined) {
|
|
113
|
+
yield* TestClock.adjust('1 minute');
|
|
114
|
+
}
|
|
115
|
+
return yield* Fiber.join(fiber);
|
|
116
|
+
}).pipe(Effect.provide(env));
|
|
117
|
+
}).pipe(Effect.scoped, Effect.provide(TestClock.layer()));
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
A workflow that retries needs nothing more: the loop steps through each backoff sleep as the workflow reaches it.
|
|
121
|
+
|
|
122
|
+
## Against PostgreSQL
|
|
123
|
+
|
|
124
|
+
`startPostgresContainer` from `@yieldkit/pg/testing` starts a database (it needs `@testcontainers/postgresql`). `JobStorage.layerWith()` migrates the library's tables on build, then provides the storage:
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import { JobStorage } from '@yieldkit/jobs';
|
|
128
|
+
import { makePgLayer } from '@yieldkit/pg';
|
|
129
|
+
import { startPostgresContainer } from '@yieldkit/pg/testing';
|
|
130
|
+
import { Layer } from 'effect';
|
|
131
|
+
|
|
132
|
+
const container = await startPostgresContainer();
|
|
133
|
+
|
|
134
|
+
export const StorageLive = JobStorage.layerWith().pipe(
|
|
135
|
+
Layer.provide(makePgLayer({ url: container.connectionUri, applicationName: 'test' })),
|
|
136
|
+
);
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
For an end-to-end test on a real Cluster, migrate your Cluster's storage the way your deploy step does, for example with Effect's `SqlMessageStorage.layerWith` in the test.
|
|
140
|
+
|
|
141
|
+
## Limits
|
|
142
|
+
|
|
143
|
+
- The in-memory cluster runs internal timers, so advance the clock in minutes or hours rather than days.
|
|
144
|
+
- It gets slower as its journal grows, because Effect's memory driver scans it. Use it for behaviour tests, not soak tests.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Workers and clients
|
|
2
|
+
|
|
3
|
+
Jobs run on your Effect Cluster. A **worker** is a runner that claims shards and runs `makeSchedulerLayer`: the jobs' workflows, crons and singletons. A **client**, usually an API server, only stores and dispatches workflows. The library builds neither: you compose the Cluster (storage, transport, serialization, health checks) and hand it in.
|
|
4
|
+
|
|
5
|
+
## What the jobs engine needs from your Cluster
|
|
6
|
+
|
|
7
|
+
- **Services.** `makeSchedulerLayer` needs `Sharding`, `MessageStorage`, `WorkflowEngine` (from `ClusterWorkflowEngine.layer`) and your `ShardingConfig`. `dispatchApiJobWorkflow`, `dispatchJob`, `makeJobWorkflow(...).poll` and `runJob` need only `WorkflowEngine` or nothing Cluster-related.
|
|
8
|
+
- **Shard groups.** Each job that is not a manual `Once` job, `OnDemand` jobs included, runs in a group named after it. Maintenance runs in `yieldkit-jobs`. A job's durable clocks run in the job's own group.
|
|
9
|
+
- **Migrated tables.** Your Cluster's storage is yours to migrate, for example with `SqlMessageStorage.layerMigrations` and `SqlRunnerStorage.layerMigrations`. The library's tables come from [`JobStorage.layerMigrations`](migrations.md).
|
|
10
|
+
|
|
11
|
+
Add the jobs' groups to your own with two helpers:
|
|
12
|
+
|
|
13
|
+
| Helper | Use in |
|
|
14
|
+
| --------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `availableShardGroupsFor(allJobs)` | `availableShardGroups` of every runner and client: `default`, `yieldkit-jobs` and every job's group |
|
|
16
|
+
| `assignedShardGroupsFor(allJobs, only)` | `assignedShardGroups` of a worker: `default`, `yieldkit-jobs` and the groups of the jobs it runs |
|
|
17
|
+
|
|
18
|
+
Every process of one Cluster must agree on `availableShardGroups` and `shardsPerGroup`; Cluster does not check that across processes.
|
|
19
|
+
|
|
20
|
+
## Worker
|
|
21
|
+
|
|
22
|
+
The [README quick start](../README.md#quick-start) builds a full worker. `makeSchedulerLayer` takes two options:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { makeSchedulerLayer } from '@yieldkit/jobs';
|
|
26
|
+
|
|
27
|
+
import { allJobs } from './jobs.ts';
|
|
28
|
+
|
|
29
|
+
export const WorkerLive = makeSchedulerLayer(allJobs, {
|
|
30
|
+
only: ['sync-orders'], // jobs this worker runs; default all but manual Once jobs
|
|
31
|
+
params: { 'sync-orders': { limit: 500 } }, // operator params per job, under API params
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Operator params that do not decode for a scheduled job fail the layer with `ClusterConfigError`.
|
|
36
|
+
|
|
37
|
+
Derive the worker's groups from the helpers, next to your own: `assignedShardGroups: ['billing', ...assignedShardGroupsFor(allJobs, only)]`. Pass the same options to `NodeClusterHttp.layer` and `ShardingConfig.layerFromEnv`, and always set `runnerAddress` ([why](deployment.md#do-not-let-host-and-port-choose-the-address)).
|
|
38
|
+
|
|
39
|
+
`makeSchedulerLayer` registers:
|
|
40
|
+
|
|
41
|
+
- one workflow per job;
|
|
42
|
+
- a `ClusterCron` per `Every` and `Daily` job (in UTC) and per `Cron` job (in its `timeZone`); `OnDemand` jobs get none;
|
|
43
|
+
- a start-up singleton per `Every`, `Daily` and automatic `Once` job that dispatches the current run key, again every minute until Cluster accepts it (a `Daily` job only once its due time has passed and before `until`);
|
|
44
|
+
- one [maintenance singleton](policy.md#maintenance), in the `yieldkit-jobs` group.
|
|
45
|
+
|
|
46
|
+
It also needs the services the jobs' `run` effects use. At start-up it fails with:
|
|
47
|
+
|
|
48
|
+
- `UnknownJobError`: `only` names an unknown job;
|
|
49
|
+
- `ClusterConfigError`: `availableShardGroups` lacks a group of `availableShardGroupsFor(allJobs)`; `assignedShardGroups` lacks `yieldkit-jobs` or the group of a job this worker runs, or claims the group of a job it does not run (its workflows would land on this runner with no handler); a job name is too long for Cluster's shard ids at your `shardsPerGroup`; or a job name breaks the [naming rules](jobs.md#limits).
|
|
50
|
+
|
|
51
|
+
## Client
|
|
52
|
+
|
|
53
|
+
A client runs Cluster with `clientOnly: true`, `runnerAddress: Option.none()`, no assigned groups and `shardLockDisableAdvisory: true`, and the workers' `availableShardGroups` and `shardsPerGroup`. Without `Option.none()`, Effect's default address registers the client as a runner that claims `default` shards it cannot serve. The [README](../README.md#start-a-job-from-an-api) shows one. `checkShardingConfig(allJobs)` checks its groups.
|
|
54
|
+
|
|
55
|
+
`dispatchApiJobWorkflow` drops keys outside `apiParams` and fails with `InvalidJobParams` when the rest do not decode; to reject disallowed keys instead of dropping them, check `findDisallowedApiParams` first.
|
|
56
|
+
|
|
57
|
+
To follow a request, read its row and ask Cluster for the workflow's reply:
|
|
58
|
+
|
|
59
|
+
<!-- prettier-ignore -->
|
|
60
|
+
```ts
|
|
61
|
+
import { JobRequests, makeJobWorkflow } from '@yieldkit/jobs';
|
|
62
|
+
import { Effect } from 'effect';
|
|
63
|
+
|
|
64
|
+
import { syncOrders } from './jobs.ts';
|
|
65
|
+
|
|
66
|
+
export const requestStatus = (requestId: string, executionId: string) =>
|
|
67
|
+
Effect.gen(function* () {
|
|
68
|
+
const requests = yield* JobRequests;
|
|
69
|
+
const status = yield* requests.getStatus(syncOrders.name, requestId); // request row and its ledger row
|
|
70
|
+
const reply = yield* makeJobWorkflow(syncOrders).poll(executionId); // Option.none() while there is no reply
|
|
71
|
+
return { pickedAt: status?.request.pickedAt, run: status?.run, reply };
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
[JobRequests](storage.md#jobrequests) describes what `getStatus` returns.
|
|
76
|
+
|
|
77
|
+
## Security
|
|
78
|
+
|
|
79
|
+
Cluster's runner RPCs are unauthenticated. Keep the runner port on a private network, and the Cluster's database private: anyone who can write its messages can start a `manual` run with any params.
|
|
80
|
+
|
|
81
|
+
## Persisted names
|
|
82
|
+
|
|
83
|
+
Changing these orphans in-flight executions, since Cluster's tables store them:
|
|
84
|
+
|
|
85
|
+
- the job name: workflow `Workflow/<name>`, cron `ClusterCron/<name>` and shard group;
|
|
86
|
+
- stage names;
|
|
87
|
+
- the workflow's own activity and durable clock names (`claim-round-N`, `settle-completed-N`, `settle-failed-N`, `retry-backoff-N`, `run-at-<epoch ms>`, ...);
|
|
88
|
+
- the idempotency key: `runKey`, or `runKey:attemptNonce`;
|
|
89
|
+
- the payload field names.
|
|
90
|
+
|
|
91
|
+
Singleton names (`@yieldkit/jobs/startup/<job>`, `@yieldkit/jobs/maintenance`) are only held in memory.
|
|
92
|
+
|
|
93
|
+
## Limits
|
|
94
|
+
|
|
95
|
+
- The `apiParams` filter covers `dispatchApiJobWorkflow` and payloads with `trigger: 'api'`, nothing else. Your API must authenticate and rate-limit callers and decide `force` itself.
|
|
96
|
+
- A request whose `pickedAt` is still `null` has no pickup recorded.
|
|
97
|
+
- An empty `workflow.poll` cannot tell a never-sent execution from a queued one or one running without a reply. Check `workflow.poll(executionId)` before dispatching again: a new dispatch is a new execution, and with `force` it runs too.
|
|
98
|
+
- `workflow.interrupt` takes effect at the next activity or sleep, so a body that was just claimed can still start.
|
|
99
|
+
- Pass every job of the deployment to each worker's `makeSchedulerLayer`, even with `only`: the maintenance singleton runs on one worker and prunes only for the jobs it was given.
|
|
100
|
+
- Operator `params` are read each time a workflow starts or resumes, so change them between runs, not during one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,85 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yieldkit/jobs",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Durable scheduled and on-demand jobs for Effect on PostgreSQL, on the Effect Cluster you bring: cron schedules, a fenced run ledger, retries and explicit migrations.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cron",
|
|
7
|
+
"durable-execution",
|
|
8
|
+
"effect",
|
|
9
|
+
"effect-cluster",
|
|
10
|
+
"effect-ts",
|
|
11
|
+
"jobs",
|
|
12
|
+
"postgresql",
|
|
13
|
+
"scheduler",
|
|
14
|
+
"workflow"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/yieldkit/jobs#readme",
|
|
17
|
+
"bugs": "https://github.com/yieldkit/jobs/issues",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/yieldkit/jobs.git"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"docs",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"type": "module",
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./testing": {
|
|
37
|
+
"types": "./dist/testing/index.d.ts",
|
|
38
|
+
"default": "./dist/testing/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./package.json": "./package.json"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@yieldkit/logger": "^0.1.1",
|
|
47
|
+
"@yieldkit/pg": "^0.1.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@effect/platform-bun": "4.1.6",
|
|
51
|
+
"@effect/platform-node": "4.1.6",
|
|
52
|
+
"@effect/sql-pg": "4.1.6",
|
|
53
|
+
"@effect/tsgo": "0.73.7",
|
|
54
|
+
"@testcontainers/postgresql": "12.2.2",
|
|
55
|
+
"@types/node": "26.6.11",
|
|
56
|
+
"@yieldkit/oxlint-config": "0.5.0",
|
|
57
|
+
"effect": "4.1.6",
|
|
58
|
+
"typescript": "^7.0.2",
|
|
59
|
+
"vite-plus": "1.8.0"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@effect/sql-pg": "~4.1.6",
|
|
63
|
+
"effect": "~4.1.6"
|
|
64
|
+
},
|
|
65
|
+
"devEngines": {
|
|
66
|
+
"packageManager": {
|
|
67
|
+
"name": "pnpm",
|
|
68
|
+
"version": "12.23.0",
|
|
69
|
+
"onFail": "download"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"engines": {
|
|
73
|
+
"node": "^22.18.0 || ^24.11.0 || >=26.0.0"
|
|
74
|
+
},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "vp pack",
|
|
77
|
+
"check": "effect-tsgo vp check",
|
|
78
|
+
"lint:fix": "effect-tsgo vp check --fix",
|
|
79
|
+
"ready": "pnpm check && pnpm test",
|
|
80
|
+
"test": "vp test --project unit",
|
|
81
|
+
"test:integration": "vp test --project integration",
|
|
82
|
+
"test:package": "node scripts/package-smoke.mjs",
|
|
83
|
+
"typecheck": "tsc --noEmit"
|
|
84
|
+
}
|
|
6
85
|
}
|