@zjazj/server 0.0.0-stage → 0.0.1

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/index.js ADDED
@@ -0,0 +1,429 @@
1
+ import {
2
+ configureLog,
3
+ log,
4
+ requestLogger
5
+ } from "./chunk-26AAYRI3.js";
6
+ import {
7
+ ORGANIZATION_AUDIENCE_PREFIX,
8
+ authenticate,
9
+ bearerToken,
10
+ createVerifier,
11
+ definePermissions,
12
+ getUser,
13
+ hasPermissions,
14
+ permissionMatches,
15
+ requirePermission,
16
+ requireRole,
17
+ userFromClaims,
18
+ verifierFromEnv
19
+ } from "./chunk-SVZCJQNB.js";
20
+ import {
21
+ APP_ID_PATTERN,
22
+ APP_NAME_PATTERN,
23
+ AppError,
24
+ ConflictError,
25
+ ForbiddenError,
26
+ NotFoundError,
27
+ UnauthorizedError,
28
+ ValidationError,
29
+ assertValidAppId,
30
+ errorHandler,
31
+ generateAppId,
32
+ isUuid,
33
+ isValidAppId,
34
+ isValidAppName,
35
+ notFoundHandler,
36
+ toErrorResponse,
37
+ uuidv7
38
+ } from "./chunk-6IYKARAJ.js";
39
+ import {
40
+ isDevIdentityEnabled
41
+ } from "./chunk-NMKEVYGN.js";
42
+ import {
43
+ REQUEST_ID_HEADER,
44
+ coerceRequestId,
45
+ getRequestContext,
46
+ getRequestId,
47
+ requestContext
48
+ } from "./chunk-ERGI2X5S.js";
49
+
50
+ // src/app.ts
51
+ import { existsSync, readFileSync } from "fs";
52
+ import path from "path";
53
+ import { serve } from "@hono/node-server";
54
+ import { serveStatic } from "@hono/node-server/serve-static";
55
+ import { Hono } from "hono";
56
+
57
+ // src/registry.ts
58
+ import { hostname } from "os";
59
+ function registrationPayload(options) {
60
+ const env = options.env ?? process.env;
61
+ const { manifest } = options;
62
+ return {
63
+ app_code: manifest.name,
64
+ app_id: manifest.id,
65
+ name: manifest.platform?.title ?? manifest.name,
66
+ description: manifest.description ?? null,
67
+ service_endpoint: env.ADVERTISED_ENDPOINT || `http://${hostname()}:${options.port}`,
68
+ container_port: options.port,
69
+ health_path: "/healthz",
70
+ surface_type: "standalone",
71
+ route_base: options.basePath || "/",
72
+ portal_nav_title: manifest.platform?.title ?? manifest.name,
73
+ portal_nav_icon: manifest.platform?.icon ?? null,
74
+ permission_manifest: (options.permissions ?? []).map((permission) => ({
75
+ code: permission.code,
76
+ title: permission.title,
77
+ description: permission.description ?? null
78
+ })),
79
+ release_version: manifest.version ?? null,
80
+ source_commit: env.GIT_SHA || null
81
+ };
82
+ }
83
+ var delay = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
84
+ async function registerApp(options) {
85
+ const env = options.env ?? process.env;
86
+ const platformUrl = env.PLATFORM_URL?.replace(/\/+$/, "");
87
+ if (!platformUrl) return false;
88
+ const request = options.fetch ?? fetch;
89
+ const attempts = options.attempts ?? 5;
90
+ const body = JSON.stringify(registrationPayload(options));
91
+ for (let attempt = 1; attempt <= attempts; attempt += 1) {
92
+ try {
93
+ const response = await request(`${platformUrl}/api/v1/services/register`, {
94
+ method: "POST",
95
+ headers: {
96
+ "Content-Type": "application/json",
97
+ ...env.SERVICE_REGISTRATION_TOKEN ? { Authorization: `Bearer ${env.SERVICE_REGISTRATION_TOKEN}` } : {}
98
+ },
99
+ body
100
+ });
101
+ if (response.ok) {
102
+ options.onResult?.({ ok: true, attempt, detail: `registered (${response.status})` });
103
+ return true;
104
+ }
105
+ options.onResult?.({ ok: false, attempt, detail: `platform answered ${response.status}` });
106
+ if (response.status >= 400 && response.status < 500) return false;
107
+ } catch (error) {
108
+ options.onResult?.({
109
+ ok: false,
110
+ attempt,
111
+ detail: error instanceof Error ? error.message : String(error)
112
+ });
113
+ }
114
+ if (attempt < attempts) await delay(Math.min(1e3 * 2 ** (attempt - 1), 15e3));
115
+ }
116
+ return false;
117
+ }
118
+
119
+ // src/app.ts
120
+ var DATABASES = /* @__PURE__ */ Symbol.for("zjazj.platform.databases");
121
+ function databaseCache() {
122
+ const holder = globalThis;
123
+ holder[DATABASES] ??= /* @__PURE__ */ new Map();
124
+ return holder[DATABASES];
125
+ }
126
+ function normalizeBasePath(value) {
127
+ const trimmed = (value ?? "/").trim().replace(/\/+$/, "");
128
+ if (trimmed === "") return "";
129
+ return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
130
+ }
131
+ function createApp(options) {
132
+ const env = options.env ?? process.env;
133
+ const { manifest } = options;
134
+ if (!isValidAppName(manifest.name)) {
135
+ throw new Error(`Invalid app name ${JSON.stringify(manifest.name)} in package.json`);
136
+ }
137
+ assertValidAppId(manifest.id);
138
+ const basePath = normalizeBasePath(
139
+ env.BASE_URL || (env.NODE_ENV === "production" ? `/apps/${manifest.name}/` : "/")
140
+ );
141
+ configureLog({ app: manifest.name, env: env.ENV || env.NODE_ENV || "development" });
142
+ const databaseOptions = typeof options.database === "object" ? options.database : options.database ? {} : void 0;
143
+ const getDatabase = () => {
144
+ if (!databaseOptions) {
145
+ return Promise.reject(
146
+ new Error("The database is not enabled. Pass `database: true` to createApp.")
147
+ );
148
+ }
149
+ const cache = databaseCache();
150
+ let pending = cache.get(manifest.id);
151
+ if (!pending) {
152
+ pending = (async () => {
153
+ const { createDatabase, migrate } = await import("./db.js");
154
+ const database = await createDatabase({ schema: manifest.id, env });
155
+ await migrate(database, {
156
+ migrationsFolder: databaseOptions.migrationsFolder,
157
+ appName: manifest.name
158
+ });
159
+ return database;
160
+ })();
161
+ pending.catch(() => cache.delete(manifest.id));
162
+ cache.set(manifest.id, pending);
163
+ }
164
+ return pending;
165
+ };
166
+ const api = new Hono();
167
+ api.use("*", authenticate({ verifier: options.verifier, env }));
168
+ if (databaseOptions) {
169
+ api.use("*", async (c, next) => {
170
+ const { tenantDatabase } = await import("./db.js");
171
+ return tenantDatabase(getDatabase)(c, next);
172
+ });
173
+ }
174
+ const publicApi = new Hono();
175
+ const internal = new Hono();
176
+ let built;
177
+ const build = () => {
178
+ const root = new Hono();
179
+ root.use("*", requestContext());
180
+ root.use("*", requestLogger());
181
+ root.onError(errorHandler((error) => log.error("Unhandled error", { err: error })));
182
+ root.notFound(notFoundHandler());
183
+ root.get("/healthz", (c) => c.json({ status: "ok", app: manifest.name }));
184
+ root.route("/internal", internal);
185
+ const scoped = new Hono();
186
+ scoped.get(
187
+ "/api/_version",
188
+ (c) => c.json({
189
+ name: manifest.name,
190
+ id: manifest.id,
191
+ version: manifest.version ?? null,
192
+ git_sha: env.GIT_SHA ?? null,
193
+ build_time: env.BUILD_TIME ?? null
194
+ })
195
+ );
196
+ scoped.route("/api/public", publicApi);
197
+ scoped.route("/api", api);
198
+ scoped.all("/api/*", (c) => c.notFound());
199
+ const staticDir = path.resolve(options.staticDir ?? "dist/client");
200
+ const indexFile = path.join(staticDir, "index.html");
201
+ if (existsSync(indexFile)) {
202
+ const indexHtml = readFileSync(indexFile, "utf8");
203
+ const root2 = path.relative(process.cwd(), staticDir).replaceAll("\\", "/") || ".";
204
+ scoped.use(
205
+ "/*",
206
+ serveStatic({
207
+ root: root2,
208
+ rewriteRequestPath: (requestPath) => requestPath.slice(basePath.length) || "/"
209
+ })
210
+ );
211
+ scoped.get("/*", (c) => {
212
+ if (/\.[a-z0-9]+$/i.test(c.req.path)) return c.notFound();
213
+ c.header("Cache-Control", "no-cache");
214
+ return c.html(indexHtml);
215
+ });
216
+ }
217
+ root.route(basePath || "/", scoped);
218
+ return root;
219
+ };
220
+ const fetchHandler = (request, ...rest) => {
221
+ built ??= build();
222
+ return built.fetch(request, ...rest);
223
+ };
224
+ return {
225
+ manifest,
226
+ basePath,
227
+ api,
228
+ publicApi,
229
+ internal,
230
+ fetch: fetchHandler,
231
+ database: getDatabase,
232
+ async start() {
233
+ const port = Number(env.PORT ?? 8080);
234
+ if (!Number.isInteger(port) || port <= 0) throw new Error(`Invalid PORT: ${env.PORT}`);
235
+ if (databaseOptions) await getDatabase();
236
+ const server = serve({ fetch: fetchHandler, port });
237
+ log.info("Listening", { port, base_path: basePath || "/" });
238
+ if (isDevIdentityEnabled(env)) {
239
+ log.warn("ENV=dev: no token is verified and every request is the dev identity");
240
+ }
241
+ if (!isDevIdentityEnabled(env)) {
242
+ void registerApp({
243
+ manifest,
244
+ permissions: options.permissions,
245
+ port,
246
+ basePath,
247
+ env,
248
+ onResult: (result) => {
249
+ if (result.ok) log.info("Registered with the platform", result);
250
+ else log.warn("Registration with the platform failed", result);
251
+ }
252
+ });
253
+ }
254
+ const close = async () => {
255
+ await new Promise((resolve2) => server.close(() => resolve2()));
256
+ if (databaseOptions) {
257
+ const database = await getDatabase().catch(() => void 0);
258
+ await database?.close();
259
+ databaseCache().delete(manifest.id);
260
+ }
261
+ };
262
+ const shutdown = () => {
263
+ log.info("Shutting down");
264
+ void close().finally(() => process.exit(0));
265
+ };
266
+ process.once("SIGTERM", shutdown);
267
+ process.once("SIGINT", shutdown);
268
+ return { port, close };
269
+ }
270
+ };
271
+ }
272
+
273
+ // src/pagination.ts
274
+ var DEFAULT_PAGE_SIZE = 20;
275
+ var MAX_PAGE_SIZE = 100;
276
+ function integer(value, field, fallback, max) {
277
+ if (value === void 0 || value === "") return fallback;
278
+ if (!/^\d+$/.test(value)) throw new ValidationError(`${field} must be a positive integer`, field);
279
+ const parsed = Number(value);
280
+ if (parsed < 1) throw new ValidationError(`${field} must be at least 1`, field);
281
+ if (max !== void 0 && parsed > max) {
282
+ throw new ValidationError(`${field} must be at most ${max}`, field);
283
+ }
284
+ return parsed;
285
+ }
286
+ function parsePage(source) {
287
+ const query = "req" in source && typeof source.req?.query === "function" ? source.req.query() : source;
288
+ const page = integer(query.page, "page", 1);
289
+ const pageSize = integer(query.page_size, "page_size", DEFAULT_PAGE_SIZE, MAX_PAGE_SIZE);
290
+ const keyword = query.keyword?.trim() || void 0;
291
+ return { page, pageSize, keyword, offset: (page - 1) * pageSize, limit: pageSize };
292
+ }
293
+ function pageOf(items, total, params) {
294
+ return { items, page: params.page, page_size: params.pageSize, total };
295
+ }
296
+
297
+ // src/url-guard.ts
298
+ import { lookup as dnsLookup } from "dns/promises";
299
+ import { BlockList, isIP } from "net";
300
+ var UnsafeUrlError = class extends AppError {
301
+ constructor(message) {
302
+ super(message, { code: "unsafe_url", status: 400 });
303
+ }
304
+ };
305
+ var blocked = new BlockList();
306
+ for (const [network, prefix] of [
307
+ ["0.0.0.0", 8],
308
+ ["10.0.0.0", 8],
309
+ ["100.64.0.0", 10],
310
+ ["127.0.0.0", 8],
311
+ ["169.254.0.0", 16],
312
+ ["172.16.0.0", 12],
313
+ ["192.0.0.0", 24],
314
+ ["192.0.2.0", 24],
315
+ ["192.168.0.0", 16],
316
+ ["198.18.0.0", 15],
317
+ ["198.51.100.0", 24],
318
+ ["203.0.113.0", 24],
319
+ ["224.0.0.0", 4],
320
+ ["240.0.0.0", 4]
321
+ ]) {
322
+ blocked.addSubnet(network, prefix, "ipv4");
323
+ }
324
+ for (const [network, prefix] of [
325
+ ["::", 127],
326
+ // unspecified and loopback
327
+ ["64:ff9b::", 96],
328
+ // NAT64
329
+ ["2001:db8::", 32],
330
+ // documentation
331
+ ["fc00::", 7],
332
+ // unique local
333
+ ["fe80::", 10],
334
+ // link local
335
+ ["ff00::", 8]
336
+ // multicast
337
+ ]) {
338
+ blocked.addSubnet(network, prefix, "ipv6");
339
+ }
340
+ function isReservedAddress(address) {
341
+ const family = isIP(address);
342
+ if (family === 4) return blocked.check(address, "ipv4");
343
+ if (family === 6) return blocked.check(address, "ipv6");
344
+ return true;
345
+ }
346
+ function envAllowList() {
347
+ return (process.env.URL_GUARD_ALLOW_HOSTS ?? "").split(",").map((host) => host.trim().toLowerCase()).filter(Boolean);
348
+ }
349
+ async function resolve(hostname2) {
350
+ const records = await dnsLookup(hostname2, { all: true });
351
+ return records.map((record) => record.address);
352
+ }
353
+ async function assertPublicUrl(input, options = {}) {
354
+ let url;
355
+ try {
356
+ url = input instanceof URL ? input : new URL(input);
357
+ } catch {
358
+ throw new UnsafeUrlError("URL is not valid");
359
+ }
360
+ if (url.protocol !== "http:" && url.protocol !== "https:") {
361
+ throw new UnsafeUrlError("URL must use http or https");
362
+ }
363
+ const hostname2 = url.hostname.replace(/^\[|\]$/g, "").toLowerCase();
364
+ if (!hostname2) throw new UnsafeUrlError("URL has no host");
365
+ const allowed = [
366
+ ...(options.allowHosts ?? []).map((host) => host.toLowerCase()),
367
+ ...envAllowList()
368
+ ];
369
+ if (allowed.includes(hostname2)) return url;
370
+ let addresses;
371
+ if (isIP(hostname2)) {
372
+ addresses = [hostname2];
373
+ } else {
374
+ try {
375
+ addresses = await (options.lookup ?? resolve)(hostname2);
376
+ } catch {
377
+ throw new UnsafeUrlError("URL host cannot be resolved");
378
+ }
379
+ }
380
+ if (addresses.length === 0 || addresses.some(isReservedAddress)) {
381
+ throw new UnsafeUrlError("URL resolves to a private or reserved address");
382
+ }
383
+ return url;
384
+ }
385
+ export {
386
+ APP_ID_PATTERN,
387
+ APP_NAME_PATTERN,
388
+ AppError,
389
+ ConflictError,
390
+ DEFAULT_PAGE_SIZE,
391
+ ForbiddenError,
392
+ MAX_PAGE_SIZE,
393
+ NotFoundError,
394
+ ORGANIZATION_AUDIENCE_PREFIX,
395
+ REQUEST_ID_HEADER,
396
+ UnauthorizedError,
397
+ UnsafeUrlError,
398
+ ValidationError,
399
+ assertPublicUrl,
400
+ authenticate,
401
+ bearerToken,
402
+ coerceRequestId,
403
+ createApp,
404
+ createVerifier,
405
+ definePermissions,
406
+ errorHandler,
407
+ generateAppId,
408
+ getRequestContext,
409
+ getRequestId,
410
+ getUser,
411
+ hasPermissions,
412
+ isReservedAddress,
413
+ isUuid,
414
+ isValidAppId,
415
+ isValidAppName,
416
+ notFoundHandler,
417
+ pageOf,
418
+ parsePage,
419
+ permissionMatches,
420
+ registerApp,
421
+ registrationPayload,
422
+ requestContext,
423
+ requirePermission,
424
+ requireRole,
425
+ toErrorResponse,
426
+ userFromClaims,
427
+ uuidv7,
428
+ verifierFromEnv
429
+ };
package/dist/log.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import { MiddlewareHandler } from 'hono';
2
+
3
+ type Fields = Record<string, unknown>;
4
+ /** Set the fields attached to every line, typically the app name and environment. */
5
+ declare function configureLog(fields: Fields): void;
6
+ /**
7
+ * Structured logs as JSON lines on stdout. Pass an error as `{ err }` to get its stack.
8
+ * Never connect a log backend inside an app. The platform collects stdout.
9
+ */
10
+ declare const log: {
11
+ debug: (message: string, fields?: Fields) => void;
12
+ info: (message: string, fields?: Fields) => void;
13
+ warn: (message: string, fields?: Fields) => void;
14
+ error: (message: string, fields?: Fields) => void;
15
+ };
16
+ interface AuditDetails {
17
+ /** What was acted on, for example `{ type: 'item', id }`. */
18
+ target?: {
19
+ type: string;
20
+ id: string;
21
+ };
22
+ [key: string]: unknown;
23
+ }
24
+ /** Record who did what. The line carries `type: "audit"` plus the request's user and tenant. */
25
+ declare function audit(action: string, details?: AuditDetails): void;
26
+ /** Log one line per request with method, path, status and duration. */
27
+ declare function requestLogger(): MiddlewareHandler;
28
+
29
+ export { type AuditDetails, audit, configureLog, log, requestLogger };
package/dist/log.js ADDED
@@ -0,0 +1,13 @@
1
+ import {
2
+ audit,
3
+ configureLog,
4
+ log,
5
+ requestLogger
6
+ } from "./chunk-26AAYRI3.js";
7
+ import "./chunk-ERGI2X5S.js";
8
+ export {
9
+ audit,
10
+ configureLog,
11
+ log,
12
+ requestLogger
13
+ };
@@ -0,0 +1,26 @@
1
+ import { V as Verifier } from './auth-DqrXYPCf.js';
2
+ import 'hono';
3
+ import 'jose';
4
+
5
+ interface TestIssuer {
6
+ issuer: string;
7
+ /** A verifier that trusts this issuer's key. Pass it to `createApp({ verifier })`. */
8
+ verifier: Verifier;
9
+ /** Sign a token. Claims override the defaults. */
10
+ sign(claims?: Record<string, unknown>, options?: SignOptions): Promise<string>;
11
+ }
12
+ interface SignOptions {
13
+ /** Lifetime such as `5m`, or a negative value such as `-1m` for an expired token. */
14
+ expiresIn?: string;
15
+ audience?: string | string[];
16
+ issuer?: string;
17
+ }
18
+ declare const TEST_TENANT_ID = "0190a000-0000-7000-8000-0000000000a1";
19
+ /**
20
+ * A throwaway token issuer for tests. It signs organization tokens with a fresh key and
21
+ * provides the matching verifier, so tests exercise real signature checks without a
22
+ * network call.
23
+ */
24
+ declare function createTestIssuer(issuer?: string): Promise<TestIssuer>;
25
+
26
+ export { type SignOptions, TEST_TENANT_ID, type TestIssuer, createTestIssuer };
@@ -0,0 +1,41 @@
1
+ import {
2
+ createVerifier
3
+ } from "./chunk-SVZCJQNB.js";
4
+ import "./chunk-6IYKARAJ.js";
5
+ import "./chunk-NMKEVYGN.js";
6
+ import "./chunk-ERGI2X5S.js";
7
+
8
+ // src/testing.ts
9
+ import { createLocalJWKSet, exportJWK, generateKeyPair, SignJWT } from "jose";
10
+ var TEST_TENANT_ID = "0190a000-0000-7000-8000-0000000000a1";
11
+ async function createTestIssuer(issuer = "https://auth.test/oidc") {
12
+ const { publicKey, privateKey } = await generateKeyPair("ES384");
13
+ const jwk = { ...await exportJWK(publicKey), kid: "test-key", alg: "ES384", use: "sig" };
14
+ const verifier = createVerifier({ issuer, key: createLocalJWKSet({ keys: [jwk] }) });
15
+ return {
16
+ issuer,
17
+ verifier,
18
+ async sign(claims = {}, options = {}) {
19
+ const { sub, ...rest } = claims;
20
+ const now = Math.floor(Date.now() / 1e3);
21
+ const lifetime = options.expiresIn ?? "5m";
22
+ const builder = new SignJWT({
23
+ tenant_id: TEST_TENANT_ID,
24
+ organization_id: "org-test",
25
+ organization_roles: ["tenant_admin"],
26
+ permissions: [],
27
+ ...rest
28
+ }).setProtectedHeader({ alg: "ES384", kid: "test-key" }).setIssuer(options.issuer ?? issuer).setSubject(typeof sub === "string" ? sub : "user-test").setAudience(options.audience ?? "urn:logto:organization:org-test");
29
+ if (lifetime.startsWith("-")) {
30
+ builder.setIssuedAt(now - 3600).setExpirationTime(now - 60);
31
+ } else {
32
+ builder.setIssuedAt(now).setExpirationTime(lifetime);
33
+ }
34
+ return builder.sign(privateKey);
35
+ }
36
+ };
37
+ }
38
+ export {
39
+ TEST_TENANT_ID,
40
+ createTestIssuer
41
+ };
package/package.json CHANGED
@@ -1,6 +1,77 @@
1
1
  {
2
2
  "name": "@zjazj/server",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.1",
4
+ "description": "Backend runtime for platform apps: auth, logging, tenant-safe database access and app assembly on Hono.",
5
+ "type": "module",
6
+ "license": "UNLICENSED",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/zjazj/platform-cli.git",
10
+ "directory": "packages/server"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "./log": {
18
+ "types": "./dist/log.d.ts",
19
+ "default": "./dist/log.js"
20
+ },
21
+ "./db": {
22
+ "types": "./dist/db.d.ts",
23
+ "default": "./dist/db.js"
24
+ },
25
+ "./dev": {
26
+ "types": "./dist/dev.d.ts",
27
+ "default": "./dist/dev.js"
28
+ },
29
+ "./testing": {
30
+ "types": "./dist/testing.d.ts",
31
+ "default": "./dist/testing.js"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "sideEffects": false,
38
+ "engines": {
39
+ "node": ">=22.14.0"
40
+ },
41
+ "dependencies": {
42
+ "@hono/node-server": "^1.19.18",
43
+ "hono": "^4.13.17",
44
+ "jose": "^6.2.17",
45
+ "pino": "^10.4.0"
46
+ },
47
+ "peerDependencies": {
48
+ "@electric-sql/pglite": "^0.5.16",
49
+ "drizzle-orm": "^0.45.4",
50
+ "postgres": "^3.4.9"
51
+ },
52
+ "peerDependenciesMeta": {
53
+ "@electric-sql/pglite": {
54
+ "optional": true
55
+ },
56
+ "drizzle-orm": {
57
+ "optional": true
58
+ },
59
+ "postgres": {
60
+ "optional": true
61
+ }
62
+ },
63
+ "devDependencies": {
64
+ "@electric-sql/pglite": "^0.5.16",
65
+ "drizzle-orm": "^0.45.4",
66
+ "postgres": "^3.4.9"
67
+ },
68
+ "publishConfig": {
69
+ "access": "public",
70
+ "registry": "https://registry.npmjs.org/"
71
+ },
72
+ "scripts": {
73
+ "build": "tsup",
74
+ "test": "vitest run",
75
+ "typecheck": "tsc --noEmit -p tsconfig.json"
76
+ }
6
77
  }