@into-cps-association/libms 0.3.1 → 0.4.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.
Files changed (65) hide show
  1. package/.env +0 -3
  2. package/DEVELOPER.md +24 -7
  3. package/README.md +42 -43
  4. package/config/.env.default +6 -0
  5. package/config/http.json +30 -0
  6. package/dist/src/bootstrap.d.ts +1 -0
  7. package/dist/src/bootstrap.js +4 -0
  8. package/dist/src/bootstrap.js.map +1 -1
  9. package/dist/src/cloudcmd/cloudcmd.d.ts +3 -0
  10. package/dist/src/cloudcmd/cloudcmd.js +22 -0
  11. package/dist/src/cloudcmd/cloudcmd.js.map +1 -0
  12. package/dist/src/files/files.module.js +1 -7
  13. package/dist/src/files/files.module.js.map +1 -1
  14. package/dist/src/files/services/files-service.factory.d.ts +1 -3
  15. package/dist/src/files/services/files-service.factory.js +2 -10
  16. package/dist/src/files/services/files-service.factory.js.map +1 -1
  17. package/dist/src/files/services/local-files.service.js +2 -2
  18. package/dist/src/main.js +8 -8
  19. package/dist/src/main.js.map +1 -1
  20. package/dist/test/cloudcmd/cloudcmd.spec.js +35 -0
  21. package/dist/test/cloudcmd/cloudcmd.spec.js.map +1 -0
  22. package/dist/test/e2e/app.e2e.spec.js +27 -10
  23. package/dist/test/e2e/app.e2e.spec.js.map +1 -1
  24. package/dist/test/integration/files.service.integration.spec.js +1 -3
  25. package/dist/test/integration/files.service.integration.spec.js.map +1 -1
  26. package/dist/test/testUtil.js +1 -10
  27. package/dist/test/testUtil.js.map +1 -1
  28. package/dist/test/unit/files-service.factory.unit.spec.js +0 -8
  29. package/dist/test/unit/files-service.factory.unit.spec.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +37 -27
  32. package/pm2.config.js +10 -0
  33. package/src/bootstrap.ts +8 -0
  34. package/src/cloudcmd/cloudcmd.ts +32 -0
  35. package/src/files/files.module.ts +1 -7
  36. package/src/files/services/files-service.factory.ts +0 -5
  37. package/src/files/services/local-files.service.ts +2 -2
  38. package/src/main.ts +12 -7
  39. package/test/cloudcmd/cloudcmd.spec.ts +52 -0
  40. package/test/coverage/clover.xml +14 -19
  41. package/test/coverage/coverage-final.json +1 -1
  42. package/test/coverage/lcov-report/base.css +261 -123
  43. package/test/coverage/lcov-report/index.html +13 -13
  44. package/test/coverage/lcov-report/prettify.css +101 -1
  45. package/test/coverage/lcov-report/testUtil.ts.html +8 -35
  46. package/test/coverage/lcov.info +10 -19
  47. package/test/e2e/app.e2e.spec.ts +42 -42
  48. package/test/integration/files.service.integration.spec.ts +1 -3
  49. package/test/testUtil.ts +1 -10
  50. package/test/unit/files-service.factory.unit.spec.ts +0 -9
  51. package/tsconfig.json +1 -1
  52. package/dist/src/files/queries.d.ts +0 -2
  53. package/dist/src/files/queries.js +0 -47
  54. package/dist/src/files/queries.js.map +0 -1
  55. package/dist/src/files/services/gitlab-files.service.d.ts +0 -12
  56. package/dist/src/files/services/gitlab-files.service.js +0 -65
  57. package/dist/src/files/services/gitlab-files.service.js.map +0 -1
  58. package/dist/test/unit/gitlab-files.service.unit.spec.js +0 -37
  59. package/dist/test/unit/gitlab-files.service.unit.spec.js.map +0 -1
  60. package/src/files/queries.ts +0 -42
  61. package/src/files/services/gitlab-files.service.ts +0 -65
  62. package/test/starttraefik.bash +0 -11
  63. package/test/stoptraefik.bash +0 -9
  64. package/test/unit/gitlab-files.service.unit.spec.ts +0 -46
  65. /package/dist/test/{unit/gitlab-files.service.unit.spec.d.ts → cloudcmd/cloudcmd.spec.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@into-cps-association/libms",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "microservices that handles request by fetching and returning the file-names and folders of given directory",
5
5
  "author": "phillip.boe.jensen@gmail.com",
6
6
  "contributors": [
@@ -16,52 +16,62 @@
16
16
  "format": "prettier --ignore-path ../.gitignore --write \"**/*.{ts,tsx,css,scss}\"",
17
17
  "graph": "npx madge --image src.svg src && npx madge --image test.svg test",
18
18
  "start": "node dist/src/main.js",
19
+ "start:pm2": "pm2 start pm2.config.js",
20
+ "stop:pm2": "pm2 delete libms",
19
21
  "syntax": "npx eslint . --fix",
20
22
  "pretest": "npx shx cp test/data/user2/tools/README.md ../../files/user2/tools/README.md",
21
- "test:all": "jest --coverage",
22
- "test:e2e": "npx shx cp test/data/user2/tools/README.md ../../files/user2/tools/ && npx cross-env TEST_PATH=test/data jest --config ./test/jest-e2e.json --coverage && npx rimraf ../../files/user2/tools/README.md",
23
- "test:int": "npx shx cp test/data/user2/tools/README.md ../../files/user2/tools/ && npx cross-env TEST_PATH=test/data jest ../test/integration --coverage && npx rimraf ../../files/user2/tools/README.md",
24
- "test:unit": "npx shx cp test/data/user2/tools/README.md ../../files/user2/tools/ && npx cross-env TEST_PATH=test/data jest ../test/unit --coverage && npx rimraf ../../files/user2/tools/README.md"
23
+ "posttest": "npx rimraf ../../files/user2/tools/README.md",
24
+ "test:all": "npx cross-env LOCAL_PATH=test/data jest --testPathIgnorePatterns=cloudcmd --coverage",
25
+ "test:e2e": "npx cross-env LOCAL_PATH=test/data jest --config ./test/jest-e2e.json --coverage",
26
+ "test:http": "yarn build && pm2 start -f --name libms-test dist/src/main.js -- -c .env -H ./config/http.json && jest test/cloudcmd --coverage --coverageThreshold=\"{}\" && pm2 delete libms-test",
27
+ "test:http-nocov": "yarn build && pm2 start -f --name libms-test dist/src/main.js -- -c .env -H ./config/http.json && jest test/cloudcmd --coverage=false && pm2 delete libms-test",
28
+ "test:http-github": "yarn build && yarn start:pm2 && jest test/cloudcmd --coverage --coverageThreshold=\"{}\" && pm2 delete libms",
29
+ "test:int": "npx cross-env LOCAL_PATH=test/data jest ../test/integration --coverage",
30
+ "test:nocov": "yarn test:http-nocov && npx cross-env LOCAL_PATH=test/data jest --testPathIgnorePatterns=cloudcmd --coverage=false",
31
+ "test:unit": "npx cross-env LOCAL_PATH=test/data jest ../test/unit --coverage"
25
32
  },
26
33
  "bin": "./dist/src/main.js",
27
34
  "dependencies": {
28
- "@apollo/client": "^3.8.4",
29
- "@apollo/server": "^4.9.3",
30
- "@nestjs/apollo": "^12.0.9",
31
- "@nestjs/common": "^10.2.6",
35
+ "@apollo/client": "^3.8.9",
36
+ "@apollo/server": "^4.10.0",
37
+ "@nestjs/apollo": "^12.0.11",
38
+ "@nestjs/common": "^10.3.0",
32
39
  "@nestjs/config": "^3.1.1",
33
- "@nestjs/core": "^10.2.6",
34
- "@nestjs/graphql": "^12.0.9",
35
- "@nestjs/platform-express": "^10.2.6",
40
+ "@nestjs/core": "^10.3.0",
41
+ "@nestjs/graphql": "^12.0.11",
42
+ "@nestjs/platform-express": "^10.3.0",
36
43
  "axios": "^1.5.1",
44
+ "cloudcmd": "^16.17.7",
37
45
  "commander": "^11.1.0",
38
46
  "dotenv": "^16.3.1",
39
- "express": "^4.18.2",
40
47
  "graphql": "^16.8.1",
41
48
  "mock-fs": "^5.2.0",
42
49
  "reflect-metadata": "^0.1.13",
43
50
  "rxjs": "^7.8.1",
51
+ "socket.io": "^4.7.2",
44
52
  "type-graphql": "^2.0.0-beta.3"
45
53
  },
46
54
  "devDependencies": {
47
- "@nestjs/cli": "^10.1.18",
48
- "@nestjs/schematics": "^10.0.2",
49
- "@nestjs/testing": "^10.2.6",
50
- "@types/express": "^4.17.18",
51
- "@types/jest": "^29.5.5",
52
- "@types/node": "20.7.2",
55
+ "@nestjs/cli": "^10.3.0",
56
+ "@nestjs/schematics": "^10.1.0",
57
+ "@nestjs/testing": "^10.3.0",
58
+ "@types/express": "^4.17.21",
59
+ "@types/jest": "^29.5.11",
60
+ "@types/node": "20.11.4",
53
61
  "@types/supertest": "^2.0.13",
54
- "@typescript-eslint/eslint-plugin": "^6.7.3",
55
- "@typescript-eslint/parser": "^6.7.3",
56
- "eslint": "^8.50.0",
62
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
63
+ "@typescript-eslint/parser": "^6.19.0",
64
+ "cross-fetch": "^4.0.0",
65
+ "eslint": "^8.56.0",
57
66
  "eslint-config-airbnb-base": "^15.0.0",
58
- "eslint-config-prettier": "^9.0.0",
59
- "eslint-plugin-import": "^2.28.1",
60
- "eslint-plugin-jest": "^27.4.0",
61
- "eslint-plugin-prettier": "^5.0.0",
67
+ "eslint-config-prettier": "^9.1.0",
68
+ "eslint-plugin-import": "^2.29.1",
69
+ "eslint-plugin-jest": "^27.6.3",
70
+ "eslint-plugin-prettier": "^5.1.3",
62
71
  "graphql-scalars": "^1.22.2",
63
72
  "jest": "29.7.0",
64
- "prettier": "^3.0.3",
73
+ "prettier": "^3.2.2",
74
+ "react": "^18.2.0",
65
75
  "supertest": "^6.3.3",
66
76
  "ts-jest": "^29.1.1",
67
77
  "ts-node": "^10.9.1",
package/pm2.config.js ADDED
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ apps : [
3
+ {
4
+ name: "libms",
5
+ script: "./dist/src/main.js",
6
+ watch: false,
7
+ args: "-H ./config/http.json"
8
+ }
9
+ ]
10
+ }
package/src/bootstrap.ts CHANGED
@@ -2,9 +2,11 @@ import { NestFactory } from '@nestjs/core';
2
2
  import { ConfigService } from '@nestjs/config';
3
3
  import * as dotenv from 'dotenv';
4
4
  import AppModule from './app.module';
5
+ import cloudCMD from './cloudcmd/cloudcmd';
5
6
 
6
7
  type BootstrapOptions = {
7
8
  config?: string;
9
+ httpServer?: string;
8
10
  runHelp?: CallableFunction;
9
11
  };
10
12
 
@@ -22,8 +24,14 @@ export default async function bootstrap(options?: BootstrapOptions) {
22
24
  process.exit(1);
23
25
  }
24
26
  }
