@bgord/bun 1.21.7 → 1.21.9
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/alert-channel-composite.adapter.js +1 -1
- package/dist/alert-channel-composite.adapter.js.map +1 -1
- package/dist/cache-repository-redis.adapter.js.map +1 -1
- package/dist/command-envelope.d.ts +4 -4
- package/dist/correlation-id.vo.d.ts +1 -1
- package/dist/correlation-id.vo.d.ts.map +1 -1
- package/dist/crypto-aes-gcm.service.d.ts +2 -2
- package/dist/crypto-aes-gcm.service.d.ts.map +1 -1
- package/dist/crypto-aes-gcm.service.js +2 -2
- package/dist/crypto-aes-gcm.service.js.map +1 -1
- package/dist/crypto-key-provider-file.adapter.d.ts.map +1 -1
- package/dist/crypto-key-provider-file.adapter.js +4 -1
- package/dist/crypto-key-provider-file.adapter.js.map +1 -1
- package/dist/crypto-key-provider-memory.adapter.js.map +1 -1
- package/dist/encryption-iv.vo.d.ts +1 -1
- package/dist/encryption-iv.vo.d.ts.map +1 -1
- package/dist/encryption-key.vo.d.ts +1 -1
- package/dist/encryption-key.vo.d.ts.map +1 -1
- package/dist/event-envelope.d.ts +2 -2
- package/dist/healthcheck-hono.handler.d.ts +1 -67
- package/dist/healthcheck-hono.handler.d.ts.map +1 -1
- package/dist/healthcheck-hono.handler.js +2 -2
- package/dist/healthcheck-hono.handler.js.map +1 -1
- package/dist/id-provider-crypto.adapter.d.ts +1 -1
- package/dist/id-provider-crypto.adapter.d.ts.map +1 -1
- package/dist/id-provider-crypto.adapter.js +3 -1
- package/dist/id-provider-crypto.adapter.js.map +1 -1
- package/dist/job-envelope.d.ts +2 -2
- package/dist/job-registry.adapter.js.map +1 -1
- package/dist/languages.vo.js +1 -1
- package/dist/languages.vo.js.map +1 -1
- package/dist/liveness-hono.handler.d.ts +1 -3
- package/dist/liveness-hono.handler.d.ts.map +1 -1
- package/dist/liveness-hono.handler.js +2 -2
- package/dist/liveness-hono.handler.js.map +1 -1
- package/dist/message-bus-with-logger.adapter.d.ts.map +1 -1
- package/dist/message-bus-with-logger.adapter.js.map +1 -1
- package/dist/modules/history/events/HISTORY_CLEARED_EVENT.d.ts +3 -3
- package/dist/modules/history/events/HISTORY_POPULATED_EVENT.d.ts +8 -6
- package/dist/modules/history/events/HISTORY_POPULATED_EVENT.d.ts.map +1 -1
- package/dist/modules/history/value-objects/history-id.d.ts +3 -1
- package/dist/modules/history/value-objects/history-id.d.ts.map +1 -1
- package/dist/modules/history/value-objects/history-id.js +3 -1
- package/dist/modules/history/value-objects/history-id.js.map +1 -1
- package/dist/modules/history/value-objects/history-operation.d.ts +2 -1
- package/dist/modules/history/value-objects/history-operation.d.ts.map +1 -1
- package/dist/modules/history/value-objects/history-operation.js +3 -1
- package/dist/modules/history/value-objects/history-operation.js.map +1 -1
- package/dist/modules/history/value-objects/history-payload.d.ts +10 -4
- package/dist/modules/history/value-objects/history-payload.d.ts.map +1 -1
- package/dist/modules/history/value-objects/history-payload.js +6 -2
- package/dist/modules/history/value-objects/history-payload.js.map +1 -1
- package/dist/modules/history/value-objects/history-subject.d.ts +1 -1
- package/dist/modules/history/value-objects/history-subject.d.ts.map +1 -1
- package/dist/modules/history/value-objects/history-subject.js +3 -1
- package/dist/modules/history/value-objects/history-subject.js.map +1 -1
- package/dist/modules/history/value-objects/history.d.ts +14 -10
- package/dist/modules/history/value-objects/history.d.ts.map +1 -1
- package/dist/modules/preferences/commands/SET_USER_LANGUAGE_COMMAND.d.ts +3 -3
- package/dist/modules/preferences/events/USER_LANGUAGE_SET_EVENT.d.ts +3 -3
- package/dist/modules/system/events/HOUR_HAS_PASSED_EVENT.d.ts +2 -2
- package/dist/modules/system/events/MINUTE_HAS_PASSED_EVENT.d.ts +2 -2
- package/dist/modules/system/events/SECURITY_VIOLATION_DETECTED_EVENT.d.ts +3 -3
- package/dist/modules/system/jobs/SEND_EMAIL_JOB.d.ts +2 -2
- package/dist/readiness-hono.handler.d.ts +1 -4
- package/dist/readiness-hono.handler.d.ts.map +1 -1
- package/dist/readiness-hono.handler.js +2 -2
- package/dist/readiness-hono.handler.js.map +1 -1
- package/dist/request-context-hono.adapter.d.ts.map +1 -1
- package/dist/request-context-hono.adapter.js +10 -0
- package/dist/request-context-hono.adapter.js.map +1 -1
- package/dist/request-context.port.d.ts +6 -0
- package/dist/request-context.port.d.ts.map +1 -1
- package/dist/shield-maintenance-hono.strategy.js +1 -1
- package/dist/shield-maintenance-hono.strategy.js.map +1 -1
- package/dist/shield-security-hono.strategy.d.ts.map +1 -1
- package/dist/shield-security-hono.strategy.js +4 -4
- package/dist/shield-security-hono.strategy.js.map +1 -1
- package/dist/smtp-port.vo.d.ts +2 -2
- package/dist/smtp-port.vo.d.ts.map +1 -1
- package/dist/smtp-port.vo.js +2 -1
- package/dist/smtp-port.vo.js.map +1 -1
- package/dist/translations-hono.handler.js +1 -1
- package/dist/translations-hono.handler.js.map +1 -1
- package/dist/uuid.vo.d.ts +1 -1
- package/dist/uuid.vo.d.ts.map +1 -1
- package/dist/uuid.vo.js +1 -1
- package/dist/uuid.vo.js.map +1 -1
- package/package.json +10 -10
- package/src/alert-channel-composite.adapter.ts +1 -1
- package/src/cache-repository-redis.adapter.ts +1 -1
- package/src/crypto-aes-gcm.service.ts +8 -12
- package/src/crypto-key-provider-file.adapter.ts +4 -7
- package/src/crypto-key-provider-memory.adapter.ts +1 -1
- package/src/encryption-iv.vo.ts +1 -1
- package/src/encryption-key.vo.ts +1 -1
- package/src/healthcheck-hono.handler.ts +2 -2
- package/src/id-provider-crypto.adapter.ts +3 -2
- package/src/job-registry.adapter.ts +1 -1
- package/src/languages.vo.ts +1 -1
- package/src/liveness-hono.handler.ts +2 -2
- package/src/message-bus-with-logger.adapter.ts +2 -2
- package/src/modules/history/value-objects/history-id.ts +5 -1
- package/src/modules/history/value-objects/history-operation.ts +4 -0
- package/src/modules/history/value-objects/history-payload.ts +11 -1
- package/src/modules/history/value-objects/history-subject.ts +2 -0
- package/src/readiness-hono.handler.ts +2 -2
- package/src/request-context-hono.adapter.ts +9 -0
- package/src/request-context.port.ts +5 -0
- package/src/shield-maintenance-hono.strategy.ts +1 -1
- package/src/shield-security-hono.strategy.ts +4 -5
- package/src/smtp-port.vo.ts +2 -2
- package/src/translations-hono.handler.ts +1 -1
- package/src/uuid.vo.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-payload.js","sourceRoot":"","sources":["../../../../src/modules/history/value-objects/history-payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"history-payload.js","sourceRoot":"","sources":["../../../../src/modules/history/value-objects/history-payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAClC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;AACjC,0CAA0C;AAC1C,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAC1B,CAAC;AAIF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,eAAe,EAAE,yCAAyC;CAC3D,CAAC;AAEF,iCAAiC;AACjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CACxC,cAAc,EACd,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAChB,IAAI,CAAC;QACH,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,EAC7C,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC7C,0CAA0C;AAC1C,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAChC,CAAC"}
|
|
@@ -4,6 +4,6 @@ export declare const HistorySubjectError: {
|
|
|
4
4
|
Empty: string;
|
|
5
5
|
TooLong: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const HistorySubject: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 128, string>]>;
|
|
7
|
+
export declare const HistorySubject: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 128, string>, v.BrandAction<string, "HistorySubject">]>;
|
|
8
8
|
export type HistorySubjectType = v.InferOutput<typeof HistorySubject>;
|
|
9
9
|
//# sourceMappingURL=history-subject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-subject.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/value-objects/history-subject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,mBAAmB;IAC9B,IAAI;IACJ,KAAK;IACL,OAAO;CACR,CAAC;AAEF,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"history-subject.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/value-objects/history-subject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,mBAAmB;IAC9B,IAAI;IACJ,KAAK;IACL,OAAO;CACR,CAAC;AAEF,eAAO,MAAM,cAAc,4KAM1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -4,5 +4,7 @@ export const HistorySubjectError = {
|
|
|
4
4
|
Empty: "history.subject.empty",
|
|
5
5
|
TooLong: "history.subject.too.long",
|
|
6
6
|
};
|
|
7
|
-
export const HistorySubject = v.pipe(v.string(HistorySubjectError.Type), v.minLength(1, HistorySubjectError.Empty), v.maxLength(128, HistorySubjectError.TooLong)
|
|
7
|
+
export const HistorySubject = v.pipe(v.string(HistorySubjectError.Type), v.minLength(1, HistorySubjectError.Empty), v.maxLength(128, HistorySubjectError.TooLong),
|
|
8
|
+
// Stryker disable next-line StringLiteral
|
|
9
|
+
v.brand("HistorySubject"));
|
|
8
10
|
//# sourceMappingURL=history-subject.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-subject.js","sourceRoot":"","sources":["../../../../src/modules/history/value-objects/history-subject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,uBAAuB;IAC9B,OAAO,EAAE,0BAA0B;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAClC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAClC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,EACzC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,mBAAmB,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"history-subject.js","sourceRoot":"","sources":["../../../../src/modules/history/value-objects/history-subject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,uBAAuB;IAC9B,OAAO,EAAE,0BAA0B;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAClC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAClC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,EACzC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,mBAAmB,CAAC,OAAO,CAAC;AAC7C,0CAA0C;AAC1C,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAC1B,CAAC"}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
export declare const History: v.ObjectSchema<{
|
|
3
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
4
|
-
readonly operation: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 128, string>]>;
|
|
5
|
-
readonly payload: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined
|
|
6
|
-
|
|
3
|
+
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>, v.BrandAction<string & v.Brand<"UUID">, "HistoryId">]>;
|
|
4
|
+
readonly operation: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 128, string>, v.BrandAction<string, "HistoryOperation">]>;
|
|
5
|
+
readonly payload: v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.BrandAction<{
|
|
6
|
+
[x: string]: unknown;
|
|
7
|
+
}, "HistoryPayload">]>;
|
|
8
|
+
readonly subject: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 128, string>, v.BrandAction<string, "HistorySubject">]>;
|
|
7
9
|
readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
|
|
8
10
|
}, undefined>;
|
|
9
11
|
export type HistoryType = v.InferOutput<typeof History>;
|
|
10
12
|
export declare const HistoryParsed: v.ObjectSchema<{
|
|
11
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
12
|
-
readonly operation: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 128, string>]>;
|
|
13
|
-
readonly payload: v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.
|
|
13
|
+
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>, v.BrandAction<string & v.Brand<"UUID">, "HistoryId">]>;
|
|
14
|
+
readonly operation: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 128, string>, v.BrandAction<string, "HistoryOperation">]>;
|
|
15
|
+
readonly payload: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.BrandAction<{
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
}, "HistoryPayload">]>, v.CheckAction<{
|
|
14
18
|
[x: string]: unknown;
|
|
15
|
-
}
|
|
19
|
+
} & v.Brand<"HistoryPayload">, string>, v.TransformAction<{
|
|
16
20
|
[x: string]: unknown;
|
|
17
|
-
},
|
|
18
|
-
readonly subject: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 128, string>]>;
|
|
21
|
+
} & v.Brand<"HistoryPayload">, string>, v.BrandAction<string, "HistoryPayloadParsed">]>;
|
|
22
|
+
readonly subject: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 128, string>, v.BrandAction<string, "HistorySubject">]>;
|
|
19
23
|
readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
|
|
20
24
|
}, undefined>;
|
|
21
25
|
export type HistoryParsedType = v.InferOutput<typeof HistoryParsed>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/value-objects/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/value-objects/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,eAAO,MAAM,OAAO;;;;;;;;aAMlB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,OAAO,CAAC,CAAC;AAExD,eAAO,MAAM,aAAa;;;;;;;;;;;;aAMxB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
export declare const SET_USER_LANGUAGE_COMMAND = "SET_USER_LANGUAGE_COMMAND";
|
|
3
3
|
export declare const SetUserLanguageCommand: v.ObjectSchema<{
|
|
4
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
5
|
-
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string
|
|
4
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>;
|
|
5
|
+
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>, v.BrandAction<string & v.Brand<"UUID">, "CorrelationId">]>;
|
|
6
6
|
readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
|
|
7
7
|
readonly name: v.LiteralSchema<"SET_USER_LANGUAGE_COMMAND", undefined>;
|
|
8
8
|
readonly payload: v.ObjectSchema<{
|
|
9
9
|
readonly language: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>]>;
|
|
10
|
-
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
10
|
+
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>;
|
|
11
11
|
}, undefined>;
|
|
12
12
|
}, undefined>;
|
|
13
13
|
export type SetUserLanguageCommandType = v.InferOutput<typeof SetUserLanguageCommand>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
export declare const USER_LANGUAGE_SET_EVENT = "USER_LANGUAGE_SET_EVENT";
|
|
3
3
|
export declare const UserLanguageSetEvent: v.ObjectSchema<{
|
|
4
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
5
|
-
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string
|
|
4
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>;
|
|
5
|
+
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>, v.BrandAction<string & v.Brand<"UUID">, "CorrelationId">]>;
|
|
6
6
|
readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
|
|
7
7
|
readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
|
|
8
8
|
readonly version: v.LiteralSchema<1, undefined>;
|
|
@@ -10,7 +10,7 @@ export declare const UserLanguageSetEvent: v.ObjectSchema<{
|
|
|
10
10
|
readonly commit: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "CommitShaValue">]>;
|
|
11
11
|
readonly name: v.LiteralSchema<"USER_LANGUAGE_SET_EVENT", undefined>;
|
|
12
12
|
readonly payload: v.ObjectSchema<{
|
|
13
|
-
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
13
|
+
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>;
|
|
14
14
|
readonly language: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>]>;
|
|
15
15
|
}, undefined>;
|
|
16
16
|
}, undefined>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
export declare const HOUR_HAS_PASSED_EVENT = "HOUR_HAS_PASSED_EVENT";
|
|
3
3
|
export declare const HourHasPassedEvent: v.ObjectSchema<{
|
|
4
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
5
|
-
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string
|
|
4
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>;
|
|
5
|
+
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>, v.BrandAction<string & v.Brand<"UUID">, "CorrelationId">]>;
|
|
6
6
|
readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
|
|
7
7
|
readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
|
|
8
8
|
readonly version: v.LiteralSchema<1, undefined>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
export declare const MINUTE_HAS_PASSED_EVENT = "MINUTE_HAS_PASSED_EVENT";
|
|
3
3
|
export declare const MinuteHasPassedEvent: v.ObjectSchema<{
|
|
4
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
5
|
-
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string
|
|
4
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>;
|
|
5
|
+
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>, v.BrandAction<string & v.Brand<"UUID">, "CorrelationId">]>;
|
|
6
6
|
readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
|
|
7
7
|
readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
|
|
8
8
|
readonly version: v.LiteralSchema<1, undefined>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
export declare const SECURITY_VIOLATION_DETECTED_EVENT = "SECURITY_VIOLATION_DETECTED_EVENT";
|
|
3
3
|
export declare const SecurityViolationDetectedEvent: v.ObjectSchema<{
|
|
4
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
5
|
-
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string
|
|
4
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>;
|
|
5
|
+
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>, v.BrandAction<string & v.Brand<"UUID">, "CorrelationId">]>;
|
|
6
6
|
readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
|
|
7
7
|
readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
|
|
8
8
|
readonly version: v.LiteralSchema<1, undefined>;
|
|
@@ -15,7 +15,7 @@ export declare const SecurityViolationDetectedEvent: v.ObjectSchema<{
|
|
|
15
15
|
readonly ip: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<string>, v.IpAction<string, string>, v.BrandAction<string, "ClientIp">]>, undefined>;
|
|
16
16
|
readonly ua: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "ClientUserAgent">]>, undefined>;
|
|
17
17
|
}, undefined>;
|
|
18
|
-
readonly userId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, undefined>;
|
|
18
|
+
readonly userId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>, undefined>;
|
|
19
19
|
readonly countermeasure: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "SecurityCountermeasureName">]>;
|
|
20
20
|
readonly action: v.StringSchema<undefined>;
|
|
21
21
|
}, undefined>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
export declare const SEND_EMAIL_JOB = "SEND_EMAIL_JOB";
|
|
3
3
|
export declare const SendEmailJobSchema: v.ObjectSchema<{
|
|
4
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
5
|
-
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string
|
|
4
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>;
|
|
5
|
+
readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>, v.BrandAction<string & v.Brand<"UUID">, "CorrelationId">]>;
|
|
6
6
|
readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
|
|
7
7
|
readonly revision: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.IntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "RevisionValue">]>;
|
|
8
8
|
readonly name: v.LiteralSchema<"SEND_EMAIL_JOB", undefined>;
|
|
@@ -3,9 +3,6 @@ import { type ReadinessConfig } from "./readiness.handler";
|
|
|
3
3
|
export declare class ReadinessHonoHandler implements HandlerHonoPort {
|
|
4
4
|
private readonly handler;
|
|
5
5
|
constructor(config: ReadinessConfig);
|
|
6
|
-
handle(): [import("hono/types").H<import("hono").Env, string, {}, Response
|
|
7
|
-
label: import("./prerequisite.vo").PrerequisiteLabelType;
|
|
8
|
-
outcome: import("./prerequisite-verifier.port").PrerequisiteVerificationResult;
|
|
9
|
-
}[], import("./readiness.handler").ReadinessStatusCode, "json">>];
|
|
6
|
+
handle(): [import("hono/types").H<import("hono").Env, string, {}, Response>];
|
|
10
7
|
}
|
|
11
8
|
//# sourceMappingURL=readiness-hono.handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readiness-hono.handler.d.ts","sourceRoot":"","sources":["../src/readiness-hono.handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,qBAAqB,CAAC;AAI7E,qBAAa,oBAAqB,YAAW,eAAe;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAE3C,YAAY,MAAM,EAAE,eAAe,EAElC;IAED,MAAM
|
|
1
|
+
{"version":3,"file":"readiness-hono.handler.d.ts","sourceRoot":"","sources":["../src/readiness-hono.handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,qBAAqB,CAAC;AAI7E,qBAAa,oBAAqB,YAAW,eAAe;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAE3C,YAAY,MAAM,EAAE,eAAe,EAElC;IAED,MAAM,uEAML;CACF"}
|
|
@@ -7,9 +7,9 @@ export class ReadinessHonoHandler {
|
|
|
7
7
|
this.handler = new ReadinessHandler(config);
|
|
8
8
|
}
|
|
9
9
|
handle() {
|
|
10
|
-
return factory.createHandlers(async (
|
|
10
|
+
return factory.createHandlers(async () => {
|
|
11
11
|
const result = await this.handler.check();
|
|
12
|
-
return
|
|
12
|
+
return Response.json(result.details, { status: result.code, headers: result.headers });
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readiness-hono.handler.js","sourceRoot":"","sources":["../src/readiness-hono.handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAwB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;AAEhC,MAAM,OAAO,oBAAoB;IACd,OAAO,CAAmB;IAE3C,YAAY,MAAuB;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM;QACJ,OAAO,OAAO,CAAC,cAAc,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"readiness-hono.handler.js","sourceRoot":"","sources":["../src/readiness-hono.handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAwB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;AAEhC,MAAM,OAAO,oBAAoB;IACd,OAAO,CAAmB;IAE3C,YAAY,MAAuB;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM;QACJ,OAAO,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,EAAE;YACvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YAE1C,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QACzF,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-context-hono.adapter.d.ts","sourceRoot":"","sources":["../src/request-context-hono.adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"request-context-hono.adapter.d.ts","sourceRoot":"","sources":["../src/request-context-hono.adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,qBAAa,yBAA0B,YAAW,cAAc;IAC9D,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAC9C,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IAElD,YAAY,OAAO,EAAE,OAAO,EA8D3B;CACF"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import * as tools from "@bgord/tools";
|
|
3
3
|
import { getConnInfo } from "hono/bun";
|
|
4
4
|
import { getCookie } from "hono/cookie";
|
|
5
|
+
import { HTTPException } from "hono/http-exception";
|
|
6
|
+
import { ShieldAuthStrategyError } from "./shield-auth.strategy";
|
|
5
7
|
export class RequestContextHonoAdapter {
|
|
6
8
|
request;
|
|
7
9
|
identity;
|
|
@@ -47,6 +49,14 @@ export class RequestContextHonoAdapter {
|
|
|
47
49
|
};
|
|
48
50
|
this.identity = {
|
|
49
51
|
userId: () => context.get("user")?.id,
|
|
52
|
+
authenticatedUserId: () => {
|
|
53
|
+
const user = context.get("user");
|
|
54
|
+
if (user === undefined)
|
|
55
|
+
throw new Error(ShieldAuthStrategyError.NotAttached);
|
|
56
|
+
if (user === null)
|
|
57
|
+
throw new HTTPException(401, { message: ShieldAuthStrategyError.Rejected });
|
|
58
|
+
return user.id;
|
|
59
|
+
},
|
|
50
60
|
ip: () => context.req.header("x-real-ip") ||
|
|
51
61
|
context.req.header("x-forwarded-for")?.split(",")[0]?.trim() ||
|
|
52
62
|
getConnInfo(context).remote.address,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-context-hono.adapter.js","sourceRoot":"","sources":["../src/request-context-hono.adapter.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"request-context-hono.adapter.js","sourceRoot":"","sources":["../src/request-context-hono.adapter.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CA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G,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE;gBAC5D,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO;YACrC,QAAQ,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO;YACnD,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC;SAC3C,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG;YAChB,QAAQ,EAAE;gBACR,YAAY,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACxE,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;aAC7D;YACD,cAAc,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;YACnD,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;SACxC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -19,6 +19,7 @@ export interface RequestContext {
|
|
|
19
19
|
};
|
|
20
20
|
readonly identity: {
|
|
21
21
|
userId(): UUIDType | undefined;
|
|
22
|
+
authenticatedUserId(): UUIDType;
|
|
22
23
|
ip(): string | undefined;
|
|
23
24
|
remoteIp(): string | undefined;
|
|
24
25
|
ua(): string | undefined;
|
|
@@ -107,6 +108,11 @@ export interface HasIdentityUserId {
|
|
|
107
108
|
userId(): UUIDType | undefined;
|
|
108
109
|
};
|
|
109
110
|
}
|
|
111
|
+
export interface HasIdentityAuthenticatedUserId {
|
|
112
|
+
readonly identity: {
|
|
113
|
+
authenticatedUserId(): UUIDType;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
110
116
|
export interface HasIdentityIp {
|
|
111
117
|
readonly identity: {
|
|
112
118
|
ip(): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-context.port.d.ts","sourceRoot":"","sources":["../src/request-context.port.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,GAAG,IAAI,MAAM,CAAC;QACd,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;QACzC,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;QACjD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;QACxC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;QACzC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACzC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;QACxB,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,EAAE,MAAM,OAAO,CAAC;QACvB,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC7C,CAAC;IAEF,QAAQ,CAAC,QAAQ,EAAE;QACjB,MAAM,IAAI,QAAQ,GAAG,SAAS,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,KAAK,CAAC,QAAQ,CAAA;KAAE,CAAC;CAC3D;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,UAAU,EAAE;QAAE,QAAQ,IAAI,KAAK,CAAC,YAAY,CAAA;KAAE,CAAC;CACzD"}
|
|
@@ -13,7 +13,7 @@ export class ShieldMaintenanceHonoStrategy {
|
|
|
13
13
|
const maintenance = await this.strategy.evaluate();
|
|
14
14
|
if (!maintenance.enabled)
|
|
15
15
|
return next();
|
|
16
|
-
return
|
|
16
|
+
return Response.json(maintenance.body, { status: maintenance.code, headers: maintenance.headers });
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shield-maintenance-hono.strategy.js","sourceRoot":"","sources":["../src/shield-maintenance-hono.strategy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAgC,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAExG,MAAM,OAAO,6BAA6B;IACvB,QAAQ,CAA4B;IAErD,YAAY,MAAgC;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,MAAM;QACJ,OAAO,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;YACvB,MAAM,OAAO,GAAG,IAAI,yBAAyB,CAAC,CAAC,CAAC,CAAC;YAEjD,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;gBAAE,OAAO,IAAI,EAAE,CAAC;YAErD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAEnD,IAAI,CAAC,WAAW,CAAC,OAAO;gBAAE,OAAO,IAAI,EAAE,CAAC;YAExC,OAAO,
|
|
1
|
+
{"version":3,"file":"shield-maintenance-hono.strategy.js","sourceRoot":"","sources":["../src/shield-maintenance-hono.strategy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAgC,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAExG,MAAM,OAAO,6BAA6B;IACvB,QAAQ,CAA4B;IAErD,YAAY,MAAgC;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,MAAM;QACJ,OAAO,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;YACvB,MAAM,OAAO,GAAG,IAAI,yBAAyB,CAAC,CAAC,CAAC,CAAC;YAEjD,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;gBAAE,OAAO,IAAI,EAAE,CAAC;YAErD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAEnD,IAAI,CAAC,WAAW,CAAC,OAAO;gBAAE,OAAO,IAAI,EAAE,CAAC;YAExC,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACrG,CAAC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shield-security-hono.strategy.d.ts","sourceRoot":"","sources":["../src/shield-security-hono.strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"shield-security-hono.strategy.d.ts","sourceRoot":"","sources":["../src/shield-security-hono.strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,KAAK,YAAY,GAAG;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,CAAC;AAE7C,eAAO,MAAM,+BAA+B;IAC1C,SAAS;CACV,CAAC;AAEF,qBAAa,0BAA2B,YAAW,kBAAkB;IAKjE,OAAO,CAAC,QAAQ,CAAC,IAAI;IAJvB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAElD,YACE,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,EACtB,IAAI,EAAE,YAAY,EAGpC;IAED,MAAM,IAAI,iBAAiB,CAoC1B;CACF"}
|
|
@@ -20,18 +20,18 @@ export class ShieldSecurityHonoStrategy {
|
|
|
20
20
|
case "allow":
|
|
21
21
|
return next();
|
|
22
22
|
case "deny":
|
|
23
|
-
return
|
|
23
|
+
return new Response(action.reason, { status: action.response.status });
|
|
24
24
|
case "mirage":
|
|
25
|
-
return
|
|
25
|
+
return Response.json({}, { status: action.response.status });
|
|
26
26
|
case "delay": {
|
|
27
27
|
await this.deps.Sleeper.wait(action.duration);
|
|
28
28
|
switch (action.after.kind) {
|
|
29
29
|
case "allow":
|
|
30
30
|
return next();
|
|
31
31
|
case "deny":
|
|
32
|
-
return
|
|
32
|
+
return new Response(action.after.reason, { status: action.after.response.status });
|
|
33
33
|
case "mirage":
|
|
34
|
-
return
|
|
34
|
+
return Response.json({}, { status: action.after.response.status });
|
|
35
35
|
default:
|
|
36
36
|
throw new Error(ShieldSecurityHonoStrategyError.Unhandled);
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shield-security-hono.strategy.js","sourceRoot":"","sources":["../src/shield-security-hono.strategy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shield-security-hono.strategy.js","sourceRoot":"","sources":["../src/shield-security-hono.strateg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KAAK,OAAO;4BACV,OAAO,IAAI,EAAE,CAAC;wBAEhB,KAAK,MAAM;4BACT,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;wBAErF,KAAK,QAAQ;4BACX,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;wBAErE;4BACE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC;oBAC/D,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;CACF"}
|
package/dist/smtp-port.vo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const SmtpPort: v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<any, number>, v.NumberSchema<"port.type">, v.IntegerAction<number, "port.type">, v.MinValueAction<number, 0, "port.invalid">, v.MaxValueAction<number, 99999, "port.invalid">, v.BrandAction<number, "Port">]>;
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
export declare const SmtpPort: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<any, number>, v.NumberSchema<"port.type">, v.IntegerAction<number, "port.type">, v.MinValueAction<number, 0, "port.invalid">, v.MaxValueAction<number, 99999, "port.invalid">, v.BrandAction<number, "Port">]>, v.BrandAction<number & v.Brand<"Port">, "SmtpPort">]>;
|
|
3
3
|
export type SmtpPortType = v.InferOutput<typeof SmtpPort>;
|
|
4
4
|
//# sourceMappingURL=smtp-port.vo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smtp-port.vo.d.ts","sourceRoot":"","sources":["../src/smtp-port.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"smtp-port.vo.d.ts","sourceRoot":"","sources":["../src/smtp-port.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,eAAO,MAAM,QAAQ,gWAAoC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
package/dist/smtp-port.vo.js
CHANGED
package/dist/smtp-port.vo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smtp-port.vo.js","sourceRoot":"","sources":["../src/smtp-port.vo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"smtp-port.vo.js","sourceRoot":"","sources":["../src/smtp-port.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations-hono.handler.js","sourceRoot":"","sources":["../src/translations-hono.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;AAEhC,MAAM,OAAO,uBAAuB;IACjB,OAAO,CAAyB;IAEjD,YAAY,MAAoB,EAAE,IAAkB;QAClD,IAAI,CAAC,OAAO,GAAG,IAAI,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,MAAM;QACJ,OAAO,OAAO,CAAC,cAAc,CAAqD,KAAK,EAAE,CAAC,EAAE,EAAE;YAC5F,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAEpD,OAAO,
|
|
1
|
+
{"version":3,"file":"translations-hono.handler.js","sourceRoot":"","sources":["../src/translations-hono.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;AAEhC,MAAM,OAAO,uBAAuB;IACjB,OAAO,CAAyB;IAEjD,YAAY,MAAoB,EAAE,IAAkB;QAClD,IAAI,CAAC,OAAO,GAAG,IAAI,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,MAAM;QACJ,OAAO,OAAO,CAAC,cAAc,CAAqD,KAAK,EAAE,CAAC,EAAE,EAAE;YAC5F,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAEpD,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/uuid.vo.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import * as v from "valibot";
|
|
|
2
2
|
export declare const UUIDError: {
|
|
3
3
|
readonly Type: "uuid.type";
|
|
4
4
|
};
|
|
5
|
-
export declare const UUID: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
|
|
5
|
+
export declare const UUID: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">, v.BrandAction<string, "UUID">]>;
|
|
6
6
|
export type UUIDType = v.InferOutput<typeof UUID>;
|
|
7
7
|
//# sourceMappingURL=uuid.vo.d.ts.map
|
package/dist/uuid.vo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.vo.d.ts","sourceRoot":"","sources":["../src/uuid.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,SAAS;aAAK,IAAI,EAAE,WAAW;CAAW,CAAC;AAExD,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"uuid.vo.d.ts","sourceRoot":"","sources":["../src/uuid.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,SAAS;aAAK,IAAI,EAAE,WAAW;CAAW,CAAC;AAExD,eAAO,MAAM,IAAI,4HAA4E,CAAC;AAE9F,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,CAAC"}
|
package/dist/uuid.vo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
export const UUIDError = { Type: "uuid.type" };
|
|
3
|
-
export const UUID = v.pipe(v.string(UUIDError.Type), v.uuid(UUIDError.Type));
|
|
3
|
+
export const UUID = v.pipe(v.string(UUIDError.Type), v.uuid(UUIDError.Type), v.brand("UUID"));
|
|
4
4
|
//# sourceMappingURL=uuid.vo.js.map
|
package/dist/uuid.vo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.vo.js","sourceRoot":"","sources":["../src/uuid.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,WAAW,EAAW,CAAC;AAExD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"uuid.vo.js","sourceRoot":"","sources":["../src/uuid.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,WAAW,EAAW,CAAC;AAExD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bgord/bun",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bartosz Gordon",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"build": "bash scripts/package-build.sh"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@biomejs/biome": "2.5.
|
|
23
|
+
"@biomejs/biome": "2.5.8",
|
|
24
24
|
"@standard-schema/spec": "1.1.0",
|
|
25
|
-
"@stryker-mutator/core": "
|
|
26
|
-
"@stryker-mutator/typescript-checker": "
|
|
25
|
+
"@stryker-mutator/core": "10.0.0",
|
|
26
|
+
"@stryker-mutator/typescript-checker": "10.0.0",
|
|
27
27
|
"@types/bun": "1.3.14",
|
|
28
28
|
"@types/nodemailer": "8.0.1",
|
|
29
29
|
"@types/yazl": "3.3.1",
|
|
30
|
-
"better-auth": "1.6.
|
|
30
|
+
"better-auth": "1.6.28",
|
|
31
31
|
"cspell": "10.0.1",
|
|
32
32
|
"csv": "6.6.3",
|
|
33
|
-
"fallow": "3.
|
|
33
|
+
"fallow": "3.16.0",
|
|
34
34
|
"lefthook": "2.1.10",
|
|
35
|
-
"lockfile-lint": "5.0.
|
|
35
|
+
"lockfile-lint": "5.0.1",
|
|
36
36
|
"nodemailer": "9.0.5",
|
|
37
37
|
"publint": "0.3.23",
|
|
38
38
|
"shellcheck": "4.1.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"yazl": "3.3.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@bgord/tools": "1.6.
|
|
43
|
+
"@bgord/tools": "1.6.7",
|
|
44
44
|
"emittery": "2.0.0",
|
|
45
|
-
"hono": "4.13.
|
|
45
|
+
"hono": "4.13.2",
|
|
46
46
|
"node-cache": "5.1.2"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"better-auth": "1.6.
|
|
49
|
+
"better-auth": "1.6.28",
|
|
50
50
|
"csv": "6.6.3",
|
|
51
51
|
"nodemailer": "9.0.5",
|
|
52
52
|
"yazl": "3.3.1"
|
|
@@ -18,7 +18,7 @@ export class AlertChannelCompositeAdapter implements AlertChannelPort {
|
|
|
18
18
|
|
|
19
19
|
if (results.some((result) => result.status === "fulfilled")) return;
|
|
20
20
|
|
|
21
|
-
const reasons = results.
|
|
21
|
+
const reasons = results.flatMap((result) => (result.status === "rejected" ? [result.reason] : []));
|
|
22
22
|
|
|
23
23
|
throw new AggregateError(reasons, AlertChannelCompositeError.AllFailed);
|
|
24
24
|
}
|
|
@@ -12,7 +12,7 @@ export class CacheRepositoryRedisAdapter implements CacheRepositoryPort {
|
|
|
12
12
|
async get<T>(subject: Hash): Promise<T | null> {
|
|
13
13
|
const value = await this.client.get(subject.get());
|
|
14
14
|
if (value === null) return null;
|
|
15
|
-
return JSON.parse(value)
|
|
15
|
+
return JSON.parse(value);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
async set<T>(subject: Hash, value: T): Promise<void> {
|
|
@@ -6,12 +6,12 @@ export const CryptoAesGcmError = { InvalidPayload: "aes.gcm.crypto.invalid.paylo
|
|
|
6
6
|
export class CryptoAesGcm {
|
|
7
7
|
static readonly ALGORITHM = "AES-GCM";
|
|
8
8
|
|
|
9
|
-
static async encrypt(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
);
|
|
9
|
+
static async encrypt(
|
|
10
|
+
key: CryptoKey,
|
|
11
|
+
plaintext: ArrayBuffer,
|
|
12
|
+
iv: Uint8Array<ArrayBuffer>,
|
|
13
|
+
): Promise<Uint8Array> {
|
|
14
|
+
const encrypted = await crypto.subtle.encrypt({ name: CryptoAesGcm.ALGORITHM, iv }, key, plaintext);
|
|
15
15
|
|
|
16
16
|
const ciphertext = new Uint8Array(encrypted);
|
|
17
17
|
const output = new Uint8Array(iv.length + ciphertext.length);
|
|
@@ -22,16 +22,12 @@ export class CryptoAesGcm {
|
|
|
22
22
|
return output;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
static async decrypt(key: CryptoKey, payload: Uint8Array): Promise<ArrayBuffer> {
|
|
25
|
+
static async decrypt(key: CryptoKey, payload: Uint8Array<ArrayBuffer>): Promise<ArrayBuffer> {
|
|
26
26
|
if (payload.length < EncryptionIV.LENGTH + 1) throw new Error(CryptoAesGcmError.InvalidPayload);
|
|
27
27
|
|
|
28
28
|
const iv = payload.subarray(0, EncryptionIV.LENGTH);
|
|
29
29
|
const ciphertext = payload.subarray(EncryptionIV.LENGTH);
|
|
30
30
|
|
|
31
|
-
return crypto.subtle.decrypt(
|
|
32
|
-
{ name: CryptoAesGcm.ALGORITHM, iv: iv as BufferSource },
|
|
33
|
-
key,
|
|
34
|
-
ciphertext as BufferSource,
|
|
35
|
-
);
|
|
31
|
+
return crypto.subtle.decrypt({ name: CryptoAesGcm.ALGORITHM, iv }, key, ciphertext);
|
|
36
32
|
}
|
|
37
33
|
}
|
|
@@ -25,12 +25,9 @@ export class CryptoKeyProviderFileAdapter implements CryptoKeyProviderPort {
|
|
|
25
25
|
|
|
26
26
|
const encryptionKey = EncryptionKey.fromString(content.trim());
|
|
27
27
|
|
|
28
|
-
return crypto.subtle.importKey(
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
false,
|
|
33
|
-
["encrypt", "decrypt"],
|
|
34
|
-
);
|
|
28
|
+
return crypto.subtle.importKey("raw", encryptionKey.toBytes(), { name: "AES-GCM" }, false, [
|
|
29
|
+
"encrypt",
|
|
30
|
+
"decrypt",
|
|
31
|
+
]);
|
|
35
32
|
}
|
|
36
33
|
}
|
|
@@ -8,7 +8,7 @@ export class CryptoKeyProviderMemoryAdapter implements CryptoKeyProviderPort {
|
|
|
8
8
|
async get(): Promise<CryptoKey> {
|
|
9
9
|
return crypto.subtle.importKey(
|
|
10
10
|
"raw",
|
|
11
|
-
EncryptionKey.fromString(this.ENCRYPTION_KEY_VALUE).toBytes()
|
|
11
|
+
EncryptionKey.fromString(this.ENCRYPTION_KEY_VALUE).toBytes(),
|
|
12
12
|
{ name: "AES-GCM" },
|
|
13
13
|
false,
|
|
14
14
|
["encrypt", "decrypt"],
|