nestjs-web-console 1.0.2 → 1.0.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.
Files changed (47) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +66 -66
  3. package/dist/console.types.d.ts +75 -75
  4. package/dist/console.types.js +15 -15
  5. package/dist/controllers/web.console.controller.d.ts +1 -1
  6. package/dist/controllers/web.console.controller.js +690 -675
  7. package/dist/filters/http-exception.filter.d.ts +4 -4
  8. package/dist/filters/http-exception.filter.js +50 -50
  9. package/dist/index.d.ts +8 -8
  10. package/dist/index.js +24 -24
  11. package/dist/services/all.commands.d.ts +3 -3
  12. package/dist/services/all.commands.js +13 -13
  13. package/dist/services/processors/base/console.command.d.ts +8 -8
  14. package/dist/services/processors/base/console.command.js +27 -27
  15. package/dist/services/processors/base/invalid.command.d.ts +5 -5
  16. package/dist/services/processors/base/invalid.command.js +14 -14
  17. package/dist/services/processors/base/not-logged.command.d.ts +5 -5
  18. package/dist/services/processors/base/not-logged.command.js +10 -10
  19. package/dist/services/processors/bash.command.d.ts +7 -7
  20. package/dist/services/processors/bash.command.js +102 -102
  21. package/dist/services/processors/clear-screen.command.d.ts +6 -6
  22. package/dist/services/processors/clear-screen.command.js +30 -30
  23. package/dist/services/processors/cmd.command.d.ts +7 -7
  24. package/dist/services/processors/cmd.command.js +99 -99
  25. package/dist/services/processors/help.command.d.ts +7 -7
  26. package/dist/services/processors/help.command.js +41 -41
  27. package/dist/services/processors/index.d.ts +8 -8
  28. package/dist/services/processors/index.js +24 -24
  29. package/dist/services/processors/invite.command.d.ts +9 -9
  30. package/dist/services/processors/invite.command.js +76 -76
  31. package/dist/services/processors/join.command.d.ts +8 -8
  32. package/dist/services/processors/join.command.js +108 -108
  33. package/dist/services/processors/login.command.d.ts +14 -14
  34. package/dist/services/processors/login.command.js +69 -69
  35. package/dist/services/processors/logout.command.d.ts +6 -6
  36. package/dist/services/processors/logout.command.js +30 -30
  37. package/dist/services/remote.console.service.d.ts +30 -30
  38. package/dist/services/remote.console.service.js +107 -107
  39. package/dist/services/temp.file.service.d.ts +25 -23
  40. package/dist/services/temp.file.service.js +102 -90
  41. package/dist/services/web.console.service.d.ts +57 -57
  42. package/dist/services/web.console.service.js +437 -437
  43. package/dist/web.console.module.d.ts +6 -6
  44. package/dist/web.console.module.js +87 -87
  45. package/dist.zip +0 -0
  46. package/package.json +5 -5
  47. package/tsconfig.json +18 -18
