@wocker/ws 1.0.20 → 1.0.21

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.
Files changed (40) hide show
  1. package/lib/AppModule.js +21 -7
  2. package/lib/controllers/PresetController.d.ts +1 -1
  3. package/lib/controllers/PresetController.js +24 -12
  4. package/lib/controllers/ProjectController.d.ts +4 -3
  5. package/lib/controllers/ProjectController.js +26 -10
  6. package/lib/controllers/ProxyController.d.ts +1 -1
  7. package/lib/controllers/ProxyController.js +38 -2
  8. package/lib/env.js +17 -7
  9. package/lib/makes/FS.d.ts +2 -2
  10. package/lib/makes/FS.js +19 -9
  11. package/lib/makes/Http.js +17 -7
  12. package/lib/plugins/MongodbPlugin.js +17 -7
  13. package/lib/plugins/elastic-search/controllers/ElasticSearchController.d.ts +10 -0
  14. package/lib/plugins/{ElasticSearchPlugin.js → elastic-search/controllers/ElasticSearchController.js} +32 -13
  15. package/lib/plugins/elastic-search/index.d.ts +2 -0
  16. package/lib/plugins/elastic-search/index.js +22 -0
  17. package/lib/plugins/index.d.ts +2 -2
  18. package/lib/plugins/index.js +2 -2
  19. package/lib/plugins/proxmox/controllers/ProxmoxController.d.ts +14 -0
  20. package/lib/plugins/proxmox/controllers/ProxmoxController.js +127 -0
  21. package/lib/plugins/proxmox/index.d.ts +2 -0
  22. package/lib/plugins/proxmox/index.js +23 -0
  23. package/lib/services/AppConfigService.js +17 -7
  24. package/lib/services/CertService.js +18 -8
  25. package/lib/services/DockerService.d.ts +2 -2
  26. package/lib/services/DockerService.js +8 -5
  27. package/lib/services/LogService.d.ts +1 -0
  28. package/lib/services/LogService.js +4 -0
  29. package/lib/services/PluginService.js +17 -7
  30. package/lib/services/PresetService.d.ts +1 -1
  31. package/lib/services/PresetService.js +18 -8
  32. package/lib/services/ProxyService.d.ts +3 -2
  33. package/lib/services/ProxyService.js +38 -20
  34. package/package.json +10 -5
  35. package/plugins/proxy/Dockerfile +17 -1
  36. package/plugins/proxy/Procfile +2 -0
  37. package/lib/plugins/ElasticSearchPlugin.d.ts +0 -15
  38. package/lib/plugins/ProxmoxPlugin.d.ts +0 -12
  39. package/lib/plugins/ProxmoxPlugin.js +0 -83
  40. package/plugins/proxy/config.json +0 -3
@@ -1,83 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
- return c > 3 && r && Object.defineProperty(target, key, r), r;
23
- };
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
- __setModuleDefault(result, mod);
29
- return result;
30
- };
31
- var __metadata = (this && this.__metadata) || function (k, v) {
32
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
33
- };
34
- Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.ProxmoxPlugin = void 0;
36
- const core_1 = require("@wocker/core");
37
- const Path = __importStar(require("path"));
38
- const services_1 = require("../services");
39
- const utils_1 = require("../utils");
40
- let ProxmoxPlugin = class ProxmoxPlugin {
41
- constructor(appConfigService, dockerService) {
42
- this.appConfigService = appConfigService;
43
- this.dockerService = dockerService;
44
- this.configDir = this.appConfigService.dataPath("plugins/proxmox");
45
- }
46
- pluginPath(...parts) {
47
- return Path.join(this.appConfigService.pluginsPath("proxmox"), ...parts);
48
- }
49
- async up() {
50
- const container = await this.dockerService.getContainer("proxmox.workspace");
51
- if (container) {
52
- await this.down();
53
- }
54
- await (0, utils_1.exec)(`
55
- docker build \
56
- --tag "ws-proxmox" \
57
- --file "${this.pluginPath("./Dockerfile")}" \
58
- ${this.pluginPath()}
59
- `);
60
- await (0, utils_1.exec)(`
61
- docker run -d \
62
- --name proxmox.workspace \
63
- --network workspace \
64
- -e VIRTUAL_HOST=proxmox.workspace \
65
- -p 8006:8006 \
66
- ws-proxmox
67
- `);
68
- }
69
- async down() {
70
- await (0, utils_1.exec)("docker stop proxmox.workspace").catch(() => {
71
- });
72
- await (0, utils_1.exec)("docker rm proxmox.workspace").catch(() => {
73
- });
74
- await (0, utils_1.exec)("docker image rm ws-proxmox").catch(() => {
75
- });
76
- }
77
- };
78
- exports.ProxmoxPlugin = ProxmoxPlugin;
79
- exports.ProxmoxPlugin = ProxmoxPlugin = __decorate([
80
- (0, core_1.Controller)(),
81
- __metadata("design:paramtypes", [services_1.AppConfigService,
82
- services_1.DockerService])
83
- ], ProxmoxPlugin);
@@ -1,3 +0,0 @@
1
- {
2
- "dockerfile": "./Dockerfile"
3
- }