@wocker/mongodb-plugin 1.0.5 → 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);
|
package/lib/makes/Database.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
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
|
12
|
+
export declare class Database {
|
13
|
+
name: string;
|
13
14
|
imageName?: string;
|
14
15
|
imageVersion?: string;
|
15
16
|
username: string;
|
package/lib/makes/Database.js
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Database = void 0;
|
4
|
-
|
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.
|
65
|
-
message: "Mongodb name
|
66
|
-
type: "
|
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.
|
79
|
+
props.username = yield (0, utils_1.promptInput)({
|
80
80
|
message: "Username:",
|
81
|
-
type: "
|
81
|
+
type: "text",
|
82
82
|
required: true
|
83
83
|
});
|
84
84
|
}
|
85
85
|
if (!props.password) {
|
86
|
-
props.password = (yield (0, utils_1.
|
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.
|
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
|
-
//
|
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.
|
3
|
+
"version": "1.0.7",
|
4
4
|
"author": "Kris Papercut <krispcut@gmail.com>",
|
5
5
|
"description": "Mongodb plugin for wocker",
|
6
6
|
"license": "MIT",
|
@@ -20,18 +20,18 @@
|
|
20
20
|
"url": "https://github.com/kearisp/wocker-mongodb-plugin/issues"
|
21
21
|
},
|
22
22
|
"scripts": {
|
23
|
-
"
|
23
|
+
"prepublishOnly": "npm run build",
|
24
24
|
"watch": "tsc -w",
|
25
25
|
"build": "tsc",
|
26
26
|
"test": "echo \"Error: no test specified\" && exit 1"
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"@wocker/core": "^1.0.
|
30
|
-
"@wocker/utils": "^
|
29
|
+
"@wocker/core": "^1.0.22",
|
30
|
+
"@wocker/utils": "^2.0.3",
|
31
31
|
"cli-table3": "^0.6.5"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
|
-
"@types/node": "^22.
|
35
|
-
"typescript": "^5.
|
34
|
+
"@types/node": "^22.14.1",
|
35
|
+
"typescript": "^5.8.3"
|
36
36
|
}
|
37
37
|
}
|