@bgord/bun 1.2.4 → 1.2.6
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/better-auth-logger.service.d.ts +5 -2
- package/dist/better-auth-logger.service.d.ts.map +1 -1
- package/dist/better-auth-logger.service.js +6 -6
- package/dist/better-auth-logger.service.js.map +1 -1
- package/dist/command-logger.service.d.ts +6 -2
- package/dist/command-logger.service.d.ts.map +1 -1
- package/dist/command-logger.service.js +4 -4
- package/dist/command-logger.service.js.map +1 -1
- package/dist/encryption-bun.adapter.d.ts +6 -2
- package/dist/encryption-bun.adapter.d.ts.map +1 -1
- package/dist/encryption-bun.adapter.js +5 -5
- package/dist/encryption-bun.adapter.js.map +1 -1
- package/dist/event-handler.service.d.ts +6 -2
- package/dist/event-handler.service.d.ts.map +1 -1
- package/dist/event-handler.service.js +4 -4
- package/dist/event-handler.service.js.map +1 -1
- package/dist/event-logger.service.d.ts +6 -2
- package/dist/event-logger.service.d.ts.map +1 -1
- package/dist/event-logger.service.js +4 -4
- package/dist/event-logger.service.js.map +1 -1
- package/dist/graceful-shutdown.service.d.ts +5 -2
- package/dist/graceful-shutdown.service.d.ts.map +1 -1
- package/dist/graceful-shutdown.service.js +18 -10
- package/dist/graceful-shutdown.service.js.map +1 -1
- package/dist/jobs.service.d.ts.map +1 -1
- package/dist/jobs.service.js.map +1 -1
- package/dist/mailer-smtp-with-logger.adapter.d.ts +5 -5
- package/dist/mailer-smtp-with-logger.adapter.d.ts.map +1 -1
- package/dist/mailer-smtp-with-logger.adapter.js +8 -8
- package/dist/mailer-smtp-with-logger.adapter.js.map +1 -1
- package/dist/pdf-generator-noop.adapter.d.ts +6 -2
- package/dist/pdf-generator-noop.adapter.d.ts.map +1 -1
- package/dist/pdf-generator-noop.adapter.js +8 -4
- package/dist/pdf-generator-noop.adapter.js.map +1 -1
- package/dist/prerequisites/clock-drift.d.ts +2 -2
- package/dist/prerequisites/clock-drift.js +3 -3
- package/dist/prerequisites/log-file.d.ts +2 -2
- package/dist/prerequisites/log-file.js +3 -3
- package/dist/prerequisites/mailer.d.ts +2 -2
- package/dist/prerequisites/mailer.js +3 -3
- package/dist/prerequisites/space.d.ts +2 -2
- package/dist/prerequisites/space.d.ts.map +1 -1
- package/dist/prerequisites/space.js +3 -3
- package/dist/prerequisites/space.js.map +1 -1
- package/dist/prerequisites/ssl-certificate-expiry.d.ts +2 -2
- package/dist/prerequisites/ssl-certificate-expiry.d.ts.map +1 -1
- package/dist/prerequisites/ssl-certificate-expiry.js +3 -3
- package/dist/prerequisites/ssl-certificate-expiry.js.map +1 -1
- package/dist/prerequisites/translations.d.ts +4 -4
- package/dist/prerequisites/translations.js +5 -5
- package/dist/prerequisites.service.d.ts +2 -2
- package/dist/prerequisites.service.js +3 -3
- package/dist/remote-file-storage-noop.adapter.d.ts +6 -3
- package/dist/remote-file-storage-noop.adapter.d.ts.map +1 -1
- package/dist/remote-file-storage-noop.adapter.js +10 -8
- package/dist/remote-file-storage-noop.adapter.js.map +1 -1
- package/dist/shield-rate-limit.middleware.d.ts.map +1 -1
- package/dist/shield-rate-limit.middleware.js.map +1 -1
- package/dist/timekeeper-noop.adapter.d.ts +6 -2
- package/dist/timekeeper-noop.adapter.d.ts.map +1 -1
- package/dist/timekeeper-noop.adapter.js +4 -4
- package/dist/timekeeper-noop.adapter.js.map +1 -1
- package/dist/translations.service.d.ts.map +1 -1
- package/dist/translations.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -18
- package/src/better-auth-logger.service.ts +6 -4
- package/src/command-logger.service.ts +4 -2
- package/src/encryption-bun.adapter.ts +5 -3
- package/src/event-handler.service.ts +4 -2
- package/src/event-logger.service.ts +4 -2
- package/src/graceful-shutdown.service.ts +18 -8
- package/src/jobs.service.ts +1 -0
- package/src/mailer-smtp-with-logger.adapter.ts +8 -7
- package/src/pdf-generator-noop.adapter.ts +8 -2
- package/src/prerequisites/clock-drift.ts +4 -4
- package/src/prerequisites/log-file.ts +4 -4
- package/src/prerequisites/mailer.ts +4 -4
- package/src/prerequisites/space.ts +4 -4
- package/src/prerequisites/ssl-certificate-expiry.ts +4 -4
- package/src/prerequisites/translations.ts +7 -7
- package/src/prerequisites.service.ts +4 -4
- package/src/remote-file-storage-noop.adapter.ts +13 -9
- package/src/shield-rate-limit.middleware.ts +1 -0
- package/src/timekeeper-noop.adapter.ts +4 -2
- package/src/translations.service.ts +1 -0
|
@@ -4,18 +4,18 @@ export class PrerequisiteLogFile {
|
|
|
4
4
|
kind = "log-file";
|
|
5
5
|
label;
|
|
6
6
|
enabled = true;
|
|
7
|
-
|
|
7
|
+
Logger;
|
|
8
8
|
constructor(config) {
|
|
9
9
|
this.label = config.label;
|
|
10
10
|
this.enabled = config.enabled === undefined ? true : config.enabled;
|
|
11
|
-
this.
|
|
11
|
+
this.Logger = config.Logger;
|
|
12
12
|
}
|
|
13
13
|
async verify(clock) {
|
|
14
14
|
const stopwatch = new tools.Stopwatch(clock.now());
|
|
15
15
|
if (!this.enabled)
|
|
16
16
|
return prereqs.Verification.undetermined(stopwatch.stop());
|
|
17
17
|
try {
|
|
18
|
-
const path = this.
|
|
18
|
+
const path = this.Logger.prodLogFile;
|
|
19
19
|
const result = await Bun.file(path).exists();
|
|
20
20
|
if (result)
|
|
21
21
|
return prereqs.Verification.success(stopwatch.stop());
|
|
@@ -6,10 +6,10 @@ export declare class PrerequisiteMailer implements prereqs.Prerequisite {
|
|
|
6
6
|
readonly kind = "mailer";
|
|
7
7
|
readonly label: prereqs.PrerequisiteLabelType;
|
|
8
8
|
readonly enabled?: boolean;
|
|
9
|
-
private readonly
|
|
9
|
+
private readonly Mailer;
|
|
10
10
|
readonly timeout: tools.Duration;
|
|
11
11
|
constructor(config: prereqs.PrerequisiteConfigType & {
|
|
12
|
-
|
|
12
|
+
Mailer: MailerPort;
|
|
13
13
|
timeout?: tools.Duration;
|
|
14
14
|
});
|
|
15
15
|
verify(clock: ClockPort): Promise<prereqs.VerifyOutcome>;
|
|
@@ -5,12 +5,12 @@ export class PrerequisiteMailer {
|
|
|
5
5
|
kind = "mailer";
|
|
6
6
|
label;
|
|
7
7
|
enabled = true;
|
|
8
|
-
|
|
8
|
+
Mailer;
|
|
9
9
|
timeout;
|
|
10
10
|
constructor(config) {
|
|
11
11
|
this.label = config.label;
|
|
12
12
|
this.enabled = config.enabled === undefined ? true : config.enabled;
|
|
13
|
-
this.
|
|
13
|
+
this.Mailer = config.Mailer;
|
|
14
14
|
this.timeout = config.timeout ?? tools.Duration.Seconds(2);
|
|
15
15
|
}
|
|
16
16
|
async verify(clock) {
|
|
@@ -18,7 +18,7 @@ export class PrerequisiteMailer {
|
|
|
18
18
|
if (!this.enabled)
|
|
19
19
|
return prereqs.Verification.undetermined(stopwatch.stop());
|
|
20
20
|
try {
|
|
21
|
-
await Timeout.run(this.
|
|
21
|
+
await Timeout.run(this.Mailer.verify(), this.timeout);
|
|
22
22
|
return prereqs.Verification.success(stopwatch.stop());
|
|
23
23
|
}
|
|
24
24
|
catch (error) {
|
|
@@ -7,10 +7,10 @@ export declare class PrerequisiteSpace implements prereqs.Prerequisite {
|
|
|
7
7
|
readonly label: prereqs.PrerequisiteLabelType;
|
|
8
8
|
readonly enabled?: boolean;
|
|
9
9
|
private readonly minimum;
|
|
10
|
-
private readonly
|
|
10
|
+
private readonly DiskSpaceChecker;
|
|
11
11
|
constructor(config: prereqs.PrerequisiteConfigType & {
|
|
12
12
|
minimum: tools.Size;
|
|
13
|
-
|
|
13
|
+
DiskSpaceChecker?: DiskSpaceCheckerPort;
|
|
14
14
|
});
|
|
15
15
|
verify(clock: ClockPort): Promise<prereqs.VerifyOutcome>;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../src/prerequisites/space.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,E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|
label;
|
|
8
8
|
enabled = true;
|
|
9
9
|
minimum;
|
|
10
|
-
|
|
10
|
+
DiskSpaceChecker;
|
|
11
11
|
constructor(config) {
|
|
12
12
|
this.label = config.label;
|
|
13
13
|
this.enabled = config.enabled === undefined ? true : config.enabled;
|
|
14
14
|
this.minimum = config.minimum;
|
|
15
|
-
this.
|
|
15
|
+
this.DiskSpaceChecker = config.DiskSpaceChecker ?? new DiskSpaceCheckerBunAdapter();
|
|
16
16
|
}
|
|
17
17
|
async verify(clock) {
|
|
18
18
|
const stopwatch = new tools.Stopwatch(clock.now());
|
|
@@ -20,7 +20,7 @@ export class PrerequisiteSpace {
|
|
|
20
20
|
return prereqs.Verification.undetermined(stopwatch.stop());
|
|
21
21
|
try {
|
|
22
22
|
const root = path.sep;
|
|
23
|
-
const freeDiskSpace = await this.
|
|
23
|
+
const freeDiskSpace = await this.DiskSpaceChecker.get(root);
|
|
24
24
|
if (freeDiskSpace.isGreaterThan(this.minimum))
|
|
25
25
|
return prereqs.Verification.success(stopwatch.stop());
|
|
26
26
|
return prereqs.Verification.failure(stopwatch.stop(), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.js","sourceRoot":"","sources":["../../src/prerequisites/space.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC;AAEpD,MAAM,OAAO,iBAAiB;IACnB,IAAI,GAAG,OAAO,CAAC;IACf,KAAK,CAAgC;IACrC,OAAO,GAAa,IAAI,CAAC;IAEjB,OAAO,CAAa;IACpB,
|
|
1
|
+
{"version":3,"file":"space.js","sourceRoot":"","sources":["../../src/prerequisites/space.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,KAA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AAI,EAAE,EAAE;gBACpD,OAAO,EAAE,oBAAoB,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;aACxE,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,KAAc,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;CACF"}
|
|
@@ -7,11 +7,11 @@ export declare class PrerequisiteSSLCertificateExpiry implements prereqs.Prerequ
|
|
|
7
7
|
readonly enabled?: boolean;
|
|
8
8
|
private readonly host;
|
|
9
9
|
private readonly days;
|
|
10
|
-
private readonly
|
|
10
|
+
private readonly CertificateInspector;
|
|
11
11
|
constructor(config: prereqs.PrerequisiteConfigType & {
|
|
12
12
|
host: string;
|
|
13
13
|
days: number;
|
|
14
|
-
|
|
14
|
+
CertificateInspector: CertificateInspectorPort;
|
|
15
15
|
});
|
|
16
16
|
verify(clock: ClockPort): Promise<prereqs.VerifyOutcome>;
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssl-certificate-expiry.d.ts","sourceRoot":"","sources":["../../src/prerequisites/ssl-certificate-expiry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC;AAEpD,qBAAa,gCAAiC,YAAW,OAAO,CAAC,YAAY;IAC3E,QAAQ,CAAC,IAAI,4BAA4B;IACzC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAQ;IAElC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"ssl-certificate-expiry.d.ts","sourceRoot":"","sources":["../../src/prerequisites/ssl-certificate-expiry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC;AAEpD,qBAAa,gCAAiC,YAAW,OAAO,CAAC,YAAY;IAC3E,QAAQ,CAAC,IAAI,4BAA4B;IACzC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAQ;IAElC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA2B;gBAG9D,MAAM,EAAE,OAAO,CAAC,sBAAsB,GAAG;QACvC,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,oBAAoB,EAAE,wBAAwB,CAAC;KAChD;IAUG,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC;CAgB/D"}
|
|
@@ -6,19 +6,19 @@ export class PrerequisiteSSLCertificateExpiry {
|
|
|
6
6
|
enabled = true;
|
|
7
7
|
host;
|
|
8
8
|
days;
|
|
9
|
-
|
|
9
|
+
CertificateInspector;
|
|
10
10
|
constructor(config) {
|
|
11
11
|
this.label = config.label;
|
|
12
12
|
this.enabled = config.enabled === undefined ? true : config.enabled;
|
|
13
13
|
this.host = config.host;
|
|
14
14
|
this.days = config.days;
|
|
15
|
-
this.
|
|
15
|
+
this.CertificateInspector = config.CertificateInspector;
|
|
16
16
|
}
|
|
17
17
|
async verify(clock) {
|
|
18
18
|
const stopwatch = new tools.Stopwatch(clock.now());
|
|
19
19
|
if (!this.enabled)
|
|
20
20
|
return prereqs.Verification.undetermined(stopwatch.stop());
|
|
21
|
-
const result = await this.
|
|
21
|
+
const result = await this.CertificateInspector.inspect(this.host);
|
|
22
22
|
if (!result.success)
|
|
23
23
|
return prereqs.Verification.failure(stopwatch.stop(), { message: "Certificate unavailable" });
|
|
24
24
|
if (result.daysRemaining <= this.days) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssl-certificate-expiry.js","sourceRoot":"","sources":["../../src/prerequisites/ssl-certificate-expiry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC;AAEpD,MAAM,OAAO,gCAAgC;IAClC,IAAI,GAAG,wBAAwB,CAAC;IAChC,KAAK,CAAgC;IACrC,OAAO,GAAa,IAAI,CAAC;IAEjB,IAAI,CAAS;IACb,IAAI,CAAS;IACb,
|
|
1
|
+
{"version":3,"file":"ssl-certificate-expiry.js","sourceRoot":"","sources":["../../src/prerequisites/ssl-certificate-expiry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC;AAEpD,MAAM,OAAO,gCAAgC;IAClC,IAAI,GAAG,wBAAwB,CAAC;IAChC,KAAK,CAAgC;IACrC,OAAO,GAAa,IAAI,CAAC;IAEjB,IAAI,CAAS;IACb,IAAI,CAAS;IACb,oBAAoB,CAA2B;IAEhE,YACE,MAIC;QAED,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;QAEpE,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAgB;QAC3B,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QAEnD,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;QAE9E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElE,IAAI,CAAC,MAAM,CAAC,OAAO;YACjB,OAAO,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC;QAChG,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACtC,OAAO,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE;gBACpD,OAAO,EAAE,GAAG,MAAM,CAAC,aAAa,iBAAiB;aAClD,CAAC,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -10,13 +10,13 @@ export declare class PrerequisiteTranslations implements prereqs.Prerequisite {
|
|
|
10
10
|
readonly enabled?: boolean;
|
|
11
11
|
private readonly translationsPath?;
|
|
12
12
|
private readonly supportedLanguages;
|
|
13
|
-
private readonly
|
|
14
|
-
private readonly
|
|
13
|
+
private readonly Logger;
|
|
14
|
+
private readonly JsonFileReader;
|
|
15
15
|
constructor(config: prereqs.PrerequisiteConfigType & {
|
|
16
16
|
translationsPath?: typeof I18n.DEFAULT_TRANSLATIONS_PATH;
|
|
17
17
|
supportedLanguages: types.I18nConfigType["supportedLanguages"];
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
Logger: LoggerPort;
|
|
19
|
+
JsonFileReader?: JsonFileReaderPort;
|
|
20
20
|
});
|
|
21
21
|
verify(clock: ClockPort): Promise<prereqs.VerifyOutcome>;
|
|
22
22
|
}
|
|
@@ -10,15 +10,15 @@ export class PrerequisiteTranslations {
|
|
|
10
10
|
enabled = true;
|
|
11
11
|
translationsPath;
|
|
12
12
|
supportedLanguages;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Logger;
|
|
14
|
+
JsonFileReader;
|
|
15
15
|
constructor(config) {
|
|
16
16
|
this.label = config.label;
|
|
17
17
|
this.enabled = config.enabled === undefined ? true : config.enabled;
|
|
18
18
|
this.translationsPath = config.translationsPath;
|
|
19
19
|
this.supportedLanguages = config.supportedLanguages;
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
20
|
+
this.Logger = config.Logger;
|
|
21
|
+
this.JsonFileReader = config.JsonFileReader ?? new JsonFileReaderBunForgivingAdapter();
|
|
22
22
|
}
|
|
23
23
|
async verify(clock) {
|
|
24
24
|
const stopwatch = new tools.Stopwatch(clock.now());
|
|
@@ -26,7 +26,7 @@ export class PrerequisiteTranslations {
|
|
|
26
26
|
return prereqs.Verification.undetermined(stopwatch.stop());
|
|
27
27
|
const translationsPath = this.translationsPath ?? I18n.DEFAULT_TRANSLATIONS_PATH;
|
|
28
28
|
const supportedLanguages = Object.keys(this.supportedLanguages);
|
|
29
|
-
const i18n = new I18n({ Logger: this.
|
|
29
|
+
const i18n = new I18n({ Logger: this.Logger, JsonFileReader: this.JsonFileReader });
|
|
30
30
|
try {
|
|
31
31
|
await fsp.access(translationsPath, constants.R_OK);
|
|
32
32
|
for (const language of supportedLanguages) {
|
|
@@ -46,8 +46,8 @@ export declare const PrerequisitesError: {
|
|
|
46
46
|
readonly Failure: "prerequisites.failure";
|
|
47
47
|
};
|
|
48
48
|
type Dependencies = {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
Logger: LoggerPort;
|
|
50
|
+
Clock: ClockPort;
|
|
51
51
|
};
|
|
52
52
|
/** @public */
|
|
53
53
|
export declare class Prerequisites {
|
|
@@ -31,13 +31,13 @@ export class Prerequisites {
|
|
|
31
31
|
async check(prerequisites) {
|
|
32
32
|
const results = await Promise.all(prerequisites.map(async (prerequisite) => ({
|
|
33
33
|
prerequisite,
|
|
34
|
-
outcome: await prerequisite.verify(this.deps.
|
|
34
|
+
outcome: await prerequisite.verify(this.deps.Clock),
|
|
35
35
|
})));
|
|
36
36
|
const failed = results.filter((result) => result.outcome.status === PrerequisiteStatusEnum.failure);
|
|
37
37
|
if (failed.length === 0)
|
|
38
|
-
return this.deps.
|
|
38
|
+
return this.deps.Logger.info({ message: "Prerequisites ok", ...this.base });
|
|
39
39
|
for (const failure of failed) {
|
|
40
|
-
this.deps.
|
|
40
|
+
this.deps.Logger.error({
|
|
41
41
|
message: "Prerequisite failed",
|
|
42
42
|
metadata: { label: failure.prerequisite.label, kind: failure.prerequisite.kind },
|
|
43
43
|
// @ts-expect-error
|
|
@@ -3,14 +3,17 @@ import type { ClockPort } from "./clock.port";
|
|
|
3
3
|
import type { LoggerPort } from "./logger.port";
|
|
4
4
|
import type { RemoteFileStoragePort, RemoteHeadResult, RemotePutFromPathInput, RemotePutFromPathResult } from "./remote-file-storage.port";
|
|
5
5
|
type RemoteFileStorageNoopConfig = {
|
|
6
|
+
publicBaseUrl?: string;
|
|
7
|
+
};
|
|
8
|
+
type Dependencies = {
|
|
6
9
|
Logger: LoggerPort;
|
|
7
10
|
Clock: ClockPort;
|
|
8
|
-
publicBaseUrl?: string;
|
|
9
11
|
};
|
|
10
12
|
export declare class RemoteFileStorageNoopAdapter implements RemoteFileStoragePort {
|
|
11
|
-
private readonly
|
|
13
|
+
private readonly deps;
|
|
14
|
+
private readonly config?;
|
|
12
15
|
private readonly base;
|
|
13
|
-
constructor(
|
|
16
|
+
constructor(deps: Dependencies, config?: RemoteFileStorageNoopConfig | undefined);
|
|
14
17
|
publicUrl(key: tools.ObjectKeyType): string;
|
|
15
18
|
putFromPath(input: RemotePutFromPathInput): Promise<RemotePutFromPathResult>;
|
|
16
19
|
head(key: tools.ObjectKeyType): Promise<RemoteHeadResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-file-storage-noop.adapter.d.ts","sourceRoot":"","sources":["../src/remote-file-storage-noop.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,KAAK,2BAA2B,GAAG;IAAE,
|
|
1
|
+
{"version":3,"file":"remote-file-storage-noop.adapter.d.ts","sourceRoot":"","sources":["../src/remote-file-storage-noop.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAEpC,KAAK,2BAA2B,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC9D,KAAK,YAAY,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AAE7D,qBAAa,4BAA6B,YAAW,qBAAqB;IAItE,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IAJ1B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqE;gBAGvE,IAAI,EAAE,YAAY,EAClB,MAAM,CAAC,EAAE,2BAA2B,YAAA;IAGvD,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,aAAa,GAAG,MAAM;IAKrC,WAAW,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAe5E,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAUzD,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,aAAa,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAUnE,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;CAOtD"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import * as tools from "@bgord/tools";
|
|
2
2
|
export class RemoteFileStorageNoopAdapter {
|
|
3
|
+
deps;
|
|
3
4
|
config;
|
|
4
5
|
base = { component: "infra", operation: "RemoteFileStorageNoopAdapter" };
|
|
5
|
-
constructor(config) {
|
|
6
|
+
constructor(deps, config) {
|
|
7
|
+
this.deps = deps;
|
|
6
8
|
this.config = config;
|
|
7
9
|
}
|
|
8
10
|
publicUrl(key) {
|
|
9
|
-
if (!this.config
|
|
11
|
+
if (!this.config?.publicBaseUrl)
|
|
10
12
|
return `/${key}`;
|
|
11
|
-
return `${this.config
|
|
13
|
+
return `${this.config?.publicBaseUrl}/${key}`;
|
|
12
14
|
}
|
|
13
15
|
async putFromPath(input) {
|
|
14
|
-
this.
|
|
16
|
+
this.deps.Logger.info({
|
|
15
17
|
message: "[NOOP] RemoteFileStorageNoopAdapter putFromPath",
|
|
16
18
|
metadata: { input },
|
|
17
19
|
...this.base,
|
|
@@ -19,12 +21,12 @@ export class RemoteFileStorageNoopAdapter {
|
|
|
19
21
|
return {
|
|
20
22
|
etag: "noop",
|
|
21
23
|
size: tools.Size.fromBytes(10),
|
|
22
|
-
lastModified: this.
|
|
24
|
+
lastModified: this.deps.Clock.now(),
|
|
23
25
|
mime: new tools.Mime("text/plain"),
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
async head(key) {
|
|
27
|
-
this.
|
|
29
|
+
this.deps.Logger.info({
|
|
28
30
|
message: "[NOOP] RemoteFileStorageNoopAdapter head",
|
|
29
31
|
metadata: { key },
|
|
30
32
|
...this.base,
|
|
@@ -32,7 +34,7 @@ export class RemoteFileStorageNoopAdapter {
|
|
|
32
34
|
return { exists: false };
|
|
33
35
|
}
|
|
34
36
|
async getStream(key) {
|
|
35
|
-
this.
|
|
37
|
+
this.deps.Logger.info({
|
|
36
38
|
message: "[NOOP] RemoteFileStorageNoopAdapter getStream",
|
|
37
39
|
metadata: { key },
|
|
38
40
|
...this.base,
|
|
@@ -40,7 +42,7 @@ export class RemoteFileStorageNoopAdapter {
|
|
|
40
42
|
return null;
|
|
41
43
|
}
|
|
42
44
|
async delete(key) {
|
|
43
|
-
this.
|
|
45
|
+
this.deps.Logger.info({
|
|
44
46
|
message: "[NOOP] RemoteFileStorageNoopAdapter delete",
|
|
45
47
|
metadata: { key },
|
|
46
48
|
...this.base,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-file-storage-noop.adapter.js","sourceRoot":"","sources":["../src/remote-file-storage-noop.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"remote-file-storage-noop.adapter.js","sourceRoot":"","sources":["../src/remote-file-storage-noop.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAatC,MAAM,OAAO,4BAA4B;IAIpB;IACA;IAJF,IAAI,GAAG,EAAE,SAA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B,GAAG,IAAI,CAAC,IAAI;SACb,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAwB;QACnC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACpB,OAAO,EAAE,4CAA4C;YACrD,QAAQ,EAAE,EAAE,GAAG,EAAE;YACjB,GAAG,IAAI,CAAC,IAAI;SACb,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shield-rate-limit.middleware.d.ts","sourceRoot":"","sources":["../src/shield-rate-limit.middleware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,KAAK,eAAe,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;AAC9C,KAAK,0BAA0B,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,kBAAkB,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"shield-rate-limit.middleware.d.ts","sourceRoot":"","sources":["../src/shield-rate-limit.middleware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,KAAK,eAAe,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;AAC9C,KAAK,0BAA0B,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,kBAAkB,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,CAAC;AAE5G,KAAK,YAAY,GAAG;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AAEzC,eAAO,MAAM,mBAAmB,EAAE,eAA8B,CAAC;AACjE,eAAO,MAAM,mBAAmB,EAAE,eAAoD,CAAC;AAEvF,eAAO,MAAM,oBAAoB,eAA+D,CAAC;AAEjG,eAAO,MAAM,eAAe,GAAI,SAAS,0BAA0B,EAAE,MAAM,YAAY,gEAqBtF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shield-rate-limit.middleware.js","sourceRoot":"","sources":["../src/shield-rate-limit.middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"shield-rate-limit.middleware.js","sourceRoot":"","sources":["../src/shield-rate-limit.middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AASpD,MAAM,CAAC,MAAM,mBAAmB,GAAoB,GAAG,EAAE,CAAC,MAAM,CAAC;AACjE,MAAM,CAAC,MAAM,mBAAmB,GAAoB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,MAAM,CAAC;AAEvF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,aAAa,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC,CAAC;AAEjG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAmC,EAAE,IAAkB,EAAE,EAAE;IACzF,OAAO,gBAAgB,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;QACxC,IAAI,CAAC,OAAO,CAAC,OAAO;YAAE,OAAO,IAAI,EAAE,CAAC;QAEpC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAEnC,IAAI,OAAO,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE/C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACtC,CAAC;QAED,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QAE/C,IAAI,CAAC,KAAK,CAAC,OAAO;YAAE,MAAM,oBAAoB,CAAC;QAE/C,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAEpC,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { ClockPort } from "./clock.port";
|
|
2
2
|
import type { TimekeeperPort } from "./timekeeper.port";
|
|
3
|
+
type Dependencies = {
|
|
4
|
+
Clock: ClockPort;
|
|
5
|
+
};
|
|
3
6
|
export declare class TimekeeperNoopAdapter implements TimekeeperPort {
|
|
4
|
-
private readonly
|
|
5
|
-
constructor(
|
|
7
|
+
private readonly deps;
|
|
8
|
+
constructor(deps: Dependencies);
|
|
6
9
|
get(): Promise<import("@bgord/tools").Timestamp>;
|
|
7
10
|
}
|
|
11
|
+
export {};
|
|
8
12
|
//# sourceMappingURL=timekeeper-noop.adapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timekeeper-noop.adapter.d.ts","sourceRoot":"","sources":["../src/timekeeper-noop.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,qBAAa,qBAAsB,YAAW,cAAc;IAC9C,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"timekeeper-noop.adapter.d.ts","sourceRoot":"","sources":["../src/timekeeper-noop.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,KAAK,YAAY,GAAG;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AAEzC,qBAAa,qBAAsB,YAAW,cAAc;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,YAAY;IAEzC,GAAG;CAGV"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export class TimekeeperNoopAdapter {
|
|
2
|
-
|
|
3
|
-
constructor(
|
|
4
|
-
this.
|
|
2
|
+
deps;
|
|
3
|
+
constructor(deps) {
|
|
4
|
+
this.deps = deps;
|
|
5
5
|
}
|
|
6
6
|
async get() {
|
|
7
|
-
return this.
|
|
7
|
+
return this.deps.Clock.now();
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=timekeeper-noop.adapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timekeeper-noop.adapter.js","sourceRoot":"","sources":["../src/timekeeper-noop.adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timekeeper-noop.adapter.js","sourceRoot":"","sources":["../src/timekeeper-noop.adapter.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,qBAAqB;IACH;IAA7B,YAA6B,IAAkB;QAAlB,SAAI,GAAJ,IAAI,CAAc;IAAG,CAAC;IAEnD,KAAK,CAAC,GAAG;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.service.d.ts","sourceRoot":"","sources":["../src/translations.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,kCAAkC,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,KAAK,MAAM,GAAG,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"translations.service.d.ts","sourceRoot":"","sources":["../src/translations.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,kCAAkC,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,KAAK,MAAM,GAAG,kCAAkC,CAAC;AAEjD,KAAK,YAAY,GAAG;IAAE,cAAc,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC;AAE/E,qBAAa,YAAY;IACvB,MAAM,CAAC,KAAK,GAAI,QAAQ,MAAM,EAAE,MAAM,YAAY;;;;;;;;yEAM7C;CACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.service.js","sourceRoot":"","sources":["../src/translations.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,IAAI,EAA2C,MAAM,gBAAgB,CAAC;AAI/E,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"translations.service.js","sourceRoot":"","sources":["../src/translations.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,IAAI,EAA2C,MAAM,gBAAgB,CAAC;AAI/E,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;AAMhC,MAAM,OAAO,YAAY;IACvB,MAAM,CAAC,KAAK,GAAG,CAAC,MAAc,EAAE,IAAkB,EAAE,EAAE,CACpD,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QACjC,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACnC,MAAM,YAAY,GAAG,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAEpE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC"}
|