@wocker/pgsql-plugin
Advanced tools
Comparing version 1.0.8 to 1.0.9-beta.0
@@ -9,4 +9,6 @@ import { AppConfigService, DockerService } from "@wocker/core"; | ||
protected init(email?: string, password?: string, skipPassword?: boolean): Promise<void>; | ||
pgsql(name?: string): Promise<void>; | ||
protected create(service: string, user: string, password: string, host: string, port: string): Promise<void>; | ||
protected destroy(service: string): Promise<void>; | ||
list(): Promise<string>; | ||
protected start(service?: string, restart?: boolean): Promise<void>; | ||
@@ -13,0 +15,0 @@ protected stop(service?: string): Promise<void>; |
@@ -39,2 +39,6 @@ "use strict"; | ||
} | ||
pgsql(name) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
}); | ||
} | ||
create(service, user, password, host, port) { | ||
@@ -53,2 +57,7 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
list() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.pgSqlService.listTable(); | ||
}); | ||
} | ||
start(service, restart) { | ||
@@ -97,2 +106,9 @@ return __awaiter(this, void 0, void 0, function* () { | ||
__decorate([ | ||
(0, core_1.Command)("pgsql [service]"), | ||
__param(0, (0, core_1.Param)("service")), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [String]), | ||
__metadata("design:returntype", Promise) | ||
], PgSqlController.prototype, "pgsql", null); | ||
__decorate([ | ||
(0, core_1.Command)("pgsql:create <service>"), | ||
@@ -132,2 +148,9 @@ __param(0, (0, core_1.Param)("service")), | ||
__decorate([ | ||
(0, core_1.Command)("pgsql:ls"), | ||
(0, core_1.Description)(""), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", []), | ||
__metadata("design:returntype", Promise) | ||
], PgSqlController.prototype, "list", null); | ||
__decorate([ | ||
(0, core_1.Command)("pgsql:start [service]"), | ||
@@ -134,0 +157,0 @@ __param(0, (0, core_1.Param)("service")), |
@@ -16,2 +16,3 @@ import { AppConfigService, PluginConfigService, DockerService, ProxyService } from "@wocker/core"; | ||
destroy(service: string): Promise<void>; | ||
listTable(): Promise<string>; | ||
start(name?: string, restart?: boolean): Promise<void>; | ||
@@ -18,0 +19,0 @@ stop(name?: string): Promise<void>; |
@@ -53,2 +53,5 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -58,2 +61,3 @@ exports.PgSqlService = void 0; | ||
const utils_1 = require("@wocker/utils"); | ||
const cli_table3_1 = __importDefault(require("cli-table3")); | ||
const Path = __importStar(require("path")); | ||
@@ -146,2 +150,17 @@ const Config_1 = require("../makes/Config"); | ||
} | ||
listTable() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const table = new cli_table3_1.default({ | ||
head: ["Name", "Host"] | ||
}); | ||
const config = yield this.getConfig(); | ||
for (const service of config.services) { | ||
table.push([ | ||
service.name + (config.default === service.name ? " (default)" : ""), | ||
service.host || service.containerName | ||
]); | ||
} | ||
return table.toString(); | ||
}); | ||
} | ||
start(name, restart) { | ||
@@ -148,0 +167,0 @@ return __awaiter(this, void 0, void 0, function* () { |
{ | ||
"name": "@wocker/pgsql-plugin", | ||
"version": "1.0.8", | ||
"version": "1.0.9-beta.0", | ||
"author": "Kris Papercut <krispcut@gmail.com>", | ||
"description": "PostgresSQL plugin for wocker", | ||
"license": "MIT", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"main": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"keywords": [ | ||
@@ -17,3 +17,3 @@ "docker", | ||
], | ||
"homepage": "https://kearisp.github.io/wocker/plugins/pgsql", | ||
"homepage": "https://kearisp.github.io/wocker/docs/plugins/pgsql", | ||
"repository": { | ||
@@ -34,8 +34,9 @@ "type": "git", | ||
"@wocker/core": "^1.0.20", | ||
"@wocker/utils": "^1.0.7" | ||
"@wocker/utils": "^1.0.7", | ||
"cli-table3": "^0.6.5" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.11.20", | ||
"@types/node": "^22.7.8", | ||
"typescript": "^5.5.4" | ||
} | ||
} |
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
32420
729
0
3
3
1
+ Addedcli-table3@^0.6.5
+ Added@colors/colors@1.5.0(transitive)
+ Addedcli-table3@0.6.5(transitive)