@bgord/bun 1.2.9 → 1.3.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.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/secret-manager-noop.adapter.d.ts +9 -0
- package/dist/secret-manager-noop.adapter.d.ts.map +1 -0
- package/dist/secret-manager-noop.adapter.js +10 -0
- package/dist/secret-manager-noop.adapter.js.map +1 -0
- package/dist/secret-manager.port.d.ts +5 -0
- package/dist/secret-manager.port.d.ts.map +1 -0
- package/dist/secret-manager.port.js +2 -0
- package/dist/secret-manager.port.js.map +1 -0
- package/dist/secret.vo.d.ts +7 -0
- package/dist/secret.vo.d.ts.map +1 -0
- package/dist/secret.vo.js +2 -0
- package/dist/secret.vo.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/readme.md +3 -1
- package/src/index.ts +4 -1
- package/src/secret-manager-noop.adapter.ts +11 -0
- package/src/secret-manager.port.ts +5 -0
- package/src/secret.vo.ts +7 -0
- package/dist/markdown-generator-marked.adapter.d.ts +0 -7
- package/dist/markdown-generator-marked.adapter.d.ts.map +0 -1
- package/dist/markdown-generator-marked.adapter.js +0 -12
- package/dist/markdown-generator-marked.adapter.js.map +0 -1
- package/src/markdown-generator-marked.adapter.ts +0 -15
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -151,7 +151,6 @@ src/
|
|
|
151
151
|
├── mailer-smtp.adapter.ts
|
|
152
152
|
├── mailer.port.ts
|
|
153
153
|
├── mailer.vo.ts
|
|
154
|
-
├── markdown-generator-marked.adapter.ts
|
|
155
154
|
├── markdown-generator-noop.adapter.ts
|
|
156
155
|
├── markdown-generator.port.ts
|
|
157
156
|
├── memory-consumption.service.ts
|
|
@@ -234,6 +233,9 @@ src/
|
|
|
234
233
|
├── remote-file-storage-noop.adapter.ts
|
|
235
234
|
├── remote-file-storage.port.ts
|
|
236
235
|
├── safe-parse-body.service.ts
|
|
236
|
+
├── secret-manager-noop.adapter.ts
|
|
237
|
+
├── secret-manager.port.ts
|
|
238
|
+
├── secret.vo.ts
|
|
237
239
|
├── setup.service.ts
|
|
238
240
|
├── shield-api-key.middleware.ts
|
|
239
241
|
├── shield-auth.middleware.ts
|
package/src/index.ts
CHANGED
|
@@ -128,7 +128,7 @@ export * from "./mailer-noop.adapter";
|
|
|
128
128
|
export * from "./mailer-smtp.adapter";
|
|
129
129
|
export * from "./mailer-smtp-with-logger.adapter";
|
|
130
130
|
export * from "./markdown-generator.port";
|
|
131
|
-
export * from "./markdown-generator-marked.adapter";
|
|
131
|
+
// export * from "./markdown-generator-marked.adapter"; # release candidate
|
|
132
132
|
export * from "./markdown-generator-noop.adapter";
|
|
133
133
|
export * from "./memory-consumption.service";
|
|
134
134
|
export * as History from "./modules/history";
|
|
@@ -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
|
+
}
|
package/src/secret.vo.ts
ADDED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { MarkdownGeneratorPort } from "./markdown-generator.port";
|
|
2
|
-
export declare class MarkdownGeneratorMarkedAdapter implements MarkdownGeneratorPort {
|
|
3
|
-
private readonly instance;
|
|
4
|
-
constructor();
|
|
5
|
-
generate(content: string): Promise<string>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=markdown-generator-marked.adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-generator-marked.adapter.d.ts","sourceRoot":"","sources":["../src/markdown-generator-marked.adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,qBAAa,8BAA+B,YAAW,qBAAqB;IAC1E,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;;IAM5B,QAAQ,CAAC,OAAO,EAAE,MAAM;CAG/B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import DOMPurify from "isomorphic-dompurify";
|
|
2
|
-
import { Marked } from "marked";
|
|
3
|
-
export class MarkdownGeneratorMarkedAdapter {
|
|
4
|
-
instance;
|
|
5
|
-
constructor() {
|
|
6
|
-
this.instance = new Marked();
|
|
7
|
-
}
|
|
8
|
-
async generate(content) {
|
|
9
|
-
return DOMPurify.sanitize(await this.instance.parse(content));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=markdown-generator-marked.adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-generator-marked.adapter.js","sourceRoot":"","sources":["../src/markdown-generator-marked.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,MAAM,OAAO,8BAA8B;IACxB,QAAQ,CAAS;IAElC;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC5B,OAAO,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,CAAC;CACF"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import DOMPurify from "isomorphic-dompurify";
|
|
2
|
-
import { Marked } from "marked";
|
|
3
|
-
import type { MarkdownGeneratorPort } from "./markdown-generator.port";
|
|
4
|
-
|
|
5
|
-
export class MarkdownGeneratorMarkedAdapter implements MarkdownGeneratorPort {
|
|
6
|
-
private readonly instance: Marked;
|
|
7
|
-
|
|
8
|
-
constructor() {
|
|
9
|
-
this.instance = new Marked();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
async generate(content: string) {
|
|
13
|
-
return DOMPurify.sanitize(await this.instance.parse(content));
|
|
14
|
-
}
|
|
15
|
-
}
|