@wocker/ws 1.0.22 → 1.0.24

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 (139) hide show
  1. package/lib/{AppModule.d.ts → RootModule.d.ts} +1 -1
  2. package/lib/RootModule.js +93 -0
  3. package/lib/controllers/DebugController.d.ts +1 -1
  4. package/lib/controllers/DebugController.js +7 -9
  5. package/lib/controllers/ExperimentalController.d.ts +8 -0
  6. package/lib/controllers/ExperimentalController.js +76 -0
  7. package/lib/controllers/PluginController.d.ts +2 -1
  8. package/lib/controllers/PluginController.js +3 -3
  9. package/lib/controllers/ProjectController.d.ts +8 -7
  10. package/lib/controllers/ProjectController.js +123 -240
  11. package/lib/controllers/index.d.ts +1 -4
  12. package/lib/controllers/index.js +1 -4
  13. package/lib/env.d.ts +2 -3
  14. package/lib/env.js +3 -4
  15. package/lib/main.js +8 -8
  16. package/lib/makes/Plugin.d.ts +0 -1
  17. package/lib/makes/Plugin.js +0 -1
  18. package/lib/makes/index.d.ts +0 -2
  19. package/lib/makes/index.js +0 -2
  20. package/lib/modules/app/index.d.ts +2 -0
  21. package/lib/modules/app/index.js +32 -0
  22. package/lib/modules/docker/index.d.ts +8 -0
  23. package/lib/modules/docker/index.js +41 -0
  24. package/lib/modules/docker/services/ContainerService.d.ts +14 -0
  25. package/lib/modules/docker/services/ContainerService.js +115 -0
  26. package/lib/{services → modules/docker/services}/DockerService.d.ts +12 -5
  27. package/lib/{services → modules/docker/services}/DockerService.js +27 -114
  28. package/lib/modules/docker/services/ImageService.d.ts +18 -0
  29. package/lib/modules/docker/services/ImageService.js +68 -0
  30. package/lib/modules/docker/services/ModemService.d.ts +15 -0
  31. package/lib/modules/docker/services/ModemService.js +138 -0
  32. package/lib/modules/docker/services/ProtoService.d.ts +6 -0
  33. package/lib/modules/docker/services/ProtoService.js +20 -0
  34. package/lib/modules/index.d.ts +6 -0
  35. package/lib/{keystore → modules}/index.js +6 -1
  36. package/lib/{controllers → modules/keystore/controllers}/KeystoreController.d.ts +2 -2
  37. package/lib/{controllers → modules/keystore/controllers}/KeystoreController.js +4 -5
  38. package/lib/modules/keystore/index.d.ts +4 -0
  39. package/lib/modules/keystore/index.js +29 -0
  40. package/lib/{keystore → modules/keystore}/providers/FileKeystoreProvider.d.ts +3 -4
  41. package/lib/{keystore → modules/keystore}/providers/FileKeystoreProvider.js +4 -5
  42. package/lib/{keystore → modules/keystore}/providers/KeytarKeystoreProvider.js +1 -1
  43. package/lib/{keystore → modules/keystore/services}/KeystoreService.d.ts +4 -3
  44. package/lib/{keystore → modules/keystore/services}/KeystoreService.js +9 -6
  45. package/lib/modules/preset/controllers/PresetController.d.ts +18 -0
  46. package/lib/modules/preset/controllers/PresetController.js +157 -0
  47. package/lib/modules/preset/controllers/PresetListener.d.ts +14 -0
  48. package/lib/modules/preset/controllers/PresetListener.js +140 -0
  49. package/lib/modules/preset/index.d.ts +5 -0
  50. package/lib/modules/preset/index.js +39 -0
  51. package/lib/modules/preset/repositories/PresetRepository.d.ts +16 -0
  52. package/lib/{repositories → modules/preset/repositories}/PresetRepository.js +9 -11
  53. package/lib/{services → modules/preset/services}/PresetService.d.ts +4 -12
  54. package/lib/{services → modules/preset/services}/PresetService.js +22 -27
  55. package/lib/modules/project/controllers/ProjectController.d.ts +13 -0
  56. package/lib/modules/project/controllers/ProjectController.js +127 -0
  57. package/lib/modules/project/index.d.ts +5 -0
  58. package/lib/modules/project/index.js +39 -0
  59. package/lib/modules/project/repositories/ProjectRepository.d.ts +13 -0
  60. package/lib/modules/project/repositories/ProjectRepository.js +90 -0
  61. package/lib/modules/project/services/ProjectService.d.ts +21 -0
  62. package/lib/modules/project/services/ProjectService.js +211 -0
  63. package/lib/{controllers → modules/proxy/controllers}/CertController.d.ts +2 -1
  64. package/lib/{controllers → modules/proxy/controllers}/CertController.js +4 -3
  65. package/lib/{controllers → modules/proxy/controllers}/ProxyController.d.ts +5 -4
  66. package/lib/{controllers → modules/proxy/controllers}/ProxyController.js +12 -11
  67. package/lib/modules/proxy/index.d.ts +5 -0
  68. package/lib/modules/proxy/index.js +41 -0
  69. package/lib/{services → modules/proxy/services}/CertService.d.ts +5 -6
  70. package/lib/{services → modules/proxy/services}/CertService.js +13 -14
  71. package/lib/{services → modules/proxy/services}/ProxyService.d.ts +4 -4
  72. package/lib/{services → modules/proxy/services}/ProxyService.js +27 -20
  73. package/lib/services/PluginService.d.ts +1 -3
  74. package/lib/services/PluginService.js +12 -18
  75. package/lib/utils/followProgress2.d.ts +1 -0
  76. package/lib/utils/followProgress2.js +63 -0
  77. package/lib/utils/index.d.ts +1 -2
  78. package/lib/utils/index.js +1 -2
  79. package/package.json +7 -8
  80. package/proto/buildkit.proto +55 -0
  81. package/proto/solver/pb/ops.proto +443 -0
  82. package/lib/AppModule.js +0 -84
  83. package/lib/controllers/PresetController.d.ts +0 -23
  84. package/lib/controllers/PresetController.js +0 -361
  85. package/lib/keystore/index.d.ts +0 -1
  86. package/lib/keystore/types/Encryption.d.ts +0 -9
  87. package/lib/keystore/types/Encryption.js +0 -81
  88. package/lib/keystore/types/Encryptor.d.ts +0 -10
  89. package/lib/keystore/types/Encryptor.js +0 -59
  90. package/lib/makes/FS.d.ts +0 -27
  91. package/lib/makes/FS.js +0 -284
  92. package/lib/makes/LineConvertStream.d.ts +0 -11
  93. package/lib/makes/LineConvertStream.js +0 -42
  94. package/lib/makes/Logger.d.ts +0 -9
  95. package/lib/makes/Logger.js +0 -34
  96. package/lib/plugins/MongodbPlugin.d.ts +0 -20
  97. package/lib/plugins/MongodbPlugin.js +0 -288
  98. package/lib/plugins/index.d.ts +0 -1
  99. package/lib/plugins/index.js +0 -17
  100. package/lib/repositories/PresetRepository.d.ts +0 -23
  101. package/lib/repositories/index.d.ts +0 -1
  102. package/lib/repositories/index.js +0 -17
  103. package/lib/services/AppConfigService.d.ts +0 -35
  104. package/lib/services/AppConfigService.js +0 -163
  105. package/lib/services/AppEventsService.d.ts +0 -9
  106. package/lib/services/AppEventsService.js +0 -43
  107. package/lib/services/LogService.d.ts +0 -15
  108. package/lib/services/LogService.js +0 -67
  109. package/lib/services/ProjectService.d.ts +0 -27
  110. package/lib/services/ProjectService.js +0 -207
  111. package/lib/services/index.d.ts +0 -10
  112. package/lib/services/index.js +0 -26
  113. package/lib/utils/followProgress.d.ts +0 -1
  114. package/lib/utils/followProgress.js +0 -73
  115. package/presets/go/Dockerfile +0 -19
  116. package/presets/go/config.json +0 -14
  117. package/presets/php-fpm/Dockerfile +0 -173
  118. package/presets/php-fpm/bin/compare-version +0 -3
  119. package/presets/php-fpm/config.json +0 -55
  120. package/presets/php-fpm/etc/nginx/sites-available/default.conf +0 -36
  121. /package/lib/{utils/format-size-units.d.ts → modules/docker/utils/formatSizeUnits.d.ts} +0 -0
  122. /package/lib/{utils/format-size-units.js → modules/docker/utils/formatSizeUnits.js} +0 -0
  123. /package/lib/{keystore → modules/keystore}/providers/KeytarKeystoreProvider.d.ts +0 -0
  124. /package/lib/{keystore → modules/keystore}/types/FileKeystore.d.ts +0 -0
  125. /package/lib/{keystore → modules/keystore}/types/FileKeystore.js +0 -0
  126. /package/lib/{keystore → modules/keystore}/types/Keytar.d.ts +0 -0
  127. /package/lib/{keystore → modules/keystore}/types/Keytar.js +0 -0
  128. /package/lib/{keystore → modules/keystore}/utils/createEncryptionKey.d.ts +0 -0
  129. /package/lib/{keystore → modules/keystore}/utils/createEncryptionKey.js +0 -0
  130. /package/lib/{keystore → modules/keystore}/utils/createPasswordHash.d.ts +0 -0
  131. /package/lib/{keystore → modules/keystore}/utils/createPasswordHash.js +0 -0
  132. /package/lib/{keystore → modules/keystore}/utils/decrypt.d.ts +0 -0
  133. /package/lib/{keystore → modules/keystore}/utils/decrypt.js +0 -0
  134. /package/lib/{keystore → modules/keystore}/utils/encrypt.d.ts +0 -0
  135. /package/lib/{keystore → modules/keystore}/utils/encrypt.js +0 -0
  136. /package/lib/{keystore → modules/keystore}/utils/index.d.ts +0 -0
  137. /package/lib/{keystore → modules/keystore}/utils/index.js +0 -0
  138. /package/lib/{keystore → modules/keystore}/utils/verifyPasswordHash.d.ts +0 -0
  139. /package/lib/{keystore → modules/keystore}/utils/verifyPasswordHash.js +0 -0
