@wocker/ws 1.0.1 → 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 (136) hide show
  1. package/README.md +11 -137
  2. package/bin/ws.js +7 -3
  3. package/lib/App.d.ts +10 -7
  4. package/lib/App.js +99 -44
  5. package/lib/controllers/ImageController.d.ts +4 -2
  6. package/lib/controllers/ImageController.js +27 -25
  7. package/lib/controllers/PluginController.d.ts +14 -0
  8. package/lib/controllers/PluginController.js +84 -0
  9. package/lib/controllers/PresetController.d.ts +21 -0
  10. package/lib/controllers/PresetController.js +169 -0
  11. package/lib/controllers/ProjectController.d.ts +11 -3
  12. package/lib/controllers/ProjectController.js +653 -536
  13. package/lib/{plugins/ProxyPlugin.d.ts → controllers/ProxyController.d.ts} +12 -11
  14. package/lib/controllers/ProxyController.js +273 -0
  15. package/lib/controllers/index.d.ts +3 -0
  16. package/lib/controllers/index.js +19 -25
  17. package/lib/env.js +33 -22
  18. package/lib/index.d.ts +2 -0
  19. package/lib/index.js +29 -28
  20. package/lib/makes/Controller.js +4 -8
  21. package/lib/makes/DI.d.ts +7 -0
  22. package/lib/makes/DI.js +27 -0
  23. package/lib/makes/Docker.js +299 -397
  24. package/lib/makes/FS.d.ts +1 -1
  25. package/lib/makes/FS.js +328 -301
  26. package/lib/makes/LineConvertStream.js +37 -40
  27. package/lib/makes/Logger.d.ts +5 -3
  28. package/lib/makes/Logger.js +18 -34
  29. package/lib/makes/Model.js +8 -12
  30. package/lib/makes/MySQL.js +6 -27
  31. package/lib/makes/Plugin.d.ts +1 -1
  32. package/lib/makes/Plugin.js +55 -37
  33. package/lib/makes/Preset.d.ts +46 -0
  34. package/lib/makes/Preset.js +33 -0
  35. package/lib/{models → makes}/Project.d.ts +23 -16
  36. package/lib/makes/Project.js +127 -0
  37. package/lib/makes/Repository.js +18 -21
  38. package/lib/makes/index.d.ts +3 -0
  39. package/lib/makes/index.js +23 -69
  40. package/lib/plugins/ElasticSearchPlugin.d.ts +18 -0
  41. package/lib/plugins/ElasticSearchPlugin.js +72 -0
  42. package/lib/plugins/LocaltunnelPlugin.d.ts +4 -4
  43. package/lib/plugins/LocaltunnelPlugin.js +256 -255
  44. package/lib/plugins/MaildevPlugin.d.ts +4 -2
  45. package/lib/plugins/MaildevPlugin.js +45 -41
  46. package/lib/plugins/MongodbPlugin.d.ts +6 -4
  47. package/lib/plugins/MongodbPlugin.js +303 -254
  48. package/lib/plugins/NgrokPlugin.d.ts +3 -4
  49. package/lib/plugins/NgrokPlugin.js +221 -230
  50. package/lib/plugins/PageKitePlugin.d.ts +3 -4
  51. package/lib/plugins/PageKitePlugin.js +150 -147
  52. package/lib/plugins/PostgresPlugin.d.ts +1 -1
  53. package/lib/plugins/PostgresPlugin.js +115 -88
  54. package/lib/plugins/ProxmoxPlugin.d.ts +1 -1
  55. package/lib/plugins/ProxmoxPlugin.js +50 -38
  56. package/lib/plugins/RedisPlugin.d.ts +10 -2
  57. package/lib/plugins/RedisPlugin.js +77 -39
  58. package/lib/plugins/index.d.ts +2 -6
  59. package/lib/plugins/index.js +25 -158
  60. package/lib/services/AppConfigService.d.ts +13 -3
  61. package/lib/services/AppConfigService.js +161 -71
  62. package/lib/services/AppEventsService.d.ts +5 -8
  63. package/lib/services/AppEventsService.js +26 -25
  64. package/lib/services/DockerService.d.ts +51 -0
  65. package/lib/services/DockerService.js +200 -0
  66. package/lib/services/LogService.d.ts +12 -0
  67. package/lib/services/LogService.js +38 -0
  68. package/lib/services/PluginService.d.ts +11 -0
  69. package/lib/services/PluginService.js +15 -0
  70. package/lib/services/PresetService.d.ts +14 -0
  71. package/lib/services/PresetService.js +64 -0
  72. package/lib/services/ProjectService.d.ts +12 -4
  73. package/lib/services/ProjectService.js +141 -78
  74. package/lib/services/index.d.ts +4 -0
  75. package/lib/services/index.js +21 -36
  76. package/lib/types/Config.d.ts +4 -3
  77. package/lib/types/Config.js +1 -4
  78. package/lib/types/EnvConfig.js +1 -4
  79. package/lib/types/index.js +16 -25
  80. package/lib/utils/buildOptions.js +5 -8
  81. package/lib/utils/demuxOutput.js +16 -22
  82. package/lib/utils/escapeRegExp.js +4 -7
  83. package/lib/utils/exec.d.ts +1 -1
  84. package/lib/utils/exec.js +38 -40
  85. package/lib/utils/fetch.js +45 -30
  86. package/lib/utils/followProgress.js +66 -77
  87. package/lib/utils/format-size-units.js +16 -16
  88. package/lib/utils/get-config.d.ts +1 -1
  89. package/lib/utils/get-config.js +13 -16
  90. package/lib/utils/get-cursor-position.js +22 -29
  91. package/lib/utils/image-build.js +35 -23
  92. package/lib/utils/index.d.ts +0 -4
  93. package/lib/utils/index.js +32 -235
  94. package/lib/utils/injectVariables.js +10 -13
  95. package/lib/utils/parse-table.js +20 -23
  96. package/lib/utils/set-config.d.ts +1 -1
  97. package/lib/utils/set-config.js +12 -15
  98. package/lib/utils/spawn.js +17 -20
  99. package/lib/utils/tty.js +2 -6
  100. package/lib/utils/volumeFormat.js +5 -12
  101. package/lib/utils/volumeParse.js +10 -13
  102. package/package.json +21 -47
  103. package/presets/bun/Dockerfile +11 -0
  104. package/presets/bun/config.json +3 -0
  105. package/presets/node/Dockerfile +4 -2
  106. package/presets/node/config.json +9 -7
  107. package/presets/php-apache/Dockerfile +40 -38
  108. package/presets/php-apache/config.json +10 -15
  109. package/presets/php-fpm/Dockerfile +21 -0
  110. package/presets/php-fpm/config.json +25 -0
  111. package/lib/models/Preset.d.ts +0 -19
  112. package/lib/models/Preset.js +0 -60
  113. package/lib/models/Project.js +0 -151
  114. package/lib/models/index.d.ts +0 -2
  115. package/lib/models/index.js +0 -27
  116. package/lib/plugins/MariadbPlugin.d.ts +0 -25
  117. package/lib/plugins/MariadbPlugin.js +0 -297
  118. package/lib/plugins/PresetPlugin.d.ts +0 -19
  119. package/lib/plugins/PresetPlugin.js +0 -164
  120. package/lib/plugins/ProjectPlugin.d.ts +0 -12
  121. package/lib/plugins/ProjectPlugin.js +0 -54
  122. package/lib/plugins/ProxyPlugin.js +0 -257
  123. package/lib/plugins/ServeoPlugin.d.ts +0 -36
  124. package/lib/plugins/ServeoPlugin.js +0 -260
  125. package/lib/plugins/TestPlugin.d.ts +0 -10
  126. package/lib/plugins/TestPlugin.js +0 -75
  127. package/lib/utils/promptConfirm.d.ts +0 -6
  128. package/lib/utils/promptConfirm.js +0 -21
  129. package/lib/utils/promptGroup.d.ts +0 -16
  130. package/lib/utils/promptGroup.js +0 -39
  131. package/lib/utils/promptSelect.d.ts +0 -12
  132. package/lib/utils/promptSelect.js +0 -47
  133. package/lib/utils/promptText.d.ts +0 -13
  134. package/lib/utils/promptText.js +0 -53
  135. package/plugins/mariadb/admin/conf/config.user.inc.php +0 -9
  136. package/plugins/serveo/Dockerfile +0 -17
