@supalive/core 0.1.4 → 0.1.6
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 +17 -2
- package/dist/bytes-AuEkyxeU.js +19 -0
- package/dist/bytes-AuEkyxeU.js.map +1 -0
- package/dist/codec-BHAmGEIQ.js +62 -0
- package/dist/codec-BHAmGEIQ.js.map +1 -0
- package/dist/helper-CiacMqje.d.ts +14 -0
- package/dist/helper-CiacMqje.d.ts.map +1 -0
- package/dist/helper-wGbzz6zo.js +42 -0
- package/dist/helper-wGbzz6zo.js.map +1 -0
- package/dist/index-CaWMDqq0.d.ts +1754 -0
- package/dist/index-CaWMDqq0.d.ts.map +1 -0
- package/dist/mysql-Cxd4Uq5p.d.ts +104 -0
- package/dist/mysql-Cxd4Uq5p.d.ts.map +1 -0
- package/dist/mysql-bvnjYWvZ.js +570 -0
- package/dist/mysql-bvnjYWvZ.js.map +1 -0
- package/dist/overlap-checker-Ct_HP_iB.js +187 -0
- package/dist/overlap-checker-Ct_HP_iB.js.map +1 -0
- package/dist/postgres-B8u1YN8X.js +824 -0
- package/dist/postgres-B8u1YN8X.js.map +1 -0
- package/dist/postgres-Ck-xt72U.d.ts +108 -0
- package/dist/postgres-Ck-xt72U.d.ts.map +1 -0
- package/dist/procedure-DX87tyef.js +124 -0
- package/dist/procedure-DX87tyef.js.map +1 -0
- package/dist/query-Bh0RNxDz.js +673 -0
- package/dist/query-Bh0RNxDz.js.map +1 -0
- package/dist/realtime_db-DOCgqbwi.js +247 -0
- package/dist/realtime_db-DOCgqbwi.js.map +1 -0
- package/dist/router-DlTYWpop.js +81 -0
- package/dist/router-DlTYWpop.js.map +1 -0
- package/dist/schema-Dd7u0A1L.js +109 -0
- package/dist/schema-Dd7u0A1L.js.map +1 -0
- package/dist/src/client/index.d.ts +2 -17
- package/dist/src/client/index.js +1152 -18
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/exports/mysql.d.ts +2 -2
- package/dist/src/exports/mysql.js +2 -2
- package/dist/src/exports/postgres.d.ts +2 -2
- package/dist/src/exports/postgres.js +2 -2
- package/dist/src/exports/procedure.d.ts +3 -5
- package/dist/src/exports/procedure.js +6 -5
- package/dist/src/exports/schema-sql.d.ts +18 -0
- package/dist/src/exports/schema-sql.d.ts.map +1 -0
- package/dist/src/exports/schema-sql.js +161 -0
- package/dist/src/exports/schema-sql.js.map +1 -0
- package/dist/src/exports/server.d.ts +368 -2
- package/dist/src/exports/server.d.ts.map +1 -1
- package/dist/src/exports/server.js +1346 -2
- package/dist/src/exports/server.js.map +1 -1
- package/dist/src/exports/subscription-manager-worker-entry.d.ts +1 -0
- package/dist/src/exports/subscription-manager-worker-entry.js +115 -0
- package/dist/src/exports/subscription-manager-worker-entry.js.map +1 -0
- package/dist/src/exports/types.d.ts +4 -6
- package/dist/src/exports/types.js +5 -6
- package/dist/subscription-worker-pahX0zxg.js +511 -0
- package/dist/subscription-worker-pahX0zxg.js.map +1 -0
- package/dist/types_client_rpc-CIsjQQGG.js +105 -0
- package/dist/types_client_rpc-CIsjQQGG.js.map +1 -0
- package/dist/types_db-DXj_l9n-.js +168 -0
- package/dist/types_db-DXj_l9n-.js.map +1 -0
- package/dist/types_server-Dk6o_B7N.js +24 -0
- package/dist/types_server-Dk6o_B7N.js.map +1 -0
- package/dist/types_server-TFo6SWDH.d.ts +216 -0
- package/dist/types_server-TFo6SWDH.d.ts.map +1 -0
- package/package.json +7 -3
- package/dist/src/client/caller_client.d.ts +0 -42
- package/dist/src/client/caller_client.d.ts.map +0 -1
- package/dist/src/client/caller_client.js +0 -77
- package/dist/src/client/caller_client.js.map +0 -1
- package/dist/src/client/client.d.ts +0 -149
- package/dist/src/client/client.d.ts.map +0 -1
- package/dist/src/client/client.js +0 -308
- package/dist/src/client/client.js.map +0 -1
- package/dist/src/client/index.d.ts.map +0 -1
- package/dist/src/client/sub_key.d.ts +0 -20
- package/dist/src/client/sub_key.d.ts.map +0 -1
- package/dist/src/client/sub_key.js +0 -37
- package/dist/src/client/sub_key.js.map +0 -1
- package/dist/src/client/ws_client_manager.d.ts +0 -268
- package/dist/src/client/ws_client_manager.d.ts.map +0 -1
- package/dist/src/client/ws_client_manager.js +0 -1013
- package/dist/src/client/ws_client_manager.js.map +0 -1
- package/dist/src/config.d.ts +0 -117
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -2
- package/dist/src/config.js.map +0 -1
- package/dist/src/db/bytes.d.ts +0 -4
- package/dist/src/db/bytes.d.ts.map +0 -1
- package/dist/src/db/bytes.js +0 -24
- package/dist/src/db/bytes.js.map +0 -1
- package/dist/src/db/cache.d.ts +0 -30
- package/dist/src/db/cache.d.ts.map +0 -1
- package/dist/src/db/cache.js +0 -153
- package/dist/src/db/cache.js.map +0 -1
- package/dist/src/db/codec.d.ts +0 -10
- package/dist/src/db/codec.d.ts.map +0 -1
- package/dist/src/db/codec.js +0 -73
- package/dist/src/db/codec.js.map +0 -1
- package/dist/src/db/context.d.ts +0 -28
- package/dist/src/db/context.d.ts.map +0 -1
- package/dist/src/db/context.js +0 -147
- package/dist/src/db/context.js.map +0 -1
- package/dist/src/db/db.d.ts +0 -154
- package/dist/src/db/db.d.ts.map +0 -1
- package/dist/src/db/db.js +0 -23
- package/dist/src/db/db.js.map +0 -1
- package/dist/src/db/mysql.d.ts +0 -120
- package/dist/src/db/mysql.d.ts.map +0 -1
- package/dist/src/db/mysql.js +0 -708
- package/dist/src/db/mysql.js.map +0 -1
- package/dist/src/db/postgres.d.ts +0 -116
- package/dist/src/db/postgres.d.ts.map +0 -1
- package/dist/src/db/postgres.js +0 -998
- package/dist/src/db/postgres.js.map +0 -1
- package/dist/src/db/query.d.ts +0 -174
- package/dist/src/db/query.d.ts.map +0 -1
- package/dist/src/db/query.js +0 -790
- package/dist/src/db/query.js.map +0 -1
- package/dist/src/db/query_definition.d.ts +0 -54
- package/dist/src/db/query_definition.d.ts.map +0 -1
- package/dist/src/db/query_definition.js +0 -47
- package/dist/src/db/query_definition.js.map +0 -1
- package/dist/src/db/realtime_db.d.ts +0 -19
- package/dist/src/db/realtime_db.d.ts.map +0 -1
- package/dist/src/db/realtime_db.js +0 -98
- package/dist/src/db/realtime_db.js.map +0 -1
- package/dist/src/db/schema.d.ts +0 -110
- package/dist/src/db/schema.d.ts.map +0 -1
- package/dist/src/db/schema.js +0 -47
- package/dist/src/db/schema.js.map +0 -1
- package/dist/src/db/types_client_rpc.d.ts +0 -157
- package/dist/src/db/types_client_rpc.d.ts.map +0 -1
- package/dist/src/db/types_client_rpc.js +0 -106
- package/dist/src/db/types_client_rpc.js.map +0 -1
- package/dist/src/db/types_db.d.ts +0 -236
- package/dist/src/db/types_db.d.ts.map +0 -1
- package/dist/src/db/types_db.js +0 -188
- package/dist/src/db/types_db.js.map +0 -1
- package/dist/src/exports/mysql.d.ts.map +0 -1
- package/dist/src/exports/mysql.js.map +0 -1
- package/dist/src/exports/postgres.d.ts.map +0 -1
- package/dist/src/exports/postgres.js.map +0 -1
- package/dist/src/exports/procedure.d.ts.map +0 -1
- package/dist/src/exports/procedure.js.map +0 -1
- package/dist/src/exports/types.d.ts.map +0 -1
- package/dist/src/exports/types.js.map +0 -1
- package/dist/src/helper.d.ts +0 -11
- package/dist/src/helper.d.ts.map +0 -1
- package/dist/src/helper.js +0 -45
- package/dist/src/helper.js.map +0 -1
- package/dist/src/logger.d.ts +0 -7
- package/dist/src/logger.d.ts.map +0 -1
- package/dist/src/logger.js +0 -47
- package/dist/src/logger.js.map +0 -1
- package/dist/src/router/index.d.ts +0 -4
- package/dist/src/router/index.d.ts.map +0 -1
- package/dist/src/router/index.js +0 -4
- package/dist/src/router/index.js.map +0 -1
- package/dist/src/router/procedure.d.ts +0 -204
- package/dist/src/router/procedure.d.ts.map +0 -1
- package/dist/src/router/procedure.js +0 -122
- package/dist/src/router/procedure.js.map +0 -1
- package/dist/src/router/router.d.ts +0 -88
- package/dist/src/router/router.d.ts.map +0 -1
- package/dist/src/router/router.js +0 -88
- package/dist/src/router/router.js.map +0 -1
- package/dist/src/server/hash.d.ts +0 -12
- package/dist/src/server/hash.d.ts.map +0 -1
- package/dist/src/server/hash.js +0 -20
- package/dist/src/server/hash.js.map +0 -1
- package/dist/src/server/hash.test.d.ts +0 -2
- package/dist/src/server/hash.test.d.ts.map +0 -1
- package/dist/src/server/hash.test.js +0 -43
- package/dist/src/server/hash.test.js.map +0 -1
- package/dist/src/server/index.d.ts +0 -9
- package/dist/src/server/index.d.ts.map +0 -1
- package/dist/src/server/index.js +0 -8
- package/dist/src/server/index.js.map +0 -1
- package/dist/src/server/overlap-checker.d.ts +0 -18
- package/dist/src/server/overlap-checker.d.ts.map +0 -1
- package/dist/src/server/overlap-checker.js +0 -247
- package/dist/src/server/overlap-checker.js.map +0 -1
- package/dist/src/server/sub_hash.d.ts +0 -23
- package/dist/src/server/sub_hash.d.ts.map +0 -1
- package/dist/src/server/sub_hash.js +0 -38
- package/dist/src/server/sub_hash.js.map +0 -1
- package/dist/src/server/subscription-manager-client.d.ts +0 -120
- package/dist/src/server/subscription-manager-client.d.ts.map +0 -1
- package/dist/src/server/subscription-manager-client.js +0 -207
- package/dist/src/server/subscription-manager-client.js.map +0 -1
- package/dist/src/server/subscription-manager-types.d.ts +0 -168
- package/dist/src/server/subscription-manager-types.d.ts.map +0 -1
- package/dist/src/server/subscription-manager-types.js +0 -94
- package/dist/src/server/subscription-manager-types.js.map +0 -1
- package/dist/src/server/subscription-manager-worker-entry.d.ts +0 -2
- package/dist/src/server/subscription-manager-worker-entry.d.ts.map +0 -1
- package/dist/src/server/subscription-manager-worker-entry.js +0 -127
- package/dist/src/server/subscription-manager-worker-entry.js.map +0 -1
- package/dist/src/server/subscription-manager-worker-protocol.d.ts +0 -40
- package/dist/src/server/subscription-manager-worker-protocol.d.ts.map +0 -1
- package/dist/src/server/subscription-manager-worker-protocol.js +0 -20
- package/dist/src/server/subscription-manager-worker-protocol.js.map +0 -1
- package/dist/src/server/subscription-manager.d.ts +0 -32
- package/dist/src/server/subscription-manager.d.ts.map +0 -1
- package/dist/src/server/subscription-manager.js +0 -249
- package/dist/src/server/subscription-manager.js.map +0 -1
- package/dist/src/server/subscription-manager.test.d.ts +0 -2
- package/dist/src/server/subscription-manager.test.d.ts.map +0 -1
- package/dist/src/server/subscription-manager.test.js +0 -610
- package/dist/src/server/subscription-manager.test.js.map +0 -1
- package/dist/src/server/subscription-worker.d.ts +0 -32
- package/dist/src/server/subscription-worker.d.ts.map +0 -1
- package/dist/src/server/subscription-worker.js +0 -190
- package/dist/src/server/subscription-worker.js.map +0 -1
- package/dist/src/server/supalive-server.d.ts +0 -158
- package/dist/src/server/supalive-server.d.ts.map +0 -1
- package/dist/src/server/supalive-server.js +0 -1048
- package/dist/src/server/supalive-server.js.map +0 -1
- package/dist/src/server/types_server.d.ts +0 -96
- package/dist/src/server/types_server.d.ts.map +0 -1
- package/dist/src/server/types_server.js +0 -36
- package/dist/src/server/types_server.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/src/db/types_db.js
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
import { utf8Encode } from "./bytes";
|
|
3
|
-
export const BigIntSchema = z.string().transform((val) => BigInt(val));
|
|
4
|
-
export const CompareOperatorSchema = z.enum([
|
|
5
|
-
"=", "!=", ">", ">=", "<", "<=",
|
|
6
|
-
"like", "ilike", "contains", "icontains",
|
|
7
|
-
"between",
|
|
8
|
-
"jsonContains", "jsonContainedBy", "jsonHasKey", "jsonArrayContains",
|
|
9
|
-
"isNull", "isNotNull"
|
|
10
|
-
]);
|
|
11
|
-
export const PredicateSchema = z.lazy(() => z.union([
|
|
12
|
-
LeafPredicateSchema,
|
|
13
|
-
AndPredicateSchema,
|
|
14
|
-
OrPredicateSchema,
|
|
15
|
-
]));
|
|
16
|
-
export const LeafPredicateSchema = z.object({
|
|
17
|
-
"kind": z.literal("leaf"),
|
|
18
|
-
column: z.string(),
|
|
19
|
-
operator: CompareOperatorSchema,
|
|
20
|
-
value: z.unknown(),
|
|
21
|
-
value2: z.unknown().optional(),
|
|
22
|
-
// For JSON ops: `true` means `value` is already in dialect-prepared form
|
|
23
|
-
// (a path expression for jsonHasKey, a JSON string for the contains family)
|
|
24
|
-
// and the SqlBuilder should pass it through without further escaping.
|
|
25
|
-
raw: z.boolean().optional(),
|
|
26
|
-
// For jsonContains/jsonContainedBy/jsonArrayContains: optional sub-path
|
|
27
|
-
// into the target JSON value to scope the check (jsonpath syntax, e.g.
|
|
28
|
-
// `$."a"."b"`). Already compiled to a single string.
|
|
29
|
-
path: z.string().optional(),
|
|
30
|
-
// For jsonHasKey multi-path mode: when set, `value` is `string[]` (each
|
|
31
|
-
// entry a jsonpath) and the predicate checks for existence of any (`one`)
|
|
32
|
-
// or all (`all`) of them.
|
|
33
|
-
mode: z.enum(["one", "all"]).optional(),
|
|
34
|
-
});
|
|
35
|
-
export const AndPredicateSchema = z.object({
|
|
36
|
-
kind: z.literal("and"),
|
|
37
|
-
children: z.array(PredicateSchema),
|
|
38
|
-
});
|
|
39
|
-
export const OrPredicateSchema = z.object({
|
|
40
|
-
kind: z.literal("or"),
|
|
41
|
-
children: z.array(PredicateSchema),
|
|
42
|
-
});
|
|
43
|
-
const Uint8ArraySchema = z.any().transform((val) => {
|
|
44
|
-
if (val instanceof Uint8Array)
|
|
45
|
-
return val;
|
|
46
|
-
return bytesFromJson(val);
|
|
47
|
-
});
|
|
48
|
-
export function normalizeIdToBytes(id, fromHex = false) {
|
|
49
|
-
const idStr = typeof id === "number" ? String(id) : id;
|
|
50
|
-
const data = idStr.replace(/-/g, "");
|
|
51
|
-
if (fromHex === true) {
|
|
52
|
-
const len = data.length >>> 1;
|
|
53
|
-
const out = new Uint8Array(len);
|
|
54
|
-
for (let i = 0; i < len; i++) {
|
|
55
|
-
out[i] = parseInt(data.substring(i * 2, i * 2 + 2), 16);
|
|
56
|
-
}
|
|
57
|
-
return out;
|
|
58
|
-
}
|
|
59
|
-
return utf8Encode(data);
|
|
60
|
-
}
|
|
61
|
-
export function normalizeToBytes(value) {
|
|
62
|
-
try {
|
|
63
|
-
return bytesFromJson(value);
|
|
64
|
-
}
|
|
65
|
-
catch (_) {
|
|
66
|
-
return new Uint8Array(0);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
export function bytesFromJson(value) {
|
|
70
|
-
if (value instanceof Uint8Array) {
|
|
71
|
-
return value;
|
|
72
|
-
}
|
|
73
|
-
if (Array.isArray(value)) {
|
|
74
|
-
return Uint8Array.from(value);
|
|
75
|
-
}
|
|
76
|
-
if (value && typeof value === "object" && "type" in value && value.type === "Buffer" && "data" in value) {
|
|
77
|
-
return Uint8Array.from(value.data);
|
|
78
|
-
}
|
|
79
|
-
if (typeof value === "string") {
|
|
80
|
-
return utf8Encode(value);
|
|
81
|
-
}
|
|
82
|
-
if (typeof value === "number") {
|
|
83
|
-
return utf8Encode(String(value));
|
|
84
|
-
}
|
|
85
|
-
throw new Error("Invalid buffer value");
|
|
86
|
-
}
|
|
87
|
-
/*
|
|
88
|
-
* Query specification for a point read (find by ID).
|
|
89
|
-
*/
|
|
90
|
-
export const PointReadSchema = z.object({
|
|
91
|
-
kind: z.literal("point"),
|
|
92
|
-
table: z.string(),
|
|
93
|
-
id: z.string(),
|
|
94
|
-
tableId: Uint8ArraySchema,
|
|
95
|
-
// commit_ts of the row at read time. `null` = row didn't exist (so a later
|
|
96
|
-
// insert is a conflict). `undefined` = the read was added synthetically and
|
|
97
|
-
// OCC should fall back to the commit-log scan / general validator.
|
|
98
|
-
expectedCommitTs: BigIntSchema.nullable().optional(),
|
|
99
|
-
});
|
|
100
|
-
export const RawPointReadSchema = z.object({
|
|
101
|
-
kind: z.literal("point"),
|
|
102
|
-
tableId: Uint8ArraySchema,
|
|
103
|
-
id: Uint8ArraySchema,
|
|
104
|
-
table: z.string(),
|
|
105
|
-
expectedCommitTs: BigIntSchema.nullable().optional(),
|
|
106
|
-
});
|
|
107
|
-
/**
|
|
108
|
-
* Query specification for a range read (get with filters).
|
|
109
|
-
* This is the query definition, not the result.
|
|
110
|
-
*/
|
|
111
|
-
export const RangeReadSchema = z.object({
|
|
112
|
-
kind: z.literal("range"),
|
|
113
|
-
table: z.string(),
|
|
114
|
-
tableId: Uint8ArraySchema,
|
|
115
|
-
predicate: PredicateSchema,
|
|
116
|
-
columns: z.array(z.string()),
|
|
117
|
-
orderBy: z.string().nullable().optional(),
|
|
118
|
-
limit: z.number().nullable().optional(),
|
|
119
|
-
offset: z.number().nullable().optional(),
|
|
120
|
-
});
|
|
121
|
-
export const RawRangeReadSchema = z.object({
|
|
122
|
-
kind: z.literal("range"),
|
|
123
|
-
table: z.string(),
|
|
124
|
-
tableId: Uint8ArraySchema,
|
|
125
|
-
predicate: PredicateSchema,
|
|
126
|
-
columns: z.array(z.string()),
|
|
127
|
-
orderBy: z.string().nullable().optional(),
|
|
128
|
-
limit: z.number().nullable().optional(),
|
|
129
|
-
offset: z.number().nullable().optional(),
|
|
130
|
-
});
|
|
131
|
-
export const ReadEntrySchema = z.union([PointReadSchema, RangeReadSchema]);
|
|
132
|
-
export const RawReadEntrySchema = z.union([RawPointReadSchema, RawRangeReadSchema]);
|
|
133
|
-
export const WriteOpSchema = z.enum(["insert", "update", "delete"]);
|
|
134
|
-
export const WriteEntrySchema = z.object({
|
|
135
|
-
table: z.string(),
|
|
136
|
-
tableId: Uint8ArraySchema,
|
|
137
|
-
id: z.string(),
|
|
138
|
-
op: WriteOpSchema,
|
|
139
|
-
data: z.record(z.string(), z.unknown()).optional(),
|
|
140
|
-
// Row state at beginTs, before this write. Populated server-side by
|
|
141
|
-
// attachPrevDataToWriteSet for `update`/`delete`. Lets the invalidator
|
|
142
|
-
// detect rows leaving a filtered result set (e.g. status changed from
|
|
143
|
-
// matching to non-matching).
|
|
144
|
-
prevData: z.record(z.string(), z.unknown()).optional(),
|
|
145
|
-
// commit_ts the row had right before this write. Drives the CAS guard:
|
|
146
|
-
// `UPDATE ... WHERE id=? AND commit_ts=expectedCommitTs`. Populated by
|
|
147
|
-
// attachPrevDataToWriteSet or carried over from a prior find() in the
|
|
148
|
-
// same txn. Undefined on inserts.
|
|
149
|
-
expectedCommitTs: BigIntSchema.nullable().optional(),
|
|
150
|
-
});
|
|
151
|
-
export const QueryCacheMetadataSchema = z.object({
|
|
152
|
-
lastSnapshotTs: BigIntSchema,
|
|
153
|
-
readSet: z.array(ReadEntrySchema),
|
|
154
|
-
});
|
|
155
|
-
export const QueryCacheEntrySchema = z.object({
|
|
156
|
-
data: z.unknown(),
|
|
157
|
-
});
|
|
158
|
-
export const CachedPgMetadataSchema = z.record(z.string(), z.record(z.string(), z.string()));
|
|
159
|
-
export const NO_RETRY = { maxAttempts: 1, backoff: "none" };
|
|
160
|
-
export const DEFAULT_RETRY = {
|
|
161
|
-
maxAttempts: 12,
|
|
162
|
-
backoff: "exponential",
|
|
163
|
-
delayMs: 15,
|
|
164
|
-
};
|
|
165
|
-
export class OccConflictError extends Error {
|
|
166
|
-
reason;
|
|
167
|
-
conflictDetail;
|
|
168
|
-
constructor(reason, conflictDetail) {
|
|
169
|
-
super(`OCC conflict: ${reason}`);
|
|
170
|
-
this.reason = reason;
|
|
171
|
-
this.conflictDetail = conflictDetail;
|
|
172
|
-
this.name = "OccConflictError";
|
|
173
|
-
}
|
|
174
|
-
static isOccConflictError(err) {
|
|
175
|
-
if (err instanceof OccConflictError ||
|
|
176
|
-
(err && typeof err === "object" && err.name === "OccConflictError")) {
|
|
177
|
-
return true;
|
|
178
|
-
}
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
export class OccAbortError extends Error {
|
|
183
|
-
constructor(message) {
|
|
184
|
-
super(message);
|
|
185
|
-
this.name = "OccAbortError";
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
//# sourceMappingURL=types_db.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types_db.js","sourceRoot":"","sources":["../../../src/db/types_db.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CAAC;IAED,MAAM,CAAC,kBAAkB,CAAC,GAAY;QACpC,IAAI,GAAG,YAAY,gBAAgB;YACjC,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAK,GAAyB,CAAC,IAAI,KAAK,kBAAkB,CAAC,EAAE,CAAC;YAC7F,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mysql.d.ts","sourceRoot":"","sources":["../../../src/exports/mysql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mysql.js","sourceRoot":"","sources":["../../../src/exports/mysql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../src/exports/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../../src/exports/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"procedure.d.ts","sourceRoot":"","sources":["../../../src/exports/procedure.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"procedure.js","sourceRoot":"","sources":["../../../src/exports/procedure.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/exports/types.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/exports/types.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
package/dist/src/helper.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Synchronous deterministic JSON stringification.
|
|
3
|
-
* Keys are sorted; `undefined` values are dropped.
|
|
4
|
-
*
|
|
5
|
-
* Suitable for React `useEffect` dependency keys — calling this on the same
|
|
6
|
-
* logical input always produces the same string, regardless of property order.
|
|
7
|
-
*/
|
|
8
|
-
export declare function stableStringify(input: unknown): string;
|
|
9
|
-
export declare function supaliveStringify(input: unknown): string;
|
|
10
|
-
export declare function groupByToMap<T, K>(items: Iterable<T>, getKey: (item: T) => K): Map<K, T[]>;
|
|
11
|
-
//# sourceMappingURL=helper.d.ts.map
|
package/dist/src/helper.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../src/helper.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOtD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAYxD;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAClB,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GACrB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAgBb"}
|
package/dist/src/helper.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import stableStringifyFn from "json-stable-stringify";
|
|
2
|
-
/**
|
|
3
|
-
* Synchronous deterministic JSON stringification.
|
|
4
|
-
* Keys are sorted; `undefined` values are dropped.
|
|
5
|
-
*
|
|
6
|
-
* Suitable for React `useEffect` dependency keys — calling this on the same
|
|
7
|
-
* logical input always produces the same string, regardless of property order.
|
|
8
|
-
*/
|
|
9
|
-
export function stableStringify(input) {
|
|
10
|
-
return stableStringifyFn(input, {
|
|
11
|
-
replacer: (_, v) => {
|
|
12
|
-
if (typeof v === "bigint")
|
|
13
|
-
return v.toString();
|
|
14
|
-
return v ?? undefined;
|
|
15
|
-
}
|
|
16
|
-
}) ?? "";
|
|
17
|
-
}
|
|
18
|
-
export function supaliveStringify(input) {
|
|
19
|
-
return JSON.stringify(input, (_, v) => {
|
|
20
|
-
if (typeof v === "bigint")
|
|
21
|
-
return v.toString();
|
|
22
|
-
// Emit a stable wire shape for byte arrays regardless of whether the
|
|
23
|
-
// producer holds a Buffer or a plain Uint8Array (the latter is what
|
|
24
|
-
// crosses worker_threads postMessage). The matching decoder lives in
|
|
25
|
-
// `bytesFromJson` in db/types_db.ts.
|
|
26
|
-
if (v instanceof Uint8Array) {
|
|
27
|
-
return { type: "Buffer", data: Array.from(v) };
|
|
28
|
-
}
|
|
29
|
-
return v ?? undefined;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
export function groupByToMap(items, getKey) {
|
|
33
|
-
const map = new Map();
|
|
34
|
-
for (const item of items) {
|
|
35
|
-
const key = getKey(item);
|
|
36
|
-
let group = map.get(key);
|
|
37
|
-
if (!group) {
|
|
38
|
-
group = [];
|
|
39
|
-
map.set(key, group);
|
|
40
|
-
}
|
|
41
|
-
group.push(item);
|
|
42
|
-
}
|
|
43
|
-
return map;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=helper.js.map
|
package/dist/src/helper.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../src/helper.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,iBAAiB,CAAC,KAAK,EAAE;QAC9B,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACjB,IAAI,OAAO,CAAC,KAAK,QAAQ;gBAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;YAC/C,OAAO,CAAC,IAAI,SAAS,CAAC;QACxB,CAAC;KACF,CAAC,IAAI,EAAE,CAAC;AACX,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpC,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC/C,qEAAqE;QACrE,oEAAoE;QACpE,qEAAqE;QACrE,qCAAqC;QACrC,IAAI,CAAC,YAAY,UAAU,EAAE,CAAC;YAC5B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,CAAC;QACD,OAAO,CAAC,IAAI,SAAS,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAAkB,EAClB,MAAsB;IAEtB,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAE9B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAEzB,IAAI,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,KAAK,GAAG,EAAE,CAAC;YACX,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACtB,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/src/logger.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import pino, { Level } from "pino";
|
|
2
|
-
export declare const appInstanceId: string;
|
|
3
|
-
export declare const isProduction: boolean;
|
|
4
|
-
export declare const logger: pino.Logger<never, boolean>;
|
|
5
|
-
export declare function logLevelOf(name: string): Level;
|
|
6
|
-
export declare function serializeMapValue<K extends string | number | symbol, V>(map: Map<K, V>): Record<K, V>;
|
|
7
|
-
//# sourceMappingURL=logger.d.ts.map
|
package/dist/src/logger.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAKnC,eAAO,MAAM,aAAa,QAAqC,CAAC;AAChE,eAAO,MAAM,YAAY,SAA6B,CAAC;AACvD,eAAO,MAAM,MAAM,6BAmBjB,CAAC;AAEH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAG9C;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAcrG"}
|
package/dist/src/logger.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import pino from "pino";
|
|
2
|
-
import { v4 as uuidv4 } from "uuid";
|
|
3
|
-
import pinoPretty from "pino-pretty";
|
|
4
|
-
const _ = pinoPretty; // Prevents tree shaking of pino-pretty
|
|
5
|
-
export const appInstanceId = `instance-${uuidv4().slice(0, 8)}`;
|
|
6
|
-
export const isProduction = process.env.ENV === "prod";
|
|
7
|
-
export const logger = pino({
|
|
8
|
-
level: process.env.LOG_LEVEL || "info",
|
|
9
|
-
timestamp: pino.stdTimeFunctions.isoTime,
|
|
10
|
-
redact: { paths: ["user.password"] },
|
|
11
|
-
transport: isProduction ? undefined : {
|
|
12
|
-
target: 'pino-pretty',
|
|
13
|
-
options: {
|
|
14
|
-
colorize: true
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
serializers: {
|
|
18
|
-
"columnsTypes": (map) => {
|
|
19
|
-
if (map instanceof Map)
|
|
20
|
-
return serializeMapValue(map);
|
|
21
|
-
return map;
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
base: {
|
|
25
|
-
"srv": appInstanceId,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
export function logLevelOf(name) {
|
|
29
|
-
const defaultLogLevel = process.env.DEFAULT_LOG_LEVEL || "info";
|
|
30
|
-
return (process.env[name]?.toLowerCase() || defaultLogLevel);
|
|
31
|
-
}
|
|
32
|
-
export function serializeMapValue(map) {
|
|
33
|
-
const obj = {};
|
|
34
|
-
for (const [k, v] of map.entries()) {
|
|
35
|
-
obj[k] = {};
|
|
36
|
-
if (v instanceof Map) {
|
|
37
|
-
for (const [innerK, innerV] of v.entries()) {
|
|
38
|
-
obj[k][innerK] = innerV;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
obj[k] = v;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return obj;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=logger.js.map
|
package/dist/src/logger.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,IAAe,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,uCAAuC;AAE7D,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC;AACvD,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,MAAM;IACtC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO;IACxC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE;IACpC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;QAClC,MAAM,EAAE,aAAa;QACrB,OAAO,EAAE;YACL,QAAQ,EAAE,IAAI;SACjB;KACJ;IACD,WAAW,EAAE;QACT,cAAc,EAAE,CAAC,GAAG,EAAE,EAAE;YACpB,IAAI,GAAG,YAAY,GAAG;gBAAE,OAAO,iBAAiB,CAAC,GAAG,CAAC,CAAC;YACtD,OAAO,GAAG,CAAC;QACf,CAAC;KACJ;IACD,IAAI,EAAE;QACF,KAAK,EAAE,aAAa;KACvB;CACJ,CAAC,CAAC;AAEH,MAAM,UAAU,UAAU,CAAC,IAAY;IACnC,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,MAAM,CAAC;IAChE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,IAAI,eAAe,CAAU,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAwC,GAAc;IACnF,MAAM,GAAG,GAAmB,EAAoB,CAAC;IACjD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC;QACjC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAO,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;YACnB,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;gBACzC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;YAC5B,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;IACL,CAAC;IAED,OAAO,GAAmB,CAAC;AAC/B,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { createQueryBuilder, createMutationBuilder, createActionBuilder, type QueryProcedure, type MutationProcedure, type ActionProcedure, type AnyProcedure, type QueryFn, type MutationFn, type ActionFn, type OutputOf, type TypeOf, type ContextOf, type QueryConfig, type MutationConfig, type ActionConfig, type QueryCtx, type MutationCtx, type ActionCtx, } from "./procedure";
|
|
2
|
-
export { router, type Router, type AppRouter, type RegisteredProcedure, type QueryProcedures, type MutationProcedures, type ActionProcedures, type PublicProcedures, type ProcedureNames, } from "./router";
|
|
3
|
-
export { ContextRegistry, getContextRegistry } from "./router";
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/router/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,MAAM,EACN,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/src/router/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/router/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,GAiBpB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,MAAM,GASP,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import type { ZodType } from "zod";
|
|
2
|
-
import type { DbReader, DbWriter } from "../db/context";
|
|
3
|
-
import type { SupaliveDb } from "../db/realtime_db";
|
|
4
|
-
/**
|
|
5
|
-
* Query context passed to query handlers.
|
|
6
|
-
* Contains database reader and user-defined server context.
|
|
7
|
-
*/
|
|
8
|
-
export interface QueryCtx<TContext = unknown> {
|
|
9
|
-
/** Database reader for queries */
|
|
10
|
-
db: DbReader;
|
|
11
|
-
/** User-defined server context (auth, requestId, etc.) */
|
|
12
|
-
serverCtx: TContext;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Mutation context passed to mutation handlers.
|
|
16
|
-
* Contains database writer and user-defined server context.
|
|
17
|
-
*/
|
|
18
|
-
export interface MutationCtx<TContext = unknown> {
|
|
19
|
-
/** Database writer for mutations (includes insert/update/delete) */
|
|
20
|
-
db: DbWriter;
|
|
21
|
-
/** User-defined server context (auth, requestId, etc.) */
|
|
22
|
-
serverCtx: TContext;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Action context passed to action handlers.
|
|
26
|
-
* Contains the full SupaliveDb for both queries and mutations, plus user-defined server context.
|
|
27
|
-
*/
|
|
28
|
-
export interface ActionCtx<TContext = unknown> {
|
|
29
|
-
/** Full database interface for queries and mutations */
|
|
30
|
-
db: SupaliveDb;
|
|
31
|
-
/** User-defined server context (auth, requestId, etc.) */
|
|
32
|
-
serverCtx: TContext;
|
|
33
|
-
}
|
|
34
|
-
export type QueryFn<TInput, TResult, TContext = unknown> = (ctx: QueryCtx<TContext>, input: TInput) => Promise<TResult>;
|
|
35
|
-
export type MutationFn<TInput, TResult, TContext = unknown> = (ctx: MutationCtx<TContext>, input: TInput) => Promise<TResult>;
|
|
36
|
-
export type ActionFn<TInput, TResult, TContext = unknown> = (ctx: ActionCtx<TContext>, input: TInput) => Promise<TResult>;
|
|
37
|
-
/**
|
|
38
|
-
* Per-procedure override for the cache/subscription segmentation key.
|
|
39
|
-
*
|
|
40
|
-
* omitted | undefined → fall back to `config.getUserId(serverCtx)` (default)
|
|
41
|
-
* false → no identity in hash; cache/sub shared across all users
|
|
42
|
-
* string → a static identity literal (e.g. "public" or a tenant id)
|
|
43
|
-
* function → compute from serverCtx + input (sync)
|
|
44
|
-
*
|
|
45
|
-
* When the result of a query is identical regardless of who calls it, set
|
|
46
|
-
* this to a literal (or `false`) so a single cache entry serves everyone.
|
|
47
|
-
*
|
|
48
|
-
* The function form intentionally takes `serverCtx` (not the full `QueryCtx`)
|
|
49
|
-
* because identity is resolved before any DB read is issued.
|
|
50
|
-
*/
|
|
51
|
-
export type QueryIdentitySpec<TInput, TContext> = false | string | ((serverCtx: TContext, input: TInput) => string | null | undefined);
|
|
52
|
-
export interface BaseProcedure<TInput, TResult, TType extends "query" | "mutation" | "action", TContext = unknown, TInternal extends boolean = boolean> {
|
|
53
|
-
readonly _type: "procedure";
|
|
54
|
-
readonly procedureType: TType;
|
|
55
|
-
readonly inputSchema: ZodType<TInput>;
|
|
56
|
-
readonly fn: QueryFn<TInput, TResult, TContext> | MutationFn<TInput, TResult, TContext> | ActionFn<TInput, TResult, TContext>;
|
|
57
|
-
readonly internal: TInternal;
|
|
58
|
-
}
|
|
59
|
-
export interface QueryProcedure<TInput, TResult, TContext = unknown, TInternal extends boolean = boolean> extends BaseProcedure<TInput, TResult, "query", TContext, TInternal> {
|
|
60
|
-
readonly procedureType: "query";
|
|
61
|
-
readonly fn: QueryFn<TInput, TResult, TContext>;
|
|
62
|
-
readonly queryIdentity?: QueryIdentitySpec<TInput, TContext>;
|
|
63
|
-
}
|
|
64
|
-
export interface MutationProcedure<TInput, TResult, TContext = unknown, TInternal extends boolean = boolean> extends BaseProcedure<TInput, TResult, "mutation", TContext, TInternal> {
|
|
65
|
-
readonly procedureType: "mutation";
|
|
66
|
-
readonly fn: MutationFn<TInput, TResult, TContext>;
|
|
67
|
-
}
|
|
68
|
-
export interface ActionProcedure<TInput, TResult, TContext = unknown, TInternal extends boolean = boolean> extends BaseProcedure<TInput, TResult, "action", TContext, TInternal> {
|
|
69
|
-
readonly procedureType: "action";
|
|
70
|
-
readonly fn: ActionFn<TInput, TResult, TContext>;
|
|
71
|
-
}
|
|
72
|
-
export type AnyProcedure<TContext = unknown> = QueryProcedure<any, any, TContext> | MutationProcedure<any, any, TContext> | ActionProcedure<any, any, TContext>;
|
|
73
|
-
export interface QueryConfig<TInput, TResult, TContext = unknown> {
|
|
74
|
-
/** Zod schema for input validation */
|
|
75
|
-
args: ZodType<TInput>;
|
|
76
|
-
/** The query handler function */
|
|
77
|
-
handler: QueryFn<TInput, TResult, TContext>;
|
|
78
|
-
/** Mark as internal (server-only). Default: false */
|
|
79
|
-
internal?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Override the cache/subscription segmentation key for this procedure.
|
|
82
|
-
* See {@link QueryIdentitySpec}. Omit to keep the default (per-user) behavior.
|
|
83
|
-
*/
|
|
84
|
-
queryIdentity?: QueryIdentitySpec<TInput, TContext>;
|
|
85
|
-
}
|
|
86
|
-
export interface MutationConfig<TInput, TResult, TContext = unknown> {
|
|
87
|
-
/** Zod schema for input validation */
|
|
88
|
-
args: ZodType<TInput>;
|
|
89
|
-
/** The mutation handler function */
|
|
90
|
-
handler: MutationFn<TInput, TResult, TContext>;
|
|
91
|
-
/** Mark as internal (server-only). Default: false */
|
|
92
|
-
internal?: boolean;
|
|
93
|
-
}
|
|
94
|
-
export interface ActionConfig<TInput, TResult, TContext = unknown> {
|
|
95
|
-
/** Zod schema for input validation */
|
|
96
|
-
args: ZodType<TInput>;
|
|
97
|
-
/** The action handler function */
|
|
98
|
-
handler: ActionFn<TInput, TResult, TContext>;
|
|
99
|
-
/** Mark as internal (server-only). Default: false */
|
|
100
|
-
internal?: boolean;
|
|
101
|
-
}
|
|
102
|
-
/** Extract input type from a procedure */
|
|
103
|
-
export type InputOf<T> = T extends BaseProcedure<infer I, any, any, any> ? I : never;
|
|
104
|
-
/** Extract output type from a procedure */
|
|
105
|
-
export type OutputOf<T> = T extends BaseProcedure<any, infer O, any, any> ? O : never;
|
|
106
|
-
/** Extract procedure type (query/mutation) */
|
|
107
|
-
export type TypeOf<T> = T extends BaseProcedure<any, any, infer Type, any> ? Type : never;
|
|
108
|
-
/** Extract server context type from a procedure */
|
|
109
|
-
export type ContextOf<T> = T extends BaseProcedure<any, any, any, infer C> ? C : never;
|
|
110
|
-
/**
|
|
111
|
-
* Create a query builder with a pre-defined context type.
|
|
112
|
-
* This allows you to define the context type once and have it inferred
|
|
113
|
-
* automatically in all your query handlers.
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* // Define your server context
|
|
117
|
-
* interface ServerContext {
|
|
118
|
-
* auth: { userId: string };
|
|
119
|
-
* requestId: string;
|
|
120
|
-
* }
|
|
121
|
-
*
|
|
122
|
-
* // Create a typed query builder
|
|
123
|
-
* const query = createQueryBuilder<ServerContext>();
|
|
124
|
-
*
|
|
125
|
-
* // Use it - context type is automatically inferred!
|
|
126
|
-
* const getUser = query({
|
|
127
|
-
* args: z.object({ id: z.string() }),
|
|
128
|
-
* handler: async (ctx, { id }) => {
|
|
129
|
-
* // ctx.db for database queries
|
|
130
|
-
* const user = await ctx.db.query(UsersSchema).find(id);
|
|
131
|
-
* // ctx.context for server context
|
|
132
|
-
* console.log(ctx.context.requestId);
|
|
133
|
-
* return user;
|
|
134
|
-
* }
|
|
135
|
-
* });
|
|
136
|
-
*/
|
|
137
|
-
export declare function createQueryBuilder<TContext = unknown>(): <TInput, TResult, const TInternal extends boolean = false>(config: QueryConfig<TInput, TResult, TContext> & {
|
|
138
|
-
internal?: TInternal;
|
|
139
|
-
}) => QueryProcedure<TInput, TResult, TContext, TInternal>;
|
|
140
|
-
/**
|
|
141
|
-
* Create a mutation builder with a pre-defined context type.
|
|
142
|
-
* This allows you to define the context type once and have it inferred
|
|
143
|
-
* automatically in all your mutation handlers.
|
|
144
|
-
*
|
|
145
|
-
* @example
|
|
146
|
-
* // Define your server context
|
|
147
|
-
* interface ServerContext {
|
|
148
|
-
* auth: { userId: string };
|
|
149
|
-
* requestId: string;
|
|
150
|
-
* }
|
|
151
|
-
*
|
|
152
|
-
* // Create a typed mutation builder
|
|
153
|
-
* const mutation = createMutationBuilder<ServerContext>();
|
|
154
|
-
*
|
|
155
|
-
* // Use it - context type is automatically inferred!
|
|
156
|
-
* const createUser = mutation({
|
|
157
|
-
* args: z.object({ name: z.string() }),
|
|
158
|
-
* handler: async (ctx, { name }) => {
|
|
159
|
-
* // ctx.db for mutations
|
|
160
|
-
* await ctx.db.insert(UsersSchema, id, { name });
|
|
161
|
-
* // ctx.context for server context
|
|
162
|
-
* console.log(ctx.context.requestId);
|
|
163
|
-
* return { success: true };
|
|
164
|
-
* }
|
|
165
|
-
* });
|
|
166
|
-
*/
|
|
167
|
-
export declare function createMutationBuilder<TContext = unknown>(): <TInput, TResult, const TInternal extends boolean = false>(config: MutationConfig<TInput, TResult, TContext> & {
|
|
168
|
-
internal?: TInternal;
|
|
169
|
-
}) => MutationProcedure<TInput, TResult, TContext, TInternal>;
|
|
170
|
-
/**
|
|
171
|
-
* Create an action builder with a pre-defined context type.
|
|
172
|
-
* Actions have access to the full SupaliveDb for both queries and mutations.
|
|
173
|
-
*
|
|
174
|
-
* @example
|
|
175
|
-
* // Define your server context
|
|
176
|
-
* interface ServerContext {
|
|
177
|
-
* auth: { userId: string };
|
|
178
|
-
* requestId: string;
|
|
179
|
-
* }
|
|
180
|
-
*
|
|
181
|
-
* // Create a typed action builder
|
|
182
|
-
* const action = createActionBuilder<ServerContext>();
|
|
183
|
-
*
|
|
184
|
-
* // Use it - context type is automatically inferred!
|
|
185
|
-
* const processOrder = action({
|
|
186
|
-
* args: z.object({ orderId: z.string() }),
|
|
187
|
-
* handler: async (ctx, { orderId }) => {
|
|
188
|
-
* // ctx.db for full database access
|
|
189
|
-
* const order = await ctx.db.query(async (db) => {
|
|
190
|
-
* return db.query(OrdersSchema).find(orderId);
|
|
191
|
-
* });
|
|
192
|
-
* await ctx.db.mutation(async (db) => {
|
|
193
|
-
* await db.update(OrdersSchema, orderId, { status: "processed" });
|
|
194
|
-
* });
|
|
195
|
-
* // ctx.context for server context
|
|
196
|
-
* console.log(ctx.context.requestId);
|
|
197
|
-
* return { success: true };
|
|
198
|
-
* }
|
|
199
|
-
* });
|
|
200
|
-
*/
|
|
201
|
-
export declare function createActionBuilder<TContext = unknown>(): <TInput, TResult, const TInternal extends boolean = false>(config: ActionConfig<TInput, TResult, TContext> & {
|
|
202
|
-
internal?: TInternal;
|
|
203
|
-
}) => ActionProcedure<TInput, TResult, TContext, TInternal>;
|
|
204
|
-
//# sourceMappingURL=procedure.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"procedure.d.ts","sourceRoot":"","sources":["../../../src/router/procedure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIpD;;;GAGG;AACH,MAAM,WAAW,QAAQ,CAAC,QAAQ,GAAG,OAAO;IAC1C,kCAAkC;IAClC,EAAE,EAAE,QAAQ,CAAC;IACb,0DAA0D;IAC1D,SAAS,EAAE,QAAQ,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,QAAQ,GAAG,OAAO;IAC7C,oEAAoE;IACpE,EAAE,EAAE,QAAQ,CAAC;IACb,0DAA0D;IAC1D,SAAS,EAAE,QAAQ,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS,CAAC,QAAQ,GAAG,OAAO;IAC3C,wDAAwD;IACxD,EAAE,EAAE,UAAU,CAAC;IACf,0DAA0D;IAC1D,SAAS,EAAE,QAAQ,CAAC;CACrB;AAID,MAAM,MAAM,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,IAAI,CACzD,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,EACvB,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,OAAO,CAAC,CAA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