@wocker/mongodb-plugin 1.0.6 → 1.0.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.
@@ -207,5 +207,6 @@ __decorate([
207
207
  ], MongodbController.prototype, "getNames", null);
208
208
  exports.MongodbController = MongodbController = __decorate([
209
209
  (0, core_1.Controller)(),
210
+ (0, core_1.Description)("MongoDB commands"),
210
211
  __metadata("design:paramtypes", [MongodbService_1.MongodbService])
211
212
  ], MongodbController);
@@ -1,5 +1,5 @@
1
- import { Config, ConfigProperties } from "@wocker/core";
2
- export type DatabaseProps = ConfigProperties & {
1
+ export type DatabaseProps = {
2
+ name: string;
3
3
  imageName?: string;
4
4
  imageVersion?: string;
5
5
  username: string;
@@ -9,7 +9,8 @@ export type DatabaseProps = ConfigProperties & {
9
9
  volume?: string;
10
10
  configVolume?: string;
11
11
  };
12
- export declare class Database extends Config<DatabaseProps> {
12
+ export declare class Database {
13
+ name: string;
13
14
  imageName?: string;
14
15
  imageVersion?: string;
15
16
  username: string;
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Database = void 0;
4
- const core_1 = require("@wocker/core");
5
- class Database extends core_1.Config {
4
+ class Database {
6
5
  constructor(props) {
7
- super(props);
8
6
  const { name, imageName, imageVersion, username, password, configStorage, configVolume, storage, volume } = props;
9
7
  this.name = name;
10
8
  this.imageName = imageName;
@@ -61,9 +61,9 @@ let MongodbService = class MongodbService {
61
61
  delete props.name;
62
62
  }
63
63
  if (!props.name) {
64
- props.name = (yield (0, utils_1.promptText)({
65
- message: "Mongodb name:",
66
- type: "string",
64
+ props.name = (yield (0, utils_1.promptInput)({
65
+ message: "Mongodb name",
66
+ type: "text",
67
67
  validate: (name) => {
68
68
  if (!name) {
69
69
  return "Name is required";
@@ -76,19 +76,19 @@ let MongodbService = class MongodbService {
76
76
  }));
77
77
  }
78
78
  if (!props.username) {
79
- props.username = yield (0, utils_1.promptText)({
79
+ props.username = yield (0, utils_1.promptInput)({
80
80
  message: "Username:",
81
- type: "string",
81
+ type: "text",
82
82
  required: true
83
83
  });
84
84
  }
85
85
  if (!props.password) {
86
- props.password = (yield (0, utils_1.promptText)({
86
+ props.password = (yield (0, utils_1.promptInput)({
87
87
  message: "Password:",
88
88
  type: "password",
89
89
  required: true
90
90
  }));
91
- const confirmPassword = yield (0, utils_1.promptText)({
91
+ const confirmPassword = yield (0, utils_1.promptInput)({
92
92
  message: "Confirm password:",
93
93
  type: "password",
94
94
  required: true
@@ -223,7 +223,7 @@ let MongodbService = class MongodbService {
223
223
  const { State: { Running } } = yield container.inspect();
224
224
  if (Running) {
225
225
  connections.push(`mongodb://${database.username}:${database.password}@${database.containerName}:27017`);
226
- // Multiple servers are not supported by mongo-express
226
+ // Mongo-express does not support multiple servers
227
227
  break;
228
228
  }
229
229
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wocker/mongodb-plugin",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "author": "Kris Papercut <krispcut@gmail.com>",
5
5
  "description": "Mongodb plugin for wocker",
6
6
  "license": "MIT",
@@ -26,8 +26,8 @@
26
26
  "test": "echo \"Error: no test specified\" && exit 1"
27
27
  },
28
28
  "dependencies": {
29
- "@wocker/core": "^1.0.21",
30
- "@wocker/utils": "^1.0.9",
29
+ "@wocker/core": "^1.0.22",
30
+ "@wocker/utils": "^2.0.3",
31
31
  "cli-table3": "^0.6.5"
32
32
  },
33
33
  "devDependencies": {