@teable/app 0.0.0-stage → 5.0.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 +227 -2
- package/dist/build/cli.d.ts +2 -0
- package/dist/build/cli.js +19 -0
- package/dist/build/index.d.ts +31 -0
- package/dist/build/index.js +8 -0
- package/dist/chunks/323GVFSV.js +117 -0
- package/dist/chunks/5QIBCQL5.js +52 -0
- package/dist/chunks/EVNB2DU2.js +1126 -0
- package/dist/chunks/JQWQD45Z.js +116 -0
- package/dist/chunks/LV3ZHKKL.js +157 -0
- package/dist/client.d.ts +100 -0
- package/dist/client.js +9 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +14 -0
- package/dist/protocol.d.ts +401 -0
- package/dist/protocol.js +38 -0
- package/dist/schema.d.ts +45 -0
- package/dist/schema.js +13 -0
- package/dist/server/app.d.ts +138 -0
- package/dist/server/changefeed.d.ts +52 -0
- package/dist/server/cron.d.ts +26 -0
- package/dist/server/errors.d.ts +21 -0
- package/dist/server/migrations.d.ts +36 -0
- package/dist/server/schedules.d.ts +16 -0
- package/dist/server/tasks.d.ts +51 -0
- package/dist/testing.d.ts +38 -0
- package/dist/testing.js +69 -0
- package/package.json +55 -4
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// src/protocol.ts
|
|
2
|
+
var PROTOCOL_VERSION = 5;
|
|
3
|
+
var APP_COMPATIBILITY_DATE = "2026-12-01";
|
|
4
|
+
var SPACE_ROLES = ["owner", "creator", "editor", "commenter", "viewer"];
|
|
5
|
+
var EVERY_CAPABILITY = { files: true, http: true };
|
|
6
|
+
var CAPABILITIES = Object.keys(EVERY_CAPABILITY);
|
|
7
|
+
var ERROR_CODES = [
|
|
8
|
+
"BAD_INPUT",
|
|
9
|
+
"UNAUTHENTICATED",
|
|
10
|
+
"FORBIDDEN",
|
|
11
|
+
"NOT_FOUND",
|
|
12
|
+
"UNKNOWN_METHOD",
|
|
13
|
+
"CONFLICT",
|
|
14
|
+
"CONSTRAINT",
|
|
15
|
+
"RATE_LIMITED",
|
|
16
|
+
"INTERNAL"
|
|
17
|
+
];
|
|
18
|
+
var DEFAULT_CURRENCY = "USD";
|
|
19
|
+
var MINOR_UNITS = {
|
|
20
|
+
BIF: 0,
|
|
21
|
+
CLP: 0,
|
|
22
|
+
DJF: 0,
|
|
23
|
+
GNF: 0,
|
|
24
|
+
ISK: 0,
|
|
25
|
+
JPY: 0,
|
|
26
|
+
KMF: 0,
|
|
27
|
+
KRW: 0,
|
|
28
|
+
PYG: 0,
|
|
29
|
+
RWF: 0,
|
|
30
|
+
UGX: 0,
|
|
31
|
+
UYI: 0,
|
|
32
|
+
VND: 0,
|
|
33
|
+
VUV: 0,
|
|
34
|
+
XAF: 0,
|
|
35
|
+
XOF: 0,
|
|
36
|
+
XPF: 0,
|
|
37
|
+
BHD: 3,
|
|
38
|
+
IQD: 3,
|
|
39
|
+
JOD: 3,
|
|
40
|
+
KWD: 3,
|
|
41
|
+
LYD: 3,
|
|
42
|
+
OMR: 3,
|
|
43
|
+
TND: 3,
|
|
44
|
+
CLF: 4,
|
|
45
|
+
UYW: 4
|
|
46
|
+
};
|
|
47
|
+
function currencyDigits(currency) {
|
|
48
|
+
const code = currency.toUpperCase();
|
|
49
|
+
return Object.hasOwn(MINOR_UNITS, code) ? MINOR_UNITS[code] ?? 2 : 2;
|
|
50
|
+
}
|
|
51
|
+
var ERROR_STATUS = {
|
|
52
|
+
BAD_INPUT: 400,
|
|
53
|
+
UNAUTHENTICATED: 401,
|
|
54
|
+
FORBIDDEN: 403,
|
|
55
|
+
NOT_FOUND: 404,
|
|
56
|
+
UNKNOWN_METHOD: 404,
|
|
57
|
+
CONFLICT: 409,
|
|
58
|
+
CONSTRAINT: 422,
|
|
59
|
+
RATE_LIMITED: 429,
|
|
60
|
+
INTERNAL: 500
|
|
61
|
+
};
|
|
62
|
+
var APPS_PATH = "/api/v4/apps";
|
|
63
|
+
var FILE_NAME_HEADER = "X-File-Name";
|
|
64
|
+
function fileKeyPath(key) {
|
|
65
|
+
const slash = key.indexOf("/");
|
|
66
|
+
return `${key.slice(0, slash)}/${encodeURIComponent(key.slice(slash + 1))}`;
|
|
67
|
+
}
|
|
68
|
+
var DEPLOY_HEADERS = { commit: "X-Teable-Commit", message: "X-Teable-Message" };
|
|
69
|
+
function checkAccess(caller, access) {
|
|
70
|
+
if (caller.kind === "system") return null;
|
|
71
|
+
if (access === "internal") return "FORBIDDEN";
|
|
72
|
+
if (access === "public") return null;
|
|
73
|
+
if (caller.kind === "anonymous") return "UNAUTHENTICATED";
|
|
74
|
+
if (caller.role === null) return "FORBIDDEN";
|
|
75
|
+
return SPACE_ROLES.indexOf(caller.role) <= SPACE_ROLES.indexOf(access) ? null : "FORBIDDEN";
|
|
76
|
+
}
|
|
77
|
+
function admit(manifest, name, caller) {
|
|
78
|
+
const method = manifest.methods.find((m) => m.name === name);
|
|
79
|
+
if (method === void 0 || method.kind === "task") {
|
|
80
|
+
return { ok: false, error: { code: "UNKNOWN_METHOD", message: `No method "${name}"` } };
|
|
81
|
+
}
|
|
82
|
+
const denied = checkAccess(caller, method.access);
|
|
83
|
+
if (denied) {
|
|
84
|
+
return { ok: false, error: { code: denied, message: `Not allowed to call "${name}"` } };
|
|
85
|
+
}
|
|
86
|
+
return { ok: true, value: method };
|
|
87
|
+
}
|
|
88
|
+
function isMember(caller) {
|
|
89
|
+
return checkAccess(caller, "viewer") === null;
|
|
90
|
+
}
|
|
91
|
+
function isExposed(method) {
|
|
92
|
+
return method.kind !== "task" && method.access !== "internal";
|
|
93
|
+
}
|
|
94
|
+
function callableMethods(manifest, caller) {
|
|
95
|
+
return manifest.methods.filter((m) => isExposed(m) && checkAccess(caller, m.access) === null);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
PROTOCOL_VERSION,
|
|
100
|
+
APP_COMPATIBILITY_DATE,
|
|
101
|
+
SPACE_ROLES,
|
|
102
|
+
CAPABILITIES,
|
|
103
|
+
ERROR_CODES,
|
|
104
|
+
DEFAULT_CURRENCY,
|
|
105
|
+
currencyDigits,
|
|
106
|
+
ERROR_STATUS,
|
|
107
|
+
APPS_PATH,
|
|
108
|
+
FILE_NAME_HEADER,
|
|
109
|
+
fileKeyPath,
|
|
110
|
+
DEPLOY_HEADERS,
|
|
111
|
+
checkAccess,
|
|
112
|
+
admit,
|
|
113
|
+
isMember,
|
|
114
|
+
isExposed,
|
|
115
|
+
callableMethods
|
|
116
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_CURRENCY,
|
|
3
|
+
currencyDigits
|
|
4
|
+
} from "./JQWQD45Z.js";
|
|
5
|
+
|
|
6
|
+
// src/schema.ts
|
|
7
|
+
import { getTableColumns, getTableName, is } from "drizzle-orm";
|
|
8
|
+
import {
|
|
9
|
+
getTableConfig,
|
|
10
|
+
integer,
|
|
11
|
+
SQLiteTable,
|
|
12
|
+
text
|
|
13
|
+
} from "drizzle-orm/sqlite-core";
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
var semantics = /* @__PURE__ */ new WeakMap();
|
|
16
|
+
function configOf(columnOrBuilder) {
|
|
17
|
+
return columnOrBuilder.config;
|
|
18
|
+
}
|
|
19
|
+
function mark(builder, semantic) {
|
|
20
|
+
semantics.set(configOf(builder), semantic);
|
|
21
|
+
return builder;
|
|
22
|
+
}
|
|
23
|
+
var col = {
|
|
24
|
+
/** Money as an INTEGER in its currency's minor unit (cents for USD, yen for JPY). */
|
|
25
|
+
money: (options = {}) => mark(integer(), { kind: "money", currency: options.currency ?? DEFAULT_CURRENCY }),
|
|
26
|
+
/** A Teable user id, stored as TEXT. */
|
|
27
|
+
user: () => mark(text(), { kind: "user" }),
|
|
28
|
+
/** A list of uploaded files, stored as JSON TEXT. Validate inputs with `z.array(attachment)`. */
|
|
29
|
+
attachments: () => mark(text({ mode: "json" }).$type(), { kind: "attachments" })
|
|
30
|
+
};
|
|
31
|
+
var attachment = z.object({
|
|
32
|
+
key: z.string().min(1),
|
|
33
|
+
name: z.string(),
|
|
34
|
+
size: z.number().int().min(0),
|
|
35
|
+
type: z.string()
|
|
36
|
+
});
|
|
37
|
+
function schemaOf(target) {
|
|
38
|
+
if (is(target, SQLiteTable)) {
|
|
39
|
+
const references = referencesOf(target);
|
|
40
|
+
const shape = Object.entries(getTableColumns(target)).map(([key, column]) => [
|
|
41
|
+
key,
|
|
42
|
+
valuesOf(column, references.get(column))
|
|
43
|
+
]);
|
|
44
|
+
return z.object(Object.fromEntries(shape));
|
|
45
|
+
}
|
|
46
|
+
return valuesOf(target, referencesOf(target.table).get(target));
|
|
47
|
+
}
|
|
48
|
+
function valuesOf(column, reference) {
|
|
49
|
+
const { kind, currency, references } = describeColumn(column.name, column, reference, false);
|
|
50
|
+
const keywords = { "x-teable-kind": kind };
|
|
51
|
+
if (currency !== void 0) keywords["x-teable-currency"] = currency;
|
|
52
|
+
if (references !== void 0) keywords["x-teable-references"] = references;
|
|
53
|
+
const meaning = currency === void 0 ? {} : { description: moneyMeaning(currency) };
|
|
54
|
+
const values = zodOf(column, kind);
|
|
55
|
+
return (column.notNull ? values : values.nullable()).meta({ ...keywords, ...meaning });
|
|
56
|
+
}
|
|
57
|
+
function zodOf(column, kind) {
|
|
58
|
+
if (kind === "attachments") return z.array(attachment);
|
|
59
|
+
switch (column.dataType) {
|
|
60
|
+
case "string":
|
|
61
|
+
return column.enumValues && column.enumValues.length > 0 ? z.enum(column.enumValues) : z.string();
|
|
62
|
+
case "number":
|
|
63
|
+
return column.columnType === "SQLiteInteger" ? z.number().int() : z.number();
|
|
64
|
+
case "boolean":
|
|
65
|
+
return z.boolean();
|
|
66
|
+
case "date":
|
|
67
|
+
return z.date();
|
|
68
|
+
default:
|
|
69
|
+
return z.unknown();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function moneyMeaning(currency) {
|
|
73
|
+
const digits = currencyDigits(currency);
|
|
74
|
+
if (digits === 0) return `An amount of ${currency}, in whole ${currency}`;
|
|
75
|
+
const example = (123400 / 10 ** digits).toFixed(digits);
|
|
76
|
+
return `An amount of ${currency}, as an integer count of 1/${10 ** digits} ${currency}: 123400 is ${example} ${currency}`;
|
|
77
|
+
}
|
|
78
|
+
function describeTables(schema) {
|
|
79
|
+
const tables = [];
|
|
80
|
+
for (const [key, value] of Object.entries(schema)) {
|
|
81
|
+
if (!is(value, SQLiteTable)) continue;
|
|
82
|
+
const config = getTableConfig(value);
|
|
83
|
+
const keyed = new Set(config.primaryKeys.flatMap((key2) => key2.columns));
|
|
84
|
+
const references = referencesOf(value);
|
|
85
|
+
const columns = Object.entries(getTableColumns(value)).map(
|
|
86
|
+
([columnKey, column]) => describeColumn(columnKey, column, references.get(column), keyed.has(column))
|
|
87
|
+
);
|
|
88
|
+
tables.push({ key, name: config.name, columns });
|
|
89
|
+
}
|
|
90
|
+
return tables;
|
|
91
|
+
}
|
|
92
|
+
function referencesOf(table) {
|
|
93
|
+
const references = /* @__PURE__ */ new Map();
|
|
94
|
+
for (const fk of getTableConfig(table).foreignKeys) {
|
|
95
|
+
const ref = fk.reference();
|
|
96
|
+
ref.columns.forEach((column, i) => {
|
|
97
|
+
const foreign = ref.foreignColumns[i];
|
|
98
|
+
if (foreign) {
|
|
99
|
+
references.set(column, { table: getTableName(foreign.table), column: foreign.name });
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return references;
|
|
104
|
+
}
|
|
105
|
+
var NOT_JSON = {
|
|
106
|
+
bigint: { what: "bigints", instead: "use integer() (exact up to 2^53) or text()" },
|
|
107
|
+
buffer: { what: "binary data", instead: "store files with col.attachments()" }
|
|
108
|
+
};
|
|
109
|
+
function describeColumn(key, column, reference, inCompositeKey) {
|
|
110
|
+
const unfit = NOT_JSON[column.dataType];
|
|
111
|
+
if (unfit) {
|
|
112
|
+
throw new Error(
|
|
113
|
+
`Column ${getTableName(column.table)}.${column.name} holds ${unfit.what}, which JSON cannot carry, and method results are JSON: ${unfit.instead}`
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
const semantic = semantics.get(configOf(column));
|
|
117
|
+
const info = {
|
|
118
|
+
key,
|
|
119
|
+
name: column.name,
|
|
120
|
+
kind: semantic?.kind ?? (reference ? "reference" : kindOf(column)),
|
|
121
|
+
notNull: column.notNull,
|
|
122
|
+
primaryKey: column.primary || inCompositeKey,
|
|
123
|
+
hasDefault: column.hasDefault,
|
|
124
|
+
generated: column.generated !== void 0
|
|
125
|
+
};
|
|
126
|
+
if (column.enumValues && column.enumValues.length > 0) info.enumValues = column.enumValues;
|
|
127
|
+
if (reference) info.references = reference;
|
|
128
|
+
if (semantic?.kind === "money") info.currency = semantic.currency;
|
|
129
|
+
return info;
|
|
130
|
+
}
|
|
131
|
+
function kindOf(column) {
|
|
132
|
+
switch (column.columnType) {
|
|
133
|
+
case "SQLiteText":
|
|
134
|
+
return column.enumValues && column.enumValues.length > 0 ? "select" : "text";
|
|
135
|
+
case "SQLiteInteger":
|
|
136
|
+
case "SQLiteReal":
|
|
137
|
+
case "SQLiteNumeric":
|
|
138
|
+
case "SQLiteNumericNumber":
|
|
139
|
+
return "number";
|
|
140
|
+
case "SQLiteBoolean":
|
|
141
|
+
return "boolean";
|
|
142
|
+
case "SQLiteTimestamp":
|
|
143
|
+
return "date";
|
|
144
|
+
case "SQLiteTextJson":
|
|
145
|
+
case "SQLiteBlobJson":
|
|
146
|
+
return "json";
|
|
147
|
+
default:
|
|
148
|
+
return "text";
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export {
|
|
153
|
+
col,
|
|
154
|
+
attachment,
|
|
155
|
+
schemaOf,
|
|
156
|
+
describeTables
|
|
157
|
+
};
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @teable/app/client — call an app's methods from its pages (or anywhere with fetch).
|
|
3
|
+
*
|
|
4
|
+
* import type * as server from "../server";
|
|
5
|
+
* const app = createClient<typeof server>({ appId });
|
|
6
|
+
* const orders = await app.call("recentOrders", { limit: 50 });
|
|
7
|
+
*
|
|
8
|
+
* Method names, inputs and results are typed from the `App` the server module
|
|
9
|
+
* exports: the methods its `define()` registered, under those names, except
|
|
10
|
+
* internal methods and tasks, which pages cannot call. Results arrive as
|
|
11
|
+
* JSON, so Dates are ISO strings. Works with TanStack Query: `queryKey` and
|
|
12
|
+
* `manifestKey` name the queries, `subscribe` tells you when they went stale,
|
|
13
|
+
* and `MethodError.retryable` which failures to ask again.
|
|
14
|
+
*/
|
|
15
|
+
import type { z } from "zod";
|
|
16
|
+
import { type AppErrorShape, type Attachment, type Jsonify, type JsonValue, type ManifestResponse, type PublicLink, type RealtimeMessage } from "./protocol.js";
|
|
17
|
+
/** An app's server module as its pages see it: `App` is the class `define()` returned. */
|
|
18
|
+
export type ServerModule = {
|
|
19
|
+
App: {
|
|
20
|
+
methods: Record<string, unknown>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
declare const untyped: unique symbol;
|
|
24
|
+
/** A client without the app's server types: any method name, JSON in, unknown out. */
|
|
25
|
+
export type Untyped = {
|
|
26
|
+
readonly [untyped]: true;
|
|
27
|
+
};
|
|
28
|
+
type Methods<S> = S extends ServerModule ? S["App"]["methods"] : never;
|
|
29
|
+
/**
|
|
30
|
+
* Names of the methods pages can call: reads and writes that are not
|
|
31
|
+
* internal, the rule `isExposed` applies to the manifest.
|
|
32
|
+
*/
|
|
33
|
+
export type MethodName<S> = S extends Untyped ? string : {
|
|
34
|
+
[K in keyof Methods<S>]: Methods<S>[K] extends {
|
|
35
|
+
kind: "read" | "write";
|
|
36
|
+
access: infer A;
|
|
37
|
+
} ? [A] extends ["internal"] ? never : K : never;
|
|
38
|
+
}[keyof Methods<S>] & string;
|
|
39
|
+
export type MethodInput<S, K extends MethodName<S>> = S extends Untyped ? JsonValue : K extends keyof Methods<S> ? Methods<S>[K] extends {
|
|
40
|
+
input: infer I extends z.ZodType;
|
|
41
|
+
} ? z.input<I> : never : never;
|
|
42
|
+
export type MethodOutput<S, K extends MethodName<S>> = S extends Untyped ? unknown : K extends keyof Methods<S> ? Methods<S>[K] extends {
|
|
43
|
+
handler(ctx: never): infer R;
|
|
44
|
+
} ? Jsonify<R> : never : never;
|
|
45
|
+
/** A method failed; `error` is what the app reported. */
|
|
46
|
+
export declare class MethodError extends Error {
|
|
47
|
+
readonly error: AppErrorShape;
|
|
48
|
+
readonly status: number;
|
|
49
|
+
/**
|
|
50
|
+
* Whether asking again may get another answer. Below 500 the call itself
|
|
51
|
+
* was refused (its input, the caller's access, no such app, one of the
|
|
52
|
+
* app's rules), and the same call gets the same refusal, except 429: too
|
|
53
|
+
* many calls, which pass a little later. From 500 something failed that may
|
|
54
|
+
* pass.
|
|
55
|
+
*/
|
|
56
|
+
readonly retryable: boolean;
|
|
57
|
+
constructor(error: AppErrorShape, status: number);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* What `subscribe` reports: the runtime's realtime messages (`changes` after a
|
|
61
|
+
* call changed data, `deployed` after a new version went live), and
|
|
62
|
+
* `reconnected` when the connection is back after dropping, since what
|
|
63
|
+
* happened in between went unreported. After `deployed` or `reconnected`
|
|
64
|
+
* anything may have changed, the manifest included.
|
|
65
|
+
*/
|
|
66
|
+
export type RealtimeEvent = RealtimeMessage | {
|
|
67
|
+
type: "reconnected";
|
|
68
|
+
};
|
|
69
|
+
export interface ClientOptions {
|
|
70
|
+
appId: string;
|
|
71
|
+
/** Where the platform runtime is. Defaults to the page's origin. */
|
|
72
|
+
baseUrl?: string;
|
|
73
|
+
/** A bearer identity token. Pages on the platform's domain use the identity cookie instead. */
|
|
74
|
+
token?: () => string | null | undefined;
|
|
75
|
+
fetch?: typeof fetch;
|
|
76
|
+
}
|
|
77
|
+
export interface AppClient<S> {
|
|
78
|
+
readonly appId: string;
|
|
79
|
+
call<K extends MethodName<S>>(method: K, input?: MethodInput<S, K>): Promise<MethodOutput<S, K>>;
|
|
80
|
+
/** The app's tables and methods as far as the caller may see them, its live version, and the caller. */
|
|
81
|
+
manifest(): Promise<ManifestResponse>;
|
|
82
|
+
/** For TanStack Query: a key that includes the app, the method and the input. */
|
|
83
|
+
queryKey<K extends MethodName<S>>(method: K, input?: MethodInput<S, K>): readonly unknown[];
|
|
84
|
+
/** The prefix of every `queryKey`: what a change to the app's data makes stale (`subscribe`). */
|
|
85
|
+
readonly dataKey: readonly unknown[];
|
|
86
|
+
/** For TanStack Query: the key of `manifest()`, outside `dataKey`, since data never changes it. */
|
|
87
|
+
readonly manifestKey: readonly unknown[];
|
|
88
|
+
/** Be told when data or the version changes. Reconnects until the returned function is called. */
|
|
89
|
+
subscribe(listener: (event: RealtimeEvent) => void): () => void;
|
|
90
|
+
/** Upload a file. Keep the returned Attachment in a row with a write method. */
|
|
91
|
+
upload(file: Blob, name?: string): Promise<Attachment>;
|
|
92
|
+
/** Where members read a file (pages send the identity cookie). */
|
|
93
|
+
fileUrl(file: Pick<Attachment, "key">): string;
|
|
94
|
+
/** A link anyone can open, until it expires (default 30 days). */
|
|
95
|
+
share(file: Pick<Attachment, "key">, options?: {
|
|
96
|
+
expiresInSeconds?: number;
|
|
97
|
+
}): Promise<PublicLink>;
|
|
98
|
+
}
|
|
99
|
+
export declare function createClient<S extends ServerModule | Untyped = Untyped>(options: ClientOptions): AppClient<S>;
|
|
100
|
+
export {};
|
package/dist/client.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @teable/app — write an app as a Drizzle schema plus methods.
|
|
3
|
+
*
|
|
4
|
+
* Read packages/app/README.md for the rules. Methods come from here; column
|
|
5
|
+
* helpers for schema files come from `@teable/app/schema`, which drizzle-kit
|
|
6
|
+
* can load outside workerd.
|
|
7
|
+
*/
|
|
8
|
+
export { z } from "zod";
|
|
9
|
+
export type { Access, AppManifest, Attachment, Caller, Capability, ColumnInfo, ColumnKind, ErrorCode, FilesCapability, HttpCapability, MethodInfo, SpaceRole, TableInfo, } from "./protocol.js";
|
|
10
|
+
export { createApp, type Database, type ReadContext, type ReadMethod, type TaskContext, type TaskMethod, type WriteContext, type WriteMethod, } from "./server/app.js";
|
|
11
|
+
export { fail } from "./server/errors.js";
|
|
12
|
+
export type { Migrations } from "./server/migrations.js";
|