@into-cps-association/libms 0.4.4 → 0.4.7

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.
Files changed (91) hide show
  1. package/DEVELOPER.md +62 -0
  2. package/DOCKER.md +295 -0
  3. package/HTTP.md +12 -0
  4. package/README.md +1 -7
  5. package/compose.lib.dev.yml +9 -0
  6. package/compose.lib.yml +8 -0
  7. package/dist/src/app.module.js +14 -16
  8. package/dist/src/app.module.js.map +1 -1
  9. package/dist/src/bootstrap.js +10 -13
  10. package/dist/src/bootstrap.js.map +1 -1
  11. package/dist/src/cloudcmd/cloudcmd.js +15 -9
  12. package/dist/src/cloudcmd/cloudcmd.js.map +1 -1
  13. package/dist/src/enums/config-mode.enum.d.ts +4 -0
  14. package/dist/src/enums/config-mode.enum.js +6 -0
  15. package/dist/src/enums/config-mode.enum.js.map +1 -0
  16. package/dist/src/files/files-service.factory.d.ts +5 -0
  17. package/dist/src/files/files-service.factory.js +22 -0
  18. package/dist/src/files/files-service.factory.js.map +1 -0
  19. package/dist/src/files/files.module.js +23 -9
  20. package/dist/src/files/files.module.js.map +1 -1
  21. package/dist/src/files/{resolvers/files.resolver.d.ts → files.resolver.d.ts} +3 -3
  22. package/dist/src/files/{resolvers/files.resolver.js → files.resolver.js} +14 -14
  23. package/dist/src/files/files.resolver.js.map +1 -0
  24. package/dist/src/files/git/git-files.module.d.ts +2 -0
  25. package/dist/src/files/git/git-files.module.js +18 -0
  26. package/dist/src/files/git/git-files.module.js.map +1 -0
  27. package/dist/src/files/git/git-files.service.d.ts +9 -0
  28. package/dist/src/files/git/git-files.service.js +29 -0
  29. package/dist/src/files/git/git-files.service.js.map +1 -0
  30. package/dist/src/files/interfaces/files.service.interface.d.ts +4 -1
  31. package/dist/src/files/interfaces/files.service.interface.js +1 -2
  32. package/dist/src/files/interfaces/files.service.interface.js.map +1 -1
  33. package/dist/src/files/local/local-files.module.d.ts +2 -0
  34. package/dist/src/files/local/local-files.module.js +18 -0
  35. package/dist/src/files/local/local-files.module.js.map +1 -0
  36. package/dist/src/files/{services → local}/local-files.service.d.ts +5 -2
  37. package/dist/src/files/{services → local}/local-files.service.js +17 -15
  38. package/dist/src/files/local/local-files.service.js.map +1 -0
  39. package/dist/src/main.js +4 -6
  40. package/dist/src/main.js.map +1 -1
  41. package/dist/src/types.js +56 -59
  42. package/dist/src/types.js.map +1 -1
  43. package/dist/test/cloudcmd/cloudcmd.spec.js +14 -16
  44. package/dist/test/cloudcmd/cloudcmd.spec.js.map +1 -1
  45. package/dist/test/e2e/app.e2e.spec.js +18 -18
  46. package/dist/test/e2e/app.e2e.spec.js.map +1 -1
  47. package/dist/test/integration/files.service.integration.spec.js +28 -19
  48. package/dist/test/integration/files.service.integration.spec.js.map +1 -1
  49. package/dist/test/testUtil.js +18 -23
  50. package/dist/test/testUtil.js.map +1 -1
  51. package/dist/test/unit/files-service.factory.unit.spec.js +17 -16
  52. package/dist/test/unit/files-service.factory.unit.spec.js.map +1 -1
  53. package/dist/test/unit/files.resolver.unit.spec.js +26 -24
  54. package/dist/test/unit/files.resolver.unit.spec.js.map +1 -1
  55. package/dist/test/unit/local-files.service.unit.spec.js +23 -24
  56. package/dist/test/unit/local-files.service.unit.spec.js.map +1 -1
  57. package/dist/tsconfig.tsbuildinfo +1 -1
  58. package/eslint.config.js +60 -0
  59. package/jest.config.ts +47 -0
  60. package/package.json +54 -48
  61. package/src/app.module.ts +1 -1
  62. package/src/bootstrap.ts +3 -3
  63. package/src/cloudcmd/cloudcmd.ts +11 -3
  64. package/src/enums/config-mode.enum.ts +4 -0
  65. package/src/files/files-service.factory.ts +19 -0
  66. package/src/files/files.module.ts +24 -4
  67. package/src/files/{resolvers/files.resolver.ts → files.resolver.ts} +9 -8
  68. package/src/files/git/git-files.module.ts +8 -0
  69. package/src/files/git/git-files.service.ts +20 -0
  70. package/src/files/interfaces/files.service.interface.ts +4 -1
  71. package/src/files/local/local-files.module.ts +8 -0
  72. package/src/files/{services → local}/local-files.service.ts +15 -10
  73. package/src/main.ts +1 -1
  74. package/test/cloudcmd/cloudcmd.spec.ts +4 -6
  75. package/test/e2e/app.e2e.spec.ts +4 -3
  76. package/test/integration/files.service.integration.spec.ts +19 -4
  77. package/test/unit/files-service.factory.unit.spec.ts +18 -11
  78. package/test/unit/files.resolver.unit.spec.ts +19 -12
  79. package/test/unit/local-files.service.unit.spec.ts +4 -2
  80. package/tsconfig.json +10 -7
  81. package/.env +0 -6
  82. package/.eslintignore +0 -6
  83. package/.eslintrc +0 -53
  84. package/dist/src/files/resolvers/files.resolver.js.map +0 -1
  85. package/dist/src/files/services/files-service.factory.d.ts +0 -9
  86. package/dist/src/files/services/files-service.factory.js +0 -40
  87. package/dist/src/files/services/files-service.factory.js.map +0 -1
  88. package/dist/src/files/services/local-files.service.js.map +0 -1
  89. package/jest.config.json +0 -30
  90. package/src/files/services/files-service.factory.ts +0 -22
  91. /package/{pm2.config.js → pm2.config.cjs} +0 -0
