@webda/core 2.0.0-beta.3 → 2.1.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 +5 -5
- 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 +21 -25
- package/lib/core.js +233 -320
- package/lib/core.js.map +1 -1
- package/lib/core.spec.js +334 -406
- package/lib/core.spec.js.map +1 -1
- package/lib/index.d.ts +49 -48
- package/lib/index.js +53 -70
- 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 +128 -152
- package/lib/models/aclmodel.spec.js.map +1 -1
- package/lib/models/coremodel.d.ts +33 -14
- package/lib/models/coremodel.js +160 -117
- package/lib/models/coremodel.js.map +1 -1
- package/lib/models/coremodel.spec.js +143 -107
- package/lib/models/coremodel.spec.js.map +1 -1
- package/lib/models/deployment.js +1 -2
- package/lib/models/ident.d.ts +3 -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 +2 -2
- package/lib/models/ownermodel.js +39 -62
- package/lib/models/ownermodel.js.map +1 -1
- package/lib/models/ownermodel.spec.js +126 -168
- package/lib/models/ownermodel.spec.js.map +1 -1
- package/lib/models/rolemodel.d.ts +1 -1
- package/lib/models/rolemodel.js +24 -40
- package/lib/models/rolemodel.js.map +1 -1
- package/lib/models/rolemodel.spec.js +44 -63
- package/lib/models/rolemodel.spec.js.map +1 -1
- package/lib/models/user.d.ts +9 -9
- 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 +3 -3
- package/lib/queues/queueservice.js +51 -67
- package/lib/queues/queueservice.js.map +1 -1
- package/lib/router.d.ts +3 -3
- package/lib/router.js +46 -47
- 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 +23 -13
- package/lib/services/authentication.js +540 -566
- 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 -245
- 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 +45 -70
- 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 +1 -1
- package/lib/services/configuration.js +78 -105
- 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 +9 -4
- package/lib/services/cryptoservice.js +187 -221
- package/lib/services/cryptoservice.js.map +1 -1
- package/lib/services/cryptoservice.spec.js +88 -115
- package/lib/services/cryptoservice.spec.js.map +1 -1
- 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 +5 -5
- package/lib/services/filebinary.js +165 -210
- package/lib/services/filebinary.js.map +1 -1
- package/lib/services/filebinary.spec.d.ts +2 -1
- package/lib/services/filebinary.spec.js +106 -116
- package/lib/services/filebinary.spec.js.map +1 -1
- package/lib/services/fileconfiguration.d.ts +1 -1
- package/lib/services/fileconfiguration.js +25 -44
- 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 +8 -8
- package/lib/services/invitationservice.js +274 -314
- package/lib/services/invitationservice.js.map +1 -1
- package/lib/services/invitationservice.spec.js +443 -449
- package/lib/services/invitationservice.spec.js.map +1 -1
- package/lib/services/kubernetesconfiguration.d.ts +1 -1
- package/lib/services/kubernetesconfiguration.js +41 -60
- 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 +3 -3
- package/lib/services/notificationservice.js +21 -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 +4 -4
- package/lib/services/oauth.js +68 -83
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/oauth.spec.js +130 -156
- package/lib/services/oauth.spec.js.map +1 -1
- package/lib/services/proxy.d.ts +2 -6
- package/lib/services/proxy.js +45 -58
- package/lib/services/proxy.js.map +1 -1
- package/lib/services/proxy.spec.js +34 -53
- package/lib/services/proxy.spec.js.map +1 -1
- 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 +26 -3
- package/lib/services/service.js +68 -40
- 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 +2 -2
- package/lib/stores/aggregator.js +37 -58
- 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 +262 -289
- package/lib/stores/file.spec.js.map +1 -1
- package/lib/stores/mapper.d.ts +3 -3
- package/lib/stores/mapper.js +110 -137
- package/lib/stores/mapper.js.map +1 -1
- package/lib/stores/mapper.spec.js +133 -150
- package/lib/stores/mapper.spec.js.map +1 -1
- package/lib/stores/memory.d.ts +3 -3
- package/lib/stores/memory.js +98 -144
- package/lib/stores/memory.js.map +1 -1
- package/lib/stores/memory.spec.d.ts +2 -2
- package/lib/stores/memory.spec.js +124 -145
- package/lib/stores/memory.spec.js.map +1 -1
- package/lib/stores/store.d.ts +27 -17
- package/lib/stores/store.js +833 -849
- package/lib/stores/store.js.map +1 -1
- package/lib/stores/store.spec.d.ts +5 -4
- package/lib/stores/store.spec.js +625 -669
- 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 +73 -100
- package/lib/test.js.map +1 -1
- package/lib/unpackedapplication.d.ts +1 -1
- package/lib/unpackedapplication.js +49 -39
- 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 +7 -5
- package/lib/utils/context.js +95 -103
- package/lib/utils/context.js.map +1 -1
- package/lib/utils/context.spec.js +139 -163
- package/lib/utils/context.spec.js.map +1 -1
- package/lib/utils/cookie.d.ts +3 -3
- package/lib/utils/cookie.js +42 -61
- package/lib/utils/cookie.js.map +1 -1
- package/lib/utils/cookie.spec.js +42 -64
- 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 +3 -0
- package/lib/utils/httpcontext.js +48 -65
- package/lib/utils/httpcontext.js.map +1 -1
- package/lib/utils/httpcontext.spec.js +37 -56
- 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 +6 -6
- package/lib/utils/session.js +37 -59
- package/lib/utils/session.js.map +1 -1
- package/lib/utils/session.spec.js +38 -51
- package/lib/utils/session.spec.js.map +1 -1
- 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 +18 -13
- package/test/config-invitation.json +1 -3
- package/test/config.json +1 -2
- 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 +895 -190
|
@@ -1,40 +1,27 @@
|
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const stream_1 = require("stream");
|
|
24
|
-
const binary_1 = require("./binary");
|
|
25
|
-
const cloudbinary_spec_1 = require("./cloudbinary.spec");
|
|
26
|
-
class FaultyBinaryFile extends binary_1.BinaryFile {
|
|
27
|
-
get() {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const stream = new stream_1.Readable();
|
|
30
|
-
stream._read = () => {
|
|
31
|
-
stream.emit("error", new Error("Faulty stream"));
|
|
32
|
-
};
|
|
33
|
-
return stream;
|
|
34
|
-
});
|
|
7
|
+
import { suite, test } from "@testdeck/mocha";
|
|
8
|
+
import * as assert from "assert";
|
|
9
|
+
import * as fs from "fs";
|
|
10
|
+
import pkg from "fs-extra";
|
|
11
|
+
import { Readable } from "stream";
|
|
12
|
+
import { BinaryFile, MemoryBinaryFile } from "./binary.js";
|
|
13
|
+
import { CloudBinaryTest } from "./cloudbinary.spec.js";
|
|
14
|
+
const { removeSync } = pkg;
|
|
15
|
+
class FaultyBinaryFile extends BinaryFile {
|
|
16
|
+
async get() {
|
|
17
|
+
const stream = new Readable();
|
|
18
|
+
stream._read = () => {
|
|
19
|
+
stream.emit("error", new Error("Faulty stream"));
|
|
20
|
+
};
|
|
21
|
+
return stream;
|
|
35
22
|
}
|
|
36
23
|
}
|
|
37
|
-
let FileBinaryTest = class FileBinaryTest extends
|
|
24
|
+
let FileBinaryTest = class FileBinaryTest extends CloudBinaryTest {
|
|
38
25
|
initMap() {
|
|
39
26
|
let binary = this.getBinary();
|
|
40
27
|
binary.initMap(undefined);
|
|
@@ -46,21 +33,19 @@ let FileBinaryTest = class FileBinaryTest extends cloudbinary_spec_1.CloudBinary
|
|
|
46
33
|
MemoryIdents: "idents"
|
|
47
34
|
});
|
|
48
35
|
}
|
|
49
|
-
_getFile() {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}));
|
|
63
|
-
});
|
|
36
|
+
async _getFile() {
|
|
37
|
+
let binary = this.getBinary();
|
|
38
|
+
let ctx = await this.newContext();
|
|
39
|
+
ctx.getHttpContext().setBody("plop");
|
|
40
|
+
ctx.getHttpContext().headers = { "content-type": "text/plain" };
|
|
41
|
+
assert.deepStrictEqual(await binary._getFile(ctx), new MemoryBinaryFile(Buffer.from("plop"), {
|
|
42
|
+
challenge: undefined,
|
|
43
|
+
hash: undefined,
|
|
44
|
+
metadata: {},
|
|
45
|
+
mimetype: "text/plain",
|
|
46
|
+
name: "",
|
|
47
|
+
size: 4
|
|
48
|
+
}));
|
|
64
49
|
}
|
|
65
50
|
initRoutes() {
|
|
66
51
|
let binary = this.getBinary();
|
|
@@ -70,75 +55,67 @@ let FileBinaryTest = class FileBinaryTest extends cloudbinary_spec_1.CloudBinary
|
|
|
70
55
|
binary._name = "Binary";
|
|
71
56
|
binary.initRoutes();
|
|
72
57
|
}
|
|
73
|
-
downloadSignedUrl() {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
yield assert.rejects(() => this.execute(ctx, "test.webda.io", "GET", url.substring("http://test.webda.io".length).replace("eyJhbG", "ezJhbG")), /403/);
|
|
83
|
-
});
|
|
58
|
+
async downloadSignedUrl() {
|
|
59
|
+
let binary = this.getBinary();
|
|
60
|
+
let { user1, ctx } = await this.setupDefault(false);
|
|
61
|
+
let url = await binary.getRedirectUrlFromObject(user1.images[0], ctx, 60);
|
|
62
|
+
assert.notStrictEqual(url, undefined);
|
|
63
|
+
await this.execute(ctx, "test.webda.io", "GET", url.substring("http://test.webda.io".length));
|
|
64
|
+
// c59d?token -> d59d?token
|
|
65
|
+
await assert.rejects(() => this.execute(ctx, "test.webda.io", "GET", url.substring("http://test.webda.io".length).replace("c59d?token", "d59d?token")), /403/);
|
|
66
|
+
await assert.rejects(() => this.execute(ctx, "test.webda.io", "GET", url.substring("http://test.webda.io".length).replace("eyJhbG", "ezJhbG")), /403/);
|
|
84
67
|
}
|
|
85
|
-
verifyMapAndStore() {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
assert.throws(() => binary._verifyMapAndStore(ctx), /404/);
|
|
97
|
-
});
|
|
68
|
+
async verifyMapAndStore() {
|
|
69
|
+
let binary = this.getBinary();
|
|
70
|
+
let ctx = await this.newContext();
|
|
71
|
+
ctx.setPathParameters({ store: "Store", property: "images" });
|
|
72
|
+
assert.throws(() => binary._verifyMapAndStore(ctx), /404/);
|
|
73
|
+
ctx.setPathParameters({ store: "users", property: "images" });
|
|
74
|
+
assert.strictEqual(binary._verifyMapAndStore(ctx), this.getService("users"));
|
|
75
|
+
ctx.setPathParameters({ store: "users", property: "images2" });
|
|
76
|
+
assert.throws(() => binary._verifyMapAndStore(ctx), /404/);
|
|
77
|
+
ctx.setPathParameters({ store: "notexisting", property: "images" });
|
|
78
|
+
assert.throws(() => binary._verifyMapAndStore(ctx), /404/);
|
|
98
79
|
}
|
|
99
80
|
computeParameters() {
|
|
100
81
|
let binary = this.getBinary();
|
|
101
|
-
|
|
82
|
+
removeSync(binary.getParameters().folder);
|
|
102
83
|
binary.computeParameters();
|
|
103
84
|
assert.ok(fs.existsSync(binary.getParameters().folder));
|
|
104
85
|
}
|
|
105
|
-
challenge() {
|
|
106
|
-
|
|
107
|
-
yield this.testChallenge();
|
|
108
|
-
});
|
|
86
|
+
async challenge() {
|
|
87
|
+
await this.testChallenge();
|
|
109
88
|
}
|
|
110
|
-
badTokens() {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
token
|
|
133
|
-
});
|
|
134
|
-
yield assert.rejects(() => binary.storeBinary(ctx), /403/);
|
|
135
|
-
token = yield this.webda.getCrypto().jwtSign({ hash });
|
|
136
|
-
ctx.setPathParameters({
|
|
137
|
-
hash,
|
|
138
|
-
token
|
|
139
|
-
});
|
|
140
|
-
yield assert.rejects(() => binary.storeBinary(ctx), /412/);
|
|
89
|
+
async badTokens() {
|
|
90
|
+
let binary = this.getBinary();
|
|
91
|
+
let ctx = await this.newContext();
|
|
92
|
+
let { hash } = await new MemoryBinaryFile(Buffer.from("PLOP"), {}).getHashes();
|
|
93
|
+
let token = "badt";
|
|
94
|
+
ctx.setPathParameters({
|
|
95
|
+
hash,
|
|
96
|
+
token
|
|
97
|
+
});
|
|
98
|
+
ctx.getHttpContext().setBody("PLOP");
|
|
99
|
+
await assert.rejects(() => binary.storeBinary(ctx), /403/);
|
|
100
|
+
token = await this.webda.getCrypto().jwtSign({ hash: "PLOP2" });
|
|
101
|
+
ctx.setPathParameters({
|
|
102
|
+
hash,
|
|
103
|
+
token
|
|
104
|
+
});
|
|
105
|
+
await assert.rejects(() => binary.storeBinary(ctx), /403/);
|
|
106
|
+
// expired token
|
|
107
|
+
token = await this.webda.getCrypto().jwtSign({ hash, exp: Math.floor(Date.now() / 1000) - 60 * 60 });
|
|
108
|
+
ctx.setPathParameters({
|
|
109
|
+
hash,
|
|
110
|
+
token
|
|
141
111
|
});
|
|
112
|
+
await assert.rejects(() => binary.storeBinary(ctx), /403/);
|
|
113
|
+
token = await this.webda.getCrypto().jwtSign({ hash });
|
|
114
|
+
ctx.setPathParameters({
|
|
115
|
+
hash,
|
|
116
|
+
token
|
|
117
|
+
});
|
|
118
|
+
await assert.rejects(() => binary.storeBinary(ctx), /412/);
|
|
142
119
|
}
|
|
143
120
|
cleanNonExisting() {
|
|
144
121
|
let binary = this.getBinary();
|
|
@@ -153,39 +130,52 @@ let FileBinaryTest = class FileBinaryTest extends cloudbinary_spec_1.CloudBinary
|
|
|
153
130
|
});
|
|
154
131
|
assert.rejects(() => file.getHashes(), /Faulty stream/);
|
|
155
132
|
}
|
|
133
|
+
cov() {
|
|
134
|
+
let binary = this.getBinary();
|
|
135
|
+
try {
|
|
136
|
+
binary._touch("./touch.txt");
|
|
137
|
+
binary._touch("./touch.txt");
|
|
138
|
+
}
|
|
139
|
+
finally {
|
|
140
|
+
fs.unlinkSync("./touch.txt");
|
|
141
|
+
}
|
|
142
|
+
}
|
|
156
143
|
};
|
|
157
144
|
__decorate([
|
|
158
|
-
|
|
145
|
+
test
|
|
159
146
|
], FileBinaryTest.prototype, "initMap", null);
|
|
160
147
|
__decorate([
|
|
161
|
-
|
|
148
|
+
test
|
|
162
149
|
], FileBinaryTest.prototype, "_getFile", null);
|
|
163
150
|
__decorate([
|
|
164
|
-
|
|
151
|
+
test
|
|
165
152
|
], FileBinaryTest.prototype, "initRoutes", null);
|
|
166
153
|
__decorate([
|
|
167
|
-
|
|
154
|
+
test
|
|
168
155
|
], FileBinaryTest.prototype, "downloadSignedUrl", null);
|
|
169
156
|
__decorate([
|
|
170
|
-
|
|
157
|
+
test
|
|
171
158
|
], FileBinaryTest.prototype, "verifyMapAndStore", null);
|
|
172
159
|
__decorate([
|
|
173
|
-
|
|
160
|
+
test
|
|
174
161
|
], FileBinaryTest.prototype, "computeParameters", null);
|
|
175
162
|
__decorate([
|
|
176
|
-
|
|
163
|
+
test
|
|
177
164
|
], FileBinaryTest.prototype, "challenge", null);
|
|
178
165
|
__decorate([
|
|
179
|
-
|
|
166
|
+
test
|
|
180
167
|
], FileBinaryTest.prototype, "badTokens", null);
|
|
181
168
|
__decorate([
|
|
182
|
-
|
|
169
|
+
test
|
|
183
170
|
], FileBinaryTest.prototype, "cleanNonExisting", null);
|
|
184
171
|
__decorate([
|
|
185
|
-
|
|
172
|
+
test
|
|
186
173
|
], FileBinaryTest.prototype, "faultyBinary", null);
|
|
174
|
+
__decorate([
|
|
175
|
+
test
|
|
176
|
+
], FileBinaryTest.prototype, "cov", null);
|
|
187
177
|
FileBinaryTest = __decorate([
|
|
188
|
-
|
|
178
|
+
suite
|
|
189
179
|
], FileBinaryTest);
|
|
190
|
-
|
|
180
|
+
export { FileBinaryTest };
|
|
191
181
|
//# sourceMappingURL=filebinary.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filebinary.spec.js","sourceRoot":"","sources":["../../src/services/filebinary.spec.ts"],"names":[],"mapp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1B,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;IAGD,YAAY;QACV,MAAM,IAAI,GAAG,IAAI,gBAAgB,CAAC;YAChC,QAAQ,EAAE,YAAY;YACtB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;QACH,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,eAAe,CAAC,CAAC;IAC1D,CAAC;IAGD,GAAG;QACD,IAAI,MAAM,GAAe,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1C,IAAI;YACF,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YAC7B,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;SAC9B;gBAAS;YACR,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;SAC9B;IACH,CAAC;CACF,CAAA;AA/JC;IADC,IAAI;6CAWJ;AAGD;IADC,IAAI;8CAiBJ;AAGD;IADC,IAAI;gDAQJ;AAGD;IADC,IAAI;uDA6BJ;AAGD;IADC,IAAI;uDAYJ;AAGD;IADC,IAAI;uDAMJ;AAGD;IADC,IAAI;+CAGJ;AAGD;IADC,IAAI;+CA+BJ;AAGD;IADC,IAAI;sDAKJ;AAGD;IADC,IAAI;kDAQJ;AAGD;IADC,IAAI;yCASJ;AAhKG,cAAc;IADnB,KAAK;GACA,cAAc,CAiKnB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ConfigurationService, { ConfigurationServiceParameters } from "./configuration";
|
|
1
|
+
import ConfigurationService, { ConfigurationServiceParameters } from "./configuration.js";
|
|
2
2
|
/**
|
|
3
3
|
* Allow for dynamic configuration from a file
|
|
4
4
|
* @WebdaModda Webda/FileConfiguration
|
|
@@ -1,61 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FileConfigurationService = void 0;
|
|
13
|
-
const fs = require("fs");
|
|
14
|
-
const __1 = require("..");
|
|
15
|
-
const core_1 = require("../core");
|
|
16
|
-
const configuration_1 = require("./configuration");
|
|
1
|
+
import * as fs from "fs";
|
|
2
|
+
import { WebdaError } from "../core.js";
|
|
3
|
+
import { JSONUtils } from "../index.js";
|
|
4
|
+
import ConfigurationService from "./configuration.js";
|
|
17
5
|
/**
|
|
18
6
|
* Allow for dynamic configuration from a file
|
|
19
7
|
* @WebdaModda Webda/FileConfiguration
|
|
20
8
|
*/
|
|
21
|
-
class FileConfigurationService extends
|
|
9
|
+
export class FileConfigurationService extends ConfigurationService {
|
|
22
10
|
/** @ignore */
|
|
23
|
-
init() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return this;
|
|
39
|
-
});
|
|
11
|
+
async init() {
|
|
12
|
+
// Do not call super as we diverged
|
|
13
|
+
if (!this.parameters.source) {
|
|
14
|
+
throw new WebdaError("FILE_CONFIGURATION_SOURCE_MISSING", "Need a source for FileConfigurationService");
|
|
15
|
+
}
|
|
16
|
+
// Load it from where it should be
|
|
17
|
+
this.parameters.source = this._webda.getAppPath(this.parameters.source);
|
|
18
|
+
if (!fs.existsSync(this.parameters.source)) {
|
|
19
|
+
throw new WebdaError("FILE_CONFIGURATION_SOURCE_MISSING", "Need a source for FileConfigurationService");
|
|
20
|
+
}
|
|
21
|
+
fs.watchFile(this.parameters.source, this.checkUpdate.bind(this));
|
|
22
|
+
// Add webda info
|
|
23
|
+
this.watch("$.webda.services", this._webda.reinit.bind(this._webda));
|
|
24
|
+
await this.checkUpdate();
|
|
25
|
+
return this;
|
|
40
26
|
}
|
|
41
27
|
/**
|
|
42
28
|
* Load the JSON from source defined file
|
|
43
29
|
* @override
|
|
44
30
|
*/
|
|
45
|
-
loadConfiguration() {
|
|
46
|
-
return
|
|
47
|
-
return __1.JSONUtils.loadFile(this.parameters.source);
|
|
48
|
-
});
|
|
31
|
+
async loadConfiguration() {
|
|
32
|
+
return JSONUtils.loadFile(this.parameters.source);
|
|
49
33
|
}
|
|
50
34
|
/**
|
|
51
35
|
* Read the file and store it
|
|
52
36
|
*/
|
|
53
|
-
initConfiguration() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return this.loadAndStoreConfiguration();
|
|
57
|
-
});
|
|
37
|
+
async initConfiguration() {
|
|
38
|
+
this.parameters.source = this._webda.getAppPath(this.parameters.source);
|
|
39
|
+
return this.loadAndStoreConfiguration();
|
|
58
40
|
}
|
|
59
41
|
}
|
|
60
|
-
exports.FileConfigurationService = FileConfigurationService;
|
|
61
42
|
//# sourceMappingURL=fileconfiguration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileconfiguration.js","sourceRoot":"","sources":["../../src/services/fileconfiguration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fileconfiguration.js","sourceRoot":"","sources":["../../src/services/fileconfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,oBAAwD,MAAM,iBAAiB,CAAC;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