@bgord/bun 1.7.0 → 1.7.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/api-version.middleware.d.ts +1 -1
- package/dist/build-info-repository.service.d.ts +1 -1
- package/dist/build-info-repository.service.js +1 -1
- package/dist/file-reader-json-bun.adapter.d.ts +1 -1
- package/dist/file-reader-json-bun.adapter.js +1 -1
- package/dist/healthcheck.service.d.ts +1 -1
- package/dist/i18n.service.d.ts +1 -1
- package/dist/i18n.service.js +1 -1
- package/dist/prerequisite-verifier-translations.adapter.d.ts +1 -1
- package/dist/setup.service.d.ts +1 -1
- package/dist/setup.service.js +1 -1
- package/dist/translations.service.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/api-version.middleware.ts +1 -1
- package/src/build-info-repository.service.ts +2 -2
- package/src/file-reader-json-bun.adapter.ts +1 -1
- package/src/healthcheck.service.ts +1 -1
- package/src/i18n.service.ts +2 -2
- package/src/prerequisite-verifier-translations.adapter.ts +1 -1
- package/src/setup.service.ts +2 -2
- package/src/translations.service.ts +1 -1
|
@@ -2,7 +2,7 @@ import type { ClockPort } from "./clock.port";
|
|
|
2
2
|
import type { FileReaderJsonPort } from "./file-reader-json.port";
|
|
3
3
|
type Dependencies = {
|
|
4
4
|
Clock: ClockPort;
|
|
5
|
-
|
|
5
|
+
FileReaderJson: FileReaderJsonPort;
|
|
6
6
|
};
|
|
7
7
|
export declare class ApiVersion {
|
|
8
8
|
static readonly HEADER_NAME = "api-version";
|
|
@@ -7,7 +7,7 @@ export type BuildInfoType = {
|
|
|
7
7
|
};
|
|
8
8
|
type Dependencies = {
|
|
9
9
|
Clock: ClockPort;
|
|
10
|
-
|
|
10
|
+
FileReaderJson: FileReaderJsonPort;
|
|
11
11
|
};
|
|
12
12
|
export declare class BuildInfoRepository {
|
|
13
13
|
static extract(deps: Dependencies): Promise<BuildInfoType>;
|
|
@@ -3,7 +3,7 @@ export class BuildInfoRepository {
|
|
|
3
3
|
static async extract(deps) {
|
|
4
4
|
const BUILD_DATE = deps.Clock.now().ms;
|
|
5
5
|
try {
|
|
6
|
-
const packageJson = await deps.
|
|
6
|
+
const packageJson = await deps.FileReaderJson.read("package.json");
|
|
7
7
|
return { BUILD_DATE, BUILD_VERSION: tools.PackageVersion.fromString(packageJson.version).toString() };
|
|
8
8
|
}
|
|
9
9
|
catch {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as tools from "@bgord/tools";
|
|
2
2
|
import type { FileReaderJsonOutputType, FileReaderJsonPort } from "./file-reader-json.port";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class FileReaderJsonBunAdapter implements FileReaderJsonPort {
|
|
4
4
|
read(path: tools.FilePathRelative | tools.FilePathAbsolute | string): Promise<FileReaderJsonOutputType>;
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=file-reader-json-bun.adapter.d.ts.map
|
|
@@ -8,7 +8,7 @@ import { Prerequisite, type PrerequisiteLabelType } from "./prerequisite.vo";
|
|
|
8
8
|
import { PrerequisiteVerificationOutcome } from "./prerequisite-verifier.port";
|
|
9
9
|
type Dependencies = {
|
|
10
10
|
Clock: ClockPort;
|
|
11
|
-
|
|
11
|
+
FileReaderJson: FileReaderJsonPort;
|
|
12
12
|
Logger: LoggerPort;
|
|
13
13
|
};
|
|
14
14
|
export declare class Healthcheck {
|
package/dist/i18n.service.d.ts
CHANGED
package/dist/i18n.service.js
CHANGED
|
@@ -9,7 +9,7 @@ export class I18n {
|
|
|
9
9
|
this.translationsPath = translationsPath;
|
|
10
10
|
}
|
|
11
11
|
async getTranslations(language) {
|
|
12
|
-
return this.deps.
|
|
12
|
+
return this.deps.FileReaderJson.read(this.getTranslationPathForLanguage(language));
|
|
13
13
|
}
|
|
14
14
|
useTranslations(translations) {
|
|
15
15
|
const that = this;
|
|
@@ -5,7 +5,7 @@ import type { LoggerPort } from "./logger.port";
|
|
|
5
5
|
import { type PrerequisiteVerifierPort } from "./prerequisite-verifier.port";
|
|
6
6
|
type Dependencies = {
|
|
7
7
|
Logger: LoggerPort;
|
|
8
|
-
|
|
8
|
+
FileReaderJson: FileReaderJsonPort;
|
|
9
9
|
};
|
|
10
10
|
export declare class PrerequisiteVerifierTranslationsAdapter implements PrerequisiteVerifierPort {
|
|
11
11
|
private readonly config;
|
package/dist/setup.service.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ type Dependencies = {
|
|
|
19
19
|
IdProvider: IdProviderPort;
|
|
20
20
|
I18n: I18nConfigType;
|
|
21
21
|
Clock: ClockPort;
|
|
22
|
-
|
|
22
|
+
FileReaderJson: FileReaderJsonPort;
|
|
23
23
|
};
|
|
24
24
|
export declare class Setup {
|
|
25
25
|
static essentials(deps: Dependencies, overrides?: SetupOverridesType): (import("hono").MiddlewareHandler<any, string, {}, Response> | import("hono").MiddlewareHandler<{
|
package/dist/setup.service.js
CHANGED
|
@@ -22,7 +22,7 @@ export class Setup {
|
|
|
22
22
|
MaintenanceMode.build(overrides?.maintenanceMode),
|
|
23
23
|
secureHeaders(secureHeadersOptions),
|
|
24
24
|
bodyLimit({ maxSize: BODY_LIMIT_MAX_SIZE }),
|
|
25
|
-
ApiVersion.build({ Clock: deps.Clock,
|
|
25
|
+
ApiVersion.build({ Clock: deps.Clock, FileReaderJson: deps.FileReaderJson }),
|
|
26
26
|
cors(corsOptions),
|
|
27
27
|
languageDetector({
|
|
28
28
|
supportedLanguages: Object.keys(deps.I18n.supportedLanguages),
|
|
@@ -3,7 +3,7 @@ import { type TranslationsSupportedLanguagesType } from "./i18n.service";
|
|
|
3
3
|
import type { LoggerPort } from "./logger.port";
|
|
4
4
|
type Config = TranslationsSupportedLanguagesType;
|
|
5
5
|
type Dependencies = {
|
|
6
|
-
|
|
6
|
+
FileReaderJson: FileReaderJsonPort;
|
|
7
7
|
Logger: LoggerPort;
|
|
8
8
|
};
|
|
9
9
|
export declare class Translations {
|