@wocker/ws 1.0.2 → 1.0.3

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 (100) hide show
  1. package/README.md +1 -1
  2. package/lib/App.d.ts +4 -3
  3. package/lib/App.js +98 -77
  4. package/lib/controllers/ImageController.d.ts +2 -2
  5. package/lib/controllers/ImageController.js +27 -27
  6. package/lib/controllers/PluginController.d.ts +2 -2
  7. package/lib/controllers/PluginController.js +78 -56
  8. package/lib/controllers/PresetController.d.ts +3 -1
  9. package/lib/controllers/PresetController.js +155 -136
  10. package/lib/controllers/ProjectController.d.ts +5 -5
  11. package/lib/controllers/ProjectController.js +653 -603
  12. package/lib/controllers/ProxyController.d.ts +4 -1
  13. package/lib/controllers/ProxyController.js +269 -245
  14. package/lib/controllers/index.js +19 -58
  15. package/lib/env.js +33 -15
  16. package/lib/index.d.ts +2 -0
  17. package/lib/index.js +30 -16
  18. package/lib/makes/Controller.js +4 -8
  19. package/lib/makes/DI.d.ts +7 -0
  20. package/lib/makes/DI.js +27 -0
  21. package/lib/makes/Docker.js +298 -382
  22. package/lib/makes/FS.js +328 -304
  23. package/lib/makes/LineConvertStream.js +37 -40
  24. package/lib/makes/Logger.d.ts +9 -1
  25. package/lib/makes/Logger.js +22 -11
  26. package/lib/makes/Model.js +8 -12
  27. package/lib/makes/MySQL.js +6 -27
  28. package/lib/makes/Plugin.d.ts +1 -1
  29. package/lib/makes/Plugin.js +55 -37
  30. package/lib/makes/Preset.d.ts +46 -0
  31. package/lib/makes/Preset.js +33 -0
  32. package/lib/makes/Project.d.ts +45 -0
  33. package/lib/makes/Project.js +127 -0
  34. package/lib/makes/Repository.js +18 -21
  35. package/lib/makes/index.d.ts +3 -0
  36. package/lib/makes/index.js +23 -69
  37. package/lib/plugins/ElasticSearchPlugin.d.ts +3 -1
  38. package/lib/plugins/ElasticSearchPlugin.js +66 -66
  39. package/lib/plugins/LocaltunnelPlugin.d.ts +2 -2
  40. package/lib/plugins/LocaltunnelPlugin.js +256 -257
  41. package/lib/plugins/MaildevPlugin.d.ts +2 -2
  42. package/lib/plugins/MaildevPlugin.js +45 -44
  43. package/lib/plugins/MongodbPlugin.d.ts +2 -2
  44. package/lib/plugins/MongodbPlugin.js +303 -248
  45. package/lib/plugins/NgrokPlugin.d.ts +2 -2
  46. package/lib/plugins/NgrokPlugin.js +221 -231
  47. package/lib/plugins/PageKitePlugin.d.ts +2 -2
  48. package/lib/plugins/PageKitePlugin.js +150 -149
  49. package/lib/plugins/PostgresPlugin.d.ts +1 -1
  50. package/lib/plugins/PostgresPlugin.js +115 -89
  51. package/lib/plugins/ProxmoxPlugin.d.ts +1 -1
  52. package/lib/plugins/ProxmoxPlugin.js +50 -38
  53. package/lib/plugins/RedisPlugin.d.ts +3 -1
  54. package/lib/plugins/RedisPlugin.js +73 -72
  55. package/lib/plugins/index.js +25 -103
  56. package/lib/services/AppConfigService.d.ts +3 -3
  57. package/lib/services/AppConfigService.js +162 -157
  58. package/lib/services/AppEventsService.js +26 -24
  59. package/lib/services/DockerService.d.ts +37 -2
  60. package/lib/services/DockerService.js +185 -205
  61. package/lib/services/LogService.d.ts +3 -2
  62. package/lib/services/LogService.js +33 -34
  63. package/lib/services/PluginService.d.ts +2 -1
  64. package/lib/services/PluginService.js +11 -14
  65. package/lib/services/PresetService.d.ts +8 -3
  66. package/lib/services/PresetService.js +60 -59
  67. package/lib/services/ProjectService.d.ts +11 -4
  68. package/lib/services/ProjectService.js +140 -129
  69. package/lib/services/index.js +21 -80
  70. package/lib/types/Config.d.ts +4 -3
  71. package/lib/types/Config.js +1 -4
  72. package/lib/types/EnvConfig.js +1 -4
  73. package/lib/types/index.js +16 -25
  74. package/lib/utils/buildOptions.js +5 -8
  75. package/lib/utils/demuxOutput.js +16 -20
  76. package/lib/utils/escapeRegExp.js +4 -7
  77. package/lib/utils/exec.js +38 -39
  78. package/lib/utils/fetch.js +46 -30
  79. package/lib/utils/followProgress.js +66 -77
  80. package/lib/utils/format-size-units.js +16 -16
  81. package/lib/utils/get-config.d.ts +1 -1
  82. package/lib/utils/get-config.js +13 -16
  83. package/lib/utils/get-cursor-position.js +22 -29
  84. package/lib/utils/image-build.js +35 -23
  85. package/lib/utils/index.js +32 -191
  86. package/lib/utils/injectVariables.js +10 -13
  87. package/lib/utils/parse-table.js +20 -23
  88. package/lib/utils/set-config.d.ts +1 -1
  89. package/lib/utils/set-config.js +12 -15
  90. package/lib/utils/spawn.js +17 -20
  91. package/lib/utils/tty.js +2 -6
  92. package/lib/utils/volumeFormat.js +5 -12
  93. package/lib/utils/volumeParse.js +10 -13
  94. package/package.json +13 -39
  95. package/presets/bun/Dockerfile +11 -0
  96. package/presets/bun/config.json +3 -0
  97. package/presets/node/Dockerfile +4 -2
  98. package/presets/php-apache/Dockerfile +3 -2
  99. package/.github/workflows/publish.yml +0 -31
  100. package/plugins/mariadb/admin/conf/config.user.inc.php +0 -9
