nestjs-web-console 1.0.3 → 1.0.4

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/README.md CHANGED
@@ -1,5 +1,3 @@
1
- # STILL IN DEVELOPMENT
2
-
3
1
  # Web Console for NestJS
4
2
  *Command from anywhere.*
5
3
 
@@ -680,7 +680,7 @@ function WebConsoleControllerFactory(endpoint) {
680
680
  __metadata("design:returntype", void 0)
681
681
  ], WebConsoleController.prototype, "downloadTemp", null);
682
682
  WebConsoleController = __decorate([
683
- (0, common_1.Controller)(endpoint || 'console'),
683
+ (0, common_1.Controller)(endpoint),
684
684
  (0, common_1.UseFilters)(http_exception_filter_1.HttpExceptionFilter),
685
685
  __metadata("design:paramtypes", [web_console_service_1.WebConsoleService, remote_console_service_1.RemoteConsoleService,
686
686
  temp_file_service_1.TempFileService])
@@ -46,7 +46,6 @@ let LoginCommand = class LoginCommand extends console_command_1.ConsoleCommand {
46
46
  if (this.consoleOptions.masterPin == input) {
47
47
  session.isLogged = true;
48
48
  log('Login success');
49
- guard.failed = 0;
50
49
  }
51
50
  else {
52
51
  log('Login failed');
@@ -54,6 +53,7 @@ let LoginCommand = class LoginCommand extends console_command_1.ConsoleCommand {
54
53
  }
55
54
  if (this.consoleOptions.guard.enabled && guard.failed == this.consoleOptions.guard.maxTries) {
56
55
  guard.cooldownUntil = Date.now() + this.consoleOptions.guard.cooldown;
56
+ guard.failed = 0;
57
57
  log('Login banned temporarily.');
58
58
  }
59
59
  }
@@ -25,7 +25,7 @@ let WebConsoleModule = WebConsoleModule_1 = class WebConsoleModule {
25
25
  const { imports = [], commands = [], useFactory, inject, endpoint } = options;
26
26
  all_commands_1.ALL_COMMANDS.push(...commands);
27
27
  return {
28
- controllers: [(0, web_console_controller_1.WebConsoleControllerFactory)(endpoint)],
28
+ controllers: [(0, web_console_controller_1.WebConsoleControllerFactory)(endpoint || 'console')],
29
29
  imports: [
30
30
  ...!imports ? [] : imports,
31
31
  axios_1.HttpModule
@@ -57,7 +57,7 @@ let WebConsoleModule = WebConsoleModule_1 = class WebConsoleModule {
57
57
  const consoleOptions = lodash_1.default.merge(console_types_1.DEFAULT_OPTIONS, options.options);
58
58
  all_commands_1.ALL_COMMANDS.push(...commands);
59
59
  return {
60
- controllers: [(0, web_console_controller_1.WebConsoleControllerFactory)(endpoint)],
60
+ controllers: [(0, web_console_controller_1.WebConsoleControllerFactory)(endpoint || 'console')],
61
61
  imports: [
62
62
  ...!imports ? [] : imports,
63
63
  axios_1.HttpModule
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-web-console",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Web console for NestJs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/dist.zip DELETED
Binary file