27
+
25
28
  const app = await NestFactory.create(AppModule);
26
29
  const configService = app.get(ConfigService);
27
30
  const port = configService.get<number>('PORT');
31
+
32
+ if (options.httpServer) {
33
+ cloudCMD(app, options.httpServer, configService.get<string>('LOCAL_PATH'));
34
+ }
35
+
28
36
  await app.listen(port);
29
37
  }
@@ -0,0 +1,32 @@
1
+ import { INestApplication } from '@nestjs/common';
2
+ import { Server } from 'socket.io';
3
+ import * as cloudcmd from 'cloudcmd';
4
+ import { join } from 'path';
5
+
6
+ const runCloudCMD = (
7
+ app: INestApplication,
8
+ optionsPath: string,
9
+ filesPath: string,
10
+ ) => {
11
+ const { createConfigManager } = cloudcmd;
12
+ const configManager = createConfigManager({
13
+ configPath: join(process.cwd(), optionsPath),
14
+ });
15
+
16
+ configManager('root', filesPath);
17
+
18
+ const server = app.getHttpServer();
19
+
20
+ const socket = new Server(server, {
21
+ path: `${configManager('prefix')}/socket.io`,
22
+ });
23
+ app.use(
24
+ configManager('prefix'),
25
+ cloudcmd({
26
+ configManager,
27
+ socket,
28
+ }),
29
+ );
30
+ };
31
+
32
+ export default runCloudCMD;
@@ -1,15 +1,9 @@
1
1
  import { Module } from '@nestjs/common';
