@webda/core 2.0.0-beta.1 → 2.0.0
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/lib/application.d.ts +9 -21
- package/lib/application.js +71 -84
- package/lib/application.js.map +1 -1
- package/lib/application.spec.js +121 -140
- package/lib/application.spec.js.map +1 -1
- package/lib/core.d.ts +86 -46
- package/lib/core.js +254 -316
- package/lib/core.js.map +1 -1
- package/lib/core.spec.js +326 -391
- package/lib/core.spec.js.map +1 -1
- package/lib/index.d.ts +49 -45
- package/lib/index.js +54 -67
- package/lib/index.js.map +1 -1
- package/lib/models/aclmodel.d.ts +2 -2
- package/lib/models/aclmodel.js +63 -90
- package/lib/models/aclmodel.js.map +1 -1
- package/lib/models/aclmodel.spec.js +127 -151
- package/lib/models/aclmodel.spec.js.map +1 -1
- package/lib/models/coremodel.d.ts +84 -11
- package/lib/models/coremodel.js +104 -103
- package/lib/models/coremodel.js.map +1 -1
- package/lib/models/coremodel.spec.js +91 -91
- package/lib/models/coremodel.spec.js.map +1 -1
- package/lib/models/deployment.js +1 -2
- package/lib/models/ident.d.ts +5 -3
- package/lib/models/ident.js +4 -9
- package/lib/models/ident.js.map +1 -1
- package/lib/models/ident.spec.js +9 -11
- package/lib/models/ident.spec.js.map +1 -1
- package/lib/models/ownermodel.d.ts +12 -2
- package/lib/models/ownermodel.js +54 -62
- package/lib/models/ownermodel.js.map +1 -1
- package/lib/models/ownermodel.spec.js +129 -152
- package/lib/models/ownermodel.spec.js.map +1 -1
- package/lib/models/rolemodel.d.ts +2 -2
- package/lib/models/rolemodel.js +24 -40
- package/lib/models/rolemodel.js.map +1 -1
- package/lib/models/rolemodel.spec.js +44 -61
- package/lib/models/rolemodel.spec.js.map +1 -1
- package/lib/models/user.d.ts +5 -5
- package/lib/models/user.js +3 -8
- package/lib/models/user.js.map +1 -1
- package/lib/models/user.spec.js +14 -16
- package/lib/models/user.spec.js.map +1 -1
- package/lib/queues/filequeue.d.ts +2 -2
- package/lib/queues/filequeue.js +72 -93
- package/lib/queues/filequeue.js.map +1 -1
- package/lib/queues/filequeue.spec.js +53 -70
- package/lib/queues/filequeue.spec.js.map +1 -1
- package/lib/queues/memoryqueue.d.ts +2 -2
- package/lib/queues/memoryqueue.js +37 -61
- package/lib/queues/memoryqueue.js.map +1 -1
- package/lib/queues/memoryqueue.spec.js +142 -165
- package/lib/queues/memoryqueue.spec.js.map +1 -1
- package/lib/queues/pubsubservice.d.ts +2 -2
- package/lib/queues/pubsubservice.js +3 -7
- package/lib/queues/pubsubservice.js.map +1 -1
- package/lib/queues/queue.spec.d.ts +1 -1
- package/lib/queues/queue.spec.js +42 -56
- package/lib/queues/queue.spec.js.map +1 -1
- package/lib/queues/queueservice.d.ts +4 -4
- package/lib/queues/queueservice.js +52 -67
- package/lib/queues/queueservice.js.map +1 -1
- package/lib/router.d.ts +7 -3
- package/lib/router.js +49 -48
- package/lib/router.js.map +1 -1
- package/lib/router.spec.js +64 -61
- package/lib/router.spec.js.map +1 -1
- package/lib/services/asyncevents.d.ts +2 -2
- package/lib/services/asyncevents.js +44 -64
- package/lib/services/asyncevents.js.map +1 -1
- package/lib/services/asyncevents.spec.js +81 -98
- package/lib/services/asyncevents.spec.js.map +1 -1
- package/lib/services/authentication.d.ts +28 -19
- package/lib/services/authentication.js +539 -571
- package/lib/services/authentication.js.map +1 -1
- package/lib/services/authentication.spec.js +411 -447
- package/lib/services/authentication.spec.js.map +1 -1
- package/lib/services/binary.d.ts +8 -6
- package/lib/services/binary.js +212 -244
- package/lib/services/binary.js.map +1 -1
- package/lib/services/binary.spec.d.ts +3 -3
- package/lib/services/binary.spec.js +390 -443
- package/lib/services/binary.spec.js.map +1 -1
- package/lib/services/cloudbinary.d.ts +3 -3
- package/lib/services/cloudbinary.js +46 -71
- package/lib/services/cloudbinary.js.map +1 -1
- package/lib/services/cloudbinary.spec.d.ts +3 -3
- package/lib/services/cloudbinary.spec.js +133 -162
- package/lib/services/cloudbinary.spec.js.map +1 -1
- package/lib/services/configuration.d.ts +6 -3
- package/lib/services/configuration.js +78 -103
- package/lib/services/configuration.js.map +1 -1
- package/lib/services/configuration.spec.js +63 -83
- package/lib/services/configuration.spec.js.map +1 -1
- package/lib/services/cron.d.ts +3 -2
- package/lib/services/cron.js +9 -13
- package/lib/services/cron.js.map +1 -1
- package/lib/services/cron.spec.js +18 -21
- package/lib/services/cron.spec.js.map +1 -1
- package/lib/services/cryptoservice.d.ts +258 -0
- package/lib/services/cryptoservice.js +312 -0
- package/lib/services/cryptoservice.js.map +1 -0
- package/lib/services/cryptoservice.spec.d.ts +1 -0
- package/lib/services/cryptoservice.spec.js +137 -0
- package/lib/services/cryptoservice.spec.js.map +1 -0
- package/lib/services/debugmailer.d.ts +1 -1
- package/lib/services/debugmailer.js +13 -34
- package/lib/services/debugmailer.js.map +1 -1
- package/lib/services/debugmailer.spec.js +16 -29
- package/lib/services/debugmailer.spec.js.map +1 -1
- package/lib/services/echo.d.ts +2 -2
- package/lib/services/echo.js +15 -31
- package/lib/services/echo.js.map +1 -1
- package/lib/services/echo.spec.js +27 -40
- package/lib/services/echo.spec.js.map +1 -1
- package/lib/services/filebinary.d.ts +15 -5
- package/lib/services/filebinary.js +171 -200
- package/lib/services/filebinary.js.map +1 -1
- package/lib/services/filebinary.spec.d.ts +2 -1
- package/lib/services/filebinary.spec.js +106 -117
- package/lib/services/filebinary.spec.js.map +1 -1
- package/lib/services/fileconfiguration.d.ts +2 -2
- package/lib/services/fileconfiguration.js +25 -43
- package/lib/services/fileconfiguration.js.map +1 -1
- package/lib/services/fileconfiguration.spec.js +79 -109
- package/lib/services/fileconfiguration.spec.js.map +1 -1
- package/lib/services/invitationservice.d.ts +9 -9
- package/lib/services/invitationservice.js +275 -313
- package/lib/services/invitationservice.js.map +1 -1
- package/lib/services/invitationservice.spec.js +442 -448
- package/lib/services/invitationservice.spec.js.map +1 -1
- package/lib/services/kubernetesconfiguration.d.ts +2 -2
- package/lib/services/kubernetesconfiguration.js +41 -59
- package/lib/services/kubernetesconfiguration.js.map +1 -1
- package/lib/services/kubernetesconfiguration.spec.js +80 -98
- package/lib/services/kubernetesconfiguration.spec.js.map +1 -1
- package/lib/services/mailer.d.ts +4 -4
- package/lib/services/mailer.js +62 -86
- package/lib/services/mailer.js.map +1 -1
- package/lib/services/mailer.spec.js +86 -127
- package/lib/services/mailer.spec.js.map +1 -1
- package/lib/services/notificationservice.d.ts +4 -4
- package/lib/services/notificationservice.js +23 -42
- package/lib/services/notificationservice.js.map +1 -1
- package/lib/services/notificationservice.spec.js +47 -73
- package/lib/services/notificationservice.spec.js.map +1 -1
- package/lib/services/oauth.d.ts +32 -6
- package/lib/services/oauth.js +73 -78
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/oauth.spec.js +128 -147
- package/lib/services/oauth.spec.js.map +1 -1
- package/lib/services/proxy.d.ts +74 -0
- package/lib/services/proxy.js +126 -0
- package/lib/services/proxy.js.map +1 -0
- package/lib/services/proxy.spec.d.ts +1 -0
- package/lib/services/proxy.spec.js +59 -0
- package/lib/services/proxy.spec.js.map +1 -0
- package/lib/services/resource.d.ts +2 -2
- package/lib/services/resource.js +12 -18
- package/lib/services/resource.js.map +1 -1
- package/lib/services/resource.spec.js +67 -99
- package/lib/services/resource.spec.js.map +1 -1
- package/lib/services/service.d.ts +33 -7
- package/lib/services/service.js +74 -42
- package/lib/services/service.js.map +1 -1
- package/lib/services/service.spec.js +62 -67
- package/lib/services/service.spec.js.map +1 -1
- package/lib/services/version.d.ts +1 -1
- package/lib/services/version.js +3 -8
- package/lib/services/version.js.map +1 -1
- package/lib/services/version.spec.js +11 -24
- package/lib/services/version.spec.js.map +1 -1
- package/lib/stores/aggregator.d.ts +3 -3
- package/lib/stores/aggregator.js +37 -57
- package/lib/stores/aggregator.js.map +1 -1
- package/lib/stores/file.d.ts +3 -3
- package/lib/stores/file.js +93 -131
- package/lib/stores/file.js.map +1 -1
- package/lib/stores/file.spec.d.ts +2 -2
- package/lib/stores/file.spec.js +261 -289
- package/lib/stores/file.spec.js.map +1 -1
- package/lib/stores/mapper.d.ts +4 -4
- package/lib/stores/mapper.js +112 -137
- package/lib/stores/mapper.js.map +1 -1
- package/lib/stores/mapper.spec.js +131 -150
- package/lib/stores/mapper.spec.js.map +1 -1
- package/lib/stores/memory.d.ts +67 -6
- package/lib/stores/memory.js +155 -117
- package/lib/stores/memory.js.map +1 -1
- package/lib/stores/memory.spec.d.ts +3 -2
- package/lib/stores/memory.spec.js +127 -105
- package/lib/stores/memory.spec.js.map +1 -1
- package/lib/stores/store.d.ts +35 -15
- package/lib/stores/store.js +839 -821
- package/lib/stores/store.js.map +1 -1
- package/lib/stores/store.spec.d.ts +6 -4
- package/lib/stores/store.spec.js +627 -647
- package/lib/stores/store.spec.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLLexer.d.ts +4 -4
- package/lib/stores/webdaql/WebdaQLLexer.js +9 -13
- package/lib/stores/webdaql/WebdaQLLexer.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserLexer.d.ts +4 -4
- package/lib/stores/webdaql/WebdaQLParserLexer.js +9 -13
- package/lib/stores/webdaql/WebdaQLParserLexer.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserListener.d.ts +2 -2
- package/lib/stores/webdaql/WebdaQLParserListener.js +1 -2
- package/lib/stores/webdaql/WebdaQLParserListener.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserParser.d.ts +10 -10
- package/lib/stores/webdaql/WebdaQLParserParser.js +62 -91
- package/lib/stores/webdaql/WebdaQLParserParser.js.map +1 -1
- package/lib/stores/webdaql/WebdaQLParserVisitor.d.ts +2 -2
- package/lib/stores/webdaql/WebdaQLParserVisitor.js +1 -2
- package/lib/stores/webdaql/WebdaQLParserVisitor.js.map +1 -1
- package/lib/stores/webdaql/query.d.ts +4 -5
- package/lib/stores/webdaql/query.js +16 -19
- package/lib/stores/webdaql/query.js.map +1 -1
- package/lib/stores/webdaql/query.spec.js +30 -32
- package/lib/stores/webdaql/query.spec.js.map +1 -1
- package/lib/test.d.ts +3 -3
- package/lib/test.js +74 -94
- package/lib/test.js.map +1 -1
- package/lib/unpackedapplication.d.ts +1 -1
- package/lib/unpackedapplication.js +25 -31
- package/lib/unpackedapplication.js.map +1 -1
- package/lib/utils/abstractdeployer.js +1 -5
- package/lib/utils/abstractdeployer.js.map +1 -1
- package/lib/utils/abstractdeployer.spec.js +6 -8
- package/lib/utils/abstractdeployer.spec.js.map +1 -1
- package/lib/utils/context.d.ts +61 -29
- package/lib/utils/context.js +133 -127
- package/lib/utils/context.js.map +1 -1
- package/lib/utils/context.spec.js +147 -153
- package/lib/utils/context.spec.js.map +1 -1
- package/lib/utils/cookie.d.ts +66 -45
- package/lib/utils/cookie.js +69 -158
- package/lib/utils/cookie.js.map +1 -1
- package/lib/utils/cookie.spec.js +220 -238
- package/lib/utils/cookie.spec.js.map +1 -1
- package/lib/utils/esm.d.ts +4 -0
- package/lib/utils/esm.js +10 -0
- package/lib/utils/esm.js.map +1 -0
- package/lib/utils/httpcontext.d.ts +37 -9
- package/lib/utils/httpcontext.js +86 -57
- package/lib/utils/httpcontext.js.map +1 -1
- package/lib/utils/httpcontext.spec.js +37 -48
- package/lib/utils/httpcontext.spec.js.map +1 -1
- package/lib/utils/logger.d.ts +2 -2
- package/lib/utils/logger.js +15 -28
- package/lib/utils/logger.js.map +1 -1
- package/lib/utils/logger.spec.js +9 -11
- package/lib/utils/logger.spec.js.map +1 -1
- package/lib/utils/serializers.js +17 -20
- package/lib/utils/serializers.js.map +1 -1
- package/lib/utils/serializers.spec.js +43 -44
- package/lib/utils/serializers.spec.js.map +1 -1
- package/lib/utils/session.d.ts +120 -0
- package/lib/utils/session.js +155 -0
- package/lib/utils/session.js.map +1 -0
- package/lib/utils/session.spec.d.ts +1 -0
- package/lib/utils/session.spec.js +66 -0
- package/lib/utils/session.spec.js.map +1 -0
- package/lib/utils/waiter.d.ts +1 -1
- package/lib/utils/waiter.js +32 -52
- package/lib/utils/waiter.js.map +1 -1
- package/lib/utils/waiter.spec.js +75 -92
- package/lib/utils/waiter.spec.js.map +1 -1
- package/package.json +22 -14
- package/test/config-invitation.json +1 -3
- package/test/config.json +3 -3
- package/test/config.old.json +1 -2
- package/test/moddas/annotatedservice.js +5 -5
- package/test/moddas/debugmailer.js +2 -3
- package/test/moddas/fakeservice.js +2 -3
- package/test/moddas/voidstore.js +6 -4
- package/test/models/ident.js +2 -6
- package/test/models/task.js +3 -7
- package/test/package.json +2 -1
- package/webda.module.json +956 -188
|
@@ -1,161 +1,131 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const mocha_1 = require("@testdeck/mocha");
|
|
19
|
-
const assert = require("assert");
|
|
20
|
-
const fs_1 = require("fs");
|
|
21
|
-
const test_1 = require("../test");
|
|
22
|
-
const fileconfiguration_1 = require("./fileconfiguration");
|
|
23
|
-
let FileConfigurationServiceTest = class FileConfigurationServiceTest extends test_1.WebdaTest {
|
|
7
|
+
import { suite, test } from "@testdeck/mocha";
|
|
8
|
+
import * as assert from "assert";
|
|
9
|
+
import { existsSync, unlinkSync, writeFileSync } from "fs";
|
|
10
|
+
import { WebdaTest } from "../test.js";
|
|
11
|
+
import { getCommonJS } from "../utils/esm.js";
|
|
12
|
+
import { FileConfigurationService } from "./fileconfiguration.js";
|
|
13
|
+
const { __dirname } = getCommonJS(import.meta.url);
|
|
14
|
+
let FileConfigurationServiceTest = class FileConfigurationServiceTest extends WebdaTest {
|
|
24
15
|
getTestConfiguration() {
|
|
25
16
|
return __dirname + "/../../test/config-file-reload.json";
|
|
26
17
|
}
|
|
27
|
-
before() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
async before() {
|
|
19
|
+
writeFileSync(__dirname + "/../../test/my-cnf.json", JSON.stringify({
|
|
20
|
+
webda: {
|
|
21
|
+
services: {
|
|
22
|
+
Authentication: {
|
|
23
|
+
providers: {
|
|
24
|
+
email: {
|
|
25
|
+
text: "Test"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, undefined, 2));
|
|
32
|
+
await super.before();
|
|
33
|
+
}
|
|
34
|
+
async initialLoad() {
|
|
35
|
+
assert.rejects(() => new FileConfigurationService(this.webda, "except", {}).init(), /Need a source for FileConfigurationService/);
|
|
36
|
+
assert.rejects(() => new FileConfigurationService(this.webda, "except", { source: "/plops" }).init(), /Need a source for FileConfigurationService/);
|
|
37
|
+
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.text, "Test");
|
|
38
|
+
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.mailer, "DefinedMailer");
|
|
39
|
+
await new Promise(resolve => {
|
|
40
|
+
let ok = false;
|
|
41
|
+
this.webda.getService("FileConfigurationService").on("Configuration.Applied", () => {
|
|
42
|
+
ok = true;
|
|
43
|
+
resolve();
|
|
44
|
+
});
|
|
45
|
+
// Github fs watcher seems to have some issue
|
|
46
|
+
setTimeout(async () => {
|
|
47
|
+
if (!ok) {
|
|
48
|
+
console.log("WARN: Bypass the fs.watch");
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
await this.webda.getService("FileConfigurationService").checkUpdate();
|
|
51
|
+
resolve();
|
|
52
|
+
}
|
|
53
|
+
}, 30000);
|
|
54
|
+
writeFileSync(__dirname + "/../../test/my-cnf.json", JSON.stringify({
|
|
33
55
|
webda: {
|
|
34
56
|
services: {
|
|
35
57
|
Authentication: {
|
|
36
58
|
providers: {
|
|
37
59
|
email: {
|
|
38
|
-
text: "
|
|
60
|
+
text: "Plop"
|
|
39
61
|
}
|
|
40
62
|
}
|
|
41
63
|
}
|
|
42
64
|
}
|
|
43
65
|
}
|
|
44
66
|
}, undefined, 2));
|
|
45
|
-
yield _super.before.call(this);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
initialLoad() {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
assert.rejects(() => new fileconfiguration_1.FileConfigurationService(this.webda, "except", {}).init(), /Need a source for FileConfigurationService/);
|
|
51
|
-
assert.rejects(() => new fileconfiguration_1.FileConfigurationService(this.webda, "except", { source: "/plops" }).init(), /Need a source for FileConfigurationService/);
|
|
52
|
-
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.text, "Test");
|
|
53
|
-
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.mailer, "DefinedMailer");
|
|
54
|
-
yield new Promise(resolve => {
|
|
55
|
-
let ok = false;
|
|
56
|
-
this.webda.getService("FileConfigurationService").on("Configuration.Applied", () => {
|
|
57
|
-
ok = true;
|
|
58
|
-
resolve();
|
|
59
|
-
});
|
|
60
|
-
// Github fs watcher seems to have some issue
|
|
61
|
-
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
if (!ok) {
|
|
63
|
-
console.log("WARN: Bypass the fs.watch");
|
|
64
|
-
// @ts-ignore
|
|
65
|
-
yield this.webda.getService("FileConfigurationService").checkUpdate();
|
|
66
|
-
resolve();
|
|
67
|
-
}
|
|
68
|
-
}), 30000);
|
|
69
|
-
(0, fs_1.writeFileSync)(__dirname + "/../../test/my-cnf.json", JSON.stringify({
|
|
70
|
-
webda: {
|
|
71
|
-
services: {
|
|
72
|
-
Authentication: {
|
|
73
|
-
providers: {
|
|
74
|
-
email: {
|
|
75
|
-
text: "Plop"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}, undefined, 2));
|
|
82
|
-
});
|
|
83
|
-
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.text, "Plop");
|
|
84
|
-
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.mailer, "DefinedMailer");
|
|
85
67
|
});
|
|
68
|
+
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.text, "Plop");
|
|
69
|
+
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.mailer, "DefinedMailer");
|
|
86
70
|
}
|
|
87
71
|
};
|
|
88
72
|
__decorate([
|
|
89
|
-
|
|
73
|
+
test
|
|
90
74
|
], FileConfigurationServiceTest.prototype, "initialLoad", null);
|
|
91
75
|
FileConfigurationServiceTest = __decorate([
|
|
92
|
-
|
|
76
|
+
suite
|
|
93
77
|
], FileConfigurationServiceTest);
|
|
94
|
-
let FileConfigurationNoReloadServiceTest = class FileConfigurationNoReloadServiceTest extends
|
|
78
|
+
let FileConfigurationNoReloadServiceTest = class FileConfigurationNoReloadServiceTest extends WebdaTest {
|
|
95
79
|
getTestConfiguration() {
|
|
96
80
|
return __dirname + "/../../test/config-file-no-reload.json";
|
|
97
81
|
}
|
|
98
|
-
before() {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Authentication: {
|
|
107
|
-
providers: {
|
|
108
|
-
email: {
|
|
109
|
-
text: "Test2"
|
|
110
|
-
}
|
|
82
|
+
async before() {
|
|
83
|
+
writeFileSync(__dirname + "/../../test/my-cnf.json", JSON.stringify({
|
|
84
|
+
webda: {
|
|
85
|
+
services: {
|
|
86
|
+
Authentication: {
|
|
87
|
+
providers: {
|
|
88
|
+
email: {
|
|
89
|
+
text: "Test2"
|
|
111
90
|
}
|
|
112
91
|
}
|
|
113
92
|
}
|
|
114
93
|
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
94
|
+
}
|
|
95
|
+
}, undefined, 2));
|
|
96
|
+
await super.before();
|
|
118
97
|
}
|
|
119
|
-
initialLoad() {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.mailer, "DefinedMailer");
|
|
123
|
-
});
|
|
98
|
+
async initialLoad() {
|
|
99
|
+
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.text, "Test2");
|
|
100
|
+
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.mailer, "DefinedMailer");
|
|
124
101
|
}
|
|
125
102
|
};
|
|
126
103
|
__decorate([
|
|
127
|
-
|
|
104
|
+
test
|
|
128
105
|
], FileConfigurationNoReloadServiceTest.prototype, "initialLoad", null);
|
|
129
106
|
FileConfigurationNoReloadServiceTest = __decorate([
|
|
130
|
-
|
|
107
|
+
suite
|
|
131
108
|
], FileConfigurationNoReloadServiceTest);
|
|
132
|
-
let FileConfigurationNoReloadMissingServiceTest = class FileConfigurationNoReloadMissingServiceTest extends
|
|
109
|
+
let FileConfigurationNoReloadMissingServiceTest = class FileConfigurationNoReloadMissingServiceTest extends WebdaTest {
|
|
133
110
|
getTestConfiguration() {
|
|
134
111
|
return __dirname + "/../../test/config-file-no-reload.json";
|
|
135
112
|
}
|
|
136
|
-
before() {
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if ((0, fs_1.existsSync)(filename)) {
|
|
143
|
-
(0, fs_1.unlinkSync)(filename);
|
|
144
|
-
}
|
|
145
|
-
yield _super.before.call(this);
|
|
146
|
-
});
|
|
113
|
+
async before() {
|
|
114
|
+
const filename = __dirname + "/../../test/my-cnf.json";
|
|
115
|
+
if (existsSync(filename)) {
|
|
116
|
+
unlinkSync(filename);
|
|
117
|
+
}
|
|
118
|
+
await super.before();
|
|
147
119
|
}
|
|
148
|
-
initialLoad() {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.mailer, "DefinedMailer");
|
|
152
|
-
});
|
|
120
|
+
async initialLoad() {
|
|
121
|
+
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.text, "Test");
|
|
122
|
+
assert.strictEqual(this.webda.getConfiguration().services.Authentication.providers.email.mailer, "DefinedMailer");
|
|
153
123
|
}
|
|
154
124
|
};
|
|
155
125
|
__decorate([
|
|
156
|
-
|
|
126
|
+
test
|
|
157
127
|
], FileConfigurationNoReloadMissingServiceTest.prototype, "initialLoad", null);
|
|
158
128
|
FileConfigurationNoReloadMissingServiceTest = __decorate([
|
|
159
|
-
|
|
129
|
+
suite
|
|
160
130
|
], FileConfigurationNoReloadMissingServiceTest);
|
|
161
131
|
//# sourceMappingURL=fileconfiguration.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileconfiguration.spec.js","sourceRoot":"","sources":["../../src/services/fileconfiguration.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fileconfiguration.spec.js","sourceRoot":"","sources":["../../src/services/fileconfiguration.spec.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,E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AM,EAAE,CAAC;IACvB,CAAC;IAGD,KAAK,CAAC,WAAW;QACf,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACpH,CAAC;CACF,CAAA;AAJC;IADC,IAAI;8EAIJ;AAjBG,2CAA2C;IADhD,KAAK;GACA,2CAA2C,CAkBhD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Context, EventAuthenticationRegister, EventWithContext, Ident, Store } from "../index";
|
|
2
|
-
import { AclModel } from "../models/aclmodel";
|
|
3
|
-
import { CoreModel } from "../models/coremodel";
|
|
4
|
-
import { User } from "../models/user";
|
|
5
|
-
import { Authentication } from "./authentication";
|
|
6
|
-
import { NotificationService } from "./notificationservice";
|
|
7
|
-
import { DeepPartial, Service, ServiceParameters } from "./service";
|
|
1
|
+
import { Context, EventAuthenticationRegister, EventWithContext, Ident, Store } from "../index.js";
|
|
2
|
+
import { AclModel } from "../models/aclmodel.js";
|
|
3
|
+
import { CoreModel } from "../models/coremodel.js";
|
|
4
|
+
import { User } from "../models/user.js";
|
|
5
|
+
import { Authentication } from "./authentication.js";
|
|
6
|
+
import { NotificationService } from "./notificationservice.js";
|
|
7
|
+
import { DeepPartial, Service, ServiceParameters } from "./service.js";
|
|
8
8
|
interface InvitationAnswerBody {
|
|
9
9
|
accept: boolean;
|
|
10
10
|
}
|
|
@@ -166,11 +166,11 @@ export default class InvitationService<T extends InvitationParameters = Invitati
|
|
|
166
166
|
/**
|
|
167
167
|
* @inheritdoc
|
|
168
168
|
*/
|
|
169
|
-
resolve():
|
|
169
|
+
resolve(): this;
|
|
170
170
|
/**
|
|
171
171
|
* @inheritdoc
|
|
172
172
|
*/
|
|
173
|
-
init(): Promise<
|
|
173
|
+
init(): Promise<this>;
|
|
174
174
|
/**
|
|
175
175
|
* Accept or refuse for an invitation
|
|
176
176
|
* @param ctx
|