@niledatabase/server 4.1.0-alpha.2 → 4.1.0-alpha.4
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.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -48,6 +48,7 @@ declare class ApiConfig {
|
|
|
48
48
|
set token(value: string | undefined);
|
|
49
49
|
}
|
|
50
50
|
declare class Config {
|
|
51
|
+
#private;
|
|
51
52
|
user: string;
|
|
52
53
|
password: string;
|
|
53
54
|
databaseId: string;
|
|
@@ -56,8 +57,6 @@ declare class Config {
|
|
|
56
57
|
debug: boolean;
|
|
57
58
|
db: NilePoolConfig;
|
|
58
59
|
api: ApiConfig;
|
|
59
|
-
private _tenantId?;
|
|
60
|
-
private _userId?;
|
|
61
60
|
get tenantId(): string | undefined | null;
|
|
62
61
|
set tenantId(value: string | undefined | null);
|
|
63
62
|
get userId(): string | undefined | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ declare class ApiConfig {
|
|
|
48
48
|
set token(value: string | undefined);
|
|
49
49
|
}
|
|
50
50
|
declare class Config {
|
|
51
|
+
#private;
|
|
51
52
|
user: string;
|
|
52
53
|
password: string;
|
|
53
54
|
databaseId: string;
|
|
@@ -56,8 +57,6 @@ declare class Config {
|
|
|
56
57
|
debug: boolean;
|
|
57
58
|
db: NilePoolConfig;
|
|
58
59
|
api: ApiConfig;
|
|
59
|
-
private _tenantId?;
|
|
60
|
-
private _userId?;
|
|
61
60
|
get tenantId(): string | undefined | null;
|
|
62
61
|
set tenantId(value: string | undefined | null);
|
|
63
62
|
get userId(): string | undefined | null;
|
package/dist/index.js
CHANGED
|
@@ -548,19 +548,19 @@ var Config = class {
|
|
|
548
548
|
debug;
|
|
549
549
|
db;
|
|
550
550
|
api;
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
#tenantId;
|
|
552
|
+
#userId;
|
|
553
553
|
get tenantId() {
|
|
554
|
-
return this
|
|
554
|
+
return this.#tenantId;
|
|
555
555
|
}
|
|
556
556
|
set tenantId(value) {
|
|
557
|
-
this
|
|
557
|
+
this.#tenantId = value;
|
|
558
558
|
}
|
|
559
559
|
get userId() {
|
|
560
|
-
return this
|
|
560
|
+
return this.#userId;
|
|
561
561
|
}
|
|
562
562
|
set userId(value) {
|
|
563
|
-
this
|
|
563
|
+
this.#userId = value;
|
|
564
564
|
}
|
|
565
565
|
constructor(config, logger) {
|
|
566
566
|
const envVarConfig = { config, logger };
|
|
@@ -581,9 +581,9 @@ var Config = class {
|
|
|
581
581
|
}
|
|
582
582
|
this.databaseId = getDatabaseId(envVarConfig);
|
|
583
583
|
this.databaseName = getDatabaseName(envVarConfig);
|
|
584
|
-
this
|
|
584
|
+
this.#tenantId = getTenantId(envVarConfig);
|
|
585
585
|
this.debug = Boolean(config?.debug);
|
|
586
|
-
this
|
|
586
|
+
this.#userId = config?.userId;
|
|
587
587
|
const { host, port, ...dbConfig } = config?.db ?? {};
|
|
588
588
|
const configuredHost = host ?? getDbHost(envVarConfig);
|
|
589
589
|
const configuredPort = port ?? getDbPort(envVarConfig);
|