@into-cps-association/libms 0.3.1 → 0.4.3
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 +24 -7
- package/README.md +42 -43
- package/config/.env.default +6 -0
- package/config/http.json +30 -0
- package/package.json +41 -31
- package/pm2.config.js +10 -0
- package/src/bootstrap.ts +8 -0
- package/src/cloudcmd/cloudcmd.ts +32 -0
- package/src/files/files.module.ts +1 -7
- package/src/files/services/files-service.factory.ts +0 -5
- package/src/files/services/local-files.service.ts +2 -2
- package/src/main.ts +12 -7
- package/test/cloudcmd/cloudcmd.spec.ts +52 -0
- package/test/e2e/app.e2e.spec.ts +42 -42
- package/test/integration/files.service.integration.spec.ts +1 -3
- package/test/testUtil.ts +1 -10
- package/test/unit/files-service.factory.unit.spec.ts +0 -9
- package/tsconfig.json +1 -1
- package/.env +0 -9
- package/dist/src/app.module.d.ts +0 -2
- package/dist/src/app.module.js +0 -36
- package/dist/src/app.module.js.map +0 -1
- package/dist/src/bootstrap.d.ts +0 -6
- package/dist/src/bootstrap.js +0 -27
- package/dist/src/bootstrap.js.map +0 -1
- package/dist/src/files/files.module.d.ts +0 -2
- package/dist/src/files/files.module.js +0 -27
- package/dist/src/files/files.module.js.map +0 -1
- package/dist/src/files/interfaces/files.service.interface.d.ts +0 -5
- package/dist/src/files/interfaces/files.service.interface.js +0 -3
- package/dist/src/files/interfaces/files.service.interface.js.map +0 -1
- package/dist/src/files/queries.d.ts +0 -2
- package/dist/src/files/queries.js +0 -47
- package/dist/src/files/queries.js.map +0 -1
- package/dist/src/files/resolvers/files.resolver.d.ts +0 -8
- package/dist/src/files/resolvers/files.resolver.js +0 -49
- package/dist/src/files/resolvers/files.resolver.js.map +0 -1
- package/dist/src/files/services/files-service.factory.d.ts +0 -11
- package/dist/src/files/services/files-service.factory.js +0 -48
- package/dist/src/files/services/files-service.factory.js.map +0 -1
- package/dist/src/files/services/gitlab-files.service.d.ts +0 -12
- package/dist/src/files/services/gitlab-files.service.js +0 -65
- package/dist/src/files/services/gitlab-files.service.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 +0 -77
- package/dist/src/files/services/local-files.service.js.map +0 -1
- package/dist/src/main.d.ts +0 -2
- package/dist/src/main.js +0 -20
- package/dist/src/main.js.map +0 -1
- package/dist/src/types.d.ts +0 -43
- package/dist/src/types.js +0 -181
- package/dist/src/types.js.map +0 -1
- package/dist/test/e2e/app.e2e.spec.d.ts +0 -1
- package/dist/test/e2e/app.e2e.spec.js +0 -36
- package/dist/test/e2e/app.e2e.spec.js.map +0 -1
- package/dist/test/integration/files.service.integration.spec.d.ts +0 -1
- package/dist/test/integration/files.service.integration.spec.js +0 -53
- package/dist/test/integration/files.service.integration.spec.js.map +0 -1
- package/dist/test/testUtil.d.ts +0 -88
- package/dist/test/testUtil.js +0 -182
- package/dist/test/testUtil.js.map +0 -1
- package/dist/test/unit/files-service.factory.unit.spec.d.ts +0 -1
- package/dist/test/unit/files-service.factory.unit.spec.js +0 -40
- package/dist/test/unit/files-service.factory.unit.spec.js.map +0 -1
- package/dist/test/unit/files.resolver.unit.spec.d.ts +0 -1
- package/dist/test/unit/files.resolver.unit.spec.js +0 -56
- package/dist/test/unit/files.resolver.unit.spec.js.map +0 -1
- package/dist/test/unit/gitlab-files.service.unit.spec.d.ts +0 -1
- package/dist/test/unit/gitlab-files.service.unit.spec.js +0 -37
- package/dist/test/unit/gitlab-files.service.unit.spec.js.map +0 -1
- package/dist/test/unit/local-files.service.unit.spec.d.ts +0 -1
- package/dist/test/unit/local-files.service.unit.spec.js +0 -84
- package/dist/test/unit/local-files.service.unit.spec.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/files/queries.ts +0 -42
- package/src/files/services/gitlab-files.service.ts +0 -65
- package/test/coverage/clover.xml +0 -40
- package/test/coverage/coverage-final.json +0 -2
- package/test/coverage/lcov-report/base.css +0 -224
- package/test/coverage/lcov-report/block-navigation.js +0 -87
- package/test/coverage/lcov-report/favicon.png +0 -0
- package/test/coverage/lcov-report/index.html +0 -116
- package/test/coverage/lcov-report/prettify.css +0 -1
- package/test/coverage/lcov-report/prettify.js +0 -2
- package/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/test/coverage/lcov-report/sorter.js +0 -196
- package/test/coverage/lcov-report/testUtil.ts.html +0 -655
- package/test/coverage/lcov.info +0 -52
- package/test/starttraefik.bash +0 -11
- package/test/stoptraefik.bash +0 -9
- package/test/unit/gitlab-files.service.unit.spec.ts +0 -46
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var LocalFilesService_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const fs = require("fs");
|
|
15
|
-
const path_1 = require("path");
|
|
16
|
-
const config_1 = require("@nestjs/config");
|
|
17
|
-
let LocalFilesService = LocalFilesService_1 = class LocalFilesService {
|
|
18
|
-
configService;
|
|
19
|
-
constructor(configService) {
|
|
20
|
-
this.configService = configService;
|
|
21
|
-
}
|
|
22
|
-
async listDirectory(path) {
|
|
23
|
-
const dataPath = this.configService.get('LOCAL_PATH');
|
|
24
|
-
const fullPath = (0, path_1.join)(dataPath, path);
|
|
25
|
-
const files = await fs.promises.readdir(fullPath);
|
|
26
|
-
const edges = await Promise.all(files.map((file) => LocalFilesService_1.getFileStats(fullPath, file)));
|
|
27
|
-
const tree = {
|
|
28
|
-
trees: {
|
|
29
|
-
edges: edges.filter((edge) => edge.node.type === 'tree'),
|
|
30
|
-
},
|
|
31
|
-
blobs: {
|
|
32
|
-
edges: edges.filter((edge) => edge.node.type === 'blob'),
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
return { repository: { tree } };
|
|
36
|
-
}
|
|
37
|
-
async readFile(path) {
|
|
38
|
-
const dataPath = this.configService.get('LOCAL_PATH');
|
|
39
|
-
const fullpath = (0, path_1.join)(dataPath, path);
|
|
40
|
-
try {
|
|
41
|
-
const content = await (await fs.promises.readFile(fullpath, 'utf8')).trim();
|
|
42
|
-
const name = path.split('/').pop();
|
|
43
|
-
return LocalFilesService_1.formatResponse(name, content);
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
throw new common_1.InternalServerErrorException('Error reading file');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
static async getFileStats(fullPath, file) {
|
|
50
|
-
const stats = await fs.promises.lstat((0, path_1.join)(fullPath, file));
|
|
51
|
-
if (stats.isDirectory()) {
|
|
52
|
-
return { node: { name: file, type: 'tree' } };
|
|
53
|
-
}
|
|
54
|
-
return { node: { name: file, type: 'blob' } };
|
|
55
|
-
}
|
|
56
|
-
static formatResponse(name, content) {
|
|
57
|
-
return {
|
|
58
|
-
repository: {
|
|
59
|
-
blobs: {
|
|
60
|
-
nodes: [
|
|
61
|
-
{
|
|
62
|
-
name,
|
|
63
|
-
rawBlob: content,
|
|
64
|
-
rawTextBlob: content,
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
LocalFilesService = LocalFilesService_1 = __decorate([
|
|
73
|
-
(0, common_1.Injectable)(),
|
|
74
|
-
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
75
|
-
], LocalFilesService);
|
|
76
|
-
exports.default = LocalFilesService;
|
|
77
|
-
//# sourceMappingURL=local-files.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local-files.service.js","sourceRoot":"","sources":["../../../../src/files/services/local-files.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0E;AAC1E,yBAAyB;AACzB,+BAA4B;AAC5B,2CAA+C;AAKhC,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAEhB;IAApB,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAEpD,KAAK,CAAC,aAAa,CAAC,IAAY;QAC9B,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACtD,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAEtC,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAElD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC7B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAiB,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CACpE,CAAC;QAEF,MAAM,IAAI,GAAG;YACX,KAAK,EAAE;gBACL,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;aACzD;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,I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,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,KAAK,EAAE;wBACL;4BACE,IAAI;4BACJ,OAAO,EAAE,OAAO;4BAChB,WAAW,EAAE,OAAO;yBACrB;qBACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAnEoB,iBAAiB;IADrC,IAAA,mBAAU,GAAE;qCAGwB,sBAAa;GAF7B,iBAAiB,CAmErC;kBAnEoB,iBAAiB"}
|
package/dist/src/main.d.ts
DELETED
package/dist/src/main.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const commander_1 = require("commander");
|
|
5
|
-
const bootstrap_1 = require("./bootstrap");
|
|
6
|
-
const program = new commander_1.Command();
|
|
7
|
-
program
|
|
8
|
-
.description('The lib microservice is responsible for handling and serving the contents of library assets of the DTaaS platform. It provides API endpoints for clients to query, and fetch these assets.')
|
|
9
|
-
.option('-c, --config <path>', 'set the config path (default .env)')
|
|
10
|
-
.helpOption('-h, --help', 'display help for libms')
|
|
11
|
-
.showHelpAfterError();
|
|
12
|
-
program.parse(process.argv);
|
|
13
|
-
const options = program.opts();
|
|
14
|
-
if (options.config) {
|
|
15
|
-
(0, bootstrap_1.default)({ config: options.config, runHelp: () => program.help() });
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
(0, bootstrap_1.default)({ runHelp: () => program.help() });
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=main.js.map
|
package/dist/src/main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,2CAAoC;AAMpC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,WAAW,CACV,4LAA4L,CAC7L;KACA,MAAM,CAAC,qBAAqB,EAAE,oCAAoC,CAAC;KACnE,UAAU,CAAC,YAAY,EAAE,wBAAwB,CAAC;KAClD,kBAAkB,EAAE,CAAC;AAExB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,MAAM,OAAO,GAAmB,OAAO,CAAC,IAAI,EAAE,CAAC;AAE/C,IAAI,OAAO,CAAC,MAAM,EAAE;IAClB,IAAA,mBAAS,EAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;CACtE;KAAM;IACL,IAAA,mBAAS,EAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;CAC9C"}
|
package/dist/src/types.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export declare class Blob {
|
|
2
|
-
name: string;
|
|
3
|
-
type: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class BlobEdge {
|
|
6
|
-
node: Blob;
|
|
7
|
-
}
|
|
8
|
-
export declare class BlobConnection {
|
|
9
|
-
edges: BlobEdge[];
|
|
10
|
-
}
|
|
11
|
-
export declare class TreeEntry {
|
|
12
|
-
name: string;
|
|
13
|
-
type: string;
|
|
14
|
-
}
|
|
15
|
-
export declare class TreeEdge {
|
|
16
|
-
node: TreeEntry;
|
|
17
|
-
}
|
|
18
|
-
export declare class TreeConnection {
|
|
19
|
-
edges: TreeEdge[];
|
|
20
|
-
}
|
|
21
|
-
export declare class Tree {
|
|
22
|
-
blobs: BlobConnection;
|
|
23
|
-
trees: TreeConnection;
|
|
24
|
-
}
|
|
25
|
-
export declare class RepositoryBlob {
|
|
26
|
-
name: string;
|
|
27
|
-
rawBlob: string;
|
|
28
|
-
rawTextBlob: string;
|
|
29
|
-
}
|
|
30
|
-
export declare class RepositoryBlobConnection {
|
|
31
|
-
nodes: RepositoryBlob[];
|
|
32
|
-
}
|
|
33
|
-
export declare class Repository {
|
|
34
|
-
tree?: Tree;
|
|
35
|
-
blobs?: RepositoryBlobConnection;
|
|
36
|
-
}
|
|
37
|
-
export declare class Project {
|
|
38
|
-
repository: Repository;
|
|
39
|
-
}
|
|
40
|
-
export declare class Query {
|
|
41
|
-
listDirectory: Project;
|
|
42
|
-
readFile: Project;
|
|
43
|
-
}
|
package/dist/src/types.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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");
|
|
14
|
-
let Blob = class Blob {
|
|
15
|
-
name;
|
|
16
|
-
type;
|
|
17
|
-
};
|
|
18
|
-
exports.Blob = Blob;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, graphql_1.Field)(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], Blob.prototype, "name", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, graphql_1.Field)(),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], Blob.prototype, "type", void 0);
|
|
27
|
-
exports.Blob = Blob = __decorate([
|
|
28
|
-
(0, graphql_1.ObjectType)()
|
|
29
|
-
], Blob);
|
|
30
|
-
let BlobEdge = class BlobEdge {
|
|
31
|
-
node;
|
|
32
|
-
};
|
|
33
|
-
exports.BlobEdge = BlobEdge;
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, graphql_1.Field)(() => Blob),
|
|
36
|
-
__metadata("design:type", Blob)
|
|
37
|
-
], BlobEdge.prototype, "node", void 0);
|
|
38
|
-
exports.BlobEdge = BlobEdge = __decorate([
|
|
39
|
-
(0, graphql_1.ObjectType)()
|
|
40
|
-
], BlobEdge);
|
|
41
|
-
let BlobConnection = class BlobConnection {
|
|
42
|
-
edges;
|
|
43
|
-
};
|
|
44
|
-
exports.BlobConnection = BlobConnection;
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, graphql_1.Field)(() => [BlobEdge]),
|
|
47
|
-
__metadata("design:type", Array)
|
|
48
|
-
], BlobConnection.prototype, "edges", void 0);
|
|
49
|
-
exports.BlobConnection = BlobConnection = __decorate([
|
|
50
|
-
(0, graphql_1.ObjectType)()
|
|
51
|
-
], BlobConnection);
|
|
52
|
-
let TreeEntry = class TreeEntry {
|
|
53
|
-
name;
|
|
54
|
-
type;
|
|
55
|
-
};
|
|
56
|
-
exports.TreeEntry = TreeEntry;
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, graphql_1.Field)(),
|
|
59
|
-
__metadata("design:type", String)
|
|
60
|
-
], TreeEntry.prototype, "name", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, graphql_1.Field)(),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], TreeEntry.prototype, "type", void 0);
|
|
65
|
-
exports.TreeEntry = TreeEntry = __decorate([
|
|
66
|
-
(0, graphql_1.ObjectType)()
|
|
67
|
-
], TreeEntry);
|
|
68
|
-
let TreeEdge = class TreeEdge {
|
|
69
|
-
node;
|
|
70
|
-
};
|
|
71
|
-
exports.TreeEdge = TreeEdge;
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, graphql_1.Field)(() => TreeEntry),
|
|
74
|
-
__metadata("design:type", TreeEntry)
|
|
75
|
-
], TreeEdge.prototype, "node", void 0);
|
|
76
|
-
exports.TreeEdge = TreeEdge = __decorate([
|
|
77
|
-
(0, graphql_1.ObjectType)()
|
|
78
|
-
], TreeEdge);
|
|
79
|
-
let TreeConnection = class TreeConnection {
|
|
80
|
-
edges;
|
|
81
|
-
};
|
|
82
|
-
exports.TreeConnection = TreeConnection;
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, graphql_1.Field)(() => [TreeEdge]),
|
|
85
|
-
__metadata("design:type", Array)
|
|
86
|
-
], TreeConnection.prototype, "edges", void 0);
|
|
87
|
-
exports.TreeConnection = TreeConnection = __decorate([
|
|
88
|
-
(0, graphql_1.ObjectType)()
|
|
89
|
-
], TreeConnection);
|
|
90
|
-
let Tree = class Tree {
|
|
91
|
-
blobs;
|
|
92
|
-
trees;
|
|
93
|
-
};
|
|
94
|
-
exports.Tree = Tree;
|
|
95
|
-
__decorate([
|
|
96
|
-
(0, graphql_1.Field)(),
|
|
97
|
-
__metadata("design:type", BlobConnection)
|
|
98
|
-
], Tree.prototype, "blobs", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, graphql_1.Field)(),
|
|
101
|
-
__metadata("design:type", TreeConnection)
|
|
102
|
-
], Tree.prototype, "trees", void 0);
|
|
103
|
-
exports.Tree = Tree = __decorate([
|
|
104
|
-
(0, graphql_1.ObjectType)()
|
|
105
|
-
], Tree);
|
|
106
|
-
let RepositoryBlob = class RepositoryBlob {
|
|
107
|
-
name;
|
|
108
|
-
rawBlob;
|
|
109
|
-
rawTextBlob;
|
|
110
|
-
};
|
|
111
|
-
exports.RepositoryBlob = RepositoryBlob;
|
|
112
|
-
__decorate([
|
|
113
|
-
(0, graphql_1.Field)(),
|
|
114
|
-
__metadata("design:type", String)
|
|
115
|
-
], RepositoryBlob.prototype, "name", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
(0, graphql_1.Field)(),
|
|
118
|
-
__metadata("design:type", String)
|
|
119
|
-
], RepositoryBlob.prototype, "rawBlob", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
(0, graphql_1.Field)(),
|
|
122
|
-
__metadata("design:type", String)
|
|
123
|
-
], RepositoryBlob.prototype, "rawTextBlob", void 0);
|
|
124
|
-
exports.RepositoryBlob = RepositoryBlob = __decorate([
|
|
125
|
-
(0, graphql_1.ObjectType)()
|
|
126
|
-
], RepositoryBlob);
|
|
127
|
-
let RepositoryBlobConnection = class RepositoryBlobConnection {
|
|
128
|
-
nodes;
|
|
129
|
-
};
|
|
130
|
-
exports.RepositoryBlobConnection = RepositoryBlobConnection;
|
|
131
|
-
__decorate([
|
|
132
|
-
(0, graphql_1.Field)(() => [RepositoryBlob]),
|
|
133
|
-
__metadata("design:type", Array)
|
|
134
|
-
], RepositoryBlobConnection.prototype, "nodes", void 0);
|
|
135
|
-
exports.RepositoryBlobConnection = RepositoryBlobConnection = __decorate([
|
|
136
|
-
(0, graphql_1.ObjectType)()
|
|
137
|
-
], RepositoryBlobConnection);
|
|
138
|
-
let Repository = class Repository {
|
|
139
|
-
tree;
|
|
140
|
-
blobs;
|
|
141
|
-
};
|
|
142
|
-
exports.Repository = Repository;
|
|
143
|
-
__decorate([
|
|
144
|
-
(0, graphql_1.Field)(),
|
|
145
|
-
__metadata("design:type", Tree)
|
|
146
|
-
], Repository.prototype, "tree", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
(0, graphql_1.Field)(),
|
|
149
|
-
__metadata("design:type", RepositoryBlobConnection)
|
|
150
|
-
], Repository.prototype, "blobs", void 0);
|
|
151
|
-
exports.Repository = Repository = __decorate([
|
|
152
|
-
(0, graphql_1.ObjectType)()
|
|
153
|
-
], Repository);
|
|
154
|
-
let Project = class Project {
|
|
155
|
-
repository;
|
|
156
|
-
};
|
|
157
|
-
exports.Project = Project;
|
|
158
|
-
__decorate([
|
|
159
|
-
(0, graphql_1.Field)(() => Repository),
|
|
160
|
-
__metadata("design:type", Repository)
|
|
161
|
-
], Project.prototype, "repository", void 0);
|
|
162
|
-
exports.Project = Project = __decorate([
|
|
163
|
-
(0, graphql_1.ObjectType)()
|
|
164
|
-
], Project);
|
|
165
|
-
let Query = class Query {
|
|
166
|
-
listDirectory;
|
|
167
|
-
readFile;
|
|
168
|
-
};
|
|
169
|
-
exports.Query = Query;
|
|
170
|
-
__decorate([
|
|
171
|
-
(0, graphql_1.Field)(),
|
|
172
|
-
__metadata("design:type", Project)
|
|
173
|
-
], Query.prototype, "listDirectory", void 0);
|
|
174
|
-
__decorate([
|
|
175
|
-
(0, graphql_1.Field)(),
|
|
176
|
-
__metadata("design:type", Project)
|
|
177
|
-
], Query.prototype, "readFile", void 0);
|
|
178
|
-
exports.Query = Query = __decorate([
|
|
179
|
-
(0, graphql_1.ObjectType)()
|
|
180
|
-
], Query);
|
|
181
|
-
//# sourceMappingURL=types.js.map
|
package/dist/src/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAoD;AAG7C,IAAM,IAAI,GAAV,MAAM,IAAI;IAEf,IAAI,CAAS;IAGb,IAAI,CAAS;CACd,CAAA;AANY,oBAAI;AAEf;IADC,IAAA,eAAK,GAAE;;kCACK;AAGb;IADC,IAAA,eAAK,GAAE;;kCACK;eALF,IAAI;IADhB,IAAA,oBAAU,GAAE;GACA,IAAI,CAMhB;AAGM,IAAM,QAAQ,GAAd,MAAM,QAAQ;IAEnB,IAAI,CAAO;CACZ,CAAA;AAHY,4BAAQ;AAEnB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC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,CAMjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const testing_1 = require("@nestjs/testing");
|
|
4
|
-
const request = require("supertest");
|
|
5
|
-
const app_module_1 = require("../../src/app.module");
|
|
6
|
-
const testUtil_1 = require("../testUtil");
|
|
7
|
-
describe('End to End test for the application', () => {
|
|
8
|
-
let app;
|
|
9
|
-
beforeAll(async () => {
|
|
10
|
-
const moduleFixture = await testing_1.Test.createTestingModule({
|
|
11
|
-
imports: [app_module_1.default],
|
|
12
|
-
}).compile();
|
|
13
|
-
app = moduleFixture.createNestApplication();
|
|
14
|
-
await app.init();
|
|
15
|
-
await app.listen(process.env.PORT);
|
|
16
|
-
await new Promise((resolve) => setTimeout(resolve, 4000));
|
|
17
|
-
}, 10000);
|
|
18
|
-
afterAll(async () => {
|
|
19
|
-
await app.close();
|
|
20
|
-
}, 10000);
|
|
21
|
-
it('should return the filename corresponding to the directory given in the query', async () => {
|
|
22
|
-
const query = testUtil_1.e2elistDirectory;
|
|
23
|
-
const response = await request('http://localhost:4001')
|
|
24
|
-
.post(process.env.APOLLO_PATH)
|
|
25
|
-
.send({ query });
|
|
26
|
-
expect(response.body).toEqual(testUtil_1.expectedListDirectoryResponse);
|
|
27
|
-
}, 10000);
|
|
28
|
-
it('should return the content of a file given in the query ', async () => {
|
|
29
|
-
const query = testUtil_1.e2eReadFile;
|
|
30
|
-
const response = await request('http://localhost:4001')
|
|
31
|
-
.post(process.env.APOLLO_PATH)
|
|
32
|
-
.send({ query });
|
|
33
|
-
expect(response.body).toEqual(testUtil_1.expectedFileContentResponse);
|
|
34
|
-
}, 10000);
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=app.e2e.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app.e2e.spec.js","sourceRoot":"","sources":["../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;QAE1B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,uBAAuB,CAAC;aACpD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;aAC7B,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACnB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,sCAA2B,CAAC,CAAC;IAC7D,CAAC,EAAE,KAAK,CAAC,CAAC;AACZ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const testing_1 = require("@nestjs/testing");
|
|
4
|
-
const config_1 = require("@nestjs/config");
|
|
5
|
-
const files_resolver_1 = require("../../src/files/resolvers/files.resolver");
|
|
6
|
-
const files_service_factory_1 = require("../../src/files/services/files-service.factory");
|
|
7
|
-
const local_files_service_1 = require("../../src/files/services/local-files.service");
|
|
8
|
-
const gitlab_files_service_1 = require("../../src/files/services/gitlab-files.service");
|
|
9
|
-
const testUtil_1 = require("../testUtil");
|
|
10
|
-
describe('Integration tests for FilesResolver', () => {
|
|
11
|
-
let filesResolver;
|
|
12
|
-
let mockConfigService;
|
|
13
|
-
beforeEach(async () => {
|
|
14
|
-
mockConfigService = new testUtil_1.MockConfigService();
|
|
15
|
-
const module = await testing_1.Test.createTestingModule({
|
|
16
|
-
providers: [
|
|
17
|
-
files_resolver_1.default,
|
|
18
|
-
files_service_factory_1.default,
|
|
19
|
-
local_files_service_1.default,
|
|
20
|
-
gitlab_files_service_1.default,
|
|
21
|
-
{ provide: config_1.ConfigService, useClass: testUtil_1.MockConfigService },
|
|
22
|
-
],
|
|
23
|
-
}).compile();
|
|
24
|
-
filesResolver = module.get(files_resolver_1.default);
|
|
25
|
-
});
|
|
26
|
-
afterEach(() => {
|
|
27
|
-
jest.clearAllMocks();
|
|
28
|
-
});
|
|
29
|
-
const modes = ['local', 'gitlab'];
|
|
30
|
-
for (const mode of modes) {
|
|
31
|
-
describe(`when MODE is ${mode}`, () => {
|
|
32
|
-
beforeEach(() => {
|
|
33
|
-
jest.spyOn(mockConfigService, 'get').mockReturnValue(mode);
|
|
34
|
-
});
|
|
35
|
-
it('should be defined', () => {
|
|
36
|
-
expect(filesResolver).toBeDefined();
|
|
37
|
-
});
|
|
38
|
-
describe('listDirectory', () => {
|
|
39
|
-
it('should list files', async () => {
|
|
40
|
-
const files = await filesResolver.listDirectory(testUtil_1.pathToTestDirectory);
|
|
41
|
-
expect(files).toEqual(testUtil_1.testDirectory);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
describe('readFile', () => {
|
|
45
|
-
it('should read file', async () => {
|
|
46
|
-
const content = await filesResolver.readFile(testUtil_1.pathToTestFileContent);
|
|
47
|
-
expect(content).toEqual(testUtil_1.testFileContent);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=files.service.integration.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"files.service.integration.spec.js","sourceRoot":"","sources":["../../../test/integration/files.service.integration.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,2CAA+C;AAC/C,6EAAqE;AACrE,0FAAiF;AACjF,sFAA6E;AAC7E,wFAA+E;AAC/E,0CAMqB;AAErB,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;IACnD,IAAI,aAA4B,CAAC;IACjC,IAAI,iBAAoC,CAAC;IAEzC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,iBAAiB,GAAG,IAAI,4BAAiB,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,SAAS,EAAE;gBACT,wBAAa;gBACb,+BAAmB;gBACnB,6BAAiB;gBACjB,8BAAkB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BAAe,CAAC,CAAC;gBAC3C,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;AACH,CAAC,CAAC,CAAC"}
|
package/dist/test/testUtil.d.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
export declare const readFileActualContent: string[];
|
|
2
|
-
export declare const pathToTestDirectory = "user2";
|
|
3
|
-
export declare const testDirectory: {
|
|
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
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export declare const testFileName = "README.md";
|
|
21
|
-
export declare const fstestFileContent = "content123";
|
|
22
|
-
export declare const pathToTestFileContent = "user2/tools/README.md";
|
|
23
|
-
export declare const testFileArray: string[];
|
|
24
|
-
export declare const testFileContent: {
|
|
25
|
-
repository: {
|
|
26
|
-
blobs: {
|
|
27
|
-
nodes: {
|
|
28
|
-
name: string;
|
|
29
|
-
rawBlob: string;
|
|
30
|
-
rawTextBlob: string;
|
|
31
|
-
}[];
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export declare function sleep(ms: any): void;
|
|
36
|
-
export declare class MockConfigService {
|
|
37
|
-
get(key: string): string;
|
|
38
|
-
}
|
|
39
|
-
export declare const mockReadFileResponseData: {
|
|
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
|
-
};
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export declare const expectedListDirectoryResponse: {
|
|
56
|
-
data: {
|
|
57
|
-
listDirectory: {
|
|
58
|
-
repository: {
|
|
59
|
-
tree: {
|
|
60
|
-
trees: {
|
|
61
|
-
edges: {
|
|
62
|
-
node: {
|
|
63
|
-
name: string;
|
|
64
|
-
};
|
|
65
|
-
}[];
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
export declare const expectedFileContentResponse: {
|
|
73
|
-
data: {
|
|
74
|
-
readFile: {
|
|
75
|
-
repository: {
|
|
76
|
-
blobs: {
|
|
77
|
-
nodes: {
|
|
78
|
-
name: string;
|
|
79
|
-
rawBlob: string;
|
|
80
|
-
rawTextBlob: string;
|
|
81
|
-
}[];
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
};
|
|
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}";
|