diff --git a/package-lock.json b/package-lock.json index 9237dd586..3e5fc84d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10730,7 +10730,7 @@ }, "packages/app-runtime": { "name": "@nmshd/app-runtime", - "version": "5.0.0", + "version": "5.0.1", "license": "MIT", "dependencies": { "@js-soft/docdb-access-loki": "^1.1.0", @@ -10744,12 +10744,12 @@ "@types/luxon": "^3.4.2" }, "peerDependencies": { - "@nmshd/runtime": "^5.0.0" + "@nmshd/runtime": "^5.0.1" } }, "packages/consumption": { "name": "@nmshd/consumption", - "version": "5.0.0", + "version": "5.0.1", "license": "MIT", "dependencies": { "@js-soft/docdb-querytranslator": "^1.1.4", @@ -10771,7 +10771,7 @@ }, "packages/content": { "name": "@nmshd/content", - "version": "5.0.0", + "version": "5.0.1", "license": "MIT", "dependencies": { "@js-soft/logging-abstractions": "^1.0.1", @@ -10796,17 +10796,17 @@ }, "packages/runtime": { "name": "@nmshd/runtime", - "version": "5.0.0", + "version": "5.0.1", "license": "MIT", "dependencies": { "@js-soft/docdb-querytranslator": "^1.1.4", "@js-soft/logging-abstractions": "^1.0.1", "@js-soft/ts-serval": "2.0.10", "@js-soft/ts-utils": "^2.3.3", - "@nmshd/consumption": "5.0.0", - "@nmshd/content": "5.0.0", + "@nmshd/consumption": "5.0.1", + "@nmshd/content": "5.0.1", "@nmshd/crypto": "2.0.6", - "@nmshd/transport": "5.0.0", + "@nmshd/transport": "5.0.1", "ajv": "^8.17.1", "ajv-errors": "^3.0.0", "ajv-formats": "^3.0.1", @@ -10838,7 +10838,7 @@ }, "packages/transport": { "name": "@nmshd/transport", - "version": "5.0.0", + "version": "5.0.1", "license": "MIT", "dependencies": { "@js-soft/docdb-access-abstractions": "1.0.4", diff --git a/packages/app-runtime/package.json b/packages/app-runtime/package.json index 7b41a8075..c555a8dca 100644 --- a/packages/app-runtime/package.json +++ b/packages/app-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@nmshd/app-runtime", - "version": "5.0.0", + "version": "5.0.1", "description": "The App Runtime", "homepage": "https://enmeshed.eu", "repository": { @@ -63,7 +63,7 @@ "@types/luxon": "^3.4.2" }, "peerDependencies": { - "@nmshd/runtime": "^5.0.0" + "@nmshd/runtime": "^5.0.1" }, "publishConfig": { "access": "public", diff --git a/packages/app-runtime/src/AppConfig.ts b/packages/app-runtime/src/AppConfig.ts index 4a9c3862a..a7ba34502 100644 --- a/packages/app-runtime/src/AppConfig.ts +++ b/packages/app-runtime/src/AppConfig.ts @@ -3,24 +3,26 @@ import { IConfigOverwrite } from "@nmshd/transport"; import { defaultsDeep } from "lodash"; export interface AppConfig extends RuntimeConfig { - logging: any; accountsDbName: string; applicationId: string; applePushEnvironment?: "Development" | "Production"; allowMultipleAccountsWithSameAddress: boolean; + dataFolder: string; } export interface AppConfigOverwrite { transportLibrary?: Omit; - logging?: any; accountsDbName?: string; applicationId: string; applePushEnvironment?: "Development" | "Production"; allowMultipleAccountsWithSameAddress?: boolean; + dataFolder?: string; } export function createAppConfig(...configs: AppConfigOverwrite[]): AppConfig { - const appConfig = { + const appConfig: Omit & { + transportLibrary: Omit; + } = { accountsDbName: "accounts", transportLibrary: { datawalletEnabled: true @@ -93,7 +95,8 @@ export function createAppConfig(...configs: AppConfigOverwrite[]): AppConfig { location: "@nmshd/runtime:NotificationModule" } }, - allowMultipleAccountsWithSameAddress: false + allowMultipleAccountsWithSameAddress: false, + dataFolder: "./data" }; const mergedConfig = defaultsDeep({}, ...configs, appConfig); diff --git a/packages/app-runtime/src/AppRuntime.ts b/packages/app-runtime/src/AppRuntime.ts index 6698427c1..13330a36f 100644 --- a/packages/app-runtime/src/AppRuntime.ts +++ b/packages/app-runtime/src/AppRuntime.ts @@ -282,7 +282,7 @@ export class AppRuntime extends Runtime { protected createDatabaseConnection(): Promise { this.logger.trace("Creating DatabaseConnection to LokiJS"); - this.lokiConnection = new LokiJsConnection("./data", this.nativeEnvironment.databaseFactory); + this.lokiConnection = new LokiJsConnection(this.config.dataFolder, this.nativeEnvironment.databaseFactory); this.logger.trace("Finished initialization of LokiJS connection."); return Promise.resolve(this.lokiConnection); diff --git a/packages/app-runtime/test/lib/TestUtil.ts b/packages/app-runtime/test/lib/TestUtil.ts index c28ba00b0..14161b4f1 100644 --- a/packages/app-runtime/test/lib/TestUtil.ts +++ b/packages/app-runtime/test/lib/TestUtil.ts @@ -57,7 +57,6 @@ export class TestUtil { return runtime_createAppConfig({ transportLibrary: transportOverride, - logging: {}, applicationId: "eu.enmeshed.test", ...configOverride }); diff --git a/packages/consumption/package.json b/packages/consumption/package.json index 58eb0ccb6..0161a7020 100644 --- a/packages/consumption/package.json +++ b/packages/consumption/package.json @@ -1,6 +1,6 @@ { "name": "@nmshd/consumption", - "version": "5.0.0", + "version": "5.0.1", "description": "The consumption library extends the transport library.", "homepage": "https://enmeshed.eu", "repository": { diff --git a/packages/content/package.json b/packages/content/package.json index a0735523d..f905a88f6 100644 --- a/packages/content/package.json +++ b/packages/content/package.json @@ -1,6 +1,6 @@ { "name": "@nmshd/content", - "version": "5.0.0", + "version": "5.0.1", "description": "The content library defines data structures that can be transmitted using the transport library.", "homepage": "https://enmeshed.eu", "repository": { diff --git a/packages/runtime/package.json b/packages/runtime/package.json index bfdb7dfac..3dee324a6 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -1,6 +1,6 @@ { "name": "@nmshd/runtime", - "version": "5.0.0", + "version": "5.0.1", "description": "The enmeshed client runtime.", "homepage": "https://enmeshed.eu", "repository": { @@ -65,10 +65,10 @@ "@js-soft/logging-abstractions": "^1.0.1", "@js-soft/ts-serval": "2.0.10", "@js-soft/ts-utils": "^2.3.3", - "@nmshd/consumption": "5.0.0", - "@nmshd/content": "5.0.0", + "@nmshd/consumption": "5.0.1", + "@nmshd/content": "5.0.1", "@nmshd/crypto": "2.0.6", - "@nmshd/transport": "5.0.0", + "@nmshd/transport": "5.0.1", "ajv": "^8.17.1", "ajv-errors": "^3.0.0", "ajv-formats": "^3.0.1", diff --git a/packages/transport/package.json b/packages/transport/package.json index 7e037adc2..4d05bc34b 100644 --- a/packages/transport/package.json +++ b/packages/transport/package.json @@ -1,6 +1,6 @@ { "name": "@nmshd/transport", - "version": "5.0.0", + "version": "5.0.1", "description": "The transport library handles backbone communication and content encryption.", "homepage": "https://enmeshed.eu", "repository": {