nestjs-web-console 1.0.3 → 1.0.5

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
 
@@ -24,6 +24,7 @@ const remote_console_service_1 = require("../services/remote.console.service");
24
24
  const temp_file_service_1 = require("../services/temp.file.service");
25
25
  const web_console_service_1 = require("../services/web.console.service");
26
26
  const core_1 = require("@nestjs/core");
27
+ const swagger_1 = require("@nestjs/swagger");
27
28
  const boot = new Date();
28
29
  function WebConsoleControllerFactory(endpoint) {
29
30
  let WebConsoleController = class WebConsoleController {
@@ -680,7 +681,8 @@ function WebConsoleControllerFactory(endpoint) {
680
681
  __metadata("design:returntype", void 0)
681
682
  ], WebConsoleController.prototype, "downloadTemp", null);
682
683
  WebConsoleController = __decorate([
683
- (0, common_1.Controller)(endpoint || 'console'),
684
+ (0, swagger_1.ApiExcludeController)(),
685
+ (0, common_1.Controller)(endpoint),
684
686
  (0, common_1.UseFilters)(http_exception_filter_1.HttpExceptionFilter),
685
687
  __metadata("design:paramtypes", [web_console_service_1.WebConsoleService, remote_console_service_1.RemoteConsoleService,
686
688
  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.5",
4
4
  "description": "Web console for NestJs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,9 +25,10 @@
25
25
  },
26
26
  "homepage": "https://github.com/murat-mehmet/nestjs-web-console#readme",
27
27
  "devDependencies": {
28
- "@nestjs/axios": "^3.0.1",
29
- "@nestjs/common": "^10.3.1",
30
- "@nestjs/core": "^10.3.1",
28
+ "@nestjs/axios": "^4.0.1",
29
+ "@nestjs/common": "^11.0.0",
30
+ "@nestjs/core": "^11.0.0",
31
+ "@nestjs/swagger": "^11.2.5",
31
32
  "@types/express": "^4.17.17",
32
33
  "@types/lodash": "^4.14.170",
33
34
  "@types/moment-duration-format": "^2.2.3",
package/dist.zip DELETED
Binary file