@into-cps-association/libms 0.4.5 → 0.5.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/DEVELOPER.md +80 -0
- package/DOCKER.md +295 -0
- package/README.md +8 -0
- package/compose.lib.dev.yml +9 -0
- package/compose.lib.yml +8 -0
- package/dist/src/app.module.d.ts +2 -1
- package/dist/src/app.module.js +14 -16
- package/dist/src/app.module.js.map +1 -1
- package/dist/src/bootstrap.d.ts +3 -3
- package/dist/src/bootstrap.js +13 -13
- package/dist/src/bootstrap.js.map +1 -1
- package/dist/src/cloudcmd/cloudcmd.d.ts +1 -5
- package/dist/src/cloudcmd/cloudcmd.js +15 -9
- package/dist/src/cloudcmd/cloudcmd.js.map +1 -1
- package/dist/src/enums/config-mode.enum.d.ts +4 -0
- package/dist/src/enums/config-mode.enum.js +6 -0
- package/dist/src/enums/config-mode.enum.js.map +1 -0
- package/dist/src/files/files-service.factory.d.ts +5 -0
- package/dist/src/files/files-service.factory.js +22 -0
- package/dist/src/files/files-service.factory.js.map +1 -0
- package/dist/src/files/files.module.d.ts +2 -1
- package/dist/src/files/files.module.js +23 -9
- package/dist/src/files/files.module.js.map +1 -1
- package/dist/src/files/files.resolver.d.ts +8 -0
- package/dist/src/files/{resolvers/files.resolver.js → files.resolver.js} +14 -14
- package/dist/src/files/files.resolver.js.map +1 -0
- package/dist/src/files/git/git-files.module.d.ts +2 -0
- package/dist/src/files/git/git-files.module.js +19 -0
- package/dist/src/files/git/git-files.module.js.map +1 -0
- package/dist/src/files/git/git-files.service.d.ts +14 -0
- package/dist/src/files/git/git-files.service.js +67 -0
- package/dist/src/files/git/git-files.service.js.map +1 -0
- package/dist/src/files/interfaces/files.service.interface.d.ts +6 -3
- package/dist/src/files/interfaces/files.service.interface.js +1 -2
- package/dist/src/files/interfaces/files.service.interface.js.map +1 -1
- package/dist/src/files/local/local-files.module.d.ts +2 -0
- package/dist/src/files/local/local-files.module.js +18 -0
- package/dist/src/files/local/local-files.module.js.map +1 -0
- package/dist/src/files/local/local-files.service.d.ts +14 -0
- package/dist/src/files/{services → local}/local-files.service.js +17 -15
- package/dist/src/files/local/local-files.service.js.map +1 -0
- package/dist/src/main.js +4 -6
- package/dist/src/main.js.map +1 -1
- package/dist/src/types.d.ts +19 -19
- package/dist/src/types.js +56 -59
- package/dist/src/types.js.map +1 -1
- package/dist/test/cloudcmd/cloudcmd.spec.js +14 -16
- package/dist/test/cloudcmd/cloudcmd.spec.js.map +1 -1
- package/dist/test/e2e/app.e2e.spec.js +18 -18
- package/dist/test/e2e/app.e2e.spec.js.map +1 -1
- package/dist/test/integration/files.service.integration.spec.js +28 -19
- package/dist/test/integration/files.service.integration.spec.js.map +1 -1
- package/dist/test/testUtil.d.ts +66 -68
- package/dist/test/testUtil.js +21 -23
- package/dist/test/testUtil.js.map +1 -1
- package/dist/test/unit/files-service.factory.unit.spec.js +22 -16
- package/dist/test/unit/files-service.factory.unit.spec.js.map +1 -1
- package/dist/test/unit/files.resolver.unit.spec.js +26 -24
- package/dist/test/unit/files.resolver.unit.spec.js.map +1 -1
- package/dist/test/unit/git-files.service.unit.spec.d.ts +1 -0
- package/dist/test/unit/git-files.service.unit.spec.js +55 -0
- package/dist/test/unit/git-files.service.unit.spec.js.map +1 -0
- package/dist/test/unit/local-files.service.unit.spec.js +23 -24
- package/dist/test/unit/local-files.service.unit.spec.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.js +60 -0
- package/jest.config.ts +47 -0
- package/package.json +55 -48
- package/src/app.module.ts +1 -1
- package/src/bootstrap.ts +7 -3
- package/src/cloudcmd/cloudcmd.ts +11 -3
- package/src/enums/config-mode.enum.ts +4 -0
- package/src/files/files-service.factory.ts +19 -0
- package/src/files/files.module.ts +24 -4
- package/src/files/{resolvers/files.resolver.ts → files.resolver.ts} +9 -8
- package/src/files/git/git-files.module.ts +9 -0
- package/src/files/git/git-files.service.ts +58 -0
- package/src/files/interfaces/files.service.interface.ts +4 -1
- package/src/files/local/local-files.module.ts +8 -0
- package/src/files/{services → local}/local-files.service.ts +15 -10
- package/src/main.ts +1 -1
- package/test/cloudcmd/cloudcmd.spec.ts +4 -6
- package/test/e2e/app.e2e.spec.ts +4 -3
- package/test/integration/files.service.integration.spec.ts +19 -4
- package/test/testUtil.ts +3 -0
- package/test/unit/files-service.factory.unit.spec.ts +24 -10
- package/test/unit/files.resolver.unit.spec.ts +19 -12
- package/test/unit/git-files.service.unit.spec.ts +81 -0
- package/test/unit/local-files.service.unit.spec.ts +4 -2
- package/tsconfig.json +10 -7
- package/.env +0 -6
- package/.eslintignore +0 -6
- package/.eslintrc +0 -53
- package/coverage/clover.xml +0 -162
- package/coverage/cobertura-coverage.xml +0 -306
- package/coverage/coverage-final.json +0 -8
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -176
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/bootstrap.ts.html +0 -196
- package/coverage/lcov-report/src/cloudcmd/cloudcmd.ts.html +0 -181
- package/coverage/lcov-report/src/cloudcmd/index.html +0 -116
- package/coverage/lcov-report/src/files/files.module.ts.html +0 -112
- package/coverage/lcov-report/src/files/index.html +0 -116
- package/coverage/lcov-report/src/files/resolvers/files.resolver.ts.html +0 -154
- package/coverage/lcov-report/src/files/resolvers/index.html +0 -116
- package/coverage/lcov-report/src/files/services/files-service.factory.ts.html +0 -151
- package/coverage/lcov-report/src/files/services/index.html +0 -131
- package/coverage/lcov-report/src/files/services/local-files.service.ts.html +0 -313
- package/coverage/lcov-report/src/index.html +0 -131
- package/coverage/lcov-report/src/types.ts.html +0 -361
- package/coverage/lcov.info +0 -237
- package/dist/src/files/resolvers/files.resolver.d.ts +0 -8
- package/dist/src/files/resolvers/files.resolver.js.map +0 -1
- package/dist/src/files/services/files-service.factory.d.ts +0 -12
- package/dist/src/files/services/files-service.factory.js +0 -40
- package/dist/src/files/services/files-service.factory.js.map +0 -1
- package/dist/src/files/services/local-files.service.d.ts +0 -11
- package/dist/src/files/services/local-files.service.js.map +0 -1
- package/jest.config.json +0 -30
- package/src/files/services/files-service.factory.ts +0 -22
- /package/{pm2.config.js → pm2.config.cjs} +0 -0
package/dist/src/types.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
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);
|
|
@@ -8,174 +7,172 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
exports.Query = exports.Project = exports.Repository = exports.RepositoryBlobConnection = exports.RepositoryBlob = exports.Tree = exports.TreeConnection = exports.TreeEdge = exports.TreeEntry = exports.BlobConnection = exports.BlobEdge = exports.Blob = void 0;
|
|
13
|
-
const graphql_1 = require("@nestjs/graphql");
|
|
10
|
+
import { Field, ObjectType } from '@nestjs/graphql';
|
|
14
11
|
let Blob = class Blob {
|
|
15
12
|
name;
|
|
16
13
|
type;
|
|
17
14
|
};
|
|
18
|
-
exports.Blob = Blob;
|
|
19
15
|
__decorate([
|
|
20
|
-
|
|
16
|
+
Field(),
|
|
21
17
|
__metadata("design:type", String)
|
|
22
18
|
], Blob.prototype, "name", void 0);
|
|
23
19
|
__decorate([
|
|
24
|
-
|
|
20
|
+
Field(),
|
|
25
21
|
__metadata("design:type", String)
|
|
26
22
|
], Blob.prototype, "type", void 0);
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
Blob = __decorate([
|
|
24
|
+
ObjectType()
|
|
29
25
|
], Blob);
|
|
26
|
+
export { Blob };
|
|
30
27
|
let BlobEdge = class BlobEdge {
|
|
31
28
|
node;
|
|
32
29
|
};
|
|
33
|
-
exports.BlobEdge = BlobEdge;
|
|
34
30
|
__decorate([
|
|
35
|
-
|
|
31
|
+
Field(() => Blob),
|
|
36
32
|
__metadata("design:type", Blob)
|
|
37
33
|
], BlobEdge.prototype, "node", void 0);
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
BlobEdge = __decorate([
|
|
35
|
+
ObjectType()
|
|
40
36
|
], BlobEdge);
|
|
37
|
+
export { BlobEdge };
|
|
41
38
|
let BlobConnection = class BlobConnection {
|
|
42
39
|
edges;
|
|
43
40
|
};
|
|
44
|
-
exports.BlobConnection = BlobConnection;
|
|
45
41
|
__decorate([
|
|
46
|
-
|
|
42
|
+
Field(() => [BlobEdge]),
|
|
47
43
|
__metadata("design:type", Array)
|
|
48
44
|
], BlobConnection.prototype, "edges", void 0);
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
BlobConnection = __decorate([
|
|
46
|
+
ObjectType()
|
|
51
47
|
], BlobConnection);
|
|
48
|
+
export { BlobConnection };
|
|
52
49
|
let TreeEntry = class TreeEntry {
|
|
53
50
|
name;
|
|
54
51
|
type;
|
|
55
52
|
};
|
|
56
|
-
exports.TreeEntry = TreeEntry;
|
|
57
53
|
__decorate([
|
|
58
|
-
|
|
54
|
+
Field(),
|
|
59
55
|
__metadata("design:type", String)
|
|
60
56
|
], TreeEntry.prototype, "name", void 0);
|
|
61
57
|
__decorate([
|
|
62
|
-
|
|
58
|
+
Field(),
|
|
63
59
|
__metadata("design:type", String)
|
|
64
60
|
], TreeEntry.prototype, "type", void 0);
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
TreeEntry = __decorate([
|
|
62
|
+
ObjectType()
|
|
67
63
|
], TreeEntry);
|
|
64
|
+
export { TreeEntry };
|
|
68
65
|
let TreeEdge = class TreeEdge {
|
|
69
66
|
node;
|
|
70
67
|
};
|
|
71
|
-
exports.TreeEdge = TreeEdge;
|
|
72
68
|
__decorate([
|
|
73
|
-
|
|
69
|
+
Field(() => TreeEntry),
|
|
74
70
|
__metadata("design:type", TreeEntry)
|
|
75
71
|
], TreeEdge.prototype, "node", void 0);
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
TreeEdge = __decorate([
|
|
73
|
+
ObjectType()
|
|
78
74
|
], TreeEdge);
|
|
75
|
+
export { TreeEdge };
|
|
79
76
|
let TreeConnection = class TreeConnection {
|
|
80
77
|
edges;
|
|
81
78
|
};
|
|
82
|
-
exports.TreeConnection = TreeConnection;
|
|
83
79
|
__decorate([
|
|
84
|
-
|
|
80
|
+
Field(() => [TreeEdge]),
|
|
85
81
|
__metadata("design:type", Array)
|
|
86
82
|
], TreeConnection.prototype, "edges", void 0);
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
TreeConnection = __decorate([
|
|
84
|
+
ObjectType()
|
|
89
85
|
], TreeConnection);
|
|
86
|
+
export { TreeConnection };
|
|
90
87
|
let Tree = class Tree {
|
|
91
88
|
blobs;
|
|
92
89
|
trees;
|
|
93
90
|
};
|
|
94
|
-
exports.Tree = Tree;
|
|
95
91
|
__decorate([
|
|
96
|
-
|
|
92
|
+
Field(),
|
|
97
93
|
__metadata("design:type", BlobConnection)
|
|
98
94
|
], Tree.prototype, "blobs", void 0);
|
|
99
95
|
__decorate([
|
|
100
|
-
|
|
96
|
+
Field(),
|
|
101
97
|
__metadata("design:type", TreeConnection)
|
|
102
98
|
], Tree.prototype, "trees", void 0);
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
Tree = __decorate([
|
|
100
|
+
ObjectType()
|
|
105
101
|
], Tree);
|
|
102
|
+
export { Tree };
|
|
106
103
|
let RepositoryBlob = class RepositoryBlob {
|
|
107
104
|
name;
|
|
108
105
|
rawBlob;
|
|
109
106
|
rawTextBlob;
|
|
110
107
|
};
|
|
111
|
-
exports.RepositoryBlob = RepositoryBlob;
|
|
112
108
|
__decorate([
|
|
113
|
-
|
|
109
|
+
Field(),
|
|
114
110
|
__metadata("design:type", String)
|
|
115
111
|
], RepositoryBlob.prototype, "name", void 0);
|
|
116
112
|
__decorate([
|
|
117
|
-
|
|
113
|
+
Field(),
|
|
118
114
|
__metadata("design:type", String)
|
|
119
115
|
], RepositoryBlob.prototype, "rawBlob", void 0);
|
|
120
116
|
__decorate([
|
|
121
|
-
|
|
117
|
+
Field(),
|
|
122
118
|
__metadata("design:type", String)
|
|
123
119
|
], RepositoryBlob.prototype, "rawTextBlob", void 0);
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
RepositoryBlob = __decorate([
|
|
121
|
+
ObjectType()
|
|
126
122
|
], RepositoryBlob);
|
|
123
|
+
export { RepositoryBlob };
|
|
127
124
|
let RepositoryBlobConnection = class RepositoryBlobConnection {
|
|
128
125
|
nodes;
|
|
129
126
|
};
|
|
130
|
-
exports.RepositoryBlobConnection = RepositoryBlobConnection;
|
|
131
127
|
__decorate([
|
|
132
|
-
|
|
128
|
+
Field(() => [RepositoryBlob]),
|
|
133
129
|
__metadata("design:type", Array)
|
|
134
130
|
], RepositoryBlobConnection.prototype, "nodes", void 0);
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
RepositoryBlobConnection = __decorate([
|
|
132
|
+
ObjectType()
|
|
137
133
|
], RepositoryBlobConnection);
|
|
134
|
+
export { RepositoryBlobConnection };
|
|
138
135
|
let Repository = class Repository {
|
|
139
136
|
tree;
|
|
140
137
|
blobs;
|
|
141
138
|
};
|
|
142
|
-
exports.Repository = Repository;
|
|
143
139
|
__decorate([
|
|
144
|
-
|
|
140
|
+
Field(),
|
|
145
141
|
__metadata("design:type", Tree)
|
|
146
142
|
], Repository.prototype, "tree", void 0);
|
|
147
143
|
__decorate([
|
|
148
|
-
|
|
144
|
+
Field(),
|
|
149
145
|
__metadata("design:type", RepositoryBlobConnection)
|
|
150
146
|
], Repository.prototype, "blobs", void 0);
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
Repository = __decorate([
|
|
148
|
+
ObjectType()
|
|
153
149
|
], Repository);
|
|
150
|
+
export { Repository };
|
|
154
151
|
let Project = class Project {
|
|
155
152
|
repository;
|
|
156
153
|
};
|
|
157
|
-
exports.Project = Project;
|
|
158
154
|
__decorate([
|
|
159
|
-
|
|
155
|
+
Field(() => Repository),
|
|
160
156
|
__metadata("design:type", Repository)
|
|
161
157
|
], Project.prototype, "repository", void 0);
|
|
162
|
-
|
|
163
|
-
|
|
158
|
+
Project = __decorate([
|
|
159
|
+
ObjectType()
|
|
164
160
|
], Project);
|
|
161
|
+
export { Project };
|
|
165
162
|
let Query = class Query {
|
|
166
163
|
listDirectory;
|
|
167
164
|
readFile;
|
|
168
165
|
};
|
|
169
|
-
exports.Query = Query;
|
|
170
166
|
__decorate([
|
|
171
|
-
|
|
167
|
+
Field(),
|
|
172
168
|
__metadata("design:type", Project)
|
|
173
169
|
], Query.prototype, "listDirectory", void 0);
|
|
174
170
|
__decorate([
|
|
175
|
-
|
|
171
|
+
Field(),
|
|
176
172
|
__metadata("design:type", Project)
|
|
177
173
|
], Query.prototype, "readFile", void 0);
|
|
178
|
-
|
|
179
|
-
|
|
174
|
+
Query = __decorate([
|
|
175
|
+
ObjectType()
|
|
180
176
|
], Query);
|
|
177
|
+
export { Query };
|
|
181
178
|
//# sourceMappingURL=types.js.map
|
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;A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-1,34 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const promises_1 = require("fs/promises");
|
|
5
|
-
const dotenv_1 = require("dotenv");
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { unlink, writeFile } from 'fs/promises';
|
|
3
|
+
import { config } from 'dotenv';
|
|
6
4
|
describe('cloudcmd test for the application', () => {
|
|
7
5
|
beforeAll(async () => {
|
|
8
|
-
|
|
9
|
-
await
|
|
6
|
+
config();
|
|
7
|
+
await writeFile(`${process.env.LOCAL_PATH}/test.txt`, 'content12345');
|
|
10
8
|
await new Promise((resolve) => setTimeout(resolve, 8000));
|
|
11
9
|
}, 10000);
|
|
12
10
|
afterAll(async () => {
|
|
13
|
-
await
|
|
14
|
-
await
|
|
11
|
+
await unlink(`${process.env.LOCAL_PATH}/test.txt`);
|
|
12
|
+
await unlink(`${process.env.LOCAL_PATH}/uploadTest.txt`);
|
|
15
13
|
}, 10000);
|
|
16
14
|
it('should return the correct directory that is set as root', async () => {
|
|
17
|
-
const response = await
|
|
15
|
+
const response = await axios.get(`http://localhost:${process.env.PORT}${process.env.APOLLO_PATH}/files/api/v1/fs`, {
|
|
18
16
|
responseType: 'json',
|
|
19
17
|
});
|
|
20
|
-
console.log(response.data);
|
|
21
18
|
expect(response.data.path).toEqual('/');
|
|
22
|
-
|
|
23
|
-
expect(
|
|
24
|
-
expect(
|
|
19
|
+
const fileNames = response.data.files.map((file) => file.name);
|
|
20
|
+
expect(fileNames).toContain('common');
|
|
21
|
+
expect(fileNames).toContain('user1');
|
|
22
|
+
expect(fileNames).toContain('user2');
|
|
25
23
|
}, 10000);
|
|
26
24
|
it('should return the content of a file that is uplaoded to cloudcmd ', async () => {
|
|
27
|
-
const response = await
|
|
25
|
+
const response = await axios.get(`http://localhost:${process.env.PORT}${process.env.APOLLO_PATH}/files/api/v1/fs/test.txt`);
|
|
28
26
|
expect(response.data).toEqual('content12345');
|
|
29
27
|
}, 10000);
|
|
30
28
|
it('should upload a file to cloudcmd', async () => {
|
|
31
|
-
const response = await
|
|
29
|
+
const response = await axios.put(`http://localhost:${process.env.PORT}${process.env.APOLLO_PATH}/files/api/v1/fs/uploadTest.txt`, 'some content', { responseType: 'text' });
|
|
32
30
|
expect(response.data).toEqual('save: ok("uploadTest.txt")');
|
|
33
31
|
}, 10000);
|
|
34
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudcmd.spec.js","sourceRoot":"","sources":["../../../test/cloudcmd/cloudcmd.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloudcmd.spec.js","sourceRoot":"","sources":["../../../test/cloudcmd/cloudcmd.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAAM,EAAE,CAAC;QAET,MAAM,SAAS,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,WAAW,EAAE,cAAc,CAAC,CAAC;QAEtE,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,QAAQ,CAAC,KAAK,IAAI,EAAE;QAClB,MAAM,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,WAAW,CAAC,CAAC;QACnD,MAAM,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,iBAAiB,CAAC,CAAC;IAC3D,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,EAAE,CAAC,yDAAyD,EAAE,KAAK,IAAI,EAAE;QACvE,MAA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AAC,IAAI,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAC9D,CAAC,EAAE,KAAK,CAAC,CAAC;AACZ,CAAC,CAAC,CAAC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const client = new
|
|
10
|
-
link: new
|
|
1
|
+
import { describe, it, expect } from '@jest/globals';
|
|
2
|
+
import { Test } from '@nestjs/testing';
|
|
3
|
+
import request from 'supertest';
|
|
4
|
+
import fetch from 'cross-fetch';
|
|
5
|
+
import { ApolloClient, InMemoryCache, gql, } from '@apollo/client/core/core.cjs';
|
|
6
|
+
import { HttpLink } from '@apollo/client/link/http/http.cjs';
|
|
7
|
+
import AppModule from '../../src/app.module';
|
|
8
|
+
import { e2eReadFile, e2elistDirectory, expectedFileContentResponse, expectedListDirectoryResponse, } from '../testUtil';
|
|
9
|
+
const client = new ApolloClient({
|
|
10
|
+
link: new HttpLink({
|
|
11
11
|
uri: `http://localhost:${process.env.PORT}${process.env.APOLLO_PATH}`,
|
|
12
|
-
fetch
|
|
12
|
+
fetch,
|
|
13
13
|
}),
|
|
14
|
-
cache: new
|
|
14
|
+
cache: new InMemoryCache({ addTypename: false }),
|
|
15
15
|
});
|
|
16
16
|
describe('End to End test for the application', () => {
|
|
17
17
|
let app;
|
|
18
18
|
beforeAll(async () => {
|
|
19
|
-
const moduleFixture = await
|
|
20
|
-
imports: [
|
|
19
|
+
const moduleFixture = await Test.createTestingModule({
|
|
20
|
+
imports: [AppModule],
|
|
21
21
|
}).compile();
|
|
22
22
|
app = moduleFixture.createNestApplication();
|
|
23
23
|
await app.init();
|
|
@@ -38,16 +38,16 @@ describe('End to End test for the application', () => {
|
|
|
38
38
|
expect({ data }).toEqual(expectedResponse);
|
|
39
39
|
}
|
|
40
40
|
it('should return the directory contents requested with HTTP POST query', async () => {
|
|
41
|
-
await HTTPQuery(
|
|
41
|
+
await HTTPQuery(e2elistDirectory, expectedListDirectoryResponse);
|
|
42
42
|
}, 10000);
|
|
43
43
|
it('should return the file content requested with HTTP POST query', async () => {
|
|
44
|
-
await HTTPQuery(
|
|
44
|
+
await HTTPQuery(e2eReadFile, expectedFileContentResponse);
|
|
45
45
|
}, 10000);
|
|
46
46
|
it('should return the directory contents requested with GraphQL query', async () => {
|
|
47
|
-
await GraphQLQuery(
|
|
47
|
+
await GraphQLQuery(gql(e2elistDirectory), expectedListDirectoryResponse);
|
|
48
48
|
}, 10000);
|
|
49
49
|
it('should return the file content requested with GraphQL query', async () => {
|
|
50
|
-
await GraphQLQuery(
|
|
50
|
+
await GraphQLQuery(gql(e2eReadFile), expectedFileContentResponse);
|
|
51
51
|
}, 10000);
|
|
52
52
|
});
|
|
53
53
|
//# sourceMappingURL=app.e2e.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.e2e.spec.js","sourceRoot":"","sources":["../../../test/e2e/app.e2e.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.e2e.spec.js","sourceRoot":"","sources":["../../../test/e2e/app.e2e.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,IAAI,EAAiB,MAAM,iBAAiB,CAAC;AAEtD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EACL,YAAY,EAEZ,aAAa,EACb,GAAG,GACJ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,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AC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,UAAU,YAAY,CACzB,KAAmB,EACnB,gBAAyB;QAEzB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/C,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7C,CAAC;IACD,EAAE,CAAC,qEAAqE,EAAE,KAAK,IAAI,EAAE;QACnF,MAAM,SAAS,CAAC,gBAAgB,EAAE,6BAA6B,CAAC,CAAC;IACnE,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,EAAE,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC7E,MAAM,SAAS,CAAC,WAAW,EAAE,2BAA2B,CAAC,CAAC;IAC5D,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,EAAE,CAAC,mEAAmE,EAAE,KAAK,IAAI,EAAE;QACjF,MAAM,YAAY,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,6BAA6B,CAAC,CAAC;IAC3E,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,EAAE,CAAC,6DAA6D,EAAE,KAAK,IAAI,EAAE;QAC3E,MAAM,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,2BAA2B,CAAC,CAAC;IACpE,CAAC,EAAE,KAAK,CAAC,CAAC;AACZ,CAAC,CAAC,CAAC"}
|
|
@@ -1,25 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { describe, it, expect, jest } from '@jest/globals';
|
|
2
|
+
import { Test } from '@nestjs/testing';
|
|
3
|
+
import { ConfigService } from '@nestjs/config';
|
|
4
|
+
import FilesResolver from '../../src/files/files.resolver';
|
|
5
|
+
import LocalFilesService from '../../src/files/local/local-files.service';
|
|
6
|
+
import { pathToTestDirectory, pathToTestFileContent, testDirectory, testFileContent, MockConfigService, } from '../testUtil';
|
|
7
|
+
import GitFilesService from '../../src/files/git/git-files.service';
|
|
8
|
+
import { FILE_SERVICE } from '../../src/files/interfaces/files.service.interface';
|
|
9
|
+
import FilesServiceFactory from '../../src/files/files-service.factory';
|
|
9
10
|
describe('Integration tests for FilesResolver', () => {
|
|
10
11
|
let filesResolver;
|
|
11
12
|
let mockConfigService;
|
|
12
13
|
beforeEach(async () => {
|
|
13
|
-
mockConfigService = new
|
|
14
|
-
const module = await
|
|
14
|
+
mockConfigService = new MockConfigService();
|
|
15
|
+
const module = await Test.createTestingModule({
|
|
15
16
|
providers: [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
FilesResolver,
|
|
18
|
+
{
|
|
19
|
+
provide: FILE_SERVICE,
|
|
20
|
+
useFactory: (configService, localFilesService, gitFilesService) => {
|
|
21
|
+
const fileServices = [localFilesService, gitFilesService];
|
|
22
|
+
return FilesServiceFactory.create(configService, fileServices);
|
|
23
|
+
},
|
|
24
|
+
inject: [ConfigService, LocalFilesService, GitFilesService],
|
|
25
|
+
},
|
|
26
|
+
LocalFilesService,
|
|
27
|
+
GitFilesService,
|
|
28
|
+
{ provide: ConfigService, useClass: MockConfigService },
|
|
20
29
|
],
|
|
21
30
|
}).compile();
|
|
22
|
-
filesResolver = module.get(
|
|
31
|
+
filesResolver = module.get(FilesResolver);
|
|
23
32
|
});
|
|
24
33
|
afterEach(() => {
|
|
25
34
|
jest.clearAllMocks();
|
|
@@ -35,14 +44,14 @@ describe('Integration tests for FilesResolver', () => {
|
|
|
35
44
|
});
|
|
36
45
|
describe('listDirectory', () => {
|
|
37
46
|
it('should list files', async () => {
|
|
38
|
-
const files = await filesResolver.listDirectory(
|
|
39
|
-
expect(files).toEqual(
|
|
47
|
+
const files = await filesResolver.listDirectory(pathToTestDirectory);
|
|
48
|
+
expect(files).toEqual(testDirectory);
|
|
40
49
|
});
|
|
41
50
|
});
|
|
42
51
|
describe('readFile', () => {
|
|
43
52
|
it('should read file', async () => {
|
|
44
|
-
const content = await filesResolver.readFile(
|
|
45
|
-
expect(content).toEqual(
|
|
53
|
+
const content = await filesResolver.readFile(pathToTestFileContent);
|
|
54
|
+
expect(content).toEqual(testFileContent);
|
|
46
55
|
});
|
|
47
56
|
});
|
|
48
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.service.integration.spec.js","sourceRoot":"","sources":["../../../test/integration/files.service.integration.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"files.service.integration.spec.js","sourceRoot":"","sources":["../../../test/integration/files.service.integration.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAiB,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,iBAAiB,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,eAAe,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAClF,OAAO,mBAAmB,MAAM,uCAAuC,CAAC;AAExE,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;IACnD,IAAI,aAA4B,CAAC;IACjC,IAAI,iBAAoC,CAAC;IAEzC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAkB,MAAM,IAAI,CAAC,mBAAmB,CAAC;YAC3D,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,mBAAmB,CAAC,CAAC;oBACrE,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;gBACvC,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;gBACxB,EAAE,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;oBAChC,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;oBACpE,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;gBAC3C,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/dist/test/testUtil.d.ts
CHANGED
|
@@ -1,90 +1,88 @@
|
|
|
1
1
|
export declare const readFileActualContent: string[];
|
|
2
|
-
export declare const pathToTestDirectory =
|
|
2
|
+
export declare const pathToTestDirectory = "user2";
|
|
3
3
|
export declare const testDirectory: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
repository: {
|
|
5
|
+
tree: {
|
|
6
|
+
blobs: {
|
|
7
|
+
edges: any[];
|
|
8
|
+
};
|
|
9
|
+
trees: {
|
|
10
|
+
edges: {
|
|
11
|
+
node: {
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
17
18
|
};
|
|
18
|
-
};
|
|
19
19
|
};
|
|
20
|
-
export declare const testFileName =
|
|
21
|
-
export declare const fstestFileContent =
|
|
22
|
-
export declare const pathToTestFileContent =
|
|
20
|
+
export declare const testFileName = "README.md";
|
|
21
|
+
export declare const fstestFileContent = "content123";
|
|
22
|
+
export declare const pathToTestFileContent = "user2/tools/README.md";
|
|
23
23
|
export declare const testFileArray: string[];
|
|
24
24
|
export declare const testFileContent: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
repository: {
|
|
26
|
+
blobs: {
|
|
27
|
+
nodes: {
|
|
28
|
+
name: string;
|
|
29
|
+
rawBlob: string;
|
|
30
|
+
rawTextBlob: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
32
33
|
};
|
|
33
|
-
};
|
|
34
34
|
};
|
|
35
35
|
export declare function sleep(ms: any): void;
|
|
36
36
|
export declare class MockConfigService {
|
|
37
|
-
|
|
37
|
+
get(key: string): string;
|
|
38
38
|
}
|
|
39
39
|
export declare const mockReadFileResponseData: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
project: {
|
|
41
|
+
__typename: string;
|
|
42
|
+
repository: {
|
|
43
|
+
__typename: string;
|
|
44
|
+
blobs: {
|
|
45
|
+
nodes: {
|
|
46
|
+
__typename: string;
|
|
47
|
+
name: string;
|
|
48
|
+
rawBlob: string;
|
|
49
|
+
rawTextBlob: string;
|
|
50
|
+
}[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
52
53
|
};
|
|
53
|
-
};
|
|
54
54
|
};
|
|
55
55
|
export declare const expectedListDirectoryResponse: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
data: {
|
|
57
|
+
listDirectory: {
|
|
58
|
+
repository: {
|
|
59
|
+
tree: {
|
|
60
|
+
trees: {
|
|
61
|
+
edges: {
|
|
62
|
+
node: {
|
|
63
|
+
name: string;
|
|
64
|
+
};
|
|
65
|
+
}[];
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
67
69
|
};
|
|
68
|
-
};
|
|
69
70
|
};
|
|
70
|
-
};
|
|
71
71
|
};
|
|
72
72
|
export declare const expectedFileContentResponse: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
data: {
|
|
74
|
+
readFile: {
|
|
75
|
+
repository: {
|
|
76
|
+
blobs: {
|
|
77
|
+
nodes: {
|
|
78
|
+
name: string;
|
|
79
|
+
rawBlob: string;
|
|
80
|
+
rawTextBlob: string;
|
|
81
|
+
}[];
|
|
82
|
+
};
|
|
83
|
+
};
|
|
82
84
|
};
|
|
83
|
-
};
|
|
84
85
|
};
|
|
85
|
-
};
|
|
86
86
|
};
|
|
87
|
-
export declare const e2elistDirectory =
|
|
88
|
-
|
|
89
|
-
export declare const e2eReadFile =
|
|
90
|
-
'query {\n readFile(path:"user2/tools/README.md") {\n repository {\n blobs {\n nodes {\n name\n rawBlob\n rawTextBlob\n }\n }\n }\n }\n}';
|
|
87
|
+
export declare const e2elistDirectory = "query {\n listDirectory(path:\"user2\")\n {\n repository{\n tree{\n trees{\n edges{\n node{\n name\n \n }\n }\n }\n }\n }\n }\n}";
|
|
88
|
+
export declare const e2eReadFile = "query {\n readFile(path:\"user2/tools/README.md\") {\n repository {\n blobs {\n nodes {\n name\n rawBlob\n rawTextBlob\n }\n }\n }\n }\n}";
|