@wocker/ws 1.0.8 → 1.0.9

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 (55) hide show
  1. package/bin/ws.js +1 -12
  2. package/lib/AppModule.js +6 -3
  3. package/lib/controllers/DebugController.d.ts +7 -0
  4. package/lib/controllers/DebugController.js +44 -0
  5. package/lib/controllers/PluginController.d.ts +2 -0
  6. package/lib/controllers/PluginController.js +42 -41
  7. package/lib/controllers/PresetController.d.ts +1 -0
  8. package/lib/controllers/PresetController.js +71 -6
  9. package/lib/controllers/ProjectController.d.ts +2 -3
  10. package/lib/controllers/ProjectController.js +36 -60
  11. package/lib/controllers/ProxyController.js +15 -6
  12. package/lib/controllers/index.d.ts +1 -0
  13. package/lib/controllers/index.js +1 -0
  14. package/lib/main.d.ts +1 -1
  15. package/lib/main.js +21 -2
  16. package/lib/makes/FS.d.ts +15 -5
  17. package/lib/makes/FS.js +42 -9
  18. package/lib/makes/Http.d.ts +18 -0
  19. package/lib/makes/Http.js +72 -0
  20. package/lib/makes/Preset.d.ts +2 -2
  21. package/lib/makes/index.d.ts +1 -0
  22. package/lib/makes/index.js +1 -0
  23. package/lib/services/AppConfigService.d.ts +6 -16
  24. package/lib/services/AppConfigService.js +29 -113
  25. package/lib/services/PluginService.d.ts +9 -2
  26. package/lib/services/PluginService.js +85 -3
  27. package/lib/services/PresetService.d.ts +1 -2
  28. package/lib/services/PresetService.js +19 -7
  29. package/lib/services/ProjectService.js +15 -11
  30. package/lib/utils/exec.d.ts +4 -1
  31. package/lib/utils/exec.js +16 -31
  32. package/lib/utils/followProgress.js +49 -45
  33. package/lib/utils/index.d.ts +0 -6
  34. package/lib/utils/index.js +0 -6
  35. package/lib/utils/spawn.d.ts +1 -1
  36. package/lib/utils/spawn.js +20 -12
  37. package/package.json +3 -5
  38. package/presets/php-apache/Dockerfile +1 -1
  39. package/presets/php-apache/config.json +2 -1
  40. package/lib/App.d.ts +0 -11
  41. package/lib/App.js +0 -81
  42. package/lib/index.d.ts +0 -5
  43. package/lib/index.js +0 -22
  44. package/lib/utils/buildOptions.d.ts +0 -1
  45. package/lib/utils/buildOptions.js +0 -9
  46. package/lib/utils/fetch.d.ts +0 -5
  47. package/lib/utils/fetch.js +0 -52
  48. package/lib/utils/get-config.d.ts +0 -2
  49. package/lib/utils/get-config.js +0 -17
  50. package/lib/utils/image-build.d.ts +0 -13
  51. package/lib/utils/image-build.js +0 -46
  52. package/lib/utils/set-config.d.ts +0 -2
  53. package/lib/utils/set-config.js +0 -15
  54. package/lib/utils/tty.d.ts +0 -2
  55. package/lib/utils/tty.js +0 -6
@@ -1,46 +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 __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.imageBuild = void 0;
27
- const Path = __importStar(require("path"));
28
- const exec_1 = require("./exec");
29
- const imageBuild = async (options) => {
30
- const { tag, buildArgs = {}, labels = {}, context, src } = options;
31
- const buildArgsString = Object.keys(buildArgs).map((key) => {
32
- return `--build-arg ${key}=${buildArgs[key]}`;
33
- }).join(" ");
34
- const labelsString = Object.keys(labels).map((key) => {
35
- return `--label ${key}=${labels[key]}`;
36
- }).join(" ");
37
- await (0, exec_1.exec)(`
38
- docker build \
39
- --tag "${tag}" \
40
- ${buildArgsString} \
41
- ${labelsString} \
42
- --file ${Path.join(context, src)} \
43
- ${context}
44
- `);
45
- };
46
- exports.imageBuild = imageBuild;
@@ -1,2 +0,0 @@
1
- import { AppConfig } from "@wocker/core";
2
- export declare const setConfig: (data: Partial<AppConfig>) => Promise<AppConfig>;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setConfig = void 0;
4
- const env_1 = require("../env");
5
- const FS_1 = require("../makes/FS");
6
- const get_config_1 = require("./get-config");
7
- const setConfig = async (data) => {
8
- const config = {
9
- ...await (0, get_config_1.getConfig)(),
10
- ...data
11
- };
12
- await FS_1.FS.writeJSON(env_1.MAP_PATH, config);
13
- return config;
14
- };
15
- exports.setConfig = setConfig;
@@ -1,2 +0,0 @@
1
- declare const tty: () => void;
2
- export { tty };
package/lib/utils/tty.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tty = void 0;
4
- const tty = () => {
5
- };
6
- exports.tty = tty;