@pithy-sh/audit 0.1.3 → 0.1.4
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/actions.d.ts +2 -0
- package/dist/actions.js +2 -0
- package/dist/capability.d.ts +2 -0
- package/dist/capability.js +2 -0
- package/dist/cli/emitFromCLI.d.ts +2 -0
- package/dist/cli/emitFromCLI.js +2 -0
- package/dist/cli/resolveActor.d.ts +2 -0
- package/dist/cli/resolveActor.js +2 -0
- package/dist/data/auditEvent.d.ts +2 -0
- package/dist/data/auditEvent.js +2 -0
- package/dist/data/tables.d.ts +2 -0
- package/dist/data/tables.js +2 -0
- package/dist/error/errors.d.ts +2 -0
- package/dist/error/errors.js +2 -0
- package/dist/http/guards.d.ts +2 -0
- package/dist/http/guards.js +2 -0
- package/dist/http/responses.d.ts +2 -0
- package/dist/http/responses.js +2 -0
- package/dist/http/routes.d.ts +2 -0
- package/dist/http/routes.js +2 -0
- package/dist/http/schemas.d.ts +2 -0
- package/dist/http/schemas.js +2 -0
- package/dist/http/views.d.ts +2 -0
- package/dist/http/views.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/migrations/0001_init.d.ts +2 -0
- package/dist/migrations/0001_init.js +2 -0
- package/dist/query.d.ts +2 -0
- package/dist/query.js +2 -0
- package/dist/recorder.d.ts +2 -0
- package/dist/recorder.js +2 -0
- package/dist/seeds/example.d.ts +2 -0
- package/dist/seeds/example.js +2 -0
- package/dist/version.generated.d.ts +3 -1
- package/dist/version.generated.js +3 -1
- package/package.json +4 -4
- package/src/version.generated.ts +1 -1
package/dist/actions.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
/**
|
|
2
4
|
* Author a capability's action constants. The taxonomy is **federated**: each capability owns and
|
|
3
5
|
* exports its own `domain/reason` action codes (`auth/login`, `entitlement/granted`) and adds them
|
package/dist/actions.js
CHANGED
package/dist/capability.d.ts
CHANGED
package/dist/capability.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import type { D1Database } from "@cloudflare/workers-types";
|
|
2
4
|
import type { AuditEventInput } from "@pithy-sh/core/src/audit/auditEvent";
|
|
3
5
|
import { type AuditRecorderOptions } from "../recorder";
|
package/dist/cli/emitFromCLI.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import type { AuditActorType, AuditMetadata } from "@pithy-sh/core/src/audit/auditEvent";
|
|
2
4
|
/** The user-scoped slice: who is behind a `cfut_*` token. `clients.user()` satisfies it. */
|
|
3
5
|
export interface CfUserActorSource {
|
package/dist/cli/resolveActor.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import { messageOf } from "@pithy-sh/core/src/error/pithyError";
|
|
2
4
|
//#region src/cli/resolveActor.ts
|
|
3
5
|
/** The fallback actor when resolution can't attribute the action: `system`, with a note (never fatal). */
|
package/dist/data/auditEvent.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import { AuditAction, AuditActorType, AuditMetadata, AuditOutcome, AuditSeverity } from "@pithy-sh/core/src/audit/auditEvent";
|
|
2
4
|
import { z } from "zod";
|
|
3
5
|
import { SQLiteDate, sqliteJson } from "@pithy-sh/core/src/data/codecs";
|
package/dist/data/tables.d.ts
CHANGED
package/dist/data/tables.js
CHANGED
package/dist/error/errors.d.ts
CHANGED
package/dist/error/errors.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import { PithyError } from "@pithy-sh/core/src/error/pithyError";
|
|
2
4
|
//#region src/error/errors.ts
|
|
3
5
|
/** An audit event failed validation against the `AuditEvent` schema (bad action, outcome, or actor). */
|
package/dist/http/guards.d.ts
CHANGED
package/dist/http/guards.js
CHANGED
package/dist/http/responses.d.ts
CHANGED
package/dist/http/responses.js
CHANGED
package/dist/http/routes.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import type { PithyHonoEnv } from "@pithy-sh/core/src/capability/capability";
|
|
2
4
|
import type { ControlPlaneScope } from "@pithy-sh/core/src/controlPlane/scope/scope";
|
|
3
5
|
import type { VerificationStrategy } from "@pithy-sh/core/src/http/verification";
|
package/dist/http/routes.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import { AuditTrailActions } from "../actions.js";
|
|
2
4
|
import { AUDIT_EVENT_DETAIL_READ_SCOPE, AUDIT_TRAIL_READ_SCOPE } from "./guards.js";
|
|
3
5
|
import { pageAuditEvents, readAuditEvent } from "../query.js";
|
package/dist/http/schemas.d.ts
CHANGED
package/dist/http/schemas.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import { AuditAction, AuditActorType, AuditOutcome, AuditSeverity } from "@pithy-sh/core/src/audit/auditEvent";
|
|
2
4
|
import { z } from "zod";
|
|
3
5
|
import { MAX_PAGE_SIZE } from "@pithy-sh/core/src/data/cursor";
|
package/dist/http/views.d.ts
CHANGED
package/dist/http/views.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
/**
|
|
2
4
|
* The package entrypoint — the surface `pithy add audit` wires into `pithy.config.ts`. Deliberately
|
|
3
5
|
* narrow: the capability factory, the recorder/query seams an app reads the trail with, the federated
|
package/dist/index.js
CHANGED
package/dist/query.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import type { AuditActorType, AuditOutcome, AuditSeverity } from "@pithy-sh/core/src/audit/auditEvent";
|
|
2
4
|
import { AuditEventRow } from "./data/auditEvent";
|
|
3
5
|
import type { AuditDatabase } from "./data/tables";
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import { AuditEventRow } from "./data/auditEvent.js";
|
|
2
4
|
import { SQLiteDate } from "@pithy-sh/core/src/data/codecs";
|
|
3
5
|
import { decodeCursor, pageLimit, toPage } from "@pithy-sh/core/src/data/cursor";
|
package/dist/recorder.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import { type AuditEventInput } from "@pithy-sh/core/src/audit/auditEvent";
|
|
2
4
|
import type { AuditEmit } from "@pithy-sh/core/src/audit/recorder";
|
|
3
5
|
import { type D1RetryOptions } from "@pithy-sh/core/src/data/withD1Retry";
|
package/dist/recorder.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import { AuditInvalidEventError, AuditWriteFailedError } from "./error/errors.js";
|
|
2
4
|
import { AuditMetadataColumn } from "./data/auditEvent.js";
|
|
3
5
|
import { AuditEvent } from "@pithy-sh/core/src/audit/auditEvent";
|
package/dist/seeds/example.d.ts
CHANGED
package/dist/seeds/example.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
import { AuditEventRow } from "../data/auditEvent.js";
|
|
2
4
|
import { EXAMPLE_ADA, EXAMPLE_ALAN, EXAMPLE_GRACE } from "@pithy-sh/core/src/seed/exampleIdentities";
|
|
3
5
|
import { d1SeedGroup, defineSeed } from "@pithy-sh/core/src/seed/seed";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
/** This package's npm name — the join key against a release feed. */
|
|
2
4
|
export declare const PACKAGE_NAME = "@pithy-sh/audit";
|
|
3
5
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
4
|
-
export declare const PACKAGE_VERSION = "0.1.
|
|
6
|
+
export declare const PACKAGE_VERSION = "0.1.4";
|
|
5
7
|
//# sourceMappingURL=version.generated.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: FSL-1.1-MIT
|
|
1
3
|
//#region src/version.generated.ts
|
|
2
4
|
/** This package's npm name — the join key against a release feed. */
|
|
3
5
|
const PACKAGE_NAME = "@pithy-sh/audit";
|
|
4
6
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
5
|
-
const PACKAGE_VERSION = "0.1.
|
|
7
|
+
const PACKAGE_VERSION = "0.1.4";
|
|
6
8
|
//#endregion
|
|
7
9
|
export { PACKAGE_NAME, PACKAGE_VERSION };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pithy-sh/audit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "FSL-1.1-MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "tsdown && tsc -p tsconfig.build.json",
|
|
28
|
+
"build": "tsdown && tsc -p tsconfig.build.json && bun ../../tooling/build/src/stampDeclarations.ts",
|
|
29
29
|
"typecheck": "tsc -p tsconfig.json",
|
|
30
30
|
"test": "vitest run",
|
|
31
31
|
"test:node": "vitest run --project=node",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@cloudflare/workers-types": "^5.20260729.1",
|
|
38
38
|
"@hono/zod-validator": "^0.9.0",
|
|
39
|
-
"@pithy-sh/cloudflare": "^0.1.
|
|
40
|
-
"@pithy-sh/core": "^0.1.
|
|
39
|
+
"@pithy-sh/cloudflare": "^0.1.4",
|
|
40
|
+
"@pithy-sh/core": "^0.1.5"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@cloudflare/vitest-plugin": "^1.0.0",
|
package/src/version.generated.ts
CHANGED