@usebetterdev/audit-hono 0.4.0-beta.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/README.md +152 -0
- package/dist/index.cjs +50 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# @usebetterdev/audit-hono
|
|
2
|
+
|
|
3
|
+
Hono middleware for [`@usebetterdev/audit-core`](../core). Automatically extracts actor identity from incoming requests and makes it available to audit logging via `AsyncLocalStorage`.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @usebetterdev/audit-hono @usebetterdev/audit-core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Hono } from "hono";
|
|
15
|
+
import { betterAudit } from "@usebetterdev/audit-core";
|
|
16
|
+
import { betterAuditHono } from "@usebetterdev/audit-hono";
|
|
17
|
+
|
|
18
|
+
const audit = betterAudit({
|
|
19
|
+
database: { writeLog: async (log) => console.log(log) },
|
|
20
|
+
auditTables: ["users", "orders"],
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const app = new Hono();
|
|
24
|
+
|
|
25
|
+
// Use the middleware — by default it reads the `sub` claim
|
|
26
|
+
// from the Authorization: Bearer <jwt> header.
|
|
27
|
+
app.use("*", betterAuditHono(audit));
|
|
28
|
+
|
|
29
|
+
app.post("/users", async (c) => {
|
|
30
|
+
// actorId is automatically attached from the JWT
|
|
31
|
+
await audit.captureLog({
|
|
32
|
+
tableName: "users",
|
|
33
|
+
operation: "INSERT",
|
|
34
|
+
recordId: "user-42",
|
|
35
|
+
after: { name: "Alice" },
|
|
36
|
+
});
|
|
37
|
+
return c.json({ id: "user-42" }, 201);
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Actor extraction
|
|
42
|
+
|
|
43
|
+
The middleware resolves the current actor (the user or service making the request) and stores it in `AuditContext.actorId`. Every log captured during that request automatically includes the actor.
|
|
44
|
+
|
|
45
|
+
### Default: JWT Bearer token
|
|
46
|
+
|
|
47
|
+
With no options, the middleware decodes the `sub` claim from the `Authorization: Bearer <jwt>` header. The token is decoded **without** signature verification — that is the auth layer's responsibility.
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
app.use("*", betterAuditHono(audit));
|
|
51
|
+
// Authorization: Bearer eyJ... → actorId = jwt.sub
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Custom JWT claim
|
|
55
|
+
|
|
56
|
+
Extract a different claim by providing a custom extractor:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { fromBearerToken } from "@usebetterdev/audit-core";
|
|
60
|
+
|
|
61
|
+
app.use(
|
|
62
|
+
"*",
|
|
63
|
+
betterAuditHono(audit, {
|
|
64
|
+
extractor: { actor: fromBearerToken("user_id") },
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Header-based extraction
|
|
70
|
+
|
|
71
|
+
Use `fromHeader` when the actor identity is passed as a plain request header (common behind API gateways):
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { fromHeader } from "@usebetterdev/audit-core";
|
|
75
|
+
|
|
76
|
+
app.use(
|
|
77
|
+
"*",
|
|
78
|
+
betterAuditHono(audit, {
|
|
79
|
+
extractor: { actor: fromHeader("x-user-id") },
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Cookie-based extraction
|
|
85
|
+
|
|
86
|
+
Use `fromCookie` for session-based auth where the actor ID lives in a cookie:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
import { fromCookie } from "@usebetterdev/audit-core";
|
|
90
|
+
|
|
91
|
+
app.use(
|
|
92
|
+
"*",
|
|
93
|
+
betterAuditHono(audit, {
|
|
94
|
+
extractor: { actor: fromCookie("session_id") },
|
|
95
|
+
}),
|
|
96
|
+
);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Custom extractor function
|
|
100
|
+
|
|
101
|
+
Write your own `ValueExtractor` for full control. It receives the raw `Request` and returns a string or `undefined`:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
app.use(
|
|
105
|
+
"*",
|
|
106
|
+
betterAuditHono(audit, {
|
|
107
|
+
extractor: {
|
|
108
|
+
actor: async (request) => {
|
|
109
|
+
const apiKey = request.headers.get("x-api-key");
|
|
110
|
+
if (!apiKey) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
// Look up the API key owner
|
|
114
|
+
const owner = await resolveApiKeyOwner(apiKey);
|
|
115
|
+
return owner?.id;
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
}),
|
|
119
|
+
);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Error handling
|
|
123
|
+
|
|
124
|
+
Extraction errors never break the request. By default the middleware **fails open** — if an extractor throws, the request proceeds without audit context.
|
|
125
|
+
|
|
126
|
+
Use `onError` to log or report extraction failures:
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
app.use(
|
|
130
|
+
"*",
|
|
131
|
+
betterAuditHono(audit, {
|
|
132
|
+
onError: (error) => console.error("Audit extraction failed:", error),
|
|
133
|
+
}),
|
|
134
|
+
);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## API
|
|
138
|
+
|
|
139
|
+
### `betterAuditHono(audit, options?)`
|
|
140
|
+
|
|
141
|
+
Convenience wrapper that returns a Hono middleware. Equivalent to `createHonoMiddleware`.
|
|
142
|
+
|
|
143
|
+
### `createHonoMiddleware(audit, options?)`
|
|
144
|
+
|
|
145
|
+
Creates a Hono-compatible middleware function.
|
|
146
|
+
|
|
147
|
+
**Options:**
|
|
148
|
+
|
|
149
|
+
| Option | Type | Description |
|
|
150
|
+
| ----------- | ----------------------------- | ------------------------------------------------------ |
|
|
151
|
+
| `extractor` | `ContextExtractor` | Actor extractor config. Defaults to JWT `sub` claim. |
|
|
152
|
+
| `onError` | `(error: unknown) => void` | Called when an extractor throws. Defaults to no-op. |
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
betterAuditHono: () => betterAuditHono,
|
|
24
|
+
createHonoMiddleware: () => createHonoMiddleware
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
var import_audit_core = require("@usebetterdev/audit-core");
|
|
28
|
+
var defaultExtractor = {
|
|
29
|
+
actor: (0, import_audit_core.fromBearerToken)("sub")
|
|
30
|
+
};
|
|
31
|
+
function createHonoMiddleware(options = {}) {
|
|
32
|
+
const extractor = options.extractor ?? defaultExtractor;
|
|
33
|
+
const handlerOptions = {};
|
|
34
|
+
if (options.onError) {
|
|
35
|
+
handlerOptions.onError = options.onError;
|
|
36
|
+
}
|
|
37
|
+
return async (context, next) => {
|
|
38
|
+
await (0, import_audit_core.handleMiddleware)(extractor, context.req.raw, next, handlerOptions);
|
|
39
|
+
return void 0;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function betterAuditHono(options = {}) {
|
|
43
|
+
return createHonoMiddleware(options);
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
betterAuditHono,
|
|
48
|
+
createHonoMiddleware
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type {\n AuditContext,\n ContextExtractor,\n MiddlewareHandlerOptions,\n} from \"@usebetterdev/audit-core\";\nimport {\n handleMiddleware,\n fromBearerToken,\n} from \"@usebetterdev/audit-core\";\n\nexport interface HonoContextLike {\n req: { raw: Request };\n}\n\nexport type HonoMiddleware = (\n context: HonoContextLike,\n next: () => Promise<void>,\n) => Promise<Response | void>;\n\nexport interface CreateHonoMiddlewareOptions {\n /** Context extractor for pulling actor identity from the request. */\n extractor?: ContextExtractor;\n /** Called when an extractor throws. Defaults to silent fail-open. */\n onError?: (error: unknown) => void;\n}\n\n/** Default extractor: reads `sub` from `Authorization: Bearer <jwt>` as actor. */\nconst defaultExtractor: ContextExtractor = {\n actor: fromBearerToken(\"sub\"),\n};\n\n/**\n * Creates a Hono-compatible middleware that populates audit context\n * via AsyncLocalStorage on every request.\n *\n * Delegates to the shared `handleMiddleware()` from audit-core,\n * which all framework adapters share.\n *\n * The middleware is non-blocking: if context extraction fails, the\n * request proceeds without audit context (fail open).\n */\nexport function createHonoMiddleware(\n options: CreateHonoMiddlewareOptions = {},\n): HonoMiddleware {\n const extractor = options.extractor ?? defaultExtractor;\n const handlerOptions: MiddlewareHandlerOptions = {};\n if (options.onError) {\n handlerOptions.onError = options.onError;\n }\n\n return async (context, next) => {\n await handleMiddleware(extractor, context.req.raw, next, handlerOptions);\n return undefined;\n };\n}\n\n/**\n * Convenience wrapper: `app.use('*', betterAuditHono())`.\n *\n * Uses the default JWT extractor (reads `sub` from `Authorization: Bearer <jwt>`).\n * Pass options to customize extraction.\n */\nexport function betterAuditHono(\n options: CreateHonoMiddlewareOptions = {},\n): HonoMiddleware {\n return createHonoMiddleware(options);\n}\n\nexport type { AuditContext, ContextExtractor };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,wBAGO;AAmBP,IAAM,mBAAqC;AAAA,EACzC,WAAO,mCAAgB,KAAK;AAC9B;AAYO,SAAS,qBACd,UAAuC,CAAC,GACxB;AAChB,QAAM,YAAY,QAAQ,aAAa;AACvC,QAAM,iBAA2C,CAAC;AAClD,MAAI,QAAQ,SAAS;AACnB,mBAAe,UAAU,QAAQ;AAAA,EACnC;AAEA,SAAO,OAAO,SAAS,SAAS;AAC9B,cAAM,oCAAiB,WAAW,QAAQ,IAAI,KAAK,MAAM,cAAc;AACvE,WAAO;AAAA,EACT;AACF;AAQO,SAAS,gBACd,UAAuC,CAAC,GACxB;AAChB,SAAO,qBAAqB,OAAO;AACrC;","names":[]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ContextExtractor } from '@usebetterdev/audit-core';
|
|
2
|
+
export { AuditContext, ContextExtractor } from '@usebetterdev/audit-core';
|
|
3
|
+
|
|
4
|
+
interface HonoContextLike {
|
|
5
|
+
req: {
|
|
6
|
+
raw: Request;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
type HonoMiddleware = (context: HonoContextLike, next: () => Promise<void>) => Promise<Response | void>;
|
|
10
|
+
interface CreateHonoMiddlewareOptions {
|
|
11
|
+
/** Context extractor for pulling actor identity from the request. */
|
|
12
|
+
extractor?: ContextExtractor;
|
|
13
|
+
/** Called when an extractor throws. Defaults to silent fail-open. */
|
|
14
|
+
onError?: (error: unknown) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates a Hono-compatible middleware that populates audit context
|
|
18
|
+
* via AsyncLocalStorage on every request.
|
|
19
|
+
*
|
|
20
|
+
* Delegates to the shared `handleMiddleware()` from audit-core,
|
|
21
|
+
* which all framework adapters share.
|
|
22
|
+
*
|
|
23
|
+
* The middleware is non-blocking: if context extraction fails, the
|
|
24
|
+
* request proceeds without audit context (fail open).
|
|
25
|
+
*/
|
|
26
|
+
declare function createHonoMiddleware(options?: CreateHonoMiddlewareOptions): HonoMiddleware;
|
|
27
|
+
/**
|
|
28
|
+
* Convenience wrapper: `app.use('*', betterAuditHono())`.
|
|
29
|
+
*
|
|
30
|
+
* Uses the default JWT extractor (reads `sub` from `Authorization: Bearer <jwt>`).
|
|
31
|
+
* Pass options to customize extraction.
|
|
32
|
+
*/
|
|
33
|
+
declare function betterAuditHono(options?: CreateHonoMiddlewareOptions): HonoMiddleware;
|
|
34
|
+
|
|
35
|
+
export { type CreateHonoMiddlewareOptions, type HonoContextLike, type HonoMiddleware, betterAuditHono, createHonoMiddleware };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ContextExtractor } from '@usebetterdev/audit-core';
|
|
2
|
+
export { AuditContext, ContextExtractor } from '@usebetterdev/audit-core';
|
|
3
|
+
|
|
4
|
+
interface HonoContextLike {
|
|
5
|
+
req: {
|
|
6
|
+
raw: Request;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
type HonoMiddleware = (context: HonoContextLike, next: () => Promise<void>) => Promise<Response | void>;
|
|
10
|
+
interface CreateHonoMiddlewareOptions {
|
|
11
|
+
/** Context extractor for pulling actor identity from the request. */
|
|
12
|
+
extractor?: ContextExtractor;
|
|
13
|
+
/** Called when an extractor throws. Defaults to silent fail-open. */
|
|
14
|
+
onError?: (error: unknown) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates a Hono-compatible middleware that populates audit context
|
|
18
|
+
* via AsyncLocalStorage on every request.
|
|
19
|
+
*
|
|
20
|
+
* Delegates to the shared `handleMiddleware()` from audit-core,
|
|
21
|
+
* which all framework adapters share.
|
|
22
|
+
*
|
|
23
|
+
* The middleware is non-blocking: if context extraction fails, the
|
|
24
|
+
* request proceeds without audit context (fail open).
|
|
25
|
+
*/
|
|
26
|
+
declare function createHonoMiddleware(options?: CreateHonoMiddlewareOptions): HonoMiddleware;
|
|
27
|
+
/**
|
|
28
|
+
* Convenience wrapper: `app.use('*', betterAuditHono())`.
|
|
29
|
+
*
|
|
30
|
+
* Uses the default JWT extractor (reads `sub` from `Authorization: Bearer <jwt>`).
|
|
31
|
+
* Pass options to customize extraction.
|
|
32
|
+
*/
|
|
33
|
+
declare function betterAuditHono(options?: CreateHonoMiddlewareOptions): HonoMiddleware;
|
|
34
|
+
|
|
35
|
+
export { type CreateHonoMiddlewareOptions, type HonoContextLike, type HonoMiddleware, betterAuditHono, createHonoMiddleware };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import {
|
|
3
|
+
handleMiddleware,
|
|
4
|
+
fromBearerToken
|
|
5
|
+
} from "@usebetterdev/audit-core";
|
|
6
|
+
var defaultExtractor = {
|
|
7
|
+
actor: fromBearerToken("sub")
|
|
8
|
+
};
|
|
9
|
+
function createHonoMiddleware(options = {}) {
|
|
10
|
+
const extractor = options.extractor ?? defaultExtractor;
|
|
11
|
+
const handlerOptions = {};
|
|
12
|
+
if (options.onError) {
|
|
13
|
+
handlerOptions.onError = options.onError;
|
|
14
|
+
}
|
|
15
|
+
return async (context, next) => {
|
|
16
|
+
await handleMiddleware(extractor, context.req.raw, next, handlerOptions);
|
|
17
|
+
return void 0;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function betterAuditHono(options = {}) {
|
|
21
|
+
return createHonoMiddleware(options);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
betterAuditHono,
|
|
25
|
+
createHonoMiddleware
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type {\n AuditContext,\n ContextExtractor,\n MiddlewareHandlerOptions,\n} from \"@usebetterdev/audit-core\";\nimport {\n handleMiddleware,\n fromBearerToken,\n} from \"@usebetterdev/audit-core\";\n\nexport interface HonoContextLike {\n req: { raw: Request };\n}\n\nexport type HonoMiddleware = (\n context: HonoContextLike,\n next: () => Promise<void>,\n) => Promise<Response | void>;\n\nexport interface CreateHonoMiddlewareOptions {\n /** Context extractor for pulling actor identity from the request. */\n extractor?: ContextExtractor;\n /** Called when an extractor throws. Defaults to silent fail-open. */\n onError?: (error: unknown) => void;\n}\n\n/** Default extractor: reads `sub` from `Authorization: Bearer <jwt>` as actor. */\nconst defaultExtractor: ContextExtractor = {\n actor: fromBearerToken(\"sub\"),\n};\n\n/**\n * Creates a Hono-compatible middleware that populates audit context\n * via AsyncLocalStorage on every request.\n *\n * Delegates to the shared `handleMiddleware()` from audit-core,\n * which all framework adapters share.\n *\n * The middleware is non-blocking: if context extraction fails, the\n * request proceeds without audit context (fail open).\n */\nexport function createHonoMiddleware(\n options: CreateHonoMiddlewareOptions = {},\n): HonoMiddleware {\n const extractor = options.extractor ?? defaultExtractor;\n const handlerOptions: MiddlewareHandlerOptions = {};\n if (options.onError) {\n handlerOptions.onError = options.onError;\n }\n\n return async (context, next) => {\n await handleMiddleware(extractor, context.req.raw, next, handlerOptions);\n return undefined;\n };\n}\n\n/**\n * Convenience wrapper: `app.use('*', betterAuditHono())`.\n *\n * Uses the default JWT extractor (reads `sub` from `Authorization: Bearer <jwt>`).\n * Pass options to customize extraction.\n */\nexport function betterAuditHono(\n options: CreateHonoMiddlewareOptions = {},\n): HonoMiddleware {\n return createHonoMiddleware(options);\n}\n\nexport type { AuditContext, ContextExtractor };\n"],"mappings":";AAKA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAmBP,IAAM,mBAAqC;AAAA,EACzC,OAAO,gBAAgB,KAAK;AAC9B;AAYO,SAAS,qBACd,UAAuC,CAAC,GACxB;AAChB,QAAM,YAAY,QAAQ,aAAa;AACvC,QAAM,iBAA2C,CAAC;AAClD,MAAI,QAAQ,SAAS;AACnB,mBAAe,UAAU,QAAQ;AAAA,EACnC;AAEA,SAAO,OAAO,SAAS,SAAS;AAC9B,UAAM,iBAAiB,WAAW,QAAQ,IAAI,KAAK,MAAM,cAAc;AACvE,WAAO;AAAA,EACT;AACF;AAQO,SAAS,gBACd,UAAuC,CAAC,GACxB;AAChB,SAAO,qBAAqB,OAAO;AACrC;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@usebetterdev/audit-hono",
|
|
3
|
+
"version": "0.4.0-beta.1",
|
|
4
|
+
"repository": "github:usebetter-dev/usebetter",
|
|
5
|
+
"bugs": "https://github.com/usebetter-dev/usebetter/issues",
|
|
6
|
+
"homepage": "https://github.com/usebetter-dev/usebetter#readme",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public",
|
|
9
|
+
"registry": "https://registry.npmjs.org/"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "./dist/index.cjs",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"require": "./dist/index.cjs"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsup",
|
|
28
|
+
"lint": "oxlint",
|
|
29
|
+
"test": "vitest run",
|
|
30
|
+
"typecheck": "tsc --noEmit"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@usebetterdev/audit-core": "workspace:*"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"hono": ">=4"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^22.10.0",
|
|
40
|
+
"hono": "^4.11.9",
|
|
41
|
+
"tsup": "^8.3.5",
|
|
42
|
+
"typescript": "~5.7.2",
|
|
43
|
+
"vitest": "^2.1.6"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=22"
|
|
47
|
+
}
|
|
48
|
+
}
|