@@ -1,21 +1,35 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- const common_1 = require("@nestjs/common");
10
- const files_resolver_1 = require("./resolvers/files.resolver");
11
- const files_service_factory_1 = require("./services/files-service.factory");
12
- const local_files_service_1 = require("./services/local-files.service");
7
+ import { Module } from '@nestjs/common';
8
+ import FilesResolver from './files.resolver.js';
9
+ import { GitFilesModule } from './git/git-files.module.js';
10
+ import { LocalFilesModule } from './local/local-files.module.js';
11
+ import LocalFilesService from './local/local-files.service.js';
12
+ import GitFilesService from './git/git-files.service.js';
13
+ import { FILE_SERVICE } from './interfaces/files.service.interface.js';
14
+ import FilesServiceFactory from './files-service.factory.js';
15
+ import { ConfigService } from '@nestjs/config';
13
16
  let FilesModule = class FilesModule {
14
17
  };
15
18
  FilesModule = __decorate([
16
- (0, common_1.Module)({
17
- providers: [files_resolver_1.default, local_files_service_1.default, files_service_factory_1.default],
19
+ Module({
20
+ imports: [LocalFilesModule, GitFilesModule],
21
+ providers: [
22
+ FilesResolver,
23
+ {
24
+ provide: FILE_SERVICE,
25
+ useFactory: (configService, localFilesService, gitFilesService) => {
26
+ const fileServices = [localFilesService, gitFilesService];
27
+ return FilesServiceFactory.create(configService, fileServices);
28
+ },
29
+ inject: [ConfigService, LocalFilesService, GitFilesService],
30
+ },
31
+ ],
18
32
  })
19
33
  ], FilesModule);
20
- exports.default = FilesModule;
34
+ export default FilesModule;
21
35
  //# sourceMappingURL=files.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.module.js","sourceRoot":"","sources":["../../../src/files/files.module.ts"],"names":[],"mappings":";;;;;;;;AAAA,2CAAwC;AACxC,+DAAuD;AACvD,4EAAmE;AACnE,wEAA+D;AAKhD,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,WAAW;IAH/B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,wBAAa,EAAE,6BAAiB,EAAE,+BAAmB,CAAC;KACnE,CAAC;GACmB,WAAW,CAAG;kBAAd,WAAW"}
1
+ {"version":3,"file":"files.module.js","sourceRoot":"","sources":["../../../src/files/files.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAoBhC,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,WAAW;IAlB/B,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC;QAC3C,SAAS,EAAE;YACT,aAAa;YACb;gBACE,OAAO,EAAE,YAAY;gBACrB,UAAU,EAAE,CACV,aAA4B,EAC5B,iBAAoC,EACpC,eAAgC,EAChC,EAAE;oBACF,MAAM,YAAY,GAAG,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;oBAC1D,OAAO,mBAAmB,CAAC,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;gBACjE,CAAC;gBACD,MAAM,EAAE,CAAC,aAAa,EAAE,iBAAiB,EAAE,eAAe,CAAC;aAC5D;SACF;KACF,CAAC;GACmB,WAAW,CAAG;eAAd,WAAW"}
@@ -1,8 +1,8 @@
1
- import FilesServiceFactory from '../services/files-service.factory';
2
- import { Project } from '../../types';
1
+ import { IFilesService } from './interfaces/files.service.interface.js';
2
+ import { Project } from '../types.js';
3
3
  export default class FilesResolver {
4
4
  private readonly filesService;
5
- constructor(filesServiceFactory: FilesServiceFactory);
5
+ constructor(filesService: IFilesService);
6
6
  listDirectory(path: string): Promise<Project>;
7
7
  readFile(path: string): Promise<Project>;
8
8
  }
@@ -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);
@@ -11,14 +10,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
11
  return function (target, key) { decorator(target, key, paramIndex); }
13
12
  };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const graphql_1 = require("@nestjs/graphql");
16
- const files_service_factory_1 = require("../services/files-service.factory");
17
- const types_1 = require("../../types");
13
+ import { Resolver, Query, Args } from '@nestjs/graphql';
14
+ import { FILE_SERVICE, } from './interfaces/files.service.interface.js';
15
+ import { Project } from '../types.js';
16
+ import { Inject } from '@nestjs/common';
18
17
  let FilesResolver = class FilesResolver {
19
18
  filesService;
20
- constructor(filesServiceFactory) {
21
- this.filesService = filesServiceFactory.create();
19
+ constructor(filesService) {
20
+ this.filesService = filesService;
22
21
  }
23
22
  async listDirectory(path) {
24
23
  return this.filesService.listDirectory(path);
@@ -28,22 +27,23 @@ let FilesResolver = class FilesResolver {
28
27
  }
29
28
  };
30
29
  __decorate([
31
- (0, graphql_1.Query)(() => types_1.Project),
32
- __param(0, (0, graphql_1.Args)('path')),
30
+ Query(() => Project),
31
+ __param(0, Args('path')),
33
32
  __metadata("design:type", Function),
34
33
  __metadata("design:paramtypes", [String]),
35
34
  __metadata("design:returntype", Promise)
36
35
  ], FilesResolver.prototype, "listDirectory", null);
37
36
  __decorate([
38
- (0, graphql_1.Query)(() => types_1.Project),
39
- __param(0, (0, graphql_1.Args)('path')),
37
+ Query(() => Project),
38
+ __param(0, Args('path')),
40
39
  __metadata("design:type", Function),
41
40
  __metadata("design:paramtypes", [String]),
42
41
  __metadata("design:returntype", Promise)
43
42
  ], FilesResolver.prototype, "readFile", null);
44
43
  FilesResolver = __decorate([
45
- (0, graphql_1.Resolver)(),
46
- __metadata("design:paramtypes", [files_service_factory_1.default])
44
+ Resolver(),
45
+ __param(0, Inject(FILE_SERVICE)),
46
+ __metadata("design:paramtypes", [Object])
47
47
  ], FilesResolver);
48
- exports.default = FilesResolver;
48
+ export default FilesResolver;
49
49
  //# sourceMappingURL=files.resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.resolver.js","sourceRoot":"","sources":["../../../src/files/files.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,YAAY,GAEb,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGzB,IAAM,aAAa,GAAnB,MAAM,aAAa;IAES;IADzC,YACyC,YAA2B;QAA3B,iBAAY,GAAZ,YAAY,CAAe;IACjE,CAAC;IAGE,AAAN,KAAK,CAAC,aAAa,CAAe,IAAY;QAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAGK,AAAN,KAAK,CAAC,QAAQ,CAAe,IAAY;QACvC,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;CACF,CAAA;AARO;IADL,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;IACA,WAAA,IAAI,CAAC,MAAM,CAAC,CAAA;;;;kDAEhC;AAGK;IADL,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;IACL,WAAA,IAAI,CAAC,MAAM,CAAC,CAAA;;;;6CAE3B;AAbkB,aAAa;IADjC,QAAQ,EAAE;IAGN,WAAA,MAAM,CAAC,YAAY,CAAC,CAAA;;GAFJ,aAAa,CAcjC;eAdoB,aAAa"}
@@ -0,0 +1,2 @@
1
+ export declare class GitFilesModule {
2
+ }
@@ -0,0 +1,18 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Module } from '@nestjs/common';
8
+ import GitFilesService from './git-files.service.js';
9
+ let GitFilesModule = class GitFilesModule {
10
+ };
11
+ GitFilesModule = __decorate([
12
+ Module({
13
+ providers: [GitFilesService],
14
+ exports: [GitFilesService],
15
+ })
16
+ ], GitFilesModule);
17
+ export { GitFilesModule };
18
+ //# sourceMappingURL=git-files.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-files.module.js","sourceRoot":"","sources":["../../../../src/files/git/git-files.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,eAAe,MAAM,wBAAwB,CAAC;AAM9C,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,cAAc;IAJ1B,MAAM,CAAC;QACN,SAAS,EAAE,CAAC,eAAe,CAAC;QAC5B,OAAO,EAAE,CAAC,eAAe,CAAC;KAC3B,CAAC;GACW,cAAc,CAAG"}
@@ -0,0 +1,9 @@
1
+ import { Project } from 'src/types.js';
2
+ import { IFilesService } from '../interfaces/files.service.interface.js';
3
+ import { CONFIG_MODE } from '../../enums/config-mode.enum.js';
4
+ export default class GitFilesService implements IFilesService {
5
+ constructor();
6
+ getMode(): CONFIG_MODE;
7
+ listDirectory(): Promise<Project>;
8
+ readFile(): Promise<Project>;
9
+ }
@@ -0,0 +1,29 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Injectable } from '@nestjs/common';
11
+ import { CONFIG_MODE } from '../../enums/config-mode.enum.js';
12
+ let GitFilesService = class GitFilesService {
13
+ constructor() { }
14
+ getMode() {
15
+ return CONFIG_MODE.GIT;
16
+ }
17
+ listDirectory() {
18
+ throw new Error('Method not implemented.');
19
+ }
20
+ readFile() {
21
+ throw new Error('Method not implemented.');
22
+ }
23
+ };
24
+ GitFilesService = __decorate([
25
+ Injectable(),
26
+ __metadata("design:paramtypes", [])
27
+ ], GitFilesService);
28
+ export default GitFilesService;
29
+ //# sourceMappingURL=git-files.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-files.service.js","sourceRoot":"","sources":["../../../../src/files/git/git-files.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAG/C,IAAM,eAAe,GAArB,MAAM,eAAe;IAElC,gBAAe,CAAC;IAChB,OAAO;QACL,OAAO,WAAW,CAAC,GAAG,CAAC;IACzB,CAAC;IAED,aAAa;QACX,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,QAAQ;QACN,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF,CAAA;AAboB,eAAe;IADnC,UAAU,EAAE;;GACQ,eAAe,CAanC;eAboB,eAAe"}
@@ -1,5 +1,8 @@
1
- import { Project } from 'src/types';
1
+ import { CONFIG_MODE } from '../../enums/config-mode.enum.js';
2
+ import { Project } from 'src/types.js';
3
+ export declare const FILE_SERVICE = "FILE_SERVICE";
2
4
  export interface IFilesService {
3
5
  listDirectory(path: string): Promise<Project>;
4
6
  readFile(path: string): Promise<Project>;
7
+ getMode(): CONFIG_MODE;
5
8
  }
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export const FILE_SERVICE = 'FILE_SERVICE';
3
2
  //# sourceMappingURL=files.service.interface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.service.interface.js","sourceRoot":"","sources":["../../../../src/files/interfaces/files.service.interface.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"files.service.interface.js","sourceRoot":"","sources":["../../../../src/files/interfaces/files.service.interface.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare class LocalFilesModule {
2
+ }
@@ -0,0 +1,18 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Module } from '@nestjs/common';
8
+ import LocalFilesService from './local-files.service.js';
9
+ let LocalFilesModule = class LocalFilesModule {
10
+ };
11
+ LocalFilesModule = __decorate([
12
+ Module({
13
+ providers: [LocalFilesService],
14
+ exports: [LocalFilesService],
15
+ })
16
+ ], LocalFilesModule);
17
+ export { LocalFilesModule };
18
+ //# sourceMappingURL=local-files.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-files.module.js","sourceRoot":"","sources":["../../../../src/files/local/local-files.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAMlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,gBAAgB;IAJ5B,MAAM,CAAC;QACN,SAAS,EAAE,CAAC,iBAAiB,CAAC;QAC9B,OAAO,EAAE,CAAC,iBAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
@@ -1,9 +1,12 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { Project } from 'src/types';
3
- import { IFilesService } from '../interfaces/files.service.interface';
2
+ import { Project } from 'src/types.js';
3
+ import { IFilesService } from '../interfaces/files.service.interface.js';
4
+ import { CONFIG_MODE } from '../../enums/config-mode.enum.js';
4
5
  export default class LocalFilesService implements IFilesService {
5
6
  private configService;
7
+ private readonly dataPath;
6
8
  constructor(configService: ConfigService);
9
+ getMode(): CONFIG_MODE;
7
10
  listDirectory(path: string): Promise<Project>;
8
11
  readFile(path: string): Promise<Project>;
9
12
  private static getFileStats;
@@ -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);
@@ -9,19 +8,23 @@ 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
10
  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");