@@ -46,13 +46,13 @@ exports.ProxyService = void 0;
46
46
  const core_1 = require("@wocker/core");
47
47
  const utils_1 = require("@wocker/utils");
48
48
  const Path = __importStar(require("path"));
49
- const env_1 = require("../env");
50
- const AppConfigService_1 = require("./AppConfigService");
51
- const DockerService_1 = require("./DockerService");
49
+ const env_1 = require("../../../env");
50
+ const docker_1 = require("../../docker");
52
51
  let ProxyService = class ProxyService extends core_1.ProxyService {
53
- constructor(appConfigService, dockerService) {
52
+ constructor(appConfigService, fs, dockerService) {
54
53
  super();
55
54
  this.appConfigService = appConfigService;
55
+ this.fs = fs;
56
56
  this.dockerService = dockerService;
57
57
  this.containerName = "proxy.workspace";
58
58
  this.imageName = "wocker-proxy:1.0.1";
@@ -67,7 +67,7 @@ let ProxyService = class ProxyService extends core_1.ProxyService {
67
67
  default: parseInt(project.getEnv("VIRTUAL_PORT", "80"))
68
68
  });
69
69
  project.setEnv("VIRTUAL_PORT", appPort.toString());
70
- await project.save();
70
+ project.save();
71
71
  }
72
72
  async start(restart, rebuild) {
73
73
  if (restart || rebuild) {
@@ -77,22 +77,28 @@ let ProxyService = class ProxyService extends core_1.ProxyService {
77
77
  if (!container) {
78
78
  console.info("Proxy starting...");
79
79
  await this.build(rebuild);
80
- if (!this.appConfigService.fs.exists("certs/ca")) {
81
- this.appConfigService.fs.mkdir("certs/ca", {
80
+ const fs = this.fs;
81
+ if (!this.fs.exists("certs/ca")) {
82
+ this.fs.mkdir("certs/ca", {
82
83
  recursive: true,
83
84
  mode: 0o700
84
85
  });
85
86
  }
86
- if (!this.appConfigService.fs.exists("certs/projects")) {
87
- this.appConfigService.fs.mkdir("certs/projects", {
87
+ if (!this.fs.exists("certs/projects")) {
88
+ this.fs.mkdir("certs/projects", {
88
89
  recursive: true,
89
90
  mode: 0o700
90
91
  });
91
92
  }
92
- const config = this.appConfigService.config;
93
- const httpPort = config.getMeta("PROXY_HTTP_PORT", "80");
94
- const httpsPort = config.getMeta("PROXY_HTTPS_PORT", "443");
95
- const sshPort = config.getMeta("PROXY_SSH_PORT", "22");
93
+ if (!fs.exists("nginx/vhost.d")) {
94
+ fs.mkdir("nginx/vhost.d", {
95
+ recursive: true,
96
+ mode: 0o700
97
+ });
98
+ }
99
+ const httpPort = this.appConfigService.getMeta("PROXY_HTTP_PORT", "80");
100
+ const httpsPort = this.appConfigService.getMeta("PROXY_HTTPS_PORT", "443");
101
+ const sshPort = this.appConfigService.getMeta("PROXY_SSH_PORT", "22");
96
102
  container = await this.dockerService.createContainer({
97
103
  name: this.containerName,
98
104
  image: this.imageName,
@@ -104,14 +110,15 @@ let ProxyService = class ProxyService extends core_1.ProxyService {
104
110
  ports: [
105
111
  `${httpPort}:80`,
106
112
  `${httpsPort}:443`,
107
- ...config.getMeta("PROXY_SSH_PASSWORD") ? [
113
+ ...this.appConfigService.getMeta("PROXY_SSH_PASSWORD") ? [
108
114
  `${sshPort}:22`
109
115
  ] : []
110
116
  ],
111
117
  volumes: [
112
118
  "/var/run/docker.sock:/tmp/docker.sock:ro",
113
- `${this.appConfigService.fs.path("certs/projects")}:/etc/nginx/certs`,
114
- `${this.appConfigService.fs.path("certs/ca")}:/etc/nginx/ca-certs`
119
+ `${fs.path("certs/projects")}:/etc/nginx/certs`,
120
+ `${fs.path("certs/ca")}:/etc/nginx/ca-certs`,
121
+ `${fs.path("nginx/vhost.d")}:/etc/nginx/vhost.d`
115
122
  ],
116
123
  network: "workspace"
117
124
  });
@@ -137,13 +144,12 @@ let ProxyService = class ProxyService extends core_1.ProxyService {
137
144
  for (const oldImage of this.oldImages) {
138
145
  await this.dockerService.imageRm(oldImage);
139
146
  }
140
- const config = this.appConfigService.config;
141
147
  await this.dockerService.buildImage({
142
148
  tag: this.imageName,
143
149
  context: Path.join(env_1.PLUGINS_DIR, "proxy"),
144
150
  src: "./Dockerfile",
145
151
  buildArgs: {
146
- SSH_PASSWORD: config.getMeta("PROXY_SSH_PASSWORD")
152
+ SSH_PASSWORD: this.appConfigService.getMeta("PROXY_SSH_PASSWORD")
147
153
  }
148
154
  });
149
155
  }
@@ -154,6 +160,7 @@ let ProxyService = class ProxyService extends core_1.ProxyService {
154
160
  exports.ProxyService = ProxyService;
155
161
  exports.ProxyService = ProxyService = __decorate([
156
162
  (0, core_1.Injectable)("PROXY_SERVICE"),
157
- __metadata("design:paramtypes", [AppConfigService_1.AppConfigService,
158
- DockerService_1.DockerService])
163
+ __metadata("design:paramtypes", [core_1.AppConfigService,
164
+ core_1.AppFileSystemService,
165
+ docker_1.DockerService])
159
166
  ], ProxyService);
@@ -1,6 +1,4 @@
1
- import { Cli } from "@wocker/core";
2
- import { AppConfigService } from "./AppConfigService";
3
- import { LogService } from "./LogService";
1
+ import { Cli, AppConfigService, LogService } from "@wocker/core";
4
2
  import { NpmService } from "./NpmService";
5
3
  import { Plugin } from "../makes";
6
4
  export declare class PluginService {
@@ -49,8 +49,6 @@ exports.PluginService = void 0;
49
49
  const core_1 = require("@wocker/core");
50
50
  const cli_table3_1 = __importDefault(require("cli-table3"));
51
51
  const yoctocolors_cjs_1 = __importDefault(require("yoctocolors-cjs"));
52
- const AppConfigService_1 = require("./AppConfigService");
53
- const LogService_1 = require("./LogService");
54
52
  const NpmService_1 = require("./NpmService");
55
53
  const makes_1 = require("../makes");
56
54
  const utils_1 = require("../utils");
@@ -62,15 +60,14 @@ let PluginService = class PluginService {
62
60
  this.cli = cli;
63
61
  }
64
62
  getPluginsTable() {
65
- const config = this.appConfigService.config;
66
63
  const table = new cli_table3_1.default({
67
64
  head: ["Name", "Env"],
68
65
  colWidths: [30]
69
66
  });
70
- if (config.plugins.length === 0) {
67
+ if (this.appConfigService.plugins.length === 0) {
71
68
  return yoctocolors_cjs_1.default.gray("No plugins installed");
72
69
  }
73
- for (const plugin of config.plugins) {
70
+ for (const plugin of this.appConfigService.plugins) {
74
71
  table.push([plugin.name, plugin.env]);
75
72
  }
76
73
  return table.toString();
@@ -90,11 +87,10 @@ let PluginService = class PluginService {
90
87
  async install(pluginName, beta) {
91
88
  const [, prefix = "@wocker/", name, suffix = "-plugin"] = /^(@wocker\/)?(\w+)(-plugin)?$/.exec(pluginName) || [];
92
89
  const fullName = `${prefix}${name}${suffix}`;
93
- const config = this.appConfigService.config;
94
90
  try {
95
91
  if (await this.checkPlugin(fullName)) {
96
- config.addPlugin(fullName);
97
- await config.save();
92
+ this.appConfigService.addPlugin(fullName);
93
+ this.appConfigService.save();
98
94
  console.info(`Plugin ${fullName} activated`);
99
95
  return;
100
96
  }
@@ -102,8 +98,8 @@ let PluginService = class PluginService {
102
98
  const env = packageInfo["dist-tags"].beta && beta ? "beta" : "latest";
103
99
  await this.npmService.install(fullName, env);
104
100
  if (await this.checkPlugin(fullName)) {
105
- config.addPlugin(fullName, env);
106
- await config.save();
101
+ this.appConfigService.addPlugin(fullName, env);
102
+ this.appConfigService.save();
107
103
  console.info(`Plugin ${fullName}@${env} activated`);
108
104
  return;
109
105
  }
@@ -115,9 +111,8 @@ let PluginService = class PluginService {
115
111
  async uninstall(pluginName) {
116
112
  const [, prefix = "@wocker/", name, suffix = "-plugin"] = /^(@wocker\/)?(\w+)(-plugin)?$/.exec(pluginName) || [];
117
113
  const fullName = `${prefix}${name}${suffix}`;
118
- const config = this.appConfigService.config;
119
- config.removePlugin(fullName);
120
- await config.save();
114
+ this.appConfigService.removePlugin(fullName);
115
+ this.appConfigService.save();
121
116
  console.info(`Plugin ${fullName} deactivated`);
122
117
  }
123
118
  async import(name) {
@@ -125,11 +120,10 @@ let PluginService = class PluginService {
125
120
  return new makes_1.Plugin(type);
126
121
  }
127
122
  async update() {
128
- const config = this.appConfigService.config;
129
- if (!config.plugins) {
123
+ if (this.appConfigService.plugins.length === 0) {
130
124
  return;
131
125
  }
132
- for (const plugin of config.plugins) {
126
+ for (const plugin of this.appConfigService.plugins) {
133
127
  console.info(`Checking ${plugin.name}...`);
134
128
  try {
135
129
  const current = await this.getCurrentVersion(plugin.name);
@@ -165,8 +159,8 @@ let PluginService = class PluginService {
165
159
  exports.PluginService = PluginService;
166
160
  exports.PluginService = PluginService = __decorate([
167
161
  (0, core_1.Injectable)(),
168
- __metadata("design:paramtypes", [AppConfigService_1.AppConfigService,
162
+ __metadata("design:paramtypes", [core_1.AppConfigService,
169
163
  NpmService_1.NpmService,
170
- LogService_1.LogService,
164
+ core_1.LogService,
171
165
  core_1.Cli])
172
166
  ], PluginService);
@@ -0,0 +1 @@
1
+ export declare const followProgress2: (stream: NodeJS.ReadableStream) => Promise<void>;
@@ -0,0 +1,63 @@
1
+ "use strict";
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
+ exports.followProgress2 = void 0;
7
+ const protobufjs_1 = __importDefault(require("protobufjs"));
8
+ const yoctocolors_cjs_1 = __importDefault(require("yoctocolors-cjs"));
9
+ const env_1 = require("../env");
10
+ const followProgress2 = async (stream) => {
11
+ const root = await protobufjs_1.default.load([
12
+ `${env_1.ROOT_DIR}/proto/solver/pb/ops.proto`,
13
+ `${env_1.ROOT_DIR}/proto/buildkit.proto`
14
+ ]);
15
+ const StatusResponse = root.lookupType("moby.buildkit.v1.StatusResponse");
16
+ return new Promise((resolve, reject) => {
17
+ let isEnded = false;
18
+ let success = 0, error = 0;
19
+ const handleEnd = () => {
20
+ if (!isEnded) {
21
+ isEnded = true;
22
+ console.log(`success: ${success} errors: ${error}`);
23
+ resolve();
24
+ return;
25
+ }
26
+ };
27
+ stream.on("data", (data) => {
28
+ const content = data.toString().replace(/}\s*\{/g, '},{'), items = JSON.parse(`[${content}]`);
29
+ for (const item of items) {
30
+ switch (item.id) {
31
+ case "moby.buildkit.trace": {
32
+ if (!item.aux) {
33
+ break;
34
+ }
35
+ let buffer = Buffer.from(item.aux, "base64");
36
+ try {
37
+ const decoded = StatusResponse.decode(buffer);
38
+ const obj = StatusResponse.toObject(decoded, {
39
+ enums: String,
40
+ longs: String,
41
+ bytes: String,
42
+ defaults: true,
43
+ });
44
+ console.dir(obj, { depth: null });
45
+ success++;
46
+ }
47
+ catch (err) {
48
+ error++;
49
+ console.error(yoctocolors_cjs_1.default.red(`Error: ${err.message}`));
50
+ }
51
+ break;
52
+ }
53
+ default:
54
+ break;
55
+ }
56
+ }
57
+ });
58
+ stream.on("end", handleEnd);
59
+ stream.on("close", handleEnd);
60
+ stream.on("error", reject);
61
+ });
62
+ };
63
+ exports.followProgress2 = followProgress2;
@@ -1,7 +1,6 @@
1
1
  export * from "./escapeRegExp";
2
2
  export * from "./exec";
3
- export * from "./followProgress";
4
- export * from "./format-size-units";
3
+ export * from "./followProgress2";
5
4
  export * from "./get-cursor-position";
6
5
  export * from "./injectVariables";
7
6
  export * from "./parse-table";
@@ -16,8 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./escapeRegExp"), exports);
18
18
  __exportStar(require("./exec"), exports);
19
- __exportStar(require("./followProgress"), exports);
20
- __exportStar(require("./format-size-units"), exports);
19
+ __exportStar(require("./followProgress2"), exports);
21
20
  __exportStar(require("./get-cursor-position"), exports);
22
21
  __exportStar(require("./injectVariables"), exports);
23
22
  __exportStar(require("./parse-table"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wocker/ws",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "author": "Kris Papercut <krispcut@gmail.com>",
5
5
  "description": "Docker workspace for web projects",
6
6
  "license": "MIT",
@@ -33,20 +33,19 @@
33
33
  "make-coverage-badge": "make-coverage-badge"
34
34
  },
35
35
  "dependencies": {
36
- "@wocker/core": "1.0.22",
37
- "@wocker/utils": "^2.0.0",
36
+ "@wocker/core": "1.0.24",
37
+ "@wocker/utils": "^2.0.3",
38
38
  "async-mutex": "^0.4.0",
39
39
  "axios": "^1.6.7",
40
40
  "child_process": "^1.0.2",
41
41
  "cli-table3": "^0.6.2",
42
- "date-fns": "^2.29.3",
43
42
  "dockerode": "^4.0.2",
44
43
  "fs": "^0.0.1-security",
45
44
  "keytar": "^7.9.0",
46
45
  "md5": "^2.3.0",
47
46
  "os": "^0.1.2",
48
47
  "path": "^0.12.7",
49
- "readable-stream": "^4.1.0",
48
+ "protobufjs": "^7.5.1",
50
49
  "unzipper": "^0.12.3",
51
50
  "yoctocolors-cjs": "^2.1.2"
52
51
  },
@@ -56,14 +55,14 @@
56
55
  "@types/md5": "^2.3.2",
57
56
  "@types/mute-stream": "^0.0.4",
58
57
  "@types/node": "^22.14.1",
59
- "@types/readable-stream": "^2.3.15",
60
58
  "@types/unzipper": "^0.10.10",
61
- "@wocker/testing": "^1.0.0",
59
+ "@wocker/testing": "1.0.2",
62
60
  "jest": "^29.7.0",
63
61
  "make-coverage-badge": "^1.2.0",
64
62
  "memfs": "^4.17.0",
65
63
  "ts-jest": "^29.3.2",
66
64
  "ts-node": "^10.9.2",
67
- "typescript": "^5.6.3"
65
+ "typescript": "^5.6.3",
66
+ "unionfs": "^4.5.4"
68
67
  }
69
68
  }
@@ -0,0 +1,55 @@
1
+ syntax = "proto3";
2
+
3
+ import "google/protobuf/timestamp.proto";
4
+
5
+ package moby.buildkit.v1;
6
+
7
+ message StatusResponse {
8
+ repeated Vertex vertexes = 1;
9
+ repeated VertexStatus statuses = 2;
10
+ repeated VertexLog logs = 3;
11
+ repeated VertexWarning warnings = 4;
12
+ }
13
+
14
+ message Vertex {
15
+ string digest = 1;
16
+ repeated string inputs = 2;
17
+ string name = 3;
18
+ bool cached = 4;
19
+
20
+ google.protobuf.Timestamp started = 5;
21
+ google.protobuf.Timestamp completed = 6;
22
+ string error = 7; // typed errors?
23
+ ProgressGroup progressGroup = 8;
24
+ }
25
+
26
+ message VertexStatus {
27
+ string ID = 1;
28
+ string vertex = 2;
29
+ string name = 3;
30
+ int64 current = 4;
31
+ int64 total = 5;
32
+ }
33
+
34
+ message ProgressGroup {
35
+ string id = 1;
36
+ string name = 2;
37
+ bool weak = 3;
38
+ }
39
+
40
+ message VertexLog {
41
+ string vertex = 1;
42
+ google.protobuf.Timestamp timestamp = 2;
43
+ int64 stream = 3;
44
+ bytes msg = 4;
45
+ }
46
+
47
+ message VertexWarning {
48
+ string vertex = 1;
49
+ int64 level = 2;
50
+ bytes short = 3;
51
+ repeated bytes detail = 4;
52
+ string url = 5;
53
+ pb.SourceInfo info = 6;
54
+ repeated pb.Range ranges = 7;
55
+ }