@gencow/core 0.1.24 → 0.1.25
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/crud.d.ts +2 -2
- package/dist/crud.js +225 -208
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/reactive.js +10 -3
- package/dist/retry.js +1 -1
- package/dist/rls-db.d.ts +2 -2
- package/dist/rls-db.js +1 -5
- package/dist/scheduler.d.ts +2 -0
- package/dist/scheduler.js +16 -6
- package/dist/server.d.ts +0 -1
- package/dist/server.js +0 -1
- package/dist/storage.js +29 -22
- package/dist/v.d.ts +2 -2
- package/dist/workflow.js +4 -11
- package/dist/workflows-api.js +5 -12
- package/package.json +46 -42
- package/src/__tests__/auth.test.ts +90 -86
- package/src/__tests__/crons.test.ts +69 -67
- package/src/__tests__/crud-codegen-integration.test.ts +164 -170
- package/src/__tests__/crud-owner-rls.test.ts +308 -301
- package/src/__tests__/crud.test.ts +694 -711
- package/src/__tests__/dist-exports.test.ts +120 -120
- package/src/__tests__/fixtures/basic/auth.ts +16 -16
- package/src/__tests__/fixtures/basic/drizzle.config.ts +1 -4
- package/src/__tests__/fixtures/basic/index.ts +1 -1
- package/src/__tests__/fixtures/basic/schema.ts +1 -1
- package/src/__tests__/fixtures/basic/tasks.ts +4 -4
- package/src/__tests__/fixtures/common/auth-schema.ts +38 -34
- package/src/__tests__/helpers/basic-rls-fixture.ts +80 -78
- package/src/__tests__/helpers/pglite-migrations.ts +2 -5
- package/src/__tests__/helpers/pglite-rls-session.ts +13 -16
- package/src/__tests__/helpers/seed-like-fill.ts +50 -44
- package/src/__tests__/helpers/test-gencow-ctx-rls.ts +4 -7
- package/src/__tests__/httpaction.test.ts +91 -91
- package/src/__tests__/image-optimization.test.ts +570 -574
- package/src/__tests__/load.test.ts +321 -308
- package/src/__tests__/network-sim.test.ts +238 -215
- package/src/__tests__/reactive.test.ts +380 -358
- package/src/__tests__/retry.test.ts +99 -84
- package/src/__tests__/rls-crud-basic.test.ts +172 -245
- package/src/__tests__/rls-crud-no-owner-rls-pglite.test.ts +81 -81
- package/src/__tests__/rls-custom-mutation-handlers.test.ts +47 -94
- package/src/__tests__/rls-custom-query-handlers.test.ts +92 -92
- package/src/__tests__/rls-db-leased-connection.test.ts +2 -6
- package/src/__tests__/rls-session-and-policies.test.ts +181 -199
- package/src/__tests__/scheduler-durable-v2.test.ts +199 -181
- package/src/__tests__/scheduler-durable.test.ts +117 -117
- package/src/__tests__/scheduler-exec.test.ts +258 -246
- package/src/__tests__/scheduler.test.ts +129 -111
- package/src/__tests__/storage.test.ts +282 -269
- package/src/__tests__/tsconfig.json +6 -6
- package/src/__tests__/validator.test.ts +236 -232
- package/src/__tests__/workflow.test.ts +309 -286
- package/src/__tests__/ws-integration.test.ts +223 -218
- package/src/__tests__/ws-scale.test.ts +168 -159
- package/src/auth-config.ts +18 -18
- package/src/auth.ts +106 -106
- package/src/crons.ts +77 -77
- package/src/crud.ts +523 -479
- package/src/index.ts +69 -5
- package/src/reactive.ts +357 -331
- package/src/retry.ts +51 -54
- package/src/rls-db.ts +195 -205
- package/src/rls.ts +33 -36
- package/src/scheduler.ts +237 -211
- package/src/server.ts +0 -1
- package/src/storage.ts +632 -593
- package/src/v.ts +119 -114
- package/src/workflow-types.ts +67 -70
- package/src/workflow.ts +99 -116
- package/src/workflows-api.ts +231 -241
- package/src/db.ts +0 -18
package/src/index.ts
CHANGED
|
@@ -5,14 +5,78 @@
|
|
|
5
5
|
* All with Convex-compatible DX patterns.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export type {
|
|
9
|
-
|
|
8
|
+
export type {
|
|
9
|
+
GencowCtx,
|
|
10
|
+
AuthCtx,
|
|
11
|
+
UserIdentity,
|
|
12
|
+
QueryDef,
|
|
13
|
+
MutationDef,
|
|
14
|
+
RealtimeCtx,
|
|
15
|
+
HttpActionDef,
|
|
16
|
+
HttpActionRequest,
|
|
17
|
+
HttpActionResponse,
|
|
18
|
+
HttpActionHandler,
|
|
19
|
+
AIContext,
|
|
20
|
+
AIMessage,
|
|
21
|
+
AIResult,
|
|
22
|
+
} from "./reactive.js";
|
|
23
|
+
export {
|
|
24
|
+
query,
|
|
25
|
+
mutation,
|
|
26
|
+
httpAction,
|
|
27
|
+
buildRealtimeCtx,
|
|
28
|
+
subscribe,
|
|
29
|
+
unsubscribe,
|
|
30
|
+
registerClient,
|
|
31
|
+
deregisterClient,
|
|
32
|
+
handleWsMessage,
|
|
33
|
+
getQueryHandler,
|
|
34
|
+
getQueryDef,
|
|
35
|
+
getRegisteredQueries,
|
|
36
|
+
getRegisteredMutations,
|
|
37
|
+
getRegisteredHttpActions,
|
|
38
|
+
} from "./reactive.js";
|
|
10
39
|
export type { Storage } from "./storage.js";
|
|
11
40
|
export { createScheduler, getSchedulerInfo } from "./scheduler.js";
|
|
12
|
-
export type {
|
|
13
|
-
|
|
41
|
+
export type {
|
|
42
|
+
Scheduler,
|
|
43
|
+
ScheduleOptions,
|
|
44
|
+
FailedJob,
|
|
45
|
+
CreateSchedulerOptions,
|
|
46
|
+
ScheduledJobRecord,
|
|
47
|
+
} from "./scheduler.js";
|
|
48
|
+
export {
|
|
49
|
+
workflow,
|
|
50
|
+
getWorkflowDef,
|
|
51
|
+
getRegisteredWorkflows,
|
|
52
|
+
getWorkflowResumeActionName,
|
|
53
|
+
getWorkflowRealtimeKey,
|
|
54
|
+
createWorkflowRealtimeToken,
|
|
55
|
+
serializeWorkflowValue,
|
|
56
|
+
deserializeWorkflowValue,
|
|
57
|
+
parseWorkflowDurationMs,
|
|
58
|
+
DEFAULT_WORKFLOW_MAX_DURATION_MS,
|
|
59
|
+
DEFAULT_WORKFLOW_MAX_RETRIES,
|
|
60
|
+
WORKFLOW_RESUME_ACTION_PREFIX,
|
|
61
|
+
WORKFLOW_REALTIME_KEY_PREFIX,
|
|
62
|
+
} from "./workflow.js";
|
|
14
63
|
export { deriveWorkflowStatus } from "./workflow-types.js";
|
|
15
|
-
export type {
|
|
64
|
+
export type {
|
|
65
|
+
WorkflowCtx,
|
|
66
|
+
WorkflowHandler,
|
|
67
|
+
WorkflowOptions,
|
|
68
|
+
WorkflowDef,
|
|
69
|
+
WorkflowResumePayload,
|
|
70
|
+
WorkflowStartResult,
|
|
71
|
+
WorkflowSignalResult,
|
|
72
|
+
WorkflowStatus,
|
|
73
|
+
WorkflowDerivedStatus,
|
|
74
|
+
WorkflowSummary,
|
|
75
|
+
WorkflowSnapshot,
|
|
76
|
+
WorkflowStepSnapshot,
|
|
77
|
+
WorkflowListArgs,
|
|
78
|
+
WorkflowDuration,
|
|
79
|
+
} from "./workflow-types.js";
|
|
16
80
|
export { loadWorkflowSnapshot } from "./workflows-api.js";
|
|
17
81
|
export { v, parseArgs, GencowValidationError } from "./v.js";
|
|
18
82
|
export type { Validator, Infer, InferArgs } from "./v.js";
|