2
2
  import FilesResolver from './resolvers/files.resolver';
3
- import GitlabFilesService from './services/gitlab-files.service';
4
3
  import FilesServiceFactory from './services/files-service.factory';
5
4
  import LocalFilesService from './services/local-files.service';
6
5
 
7
6
  @Module({
8
- providers: [
9
- FilesResolver,
10
- LocalFilesService,
11
- GitlabFilesService,
12
- FilesServiceFactory,
13
- ],
7
+ providers: [FilesResolver, LocalFilesService, FilesServiceFactory],
14
8
  })
15
9
  export default class FilesModule {}
@@ -1,7 +1,6 @@
1
1
  import { Injectable, Inject } from '@nestjs/common';
2
2
  import { ConfigService } from '@nestjs/config';
3
3
  import { IFilesService } from '../interfaces/files.service.interface';
4
- import GitlabFilesService from './gitlab-files.service';
5
4
  import LocalFilesService from './local-files.service';
6
5
 
7
6
  @Injectable()
@@ -9,7 +8,6 @@ export default class FilesServiceFactory {
9
8
  /* eslint-disable no-useless-constructor, no-empty-function */
10
9
  constructor(
11
10
  private configService: ConfigService,
12
- @Inject(GitlabFilesService) private gitlabFilesService: GitlabFilesService,
13
11
  @Inject(LocalFilesService) private localFilesService: LocalFilesService,
14
12
  ) {}
15
13
  /* eslint-enable no-useless-constructor, no-empty-function */
@@ -19,9 +17,6 @@ export default class FilesServiceFactory {
19
17
  if (mode === 'local') {
20
18
  return this.localFilesService;
21
19
  }
22
- if (mode === 'gitlab') {
23
- return this.gitlabFilesService;
24
- }
25
20
  throw new Error(`Invalid MODE: ${mode}`);
26
21
  }
27
22
  }