11
+ import { Injectable, InternalServerErrorException } from '@nestjs/common';
12
+ import * as fs from 'fs';
13
+ import { join } from 'path';
14
+ import { ConfigService } from '@nestjs/config';
15
+ import { CONFIG_MODE } from '../../enums/config-mode.enum.js';
17
16
  let LocalFilesService = LocalFilesService_1 = class LocalFilesService {
18
17
  configService;
18
+ dataPath;
19
19
  constructor(configService) {
20
20
  this.configService = configService;
21
+ this.dataPath = this.configService.get('LOCAL_PATH');
22
+ }
23
+ getMode() {
24
+ return CONFIG_MODE.LOCAL;
21
25
  }
22
26
  async listDirectory(path) {
23
- const dataPath = this.configService.get('LOCAL_PATH');
24
- const fullPath = (0, path_1.join)(dataPath, path);
27
+ const fullPath = join(this.dataPath, path);
25
28
  const files = await fs.promises.readdir(fullPath);
26
29
  const edges = await Promise.all(files.map((file) => LocalFilesService_1.getFileStats(fullPath, file)));
27
30
  const tree = {
@@ -35,19 +38,18 @@ let LocalFilesService = LocalFilesService_1 = class LocalFilesService {
35
38
  return { repository: { tree } };
36
39
  }
37
40
  async readFile(path) {
38
- const dataPath = this.configService.get('LOCAL_PATH');
39
- const fullPath = (0, path_1.join)(dataPath, path);
41
+ const fullPath = join(this.dataPath, path);
40
42
  try {
41
43
  const content = await (await fs.promises.readFile(fullPath, 'utf8')).trim();
42
44
  const name = path.split('/').pop();
43
45
  return LocalFilesService_1.formatResponse(name, content);
44
46
  }
45
47
  catch (error) {
46
- throw new common_1.InternalServerErrorException('Error reading file');
48
+ throw new InternalServerErrorException('Error reading file', error);
47
49
  }
48
50
  }
49
51
  static async getFileStats(fullPath, file) {
50
- const stats = await fs.promises.lstat((0, path_1.join)(fullPath, file));
52
+ const stats = await fs.promises.lstat(join(fullPath, file));
51
53
  if (stats.isDirectory()) {
52
54
  return { node: { name: file, type: 'tree' } };
53
55
  }
@@ -70,8 +72,8 @@ let LocalFilesService = LocalFilesService_1 = class LocalFilesService {
70
72
  }
71
73
  };
72
74
  LocalFilesService = LocalFilesService_1 = __decorate([
73
- (0, common_1.Injectable)(),
74
- __metadata("design:paramtypes", [config_1.ConfigService])
75
+ Injectable(),
76
+ __metadata("design:paramtypes", [ConfigService])
75
77
  ], LocalFilesService);
76
- exports.default = LocalFilesService;
78
+ export default LocalFilesService;
77
79
  //# sourceMappingURL=local-files.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-files.service.js","sourceRoot":"","sources":["../../../../src/files/local/local-files.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAG/C,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAGhB;IAFH,QAAQ,CAAS;IAElC,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAEvD,CAAC;IACD,OAAO;QACL,OAAO,WAAW,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAY;QAC9B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC3C,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,EA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C;QAChD,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IAChD,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,IAAY,EAAE,OAAe;QAEzD,OAAO;YACL,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;AAvEoB,iBAAiB;IADrC,UAAU,EAAE;qCAIwB,aAAa;GAH7B,iBAAiB,CAuErC;eAvEoB,iBAAiB"}
package/dist/src/main.js CHANGED
@@ -1,9 +1,7 @@
1
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();
2
+ import { Command } from 'commander';
3
+ import bootstrap from './bootstrap.js';
4
+ const program = new Command();
7
5
  program
8
6
  .description('The lib microservice is a file server. It supports file transfer over GraphQL and HTTP protocols.')
9
7
  .option('-c, --config <file>', 'provide the config file (default .env)')
@@ -12,7 +10,7 @@ program
12
10
  .showHelpAfterError();
13
11
  program.parse(process.argv);
14
12
  const options = program.opts();
15
- (0, bootstrap_1.default)({
13
+ bootstrap({
16
14
  config: options.config,
17
15
  httpServer: options.http,
18
16
  runHelp: () => program.help(),
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,2CAAoC;AAOpC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,WAAW,CACV,mGAAmG,CACpG;KACA,MAAM,CAAC,qBAAqB,EAAE,wCAAwC,CAAC;KACvE,MAAM,CACL,mBAAmB,EACnB,kDAAkD,CACnD;KACA,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,IAAA,mBAAS,EAAC;IACR,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,UAAU,EAAE,OAAO,CAAC,IAAI;IACxB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE;CAC9B,CAAC,CAAC"}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAOvC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,WAAW,CACV,mGAAmG,CACpG;KACA,MAAM,CAAC,qBAAqB,EAAE,wCAAwC,CAAC;KACvE,MAAM,CACL,mBAAmB,EACnB,kDAAkD,CACnD;KACA,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,SAAS,CAAC;IACR,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,UAAU,EAAE,OAAO,CAAC,IAAI;IACxB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE;CAC9B,CAAC,CAAC"}
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
- 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");
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
- (0, graphql_1.Field)(),
16
+ Field(),
21
17
  __metadata("design:type", String)
22
18
  ], Blob.prototype, "name", void 0);
23
19
  __decorate([
24
- (0, graphql_1.Field)(),
20
+ Field(),
25
21
  __metadata("design:type", String)
26
22
  ], Blob.prototype, "type", void 0);
27
- exports.Blob = Blob = __decorate([
28
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(() => Blob),
31
+ Field(() => Blob),
36
32
  __metadata("design:type", Blob)
37
33
  ], BlobEdge.prototype, "node", void 0);
38
- exports.BlobEdge = BlobEdge = __decorate([
39
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(() => [BlobEdge]),
42
+ Field(() => [BlobEdge]),
47
43
  __metadata("design:type", Array)
48
44
  ], BlobConnection.prototype, "edges", void 0);
49
- exports.BlobConnection = BlobConnection = __decorate([
50
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(),
54
+ Field(),
59
55
  __metadata("design:type", String)
60
56
  ], TreeEntry.prototype, "name", void 0);
61
57
  __decorate([
62
- (0, graphql_1.Field)(),
58
+ Field(),
63
59
  __metadata("design:type", String)
64
60
  ], TreeEntry.prototype, "type", void 0);
65
- exports.TreeEntry = TreeEntry = __decorate([
66
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(() => TreeEntry),
69
+ Field(() => TreeEntry),
74
70
  __metadata("design:type", TreeEntry)
75
71
  ], TreeEdge.prototype, "node", void 0);
76
- exports.TreeEdge = TreeEdge = __decorate([
77
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(() => [TreeEdge]),
80
+ Field(() => [TreeEdge]),
85
81
  __metadata("design:type", Array)
86
82
  ], TreeConnection.prototype, "edges", void 0);
87
- exports.TreeConnection = TreeConnection = __decorate([
88
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(),
92
+ Field(),
97
93
  __metadata("design:type", BlobConnection)
98
94
  ], Tree.prototype, "blobs", void 0);
99
95
  __decorate([
100
- (0, graphql_1.Field)(),
96
+ Field(),
101
97
  __metadata("design:type", TreeConnection)
102
98
  ], Tree.prototype, "trees", void 0);
103
- exports.Tree = Tree = __decorate([
104
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(),
109
+ Field(),
114
110
  __metadata("design:type", String)
115
111
  ], RepositoryBlob.prototype, "name", void 0);
116
112
  __decorate([
117
- (0, graphql_1.Field)(),
113
+ Field(),
118
114
  __metadata("design:type", String)
119
115
  ], RepositoryBlob.prototype, "rawBlob", void 0);
120
116
  __decorate([
121
- (0, graphql_1.Field)(),
117
+ Field(),
122
118
  __metadata("design:type", String)
123
119
  ], RepositoryBlob.prototype, "rawTextBlob", void 0);
124
- exports.RepositoryBlob = RepositoryBlob = __decorate([
125
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(() => [RepositoryBlob]),
128
+ Field(() => [RepositoryBlob]),
133
129
  __metadata("design:type", Array)
134
130
  ], RepositoryBlobConnection.prototype, "nodes", void 0);
135
- exports.RepositoryBlobConnection = RepositoryBlobConnection = __decorate([
136
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(),
140
+ Field(),
145
141
  __metadata("design:type", Tree)
146
142
  ], Repository.prototype, "tree", void 0);
147
143
  __decorate([
148
- (0, graphql_1.Field)(),
144
+ Field(),
149
145
  __metadata("design:type", RepositoryBlobConnection)
150
146
  ], Repository.prototype, "blobs", void 0);
151
- exports.Repository = Repository = __decorate([
152
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(() => Repository),
155
+ Field(() => Repository),
160
156
  __metadata("design:type", Repository)
161
157
  ], Project.prototype, "repository", void 0);
162
- exports.Project = Project = __decorate([
163
- (0, graphql_1.ObjectType)()
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
- (0, graphql_1.Field)(),
167
+ Field(),
172
168
  __metadata("design:type", Project)
173
169
  ], Query.prototype, "listDirectory", void 0);
174
170
  __decorate([
175
- (0, graphql_1.Field)(),
171
+ Field(),
176
172
  __metadata("design:type", Project)
177
173
  ], Query.prototype, "readFile", void 0);
178
- exports.Query = Query = __decorate([
179
- (0, graphql_1.ObjectType)()
174
+ Query = __decorate([
175
+ ObjectType()
180
176
  ], Query);
177
+ export { Query };
181
178
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA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