@@ -1,80 +1,69 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.followProgress = void 0;
7
- var _Logger = require("../makes/Logger");
8
- var _LineConvertStream = require("../makes/LineConvertStream");
9
- var _formatSizeUnits = require("./format-size-units");
10
- const followProgress = async stream => {
11
- const lineStream = new _LineConvertStream.LineConvertStream(stream);
12
- let line = 0;
13
- const mapLines = {};
14
- lineStream.on("data", chunk => {
15
- const data = JSON.parse(chunk.toString());
16
- const {
17
- stream,
18
- id,
19
- status,
20
- progressDetail: {
21
- current,
22
- total
23
- } = {},
24
- aux
25
- } = data;
26
- if (stream) {
27
- process.stdout.write(`${stream}`);
28
- line += stream.split("\n").length - 1;
29
- // line += Math.ceil(stream.length / process.stdout.columns);
30
- } else if (id) {
31
- if (typeof mapLines[id] === "undefined") {
32
- mapLines[id] = line;
33
- }
34
- const targetLine = typeof mapLines[id] !== "undefined" ? mapLines[id] : line;
35
- const dy = line - targetLine;
36
- if (dy > 0) {
37
- process.stdout.write("\x1b[s");
38
- process.stdout.write(`\x1b[${dy}A`);
39
- }
40
- process.stdout.write("\x1b[2K");
41
- let str = `${id}: ${status}\n`;
42
- if (status === "Downloading") {
43
- const width = process.stdout.columns;
44
- const sizeWidth = 19,
45
- totalWidth = width - id.length - status.length - sizeWidth - 7,
46
- currentWidth = Math.floor(totalWidth * (current / total)),
47
- formatSize = `${(0, _formatSizeUnits.formatSizeUnits)(current)}/${(0, _formatSizeUnits.formatSizeUnits)(total)}`;
48
- str = `${id}: ${status} [${"█".repeat(currentWidth)}${"░".repeat(totalWidth - currentWidth)}] ${formatSize}\n`;
49
- }
50
- process.stdout.write(str);
51
- if (dy > 0) {
52
- process.stdout.write("\x1b[u");
53
- } else {
54
- line++;
55
- }
56
- } else if (status) {
57
- process.stdout.write(`${status}\n`);
58
- line += Math.ceil(status.length / process.stdout.columns);
59
- } else if (aux) {
60
- const str = `auxID: ${aux.ID}`;
61
- process.stdout.write(`${str}\n`);
62
- line += Math.ceil(str.length / process.stdout.columns);
63
- } else {
64
- _Logger.Logger.warning("followProgress: unexpected data", data);
65
- }
66
- });
67
- return new Promise((resolve, reject) => {
68
- let isEnded = false;
69
- const handleEnd = () => {
70
- if (!isEnded) {
71
- resolve(null);
72
- }
73
- isEnded = true;
74
- };
75
- lineStream.on("end", handleEnd);
76
- lineStream.on("close", handleEnd);
77
- lineStream.on("error", reject);
78
- });
4
+ const LineConvertStream_1 = require("../makes/LineConvertStream");
5
+ const format_size_units_1 = require("./format-size-units");
6
+ const makes_1 = require("../makes");
7
+ const followProgress = async (stream) => {
8
+ const lineStream = new LineConvertStream_1.LineConvertStream(stream);
9
+ let line = 0;
10
+ const mapLines = {};
11
+ lineStream.on("data", (chunk) => {
12
+ const data = JSON.parse(chunk.toString());
13
+ const { stream, id, status, progressDetail: { current, total } = {}, aux } = data;
14
+ if (stream) {
15
+ process.stdout.write(`${stream}`);
16
+ line += stream.split("\n").length - 1;
17
+ }
18
+ else if (id) {
19
+ if (typeof mapLines[id] === "undefined") {
20
+ mapLines[id] = line;
21
+ }
22
+ const targetLine = typeof mapLines[id] !== "undefined" ? mapLines[id] : line;
23
+ const dy = line - targetLine;
24
+ if (dy > 0) {
25
+ process.stdout.write("\x1b[s");
26
+ process.stdout.write(`\x1b[${dy}A`);
27
+ }
28
+ process.stdout.write("\x1b[2K");
29
+ let str = `${id}: ${status}\n`;
30
+ if (status === "Downloading") {
31
+ const width = process.stdout.columns;
32
+ const sizeWidth = 19, totalWidth = width - id.length - status.length - sizeWidth - 7, currentWidth = Math.floor(totalWidth * (current / total)), formatSize = `${(0, format_size_units_1.formatSizeUnits)(current)}/${(0, format_size_units_1.formatSizeUnits)(total)}`;
33
+ str = `${id}: ${status} [${"█".repeat(currentWidth)}${"░".repeat(totalWidth - currentWidth)}] ${formatSize}\n`;
34
+ }
35
+ process.stdout.write(str);
36
+ if (dy > 0) {
37
+ process.stdout.write("\x1b[u");
38
+ }
39
+ else {
40
+ line++;
41
+ }
42
+ }
43
+ else if (status) {
44
+ process.stdout.write(`${status}\n`);
45
+ line += Math.ceil(status.length / process.stdout.columns);
46
+ }
47
+ else if (aux) {
48
+ const str = `auxID: ${aux.ID}`;
49
+ process.stdout.write(`${str}\n`);
50
+ line += Math.ceil(str.length / process.stdout.columns);
51
+ }
52
+ else {
53
+ makes_1.Logger.warn("followProgress: unexpected data", data);
54
+ }
55
+ });
56
+ return new Promise((resolve, reject) => {
57
+ let isEnded = false;
58
+ const handleEnd = () => {
59
+ if (!isEnded) {
60
+ resolve(null);
61
+ }
62
+ isEnded = true;
63
+ };
64
+ lineStream.on("end", handleEnd);
65
+ lineStream.on("close", handleEnd);
66
+ lineStream.on("error", reject);
67
+ });
79
68
  };
80
- exports.followProgress = followProgress;
69
+ exports.followProgress = followProgress;
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.formatSizeUnits = void 0;
7
- const formatSizeUnits = bytes => {
8
- if (bytes >= 1073741824) {
9
- return (bytes / 1073741824).toFixed(2) + "GB";
10
- } else if (bytes >= 1048576) {
11
- return (bytes / 1048576).toFixed(2) + "MB";
12
- } else if (bytes >= 1024) {
13
- return (bytes / 1024).toFixed(2) + "kB";
14
- } else if (bytes >= 1) {
15
- return bytes + "b";
16
- }
17
- return "0b";
4
+ const formatSizeUnits = (bytes) => {
5
+ if (bytes >= 1073741824) {
6
+ return (bytes / 1073741824).toFixed(2) + "GB";
7
+ }
8
+ else if (bytes >= 1048576) {
9
+ return (bytes / 1048576).toFixed(2) + "MB";
10
+ }
11
+ else if (bytes >= 1024) {
12
+ return (bytes / 1024).toFixed(2) + "kB";
13
+ }
14
+ else if (bytes >= 1) {
15
+ return bytes + "b";
16
+ }
17
+ return "0b";
18
18
  };
19
- exports.formatSizeUnits = formatSizeUnits;
19
+ exports.formatSizeUnits = formatSizeUnits;
@@ -1,2 +1,2 @@
1
- import { Config } from "src/types";
1
+ import { Config } from "../types";
2
2
  export declare const getConfig: () => Promise<Config>;
@@ -1,20 +1,17 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.getConfig = void 0;
7
- var _env = require("../env");
8
- var _FS = require("../makes/FS");
4
+ const env_1 = require("../env");
5
+ const FS_1 = require("../makes/FS");
9
6
  const getConfig = async () => {
10
- return _FS.FS.readJSON(_env.MAP_PATH).catch(err => {
11
- if (err.code === "ENOENT") {
12
- return Promise.resolve({
13
- env: {},
14
- projects: []
15
- });
16
- }
17
- throw err;
18
- });
7
+ return FS_1.FS.readJSON(env_1.MAP_PATH).catch((err) => {
8
+ if (err.code === "ENOENT") {
9
+ return Promise.resolve({
10
+ env: {},
11
+ projects: []
12
+ });
13
+ }
14
+ throw err;
15
+ });
19
16
  };
20
- exports.getConfig = getConfig;
17
+ exports.getConfig = getConfig;
@@ -1,34 +1,27 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.getCursorPosition = void 0;
7
- // import {} from "tty";
8
-
9
4
  const code = '\x1b[6n';
10
5
  const getCursorPosition = async () => {
11
- process.stdin.resume();
12
- process.stdin.setRawMode(true);
13
- const position = {};
14
- await new Promise((resolve, reject) => {
15
- const handleData = data => {
16
- const match = /\[(\d+);(\d+)R$/.exec(data.toString());
17
- if (match) {
18
- const [, col, row] = match.slice(1, 3).reverse().map(Number);
19
- position.row = row;
20
- position.col = col;
21
- resolve(undefined);
22
- }
23
-
24
- // process.stdin.setRawMode(false);
25
- process.stdin.off("data", handleData);
26
- process.stdin.pause();
27
- };
28
- process.stdin.once("data", handleData);
29
- process.stdout.write(code);
30
- process.stdout.emit("data", code);
31
- });
32
- return position;
6
+ process.stdin.resume();
7
+ process.stdin.setRawMode(true);
8
+ const position = {};
9
+ await new Promise((resolve, reject) => {
10
+ const handleData = (data) => {
11
+ const match = /\[(\d+);(\d+)R$/.exec(data.toString());
12
+ if (match) {
13
+ const [, col, row] = match.slice(1, 3).reverse().map(Number);
14
+ position.row = row;
15
+ position.col = col;
16
+ resolve(undefined);
17
+ }
18
+ process.stdin.off("data", handleData);
19
+ process.stdin.pause();
20
+ };
21
+ process.stdin.once("data", handleData);
22
+ process.stdout.write(code);
23
+ process.stdout.emit("data", code);
24
+ });
25
+ return position;
33
26
  };
34
- exports.getCursorPosition = getCursorPosition;
27
+ exports.getCursorPosition = getCursorPosition;
@@ -1,28 +1,40 @@
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.imageBuild = void 0;
7
- var _exec = require("./exec");
8
- var Path = _interopRequireWildcard(require("path"));
9
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
- const imageBuild = async options => {
12
- const {
13
- tag,
14
- buildArgs = {},
15
- labels = {},
16
- context,
17
- src
18
- } = options;
19
- const buildArgsString = Object.keys(buildArgs).map(key => {
20
- return `--build-arg ${key}=${buildArgs[key]}`;
21
- }).join(" ");
22
- const labelsString = Object.keys(labels).map(key => {
23
- return `--label ${key}=${labels[key]}`;
24
- }).join(" ");
25
- await (0, _exec.exec)(`
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)(`
26
38
  docker build \
27
39
  --tag "${tag}" \
28
40
  ${buildArgsString} \
@@ -31,4 +43,4 @@ const imageBuild = async options => {
31
43
  ${context}
32
44
  `);
33
45
  };
34
- exports.imageBuild = imageBuild;
46
+ exports.imageBuild = imageBuild;
@@ -10,10 +10,6 @@ export * from "./get-cursor-position";
10
10
  export * from "./image-build";
11
11
  export * from "./injectVariables";
12
12
  export * from "./parse-table";
13
- export * from "./promptConfirm";
14
- export * from "./promptGroup";
15
- export * from "./promptSelect";
16
- export * from "./promptText";
17
13
  export * from "./set-config";
18
14
  export * from "./spawn";
19
15
  export * from "./tty";
@@ -1,236 +1,33 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _buildOptions = require("./buildOptions");
7
- Object.keys(_buildOptions).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _buildOptions[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _buildOptions[key];
14
- }
15
- });
16
- });
17
- var _demuxOutput = require("./demuxOutput");
18
- Object.keys(_demuxOutput).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _demuxOutput[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _demuxOutput[key];
25
- }
26
- });
27
- });
28
- var _escapeRegExp = require("./escapeRegExp");
29
- Object.keys(_escapeRegExp).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _escapeRegExp[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _escapeRegExp[key];
36
- }
37
- });
38
- });
39
- var _exec = require("./exec");
40
- Object.keys(_exec).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _exec[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function () {
46
- return _exec[key];
47
- }
48
- });
49
- });
50
- var _fetch = require("./fetch");
51
- Object.keys(_fetch).forEach(function (key) {
52
- if (key === "default" || key === "__esModule") return;
53
- if (key in exports && exports[key] === _fetch[key]) return;
54
- Object.defineProperty(exports, key, {
55
- enumerable: true,
56
- get: function () {
57
- return _fetch[key];
58
- }
59
- });
60
- });
61
- var _followProgress = require("./followProgress");
62
- Object.keys(_followProgress).forEach(function (key) {
63
- if (key === "default" || key === "__esModule") return;
64
- if (key in exports && exports[key] === _followProgress[key]) return;
65
- Object.defineProperty(exports, key, {
66
- enumerable: true,
67
- get: function () {
68
- return _followProgress[key];
69
- }
70
- });
71
- });
72
- var _formatSizeUnits = require("./format-size-units");
73
- Object.keys(_formatSizeUnits).forEach(function (key) {
74
- if (key === "default" || key === "__esModule") return;
75
- if (key in exports && exports[key] === _formatSizeUnits[key]) return;
76
- Object.defineProperty(exports, key, {
77
- enumerable: true,
78
- get: function () {
79
- return _formatSizeUnits[key];
80
- }
81
- });
82
- });
83
- var _getConfig = require("./get-config");
84
- Object.keys(_getConfig).forEach(function (key) {
85
- if (key === "default" || key === "__esModule") return;
86
- if (key in exports && exports[key] === _getConfig[key]) return;
87
- Object.defineProperty(exports, key, {
88
- enumerable: true,
89
- get: function () {
90
- return _getConfig[key];
91
- }
92
- });
93
- });
94
- var _getCursorPosition = require("./get-cursor-position");
95
- Object.keys(_getCursorPosition).forEach(function (key) {
96
- if (key === "default" || key === "__esModule") return;
97
- if (key in exports && exports[key] === _getCursorPosition[key]) return;
98
- Object.defineProperty(exports, key, {
99
- enumerable: true,
100
- get: function () {
101
- return _getCursorPosition[key];
102
- }
103
- });
104
- });
105
- var _imageBuild = require("./image-build");
106
- Object.keys(_imageBuild).forEach(function (key) {
107
- if (key === "default" || key === "__esModule") return;
108
- if (key in exports && exports[key] === _imageBuild[key]) return;
109
- Object.defineProperty(exports, key, {
110
- enumerable: true,
111
- get: function () {
112
- return _imageBuild[key];
113
- }
114
- });
115
- });
116
- var _injectVariables = require("./injectVariables");
117
- Object.keys(_injectVariables).forEach(function (key) {
118
- if (key === "default" || key === "__esModule") return;
119
- if (key in exports && exports[key] === _injectVariables[key]) return;
120
- Object.defineProperty(exports, key, {
121
- enumerable: true,
122
- get: function () {
123
- return _injectVariables[key];
124
- }
125
- });
126
- });
127
- var _parseTable = require("./parse-table");
128
- Object.keys(_parseTable).forEach(function (key) {
129
- if (key === "default" || key === "__esModule") return;
130
- if (key in exports && exports[key] === _parseTable[key]) return;
131
- Object.defineProperty(exports, key, {
132
- enumerable: true,
133
- get: function () {
134
- return _parseTable[key];
135
- }
136
- });
137
- });
138
- var _promptConfirm = require("./promptConfirm");
139
- Object.keys(_promptConfirm).forEach(function (key) {
140
- if (key === "default" || key === "__esModule") return;
141
- if (key in exports && exports[key] === _promptConfirm[key]) return;
142
- Object.defineProperty(exports, key, {
143
- enumerable: true,
144
- get: function () {
145
- return _promptConfirm[key];
146
- }
147
- });
148
- });
149
- var _promptGroup = require("./promptGroup");
150
- Object.keys(_promptGroup).forEach(function (key) {
151
- if (key === "default" || key === "__esModule") return;
152
- if (key in exports && exports[key] === _promptGroup[key]) return;
153
- Object.defineProperty(exports, key, {
154
- enumerable: true,
155
- get: function () {
156
- return _promptGroup[key];
157
- }
158
- });
159
- });
160
- var _promptSelect = require("./promptSelect");
161
- Object.keys(_promptSelect).forEach(function (key) {
162
- if (key === "default" || key === "__esModule") return;
163
- if (key in exports && exports[key] === _promptSelect[key]) return;
164
- Object.defineProperty(exports, key, {
165
- enumerable: true,
166
- get: function () {
167
- return _promptSelect[key];
168
- }
169
- });
170
- });
171
- var _promptText = require("./promptText");
172
- Object.keys(_promptText).forEach(function (key) {
173
- if (key === "default" || key === "__esModule") return;
174
- if (key in exports && exports[key] === _promptText[key]) return;
175
- Object.defineProperty(exports, key, {
176
- enumerable: true,
177
- get: function () {
178
- return _promptText[key];
179
- }
180
- });
181
- });
182
- var _setConfig = require("./set-config");
183
- Object.keys(_setConfig).forEach(function (key) {
184
- if (key === "default" || key === "__esModule") return;
185
- if (key in exports && exports[key] === _setConfig[key]) return;
186
- Object.defineProperty(exports, key, {
187
- enumerable: true,
188
- get: function () {
189
- return _setConfig[key];
190
- }
191
- });
192
- });
193
- var _spawn = require("./spawn");
194
- Object.keys(_spawn).forEach(function (key) {
195
- if (key === "default" || key === "__esModule") return;
196
- if (key in exports && exports[key] === _spawn[key]) return;
197
- Object.defineProperty(exports, key, {
198
- enumerable: true,
199
- get: function () {
200
- return _spawn[key];
201
- }
202
- });
203
- });
204
- var _tty = require("./tty");
205
- Object.keys(_tty).forEach(function (key) {
206
- if (key === "default" || key === "__esModule") return;
207
- if (key in exports && exports[key] === _tty[key]) return;
208
- Object.defineProperty(exports, key, {
209
- enumerable: true,
210
- get: function () {
211
- return _tty[key];
212
- }
213
- });
214
- });
215
- var _volumeFormat = require("./volumeFormat");
216
- Object.keys(_volumeFormat).forEach(function (key) {
217
- if (key === "default" || key === "__esModule") return;
218
- if (key in exports && exports[key] === _volumeFormat[key]) return;
219
- Object.defineProperty(exports, key, {
220
- enumerable: true,
221
- get: function () {
222
- return _volumeFormat[key];
223
- }
224
- });
225
- });
226
- var _volumeParse = require("./volumeParse");
227
- Object.keys(_volumeParse).forEach(function (key) {
228
- if (key === "default" || key === "__esModule") return;
229
- if (key in exports && exports[key] === _volumeParse[key]) return;
230
- Object.defineProperty(exports, key, {
231
- enumerable: true,
232
- get: function () {
233
- return _volumeParse[key];
234
- }
235
- });
236
- });
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 __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("./buildOptions"), exports);
18
+ __exportStar(require("./demuxOutput"), exports);
19
+ __exportStar(require("./escapeRegExp"), exports);
20
+ __exportStar(require("./exec"), exports);
21
+ __exportStar(require("./fetch"), exports);
22
+ __exportStar(require("./followProgress"), exports);
23
+ __exportStar(require("./format-size-units"), exports);
24
+ __exportStar(require("./get-config"), exports);
25
+ __exportStar(require("./get-cursor-position"), exports);
26
+ __exportStar(require("./image-build"), exports);
27
+ __exportStar(require("./injectVariables"), exports);
28
+ __exportStar(require("./parse-table"), exports);
29
+ __exportStar(require("./set-config"), exports);
30
+ __exportStar(require("./spawn"), exports);
31
+ __exportStar(require("./tty"), exports);
32
+ __exportStar(require("./volumeFormat"), exports);
33
+ __exportStar(require("./volumeParse"), exports);