@axium/server 0.43.0 → 0.44.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/dist/acl.d.ts +1 -1
- package/dist/acl.js +1 -1
- package/dist/api/admin.js +1 -1
- package/dist/api/images.js +1 -1
- package/dist/api/passkeys.js +1 -1
- package/dist/api/register.js +1 -1
- package/dist/api/session.js +1 -1
- package/dist/api/users.js +1 -1
- package/dist/audit.d.ts +1 -1
- package/dist/audit.js +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +2 -2
- package/dist/build.d.ts +19 -0
- package/dist/build.js +121 -0
- package/dist/cli.d.ts +10 -0
- package/dist/cli.js +91 -2
- package/dist/db/cli.d.ts +1 -0
- package/dist/db/cli.js +392 -0
- package/dist/db/connection.d.ts +1 -1
- package/dist/{database.d.ts → db/index.d.ts} +4 -5
- package/dist/{database.js → db/index.js} +6 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/linking.d.ts +0 -1
- package/dist/linking.js +14 -42
- package/dist/main.d.ts +1 -1
- package/dist/main.js +515 -795
- package/package.json +16 -16
- package/patches/@sveltejs+kit+2.56.1.patch +43 -0
- package/routes/account/+page.svelte +1 -2
- package/routes/admin/users/[id]/+page.svelte +1 -2
- package/svelte.config.js +0 -33
package/dist/acl.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AccessControl, AccessControllable, AccessTarget, UserInternal } from '@axium/core';
|
|
2
2
|
import type * as kysely from 'kysely';
|
|
3
3
|
import type { WithRequired } from 'utilium';
|
|
4
|
-
import * as db from './
|
|
4
|
+
import * as db from './db/index.js';
|
|
5
5
|
export interface DBAccessControllable extends Omit<AccessControllable, 'id'> {
|
|
6
6
|
id: string | kysely.Generated<string>;
|
|
7
7
|
}
|
package/dist/acl.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fromTarget } from '@axium/core/access';
|
|
2
2
|
import { jsonArrayFrom } from 'kysely/helpers/postgres';
|
|
3
|
-
import * as db from './
|
|
3
|
+
import * as db from './db/index.js';
|
|
4
4
|
/** Match ACL entries, optionally selecting for a given user-like object */
|
|
5
5
|
export function match(user) {
|
|
6
6
|
return function (eb) {
|
package/dist/api/admin.js
CHANGED
|
@@ -12,7 +12,7 @@ import $pkg from '../../package.json' with { type: 'json' };
|
|
|
12
12
|
import { audit, events, getEvents } from '../audit.js';
|
|
13
13
|
import { createVerification, requireSession } from '../auth.js';
|
|
14
14
|
import { config } from '../config.js';
|
|
15
|
-
import { count, database as db } from '../
|
|
15
|
+
import { count, database as db } from '../db/index.js';
|
|
16
16
|
import { error, parseBody, parseSearch, withError } from '../requests.js';
|
|
17
17
|
import { addRoute } from '../routes.js';
|
|
18
18
|
async function assertAdmin(route, req, sensitive = false) {
|
package/dist/api/images.js
CHANGED
|
@@ -4,7 +4,7 @@ import sharp from 'sharp';
|
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
import { checkAuthForUser } from '../auth.js';
|
|
6
6
|
import { config } from '../config.js';
|
|
7
|
-
import { database as db } from '../
|
|
7
|
+
import { database as db } from '../db/index.js';
|
|
8
8
|
import { error, withError } from '../requests.js';
|
|
9
9
|
import { addRoute } from '../routes.js';
|
|
10
10
|
export async function prepareImageUpload(request, cfg, userId) {
|
package/dist/api/passkeys.js
CHANGED
|
@@ -2,7 +2,7 @@ import { PasskeyChangeable } from '@axium/core/passkeys';
|
|
|
2
2
|
import { omit } from 'utilium';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import { checkAuthForUser, getPasskey } from '../auth.js';
|
|
5
|
-
import { database as db } from '../
|
|
5
|
+
import { database as db } from '../db/index.js';
|
|
6
6
|
import { error, parseBody, withError } from '../requests.js';
|
|
7
7
|
import { addRoute } from '../routes.js';
|
|
8
8
|
addRoute({
|
package/dist/api/register.js
CHANGED
|
@@ -5,7 +5,7 @@ import { encodeUUID } from 'utilium';
|
|
|
5
5
|
import { audit } from '../audit.js';
|
|
6
6
|
import { createPasskey, getUser } from '../auth.js';
|
|
7
7
|
import config from '../config.js';
|
|
8
|
-
import { database as db } from '../
|
|
8
|
+
import { database as db } from '../db/index.js';
|
|
9
9
|
import { createSessionData, error, parseBody, withError } from '../requests.js';
|
|
10
10
|
import { addRoute } from '../routes.js';
|
|
11
11
|
// Map of user ID => challenge
|
package/dist/api/session.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { omit } from 'utilium';
|
|
2
2
|
import { audit } from '../audit.js';
|
|
3
3
|
import { getSessionAndUser } from '../auth.js';
|
|
4
|
-
import { database as db } from '../
|
|
4
|
+
import { database as db } from '../db/index.js';
|
|
5
5
|
import { error, getToken, stripUser, withError } from '../requests.js';
|
|
6
6
|
import { addRoute } from '../routes.js';
|
|
7
7
|
addRoute({
|
package/dist/api/users.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as z from 'zod';
|
|
|
6
6
|
import { audit } from '../audit.js';
|
|
7
7
|
import { checkAuthForUser, createPasskey, createVerification, getPasskey, getPasskeysByUserId, getSessions, getUser, requireSession, useVerification, } from '../auth.js';
|
|
8
8
|
import { config } from '../config.js';
|
|
9
|
-
import { database as db } from '../
|
|
9
|
+
import { database as db } from '../db/index.js';
|
|
10
10
|
import { createSessionData, error, parseBody, stripUser, withError } from '../requests.js';
|
|
11
11
|
import { addRoute } from '../routes.js';
|
|
12
12
|
const challenges = new Map();
|
package/dist/audit.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Severity, type AuditEvent, type AuditFilter } from '@axium/core/audit';
|
|
2
2
|
import type { Insertable, SelectQueryBuilder } from 'kysely';
|
|
3
3
|
import * as z from 'zod';
|
|
4
|
-
import { type Schema } from './
|
|
4
|
+
import { type Schema } from './db/index.js';
|
|
5
5
|
export declare function styleSeverity(sev: Severity, align?: boolean): string;
|
|
6
6
|
export interface AuditEventInit extends Insertable<Schema['audit_log']> {
|
|
7
7
|
}
|
package/dist/audit.js
CHANGED
|
@@ -3,7 +3,7 @@ import { styleText } from 'node:util';
|
|
|
3
3
|
import { capitalize, omit } from 'utilium';
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
import config from './config.js';
|
|
6
|
-
import { database } from './
|
|
6
|
+
import { database } from './db/index.js';
|
|
7
7
|
import * as io from 'ioium/node';
|
|
8
8
|
const severityFormat = {
|
|
9
9
|
[Severity.Emergency]: ['bgRedBright', 'white', 'underline'],
|
package/dist/auth.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Passkey, Session, UserInternal, VerificationInternal, Verification
|
|
|
2
2
|
import type { Insertable, Kysely } from 'kysely';
|
|
3
3
|
import { type WithRequired } from 'utilium';
|
|
4
4
|
import * as acl from './acl.js';
|
|
5
|
-
import { type Schema } from './
|
|
5
|
+
import { type Schema } from './db/index.js';
|
|
6
6
|
export declare function getUser(id: string): Promise<UserInternal>;
|
|
7
7
|
export declare function updateUser({ id, ...user }: WithRequired<Insertable<Schema['users']>, 'id'>): Promise<UserInternal>;
|
|
8
8
|
export interface SessionInternal extends Session {
|
package/dist/auth.js
CHANGED
|
@@ -3,7 +3,7 @@ import { randomBytes, randomUUID } from 'node:crypto';
|
|
|
3
3
|
import { omit } from 'utilium';
|
|
4
4
|
import * as acl from './acl.js';
|
|
5
5
|
import { audit } from './audit.js';
|
|
6
|
-
import { database as db, userFromId } from './
|
|
6
|
+
import { database as db, userFromId } from './db/index.js';
|
|
7
7
|
import { error, getToken, withError } from './requests.js';
|
|
8
8
|
export async function getUser(id) {
|
|
9
9
|
return await db.selectFrom('users').selectAll().where('id', '=', id).executeTakeFirstOrThrow();
|
|
@@ -181,7 +181,7 @@ export async function authSessionForItem(itemType, itemId, permissions, session,
|
|
|
181
181
|
* This will fetch the item, ACLs, users, and the authenticating session.
|
|
182
182
|
*/
|
|
183
183
|
export async function authRequestForItem(request, itemType, itemId, permissions, recursive = false) {
|
|
184
|
-
let session
|
|
184
|
+
let session;
|
|
185
185
|
try {
|
|
186
186
|
const token = getToken(request, false);
|
|
187
187
|
if (!token)
|
package/dist/build.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface BuildOptions {
|
|
2
|
+
/**
|
|
3
|
+
* If set all of the output from Vite and Svelte/SvelteKit will be shown.
|
|
4
|
+
* This is usually undesirable.
|
|
5
|
+
*/
|
|
6
|
+
showGarbageOutput?: boolean;
|
|
7
|
+
/** Whether to minify the output */
|
|
8
|
+
minify?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface BuildStats {
|
|
11
|
+
/** Build time in milliseconds */
|
|
12
|
+
time: number;
|
|
13
|
+
/** Bundle size in bytes */
|
|
14
|
+
size: bigint;
|
|
15
|
+
}
|
|
16
|
+
export declare function build(options?: BuildOptions): Promise<{
|
|
17
|
+
time: number;
|
|
18
|
+
size: bigint;
|
|
19
|
+
}>;
|
package/dist/build.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import nodeAdapter from '@sveltejs/adapter-node';
|
|
2
|
+
import { svelte as viteSveltePlugin } from '@sveltejs/vite-plugin-svelte';
|
|
3
|
+
import { exit } from 'ioium/node';
|
|
4
|
+
import { findPackageJSON } from 'node:module';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { build as buildVite } from 'vite';
|
|
8
|
+
import config from './config.js';
|
|
9
|
+
import { pick } from 'utilium';
|
|
10
|
+
const sveltekitPackageJSON = findPackageJSON('@sveltejs/kit', import.meta.url);
|
|
11
|
+
if (!sveltekitPackageJSON)
|
|
12
|
+
exit('Could not resolve @sveltejs/kit package.', 6);
|
|
13
|
+
const { process_config: processSvelteConfig } = await import(join(sveltekitPackageJSON, '../src/core/config/index.js'));
|
|
14
|
+
const { kit: svelteKitPlugin } = await import(join(sveltekitPackageJSON, '../src/exports/vite/index.js'));
|
|
15
|
+
const svelteConfig = processSvelteConfig({
|
|
16
|
+
compilerOptions: {
|
|
17
|
+
runes: true,
|
|
18
|
+
warningFilter(w) {
|
|
19
|
+
return !w.code.startsWith('a11y');
|
|
20
|
+
},
|
|
21
|
+
experimental: {
|
|
22
|
+
async: true,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
kit: {
|
|
26
|
+
adapter: nodeAdapter(),
|
|
27
|
+
files: {
|
|
28
|
+
assets: join(fileURLToPath(new URL(import.meta.resolve('@axium/client'))), '../../assets'),
|
|
29
|
+
appTemplate: join(import.meta.dirname, '../template.html'),
|
|
30
|
+
routes: config.web.routes,
|
|
31
|
+
hooks: {
|
|
32
|
+
universal: '/dev/null',
|
|
33
|
+
client: join(import.meta.dirname, '../.hooks.js'),
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const vitePluginSvelteOptions = {
|
|
39
|
+
configFile: false,
|
|
40
|
+
...pick(svelteConfig, 'extensions', 'preprocess', 'onwarn', 'compilerOptions'),
|
|
41
|
+
};
|
|
42
|
+
const viteConfig = {
|
|
43
|
+
configFile: false,
|
|
44
|
+
appType: 'custom',
|
|
45
|
+
server: {
|
|
46
|
+
strictPort: true,
|
|
47
|
+
port: 443,
|
|
48
|
+
},
|
|
49
|
+
plugins: [
|
|
50
|
+
...viteSveltePlugin(vitePluginSvelteOptions),
|
|
51
|
+
...(await svelteKitPlugin({ svelte_config: svelteConfig })) /*, mkcert({ hosts: ['cloud.jamespre.dev'] }) */,
|
|
52
|
+
],
|
|
53
|
+
ssr: {
|
|
54
|
+
external: ['@axium/server'],
|
|
55
|
+
},
|
|
56
|
+
optimizeDeps: {
|
|
57
|
+
exclude: [],
|
|
58
|
+
include: ['@axium/client/components'],
|
|
59
|
+
},
|
|
60
|
+
build: {
|
|
61
|
+
rollupOptions: {
|
|
62
|
+
external: ['@axium/server'],
|
|
63
|
+
},
|
|
64
|
+
cssMinify: false,
|
|
65
|
+
},
|
|
66
|
+
logLevel: 'silent',
|
|
67
|
+
};
|
|
68
|
+
// SvelteKit uses a nested call to Vite's `build` that fails if we don't have a vite config file
|
|
69
|
+
// We get around that with a sveltekit patch and this "hidden"/internal global
|
|
70
|
+
const __axiumNestedConfig = {
|
|
71
|
+
configFile: false,
|
|
72
|
+
appType: 'custom',
|
|
73
|
+
plugins: [viteSveltePlugin(vitePluginSvelteOptions), await svelteKitPlugin({ svelte_config: svelteConfig })],
|
|
74
|
+
logLevel: 'silent',
|
|
75
|
+
build: {},
|
|
76
|
+
};
|
|
77
|
+
Object.assign(globalThis, { __axiumNestedConfig });
|
|
78
|
+
function write(chunk, encoding, cb) {
|
|
79
|
+
if (typeof encoding === 'function')
|
|
80
|
+
cb = encoding;
|
|
81
|
+
if (cb)
|
|
82
|
+
cb();
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
export async function build(options = {}) {
|
|
86
|
+
const stdoutWrite = process.stdout.write.bind(process.stdout);
|
|
87
|
+
const stderrWrite = process.stderr.write.bind(process.stderr);
|
|
88
|
+
const startTime = performance.now();
|
|
89
|
+
if (options.showGarbageOutput) {
|
|
90
|
+
viteConfig.logLevel = 'info';
|
|
91
|
+
__axiumNestedConfig.logLevel = 'info';
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
Object.assign(process.stdout, { write });
|
|
95
|
+
Object.assign(process.stderr, { write });
|
|
96
|
+
}
|
|
97
|
+
viteConfig.build.minify = options.minify;
|
|
98
|
+
__axiumNestedConfig.build.minify = options.minify;
|
|
99
|
+
try {
|
|
100
|
+
const result = await buildVite(viteConfig);
|
|
101
|
+
let size = 0n;
|
|
102
|
+
const outputs = Array.isArray(result) ? result : [result];
|
|
103
|
+
for (const out of outputs) {
|
|
104
|
+
if (!out || !('output' in out))
|
|
105
|
+
continue;
|
|
106
|
+
for (const chunk of out.output) {
|
|
107
|
+
size += BigInt(chunk.type === 'chunk' ? chunk.code.length : chunk.source.length);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
time: Math.round(performance.now() - startTime),
|
|
112
|
+
size,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
if (!options.showGarbageOutput) {
|
|
117
|
+
process.stdout.write = stdoutWrite;
|
|
118
|
+
process.stderr.write = stderrWrite;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { UserInternal } from '@axium/core';
|
|
2
|
+
import { Option } from 'commander';
|
|
2
3
|
export declare function userText(user: UserInternal, bold?: boolean): string;
|
|
3
4
|
export declare function lookupUser(lookup: string): Promise<UserInternal>;
|
|
4
5
|
/**
|
|
@@ -6,3 +7,12 @@ export declare function lookupUser(lookup: string): Promise<UserInternal>;
|
|
|
6
7
|
* Only returns whether the array was updated and diff text for what actually changed.
|
|
7
8
|
*/
|
|
8
9
|
export declare function diffUpdate(original: string[], add?: string[], remove?: string[]): [updated: boolean, newValue: string[], diffText: string];
|
|
10
|
+
export declare const cliOptions: {
|
|
11
|
+
check: Option<"--check", undefined, false, undefined, false, undefined>;
|
|
12
|
+
force: Option<"-f, --force", undefined, false, undefined, false, undefined>;
|
|
13
|
+
global: Option<"-g, --global", undefined, false, undefined, false, undefined>;
|
|
14
|
+
timeout: Option<"-t, --timeout <ms>", undefined, 1000, void, false, undefined>;
|
|
15
|
+
};
|
|
16
|
+
declare const rl: import("node:readline/promises").Interface;
|
|
17
|
+
export { rl };
|
|
18
|
+
export declare function rlConfirm(question?: string): Promise<void>;
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
2
53
|
import * as io from 'ioium/node';
|
|
3
54
|
import { styleText } from 'node:util';
|
|
4
55
|
import * as z from 'zod';
|
|
5
|
-
import * as db from './
|
|
56
|
+
import * as db from './db/index.js';
|
|
57
|
+
import { Option } from 'commander';
|
|
58
|
+
import { createInterface } from 'node:readline/promises';
|
|
6
59
|
export function userText(user, bold = false) {
|
|
7
60
|
const text = `${user.name} <${user.email}> (${user.id})`;
|
|
8
61
|
return bold ? styleText('bold', text) : text;
|
|
@@ -45,3 +98,39 @@ export function diffUpdate(original, add, remove) {
|
|
|
45
98
|
});
|
|
46
99
|
return [!!diffs.length, original, diffs.join(', ')];
|
|
47
100
|
}
|
|
101
|
+
// Options shared by multiple (sub)commands
|
|
102
|
+
export const cliOptions = {
|
|
103
|
+
check: new Option('--check', 'check the database schema after initialization').default(false),
|
|
104
|
+
force: new Option('-f, --force', 'force the operation').default(false),
|
|
105
|
+
global: new Option('-g, --global', 'apply the operation globally').default(false),
|
|
106
|
+
timeout: new Option('-t, --timeout <ms>', 'how long to wait for commands to complete.').default(1000).argParser(value => {
|
|
107
|
+
const timeout = parseInt(value);
|
|
108
|
+
if (!Number.isSafeInteger(timeout) || timeout < 0)
|
|
109
|
+
io.warn('Invalid timeout value, using default.');
|
|
110
|
+
io.setCommandTimeout(timeout);
|
|
111
|
+
}),
|
|
112
|
+
};
|
|
113
|
+
export { rl };
|
|
114
|
+
export async function rlConfirm(question = 'Is this ok') {
|
|
115
|
+
const { data, error } = z
|
|
116
|
+
.stringbool()
|
|
117
|
+
.default(false)
|
|
118
|
+
.safeParse(await rl.question(question + ' [y/N]: ').catch(() => io.exit('Aborted.')));
|
|
119
|
+
if (error || !data)
|
|
120
|
+
io.exit('Aborted.');
|
|
121
|
+
}
|
|
122
|
+
var rl;
|
|
123
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
124
|
+
try {
|
|
125
|
+
rl = __addDisposableResource(env_1, createInterface({
|
|
126
|
+
input: process.stdin,
|
|
127
|
+
output: process.stdout,
|
|
128
|
+
}), false);
|
|
129
|
+
}
|
|
130
|
+
catch (e_1) {
|
|
131
|
+
env_1.error = e_1;
|
|
132
|
+
env_1.hasError = true;
|
|
133
|
+
}
|
|
134
|
+
finally {
|
|
135
|
+
__disposeResources(env_1);
|
|
136
|
+
}
|
package/dist/db/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dbInitTables(): Promise<void>;
|