not-node 5.1.44 → 6.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/.eslintrc.json +32 -38
- package/index.js +6 -0
- package/package.json +12 -11
- package/src/app.js +2 -2
- package/src/auth/index.js +0 -2
- package/src/auth/routes.js +25 -61
- package/src/auth/rules.js +8 -7
- package/src/common.js +19 -0
- package/src/identity/exceptions.js +17 -0
- package/src/identity/identity.js +61 -0
- package/src/identity/index.js +35 -0
- package/src/identity/providers/session.js +137 -0
- package/src/identity/providers/token.js +255 -0
- package/src/manifest/result.filter.js +268 -0
- package/src/manifest/route.js +6 -36
- package/static2.js +24 -0
- package/test/auth/identity.js +0 -0
- package/test/auth/routes.js +1 -1
- package/test/auth.js +427 -229
- package/test/env.js +20 -20
- package/test/fields.js +3 -2
- package/test/identity/identity.js +1 -0
- package/test/identity/index.js +12 -0
- package/test/identity/providers/session.js +227 -0
- package/test/identity/providers/token.js +244 -0
- package/test/identity.js +5 -0
- package/test/init/app.js +359 -365
- package/test/init/bodyparser.js +37 -39
- package/test/init/compression.js +29 -31
- package/test/init/cors.js +38 -39
- package/test/init/db.js +60 -64
- package/test/init/env.js +109 -114
- package/test/init/express.js +50 -47
- package/test/init/fileupload.js +30 -32
- package/test/init/http.js +258 -240
- package/test/init/informer.js +20 -24
- package/test/init/methodoverride.js +29 -31
- package/test/init/middleware.js +56 -58
- package/test/init/modules.js +19 -19
- package/test/init/monitoring.js +22 -22
- package/test/init/routes.js +185 -171
- package/test/init/security.js +77 -103
- package/test/init/sessions/mongoose.js +56 -57
- package/test/init/sessions/redis.js +59 -61
- package/test/init/sessions.js +84 -79
- package/test/init/static.js +108 -113
- package/test/init/template.js +46 -41
- package/test/notInit.js +217 -217
- package/test/notManifest.js +232 -191
- package/test/notRoute.js +1022 -799
- package/test/result.filter.js +422 -0
- package/src/auth/session.js +0 -151
- package/test/auth/session.js +0 -266
package/test/init/bodyparser.js
CHANGED
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
const InitBodyparser = require(
|
|
2
|
-
const mock = require(
|
|
1
|
+
const InitBodyparser = require("../../src/init/lib/bodyparser");
|
|
2
|
+
const mock = require("mock-require");
|
|
3
3
|
|
|
4
|
-
module.exports = ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
module.exports = ({ expect }) => {
|
|
5
|
+
describe("BodyParser", () => {
|
|
6
|
+
describe("run", () => {
|
|
7
|
+
it("run, middleware returned and set", async () => {
|
|
8
|
+
let useCalled = false;
|
|
9
|
+
let middlewareGeneratorCalled = 0;
|
|
10
|
+
mock("body-parser", {
|
|
11
|
+
json(param) {
|
|
12
|
+
expect(typeof param).to.be.equal("object");
|
|
13
|
+
middlewareGeneratorCalled++;
|
|
14
|
+
return () => {};
|
|
15
|
+
},
|
|
16
|
+
urlencoded(param) {
|
|
17
|
+
expect(typeof param).to.be.equal("object");
|
|
18
|
+
middlewareGeneratorCalled++;
|
|
19
|
+
return () => {};
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const master = {
|
|
23
|
+
getServer() {
|
|
24
|
+
return {
|
|
25
|
+
use(func) {
|
|
26
|
+
expect(typeof func).to.be.equal("function");
|
|
27
|
+
useCalled = true;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
await new InitBodyparser().run({ master });
|
|
33
|
+
expect(useCalled).to.be.true;
|
|
34
|
+
expect(middlewareGeneratorCalled).to.be.equal(2);
|
|
35
|
+
});
|
|
23
36
|
});
|
|
24
|
-
const master = {
|
|
25
|
-
getServer() {
|
|
26
|
-
return {
|
|
27
|
-
use(func) {
|
|
28
|
-
expect(typeof func).to.be.equal('function');
|
|
29
|
-
useCalled = true;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
await (new InitBodyparser()).run({master});
|
|
35
|
-
expect(useCalled).to.be.true;
|
|
36
|
-
expect(middlewareGeneratorCalled).to.be.equal(2);
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
after(() => {
|
|
39
|
+
mock.stop("body-parser");
|
|
40
|
+
});
|
|
42
41
|
});
|
|
43
|
-
});
|
|
44
42
|
};
|
package/test/init/compression.js
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
const InitCompression = require(
|
|
2
|
-
const mock = require(
|
|
1
|
+
const InitCompression = require("../../src/init/lib/compression");
|
|
2
|
+
const mock = require("mock-require");
|
|
3
3
|
|
|
4
|
-
module.exports = ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
module.exports = ({ expect }) => {
|
|
5
|
+
describe("Compression", () => {
|
|
6
|
+
describe("run", () => {
|
|
7
|
+
it("run, middleware returned and set", async () => {
|
|
8
|
+
let useCalled = false;
|
|
9
|
+
let compressionCalled = false;
|
|
10
|
+
mock("compression", () => {
|
|
11
|
+
compressionCalled = true;
|
|
12
|
+
return () => {};
|
|
13
|
+
});
|
|
14
|
+
const master = {
|
|
15
|
+
getServer() {
|
|
16
|
+
return {
|
|
17
|
+
use(func) {
|
|
18
|
+
expect(typeof func).to.be.equal("function");
|
|
19
|
+
useCalled = true;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
await new InitCompression().run({ master });
|
|
25
|
+
expect(useCalled).to.be.true;
|
|
26
|
+
expect(compressionCalled).to.be.true;
|
|
27
|
+
});
|
|
15
28
|
});
|
|
16
|
-
const master = {
|
|
17
|
-
getServer() {
|
|
18
|
-
return {
|
|
19
|
-
use(func) {
|
|
20
|
-
expect(typeof func).to.be.equal('function');
|
|
21
|
-
useCalled = true;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
await (new InitCompression()).run({master});
|
|
27
|
-
expect(useCalled).to.be.true;
|
|
28
|
-
expect(compressionCalled).to.be.true;
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
after(() => {
|
|
31
|
+
mock.stop("compression");
|
|
32
|
+
});
|
|
34
33
|
});
|
|
35
|
-
});
|
|
36
34
|
};
|
package/test/init/cors.js
CHANGED
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
const InitCORS = require(
|
|
2
|
-
const mock = require(
|
|
1
|
+
const InitCORS = require("../../src/init/lib/cors");
|
|
2
|
+
const mock = require("mock-require");
|
|
3
3
|
|
|
4
|
-
mock(
|
|
5
|
-
|
|
4
|
+
mock("cors", () => {
|
|
5
|
+
return () => {};
|
|
6
6
|
});
|
|
7
7
|
|
|
8
|
-
module.exports = ({expect})=>{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
module.exports = ({ expect }) => {
|
|
9
|
+
describe("InitCORS", () => {
|
|
10
|
+
it("getOriginFilter", () => {
|
|
11
|
+
const res = InitCORS.getOriginFilter(["name1", "name3"]);
|
|
12
|
+
res("name", (a, b) => {
|
|
13
|
+
expect(a).to.be.null;
|
|
14
|
+
expect(b).to.be.false;
|
|
15
|
+
});
|
|
16
|
+
res("name1", (a, b) => {
|
|
17
|
+
expect(a).to.be.null;
|
|
18
|
+
expect(b).to.be.true;
|
|
19
|
+
});
|
|
15
20
|
});
|
|
16
|
-
res('name1', (a, b)=>{
|
|
17
|
-
expect(a).to.be.null;
|
|
18
|
-
expect(b).to.be.true;
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
});
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
22
|
+
it("run", async () => {
|
|
23
|
+
let mdSet = false;
|
|
24
|
+
const config = {
|
|
25
|
+
get(str) {
|
|
26
|
+
return {
|
|
27
|
+
cors: ["domain1", "domain2"],
|
|
28
|
+
}[str];
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const master = {
|
|
32
|
+
getServer() {
|
|
33
|
+
return {
|
|
34
|
+
use(md) {
|
|
35
|
+
expect(typeof md).to.be.equal("function");
|
|
36
|
+
mdSet = true;
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
await new InitCORS().run({ config, master });
|
|
42
|
+
expect(mdSet).to.be.equal(true);
|
|
43
|
+
});
|
|
44
44
|
});
|
|
45
|
-
});
|
|
46
45
|
};
|
package/test/init/db.js
CHANGED
|
@@ -1,70 +1,66 @@
|
|
|
1
|
-
const path = require(
|
|
2
|
-
const mock = require(
|
|
3
|
-
const InitDB = require(
|
|
4
|
-
const pathToIncrement = path.resolve(__dirname,
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const mock = require("mock-require");
|
|
3
|
+
const InitDB = require("../../src/init/lib/db");
|
|
4
|
+
const pathToIncrement = path.resolve(__dirname, "../../src/model/increment");
|
|
5
5
|
|
|
6
|
-
class Schema{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
module.exports = ({
|
|
13
|
-
expect
|
|
14
|
-
}) => {
|
|
6
|
+
class Schema {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.statics = {};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
describe(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
12
|
+
module.exports = ({ expect }) => {
|
|
13
|
+
describe("DB", () => {
|
|
14
|
+
describe("run", () => {
|
|
15
|
+
it("simple", async () => {
|
|
16
|
+
console.log(pathToIncrement);
|
|
17
|
+
const config = {
|
|
18
|
+
get(str) {
|
|
19
|
+
return {
|
|
20
|
+
mongoose: {
|
|
21
|
+
uri: "mongodb://localhost/base?authSource=base",
|
|
22
|
+
options: {
|
|
23
|
+
host: "localhost",
|
|
24
|
+
autoIndex: false,
|
|
25
|
+
poolSize: 10,
|
|
26
|
+
bufferMaxEntries: 0,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
}[str];
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
mock("mongoose", {
|
|
33
|
+
async connect(uri, opts) {
|
|
34
|
+
expect(typeof uri).to.be.equal("string");
|
|
35
|
+
expect(typeof opts).to.be.equal("object");
|
|
36
|
+
},
|
|
37
|
+
model() {
|
|
38
|
+
return {
|
|
39
|
+
getNext() {},
|
|
40
|
+
rebase() {},
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
Schema,
|
|
44
|
+
fakeMongoose: true,
|
|
45
|
+
});
|
|
46
|
+
mock(pathToIncrement, {
|
|
47
|
+
init() {},
|
|
48
|
+
});
|
|
49
|
+
const master = {
|
|
50
|
+
setMongoose(itm) {
|
|
51
|
+
expect(itm.fakeMongoose).to.be.true;
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
await new InitDB().run({ config, master });
|
|
55
|
+
});
|
|
48
56
|
});
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
after(() => {
|
|
58
|
+
mock.stop("mongoose");
|
|
59
|
+
mock.stop(pathToIncrement);
|
|
60
|
+
const mod = require(pathToIncrement);
|
|
61
|
+
delete mod.model;
|
|
62
|
+
delete mod.next;
|
|
63
|
+
delete mod.rebase;
|
|
51
64
|
});
|
|
52
|
-
const master = {
|
|
53
|
-
setMongoose(itm){
|
|
54
|
-
expect(itm.fakeMongoose).to.be.true;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
await new InitDB().run({config, master});
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
});
|
|
61
|
-
after(() => {
|
|
62
|
-
mock.stop('mongoose');
|
|
63
|
-
mock.stop(pathToIncrement);
|
|
64
|
-
const mod = require(pathToIncrement);
|
|
65
|
-
delete mod.model;
|
|
66
|
-
delete mod.next;
|
|
67
|
-
delete mod.rebase;
|
|
68
65
|
});
|
|
69
|
-
});
|
|
70
66
|
};
|
package/test/init/env.js
CHANGED
|
@@ -1,126 +1,121 @@
|
|
|
1
|
-
const InitEnv = require(
|
|
1
|
+
const InitEnv = require("../../src/init/lib/env");
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
3
|
+
function getFromLib(vals, path, def) {
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(vals, path)) {
|
|
5
|
+
return vals[path];
|
|
6
|
+
} else {
|
|
7
|
+
return def;
|
|
8
|
+
}
|
|
10
9
|
}
|
|
11
10
|
|
|
11
|
+
module.exports = ({ expect }) => {
|
|
12
|
+
describe("Envs", () => {
|
|
13
|
+
describe("getProxyPort", () => {
|
|
14
|
+
it("proxy:port - number", () => {
|
|
15
|
+
const config = {
|
|
16
|
+
get(path) {
|
|
17
|
+
return path === "proxy:port" ? 8080 : null;
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
const port = InitEnv.getProxyPort(config);
|
|
21
|
+
expect(port).to.be.equal(8080);
|
|
22
|
+
});
|
|
12
23
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
expect(port).to.be.equal(8080);
|
|
24
|
-
});
|
|
24
|
+
it("port - string", () => {
|
|
25
|
+
const config = {
|
|
26
|
+
get(path) {
|
|
27
|
+
return path === "port" ? "80" : null;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
const port = InitEnv.getProxyPort(config);
|
|
31
|
+
expect(port).to.be.equal(80);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
25
34
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
expect(port).to.be.equal(80);
|
|
34
|
-
});
|
|
35
|
-
});
|
|
35
|
+
describe("getFullServerName", () => {
|
|
36
|
+
it("proxy:secure - true, proxy:port - 8080", () => {
|
|
37
|
+
const vals = {
|
|
38
|
+
"proxy:secure": true,
|
|
39
|
+
"proxy:port": 8080,
|
|
40
|
+
host: "hostname",
|
|
41
|
+
};
|
|
36
42
|
|
|
43
|
+
const config = {
|
|
44
|
+
get(path) {
|
|
45
|
+
return getFromLib(vals, path, null);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
const address = InitEnv.getFullServerName(config);
|
|
49
|
+
expect(address).to.be.equal("https://hostname:8080");
|
|
50
|
+
});
|
|
37
51
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
52
|
+
it("proxy:secure - false, proxy:port - 80", () => {
|
|
53
|
+
const vals = {
|
|
54
|
+
"proxy:secure": false,
|
|
55
|
+
"proxy:port": 80,
|
|
56
|
+
host: "hostname",
|
|
57
|
+
};
|
|
45
58
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
const config = {
|
|
60
|
+
get(path) {
|
|
61
|
+
return getFromLib(vals, path, null);
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
const address = InitEnv.getFullServerName(config);
|
|
65
|
+
expect(address).to.be.equal("http://hostname");
|
|
66
|
+
});
|
|
67
|
+
});
|
|
54
68
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
describe("run", () => {
|
|
70
|
+
it("path:ws - empty", async () => {
|
|
71
|
+
const vals = {
|
|
72
|
+
"proxy:secure": true,
|
|
73
|
+
"proxy:port": 8080,
|
|
74
|
+
host: "hostname",
|
|
75
|
+
"path:ws": undefined,
|
|
76
|
+
};
|
|
77
|
+
const master = {
|
|
78
|
+
getAbsolutePath(str) {
|
|
79
|
+
return str + "_fake_absolute";
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
const options = {
|
|
83
|
+
pathToApp: "pathToApp__fake",
|
|
84
|
+
pathToNPM: "pathToNPM__fake",
|
|
85
|
+
};
|
|
86
|
+
const config = {
|
|
87
|
+
get(path) {
|
|
88
|
+
return getFromLib(vals, path, null);
|
|
89
|
+
},
|
|
90
|
+
set() {},
|
|
91
|
+
};
|
|
92
|
+
await new InitEnv().run({ master, options, config });
|
|
93
|
+
});
|
|
61
94
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
95
|
+
it("path:ws - not empty", async () => {
|
|
96
|
+
const vals = {
|
|
97
|
+
"proxy:secure": true,
|
|
98
|
+
"proxy:port": 8080,
|
|
99
|
+
host: "hostname",
|
|
100
|
+
"path:ws": "some_path",
|
|
101
|
+
};
|
|
102
|
+
const master = {
|
|
103
|
+
getAbsolutePath(str) {
|
|
104
|
+
return str + "_fake_absolute";
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
const options = {
|
|
108
|
+
pathToApp: "pathToApp__fake",
|
|
109
|
+
pathToNPM: "pathToNPM__fake",
|
|
110
|
+
};
|
|
111
|
+
const config = {
|
|
112
|
+
get(path) {
|
|
113
|
+
return getFromLib(vals, path, null);
|
|
114
|
+
},
|
|
115
|
+
set() {},
|
|
116
|
+
};
|
|
117
|
+
await new InitEnv().run({ master, options, config });
|
|
118
|
+
});
|
|
119
|
+
});
|
|
70
120
|
});
|
|
71
|
-
|
|
72
|
-
describe('run', ()=>{
|
|
73
|
-
it('path:ws - empty', async ()=>{
|
|
74
|
-
const vals = {
|
|
75
|
-
'proxy:secure': true,
|
|
76
|
-
'proxy:port': 8080,
|
|
77
|
-
'host': 'hostname',
|
|
78
|
-
'path:ws': undefined
|
|
79
|
-
};
|
|
80
|
-
const master = {
|
|
81
|
-
getAbsolutePath(str){
|
|
82
|
-
return str+'_fake_absolute';
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
const options = {
|
|
86
|
-
pathToApp: 'pathToApp__fake',
|
|
87
|
-
pathToNPM: 'pathToNPM__fake',
|
|
88
|
-
};
|
|
89
|
-
const config = {
|
|
90
|
-
get(path){
|
|
91
|
-
return getFromLib(vals, path, null);
|
|
92
|
-
},
|
|
93
|
-
set(){}
|
|
94
|
-
};
|
|
95
|
-
await new InitEnv().run({master, options, config});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('path:ws - not empty', async ()=>{
|
|
99
|
-
const vals = {
|
|
100
|
-
'proxy:secure': true,
|
|
101
|
-
'proxy:port': 8080,
|
|
102
|
-
'host': 'hostname',
|
|
103
|
-
'path:ws': 'some_path'
|
|
104
|
-
};
|
|
105
|
-
const master = {
|
|
106
|
-
getAbsolutePath(str){
|
|
107
|
-
return str+'_fake_absolute';
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
const options = {
|
|
111
|
-
pathToApp: 'pathToApp__fake',
|
|
112
|
-
pathToNPM: 'pathToNPM__fake',
|
|
113
|
-
};
|
|
114
|
-
const config = {
|
|
115
|
-
get(path){
|
|
116
|
-
return getFromLib(vals, path, null);
|
|
117
|
-
},
|
|
118
|
-
set(){}
|
|
119
|
-
};
|
|
120
|
-
await new InitEnv().run({master, options, config});
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
});
|
|
126
121
|
};
|