@platforma-sdk/bootstrap 2.5.9 → 2.6.0
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.
- package/dist/block.d.ts +5 -0
- package/dist/block.d.ts.map +1 -1
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +528 -465
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Flags as y, Command as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { execSync as
|
|
9
|
-
import
|
|
10
|
-
import { randomBytes as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
1
|
+
var ir = Object.defineProperty;
|
|
2
|
+
var sr = (a, e, r) => e in a ? ir(a, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[e] = r;
|
|
3
|
+
var h = (a, e, r) => sr(a, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { Flags as y, Command as E } from "@oclif/core";
|
|
5
|
+
import L from "node:os";
|
|
6
|
+
import d, { createWriteStream as cr } from "node:fs";
|
|
7
|
+
import o, { resolve as nr } from "node:path";
|
|
8
|
+
import { execSync as Ge, spawn as lr, spawnSync as q } from "node:child_process";
|
|
9
|
+
import z from "winston";
|
|
10
|
+
import { randomBytes as or } from "node:crypto";
|
|
11
|
+
import M from "readline-sync";
|
|
12
|
+
import * as T from "node:fs/promises";
|
|
13
|
+
import { Writable as dr } from "node:stream";
|
|
14
|
+
import { z as O } from "zod";
|
|
15
|
+
import gr from "decompress";
|
|
16
|
+
import je from "yaml";
|
|
17
|
+
import { getDefaultPlVersion as Z } from "@milaboratories/pl-local";
|
|
18
|
+
import ur from "node:https";
|
|
19
|
+
import * as fr from "tar";
|
|
20
|
+
const F = {
|
|
20
21
|
"log-level": y.string({
|
|
21
22
|
description: "logging level",
|
|
22
23
|
default: "info",
|
|
23
24
|
options: ["error", "warn", "info", "debug"],
|
|
24
25
|
required: !1
|
|
25
26
|
})
|
|
26
|
-
},
|
|
27
|
+
}, Je = {
|
|
27
28
|
image: y.string({
|
|
28
29
|
description: "use custom docker image to run platforma"
|
|
29
30
|
})
|
|
30
|
-
},
|
|
31
|
+
}, ee = {
|
|
31
32
|
version: y.string({
|
|
32
33
|
description: "use custom platforma release (official docker image or binary package)"
|
|
33
34
|
})
|
|
34
|
-
},
|
|
35
|
+
}, re = {
|
|
35
36
|
license: y.string({
|
|
36
37
|
description: 'pass a license code. The license can be got from "https://licensing.milaboratories.com".'
|
|
37
38
|
}),
|
|
@@ -39,7 +40,7 @@ const T = {
|
|
|
39
40
|
exists: !0,
|
|
40
41
|
description: "specify a path to the file with a license. The license can be got from 'https://licensing.milaboratories.com'."
|
|
41
42
|
})
|
|
42
|
-
},
|
|
43
|
+
}, te = {
|
|
43
44
|
"grpc-port": y.integer({
|
|
44
45
|
description: "port for Platforma Backend gRPC API. Default is 6345",
|
|
45
46
|
env: "PLATFORMA_GRPC_PORT"
|
|
@@ -64,7 +65,7 @@ const T = {
|
|
|
64
65
|
description: "full listen addr for Platforma Backend debug API. Default is 127.0.0.1:9091",
|
|
65
66
|
env: "PLATFORMA_DEBUG_LISTEN"
|
|
66
67
|
})
|
|
67
|
-
},
|
|
68
|
+
}, mr = {
|
|
68
69
|
"s3-address-port": y.integer({
|
|
69
70
|
description: "port that S3 will listen, default is 9000",
|
|
70
71
|
default: 9e3,
|
|
@@ -75,27 +76,27 @@ const T = {
|
|
|
75
76
|
default: 9001,
|
|
76
77
|
env: "PLATFORMA_S3_CONSOLE_PORT"
|
|
77
78
|
})
|
|
78
|
-
},
|
|
79
|
+
}, ae = {
|
|
79
80
|
storage: y.string({
|
|
80
81
|
description: "specify path on host to be used as storage for all Platforma Backend data"
|
|
81
82
|
})
|
|
82
|
-
},
|
|
83
|
+
}, He = {
|
|
83
84
|
"pl-log-file": y.file({
|
|
84
85
|
description: "specify path for Platforma Backend log file"
|
|
85
86
|
})
|
|
86
|
-
},
|
|
87
|
+
}, Ye = {
|
|
87
88
|
"pl-workdir": y.file({
|
|
88
89
|
description: "specify working directory for Platforma Backend process"
|
|
89
90
|
})
|
|
90
|
-
},
|
|
91
|
+
}, ze = {
|
|
91
92
|
"pl-binary": y.file({
|
|
92
93
|
description: "start given Platforma Backend binary instead of automatically downloaded version"
|
|
93
94
|
})
|
|
94
|
-
},
|
|
95
|
+
}, Ke = {
|
|
95
96
|
"pl-sources": y.file({
|
|
96
97
|
description: "path to pl repository root: build Platforma Backend from sources and start the resulting binary"
|
|
97
98
|
})
|
|
98
|
-
},
|
|
99
|
+
}, qe = {
|
|
99
100
|
config: y.string({
|
|
100
101
|
description: "use custom Platforma Backend config"
|
|
101
102
|
})
|
|
@@ -103,7 +104,7 @@ const T = {
|
|
|
103
104
|
y.file({
|
|
104
105
|
description: "specify path on host to be used as 'primary' storage"
|
|
105
106
|
});
|
|
106
|
-
const
|
|
107
|
+
const he = {
|
|
107
108
|
"storage-work": y.file({
|
|
108
109
|
description: "specify path on host to be used as 'work' storage"
|
|
109
110
|
})
|
|
@@ -111,7 +112,7 @@ const ue = {
|
|
|
111
112
|
y.file({
|
|
112
113
|
description: "specify path on host to be used as 'library' storage"
|
|
113
114
|
});
|
|
114
|
-
const
|
|
115
|
+
const ye = {
|
|
115
116
|
"storage-primary": y.string({
|
|
116
117
|
description: `specify 'primary' storage destination URL.
|
|
117
118
|
file:/path/to/dir for directory on local FS
|
|
@@ -119,7 +120,7 @@ const fe = {
|
|
|
119
120
|
s3e://<endpoint>/<bucket>/?region=<name> for bucket behind custom endpoint via http
|
|
120
121
|
s3es://<endpoint>/<bucket>/?region=<name> for bucket behind custom endpoint via https`
|
|
121
122
|
})
|
|
122
|
-
},
|
|
123
|
+
}, Pe = {
|
|
123
124
|
"storage-library": y.string({
|
|
124
125
|
description: `specify 'library' storage destination URL.
|
|
125
126
|
file:/path/to/dir for directory on local FS
|
|
@@ -127,163 +128,225 @@ const fe = {
|
|
|
127
128
|
s3e://<endpoint>/<bucket>/?region=<name> for bucket behind custom endpoint via http
|
|
128
129
|
s3es://<endpoint>/<bucket>/?region=<name> for bucket behind custom endpoint via https`
|
|
129
130
|
})
|
|
130
|
-
},
|
|
131
|
+
}, hr = {
|
|
131
132
|
"auth-enabled": y.boolean({
|
|
132
133
|
description: "enable authorization"
|
|
133
134
|
})
|
|
134
|
-
},
|
|
135
|
+
}, yr = {
|
|
135
136
|
"auth-htpasswd-file": y.file({
|
|
136
137
|
description: "path to .htpasswd file with Platforma users (static user DB auth source)"
|
|
137
138
|
})
|
|
138
|
-
},
|
|
139
|
+
}, Pr = {
|
|
139
140
|
"auth-ldap-server": y.string({
|
|
140
141
|
description: "address of LDAP server to use for auth in Platforma (auth source)"
|
|
141
142
|
})
|
|
142
|
-
},
|
|
143
|
+
}, br = {
|
|
143
144
|
"auth-ldap-default-dn": y.string({
|
|
144
145
|
description: "DN to use when checking user with LDAP bind operation: e.g. cn=%u,ou=users,dc=example,dc=com"
|
|
145
146
|
})
|
|
146
|
-
},
|
|
147
|
-
...
|
|
148
|
-
...
|
|
149
|
-
...
|
|
150
|
-
...
|
|
147
|
+
}, ie = {
|
|
148
|
+
...hr,
|
|
149
|
+
...yr,
|
|
150
|
+
...Pr,
|
|
151
|
+
...br
|
|
151
152
|
};
|
|
152
|
-
function
|
|
153
|
-
return
|
|
153
|
+
function wr(a) {
|
|
154
|
+
return M.question(`${a} [y/N] `).toLowerCase() === "y";
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
+
function V(a) {
|
|
156
157
|
throw new Error("this should never happen");
|
|
157
158
|
}
|
|
158
|
-
function
|
|
159
|
-
return
|
|
159
|
+
function D(a = "debug") {
|
|
160
|
+
return z.createLogger({
|
|
160
161
|
level: a,
|
|
161
|
-
format:
|
|
162
|
-
|
|
162
|
+
format: z.format.combine(
|
|
163
|
+
z.format.printf(({ level: e, message: r }) => {
|
|
163
164
|
const t = " ".repeat(e.length + 2), i = r.split(`
|
|
164
165
|
`).map((c, n) => n === 0 ? c : t + c).join(`
|
|
165
166
|
`);
|
|
166
|
-
return `${((c) =>
|
|
167
|
+
return `${((c) => z.format.colorize().colorize(c, c))(e)}: ${i}`;
|
|
167
168
|
})
|
|
168
169
|
),
|
|
169
170
|
transports: [
|
|
170
|
-
new
|
|
171
|
+
new z.transports.Console({
|
|
171
172
|
stderrLevels: ["error", "warn", "info", "debug"],
|
|
172
173
|
handleExceptions: !0
|
|
173
174
|
})
|
|
174
175
|
]
|
|
175
176
|
});
|
|
176
177
|
}
|
|
177
|
-
function
|
|
178
|
-
return
|
|
178
|
+
function vr(a) {
|
|
179
|
+
return or(Math.ceil(a / 2)).toString("hex").slice(0, a);
|
|
179
180
|
}
|
|
180
|
-
function
|
|
181
|
-
return a.startsWith("~") ?
|
|
181
|
+
function kr(a) {
|
|
182
|
+
return a.startsWith("~") ? o.join(L.homedir(), a.slice(1)) : a;
|
|
182
183
|
}
|
|
183
|
-
function
|
|
184
|
-
|
|
184
|
+
function X(a, e) {
|
|
185
|
+
d.existsSync(a) || (d.mkdirSync(a, { recursive: !0 }), e != null && e.mode && d.chmodSync(a, e.mode));
|
|
185
186
|
}
|
|
186
|
-
function
|
|
187
|
+
function Sr(a) {
|
|
187
188
|
try {
|
|
188
|
-
if (
|
|
189
|
-
return
|
|
190
|
-
const e = `wmic process where processid=${a} get Caption`, r =
|
|
189
|
+
if (L.platform() !== "win32")
|
|
190
|
+
return Ge(`ps -p ${a} -o comm=`, { encoding: "utf8" }).trim();
|
|
191
|
+
const e = `wmic process where processid=${a} get Caption`, r = Ge(e, { encoding: "utf8" }).split(`
|
|
191
192
|
`);
|
|
192
193
|
return r.length <= 1 ? "" : r[1].trim();
|
|
193
194
|
} catch {
|
|
194
195
|
return "";
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
|
-
const
|
|
198
|
-
npmOrgName:
|
|
199
|
-
orgName:
|
|
200
|
-
blockName:
|
|
198
|
+
const ce = ["Python"], Ve = ["Tengo", "Python"], Ar = O.union([O.literal("Tengo"), O.literal("Python")]), pr = O.object({
|
|
199
|
+
npmOrgName: O.string().min(1),
|
|
200
|
+
orgName: O.string().min(1),
|
|
201
|
+
blockName: O.string().min(1),
|
|
202
|
+
softwarePlatforms: O.array(Ar).refine((a) => new Set(a).size === a.length, {
|
|
203
|
+
message: "Must be an array of unique software platforms"
|
|
204
|
+
})
|
|
201
205
|
});
|
|
202
|
-
async function
|
|
203
|
-
const e =
|
|
204
|
-
a.info("Downloading boilerplate code..."), await
|
|
206
|
+
async function Rr(a) {
|
|
207
|
+
const { npmOrgName: e, orgName: r, blockName: t, softwarePlatforms: i } = Lr(), s = o.join(process.cwd(), t);
|
|
208
|
+
a.info("Downloading boilerplate code..."), await _r(
|
|
209
|
+
// 'https://github.com/milaboratory/platforma-block-boilerplate/archive/refs/heads/software_platforms.zip',
|
|
210
|
+
// 'platforma-block-boilerplate-software_platforms',
|
|
205
211
|
"https://github.com/milaboratory/platforma-block-boilerplate/archive/refs/heads/main.zip",
|
|
206
212
|
"platforma-block-boilerplate-main",
|
|
207
|
-
|
|
208
|
-
)
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
s
|
|
214
|
+
);
|
|
215
|
+
const c = Ve.filter((u) => i.indexOf(u) < 0), n = ce.length == c.length;
|
|
216
|
+
a.info(`Keep platforms '${i}', remove: '${c}'. Will remove all platforms? ${n}`);
|
|
217
|
+
for (const u of c)
|
|
218
|
+
await $r(s, u);
|
|
219
|
+
n && await Or(s), a.info("Replace everything in the template with provided options..."), Tr(s, [
|
|
220
|
+
// '@' literal ensures only npm org name will be renamed,
|
|
221
|
+
// as public registry for software also is called platforma-open, but without '@'.
|
|
222
|
+
// Also, don't rename an organization for runenv-python-3 package.
|
|
223
|
+
{ from: /@platforma-open(?!.*runenv-python-3)/g, to: `@${e}` },
|
|
224
|
+
{ from: /my-org/g, to: r },
|
|
225
|
+
{ from: /block-boilerplate/g, to: t }
|
|
226
|
+
]);
|
|
216
227
|
}
|
|
217
|
-
function
|
|
218
|
-
let a =
|
|
228
|
+
function Lr() {
|
|
229
|
+
let a = M.question(
|
|
230
|
+
'Write an organization name for npm. Default is "platforma-open": '
|
|
231
|
+
);
|
|
219
232
|
a === "" && (a = "platforma-open");
|
|
220
|
-
const e =
|
|
221
|
-
|
|
233
|
+
const e = M.question('Write an organization name, e.g. "my-org": '), r = M.question('Write a name of the block, e.g. "hello-world": '), t = M.keyInYN("Create package for block's software?");
|
|
234
|
+
let i = ["Tengo"];
|
|
235
|
+
if (t)
|
|
236
|
+
for (; i.length < Ve.length; ) {
|
|
237
|
+
const s = M.keyInSelect(ce, "Choose software platform:");
|
|
238
|
+
if (s < 0) break;
|
|
239
|
+
i.push(ce[s]);
|
|
240
|
+
}
|
|
241
|
+
return i = Array.from(new Set(i)).sort(), pr.parse({ npmOrgName: a, orgName: e, blockName: r, softwarePlatforms: i });
|
|
222
242
|
}
|
|
223
|
-
async function
|
|
224
|
-
const i = await (await fetch(a)).blob(), s =
|
|
243
|
+
async function _r(a, e, r) {
|
|
244
|
+
const i = await (await fetch(a)).blob(), s = await T.mkdtemp(o.join(L.tmpdir(), "create-repo")), c = o.join(s, "packed-repo.zip"), n = dr.toWeb(cr(c));
|
|
225
245
|
await i.stream().pipeTo(n);
|
|
226
|
-
const
|
|
227
|
-
|
|
246
|
+
const u = o.join(s, "unpacked-repo");
|
|
247
|
+
await T.mkdir(u), await gr(c, u), await T.cp(o.join(u, e), r, { recursive: !0 });
|
|
228
248
|
}
|
|
229
|
-
function
|
|
230
|
-
const r =
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
249
|
+
async function $r(a, e) {
|
|
250
|
+
const r = e.toLowerCase();
|
|
251
|
+
await C(
|
|
252
|
+
o.join(a, "ui", "src", "pages", "MainPage.vue"),
|
|
253
|
+
new RegExp(`.*${r}Message.*\\n\\n`, "g")
|
|
254
|
+
), await C(
|
|
255
|
+
o.join(a, "model", "src", "index.ts"),
|
|
256
|
+
new RegExp(`.*${r}Message.*\\n\\n`, "g")
|
|
257
|
+
), await C(
|
|
258
|
+
o.join(a, "workflow", "src", "main.tpl.tengo"),
|
|
259
|
+
new RegExp(`.*${r}.*exec.builder.*[\\s\\S]*?\\n\\n`, "g")
|
|
260
|
+
), await C(
|
|
261
|
+
o.join(a, "workflow", "src", "main.tpl.tengo"),
|
|
262
|
+
new RegExp(`.*${r}Message.*\\n`, "g")
|
|
263
|
+
), await C(
|
|
264
|
+
o.join(a, "workflow", "src", "wf.test.ts"),
|
|
265
|
+
new RegExp(`.*${r}Message.*\\n.*expect.*\\n\\n`, "g")
|
|
266
|
+
), await T.rm(o.join(a, "software", `src_${r}`), { recursive: !0 }), await be(
|
|
267
|
+
o.join(a, "software", "package.json"),
|
|
268
|
+
(t) => {
|
|
269
|
+
const i = JSON.parse(t);
|
|
270
|
+
return delete i["block-software"].artifacts[`hello-${r}-artifact`], delete i["block-software"].entrypoints[`hello-world-${r}`], JSON.stringify(i, null, 2);
|
|
271
|
+
}
|
|
272
|
+
);
|
|
234
273
|
}
|
|
235
|
-
function
|
|
236
|
-
|
|
274
|
+
async function Or(a) {
|
|
275
|
+
await T.rm(o.join(a, "software"), { recursive: !0 }), await be(
|
|
276
|
+
o.join(a, "workflow", "package.json"),
|
|
277
|
+
(e) => {
|
|
278
|
+
const r = JSON.parse(e);
|
|
279
|
+
return delete r.dependencies["@platforma-open/my-org.block-boilerplate.software"], JSON.stringify(r, null, 2);
|
|
280
|
+
}
|
|
281
|
+
), await C(
|
|
282
|
+
o.join(a, "pnpm-workspace.yaml"),
|
|
283
|
+
/.*- software$\n/gm
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
async function Tr(a, e) {
|
|
287
|
+
const r = await Er(a);
|
|
288
|
+
for (const { from: t, to: i } of e)
|
|
289
|
+
for (const s of r)
|
|
290
|
+
await Qe(s, t, i);
|
|
291
|
+
}
|
|
292
|
+
async function Er(a) {
|
|
293
|
+
return (await T.readdir(a, {
|
|
237
294
|
withFileTypes: !0,
|
|
238
295
|
recursive: !0
|
|
239
|
-
}).filter((r) => r.isFile()).map((r) =>
|
|
296
|
+
})).filter((r) => r.isFile()).map((r) => o.join(r.parentPath, r.name));
|
|
297
|
+
}
|
|
298
|
+
async function be(a, e) {
|
|
299
|
+
const r = await T.readFile(a), t = e(r.toString());
|
|
300
|
+
await T.writeFile(a, t);
|
|
240
301
|
}
|
|
241
|
-
function
|
|
242
|
-
|
|
243
|
-
l.writeFileSync(a, i);
|
|
302
|
+
async function Qe(a, e, r) {
|
|
303
|
+
return await be(a, (t) => t.replaceAll(e, r));
|
|
244
304
|
}
|
|
245
|
-
|
|
305
|
+
async function C(a, e) {
|
|
306
|
+
return await Qe(a, e, "");
|
|
307
|
+
}
|
|
308
|
+
const B = class B extends E {
|
|
246
309
|
async run() {
|
|
247
|
-
const { flags: e } = await this.parse(
|
|
248
|
-
await
|
|
310
|
+
const { flags: e } = await this.parse(B), r = D(e["log-level"]);
|
|
311
|
+
await Rr(r);
|
|
249
312
|
}
|
|
250
313
|
};
|
|
251
|
-
|
|
252
|
-
...
|
|
314
|
+
h(B, "description", "Helps to create a new block by downloading a block's template."), h(B, "examples", ["<%= name %>"]), h(B, "flags", {
|
|
315
|
+
...F
|
|
253
316
|
});
|
|
254
|
-
let
|
|
255
|
-
function
|
|
256
|
-
return
|
|
317
|
+
let ne = B;
|
|
318
|
+
function Xe(...a) {
|
|
319
|
+
return nr(__dirname, "..", ...a);
|
|
257
320
|
}
|
|
258
|
-
function
|
|
259
|
-
return
|
|
321
|
+
function $(...a) {
|
|
322
|
+
return Xe("assets", ...a);
|
|
260
323
|
}
|
|
261
|
-
function
|
|
262
|
-
return
|
|
324
|
+
function Fr() {
|
|
325
|
+
return d.readdirSync($()).filter((e) => e.startsWith("compose-") && e.endsWith(".yaml")).map((e) => $(e));
|
|
263
326
|
}
|
|
264
|
-
function
|
|
265
|
-
return
|
|
327
|
+
function Dr(...a) {
|
|
328
|
+
return d.readFileSync(Xe(...a));
|
|
266
329
|
}
|
|
267
|
-
function
|
|
268
|
-
return a || (a =
|
|
330
|
+
function se(a) {
|
|
331
|
+
return a || (a = Z()), `quay.io/milaboratories/platforma:${a}`;
|
|
269
332
|
}
|
|
270
|
-
const
|
|
333
|
+
const N = class N {
|
|
271
334
|
constructor(e) {
|
|
272
|
-
|
|
335
|
+
h(this, "state", {
|
|
273
336
|
lastRun: void 0,
|
|
274
337
|
isActive: !1
|
|
275
338
|
});
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
e = e ??
|
|
279
|
-
const r =
|
|
280
|
-
this.dirPath = e, this.filePath = r,
|
|
339
|
+
h(this, "filePath");
|
|
340
|
+
h(this, "dirPath");
|
|
341
|
+
e = e ?? o.resolve(L.homedir(), ".config", "pl-bootstrap");
|
|
342
|
+
const r = o.join(e, "state.json");
|
|
343
|
+
this.dirPath = e, this.filePath = r, d.existsSync(e) || d.mkdirSync(e, { recursive: !0 }), d.existsSync(r) && (this.state = JSON.parse(Dr(r).toString()));
|
|
281
344
|
}
|
|
282
345
|
static getInstance() {
|
|
283
|
-
return
|
|
346
|
+
return N.instance || (N.instance = new N()), N.instance;
|
|
284
347
|
}
|
|
285
348
|
path(...e) {
|
|
286
|
-
return
|
|
349
|
+
return o.join(this.dirPath, ...e);
|
|
287
350
|
}
|
|
288
351
|
data(...e) {
|
|
289
352
|
return this.path("data", ...e);
|
|
@@ -292,7 +355,7 @@ const F = class F {
|
|
|
292
355
|
return this.path("binaries", ...e);
|
|
293
356
|
}
|
|
294
357
|
writeState() {
|
|
295
|
-
|
|
358
|
+
d.writeFileSync(this.filePath, JSON.stringify(this.state));
|
|
296
359
|
}
|
|
297
360
|
get isActive() {
|
|
298
361
|
var e, r;
|
|
@@ -302,7 +365,7 @@ const F = class F {
|
|
|
302
365
|
var r, t;
|
|
303
366
|
if (!((t = (r = this.state.lastRun) == null ? void 0 : r.process) != null && t.pid))
|
|
304
367
|
return !1;
|
|
305
|
-
const e =
|
|
368
|
+
const e = Sr(this.state.lastRun.process.pid);
|
|
306
369
|
return e === "platforma" || e.endsWith("/platforma") || e.endsWith("\\platforma");
|
|
307
370
|
}
|
|
308
371
|
set isActive(e) {
|
|
@@ -315,64 +378,64 @@ const F = class F {
|
|
|
315
378
|
this.state.lastRun = e, this.writeState();
|
|
316
379
|
}
|
|
317
380
|
};
|
|
318
|
-
|
|
319
|
-
let
|
|
320
|
-
const
|
|
321
|
-
function
|
|
381
|
+
h(N, "instance");
|
|
382
|
+
let le = N;
|
|
383
|
+
const l = le.getInstance();
|
|
384
|
+
function Ue(a, e, r, t) {
|
|
322
385
|
var i;
|
|
323
|
-
return
|
|
324
|
-
...
|
|
386
|
+
return l.lastRun = {
|
|
387
|
+
...l.lastRun,
|
|
325
388
|
mode: "docker",
|
|
326
389
|
cmd: "docker",
|
|
327
390
|
args: e,
|
|
328
391
|
workdir: r.cwd,
|
|
329
392
|
envs: r.env,
|
|
330
393
|
docker: {
|
|
331
|
-
...(i =
|
|
394
|
+
...(i = l.lastRun) == null ? void 0 : i.docker,
|
|
332
395
|
...t
|
|
333
396
|
}
|
|
334
|
-
},
|
|
397
|
+
}, Ze(a, "docker", e, r);
|
|
335
398
|
}
|
|
336
|
-
function
|
|
399
|
+
function Nr(a, e, r, t, i) {
|
|
337
400
|
var c;
|
|
338
|
-
|
|
339
|
-
...
|
|
401
|
+
l.lastRun = {
|
|
402
|
+
...l.lastRun,
|
|
340
403
|
mode: "process",
|
|
341
404
|
cmd: e,
|
|
342
405
|
args: r,
|
|
343
406
|
workdir: t.cwd,
|
|
344
407
|
envs: t.env,
|
|
345
408
|
process: {
|
|
346
|
-
...(c =
|
|
409
|
+
...(c = l.lastRun) == null ? void 0 : c.process,
|
|
347
410
|
...i
|
|
348
411
|
}
|
|
349
412
|
};
|
|
350
|
-
const s =
|
|
351
|
-
return
|
|
352
|
-
...
|
|
413
|
+
const s = xr(a, e, r, t);
|
|
414
|
+
return l.lastRun.process = {
|
|
415
|
+
...l.lastRun.process,
|
|
353
416
|
pid: s.pid
|
|
354
417
|
}, s;
|
|
355
418
|
}
|
|
356
|
-
function
|
|
357
|
-
if (!
|
|
419
|
+
function Ir(a, e) {
|
|
420
|
+
if (!l.lastRun)
|
|
358
421
|
throw new Error("no previous run info found: this is the first run after package installation");
|
|
359
422
|
return e = {
|
|
360
|
-
cwd:
|
|
423
|
+
cwd: l.lastRun.workdir,
|
|
361
424
|
env: {
|
|
362
|
-
...
|
|
425
|
+
...l.lastRun.envs,
|
|
363
426
|
...e.env
|
|
364
427
|
},
|
|
365
428
|
...e
|
|
366
|
-
},
|
|
429
|
+
}, Ze(a, l.lastRun.cmd, l.lastRun.args, e);
|
|
367
430
|
}
|
|
368
|
-
function
|
|
431
|
+
function xr(a, e, r, t) {
|
|
369
432
|
a.debug(
|
|
370
433
|
`Running:
|
|
371
434
|
env: ${JSON.stringify(t.env)}
|
|
372
435
|
cmd: ${JSON.stringify([e, ...r])}
|
|
373
436
|
wd: ${t.cwd}`
|
|
374
437
|
), t.env = { ...process.env, ...t.env }, a.debug(" spawning child process");
|
|
375
|
-
const i =
|
|
438
|
+
const i = lr(e, r, t);
|
|
376
439
|
var s = !1;
|
|
377
440
|
const c = () => {
|
|
378
441
|
i.kill("SIGINT"), s = !0;
|
|
@@ -381,15 +444,15 @@ function Or(a, e, r, t) {
|
|
|
381
444
|
process.removeListener("SIGINT", c), s && process.exit(n);
|
|
382
445
|
}), i;
|
|
383
446
|
}
|
|
384
|
-
function
|
|
447
|
+
function Ze(a, e, r, t) {
|
|
385
448
|
return a.debug(
|
|
386
449
|
`Running:
|
|
387
450
|
env: ${JSON.stringify(t.env)}
|
|
388
451
|
cmd: ${JSON.stringify([e, ...r])}
|
|
389
452
|
wd: ${t.cwd}`
|
|
390
|
-
), t.env = { ...process.env, ...t.env },
|
|
453
|
+
), t.env = { ...process.env, ...t.env }, q(e, r, t);
|
|
391
454
|
}
|
|
392
|
-
function
|
|
455
|
+
function Mr(a) {
|
|
393
456
|
return {
|
|
394
457
|
id: a,
|
|
395
458
|
type: "S3",
|
|
@@ -407,7 +470,7 @@ function $r(a) {
|
|
|
407
470
|
uploadKeyPrefix: ""
|
|
408
471
|
};
|
|
409
472
|
}
|
|
410
|
-
function
|
|
473
|
+
function er(a) {
|
|
411
474
|
return {
|
|
412
475
|
id: a,
|
|
413
476
|
type: "FS",
|
|
@@ -415,8 +478,8 @@ function Ke(a) {
|
|
|
415
478
|
rootPath: ""
|
|
416
479
|
};
|
|
417
480
|
}
|
|
418
|
-
function
|
|
419
|
-
a =
|
|
481
|
+
function x(a, e, r) {
|
|
482
|
+
a = kr(a);
|
|
420
483
|
const t = new URL(a, `file:${e}`);
|
|
421
484
|
switch (t.protocol) {
|
|
422
485
|
case "s3:":
|
|
@@ -460,24 +523,24 @@ function N(a, e, r) {
|
|
|
460
523
|
throw new Error(`storage protocol '${t.protocol}' is not supported`);
|
|
461
524
|
}
|
|
462
525
|
}
|
|
463
|
-
function
|
|
464
|
-
var
|
|
465
|
-
const r = (e == null ? void 0 : e.localRoot) ??
|
|
466
|
-
level: ((
|
|
526
|
+
function Cr(a, e) {
|
|
527
|
+
var g, b, v, S, p, k, _, Y, A, we, ve, ke, Se, Ae, pe, Re, Le, _e, $e, Oe, Te, Ee, Fe, De, Ne, Ie, xe, Me, Ce, Be;
|
|
528
|
+
const r = (e == null ? void 0 : e.localRoot) ?? l.data("local-custom"), t = {
|
|
529
|
+
level: ((g = e == null ? void 0 : e.log) == null ? void 0 : g.level) ?? "info",
|
|
467
530
|
path: ((b = e == null ? void 0 : e.log) == null ? void 0 : b.path) ?? `${r}/platforma.log`
|
|
468
531
|
}, i = {
|
|
469
|
-
listen: ((
|
|
532
|
+
listen: ((v = e == null ? void 0 : e.grpc) == null ? void 0 : v.listen) ?? "localhost:6345",
|
|
470
533
|
tls: {
|
|
471
|
-
enable:
|
|
472
|
-
clientAuthMode: ((
|
|
473
|
-
certFile: ((A = (
|
|
474
|
-
keyFile: ((
|
|
475
|
-
...(
|
|
534
|
+
enable: Q((p = (S = e == null ? void 0 : e.grpc) == null ? void 0 : S.tls) == null ? void 0 : p.enable, !1),
|
|
535
|
+
clientAuthMode: ((_ = (k = e == null ? void 0 : e.grpc) == null ? void 0 : k.tls) == null ? void 0 : _.clientAuthMode) ?? "NoAuth",
|
|
536
|
+
certFile: ((A = (Y = e == null ? void 0 : e.grpc) == null ? void 0 : Y.tls) == null ? void 0 : A.certFile) ?? `${r}/certs/tls.cert`,
|
|
537
|
+
keyFile: ((ve = (we = e == null ? void 0 : e.grpc) == null ? void 0 : we.tls) == null ? void 0 : ve.keyFile) ?? `${r}/certs/tls.key`,
|
|
538
|
+
...(ke = e == null ? void 0 : e.grpc) == null ? void 0 : ke.tls
|
|
476
539
|
}
|
|
477
540
|
}, s = {
|
|
478
541
|
auth: {
|
|
479
|
-
enabled: ((
|
|
480
|
-
drivers: ((
|
|
542
|
+
enabled: ((Ae = (Se = e == null ? void 0 : e.core) == null ? void 0 : Se.auth) == null ? void 0 : Ae.enabled) ?? !1,
|
|
543
|
+
drivers: ((Re = (pe = e == null ? void 0 : e.core) == null ? void 0 : pe.auth) == null ? void 0 : Re.drivers) ?? [
|
|
481
544
|
{ driver: "jwt", key: a },
|
|
482
545
|
{ driver: "htpasswd", path: `${r}/users.htpasswd` }
|
|
483
546
|
]
|
|
@@ -485,35 +548,35 @@ function Tr(a, e) {
|
|
|
485
548
|
db: {
|
|
486
549
|
path: `${r}/db`
|
|
487
550
|
}
|
|
488
|
-
}, c =
|
|
551
|
+
}, c = We(
|
|
489
552
|
"main",
|
|
490
553
|
`${r}/storages/main`,
|
|
491
554
|
"main-bucket",
|
|
492
|
-
(
|
|
555
|
+
(Le = e == null ? void 0 : e.storages) == null ? void 0 : Le.primary
|
|
493
556
|
);
|
|
494
557
|
var n;
|
|
495
|
-
switch ((
|
|
558
|
+
switch (($e = (_e = e == null ? void 0 : e.storages) == null ? void 0 : _e.work) == null ? void 0 : $e.type) {
|
|
496
559
|
case void 0:
|
|
497
560
|
case "FS":
|
|
498
|
-
n =
|
|
561
|
+
n = er("work"), n.rootPath = ((Te = (Oe = e == null ? void 0 : e.storages) == null ? void 0 : Oe.work) == null ? void 0 : Te.rootPath) ?? `${r}/storages/work`, n.indexCachePeriod = ((Fe = (Ee = e == null ? void 0 : e.storages) == null ? void 0 : Ee.work) == null ? void 0 : Fe.indexCachePeriod) ?? "1m";
|
|
499
562
|
break;
|
|
500
563
|
default:
|
|
501
564
|
throw new Error("work storage MUST have 'FS' type as it is used for working directories management");
|
|
502
565
|
}
|
|
503
|
-
const
|
|
566
|
+
const m = We(
|
|
504
567
|
"library",
|
|
505
568
|
`${r}/storages/library`,
|
|
506
569
|
"library-bucket",
|
|
507
|
-
(
|
|
508
|
-
),
|
|
509
|
-
enabled:
|
|
510
|
-
listen: ((
|
|
511
|
-
},
|
|
512
|
-
enabled:
|
|
513
|
-
listen: ((
|
|
570
|
+
(De = e == null ? void 0 : e.storages) == null ? void 0 : De.library
|
|
571
|
+
), f = {
|
|
572
|
+
enabled: Q((Ne = e == null ? void 0 : e.monitoring) == null ? void 0 : Ne.enabled, !0),
|
|
573
|
+
listen: ((Ie = e == null ? void 0 : e.monitoring) == null ? void 0 : Ie.listen) ?? "127.0.0.1:9090"
|
|
574
|
+
}, w = {
|
|
575
|
+
enabled: Q((xe = e == null ? void 0 : e.debug) == null ? void 0 : xe.enabled, !0),
|
|
576
|
+
listen: ((Me = e == null ? void 0 : e.debug) == null ? void 0 : Me.listen) ?? "127.0.0.1:9091"
|
|
514
577
|
}, P = {
|
|
515
|
-
value: ((
|
|
516
|
-
file: ((
|
|
578
|
+
value: ((Ce = e == null ? void 0 : e.license) == null ? void 0 : Ce.value) ?? "",
|
|
579
|
+
file: ((Be = e == null ? void 0 : e.license) == null ? void 0 : Be.file) ?? ""
|
|
517
580
|
};
|
|
518
581
|
return {
|
|
519
582
|
localRoot: r,
|
|
@@ -521,31 +584,31 @@ function Tr(a, e) {
|
|
|
521
584
|
log: t,
|
|
522
585
|
grpc: i,
|
|
523
586
|
core: s,
|
|
524
|
-
monitoring:
|
|
525
|
-
debug:
|
|
526
|
-
storages: { primary: c, work: n, library:
|
|
587
|
+
monitoring: f,
|
|
588
|
+
debug: w,
|
|
589
|
+
storages: { primary: c, work: n, library: m },
|
|
527
590
|
hacks: { libraryDownloadable: !0 }
|
|
528
591
|
};
|
|
529
592
|
}
|
|
530
|
-
function
|
|
593
|
+
function We(a, e, r, t) {
|
|
531
594
|
var i;
|
|
532
595
|
switch (t == null ? void 0 : t.type) {
|
|
533
596
|
case void 0:
|
|
534
597
|
case "FS":
|
|
535
|
-
i =
|
|
598
|
+
i = er(a), i.rootPath = (t == null ? void 0 : t.rootPath) ?? e;
|
|
536
599
|
break;
|
|
537
600
|
case "S3":
|
|
538
|
-
i =
|
|
601
|
+
i = Mr(a), i.endpoint = (t == null ? void 0 : t.endpoint) ?? "http://localhost:9000", i.presignEndpoint = (t == null ? void 0 : t.presignEndpoint) ?? "http://localhost:9000", i.bucketName = (t == null ? void 0 : t.bucketName) ?? r, i.createBucket = Q(t == null ? void 0 : t.createBucket, !0), i.forcePathStyle = Q(t == null ? void 0 : t.forcePathStyle, !0), i.key = (t == null ? void 0 : t.key) ?? "", i.secret = (t == null ? void 0 : t.secret) ?? "", i.keyPrefix = (t == null ? void 0 : t.keyPrefix) ?? "", i.accessPrefixes = (t == null ? void 0 : t.accessPrefixes) ?? [""], i.uploadKeyPrefix = (t == null ? void 0 : t.uploadKeyPrefix) ?? "";
|
|
539
602
|
break;
|
|
540
603
|
default:
|
|
541
|
-
throw
|
|
604
|
+
throw V(), new Error("unknown storage type");
|
|
542
605
|
}
|
|
543
606
|
return i;
|
|
544
607
|
}
|
|
545
|
-
function
|
|
608
|
+
function Br(a) {
|
|
546
609
|
const e = a.monitoring.enabled ? "" : " disabled", r = a.debug.enabled ? "" : " disabled", t = a.hacks.libraryDownloadable ? "true" : "false";
|
|
547
610
|
var i = a.license.value;
|
|
548
|
-
return a.license.file != "" && (i =
|
|
611
|
+
return a.license.file != "" && (i = d.readFileSync(a.license.file).toString().trimEnd()), `
|
|
549
612
|
license:
|
|
550
613
|
value: '${a.license.value}'
|
|
551
614
|
file: '${a.license.file}'
|
|
@@ -617,12 +680,12 @@ controllers:
|
|
|
617
680
|
workflows: {}
|
|
618
681
|
`;
|
|
619
682
|
}
|
|
620
|
-
function
|
|
683
|
+
function Q(a, e) {
|
|
621
684
|
return a === void 0 ? e : a;
|
|
622
685
|
}
|
|
623
|
-
const
|
|
624
|
-
function
|
|
625
|
-
const e =
|
|
686
|
+
const Gr = ["linux", "macos", "windows"];
|
|
687
|
+
function jr(a) {
|
|
688
|
+
const e = L.platform();
|
|
626
689
|
switch (e) {
|
|
627
690
|
case "darwin":
|
|
628
691
|
return "macos";
|
|
@@ -632,13 +695,13 @@ function Dr(a) {
|
|
|
632
695
|
return "windows";
|
|
633
696
|
default:
|
|
634
697
|
throw new Error(
|
|
635
|
-
`operating system '${e}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` + JSON.stringify(
|
|
698
|
+
`operating system '${e}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` + JSON.stringify(Gr)
|
|
636
699
|
);
|
|
637
700
|
}
|
|
638
701
|
}
|
|
639
|
-
const
|
|
640
|
-
function
|
|
641
|
-
const e =
|
|
702
|
+
const Ur = ["amd64", "arm64"];
|
|
703
|
+
function rr(a) {
|
|
704
|
+
const e = L.arch();
|
|
642
705
|
switch (e) {
|
|
643
706
|
case "arm64":
|
|
644
707
|
return "arm64";
|
|
@@ -646,108 +709,108 @@ function qe(a) {
|
|
|
646
709
|
return "amd64";
|
|
647
710
|
default:
|
|
648
711
|
throw new Error(
|
|
649
|
-
`processor architecture '${e}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` + JSON.stringify(
|
|
712
|
+
`processor architecture '${e}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` + JSON.stringify(Ur)
|
|
650
713
|
);
|
|
651
714
|
}
|
|
652
715
|
}
|
|
653
|
-
function
|
|
654
|
-
const r = (e == null ? void 0 : e.version) ??
|
|
655
|
-
if (
|
|
716
|
+
function Wr(a, e) {
|
|
717
|
+
const r = (e == null ? void 0 : e.version) ?? Z(), t = (e == null ? void 0 : e.showProgress) ?? process.stdout.isTTY, i = `pl-${r}-${rr()}.tgz`, s = (e == null ? void 0 : e.downloadURL) ?? `https://cdn.platforma.bio/software/pl/${jr()}/${i}`, c = (e == null ? void 0 : e.saveTo) ?? l.binaries(i);
|
|
718
|
+
if (d.existsSync(c))
|
|
656
719
|
return a.info(`Platforma Backend archive download skipped: '${c}' already exists`), Promise.resolve(c);
|
|
657
|
-
|
|
720
|
+
d.mkdirSync(o.dirname(c), { recursive: !0 }), a.info(`Downloading Platforma Backend archive:
|
|
658
721
|
URL: ${s}
|
|
659
722
|
Save to: ${c}`);
|
|
660
|
-
const n =
|
|
661
|
-
return new Promise((
|
|
662
|
-
n.on("response", (
|
|
663
|
-
if (!
|
|
723
|
+
const n = ur.get(s);
|
|
724
|
+
return new Promise((u, m) => {
|
|
725
|
+
n.on("response", (f) => {
|
|
726
|
+
if (!f.statusCode) {
|
|
664
727
|
const b = new Error("failed to download archive: no HTTP status code in response from server");
|
|
665
|
-
n.destroy(),
|
|
728
|
+
n.destroy(), m(b);
|
|
666
729
|
return;
|
|
667
730
|
}
|
|
668
|
-
if (
|
|
669
|
-
const b = new Error(`failed to download archive: ${
|
|
670
|
-
n.destroy(),
|
|
731
|
+
if (f.statusCode !== 200) {
|
|
732
|
+
const b = new Error(`failed to download archive: ${f.statusCode} ${f.statusMessage}`);
|
|
733
|
+
n.destroy(), m(b);
|
|
671
734
|
return;
|
|
672
735
|
}
|
|
673
|
-
const
|
|
736
|
+
const w = parseInt(f.headers["content-length"] || "0", 10);
|
|
674
737
|
let P = 0;
|
|
675
|
-
const
|
|
676
|
-
|
|
738
|
+
const g = d.createWriteStream(c);
|
|
739
|
+
f.pipe(g), f.on("data", (b) => {
|
|
677
740
|
P += b.length;
|
|
678
|
-
const
|
|
679
|
-
t && process.stdout.write(` downloading: ${
|
|
680
|
-
}),
|
|
681
|
-
|
|
682
|
-
}),
|
|
683
|
-
|
|
741
|
+
const v = P / w * 100;
|
|
742
|
+
t && process.stdout.write(` downloading: ${v.toFixed(2)}%\r`);
|
|
743
|
+
}), f.on("error", (b) => {
|
|
744
|
+
d.unlinkSync(c), a.error(`Failed to download Platforma Binary: ${b.message}`), n.destroy(), m(b);
|
|
745
|
+
}), g.on("finish", () => {
|
|
746
|
+
g.close(), a.info(" ... download done."), n.destroy(), u(c);
|
|
684
747
|
});
|
|
685
748
|
});
|
|
686
749
|
});
|
|
687
750
|
}
|
|
688
|
-
function
|
|
751
|
+
function Jr(a, e) {
|
|
689
752
|
a.debug("extracting archive...");
|
|
690
|
-
const r = (e == null ? void 0 : e.version) ??
|
|
753
|
+
const r = (e == null ? void 0 : e.version) ?? Z();
|
|
691
754
|
a.debug(` version: '${r}'`);
|
|
692
|
-
const t = `${
|
|
755
|
+
const t = `${ar({ version: r })}.tgz`, i = (e == null ? void 0 : e.archivePath) ?? l.binaries(t);
|
|
693
756
|
a.debug(` archive path: '${i}'`);
|
|
694
|
-
const s = (e == null ? void 0 : e.extractTo) ??
|
|
695
|
-
if (a.debug(` target dir: '${s}'`),
|
|
757
|
+
const s = (e == null ? void 0 : e.extractTo) ?? Yr(i);
|
|
758
|
+
if (a.debug(` target dir: '${s}'`), d.existsSync(s))
|
|
696
759
|
return a.info(`Platforma Backend binaries unpack skipped: '${s}' exists`), s;
|
|
697
|
-
if (!
|
|
760
|
+
if (!d.existsSync(i)) {
|
|
698
761
|
const c = `Platforma Backend binary archive not found at '${i}'`;
|
|
699
762
|
throw a.error(c), new Error(c);
|
|
700
763
|
}
|
|
701
|
-
return
|
|
764
|
+
return d.existsSync(s) || (a.debug(` creating target dir '${s}'`), d.mkdirSync(s, { recursive: !0 })), a.info(`Unpacking Platforma Backend archive:
|
|
702
765
|
Archive: ${i}
|
|
703
|
-
Target dir: ${s}`),
|
|
766
|
+
Target dir: ${s}`), fr.x({
|
|
704
767
|
file: i,
|
|
705
768
|
cwd: s,
|
|
706
769
|
gzip: !0,
|
|
707
770
|
sync: !0
|
|
708
771
|
}), a.info(" ... unpack done."), s;
|
|
709
772
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
773
|
+
function tr(a, e) {
|
|
774
|
+
return Wr(a, e).then((r) => Jr(a, { archivePath: r }));
|
|
712
775
|
}
|
|
713
|
-
function
|
|
714
|
-
return `pl-${(a == null ? void 0 : a.version) ??
|
|
776
|
+
function ar(a) {
|
|
777
|
+
return `pl-${(a == null ? void 0 : a.version) ?? Z()}-${rr()}`;
|
|
715
778
|
}
|
|
716
|
-
function
|
|
717
|
-
return
|
|
779
|
+
function Hr(a, ...e) {
|
|
780
|
+
return l.binaries(ar({ version: a }), ...e);
|
|
718
781
|
}
|
|
719
|
-
function
|
|
782
|
+
function Yr(a) {
|
|
720
783
|
const e = a.lastIndexOf(".");
|
|
721
784
|
return e === -1 ? a : a.slice(0, e);
|
|
722
785
|
}
|
|
723
|
-
class
|
|
786
|
+
class I {
|
|
724
787
|
constructor(e) {
|
|
725
788
|
this.logger = e;
|
|
726
789
|
}
|
|
727
790
|
startLast() {
|
|
728
|
-
const e =
|
|
729
|
-
|
|
791
|
+
const e = Ir(this.logger, { stdio: "inherit" });
|
|
792
|
+
K(e, "failed to bring back Platforma Backend in the last started configuration");
|
|
730
793
|
}
|
|
731
794
|
startLocal(e) {
|
|
732
|
-
var
|
|
733
|
-
const r = (e == null ? void 0 : e.binaryPath) ??
|
|
795
|
+
var u, m, f, w, P, g, b, v, S, p;
|
|
796
|
+
const r = (e == null ? void 0 : e.binaryPath) ?? Hr(e == null ? void 0 : e.version, "binaries", "platforma");
|
|
734
797
|
var t = e == null ? void 0 : e.configPath;
|
|
735
|
-
const i = (e == null ? void 0 : e.workdir) ?? (t ? process.cwd() :
|
|
798
|
+
const i = (e == null ? void 0 : e.workdir) ?? (t ? process.cwd() : l.path());
|
|
736
799
|
e != null && e.primaryURL && (e.configOptions = {
|
|
737
800
|
...e.configOptions,
|
|
738
801
|
storages: {
|
|
739
|
-
...(
|
|
740
|
-
primary:
|
|
802
|
+
...(u = e.configOptions) == null ? void 0 : u.storages,
|
|
803
|
+
primary: x(e.primaryURL, i, (f = (m = e.configOptions) == null ? void 0 : m.storages) == null ? void 0 : f.primary)
|
|
741
804
|
}
|
|
742
805
|
}), e != null && e.libraryURL && (e.configOptions = {
|
|
743
806
|
...e.configOptions,
|
|
744
807
|
storages: {
|
|
745
|
-
...(
|
|
746
|
-
library:
|
|
808
|
+
...(w = e.configOptions) == null ? void 0 : w.storages,
|
|
809
|
+
library: x(e.libraryURL, i, (g = (P = e.configOptions) == null ? void 0 : P.storages) == null ? void 0 : g.library)
|
|
747
810
|
}
|
|
748
811
|
});
|
|
749
|
-
const s =
|
|
750
|
-
this.logger.debug(" checking license..."), this.checkLicense((
|
|
812
|
+
const s = Cr(this.getLastJwt(), e == null ? void 0 : e.configOptions);
|
|
813
|
+
this.logger.debug(" checking license..."), this.checkLicense((v = (b = e == null ? void 0 : e.configOptions) == null ? void 0 : b.license) == null ? void 0 : v.value, (p = (S = e == null ? void 0 : e.configOptions) == null ? void 0 : S.license) == null ? void 0 : p.file);
|
|
751
814
|
const c = [
|
|
752
815
|
`${s.localRoot}/packages`,
|
|
753
816
|
`${s.localRoot}/packages-local`,
|
|
@@ -755,10 +818,10 @@ class D {
|
|
|
755
818
|
];
|
|
756
819
|
s.storages.primary.type === "FS" && c.push(s.storages.primary.rootPath), s.storages.library.type === "FS" && (c.push(s.storages.library.rootPath), s.hacks.libraryDownloadable = !1), s.storages.work.type === "FS" && c.push(s.storages.work.rootPath), this.logger.debug(" creating pl state directories...");
|
|
757
820
|
for (const k of c)
|
|
758
|
-
|
|
821
|
+
d.existsSync(k) || (this.logger.debug(` '${k}'`), d.mkdirSync(k, { recursive: !0 }));
|
|
759
822
|
for (const k of s.core.auth.drivers)
|
|
760
|
-
k.driver === "htpasswd" && (
|
|
761
|
-
t || (t =
|
|
823
|
+
k.driver === "htpasswd" && (d.existsSync(k.path) || (this.logger.debug(` installing default 'users.htpasswd' to ${k.path}...`), d.copyFileSync($("users.htpasswd"), k.path)));
|
|
824
|
+
t || (t = o.join(s.localRoot, "config.yaml"), this.logger.debug(` rendering configuration '${t}'...`), d.writeFileSync(t, Br(s)));
|
|
762
825
|
const n = this.renderRunInfo({
|
|
763
826
|
configPath: t,
|
|
764
827
|
dbPath: s.core.db.path,
|
|
@@ -769,7 +832,7 @@ class D {
|
|
|
769
832
|
library: s.storages.library
|
|
770
833
|
});
|
|
771
834
|
return this.logger.info(`Starting platforma:
|
|
772
|
-
${n}`),
|
|
835
|
+
${n}`), Nr(
|
|
773
836
|
this.logger,
|
|
774
837
|
r,
|
|
775
838
|
["-config", t],
|
|
@@ -789,7 +852,7 @@ ${n}`), _r(
|
|
|
789
852
|
return this.startMinio({
|
|
790
853
|
minioPort: r,
|
|
791
854
|
minioConsolePort: e == null ? void 0 : e.minioConsolePort,
|
|
792
|
-
storage: t ?
|
|
855
|
+
storage: t ? o.join(t, "minio") : void 0
|
|
793
856
|
}), this.startLocal({
|
|
794
857
|
...e,
|
|
795
858
|
primaryURL: (e == null ? void 0 : e.primaryURL) ?? `s3e://testuser:testpassword@localhost:${r}/main-bucket/?region=no-region`,
|
|
@@ -798,20 +861,20 @@ ${n}`), _r(
|
|
|
798
861
|
}
|
|
799
862
|
startMinio(e) {
|
|
800
863
|
this.logger.debug(" starting minio...");
|
|
801
|
-
var r =
|
|
864
|
+
var r = $("compose-backend.yaml");
|
|
802
865
|
const t = e != null && e.version ? `:${e.version}` : "";
|
|
803
866
|
this.logger.debug(` minio version: ${t}`);
|
|
804
867
|
const i = (e == null ? void 0 : e.image) ?? `quay.io/minio/minio${t}`;
|
|
805
868
|
this.logger.debug(` minio image: ${i}`);
|
|
806
|
-
const s = (e == null ? void 0 : e.storage) ??
|
|
807
|
-
|
|
808
|
-
const c =
|
|
809
|
-
|
|
810
|
-
const n = (e == null ? void 0 : e.minioPort) ?? 9e3,
|
|
869
|
+
const s = (e == null ? void 0 : e.storage) ?? l.data("minio");
|
|
870
|
+
X(s, { mode: "0775" });
|
|
871
|
+
const c = l.data("stub");
|
|
872
|
+
X(c);
|
|
873
|
+
const n = (e == null ? void 0 : e.minioPort) ?? 9e3, u = (e == null ? void 0 : e.minioConsolePort) ?? 9001, m = {
|
|
811
874
|
MINIO_IMAGE: i,
|
|
812
|
-
MINIO_STORAGE:
|
|
875
|
+
MINIO_STORAGE: o.resolve(s),
|
|
813
876
|
MINIO_PORT: n.toString(),
|
|
814
|
-
MINIO_CONSOLE_PORT:
|
|
877
|
+
MINIO_CONSOLE_PORT: u.toString(),
|
|
815
878
|
PL_DATA_DB_ROOT: c,
|
|
816
879
|
PL_DATA_PRIMARY_ROOT: c,
|
|
817
880
|
PL_DATA_LIBRARY_ROOT: c,
|
|
@@ -820,47 +883,47 @@ ${n}`), _r(
|
|
|
820
883
|
PL_IMAGE: "scratch"
|
|
821
884
|
};
|
|
822
885
|
this.logger.debug(" spawning child 'docker' process...");
|
|
823
|
-
const
|
|
886
|
+
const f = q(
|
|
824
887
|
"docker",
|
|
825
888
|
["compose", `--file=${r}`, "up", "--detach", "--remove-orphans", "--pull=missing", "minio"],
|
|
826
889
|
{
|
|
827
890
|
env: {
|
|
828
891
|
...process.env,
|
|
829
|
-
...
|
|
892
|
+
...m
|
|
830
893
|
},
|
|
831
894
|
stdio: "inherit"
|
|
832
895
|
}
|
|
833
896
|
);
|
|
834
|
-
|
|
897
|
+
K(f, "failed to start MinIO service in docker");
|
|
835
898
|
}
|
|
836
899
|
buildPlatforma(e) {
|
|
837
|
-
const r =
|
|
900
|
+
const r = o.resolve(e.repoRoot, "cmd", "platforma"), t = e.binPath ?? o.join(L.tmpdir(), "platforma-local-build");
|
|
838
901
|
this.logger.info("Building Platforma Backend binary from sources"), this.logger.info(` sources path: ${e.repoRoot}`), this.logger.info(` binary path: ${t}`);
|
|
839
|
-
const i =
|
|
902
|
+
const i = q("go", ["build", "-o", t, "."], {
|
|
840
903
|
cwd: r,
|
|
841
904
|
stdio: "inherit"
|
|
842
905
|
});
|
|
843
|
-
return
|
|
906
|
+
return K(i, "failed to build platforma binary from sources using 'go build' command"), t;
|
|
844
907
|
}
|
|
845
908
|
startDockerS3(e, r) {
|
|
846
|
-
const t =
|
|
909
|
+
const t = $("compose-backend.yaml"), i = (r == null ? void 0 : r.image) ?? se(r == null ? void 0 : r.version);
|
|
847
910
|
this.checkLicense(r == null ? void 0 : r.license, r == null ? void 0 : r.licenseFile);
|
|
848
|
-
const s = (S) =>
|
|
849
|
-
const
|
|
850
|
-
return
|
|
911
|
+
const s = (S) => o.join(e, S), c = (S) => {
|
|
912
|
+
const p = s(S);
|
|
913
|
+
return X(p, { mode: "0775" }), p;
|
|
851
914
|
}, n = s("platforma.log");
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
if (
|
|
915
|
+
d.existsSync(n) || (d.mkdirSync(o.dirname(n), { recursive: !0 }), d.writeFileSync(n, ""));
|
|
916
|
+
const u = x("s3e://testuser:testpassword@minio:9000/main-bucket");
|
|
917
|
+
if (u.type !== "S3")
|
|
855
918
|
throw new Error("primary storage must have 'S3' type in 'docker s3' configuration");
|
|
856
|
-
|
|
857
|
-
const
|
|
858
|
-
if (
|
|
859
|
-
throw new Error(`${
|
|
860
|
-
|
|
861
|
-
const
|
|
862
|
-
|
|
863
|
-
const
|
|
919
|
+
u.presignEndpoint = "http://localhost:9000";
|
|
920
|
+
const m = x("s3e://testuser:testpassword@minio:9000/library-bucket");
|
|
921
|
+
if (m.type !== "S3")
|
|
922
|
+
throw new Error(`${m.type} storage type is not supported for library storage`);
|
|
923
|
+
m.presignEndpoint = "http://localhost:9000";
|
|
924
|
+
const f = c("db"), w = c("work"), P = s("users.htpasswd");
|
|
925
|
+
d.existsSync(P) || d.copyFileSync($("users.htpasswd"), P);
|
|
926
|
+
const g = {
|
|
864
927
|
MINIO_IMAGE: "quay.io/minio/minio",
|
|
865
928
|
MINIO_STORAGE: c("minio"),
|
|
866
929
|
PL_IMAGE: i,
|
|
@@ -869,20 +932,20 @@ ${n}`), _r(
|
|
|
869
932
|
PL_LICENSE_FILE: r == null ? void 0 : r.licenseFile,
|
|
870
933
|
PL_LOG_LEVEL: (r == null ? void 0 : r.logLevel) ?? "info",
|
|
871
934
|
PL_LOG_FILE: n,
|
|
872
|
-
PL_DATA_DB_ROOT:
|
|
935
|
+
PL_DATA_DB_ROOT: f,
|
|
873
936
|
PL_DATA_PRIMARY_ROOT: c("primary"),
|
|
874
937
|
PL_DATA_LIBRARY_ROOT: c("library"),
|
|
875
|
-
PL_DATA_WORKDIR_ROOT:
|
|
938
|
+
PL_DATA_WORKDIR_ROOT: w,
|
|
876
939
|
PL_DATA_PACKAGE_ROOT: c("packages"),
|
|
877
|
-
...this.configureDockerStorage("primary",
|
|
878
|
-
...this.configureDockerStorage("library",
|
|
940
|
+
...this.configureDockerStorage("primary", u),
|
|
941
|
+
...this.configureDockerStorage("library", m)
|
|
879
942
|
};
|
|
880
|
-
if (r != null && r.grpcAddr && (
|
|
943
|
+
if (r != null && r.grpcAddr && (g.PL_GRPC_ADDR = r.grpcAddr), r != null && r.grpcPort && (g.PL_GRPC_PORT = r.grpcPort.toString()), r != null && r.monitoringAddr && (g.PL_MONITORING_ADDR = r.monitoringAddr), r != null && r.monitoringPort && (g.PL_MONITORING_PORT = r.monitoringPort.toString()), r != null && r.debugAddr && (g.PL_DEBUG_ADDR = r.debugAddr), r != null && r.debugPort && (g.PL_DEBUG_PORT = r.debugPort.toString()), r != null && r.auth && (r.auth.enabled && (g.PL_AUTH_ENABLED = "true"), r.auth.drivers)) {
|
|
881
944
|
for (const S of r.auth.drivers)
|
|
882
|
-
S.driver === "htpasswd" && (
|
|
883
|
-
|
|
945
|
+
S.driver === "htpasswd" && (g.PL_AUTH_HTPASSWD_PATH = o.resolve(S.path), S.path = "/etc/platforma/users.htpasswd");
|
|
946
|
+
g.PL_AUTH_DRIVERS = JSON.stringify(r.auth.drivers);
|
|
884
947
|
}
|
|
885
|
-
const b =
|
|
948
|
+
const b = Ue(
|
|
886
949
|
this.logger,
|
|
887
950
|
[
|
|
888
951
|
"compose",
|
|
@@ -895,7 +958,7 @@ ${n}`), _r(
|
|
|
895
958
|
"backend"
|
|
896
959
|
],
|
|
897
960
|
{
|
|
898
|
-
env:
|
|
961
|
+
env: g,
|
|
899
962
|
stdio: "inherit"
|
|
900
963
|
},
|
|
901
964
|
{
|
|
@@ -903,31 +966,31 @@ ${n}`), _r(
|
|
|
903
966
|
composePath: t
|
|
904
967
|
}
|
|
905
968
|
);
|
|
906
|
-
|
|
907
|
-
const
|
|
969
|
+
K(b, "failed to start Platforma Backend in Docker"), l.isActive = !0;
|
|
970
|
+
const v = this.renderRunInfo({
|
|
908
971
|
apiPort: r == null ? void 0 : r.grpcPort,
|
|
909
972
|
apiAddr: r == null ? void 0 : r.grpcAddr,
|
|
910
973
|
logPath: n,
|
|
911
|
-
primary:
|
|
912
|
-
work: { type: "FS", rootPath:
|
|
913
|
-
library:
|
|
914
|
-
dbPath:
|
|
974
|
+
primary: u,
|
|
975
|
+
work: { type: "FS", rootPath: w },
|
|
976
|
+
library: m,
|
|
977
|
+
dbPath: f
|
|
915
978
|
});
|
|
916
979
|
this.logger.info(`Started platforma:
|
|
917
|
-
${
|
|
980
|
+
${v}`);
|
|
918
981
|
}
|
|
919
982
|
startDocker(e, r) {
|
|
920
|
-
var t =
|
|
921
|
-
const i = (r == null ? void 0 : r.image) ??
|
|
983
|
+
var t = $("compose-backend.yaml");
|
|
984
|
+
const i = (r == null ? void 0 : r.image) ?? se(r == null ? void 0 : r.version);
|
|
922
985
|
this.checkLicense(r == null ? void 0 : r.license, r == null ? void 0 : r.licenseFile);
|
|
923
|
-
const s = (k) =>
|
|
924
|
-
const
|
|
925
|
-
return
|
|
986
|
+
const s = (k) => o.join(e, k), c = (k) => {
|
|
987
|
+
const _ = s(k);
|
|
988
|
+
return X(_, { mode: "0775" }), _;
|
|
926
989
|
}, n = s("platforma.log");
|
|
927
|
-
|
|
928
|
-
const
|
|
929
|
-
|
|
930
|
-
const
|
|
990
|
+
d.existsSync(n) || (d.mkdirSync(o.dirname(n), { recursive: !0 }), d.writeFileSync(n, ""));
|
|
991
|
+
const u = c("db"), m = c("primary"), f = c("library"), w = c("work"), P = s("users.htpasswd");
|
|
992
|
+
d.existsSync(P) || d.copyFileSync($("users.htpasswd"), P);
|
|
993
|
+
const g = x((r == null ? void 0 : r.primaryStorageURL) ?? `file:${m}`, "."), b = x((r == null ? void 0 : r.libraryStorageURL) ?? `file:${f}`, "."), v = {
|
|
931
994
|
MINIO_IMAGE: "quay.io/minio/minio",
|
|
932
995
|
MINIO_STORAGE: c("minio"),
|
|
933
996
|
PL_IMAGE: i,
|
|
@@ -936,87 +999,87 @@ ${w}`);
|
|
|
936
999
|
PL_LICENSE_FILE: r == null ? void 0 : r.licenseFile,
|
|
937
1000
|
PL_LOG_LEVEL: "info",
|
|
938
1001
|
PL_LOG_FILE: n,
|
|
939
|
-
PL_DATA_DB_ROOT:
|
|
940
|
-
PL_DATA_PRIMARY_ROOT:
|
|
941
|
-
PL_DATA_LIBRARY_ROOT:
|
|
942
|
-
PL_DATA_WORKDIR_ROOT:
|
|
1002
|
+
PL_DATA_DB_ROOT: u,
|
|
1003
|
+
PL_DATA_PRIMARY_ROOT: m,
|
|
1004
|
+
PL_DATA_LIBRARY_ROOT: f,
|
|
1005
|
+
PL_DATA_WORKDIR_ROOT: w,
|
|
943
1006
|
PL_DATA_PACKAGE_ROOT: c("packages"),
|
|
944
|
-
...this.configureDockerStorage("primary",
|
|
1007
|
+
...this.configureDockerStorage("primary", g),
|
|
945
1008
|
...this.configureDockerStorage("library", b)
|
|
946
1009
|
};
|
|
947
|
-
if (r != null && r.grpcAddr && (
|
|
1010
|
+
if (r != null && r.grpcAddr && (v.PL_GRPC_ADDR = r.grpcAddr), r != null && r.grpcPort && (v.PL_GRPC_PORT = r.grpcPort.toString()), r != null && r.monitoringAddr && (v.PL_MONITORING_ADDR = r.monitoringAddr), r != null && r.monitoringPort && (v.PL_MONITORING_PORT = r.monitoringPort.toString()), r != null && r.debugAddr && (v.PL_DEBUG_ADDR = r.debugAddr), r != null && r.debugPort && (v.PL_DEBUG_PORT = r.debugPort.toString()), r != null && r.auth && (r.auth.enabled && (v.PL_AUTH_ENABLED = "true"), r.auth.drivers)) {
|
|
948
1011
|
for (const k of r.auth.drivers)
|
|
949
|
-
k.driver === "htpasswd" && (
|
|
950
|
-
|
|
1012
|
+
k.driver === "htpasswd" && (v.PL_AUTH_HTPASSWD_PATH = o.resolve(k.path), k.path = "/etc/platforma/users.htpasswd");
|
|
1013
|
+
v.PL_AUTH_DRIVERS = JSON.stringify(r.auth.drivers);
|
|
951
1014
|
}
|
|
952
|
-
const S =
|
|
1015
|
+
const S = Ue(
|
|
953
1016
|
this.logger,
|
|
954
1017
|
["compose", `--file=${t}`, "up", "--detach", "--remove-orphans", "--pull=missing", "backend"],
|
|
955
1018
|
{
|
|
956
|
-
env:
|
|
1019
|
+
env: v,
|
|
957
1020
|
stdio: "inherit"
|
|
958
1021
|
},
|
|
959
1022
|
{
|
|
960
1023
|
plImage: i,
|
|
961
1024
|
composePath: t,
|
|
962
|
-
primaryPath:
|
|
963
|
-
workPath:
|
|
964
|
-
libraryPath:
|
|
1025
|
+
primaryPath: m,
|
|
1026
|
+
workPath: w,
|
|
1027
|
+
libraryPath: f
|
|
965
1028
|
}
|
|
966
1029
|
);
|
|
967
|
-
|
|
968
|
-
const
|
|
1030
|
+
K(S, "failed to start Platforma Backend in Docker"), l.isActive = !0;
|
|
1031
|
+
const p = this.renderRunInfo({
|
|
969
1032
|
apiPort: r == null ? void 0 : r.grpcPort,
|
|
970
1033
|
apiAddr: r == null ? void 0 : r.grpcAddr,
|
|
971
1034
|
logPath: n,
|
|
972
|
-
primary:
|
|
973
|
-
work: { type: "FS", rootPath:
|
|
1035
|
+
primary: g,
|
|
1036
|
+
work: { type: "FS", rootPath: w },
|
|
974
1037
|
library: b,
|
|
975
|
-
dbPath:
|
|
1038
|
+
dbPath: u
|
|
976
1039
|
});
|
|
977
1040
|
this.logger.info(`Started platforma:
|
|
978
|
-
${
|
|
1041
|
+
${p}`);
|
|
979
1042
|
}
|
|
980
1043
|
stop() {
|
|
981
|
-
if (!
|
|
1044
|
+
if (!l.isActive) {
|
|
982
1045
|
console.log("no running service detected");
|
|
983
1046
|
return;
|
|
984
1047
|
}
|
|
985
|
-
const e =
|
|
1048
|
+
const e = l.lastRun;
|
|
986
1049
|
switch (e.mode) {
|
|
987
1050
|
case "docker":
|
|
988
|
-
const r =
|
|
1051
|
+
const r = q("docker", ["compose", "--file", e.docker.composePath, "down"], {
|
|
989
1052
|
env: {
|
|
990
1053
|
...process.env,
|
|
991
1054
|
...e.envs
|
|
992
1055
|
},
|
|
993
1056
|
stdio: "inherit"
|
|
994
1057
|
});
|
|
995
|
-
|
|
1058
|
+
l.isActive = !1, r.status !== 0 && process.exit(r.status);
|
|
996
1059
|
return;
|
|
997
1060
|
case "process":
|
|
998
|
-
|
|
1061
|
+
l.isValidPID && process.kill(e.process.pid), l.isActive = !1;
|
|
999
1062
|
return;
|
|
1000
1063
|
default:
|
|
1001
|
-
|
|
1064
|
+
V(e.mode);
|
|
1002
1065
|
}
|
|
1003
1066
|
}
|
|
1004
1067
|
cleanup() {
|
|
1005
|
-
var n,
|
|
1068
|
+
var n, u, m, f, w, P, g, b, v, S, p, k, _, Y;
|
|
1006
1069
|
const e = [
|
|
1007
1070
|
"last command run cache ('pl-service start' shorthand will stop working until next full start command call)",
|
|
1008
1071
|
"'platforma' docker compose service containers and volumes"
|
|
1009
|
-
], r =
|
|
1010
|
-
if ((
|
|
1011
|
-
const A = (
|
|
1072
|
+
], r = l.data(), t = [r];
|
|
1073
|
+
if ((u = (n = l.lastRun) == null ? void 0 : n.docker) != null && u.primaryPath) {
|
|
1074
|
+
const A = (f = (m = l.lastRun) == null ? void 0 : m.docker) == null ? void 0 : f.primaryPath;
|
|
1012
1075
|
A.startsWith(r) || t.push(A);
|
|
1013
1076
|
}
|
|
1014
|
-
if ((P = (
|
|
1015
|
-
const A = (b = (
|
|
1077
|
+
if ((P = (w = l.lastRun) == null ? void 0 : w.docker) != null && P.workPath) {
|
|
1078
|
+
const A = (b = (g = l.lastRun) == null ? void 0 : g.docker) == null ? void 0 : b.workPath;
|
|
1016
1079
|
A.startsWith(r) || t.push(A);
|
|
1017
1080
|
}
|
|
1018
|
-
if ((S = (
|
|
1019
|
-
const A = (k = (
|
|
1081
|
+
if ((S = (v = l.lastRun) == null ? void 0 : v.process) != null && S.storagePath) {
|
|
1082
|
+
const A = (k = (p = l.lastRun) == null ? void 0 : p.process) == null ? void 0 : k.storagePath;
|
|
1020
1083
|
A.startsWith(r) || t.push(A);
|
|
1021
1084
|
}
|
|
1022
1085
|
const i = t.length > 0 ? ` - storages (you'll loose all projects and calculation results stored in service instances):
|
|
@@ -1029,30 +1092,30 @@ Things to be removed:
|
|
|
1029
1092
|
- `)}
|
|
1030
1093
|
${i}
|
|
1031
1094
|
`;
|
|
1032
|
-
if (this.logger.warn(s), !
|
|
1095
|
+
if (this.logger.warn(s), !wr("Are you sure?")) {
|
|
1033
1096
|
this.logger.info("Reset action was canceled");
|
|
1034
1097
|
return;
|
|
1035
1098
|
}
|
|
1036
|
-
const c = new Set(
|
|
1037
|
-
(
|
|
1099
|
+
const c = new Set(Fr());
|
|
1100
|
+
(Y = (_ = l.lastRun) == null ? void 0 : _.docker) != null && Y.composePath && c.add(l.lastRun.docker.composePath);
|
|
1038
1101
|
for (const A of c)
|
|
1039
|
-
this.logger.info(`Destroying docker compose '${A}'`), this.destroyDocker(A,
|
|
1102
|
+
this.logger.info(`Destroying docker compose '${A}'`), this.destroyDocker(A, se());
|
|
1040
1103
|
for (const A of t)
|
|
1041
|
-
this.logger.info(`Destroying '${A}'`),
|
|
1042
|
-
this.logger.info(`Destroying state dir '${
|
|
1104
|
+
this.logger.info(`Destroying '${A}'`), d.rmSync(A, { recursive: !0, force: !0 });
|
|
1105
|
+
this.logger.info(`Destroying state dir '${l.path()}'`), d.rmSync(l.path(), { recursive: !0, force: !0 }), this.logger.info(
|
|
1043
1106
|
`
|
|
1044
|
-
If you want to remove all downloaded platforma binaries, delete '${
|
|
1107
|
+
If you want to remove all downloaded platforma binaries, delete '${l.binaries()}' dir manually
|
|
1045
1108
|
`
|
|
1046
1109
|
);
|
|
1047
1110
|
}
|
|
1048
1111
|
mergeLicenseEnvs(e) {
|
|
1049
|
-
e.license === void 0 && ((process.env.MI_LICENSE ?? "") != "" ? e.license = process.env.MI_LICENSE : (process.env.PL_LICENSE ?? "") != "" && (e.license = process.env.PL_LICENSE)), e["license-file"] === void 0 && e.license === void 0 && ((process.env.MI_LICENSE_FILE ?? "") != "" ? e["license-file"] = process.env.MI_LICENSE_FILE : (process.env.PL_LICENSE_FILE ?? "") != "" ? e["license-file"] = process.env.PL_LICENSE_FILE :
|
|
1112
|
+
e.license === void 0 && ((process.env.MI_LICENSE ?? "") != "" ? e.license = process.env.MI_LICENSE : (process.env.PL_LICENSE ?? "") != "" && (e.license = process.env.PL_LICENSE)), e["license-file"] === void 0 && e.license === void 0 && ((process.env.MI_LICENSE_FILE ?? "") != "" ? e["license-file"] = process.env.MI_LICENSE_FILE : (process.env.PL_LICENSE_FILE ?? "") != "" ? e["license-file"] = process.env.PL_LICENSE_FILE : d.existsSync(o.resolve(L.homedir(), ".pl.license")) && (e["license-file"] = o.resolve(L.homedir(), ".pl.license")));
|
|
1050
1113
|
}
|
|
1051
1114
|
initAuthDriversList(e, r) {
|
|
1052
1115
|
var t = [];
|
|
1053
1116
|
if (e["auth-htpasswd-file"] && t.push({
|
|
1054
1117
|
driver: "htpasswd",
|
|
1055
|
-
path:
|
|
1118
|
+
path: o.resolve(r, e["auth-htpasswd-file"])
|
|
1056
1119
|
}), !!e["auth-ldap-server"] != !!e["auth-ldap-default-dn"])
|
|
1057
1120
|
throw new Error("LDAP auth settings require both 'server' and 'default DN' options to be set");
|
|
1058
1121
|
if (e["auth-ldap-server"] && t.push({
|
|
@@ -1064,16 +1127,16 @@ If you want to remove all downloaded platforma binaries, delete '${o.binaries()}
|
|
|
1064
1127
|
}
|
|
1065
1128
|
/** Gets the last stored JWT secret key or generates it and stores in a file. */
|
|
1066
1129
|
getLastJwt() {
|
|
1067
|
-
const e =
|
|
1130
|
+
const e = l.path("auth.jwt"), r = "utf-8";
|
|
1068
1131
|
let t = "";
|
|
1069
1132
|
try {
|
|
1070
|
-
t =
|
|
1133
|
+
t = d.readFileSync(e, { encoding: r });
|
|
1071
1134
|
} catch {
|
|
1072
1135
|
}
|
|
1073
|
-
return t == "" && (t =
|
|
1136
|
+
return t == "" && (t = vr(64), d.writeFileSync(e, t, { encoding: r })), t;
|
|
1074
1137
|
}
|
|
1075
1138
|
destroyDocker(e, r) {
|
|
1076
|
-
const t =
|
|
1139
|
+
const t = l.data("stub"), i = q("docker", ["compose", "--file", e, "down", "--volumes", "--remove-orphans"], {
|
|
1077
1140
|
env: {
|
|
1078
1141
|
...process.env,
|
|
1079
1142
|
PL_IMAGE: "scratch",
|
|
@@ -1111,13 +1174,13 @@ You can obtain the license from "https://licensing.milaboratories.com".`), new E
|
|
|
1111
1174
|
case "FS":
|
|
1112
1175
|
return t[`PL_DATA_${e}_TYPE`] = "FS", t;
|
|
1113
1176
|
default:
|
|
1114
|
-
|
|
1177
|
+
V();
|
|
1115
1178
|
}
|
|
1116
1179
|
return {};
|
|
1117
1180
|
}
|
|
1118
1181
|
renderRunInfo(e, r = 10) {
|
|
1119
|
-
var n,
|
|
1120
|
-
const t = [], i = (
|
|
1182
|
+
var n, u;
|
|
1183
|
+
const t = [], i = (m) => m.padStart(r, " ");
|
|
1121
1184
|
switch (e.configPath && t.push(`${i("config")}: ${e.configPath}`), e.apiAddr ? t.push(`${i("API")}: ${e.apiAddr}`) : e.apiPort ? t.push(`${i("API")}: 127.0.0.1:${e.apiPort.toString()}`) : t.push(`${i("API")}: 127.0.0.1:6345`), e.logPath && t.push(`${i("log")}: ${e.logPath}`), (n = e.primary) == null ? void 0 : n.type) {
|
|
1122
1185
|
case void 0:
|
|
1123
1186
|
break;
|
|
@@ -1130,9 +1193,9 @@ You can obtain the license from "https://licensing.milaboratories.com".`), new E
|
|
|
1130
1193
|
);
|
|
1131
1194
|
break;
|
|
1132
1195
|
default:
|
|
1133
|
-
|
|
1196
|
+
V();
|
|
1134
1197
|
}
|
|
1135
|
-
switch ((
|
|
1198
|
+
switch ((u = e.library) == null ? void 0 : u.type) {
|
|
1136
1199
|
case void 0:
|
|
1137
1200
|
break;
|
|
1138
1201
|
case "FS":
|
|
@@ -1144,64 +1207,64 @@ You can obtain the license from "https://licensing.milaboratories.com".`), new E
|
|
|
1144
1207
|
);
|
|
1145
1208
|
break;
|
|
1146
1209
|
default:
|
|
1147
|
-
|
|
1210
|
+
V();
|
|
1148
1211
|
}
|
|
1149
1212
|
return e.work && t.push(`${i("workdirs")}: ${e.work.rootPath}`), e.dbPath && t.push(`${i("db")}: ${e.dbPath}`), t.join(`
|
|
1150
1213
|
`);
|
|
1151
1214
|
}
|
|
1152
1215
|
readComposeFile(e) {
|
|
1153
|
-
const r =
|
|
1154
|
-
return
|
|
1216
|
+
const r = d.readFileSync(e);
|
|
1217
|
+
return je.parse(r.toString());
|
|
1155
1218
|
}
|
|
1156
1219
|
writeComposeFile(e, r) {
|
|
1157
|
-
|
|
1220
|
+
d.writeFileSync(e, je.stringify(r));
|
|
1158
1221
|
}
|
|
1159
1222
|
}
|
|
1160
|
-
function
|
|
1223
|
+
function K(a, e) {
|
|
1161
1224
|
if (a.error)
|
|
1162
1225
|
throw a.error;
|
|
1163
1226
|
const r = e ?? "failed to run command";
|
|
1164
1227
|
if (a.status !== 0)
|
|
1165
1228
|
throw new Error(`${r}, process exited with code '${a.status}'`);
|
|
1166
1229
|
}
|
|
1167
|
-
const
|
|
1230
|
+
const G = class G extends E {
|
|
1168
1231
|
async run() {
|
|
1169
|
-
const { flags: e } = await this.parse(
|
|
1170
|
-
new
|
|
1232
|
+
const { flags: e } = await this.parse(G), r = D(e["log-level"]);
|
|
1233
|
+
new I(r).cleanup();
|
|
1171
1234
|
}
|
|
1172
1235
|
};
|
|
1173
|
-
|
|
1174
|
-
...
|
|
1236
|
+
h(G, "description", "Clear service state (forget last run command, destroy docker services, volumes and so on)"), h(G, "examples", ["<%= config.bin %> <%= command.id %>"]), h(G, "flags", {
|
|
1237
|
+
...F
|
|
1175
1238
|
});
|
|
1176
|
-
let
|
|
1177
|
-
const
|
|
1239
|
+
let oe = G;
|
|
1240
|
+
const j = class j extends E {
|
|
1178
1241
|
async run() {
|
|
1179
|
-
const { flags: e } = await this.parse(
|
|
1180
|
-
new
|
|
1242
|
+
const { flags: e } = await this.parse(j), r = D(e["log-level"]);
|
|
1243
|
+
new I(r).startLast();
|
|
1181
1244
|
}
|
|
1182
1245
|
};
|
|
1183
|
-
|
|
1184
|
-
...
|
|
1246
|
+
h(j, "description", "Start last run service configuraiton"), h(j, "examples", ["<%= config.bin %> <%= command.id %>"]), h(j, "flags", {
|
|
1247
|
+
...F
|
|
1185
1248
|
});
|
|
1186
|
-
let
|
|
1187
|
-
const
|
|
1249
|
+
let de = j;
|
|
1250
|
+
const U = class U extends E {
|
|
1188
1251
|
async run() {
|
|
1189
|
-
const { flags: e } = await this.parse(
|
|
1190
|
-
new
|
|
1252
|
+
const { flags: e } = await this.parse(U), r = D(e["log-level"]);
|
|
1253
|
+
new I(r).stop();
|
|
1191
1254
|
}
|
|
1192
1255
|
};
|
|
1193
|
-
|
|
1194
|
-
...
|
|
1256
|
+
h(U, "description", "Stop platforma service"), h(U, "examples", ["<%= config.bin %> <%= command.id %>"]), h(U, "flags", {
|
|
1257
|
+
...F
|
|
1195
1258
|
});
|
|
1196
|
-
let
|
|
1197
|
-
const
|
|
1259
|
+
let ge = U;
|
|
1260
|
+
const W = class W extends E {
|
|
1198
1261
|
async run() {
|
|
1199
|
-
const { flags: e } = await this.parse(
|
|
1262
|
+
const { flags: e } = await this.parse(W), r = D(e["log-level"]), t = new I(r);
|
|
1200
1263
|
t.mergeLicenseEnvs(e);
|
|
1201
1264
|
const i = e["auth-enabled"], s = i ? {
|
|
1202
1265
|
enabled: i,
|
|
1203
1266
|
drivers: t.initAuthDriversList(e, ".")
|
|
1204
|
-
} : void 0, c = e.storage ?
|
|
1267
|
+
} : void 0, c = e.storage ? o.join(".", e.storage) : l.data("docker");
|
|
1205
1268
|
t.startDocker(c, {
|
|
1206
1269
|
primaryStorageURL: e["storage-primary"],
|
|
1207
1270
|
workStoragePath: e["storage-work"],
|
|
@@ -1220,83 +1283,83 @@ const B = class B extends $ {
|
|
|
1220
1283
|
});
|
|
1221
1284
|
}
|
|
1222
1285
|
};
|
|
1223
|
-
|
|
1224
|
-
...
|
|
1225
|
-
...ee,
|
|
1226
|
-
...Ge,
|
|
1227
|
-
...X,
|
|
1286
|
+
h(W, "description", "Run platforma backend service with 'FS' primary storage type"), h(W, "examples", ["<%= config.bin %> <%= command.id %>"]), h(W, "flags", {
|
|
1287
|
+
...F,
|
|
1228
1288
|
...te,
|
|
1229
|
-
...
|
|
1289
|
+
...Je,
|
|
1290
|
+
...ee,
|
|
1291
|
+
...ie,
|
|
1230
1292
|
...re,
|
|
1231
|
-
...
|
|
1232
|
-
...
|
|
1233
|
-
...he
|
|
1293
|
+
...ae,
|
|
1294
|
+
...ye,
|
|
1295
|
+
...he,
|
|
1296
|
+
...Pe
|
|
1234
1297
|
});
|
|
1235
|
-
let
|
|
1236
|
-
const
|
|
1298
|
+
let ue = W;
|
|
1299
|
+
const J = class J extends E {
|
|
1237
1300
|
async run() {
|
|
1238
|
-
const { flags: e } = await this.parse(
|
|
1301
|
+
const { flags: e } = await this.parse(J), r = D(e["log-level"]), t = new I(r);
|
|
1239
1302
|
t.mergeLicenseEnvs(e);
|
|
1240
|
-
const i = e["pl-workdir"] ?? ".", s = e.storage ?
|
|
1241
|
-
var
|
|
1242
|
-
e["pl-sources"] && (
|
|
1243
|
-
var
|
|
1244
|
-
e["grpc-listen"] ?
|
|
1245
|
-
var
|
|
1246
|
-
e["monitoring-listen"] ?
|
|
1303
|
+
const i = e["pl-workdir"] ?? ".", s = e.storage ? o.join(i, e.storage) : l.data("local"), c = e["pl-log-file"] ? o.join(i, e["pl-log-file"]) : void 0, n = t.initAuthDriversList(e, i), u = e["auth-enabled"] ?? n !== void 0;
|
|
1304
|
+
var m = e["pl-binary"];
|
|
1305
|
+
e["pl-sources"] && (m = t.buildPlatforma({ repoRoot: e["pl-sources"] }));
|
|
1306
|
+
var f = "127.0.0.1:6345";
|
|
1307
|
+
e["grpc-listen"] ? f = e["grpc-listen"] : e["grpc-port"] && (f = `127.0.0.1:${e["grpc-port"]}`);
|
|
1308
|
+
var w = "127.0.0.1:9090";
|
|
1309
|
+
e["monitoring-listen"] ? w = e["monitoring-listen"] : e["monitoring-port"] && (w = `127.0.0.1:${e["monitoring-port"]}`);
|
|
1247
1310
|
var P = "127.0.0.1:9091";
|
|
1248
1311
|
e["debug-listen"] ? P = e["debug-listen"] : e["debug-port"] && (P = `127.0.0.1:${e["debug-port"]}`);
|
|
1249
|
-
const
|
|
1250
|
-
binaryPath:
|
|
1312
|
+
const g = {
|
|
1313
|
+
binaryPath: m,
|
|
1251
1314
|
version: e.version,
|
|
1252
1315
|
configPath: e.config,
|
|
1253
1316
|
workdir: e["pl-workdir"],
|
|
1254
1317
|
primaryURL: e["storage-primary"],
|
|
1255
1318
|
libraryURL: e["storage-library"],
|
|
1256
1319
|
configOptions: {
|
|
1257
|
-
grpc: { listen:
|
|
1258
|
-
monitoring: { listen:
|
|
1320
|
+
grpc: { listen: f },
|
|
1321
|
+
monitoring: { listen: w },
|
|
1259
1322
|
debug: { listen: P },
|
|
1260
1323
|
license: { value: e.license, file: e["license-file"] },
|
|
1261
1324
|
log: { path: c },
|
|
1262
1325
|
localRoot: s,
|
|
1263
|
-
core: { auth: { enabled:
|
|
1326
|
+
core: { auth: { enabled: u, drivers: n } },
|
|
1264
1327
|
storages: {
|
|
1265
1328
|
work: { type: "FS", rootPath: e["storage-work"] }
|
|
1266
1329
|
}
|
|
1267
1330
|
}
|
|
1268
1331
|
};
|
|
1269
|
-
|
|
1332
|
+
g.binaryPath ? t.startLocal(g) : tr(r, { version: e.version }).then(() => t.startLocal(g)).catch(function(b) {
|
|
1270
1333
|
r.error(b.message);
|
|
1271
1334
|
});
|
|
1272
1335
|
}
|
|
1273
1336
|
};
|
|
1274
|
-
|
|
1275
|
-
...
|
|
1276
|
-
...X,
|
|
1337
|
+
h(J, "description", "Run Platforma Backend service as local process on current host (no docker container)"), h(J, "examples", ["<%= config.bin %> <%= command.id %>"]), h(J, "flags", {
|
|
1338
|
+
...F,
|
|
1277
1339
|
...ee,
|
|
1278
|
-
...
|
|
1279
|
-
...
|
|
1280
|
-
...
|
|
1281
|
-
...
|
|
1340
|
+
...te,
|
|
1341
|
+
...ze,
|
|
1342
|
+
...Ke,
|
|
1343
|
+
...qe,
|
|
1282
1344
|
...re,
|
|
1283
|
-
...
|
|
1284
|
-
...
|
|
1345
|
+
...ae,
|
|
1346
|
+
...ye,
|
|
1285
1347
|
...he,
|
|
1286
|
-
...
|
|
1287
|
-
...
|
|
1288
|
-
...
|
|
1348
|
+
...Pe,
|
|
1349
|
+
...He,
|
|
1350
|
+
...Ye,
|
|
1351
|
+
...ie
|
|
1289
1352
|
});
|
|
1290
|
-
let
|
|
1353
|
+
let fe = J;
|
|
1291
1354
|
var R;
|
|
1292
|
-
let
|
|
1355
|
+
let zr = (R = class extends E {
|
|
1293
1356
|
async run() {
|
|
1294
|
-
const { flags: e } = await this.parse(R), r =
|
|
1357
|
+
const { flags: e } = await this.parse(R), r = D(e["log-level"]), t = new I(r);
|
|
1295
1358
|
t.mergeLicenseEnvs(e);
|
|
1296
1359
|
const i = e["auth-enabled"], s = i ? {
|
|
1297
1360
|
enabled: i,
|
|
1298
1361
|
drivers: t.initAuthDriversList(e, ".")
|
|
1299
|
-
} : void 0, c = e.storage ?
|
|
1362
|
+
} : void 0, c = e.storage ? o.join(".", e.storage) : l.data("docker-s3");
|
|
1300
1363
|
t.startDockerS3(c, {
|
|
1301
1364
|
image: e.image,
|
|
1302
1365
|
version: e.version,
|
|
@@ -1311,30 +1374,30 @@ let Br = (R = class extends $ {
|
|
|
1311
1374
|
debugPort: e["debug-port"]
|
|
1312
1375
|
});
|
|
1313
1376
|
}
|
|
1314
|
-
},
|
|
1315
|
-
...
|
|
1377
|
+
}, h(R, "description", "Run platforma backend service with 'S3' primary storage type"), h(R, "examples", ["<%= config.bin %> <%= command.id %>"]), h(R, "flags", {
|
|
1378
|
+
...F,
|
|
1379
|
+
...te,
|
|
1380
|
+
...Je,
|
|
1316
1381
|
...ee,
|
|
1317
|
-
...
|
|
1318
|
-
...X,
|
|
1382
|
+
...ae,
|
|
1319
1383
|
...re,
|
|
1320
|
-
...
|
|
1321
|
-
...te
|
|
1384
|
+
...ie
|
|
1322
1385
|
}), R);
|
|
1323
|
-
const
|
|
1386
|
+
const H = class H extends E {
|
|
1324
1387
|
async run() {
|
|
1325
|
-
const { flags: e } = await this.parse(
|
|
1388
|
+
const { flags: e } = await this.parse(H), r = D(e["log-level"]), t = new I(r);
|
|
1326
1389
|
t.mergeLicenseEnvs(e);
|
|
1327
|
-
const i = e["pl-workdir"] ?? ".", s = e.storage ?
|
|
1328
|
-
var
|
|
1329
|
-
e["pl-sources"] && (
|
|
1330
|
-
var
|
|
1331
|
-
e["grpc-listen"] ?
|
|
1332
|
-
var
|
|
1333
|
-
e["monitoring-listen"] ?
|
|
1390
|
+
const i = e["pl-workdir"] ?? ".", s = e.storage ? o.join(i, e.storage) : l.data("local-s3"), c = e["pl-log-file"] ? o.join(i, e["pl-log-file"]) : void 0, n = t.initAuthDriversList(e, i), u = e["auth-enabled"] ?? n !== void 0;
|
|
1391
|
+
var m = e["pl-binary"];
|
|
1392
|
+
e["pl-sources"] && (m = t.buildPlatforma({ repoRoot: e["pl-sources"] }));
|
|
1393
|
+
var f = "127.0.0.1:6345";
|
|
1394
|
+
e["grpc-listen"] ? f = e["grpc-listen"] : e["grpc-port"] && (f = `127.0.0.1:${e["grpc-port"]}`);
|
|
1395
|
+
var w = "127.0.0.1:9090";
|
|
1396
|
+
e["monitoring-listen"] ? w = e["monitoring-listen"] : e["monitoring-port"] && (w = `127.0.0.1:${e["monitoring-port"]}`);
|
|
1334
1397
|
var P = "127.0.0.1:9091";
|
|
1335
1398
|
e["debug-listen"] ? P = e["debug-listen"] : e["debug-port"] && (P = `127.0.0.1:${e["debug-port"]}`);
|
|
1336
|
-
const
|
|
1337
|
-
binaryPath:
|
|
1399
|
+
const g = {
|
|
1400
|
+
binaryPath: m,
|
|
1338
1401
|
version: e.version,
|
|
1339
1402
|
configPath: e.config,
|
|
1340
1403
|
workdir: e["pl-workdir"],
|
|
@@ -1343,54 +1406,54 @@ const U = class U extends $ {
|
|
|
1343
1406
|
minioPort: e["s3-address-port"],
|
|
1344
1407
|
minioConsolePort: e["s3-console-address-port"],
|
|
1345
1408
|
configOptions: {
|
|
1346
|
-
grpc: { listen:
|
|
1347
|
-
monitoring: { listen:
|
|
1409
|
+
grpc: { listen: f },
|
|
1410
|
+
monitoring: { listen: w },
|
|
1348
1411
|
debug: { listen: P },
|
|
1349
1412
|
license: { value: e.license, file: e["license-file"] },
|
|
1350
1413
|
log: { path: c },
|
|
1351
1414
|
localRoot: s,
|
|
1352
1415
|
core: {
|
|
1353
|
-
auth: { enabled:
|
|
1416
|
+
auth: { enabled: u, drivers: n }
|
|
1354
1417
|
},
|
|
1355
1418
|
storages: {
|
|
1356
1419
|
work: { type: "FS", rootPath: e["storage-work"] }
|
|
1357
1420
|
}
|
|
1358
1421
|
}
|
|
1359
1422
|
};
|
|
1360
|
-
|
|
1423
|
+
g.binaryPath ? t.startLocalS3(g) : tr(r, { version: e.version }).then(() => t.startLocalS3(g)).catch(function(b) {
|
|
1361
1424
|
r.error(b.message);
|
|
1362
1425
|
});
|
|
1363
1426
|
}
|
|
1364
1427
|
};
|
|
1365
|
-
|
|
1366
|
-
...
|
|
1367
|
-
...X,
|
|
1428
|
+
h(H, "description", "Run Platforma Backend service as local process on current host (no docker container)"), h(H, "examples", ["<%= config.bin %> <%= command.id %>"]), h(H, "flags", {
|
|
1429
|
+
...F,
|
|
1368
1430
|
...ee,
|
|
1369
|
-
...
|
|
1370
|
-
...
|
|
1371
|
-
...
|
|
1372
|
-
...
|
|
1373
|
-
...
|
|
1431
|
+
...te,
|
|
1432
|
+
...mr,
|
|
1433
|
+
...ze,
|
|
1434
|
+
...Ke,
|
|
1435
|
+
...qe,
|
|
1374
1436
|
...re,
|
|
1375
|
-
...
|
|
1376
|
-
...
|
|
1437
|
+
...ae,
|
|
1438
|
+
...ye,
|
|
1377
1439
|
...he,
|
|
1378
|
-
...
|
|
1379
|
-
...
|
|
1380
|
-
...
|
|
1440
|
+
...Pe,
|
|
1441
|
+
...He,
|
|
1442
|
+
...Ye,
|
|
1443
|
+
...ie
|
|
1381
1444
|
});
|
|
1382
|
-
let
|
|
1383
|
-
const
|
|
1384
|
-
"create-block":
|
|
1385
|
-
reset:
|
|
1386
|
-
start:
|
|
1387
|
-
stop:
|
|
1388
|
-
"start:docker":
|
|
1389
|
-
"start:local":
|
|
1390
|
-
"start:docker:s3":
|
|
1391
|
-
"start:local:s3":
|
|
1445
|
+
let me = H;
|
|
1446
|
+
const ot = {
|
|
1447
|
+
"create-block": ne,
|
|
1448
|
+
reset: oe,
|
|
1449
|
+
start: de,
|
|
1450
|
+
stop: ge,
|
|
1451
|
+
"start:docker": ue,
|
|
1452
|
+
"start:local": fe,
|
|
1453
|
+
"start:docker:s3": zr,
|
|
1454
|
+
"start:local:s3": me
|
|
1392
1455
|
};
|
|
1393
1456
|
export {
|
|
1394
|
-
|
|
1457
|
+
ot as COMMANDS
|
|
1395
1458
|
};
|
|
1396
1459
|
//# sourceMappingURL=index.mjs.map
|