@@ -1,108 +1,108 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.JoinCommand = void 0;
16
- const common_1 = require("@nestjs/common");
17
- const lodash_1 = __importDefault(require("lodash"));
18
- const remote_console_service_1 = require("../remote.console.service");
19
- const console_command_1 = require("./base/console.command");
20
- let JoinCommand = class JoinCommand extends console_command_1.ConsoleCommand {
21
- constructor(remoteConsoleService) {
22
- super();
23
- Object.defineProperty(this, "remoteConsoleService", {
24
- enumerable: true,
25
- configurable: true,
26
- writable: true,
27
- value: remoteConsoleService
28
- });
29
- this.command = 'join';
30
- this.description = 'Joins a remote console.';
31
- }
32
- async process({ log, readArgs, session, readLine }) {
33
- if (!Object.keys(this.remoteConsoleService.openInvitations).length)
34
- return log('No open invitations');
35
- const [remoteName] = await readArgs([{
36
- title: 'Remote name',
37
- opts: {
38
- select: (0, lodash_1.default)(this.remoteConsoleService.openInvitations).keys().valueOf()
39
- }
40
- }]);
41
- session.onCancelSignal = () => {
42
- var _a;
43
- if (session.joinedConnection) {
44
- session.joinedConnection.command = "ctrl+c";
45
- }
46
- else
47
- (_a = session.onCancel) === null || _a === void 0 ? void 0 : _a.call(this);
48
- };
49
- const inv = this.remoteConsoleService.openInvitations[remoteName];
50
- if (!inv)
51
- return log('Console session no more open.');
52
- log('Joined console session.\n');
53
- const currentLogs = session.logs;
54
- let isOnStreamRunning = false;
55
- const onStream = () => {
56
- if (isOnStreamRunning)
57
- return;
58
- isOnStreamRunning = true;
59
- try {
60
- session.logs = currentLogs + session.joinedConnection.result.replace(/\n/g, '<br/>').replace(/\r/g, '').replace(/\s\s/g, ' &nbsp;');
61
- if (!session.joinedConnection.running) {
62
- session.logs += '<br/>';
63
- readLine(`${session.joinedConnection.path}:/>`)
64
- .then(input => {
65
- session.joinedConnection.command = input;
66
- session.logs = currentLogs + session.joinedConnection.result.replace(/\n/g, '<br/>').replace(/\r/g, '').replace(/\s\s/g, ' &nbsp;');
67
- isOnStreamRunning = false;
68
- });
69
- }
70
- else if (session.joinedConnection.readLine) {
71
- session.logs += '<br/>';
72
- readLine(session.joinedConnection.readLineOpts['title'], session.joinedConnection.readLineOpts)
73
- .then(input => {
74
- session.joinedConnection.command = input;
75
- session.logs = currentLogs + session.joinedConnection.result.replace(/\n/g, '<br/>').replace(/\r/g, '').replace(/\s\s/g, ' &nbsp;');
76
- isOnStreamRunning = false;
77
- });
78
- }
79
- else
80
- isOnStreamRunning = false;
81
- }
82
- catch (e) {
83
- log(e.message);
84
- session.onCancel();
85
- }
86
- };
87
- session.joinedConnection = {
88
- name: remoteName,
89
- version: inv.version,
90
- path: inv.path,
91
- result: '',
92
- readLine: false,
93
- running: false,
94
- readLineOpts: null,
95
- onStream,
96
- command: null
97
- };
98
- await new Promise(r => {
99
- session.onCancel = r;
100
- });
101
- session.joinedConnection = null;
102
- }
103
- };
104
- JoinCommand = __decorate([
105
- (0, common_1.Injectable)(),
106
- __metadata("design:paramtypes", [remote_console_service_1.RemoteConsoleService])
107
- ], JoinCommand);
108
- exports.JoinCommand = JoinCommand;
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 __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.JoinCommand = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const lodash_1 = __importDefault(require("lodash"));
18
+ const remote_console_service_1 = require("../remote.console.service");
19
+ const console_command_1 = require("./base/console.command");
20
+ let JoinCommand = class JoinCommand extends console_command_1.ConsoleCommand {
21
+ constructor(remoteConsoleService) {
22
+ super();
23
+ Object.defineProperty(this, "remoteConsoleService", {
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true,
27
+ value: remoteConsoleService
28
+ });
29
+ this.command = 'join';
30
+ this.description = 'Joins a remote console.';
31
+ }
32
+ async process({ log, readArgs, session, readLine }) {
33
+ if (!Object.keys(this.remoteConsoleService.openInvitations).length)
34
+ return log('No open invitations');
35
+ const [remoteName] = await readArgs([{
36
+ title: 'Remote name',
37
+ opts: {
38
+ select: (0, lodash_1.default)(this.remoteConsoleService.openInvitations).keys().valueOf()
39
+ }
40
+ }]);
41
+ session.onCancelSignal = () => {
42
+ var _a;
43
+ if (session.joinedConnection) {
44
+ session.joinedConnection.command = "ctrl+c";
45
+ }
46
+ else
47
+ (_a = session.onCancel) === null || _a === void 0 ? void 0 : _a.call(this);
48
+ };
49
+ const inv = this.remoteConsoleService.openInvitations[remoteName];
50
+ if (!inv)
51
+ return log('Console session no more open.');
52
+ log('Joined console session.\n');
53
+ const currentLogs = session.logs;
54
+ let isOnStreamRunning = false;
55
+ const onStream = () => {
56
+ if (isOnStreamRunning)
57
+ return;
58
+ isOnStreamRunning = true;
59
+ try {
60
+ session.logs = currentLogs + session.joinedConnection.result.replace(/\n/g, '<br/>').replace(/\r/g, '').replace(/\s\s/g, ' &nbsp;');
61
+ if (!session.joinedConnection.running) {
62
+ session.logs += '<br/>';
63
+ readLine(`${session.joinedConnection.path}:/>`)
64
+ .then(input => {
65
+ session.joinedConnection.command = input;
66
+ session.logs = currentLogs + session.joinedConnection.result.replace(/\n/g, '<br/>').replace(/\r/g, '').replace(/\s\s/g, ' &nbsp;');
67
+ isOnStreamRunning = false;
68
+ });
69
+ }
70
+ else if (session.joinedConnection.readLine) {
71
+ session.logs += '<br/>';
72
+ readLine(session.joinedConnection.readLineOpts['title'], session.joinedConnection.readLineOpts)
73
+ .then(input => {
74
+ session.joinedConnection.command = input;
75
+ session.logs = currentLogs + session.joinedConnection.result.replace(/\n/g, '<br/>').replace(/\r/g, '').replace(/\s\s/g, ' &nbsp;');
76
+ isOnStreamRunning = false;
77
+ });
78
+ }
79
+ else
80
+ isOnStreamRunning = false;
81
+ }
82
+ catch (e) {
83
+ log(e.message);
84
+ session.onCancel();
85
+ }
86
+ };
87
+ session.joinedConnection = {
88
+ name: remoteName,
89
+ version: inv.version,
90
+ path: inv.path,
91
+ result: '',
92
+ readLine: false,
93
+ running: false,
94
+ readLineOpts: null,
95
+ onStream,
96
+ command: null
97
+ };
98
+ await new Promise(r => {
99
+ session.onCancel = r;
100
+ });
101
+ session.joinedConnection = null;
102
+ }
103
+ };
104
+ JoinCommand = __decorate([
105
+ (0, common_1.Injectable)(),
106
+ __metadata("design:paramtypes", [remote_console_service_1.RemoteConsoleService])
107
+ ], JoinCommand);
108
+ exports.JoinCommand = JoinCommand;
@@ -1,14 +1,14 @@
1
- import { ConsoleOptions } from "../../console.types";
2
- import { CommandProcessParameters } from "../web.console.service";
3
- import { ConsoleCommand } from './base/console.command';
4
- export declare class LoginCommand extends ConsoleCommand {
5
- guard: Guard;
6
- consoleOptions: ConsoleOptions;
7
- constructor();
8
- process({ arg, session, log, readArgs }: CommandProcessParameters): Promise<any>;
9
- }
10
- interface Guard {
11
- failed: number;
12
- cooldownUntil: number;
13
- }
14
- export {};
1
+ import { ConsoleOptions } from "../../console.types";
2
+ import { CommandProcessParameters } from "../web.console.service";
3
+ import { ConsoleCommand } from './base/console.command';
4
+ export declare class LoginCommand extends ConsoleCommand {
5
+ guard: Guard;
6
+ consoleOptions: ConsoleOptions;
7
+ constructor();
8
+ process({ arg, session, log, readArgs }: CommandProcessParameters): Promise<any>;
9
+ }
10
+ interface Guard {
11
+ failed: number;
12
+ cooldownUntil: number;
13
+ }
14
+ export {};
@@ -1,69 +1,69 @@
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.LoginCommand = void 0;
13
- const common_1 = require("@nestjs/common");
14
- const console_command_1 = require("./base/console.command");
15
- let LoginCommand = class LoginCommand extends console_command_1.ConsoleCommand {
16
- constructor() {
17
- super();
18
- Object.defineProperty(this, "guard", {
19
- enumerable: true,
20
- configurable: true,
21
- writable: true,
22
- value: { failed: 0, cooldownUntil: 0 }
23
- });
24
- Object.defineProperty(this, "consoleOptions", {
25
- enumerable: true,
26
- configurable: true,
27
- writable: true,
28
- value: void 0
29
- });
30
- this.command = 'login';
31
- this.description = 'Allows you to login to console.';
32
- this.requiresAuth = false;
33
- }
34
- async process({ arg, session, log, readArgs }) {
35
- if (session.isLogged)
36
- return log('Already logged in');
37
- const { guard } = this;
38
- if (guard.cooldownUntil > Date.now()) {
39
- log('Login cooldown. Try again later.');
40
- return;
41
- }
42
- const [input] = await readArgs([{
43
- title: 'Enter master pin',
44
- opts: { secure: true }
45
- }]);
46
- if (this.consoleOptions.masterPin == input) {
47
- session.isLogged = true;
48
- log('Login success');
49
- guard.failed = 0;
50
- }
51
- else {
52
- log('Login failed');
53
- guard.failed++;
54
- }
55
- if (this.consoleOptions.guard.enabled && guard.failed == this.consoleOptions.guard.maxTries) {
56
- guard.cooldownUntil = Date.now() + this.consoleOptions.guard.cooldown;
57
- log('Login banned temporarily.');
58
- }
59
- }
60
- };
61
- __decorate([
62
- (0, common_1.Inject)('CONFIG_ROOT_OPTIONS'),
63
- __metadata("design:type", Object)
64
- ], LoginCommand.prototype, "consoleOptions", void 0);
65
- LoginCommand = __decorate([
66
- (0, common_1.Injectable)(),
67
- __metadata("design:paramtypes", [])
68
- ], LoginCommand);
69
- exports.LoginCommand = LoginCommand;
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.LoginCommand = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const console_command_1 = require("./base/console.command");
15
+ let LoginCommand = class LoginCommand extends console_command_1.ConsoleCommand {
16
+ constructor() {
17
+ super();
18
+ Object.defineProperty(this, "guard", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: { failed: 0, cooldownUntil: 0 }
23
+ });
24
+ Object.defineProperty(this, "consoleOptions", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: void 0
29
+ });
30
+ this.command = 'login';
31
+ this.description = 'Allows you to login to console.';
32
+ this.requiresAuth = false;
33
+ }
34
+ async process({ arg, session, log, readArgs }) {
35
+ if (session.isLogged)
36
+ return log('Already logged in');
37
+ const { guard } = this;
38
+ if (guard.cooldownUntil > Date.now()) {
39
+ log('Login cooldown. Try again later.');
40
+ return;
41
+ }
42
+ const [input] = await readArgs([{
43
+ title: 'Enter master pin',
44
+ opts: { secure: true }
45
+ }]);
46
+ if (this.consoleOptions.masterPin == input) {
47
+ session.isLogged = true;
48
+ log('Login success');
49
+ guard.failed = 0;
50
+ }
51
+ else {
52
+ log('Login failed');
53
+ guard.failed++;
54
+ }
55
+ if (this.consoleOptions.guard.enabled && guard.failed == this.consoleOptions.guard.maxTries) {
56
+ guard.cooldownUntil = Date.now() + this.consoleOptions.guard.cooldown;
57
+ log('Login banned temporarily.');
58
+ }
59
+ }
60
+ };
61
+ __decorate([
62
+ (0, common_1.Inject)('CONFIG_ROOT_OPTIONS'),
63
+ __metadata("design:type", Object)
64
+ ], LoginCommand.prototype, "consoleOptions", void 0);
65
+ LoginCommand = __decorate([
66
+ (0, common_1.Injectable)(),
67
+ __metadata("design:paramtypes", [])
68
+ ], LoginCommand);
69
+ exports.LoginCommand = LoginCommand;
@@ -1,6 +1,6 @@
1
- import { CommandProcessParameters } from "../web.console.service";
2
- import { ConsoleCommand } from "./base/console.command";
3
- export declare class LogoutCommand extends ConsoleCommand {
4
- constructor();
5
- process({ arg, session, log }: CommandProcessParameters): Promise<void>;
6
- }
1
+ import { CommandProcessParameters } from "../web.console.service";
2
+ import { ConsoleCommand } from "./base/console.command";
3
+ export declare class LogoutCommand extends ConsoleCommand {
4
+ constructor();
5
+ process({ arg, session, log }: CommandProcessParameters): Promise<void>;
6
+ }
@@ -1,30 +1,30 @@
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.LogoutCommand = void 0;
13
- const common_1 = require("@nestjs/common");
14
- const console_command_1 = require("./base/console.command");
15
- let LogoutCommand = class LogoutCommand extends console_command_1.ConsoleCommand {
16
- constructor() {
17
- super();
18
- this.command = 'logout';
19
- this.description = 'Allows you to logout from console.';
20
- }
21
- async process({ arg, session, log }) {
22
- session.isLogged = false;
23
- log('Logged out.');
24
- }
25
- };
26
- LogoutCommand = __decorate([
27
- (0, common_1.Injectable)(),
28
- __metadata("design:paramtypes", [])
29
- ], LogoutCommand);
30
- exports.LogoutCommand = LogoutCommand;
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.LogoutCommand = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const console_command_1 = require("./base/console.command");
15
+ let LogoutCommand = class LogoutCommand extends console_command_1.ConsoleCommand {
16
+ constructor() {
17
+ super();
18
+ this.command = 'logout';
19
+ this.description = 'Allows you to logout from console.';
20
+ }
21
+ async process({ arg, session, log }) {
22
+ session.isLogged = false;
23
+ log('Logged out.');
24
+ }
25
+ };
26
+ LogoutCommand = __decorate([
27
+ (0, common_1.Injectable)(),
28
+ __metadata("design:paramtypes", [])
29
+ ], LogoutCommand);
30
+ exports.LogoutCommand = LogoutCommand;
@@ -1,30 +1,30 @@
1
- import { ReadLineOptions } from "../console.types";
2
- import { WebConsoleService } from "./web.console.service";
3
- export declare class RemoteConsoleService {
4
- readonly webConsoleService: WebConsoleService;
5
- openInvitations: {
6
- [remoteName: string]: {
7
- expireTimer: any;
8
- version: any;
9
- path: any;
10
- };
11
- };
12
- constructor(webConsoleService: WebConsoleService);
13
- isJoined(remoteName: string): boolean;
14
- inviteThisConsole(remoteName: string, version: string, path: string): {
15
- joined: boolean;
16
- };
17
- pumpStream(input: {
18
- name: string;
19
- result: string;
20
- running: boolean;
21
- readLine: boolean;
22
- readLineOpts: ReadLineOptions;
23
- time: any;
24
- }): Promise<{
25
- command: string;
26
- }>;
27
- closeFromRemote(remoteName: string): Promise<{
28
- success: boolean;
29
- }>;
30
- }
1
+ import { ReadLineOptions } from "../console.types";
2
+ import { WebConsoleService } from "./web.console.service";
3
+ export declare class RemoteConsoleService {
4
+ readonly webConsoleService: WebConsoleService;
5
+ openInvitations: {
6
+ [remoteName: string]: {
7
+ expireTimer: any;
8
+ version: any;
9
+ path: any;
10
+ };
11
+ };
12
+ constructor(webConsoleService: WebConsoleService);
13
+ isJoined(remoteName: string): boolean;
14
+ inviteThisConsole(remoteName: string, version: string, path: string): {
15
+ joined: boolean;
16
+ };
17
+ pumpStream(input: {
18
+ name: string;
19
+ result: string;
20
+ running: boolean;
21
+ readLine: boolean;
22
+ readLineOpts: ReadLineOptions;
23
+ time: any;
24
+ }): Promise<{
25
+ command: string;
26
+ }>;
27
+ closeFromRemote(remoteName: string): Promise<{
28
+ success: boolean;
29
+ }>;
30
+ }