@@ -34,11 +34,11 @@ export default class LocalFilesService implements IFilesService {
34
34
 
35
35
  async readFile(path: string): Promise<Project> {
36
36
  const dataPath = this.configService.get('LOCAL_PATH');
37
- const fullpath = join(dataPath, path);
37
+ const fullPath = join(dataPath, path);
38
38
 
39
39
  try {
40
40
  const content = await (
41
- await fs.promises.readFile(fullpath, 'utf8')
41
+ await fs.promises.readFile(fullPath, 'utf8')
42
42
  ).trim();
43
43
 
44
44
  const name = path.split('/').pop(); // extract file name from the path
package/src/main.ts CHANGED
@@ -4,15 +4,20 @@ import bootstrap from './bootstrap';
4
4
 
5
5
  type ProgramOptions = {
6
6
  config?: string;
7
+ http?: string;
7
8
  };
8
9
 
9
10
  const program = new Command();
10
11
 
11
12
  program
12
13
  .description(
13
- '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.',
14
+ 'The lib microservice is a file server. It supports file transfer over GraphQL and HTTP protocols.',
15
+ )
16
+ .option('-c, --config <file>', 'provide the config file (default .env)')
17
+ .option(
18
+ '-H, --http <file>',
19
+ 'enable the HTTP server with the specified config',
14
20
  )
15
- .option('-c, --config <path>', 'set the config path (default .env)')
16
21
  .helpOption('-h, --help', 'display help for libms')
17
22
  .showHelpAfterError();
18
23
 
@@ -20,8 +25,8 @@ program.parse(process.argv);
20
25
 
21
26
  const options: ProgramOptions = program.opts();
22
27
 
23
- if (options.config) {
24
- bootstrap({ config: options.config, runHelp: () => program.help() });
25
- } else {
26
- bootstrap({ runHelp: () => program.help() });
27
- }
28
+ bootstrap({
29
+ config: options.config,
30
+ httpServer: options.http,
31
+ runHelp: () => program.help(),
32
+ });
@@ -0,0 +1,52 @@
1
+ import axios from 'axios';
2
+ import { unlink, writeFile } from 'fs/promises';
3
+ import { config } from 'dotenv';
4
+
5
+ describe('cloudcmd test for the application', () => {
6
+ beforeAll(async () => {
7
+ config();
8
+
9
+ await writeFile(`${process.env.LOCAL_PATH}/test.txt`, 'content12345');
10
+ // eslint-disable-next-line no-promise-executor-return
11
+ await new Promise((resolve) => setTimeout(resolve, 8000));
12
+ }, 10000);
13
+
14
+ afterAll(async () => {
15
+ await unlink(`${process.env.LOCAL_PATH}/test.txt`);
16
+ await unlink(`${process.env.LOCAL_PATH}/uploadTest.txt`);
17
+ }, 10000);
18
+
19
+ it('should return the correct directory that is set as root', async () => {
20
+ const response = await axios.get(
21
+ `http://localhost:${process.env.PORT}${process.env.APOLLO_PATH}/files/api/v1/fs`,
22
+ {
23
+ responseType: 'json',
24
+ },
25
+ );
26
+ /* eslint-disable no-console */
27
+ console.log(response.data);
28
+ /* eslint-enable no-console */
29
+ expect(response.data.path).toEqual('/');
30
+ expect(response.data.files[0].name).toEqual('common');
31
+ expect(response.data.files[1].name).toEqual('user1');
32
+ expect(response.data.files[2].name).toEqual('user2');
33
+ }, 10000);
34
+
35
+ it('should return the content of a file that is uplaoded to cloudcmd ', async () => {
36
+ const response = await axios.get(
37
+ `http://localhost:${process.env.PORT}${process.env.APOLLO_PATH}/files/api/v1/fs/test.txt`,
38
+ );
39
+
40
+ expect(response.data).toEqual('content12345');
41
+ }, 10000);
42
+
43
+ it('should upload a file to cloudcmd', async () => {
44
+ const response = await axios.put(
45
+ `http://localhost:${process.env.PORT}${process.env.APOLLO_PATH}/files/api/v1/fs/uploadTest.txt`,
46
+ 'some content',
47
+ { responseType: 'text' },
48
+ );
49
+
50
+ expect(response.data).toEqual('save: ok("uploadTest.txt")');
51
+ }, 10000);
52
+ });
@@ -1,9 +1,9 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1704119534187" clover="3.2.0">
3
- <project timestamp="1704119534187" name="All files">
4
- <metrics statements="31" coveredstatements="18" conditionals="8" coveredconditionals="0" methods="2" coveredmethods="0" elements="41" coveredelements="18" complexity="0" loc="31" ncloc="31" packages="1" files="1" classes="1"/>
2
+ <coverage generated="1706109298806" clover="3.2.0">
3
+ <project timestamp="1706109298806" name="All files">
4
+ <metrics statements="26" coveredstatements="18" conditionals="4" coveredconditionals="0" methods="2" coveredmethods="0" elements="32" coveredelements="18" complexity="0" loc="26" ncloc="26" packages="1" files="1" classes="1"/>
5
5
  <file name="testUtil.ts" path="/home/prasad/git/prasadtalasila/DTaaS/servers/lib/test/testUtil.ts">
6
- <metrics statements="31" coveredstatements="18" conditionals="8" coveredconditionals="0" methods="2" coveredmethods="0"/>
6
+ <metrics statements="26" coveredstatements="18" conditionals="4" coveredconditionals="0" methods="2" coveredmethods="0"/>
7
7
  <line num="1" count="1" type="stmt"/>
8
8
  <line num="2" count="1" type="stmt"/>
9
9
  <line num="4" count="1" type="stmt"/>
@@ -19,22 +19,17 @@
19
19
  <line num="52" count="0" type="stmt"/>
20
20
  <line num="53" count="0" type="stmt"/>
21
21
  <line num="56" count="1" type="stmt"/>
22
- <line num="59" count="0" type="cond" truecount="0" falsecount="6"/>
22
+ <line num="59" count="0" type="cond" truecount="0" falsecount="3"/>
23
23
  <line num="61" count="0" type="stmt"/>
24
- <line num="63" count="0" type="stmt"/>
25
- <line num="65" count="0" type="stmt"/>
26
- <line num="67" count="0" type="stmt"/>
27
- <line num="69" count="0" type="cond" truecount="0" falsecount="1"/>
28
- <line num="70" count="0" type="stmt"/>
29
- <line num="72" count="0" type="cond" truecount="0" falsecount="1"/>
30
- <line num="73" count="0" type="stmt"/>
31
- <line num="75" count="0" type="stmt"/>
32
- <line num="78" count="0" type="stmt"/>
33
- <line num="83" count="1" type="stmt"/>
34
- <line num="102" count="1" type="stmt"/>
35
- <line num="142" count="1" type="stmt"/>
36
- <line num="160" count="1" type="stmt"/>
37
- <line num="178" count="1" type="stmt"/>
24
+ <line num="63" count="0" type="cond" truecount="0" falsecount="1"/>
25
+ <line num="64" count="0" type="stmt"/>
26
+ <line num="66" count="0" type="stmt"/>
27
+ <line num="69" count="0" type="stmt"/>
28
+ <line num="74" count="1" type="stmt"/>
29
+ <line num="93" count="1" type="stmt"/>
30
+ <line num="133" count="1" type="stmt"/>
31
+ <line num="151" count="1" type="stmt"/>
32
+ <line num="169" count="1" type="stmt"/>
38
33
  </file>
39
34
  </project>
40
35
  </coverage>
@@ -1,2 +1,2 @@
1
- {"/home/prasad/git/prasadtalasila/DTaaS/servers/lib/test/testUtil.ts": {"path":"/home/prasad/git/prasadtalasila/DTaaS/servers/lib/test/testUtil.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":33}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":45}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":32}},"3":{"start":{"line":7,"column":13},"end":{"line":7,"column":52}},"4":{"start":{"line":9,"column":13},"end":{"line":9,"column":43}},"5":{"start":{"line":11,"column":13},"end":{"line":26,"column":2}},"6":{"start":{"line":27,"column":13},"end":{"line":27,"column":40}},"7":{"start":{"line":28,"column":13},"end":{"line":28,"column":46}},"8":{"start":{"line":29,"column":13},"end":{"line":29,"column":61}},"9":{"start":{"line":30,"column":13},"end":{"line":36,"column":2}},"10":{"start":{"line":37,"column":13},"end":{"line":49,"column":2}},"11":{"start":{"line":52,"column":16},"end":{"line":52,"column":30}},"12":{"start":{"line":53,"column":2},"end":{"line":53,"column":25}},"13":{"start":{"line":51,"column":0},"end":{"line":51,"column":16}},"14":{"start":{"line":59,"column":4},"end":{"line":79,"column":null}},"15":{"start":{"line":61,"column":8},"end":{"line":61,"column":33}},"16":{"start":{"line":63,"column":8},"end":{"line":63,"column":37}},"17":{"start":{"line":65,"column":8},"end":{"line":65,"column":38}},"18":{"start":{"line":67,"column":8},"end":{"line":67,"column":23}},"19":{"start":{"line":69,"column":8},"end":{"line":71,"column":null}},"20":{"start":{"line":70,"column":10},"end":{"line":70,"column":26}},"21":{"start":{"line":72,"column":8},"end":{"line":74,"column":null}},"22":{"start":{"line":73,"column":10},"end":{"line":73,"column":25}},"23":{"start":{"line":75,"column":8},"end":{"line":75,"column":25}},"24":{"start":{"line":78,"column":8},"end":{"line":78,"column":25}},"25":{"start":{"line":56,"column":0},"end":{"line":56,"column":13}},"26":{"start":{"line":83,"column":13},"end":{"line":100,"column":2}},"27":{"start":{"line":102,"column":13},"end":{"line":140,"column":2}},"28":{"start":{"line":142,"column":13},"end":{"line":158,"column":2}},"29":{"start":{"line":160,"column":13},"end":{"line":176,"column":3}},"30":{"start":{"line":178,"column":13},"end":{"line":190,"column":3}}},"fnMap":{"0":{"name":"sleep","decl":{"start":{"line":51,"column":16},"end":{"line":51,"column":21}},"loc":{"start":{"line":51,"column":24},"end":{"line":54,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":58,"column":2},"end":{"line":58,"column":5}},"loc":{"start":{"line":58,"column":17},"end":{"line":80,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":59,"column":4},"end":{"line":79,"column":null}},"type":"switch","locations":[{"start":{"line":60,"column":6},"end":{"line":61,"column":33}},{"start":{"line":62,"column":6},"end":{"line":63,"column":37}},{"start":{"line":64,"column":6},"end":{"line":65,"column":38}},{"start":{"line":66,"column":6},"end":{"line":67,"column":23}},{"start":{"line":68,"column":6},"end":{"line":75,"column":25}},{"start":{"line":77,"column":6},"end":{"line":78,"column":25}}]},"1":{"loc":{"start":{"line":69,"column":8},"end":{"line":71,"column":null}},"type":"if","locations":[{"start":{"line":69,"column":8},"end":{"line":71,"column":null}}]},"2":{"loc":{"start":{"line":72,"column":8},"end":{"line":74,"column":null}},"type":"if","locations":[{"start":{"line":72,"column":8},"end":{"line":74,"column":null}}]}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":0,"12":0,"13":1,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1},"f":{"0":0,"1":0},"b":{"0":[0,0,0,0,0,0],"1":[0],"2":[0]}}
1
+ {"/home/prasad/git/prasadtalasila/DTaaS/servers/lib/test/testUtil.ts": {"path":"/home/prasad/git/prasadtalasila/DTaaS/servers/lib/test/testUtil.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":33}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":45}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":32}},"3":{"start":{"line":7,"column":13},"end":{"line":7,"column":52}},"4":{"start":{"line":9,"column":13},"end":{"line":9,"column":43}},"5":{"start":{"line":11,"column":13},"end":{"line":26,"column":2}},"6":{"start":{"line":27,"column":13},"end":{"line":27,"column":40}},"7":{"start":{"line":28,"column":13},"end":{"line":28,"column":46}},"8":{"start":{"line":29,"column":13},"end":{"line":29,"column":61}},"9":{"start":{"line":30,"column":13},"end":{"line":36,"column":2}},"10":{"start":{"line":37,"column":13},"end":{"line":49,"column":2}},"11":{"start":{"line":52,"column":16},"end":{"line":52,"column":30}},"12":{"start":{"line":53,"column":2},"end":{"line":53,"column":25}},"13":{"start":{"line":51,"column":0},"end":{"line":51,"column":16}},"14":{"start":{"line":59,"column":4},"end":{"line":70,"column":null}},"15":{"start":{"line":61,"column":8},"end":{"line":61,"column":38}},"16":{"start":{"line":63,"column":8},"end":{"line":65,"column":null}},"17":{"start":{"line":64,"column":10},"end":{"line":64,"column":25}},"18":{"start":{"line":66,"column":8},"end":{"line":66,"column":25}},"19":{"start":{"line":69,"column":8},"end":{"line":69,"column":25}},"20":{"start":{"line":56,"column":0},"end":{"line":56,"column":13}},"21":{"start":{"line":74,"column":13},"end":{"line":91,"column":2}},"22":{"start":{"line":93,"column":13},"end":{"line":131,"column":2}},"23":{"start":{"line":133,"column":13},"end":{"line":149,"column":2}},"24":{"start":{"line":151,"column":13},"end":{"line":167,"column":3}},"25":{"start":{"line":169,"column":13},"end":{"line":181,"column":3}}},"fnMap":{"0":{"name":"sleep","decl":{"start":{"line":51,"column":16},"end":{"line":51,"column":21}},"loc":{"start":{"line":51,"column":24},"end":{"line":54,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":58,"column":2},"end":{"line":58,"column":5}},"loc":{"start":{"line":58,"column":17},"end":{"line":71,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":59,"column":4},"end":{"line":70,"column":null}},"type":"switch","locations":[{"start":{"line":60,"column":6},"end":{"line":61,"column":38}},{"start":{"line":62,"column":6},"end":{"line":66,"column":25}},{"start":{"line":68,"column":6},"end":{"line":69,"column":25}}]},"1":{"loc":{"start":{"line":63,"column":8},"end":{"line":65,"column":null}},"type":"if","locations":[{"start":{"line":63,"column":8},"end":{"line":65,"column":null}}]}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":0,"12":0,"13":1,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1},"f":{"0":0,"1":0},"b":{"0":[0,0,0],"1":[0]}}
2
2
  }