@bgord/bun 1.2.10 → 1.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bgord/bun",
3
- "version": "1.2.10",
3
+ "version": "1.3.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "author": "Bartosz Gordon",
@@ -21,15 +21,15 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "@biomejs/biome": "2.3.8",
24
- "@commitlint/cli": "20.1.0",
25
- "@commitlint/config-conventional": "20.0.0",
26
- "@types/bun": "1.3.3",
24
+ "@commitlint/cli": "20.2.0",
25
+ "@commitlint/config-conventional": "20.2.0",
26
+ "@types/bun": "1.3.4",
27
27
  "@types/lodash": "4.17.21",
28
28
  "@types/nodemailer": "7.0.4",
29
29
  "@types/yazl": "3.3.0",
30
30
  "cspell": "9.4.0",
31
- "knip": "5.71.0",
32
- "lefthook": "2.0.7",
31
+ "knip": "5.73.0",
32
+ "lefthook": "2.0.9",
33
33
  "only-allow": "1.2.2",
34
34
  "shellcheck": "4.1.0",
35
35
  "typescript": "5.9.3",
@@ -37,20 +37,20 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@axiomhq/winston": "1.3.1",
40
- "@bgord/tools": "1.1.16",
41
- "@hono/ua-blocker": "0.1.20",
42
- "better-auth": "1.4.5",
40
+ "@bgord/tools": "1.1.17",
41
+ "@hono/ua-blocker": "0.1.21",
42
+ "better-auth": "1.4.6",
43
43
  "croner": "9.1.0",
44
44
  "csv": "6.4.1",
45
45
  "hcaptcha": "0.2.0",
46
- "hono": "4.10.7",
47
- "isomorphic-dompurify": "2.33.0",
46
+ "hono": "4.10.8",
47
+ "isomorphic-dompurify": "2.34.0",
48
48
  "lodash": "4.17.21",
49
49
  "marked": "17.0.1",
50
50
  "node-cache": "5.1.2",
51
51
  "nodemailer": "7.0.11",
52
52
  "sharp": "0.34.5",
53
- "winston": "3.18.3",
53
+ "winston": "3.19.0",
54
54
  "yazl": "3.3.1"
55
55
  },
56
56
  "peerDependencies": {
package/readme.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Clone the repository
6
6
 
7
7
  ```
8
- git clone git@github.com:bgord/journal.git --recurse-submodules
8
+ git clone git@github.com:bgord/bgord-bun.git --recurse-submodules
9
9
  ```
10
10
 
11
11
  Install packages
@@ -233,6 +233,9 @@ src/
233
233
  ├── remote-file-storage-noop.adapter.ts
234
234
  ├── remote-file-storage.port.ts
235
235
  ├── safe-parse-body.service.ts
236
+ ├── secret-manager-noop.adapter.ts
237
+ ├── secret-manager.port.ts
238
+ ├── secret.vo.ts
236
239
  ├── setup.service.ts
237
240
  ├── shield-api-key.middleware.ts
238
241
  ├── shield-auth.middleware.ts
package/src/index.ts CHANGED
@@ -154,6 +154,9 @@ export * from "./remote-file-storage.port";
154
154
  export * from "./remote-file-storage-disk.adapter";
155
155
  export * from "./remote-file-storage-noop.adapter";
156
156
  export * from "./safe-parse-body.service";
157
+ export * from "./secret.vo";
158
+ export * from "./secret-manager.port";
159
+ export * from "./secret-manager-noop.adapter";
157
160
  export * from "./setup.service";
158
161
  export * from "./shield-api-key.middleware";
159
162
  export * from "./shield-auth.middleware";
@@ -0,0 +1,11 @@
1
+ import type * as tools from "@bgord/tools";
2
+ import type { Secret } from "./secret.vo";
3
+ import type { SecretManagerPort } from "./secret-manager.port";
4
+
5
+ export class SecretManagerNoopAdapter implements SecretManagerPort {
6
+ constructor(private readonly secrets: Record<tools.ObjectKeyType, string> = {}) {}
7
+
8
+ async get<T>(secret: Secret<T>): Promise<T> {
9
+ return secret.schema.parse(this.secrets[secret.key]);
10
+ }
11
+ }
@@ -0,0 +1,5 @@
1
+ import type { Secret } from "./secret.vo";
2
+
3
+ export interface SecretManagerPort {
4
+ get<T>(secret: Secret<T>): Promise<T>;
5
+ }
@@ -0,0 +1,7 @@
1
+ import type * as tools from "@bgord/tools";
2
+ import type { z } from "zod/v4";
3
+
4
+ export interface Secret<T> {
5
+ key: tools.ObjectKeyType;
6
+ schema: z.ZodType<T>;
7
+ }