@@ -1,63 +1,64 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PresetService = void 0;
7
- var _core = require("@wocker/core");
8
- var _md = _interopRequireDefault(require("md5"));
9
- var _makes = require("../makes");
10
- var _env = require("../env");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- class PresetService extends _core.PresetService {
13
- constructor(di) {
14
- super();
15
- }
16
- getImageName(preset, buildArgs = {}) {
17
- const rawValues = [];
18
- const hashValues = [];
19
- Object.keys(preset.buildArgsOptions || {}).forEach(key => {
20
- const hash = (preset.buildArgsOptions[key] || {}).hash || true;
21
- const value = buildArgs[key];
22
- if (hash) {
23
- hashValues.push(value);
24
- } else {
25
- rawValues.push(value);
26
- }
27
- });
28
- const version = [...rawValues, (0, _md.default)(hashValues.join(",")).substr(0, 6)].filter(value => {
29
- return !!value;
30
- }).join("-");
31
- return `ws-preset-${preset.name}:${version}`;
32
- }
33
- async save(preset) {
34
- //
35
- }
36
- async get(name) {
37
- const config = await _makes.FS.readJSON(_env.PRESETS_DIR, name, "config.json");
38
- return new _core.Preset({
39
- name,
40
- ...config
41
- });
42
- }
43
- async search(options = {}) {
44
- const {
45
- name
46
- } = options;
47
- const presets = [];
48
- const dirs = await _makes.FS.readdir(_env.PRESETS_DIR);
49
- for (const dir of dirs) {
50
- if (name && name !== dir) {
51
- continue;
52
- }
53
- const config = await _makes.FS.readJSON(_env.PRESETS_DIR, dir, "config.json");
54
- const preset = new _core.Preset({
55
- name: dir,
56
- ...config
57
- });
58
- presets.push(preset);
7
+ const md5_1 = __importDefault(require("md5"));
8
+ const env_1 = require("../env");
9
+ const makes_1 = require("../makes");
10
+ class PresetService {
11
+ constructor(di) { }
12
+ getImageName(preset, buildArgs = {}) {
13
+ const rawValues = [];
14
+ const hashValues = [];
15
+ Object.keys(preset.buildArgsOptions || {}).forEach((key) => {
16
+ const hash = (preset.buildArgsOptions[key] || {}).hash || true;
17
+ const value = buildArgs[key];
18
+ if (hash) {
19
+ hashValues.push(value);
20
+ }
21
+ else {
22
+ rawValues.push(value);
23
+ }
24
+ });
25
+ const version = [
26
+ ...rawValues,
27
+ (0, md5_1.default)(hashValues.join(",")).substr(0, 6)
28
+ ].filter((value) => {
29
+ return !!value;
30
+ }).join("-");
31
+ return `ws-preset-${preset.name}:${version}`;
32
+ }
33
+ async save(preset) {
34
+ }
35
+ async get(name) {
36
+ const config = await makes_1.FS.readJSON(env_1.PRESETS_DIR, name, "config.json");
37
+ return new makes_1.Preset({
38
+ name,
39
+ ...config
40
+ });
41
+ }
42
+ async search(options = {}) {
43
+ const { name } = options;
44
+ const presets = [];
45
+ const dirs = await makes_1.FS.readdir(env_1.PRESETS_DIR);
46
+ for (const dir of dirs) {
47
+ if (name && name !== dir) {
48
+ continue;
49
+ }
50
+ const config = await makes_1.FS.readJSON(env_1.PRESETS_DIR, dir, "config.json");
51
+ const preset = new makes_1.Preset({
52
+ name: dir,
53
+ ...config
54
+ });
55
+ presets.push(preset);
56
+ }
57
+ return presets;
58
+ }
59
+ async searchOne(options = {}) {
60
+ const [preset] = await this.search(options);
61
+ return preset || null;
59
62
  }
60
- return presets;
61
- }
62
63
  }
63
- exports.PresetService = PresetService;
64
+ exports.PresetService = PresetService;
@@ -1,11 +1,18 @@
1
- import { DI, AppConfigService as CoreAppConfigService, AppEventsService as CoreAppEventsService, DockerService, ProjectService as CoreProjectService, ProjectServiceSearchParams as SearchParams, Project } from "@wocker/core";
2
- declare class ProjectService extends CoreProjectService {
3
- protected appConfigService: CoreAppConfigService;
4
- protected appEventsService: CoreAppEventsService;
1
+ import { DI, Project } from "../makes";
2
+ import { DockerService, AppConfigService, AppEventsService } from "../services";
3
+ type SearchParams = Partial<{
4
+ id: string;
5
+ name: string;
6
+ path: string;
7
+ }>;
8
+ declare class ProjectService {
9
+ protected appConfigService: AppConfigService;
10
+ protected appEventsService: AppEventsService;
5
11
  protected dockerService: DockerService;
6
12
  constructor(di: DI);
7
13
  cdProject(name: string): Promise<void>;
8
14
  get(): Promise<Project>;
15
+ getContainer(): Promise<import("dockerode").Container>;
9
16
  start(): Promise<void>;
10
17
  stop(): Promise<void>;
11
18
  save(project: Project): Promise<void>;
@@ -1,143 +1,154 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
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;
5
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 });
6
26
  exports.ProjectService = void 0;
7
- var _core = require("@wocker/core");
8
- var Path = _interopRequireWildcard(require("path"));
9
- var _makes = require("../makes");
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
- class ProjectService extends _core.ProjectService {
13
- constructor(di) {
14
- super();
15
- this.appConfigService = di.resolveService(_core.AppConfigService);
16
- this.appEventsService = di.resolveService(_core.AppEventsService);
17
- this.dockerService = di.resolveService(_core.DockerService);
18
- }
19
- async cdProject(name) {
20
- const project = await _core.Project.searchOne({
21
- name
22
- });
23
- if (!project) {
24
- throw new Error("Project not found");
25
- }
26
- this.appConfigService.setPWD(project.path);
27
- }
28
- async get() {
29
- const project = await _core.Project.searchOne({
30
- path: this.appConfigService.getPWD()
31
- });
32
- if (!project) {
33
- throw new Error("Project not found");
27
+ const Path = __importStar(require("path"));
28
+ const makes_1 = require("../makes");
29
+ const services_1 = require("../services");
30
+ class ProjectService {
31
+ constructor(di) {
32
+ this.appConfigService = di.resolveService(services_1.AppConfigService);
33
+ this.appEventsService = di.resolveService(services_1.AppEventsService);
34
+ this.dockerService = di.resolveService(services_1.DockerService);
34
35
  }
35
- return project;
36
- }
37
- async start() {
38
- const project = await this.get();
39
- if (project.type === "dockerfile") {
40
- project.imageName = `project-${project.name}:develop`;
41
- const images = await _makes.Docker.imageLs({
42
- tag: project.imageName
43
- });
44
- if (images.length === 0) {
45
- await _makes.Docker.imageBuild2({
46
- tag: project.imageName,
47
- context: this.appConfigService.getPWD(),
48
- src: project.dockerfile
36
+ async cdProject(name) {
37
+ const project = await makes_1.Project.searchOne({
38
+ name
49
39
  });
50
- }
51
- }
52
- await this.appEventsService.emit("project:beforeStart", project);
53
- const containerName = `${project.name}.workspace`;
54
- let container = await this.dockerService.getContainer(containerName);
55
- if (!container) {
56
- container = await _makes.Docker.createContainer({
57
- name: containerName,
58
- image: project.imageName,
59
- env: {
60
- ...(await this.appConfigService.getAllEnvVariables()),
61
- ...(project.env || {})
62
- },
63
- volumes: (project.volumes || []).map(volume => {
64
- const regVolume = /^([^:]+):([^:]+)(?::([^:]+))?$/;
65
- const [, source, destination, options] = regVolume.exec(volume);
66
- return `${Path.join(this.appConfigService.getPWD(), source)}:${destination}` + (options ? `:${options}` : "");
67
- }),
68
- ports: project.ports || []
69
- });
70
- } else {
71
- process.stdout.write("Container already exists\n");
72
- }
73
- if (container) {
74
- const {
75
- State: {
76
- Status
40
+ if (!project) {
41
+ throw new Error("Project not found");
77
42
  }
78
- } = await container.inspect();
79
- if (Status === "created" || Status === "exited") {
80
- await container.start();
81
- await this.appEventsService.emit("project:start", project);
82
- }
43
+ this.appConfigService.setPWD(project.path);
83
44
  }
84
- }
85
- async stop() {
86
- const project = await this.get();
87
- const container = await _makes.Docker.getContainer(`${project.name}.workspace`);
88
- if (container) {
89
- await this.appEventsService.emit("project:stop", project);
90
- await _makes.Docker.removeContainer(`${project.name}.workspace`);
45
+ async get() {
46
+ const project = await makes_1.Project.searchOne({
47
+ path: this.appConfigService.getPWD()
48
+ });
49
+ if (!project) {
50
+ throw new Error("Project not found");
51
+ }
52
+ return project;
91
53
  }
92
- }
93
- async save(project) {
94
- if (!project.name) {
95
- throw new Error("Project should has a name");
54
+ async getContainer() {
55
+ const project = await this.get();
56
+ return this.dockerService.getContainer(project.containerName);
96
57
  }
97
- if (!project.path) {
98
- throw new Error("Project should has a path");
58
+ async start() {
59
+ const project = await this.get();
60
+ if (project.type === "dockerfile") {
61
+ project.imageName = `project-${project.name}:develop`;
62
+ const images = await makes_1.Docker.imageLs({
63
+ tag: project.imageName
64
+ });
65
+ if (images.length === 0) {
66
+ await makes_1.Docker.imageBuild2({
67
+ tag: project.imageName,
68
+ context: this.appConfigService.getPWD(),
69
+ src: project.dockerfile
70
+ });
71
+ }
72
+ }
73
+ await this.appEventsService.emit("project:beforeStart", project);
74
+ let container = await this.dockerService.getContainer(project.containerName);
75
+ if (!container) {
76
+ container = await makes_1.Docker.createContainer({
77
+ name: project.containerName,
78
+ image: project.imageName,
79
+ env: {
80
+ ...await this.appConfigService.getAllEnvVariables(),
81
+ ...project.env || {}
82
+ },
83
+ volumes: (project.volumes || []).map((volume) => {
84
+ const regVolume = /^([^:]+):([^:]+)(?::([^:]+))?$/;
85
+ const [, source, destination, options] = regVolume.exec(volume);
86
+ return `${Path.join(this.appConfigService.getPWD(), source)}:${destination}` + (options ? `:${options}` : "");
87
+ }),
88
+ ports: project.ports || []
89
+ });
90
+ }
91
+ else {
92
+ process.stdout.write("Container already exists\n");
93
+ }
94
+ if (container) {
95
+ const { State: { Status } } = await container.inspect();
96
+ if (Status === "created" || Status === "exited") {
97
+ await container.start();
98
+ await this.appEventsService.emit("project:start", project);
99
+ }
100
+ }
99
101
  }
100
- if (!project.id) {
101
- project.id = project.name;
102
+ async stop() {
103
+ const project = await this.get();
104
+ const container = await makes_1.Docker.getContainer(project.containerName);
105
+ if (container) {
106
+ await this.appEventsService.emit("project:stop", project);
107
+ await makes_1.Docker.removeContainer(`${project.name}.workspace`);
108
+ }
102
109
  }
103
- const projectDirPath = this.appConfigService.dataPath("projects", project.id);
104
- const configPath = this.appConfigService.dataPath("projects", project.id, "config.json");
105
- if (!_makes.FS.existsSync(projectDirPath)) {
106
- await _makes.FS.mkdir(projectDirPath, {
107
- recursive: true
108
- });
110
+ async save(project) {
111
+ if (!project.name) {
112
+ throw new Error("Project should has a name");
113
+ }
114
+ if (!project.path) {
115
+ throw new Error("Project should has a path");
116
+ }
117
+ if (!project.id) {
118
+ project.id = project.name;
119
+ }
120
+ const projectDirPath = this.appConfigService.dataPath("projects", project.id);
121
+ const configPath = this.appConfigService.dataPath("projects", project.id, "config.json");
122
+ if (!makes_1.FS.existsSync(projectDirPath)) {
123
+ await makes_1.FS.mkdir(projectDirPath, {
124
+ recursive: true
125
+ });
126
+ }
127
+ await this.appConfigService.setProjectConfig(project.id, project.path);
128
+ await makes_1.FS.writeJSON(configPath, project);
109
129
  }
110
- await this.appConfigService.setProjectConfig(project.id, project.path);
111
- await _makes.FS.writeJSON(configPath, project);
112
- }
113
- async search(params = {}) {
114
- const {
115
- id,
116
- name,
117
- path
118
- } = params;
119
- const {
120
- projects: configs
121
- } = await this.appConfigService.getAppConfig();
122
- const projects = [];
123
- for (const config of configs) {
124
- if (id && config.id !== id) {
125
- continue;
126
- }
127
- if (path && config.src !== path) {
128
- continue;
129
- }
130
- const projectData = await _makes.FS.readJSON(this.appConfigService.dataPath("projects", config.id, "config.json"));
131
- if (name && projectData.name !== name) {
132
- continue;
133
- }
134
- const project = _core.Project.fromObject({
135
- id: config.id,
136
- ...projectData
137
- });
138
- projects.push(project);
130
+ async search(params = {}) {
131
+ const { id, name, path } = params;
132
+ const { projects: configs } = await this.appConfigService.getAppConfig();
133
+ const projects = [];
134
+ for (const config of configs) {
135
+ if (id && config.id !== id) {
136
+ continue;
137
+ }
138
+ if (path && config.src !== path) {
139
+ continue;
140
+ }
141
+ const projectData = await makes_1.FS.readJSON(this.appConfigService.dataPath("projects", config.id, "config.json"));
142
+ if (name && projectData.name !== name) {
143
+ continue;
144
+ }
145
+ const project = makes_1.Project.fromObject({
146
+ id: config.id,
147
+ ...projectData
148
+ });
149
+ projects.push(project);
150
+ }
151
+ return projects;
139
152
  }
140
- return projects;
141
- }
142
153
  }
143
- exports.ProjectService = ProjectService;
154
+ exports.ProjectService = ProjectService;
@@ -1,82 +1,23 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _AppConfigService = require("./AppConfigService");
7
- Object.keys(_AppConfigService).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _AppConfigService[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _AppConfigService[key];
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]; } };
14
7
  }
15
- });
16
- });
17
- var _AppEventsService = require("./AppEventsService");
18
- Object.keys(_AppEventsService).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _AppEventsService[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _AppEventsService[key];
25
- }
26
- });
27
- });
28
- var _DockerService = require("./DockerService");
29
- Object.keys(_DockerService).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _DockerService[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _DockerService[key];
36
- }
37
- });
38
- });
39
- var _LogService = require("./LogService");
40
- Object.keys(_LogService).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _LogService[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function () {
46
- return _LogService[key];
47
- }
48
- });
49
- });
50
- var _PluginService = require("./PluginService");
51
- Object.keys(_PluginService).forEach(function (key) {
52
- if (key === "default" || key === "__esModule") return;
53
- if (key in exports && exports[key] === _PluginService[key]) return;
54
- Object.defineProperty(exports, key, {
55
- enumerable: true,
56
- get: function () {
57
- return _PluginService[key];
58
- }
59
- });
60
- });
61
- var _PresetService = require("./PresetService");
62
- Object.keys(_PresetService).forEach(function (key) {
63
- if (key === "default" || key === "__esModule") return;
64
- if (key in exports && exports[key] === _PresetService[key]) return;
65
- Object.defineProperty(exports, key, {
66
- enumerable: true,
67
- get: function () {
68
- return _PresetService[key];
69
- }
70
- });
71
- });
72
- var _ProjectService = require("./ProjectService");
73
- Object.keys(_ProjectService).forEach(function (key) {
74
- if (key === "default" || key === "__esModule") return;
75
- if (key in exports && exports[key] === _ProjectService[key]) return;
76
- Object.defineProperty(exports, key, {
77
- enumerable: true,
78
- get: function () {
79
- return _ProjectService[key];
80
- }
81
- });
82
- });
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AppConfigService"), exports);
18
+ __exportStar(require("./AppEventsService"), exports);
19
+ __exportStar(require("./DockerService"), exports);
20
+ __exportStar(require("./LogService"), exports);
21
+ __exportStar(require("./PluginService"), exports);
22
+ __exportStar(require("./PresetService"), exports);
23
+ __exportStar(require("./ProjectService"), exports);
@@ -1,8 +1,9 @@
1
+ import { EnvConfig } from "./EnvConfig";
1
2
  export type Config = {
2
3
  debug?: boolean;
3
- env: {
4
- [key: string]: string;
5
- };
4
+ meta: EnvConfig;
5
+ env: EnvConfig;
6
+ plugins: string[];
6
7
  projects: {
7
8
  id: string;
8
9
  name?: string;
@@ -1,5 +1,2 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,2 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,27 +1,18 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _Config = require("./Config");
7
- Object.keys(_Config).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _Config[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _Config[key];
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]; } };
14
7
  }
15
- });
16
- });
17
- var _EnvConfig = require("./EnvConfig");
18
- Object.keys(_EnvConfig).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _EnvConfig[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _EnvConfig[key];
25
- }
26
- });
27
- });
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Config"), exports);
18
+ __exportStar(require("./EnvConfig"), exports);
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.buildOptions = void 0;
7
4
  const buildOptions = (name, options) => {
8
- return Object.keys(options).map(key => {
9
- return `--${name} ${key}=${options[key]}`;
10
- }).join(" ");
5
+ return Object.keys(options).map((key) => {
6
+ return `--${name} ${key}=${options[key]}`;
7
+ }).join(" ");
11
8
  };
12
- exports.buildOptions = buildOptions;
9
+ exports.buildOptions = buildOptions;