@geekmidas/audit 2.2.1 → 10.0.0-alpha.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/README.md +2 -2
- package/package.json +8 -5
- package/CHANGELOG.md +0 -79
- package/TECHNICAL.md +0 -937
- package/src/Auditor.ts +0 -157
- package/src/DefaultAuditor.ts +0 -141
- package/src/__tests__/CacheAuditStorage.spec.ts +0 -382
- package/src/__tests__/DefaultAuditor.spec.ts +0 -529
- package/src/__tests__/InMemoryAuditStorage.spec.ts +0 -317
- package/src/__tests__/KnexAuditStorage.integration.spec.ts +0 -739
- package/src/__tests__/KyselyAuditStorage.integration.spec.ts +0 -518
- package/src/__tests__/KyselyAuditStorage.spec.ts +0 -443
- package/src/cache.ts +0 -263
- package/src/index.ts +0 -23
- package/src/knex.ts +0 -430
- package/src/kysely.ts +0 -424
- package/src/memory.ts +0 -50
- package/src/storage.ts +0 -203
- package/src/types.ts +0 -154
- package/tsconfig.json +0 -9
package/README.md
CHANGED
|
@@ -435,9 +435,9 @@ CREATE INDEX idx_audit_logs_entity_id ON audit_logs("entityId");
|
|
|
435
435
|
The audit package integrates seamlessly with `@geekmidas/constructs` endpoints:
|
|
436
436
|
|
|
437
437
|
```typescript
|
|
438
|
-
import {
|
|
438
|
+
import { api } from '../constructs/api';
|
|
439
439
|
|
|
440
|
-
const endpoint =
|
|
440
|
+
const endpoint = api
|
|
441
441
|
.post('/users')
|
|
442
442
|
.body(UserSchema)
|
|
443
443
|
.output(UserResponseSchema)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/audit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0-alpha.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
+
"files": [
|
|
58
|
+
"dist"
|
|
59
|
+
],
|
|
57
60
|
"repository": {
|
|
58
61
|
"type": "git",
|
|
59
62
|
"url": "https://github.com/geekmidas/toolbox"
|
|
@@ -69,8 +72,8 @@
|
|
|
69
72
|
"peerDependencies": {
|
|
70
73
|
"kysely": ">=0.28.2 <0.30.0",
|
|
71
74
|
"knex": ">=3.0.0 <4.0.0",
|
|
72
|
-
"@geekmidas/cache": "^
|
|
73
|
-
"@geekmidas/schema": "^
|
|
75
|
+
"@geekmidas/cache": "^10.0.0-alpha.0",
|
|
76
|
+
"@geekmidas/schema": "^10.0.0-alpha.0"
|
|
74
77
|
},
|
|
75
78
|
"peerDependenciesMeta": {
|
|
76
79
|
"@geekmidas/cache": {
|
|
@@ -91,7 +94,7 @@
|
|
|
91
94
|
"pg": "~8.16.0",
|
|
92
95
|
"@types/pg": "~8.15.6",
|
|
93
96
|
"knex": "~3.1.0",
|
|
94
|
-
"@geekmidas/cache": "^
|
|
95
|
-
"@geekmidas/schema": "^
|
|
97
|
+
"@geekmidas/cache": "^10.0.0-alpha.0",
|
|
98
|
+
"@geekmidas/schema": "^10.0.0-alpha.0"
|
|
96
99
|
}
|
|
97
100
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# @geekmidas/audit
|
|
2
|
-
|
|
3
|
-
## 2.2.1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 🐛 [#11](https://github.com/geekmidas/toolbox/pull/11) [`40f4dc0`](https://github.com/geekmidas/toolbox/commit/40f4dc095911b2223a255029d8f776caf7781309) Thanks [@geekmidas](https://github.com/geekmidas)! - Patch release across all packages to realign published versions with the
|
|
8
|
-
registry. The previous release only published the four packages that had
|
|
9
|
-
version bumps; the remaining packages failed with "cannot publish over the
|
|
10
|
-
previously published versions" because their versions were unchanged.
|
|
11
|
-
- Updated dependencies [[`40f4dc0`](https://github.com/geekmidas/toolbox/commit/40f4dc095911b2223a255029d8f776caf7781309)]:
|
|
12
|
-
- @geekmidas/cache@1.1.2
|
|
13
|
-
- @geekmidas/schema@1.0.4
|
|
14
|
-
|
|
15
|
-
## 2.2.0
|
|
16
|
-
|
|
17
|
-
### Minor Changes
|
|
18
|
-
|
|
19
|
-
- ✨ [#10](https://github.com/geekmidas/toolbox/pull/10) [`ae678fe`](https://github.com/geekmidas/toolbox/commit/ae678fe6fbc89307d052335468f1b955b306a604) Thanks [@geekmidas](https://github.com/geekmidas)! - Add Knex audit storage via a new `@geekmidas/audit/knex` entry point.
|
|
20
|
-
|
|
21
|
-
`KnexAuditStorage` mirrors `KyselyAuditStorage` — same config (`db`,
|
|
22
|
-
`tableName`, `databaseServiceName`, `autoId`), same `query()`/`count()`
|
|
23
|
-
filters, and the same transaction semantics. A `withAuditableTransaction`
|
|
24
|
-
helper is included; passing an existing transaction reuses it instead of
|
|
25
|
-
opening a savepoint, so audits roll back with the outer transaction.
|
|
26
|
-
|
|
27
|
-
Because it implements `withTransaction()`, `getDatabase()` and
|
|
28
|
-
`databaseServiceName`, endpoints wrap handlers and audit flushes in a single
|
|
29
|
-
transaction with Knex just as they do with Kysely.
|
|
30
|
-
|
|
31
|
-
`knex` is an optional peer dependency, so Kysely-only users are unaffected.
|
|
32
|
-
|
|
33
|
-
## 2.1.0
|
|
34
|
-
|
|
35
|
-
### Minor Changes
|
|
36
|
-
|
|
37
|
-
- [#9](https://github.com/geekmidas/toolbox/pull/9) [`e31a60a`](https://github.com/geekmidas/toolbox/commit/e31a60a971366180a0e7bec6e7da56d8f36aa21f) Thanks [@geekmidas](https://github.com/geekmidas)! - Support kysely 0.29.
|
|
38
|
-
|
|
39
|
-
kysely 0.29 moved `Migrator` and `FileMigrationProvider` from the root barrel
|
|
40
|
-
(`'kysely'`) to the `'kysely/migration'` subpath. `@geekmidas/testkit`'s
|
|
41
|
-
`PostgresKyselyMigrator` now imports `Migrator` from `'kysely/migration'` and
|
|
42
|
-
its kysely peer becomes `~0.29.4` — consumers must be on kysely 0.29+.
|
|
43
|
-
|
|
44
|
-
The library packages that only declare a kysely _peer_ (`db`, `audit`, `studio`,
|
|
45
|
-
`telescope`) don't touch the moved symbols, so their peer range is _widened_ to
|
|
46
|
-
`>=0.28.2 <0.30.0` — they now support both 0.28 and 0.29 (non-breaking).
|
|
47
|
-
|
|
48
|
-
`@geekmidas/cli`'s scaffolded `test/globalSetup.ts` template now imports
|
|
49
|
-
`FileMigrationProvider` from `'kysely/migration'` so generated projects work on
|
|
50
|
-
kysely 0.29.
|
|
51
|
-
|
|
52
|
-
## 2.0.1
|
|
53
|
-
|
|
54
|
-
### Patch Changes
|
|
55
|
-
|
|
56
|
-
- 🐛 [`d70c6c0`](https://github.com/geekmidas/toolbox/commit/d70c6c0aeb8a79da2473ac77dbd8255a4a2f5651) Thanks [@geekmidas](https://github.com/geekmidas)! - Fix `package.json` exports so TypeScript declarations resolve correctly under NodeNext/Bundler module resolution. Each subpath export now nests `types` inside its `import`/`require` condition, pointing at the `.d.mts` and `.d.cts` files that `tsdown` actually emits (previously the exports referenced non-existent `.d.ts` files, causing type-resolution failures for consumers). Both ESM (`.mjs`) and CJS (`.cjs`) runtime entry points are preserved. Additionally, `@geekmidas/ui` had `import` paths pointing at `.js` files that were never emitted — those are corrected to `.mjs`.
|
|
57
|
-
|
|
58
|
-
- Updated dependencies [[`d70c6c0`](https://github.com/geekmidas/toolbox/commit/d70c6c0aeb8a79da2473ac77dbd8255a4a2f5651)]:
|
|
59
|
-
- @geekmidas/cache@1.1.1
|
|
60
|
-
- @geekmidas/schema@1.0.2
|
|
61
|
-
|
|
62
|
-
## 2.0.0
|
|
63
|
-
|
|
64
|
-
### Patch Changes
|
|
65
|
-
|
|
66
|
-
- Updated dependencies [[`be4f7a9`](https://github.com/geekmidas/toolbox/commit/be4f7a9bd5de7f08adbca582916d6902e0c24de2)]:
|
|
67
|
-
- @geekmidas/cache@1.1.0
|
|
68
|
-
|
|
69
|
-
## 1.0.0
|
|
70
|
-
|
|
71
|
-
### Major Changes
|
|
72
|
-
|
|
73
|
-
- [`ff7b115`](https://github.com/geekmidas/toolbox/commit/ff7b11599f60f84ac6cdc73714c853ecf786b2e8) Thanks [@geekmidas](https://github.com/geekmidas)! - Version 1 Stable release
|
|
74
|
-
|
|
75
|
-
### Patch Changes
|
|
76
|
-
|
|
77
|
-
- Updated dependencies [[`ff7b115`](https://github.com/geekmidas/toolbox/commit/ff7b11599f60f84ac6cdc73714c853ecf786b2e8)]:
|
|
78
|
-
- @geekmidas/cache@1.0.0
|
|
79
|
-
- @geekmidas/schema@1.0.0
|