@platforma-sdk/bootstrap 3.5.0 → 3.5.2

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/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  var Sr = Object.defineProperty;
2
2
  var $r = (a, e, t) => e in a ? Sr(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
3
  var l = (a, e, t) => $r(a, typeof e != "symbol" ? e + "" : e, t);
4
- import { Flags as p, Command as L, Args as Q } from "@oclif/core";
4
+ import { Flags as P, Command as $, Args as Q } from "@oclif/core";
5
5
  import * as me from "node:os";
6
- import N from "node:os";
6
+ import _ from "node:os";
7
7
  import f, { createWriteStream as Lr } from "node:fs";
8
8
  import m, { resolve as Ar } from "node:path";
9
- import { execSync as Re, spawn as Ir, spawnSync as Or } from "node:child_process";
9
+ import { execSync as xe, spawn as Ir, spawnSync as Or } from "node:child_process";
10
10
  import fe from "winston";
11
11
  import { randomBytes as Er } from "node:crypto";
12
12
  import re from "readline-sync";
@@ -18,121 +18,121 @@ import { getDefaultPlVersion as he } from "@milaboratories/pl-deployments";
18
18
  import ur from "yaml";
19
19
  import Tr from "node:https";
20
20
  import * as Fr from "tar";
21
- const A = {
22
- "log-level": p.string({
21
+ const L = {
22
+ "log-level": P.string({
23
23
  description: "logging level",
24
24
  default: "info",
25
25
  options: ["error", "warn", "info", "debug"],
26
26
  required: !1
27
27
  })
28
28
  };
29
- p.string({
29
+ P.string({
30
30
  description: "name of instance",
31
31
  required: !1
32
32
  });
33
33
  const ye = {
34
- image: p.string({
34
+ image: P.string({
35
35
  description: "use custom docker image to run platforma"
36
36
  })
37
37
  }, j = {
38
- version: p.string({
38
+ version: P.string({
39
39
  description: "use custom platforma release (official docker image or binary package)"
40
40
  })
41
41
  }, be = {
42
- arch: p.string({
42
+ arch: P.string({
43
43
  description: "override architecture. You can start amd64 linux image on arm-based host (say, Apple M family processor). I.e. arm64, amd64, amd64/v2"
44
44
  })
45
45
  }, B = {
46
- license: p.string({
46
+ license: P.string({
47
47
  description: 'pass a license code. The license can be got from "https://licensing.milaboratories.com".'
48
48
  }),
49
- "license-file": p.file({
49
+ "license-file": P.file({
50
50
  exists: !0,
51
51
  description: "specify a path to the file with a license. The license can be got from 'https://licensing.milaboratories.com'."
52
52
  })
53
53
  }, U = {
54
- "grpc-port": p.integer({
54
+ "grpc-port": P.integer({
55
55
  description: "port for Platforma Backend gRPC API. Default is 6345",
56
56
  env: "PLATFORMA_GRPC_PORT"
57
57
  }),
58
- "grpc-listen": p.string({
58
+ "grpc-listen": P.string({
59
59
  description: "full listen addr for Platforma Backend gRPC API. Default is 127.0.0.1:6345",
60
60
  env: "PLATFORMA_GRPC_LISTEN"
61
61
  }),
62
- "monitoring-port": p.integer({
62
+ "monitoring-port": P.integer({
63
63
  description: "port for Platforma Backend monitoring API. Default is 9090",
64
64
  env: "PLATFORMA_MONITORING_PORT"
65
65
  }),
66
- "monitoring-listen": p.string({
66
+ "monitoring-listen": P.string({
67
67
  description: "full listen addr for Platforma Backend monitoring API. Default is 127.0.0.1:9090",
68
68
  env: "PLATFORMA_MONITORING_LISTEN"
69
69
  }),
70
- "debug-port": p.integer({
70
+ "debug-port": P.integer({
71
71
  description: "port for Platforma Backend debug API. Default is 9091",
72
72
  env: "PLATFORMA_DEBUG_PORT"
73
73
  }),
74
- "debug-listen": p.string({
74
+ "debug-listen": P.string({
75
75
  description: "full listen addr for Platforma Backend debug API. Default is 127.0.0.1:9091",
76
76
  env: "PLATFORMA_DEBUG_LISTEN"
77
77
  })
78
- }, He = {
79
- "s3-port": p.integer({
78
+ }, we = {
79
+ "s3-port": P.integer({
80
80
  description: "port that S3 will listen, default is 9000",
81
81
  default: 9e3,
82
82
  env: "PLATFORMA_S3_PORT"
83
83
  }),
84
- "s3-console-port": p.integer({
84
+ "s3-console-port": P.integer({
85
85
  description: "port that a console of S3 will listen, default is 9001",
86
86
  default: 9001,
87
87
  env: "PLATFORMA_S3_CONSOLE_PORT"
88
88
  })
89
89
  }, G = {
90
- storage: p.string({
90
+ storage: P.string({
91
91
  description: "specify path on host to be used as storage for all Platforma Backend data"
92
92
  })
93
93
  }, yr = {
94
- "minio-presign-host": p.boolean({
94
+ "minio-presign-host": P.boolean({
95
95
  description: "use 'minio' host instead of 'localhost' in presign URLs"
96
96
  })
97
- }, we = {
98
- mount: p.string({
97
+ }, pe = {
98
+ mount: P.string({
99
99
  multiple: !0,
100
100
  description: "things to be mounted into platforma docker container. Targets will appear inside the container under the same absolute paths"
101
101
  })
102
- }, pe = {
103
- "pl-log-file": p.file({
102
+ }, Pe = {
103
+ "pl-log-file": P.file({
104
104
  description: "specify path for Platforma Backend log file"
105
105
  })
106
106
  }, ve = {
107
- "pl-workdir": p.file({
107
+ "pl-workdir": P.file({
108
108
  description: "specify working directory for Platforma Backend process"
109
109
  })
110
- }, Pe = {
111
- "pl-binary": p.file({
110
+ }, ke = {
111
+ "pl-binary": P.file({
112
112
  description: "start given Platforma Backend binary instead of automatically downloaded version"
113
113
  })
114
- }, ke = {
115
- "pl-sources": p.file({
114
+ }, Se = {
115
+ "pl-sources": P.file({
116
116
  description: "path to pl repository root: build Platforma Backend from sources and start the resulting binary"
117
117
  })
118
- }, Se = {
119
- config: p.string({
118
+ }, $e = {
119
+ config: P.string({
120
120
  description: "use custom Platforma Backend config"
121
121
  })
122
122
  };
123
- p.file({
123
+ P.file({
124
124
  description: "specify path on host to be used as 'primary' storage"
125
125
  });
126
126
  const oe = {
127
- "storage-work": p.file({
127
+ "storage-work": P.file({
128
128
  description: "specify path on host to be used as 'work' storage"
129
129
  })
130
130
  };
131
- p.file({
131
+ P.file({
132
132
  description: "specify path on host to be used as 'library' storage"
133
133
  });
134
134
  const le = {
135
- "storage-primary": p.string({
135
+ "storage-primary": P.string({
136
136
  description: `specify 'primary' storage destination URL.
137
137
  file:/path/to/dir for directory on local FS
138
138
  s3://<bucket>/?region=<name> for real AWS bucket
@@ -140,7 +140,7 @@ const le = {
140
140
  s3es://<endpoint>/<bucket>/?region=<name> for bucket behind custom endpoint via https`
141
141
  })
142
142
  }, de = {
143
- "storage-library": p.string({
143
+ "storage-library": P.string({
144
144
  description: `specify 'library' storage destination URL.
145
145
  file:/path/to/dir for directory on local FS
146
146
  s3://<bucket>/?region=<name> for real AWS bucket
@@ -148,19 +148,19 @@ const le = {
148
148
  s3es://<endpoint>/<bucket>/?region=<name> for bucket behind custom endpoint via https`
149
149
  })
150
150
  }, Dr = {
151
- "auth-enabled": p.boolean({
151
+ "auth-enabled": P.boolean({
152
152
  description: "enable authorization"
153
153
  })
154
154
  }, Nr = {
155
- "auth-htpasswd-file": p.file({
155
+ "auth-htpasswd-file": P.file({
156
156
  description: "path to .htpasswd file with Platforma users (static user DB auth source)"
157
157
  })
158
158
  }, _r = {
159
- "auth-ldap-server": p.string({
159
+ "auth-ldap-server": P.string({
160
160
  description: "address of LDAP server to use for auth in Platforma (auth source)"
161
161
  })
162
162
  }, Cr = {
163
- "auth-ldap-default-dn": p.string({
163
+ "auth-ldap-default-dn": P.string({
164
164
  description: "DN to use when checking user with LDAP bind operation: e.g. cn=%u,ou=users,dc=example,dc=com"
165
165
  })
166
166
  }, J = {
@@ -175,7 +175,7 @@ function Mr(a) {
175
175
  function H(a) {
176
176
  throw new Error("this should never happen");
177
177
  }
178
- function I(a = "debug") {
178
+ function A(a = "debug") {
179
179
  return fe.createLogger({
180
180
  level: a,
181
181
  format: fe.format.printf(({ level: e, message: t }) => {
@@ -201,16 +201,16 @@ function jr(a) {
201
201
  return Er(Math.ceil(a / 2)).toString("hex").slice(0, a);
202
202
  }
203
203
  function Br(a) {
204
- return a.startsWith("~") ? m.join(N.homedir(), a.slice(1)) : a;
204
+ return a.startsWith("~") ? m.join(_.homedir(), a.slice(1)) : a;
205
205
  }
206
- function Le(a, e) {
206
+ function Ae(a, e) {
207
207
  f.existsSync(a) || (f.mkdirSync(a, { recursive: !0 }), e != null && e.mode && f.chmodSync(a, e.mode));
208
208
  }
209
209
  function Ur(a) {
210
210
  try {
211
- if (N.platform() !== "win32")
212
- return Re(`ps -p ${a} -o comm=`, { encoding: "utf8" }).trim();
213
- const e = `wmic process where processid=${a} get Caption`, t = Re(e, { encoding: "utf8" }).split(`
211
+ if (_.platform() !== "win32")
212
+ return xe(`ps -p ${a} -o comm=`, { encoding: "utf8" }).trim();
213
+ const e = `wmic process where processid=${a} get Caption`, t = xe(e, { encoding: "utf8" }).split(`
214
214
  `);
215
215
  return t.length <= 1 ? "" : t[1].trim();
216
216
  } catch {
@@ -218,12 +218,12 @@ function Ur(a) {
218
218
  }
219
219
  }
220
220
  function Gr(a) {
221
- const e = Re(`docker compose ls --filter name=${a} --format json`, { encoding: "utf8" }).trim(), t = JSON.parse(e);
221
+ const e = xe(`docker compose ls --filter name=${a} --format json`, { encoding: "utf8" }).trim(), t = JSON.parse(e);
222
222
  for (const r of t)
223
223
  if (r.Name === a)
224
224
  return r;
225
225
  }
226
- const xe = ["Python"], br = ["Tengo", "Python"], Jr = C.union([C.literal("Tengo"), C.literal("Python")]), Hr = C.object({
226
+ const Te = ["Python"], br = ["Tengo", "Python"], Jr = C.union([C.literal("Tengo"), C.literal("Python")]), Hr = C.object({
227
227
  npmOrgName: C.string().min(1),
228
228
  orgName: C.string().min(1, { message: "Organization name must be provided" }),
229
229
  blockName: C.string().min(1, { message: "Block name must be provided" }),
@@ -240,7 +240,7 @@ async function Wr(a) {
240
240
  "platforma-block-boilerplate-main",
241
241
  s
242
242
  );
243
- const i = br.filter((o) => n.indexOf(o) < 0), c = xe.length == i.length;
243
+ const i = br.filter((o) => n.indexOf(o) < 0), c = Te.length == i.length;
244
244
  a.info(`Keep platforms '${n}', remove: '${i}'. Will remove all platforms? ${c}`);
245
245
  for (const o of i)
246
246
  await Yr(s, o);
@@ -268,9 +268,9 @@ function qr() {
268
268
  let n = ["Tengo"];
269
269
  if (r)
270
270
  for (; n.length < br.length; ) {
271
- const i = re.keyInSelect(xe, "Choose software platform:");
271
+ const i = re.keyInSelect(Te, "Choose software platform:");
272
272
  if (i < 0) break;
273
- n.push(xe[i]);
273
+ n.push(Te[i]);
274
274
  }
275
275
  n = Array.from(new Set(n)).sort();
276
276
  const s = Hr.safeParse({ npmOrgName: a, orgName: e, blockName: t, softwarePlatforms: n });
@@ -279,7 +279,7 @@ function qr() {
279
279
  return s.data;
280
280
  }
281
281
  async function zr(a, e, t) {
282
- const n = await (await fetch(a)).blob(), s = await M.mkdtemp(m.join(N.tmpdir(), "create-repo")), i = m.join(s, "packed-repo.zip"), c = Rr.toWeb(Lr(i));
282
+ const n = await (await fetch(a)).blob(), s = await M.mkdtemp(m.join(_.tmpdir(), "create-repo")), i = m.join(s, "packed-repo.zip"), c = Rr.toWeb(Lr(i));
283
283
  await n.stream().pipeTo(c);
284
284
  const o = m.join(s, "unpacked-repo");
285
285
  await M.mkdir(o), await xr(i, o), await M.cp(m.join(o, e), t, { recursive: !0 });
@@ -343,23 +343,23 @@ async function wr(a, e, t) {
343
343
  async function te(a, e) {
344
344
  return await wr(a, e, "");
345
345
  }
346
- const ae = class ae extends L {
346
+ const ae = class ae extends $ {
347
347
  async run() {
348
- const { flags: e } = await this.parse(ae), t = I(e["log-level"]);
348
+ const { flags: e } = await this.parse(ae), t = A(e["log-level"]);
349
349
  await Wr(t);
350
350
  }
351
351
  };
352
352
  l(ae, "description", "Helps to create a new block by downloading a block's template."), l(ae, "examples", ["<%= name %>"]), l(ae, "flags", {
353
- ...A
353
+ ...L
354
354
  });
355
- let Te = ae;
355
+ let Fe = ae;
356
356
  function pr(...a) {
357
357
  return Ar(__dirname, "..", ...a);
358
358
  }
359
359
  function Z(...a) {
360
360
  return pr("assets", ...a);
361
361
  }
362
- function Ae(...a) {
362
+ function Ie(...a) {
363
363
  return f.readFileSync(pr(...a));
364
364
  }
365
365
  function fr(a) {
@@ -372,9 +372,9 @@ const W = class W {
372
372
  });
373
373
  l(this, "filePath");
374
374
  l(this, "dirPath");
375
- e = e ?? m.resolve(N.homedir(), ".config", "pl-bootstrap");
375
+ e = e ?? m.resolve(_.homedir(), ".config", "pl-bootstrap");
376
376
  const t = m.join(e, "state.json");
377
- this.dirPath = e, this.filePath = t, f.existsSync(e) || f.mkdirSync(e, { recursive: !0 }), f.existsSync(t) && (this.state = JSON.parse(Ae(t).toString()));
377
+ this.dirPath = e, this.filePath = t, f.existsSync(e) || f.mkdirSync(e, { recursive: !0 }), f.existsSync(t) && (this.state = JSON.parse(Ie(t).toString()));
378
378
  }
379
379
  static getStateInstance() {
380
380
  return W.instance || (W.instance = new W()), W.instance;
@@ -401,7 +401,7 @@ const W = class W {
401
401
  const t = this.instanceDir(e, "instance.json");
402
402
  if (!f.existsSync(t))
403
403
  throw new Error(`platforma backend instance '${e}' does not exist or is corrupted`);
404
- const r = JSON.parse(Ae(t).toString());
404
+ const r = JSON.parse(Ie(t).toString());
405
405
  return {
406
406
  name: e,
407
407
  ...r
@@ -411,7 +411,7 @@ const W = class W {
411
411
  f.existsSync(this.instanceDir(e)) || f.mkdirSync(this.instanceDir(e), { recursive: !0 });
412
412
  const r = this.instanceDir(e, "instance.json");
413
413
  let n = {};
414
- f.existsSync(r) && (n = JSON.parse(Ae(r).toString())), f.writeFileSync(r, JSON.stringify({ ...n, ...t }));
414
+ f.existsSync(r) && (n = JSON.parse(Ie(r).toString())), f.writeFileSync(r, JSON.stringify({ ...n, ...t }));
415
415
  }
416
416
  isInstanceActive(e) {
417
417
  switch (e.type) {
@@ -454,13 +454,13 @@ const W = class W {
454
454
  }
455
455
  };
456
456
  l(W, "instance");
457
- let Fe = W;
457
+ let De = W;
458
458
  function mr(a) {
459
459
  const e = Ur(a);
460
460
  return e === "platforma" || e.endsWith("/platforma") || e.endsWith("\\platforma");
461
461
  }
462
- const u = Fe.getStateInstance();
463
- function Ie(a, e, t) {
462
+ const u = De.getStateInstance();
463
+ function Oe(a, e, t) {
464
464
  const r = [], n = [];
465
465
  for (const s of e) {
466
466
  const i = {
@@ -509,7 +509,7 @@ function Zr(a, e, t, r) {
509
509
  opts: ${JSON.stringify(r)}`
510
510
  ), r.env = { ...process.env, ...r.env }, Or(e, t, r);
511
511
  }
512
- function Oe(a, e, t, r, n) {
512
+ function Ee(a, e, t, r, n) {
513
513
  const s = f.readFileSync(a, { encoding: "utf-8" }), i = ur.parse(s.toString());
514
514
  if (!i.services)
515
515
  throw new Error(`file '${a}' seems to be not a docker-compose file or has unsupported version`);
@@ -559,7 +559,7 @@ function et(a) {
559
559
  uploadKeyPrefix: ""
560
560
  };
561
561
  }
562
- function vr(a) {
562
+ function Pr(a) {
563
563
  return {
564
564
  id: a,
565
565
  type: "FS",
@@ -617,17 +617,17 @@ function ee(a, e, t) {
617
617
  }
618
618
  }
619
619
  function rt(a, e) {
620
- var w, y, P, $, k, v, S, _, ge, E, qe, ze, Ye, Ve, Ke, Xe, Qe, Ze, er, rr, tr, ar, nr, sr, ir, cr, or, lr, dr, gr;
620
+ var w, y, k, S, I, p, v, E, ge, R, qe, ze, Ye, Ve, Ke, Xe, Qe, Ze, er, rr, tr, ar, nr, sr, ir, cr, or, lr, dr, gr;
621
621
  const t = (e == null ? void 0 : e.localRoot) ?? u.instanceDir("default"), r = {
622
622
  level: ((w = e == null ? void 0 : e.log) == null ? void 0 : w.level) ?? "info",
623
623
  path: ((y = e == null ? void 0 : e.log) == null ? void 0 : y.path) ?? `${t}/logs/platforma.log`
624
624
  }, n = {
625
- listen: ((P = e == null ? void 0 : e.grpc) == null ? void 0 : P.listen) ?? "localhost:6345",
625
+ listen: ((k = e == null ? void 0 : e.grpc) == null ? void 0 : k.listen) ?? "localhost:6345",
626
626
  tls: {
627
- enable: ue((k = ($ = e == null ? void 0 : e.grpc) == null ? void 0 : $.tls) == null ? void 0 : k.enable, !1),
628
- clientAuthMode: ((S = (v = e == null ? void 0 : e.grpc) == null ? void 0 : v.tls) == null ? void 0 : S.clientAuthMode) ?? "NoAuth",
629
- certFile: ((ge = (_ = e == null ? void 0 : e.grpc) == null ? void 0 : _.tls) == null ? void 0 : ge.certFile) ?? `${t}/certs/tls.cert`,
630
- keyFile: ((qe = (E = e == null ? void 0 : e.grpc) == null ? void 0 : E.tls) == null ? void 0 : qe.keyFile) ?? `${t}/certs/tls.key`,
627
+ enable: ue((I = (S = e == null ? void 0 : e.grpc) == null ? void 0 : S.tls) == null ? void 0 : I.enable, !1),
628
+ clientAuthMode: ((v = (p = e == null ? void 0 : e.grpc) == null ? void 0 : p.tls) == null ? void 0 : v.clientAuthMode) ?? "NoAuth",
629
+ certFile: ((ge = (E = e == null ? void 0 : e.grpc) == null ? void 0 : E.tls) == null ? void 0 : ge.certFile) ?? `${t}/certs/tls.cert`,
630
+ keyFile: ((qe = (R = e == null ? void 0 : e.grpc) == null ? void 0 : R.tls) == null ? void 0 : qe.keyFile) ?? `${t}/certs/tls.key`,
631
631
  ...(ze = e == null ? void 0 : e.grpc) == null ? void 0 : ze.tls
632
632
  }
633
633
  }, s = {
@@ -651,7 +651,7 @@ function rt(a, e) {
651
651
  switch ((er = (Ze = e == null ? void 0 : e.storages) == null ? void 0 : Ze.work) == null ? void 0 : er.type) {
652
652
  case void 0:
653
653
  case "FS":
654
- c = vr("work"), c.rootPath = ((tr = (rr = e == null ? void 0 : e.storages) == null ? void 0 : rr.work) == null ? void 0 : tr.rootPath) ?? `${t}/storages/work`, c.indexCachePeriod = ((nr = (ar = e == null ? void 0 : e.storages) == null ? void 0 : ar.work) == null ? void 0 : nr.indexCachePeriod) ?? "1m";
654
+ c = Pr("work"), c.rootPath = ((tr = (rr = e == null ? void 0 : e.storages) == null ? void 0 : rr.work) == null ? void 0 : tr.rootPath) ?? `${t}/storages/work`, c.indexCachePeriod = ((nr = (ar = e == null ? void 0 : e.storages) == null ? void 0 : ar.work) == null ? void 0 : nr.indexCachePeriod) ?? "1m";
655
655
  break;
656
656
  default:
657
657
  throw new Error("work storage MUST have 'FS' type as it is used for working directories management");
@@ -689,7 +689,7 @@ function hr(a, e, t, r) {
689
689
  switch (r == null ? void 0 : r.type) {
690
690
  case void 0:
691
691
  case "FS":
692
- n = vr(a), n.rootPath = (r == null ? void 0 : r.rootPath) ?? e;
692
+ n = Pr(a), n.rootPath = (r == null ? void 0 : r.rootPath) ?? e;
693
693
  break;
694
694
  case "S3":
695
695
  n = et(a), n.endpoint = r == null ? void 0 : r.endpoint, n.region = r == null ? void 0 : r.region, n.presignEndpoint = (r == null ? void 0 : r.presignEndpoint) ?? (r == null ? void 0 : r.endpoint), n.bucketName = (r == null ? void 0 : r.bucketName) ?? t, n.createBucket = ue(r == null ? void 0 : r.createBucket, !0), n.forcePathStyle = ue(r == null ? void 0 : r.forcePathStyle, !0), n.key = (r == null ? void 0 : r.key) ?? "", n.secret = (r == null ? void 0 : r.secret) ?? "", n.keyPrefix = (r == null ? void 0 : r.keyPrefix) ?? "", n.accessPrefixes = (r == null ? void 0 : r.accessPrefixes) ?? [""], n.uploadKeyPrefix = (r == null ? void 0 : r.uploadKeyPrefix) ?? "";
@@ -795,7 +795,7 @@ function ue(a, e) {
795
795
  }
796
796
  const at = ["linux", "macos", "windows"];
797
797
  function nt(a) {
798
- const e = N.platform();
798
+ const e = _.platform();
799
799
  switch (e) {
800
800
  case "darwin":
801
801
  return "macos";
@@ -810,8 +810,8 @@ function nt(a) {
810
810
  }
811
811
  }
812
812
  const st = ["amd64", "arm64"];
813
- function Pr(a) {
814
- const e = N.arch();
813
+ function vr(a) {
814
+ const e = _.arch();
815
815
  switch (e) {
816
816
  case "arm64":
817
817
  return "arm64";
@@ -824,7 +824,7 @@ function Pr(a) {
824
824
  }
825
825
  }
826
826
  function it(a, e) {
827
- const t = (e == null ? void 0 : e.version) ?? he(), r = (e == null ? void 0 : e.showProgress) ?? process.stdout.isTTY, n = `pl-${t}-${Pr()}.tgz`, s = (e == null ? void 0 : e.downloadURL) ?? `https://cdn.platforma.bio/software/pl/${nt()}/${n}`, i = (e == null ? void 0 : e.saveTo) ?? u.binaries(n);
827
+ const t = (e == null ? void 0 : e.version) ?? he(), r = (e == null ? void 0 : e.showProgress) ?? process.stdout.isTTY, n = `pl-${t}-${vr()}.tgz`, s = (e == null ? void 0 : e.downloadURL) ?? `https://cdn.platforma.bio/software/pl/${nt()}/${n}`, i = (e == null ? void 0 : e.saveTo) ?? u.binaries(n);
828
828
  if (f.existsSync(i))
829
829
  return a.info(`Platforma Backend archive download skipped: '${i}' already exists`), Promise.resolve(i);
830
830
  f.mkdirSync(m.dirname(i), { recursive: !0 }), a.info(`Downloading Platforma Backend archive:
@@ -848,8 +848,8 @@ function it(a, e) {
848
848
  const w = f.createWriteStream(i);
849
849
  d.pipe(w), d.on("data", (y) => {
850
850
  b += y.length;
851
- const P = b / h * 100;
852
- r && process.stdout.write(` downloading: ${P.toFixed(2)}%\r`);
851
+ const k = b / h * 100;
852
+ r && process.stdout.write(` downloading: ${k.toFixed(2)}%\r`);
853
853
  }), d.on("error", (y) => {
854
854
  f.unlinkSync(i), a.error(`Failed to download Platforma Binary: ${y.message}`), c.destroy(), g(y);
855
855
  }), w.on("finish", () => {
@@ -880,11 +880,11 @@ function ct(a, e) {
880
880
  sync: !0
881
881
  }), a.info(" ... unpack done."), s;
882
882
  }
883
- function $e(a, e) {
883
+ function Le(a, e) {
884
884
  return it(a, e).then((t) => ct(a, { archivePath: t }));
885
885
  }
886
886
  function kr(a) {
887
- return `pl-${(a == null ? void 0 : a.version) ?? he()}-${Pr()}`;
887
+ return `pl-${(a == null ? void 0 : a.version) ?? he()}-${vr()}`;
888
888
  }
889
889
  function ot(a, ...e) {
890
890
  return u.binaries(kr({ version: a }), ...e);
@@ -909,16 +909,16 @@ class O {
909
909
  this.logger.info(`Starting platforma backend instance '${e.name}':
910
910
  ${r}`);
911
911
  }
912
- const t = Ie(
912
+ const t = Oe(
913
913
  this.logger,
914
914
  e.upCommands
915
915
  );
916
- return Ee(t.executed), t.spawned.length > 0 && e.type === "process" && (e.pid = t.spawned[t.spawned.length - 1].pid, u.setInstanceInfo(e.name, e), this.logger.info(`instance '${e.name}' started`)), u.currentInstanceName = e.name, t.spawned;
916
+ return Re(t.executed), t.spawned.length > 0 && e.type === "process" && (e.pid = t.spawned[t.spawned.length - 1].pid, u.setInstanceInfo(e.name, e), this.logger.info(`instance '${e.name}' started`)), u.currentInstanceName = e.name, t.spawned;
917
917
  }
918
918
  stopInstance(e) {
919
919
  this.logger.info(`stopping platforma backend instance '${e.name}'...`);
920
- const t = Ie(this.logger, e.downCommands);
921
- switch (Ee(t.executed), e.type) {
920
+ const t = Oe(this.logger, e.downCommands);
921
+ switch (Re(t.executed), e.type) {
922
922
  case "docker":
923
923
  return;
924
924
  case "process": {
@@ -938,9 +938,9 @@ ${r}`);
938
938
  return this.startInstance(e);
939
939
  }
940
940
  createLocal(e, t) {
941
- var d, h, b, w, y, P, $, k, v, S, _, ge;
941
+ var d, h, b, w, y, k, S, I, p, v, E, ge;
942
942
  let r = ot(t == null ? void 0 : t.version, "binaries", "platforma");
943
- t != null && t.sourcesPath && (r = m.join(N.tmpdir(), "platforma-custom-build")), t != null && t.binaryPath && (r = t.binaryPath);
943
+ t != null && t.sourcesPath && (r = m.join(_.tmpdir(), "platforma-custom-build")), t != null && t.binaryPath && (r = t.binaryPath);
944
944
  let n = t == null ? void 0 : t.configPath;
945
945
  const s = (t == null ? void 0 : t.workdir) ?? (n ? process.cwd() : u.instanceDir(e));
946
946
  t != null && t.primaryURL && (t.configOptions = {
@@ -953,21 +953,21 @@ ${r}`);
953
953
  ...t.configOptions,
954
954
  storages: {
955
955
  ...(w = t.configOptions) == null ? void 0 : w.storages,
956
- library: ee(t.libraryURL, s, (P = (y = t.configOptions) == null ? void 0 : y.storages) == null ? void 0 : P.library)
956
+ library: ee(t.libraryURL, s, (k = (y = t.configOptions) == null ? void 0 : y.storages) == null ? void 0 : k.library)
957
957
  }
958
958
  });
959
959
  const i = rt(this.getLastJwt(), t == null ? void 0 : t.configOptions);
960
- this.logger.debug(" checking license..."), this.checkLicense((k = ($ = t == null ? void 0 : t.configOptions) == null ? void 0 : $.license) == null ? void 0 : k.value, (S = (v = t == null ? void 0 : t.configOptions) == null ? void 0 : v.license) == null ? void 0 : S.file);
960
+ this.logger.debug(" checking license..."), this.checkLicense((I = (S = t == null ? void 0 : t.configOptions) == null ? void 0 : S.license) == null ? void 0 : I.value, (v = (p = t == null ? void 0 : t.configOptions) == null ? void 0 : p.license) == null ? void 0 : v.file);
961
961
  const c = [
962
962
  `${i.localRoot}/packages`,
963
963
  `${i.localRoot}/packages-local`,
964
964
  `${i.localRoot}/blocks-local`
965
965
  ];
966
966
  i.storages.primary.type === "FS" && c.push(i.storages.primary.rootPath), i.storages.library.type === "FS" && (c.push(i.storages.library.rootPath), i.hacks.libraryDownloadable = !1), i.storages.work.type === "FS" && c.push(i.storages.work.rootPath), this.logger.debug(" creating pl state directories...");
967
- for (const E of c)
968
- f.existsSync(E) || (this.logger.debug(` '${E}'`), f.mkdirSync(E, { recursive: !0 }));
969
- for (const E of i.core.auth.drivers)
970
- E.driver === "htpasswd" && (f.existsSync(E.path) || (this.logger.debug(` installing default 'users.htpasswd' to ${E.path}...`), f.copyFileSync(Z("users.htpasswd"), E.path)));
967
+ for (const R of c)
968
+ f.existsSync(R) || (this.logger.debug(` '${R}'`), f.mkdirSync(R, { recursive: !0 }));
969
+ for (const R of i.core.auth.drivers)
970
+ R.driver === "htpasswd" && (f.existsSync(R.path) || (this.logger.debug(` installing default 'users.htpasswd' to ${R.path}...`), f.copyFileSync(Z("users.htpasswd"), R.path)));
971
971
  n || (n = m.join(i.localRoot, "config.yaml"), this.logger.debug(` rendering configuration '${n}'...`), f.writeFileSync(n, tt(i)));
972
972
  const o = [];
973
973
  t != null && t.sourcesPath && o.push({
@@ -987,7 +987,7 @@ ${r}`);
987
987
  stdio: "inherit"
988
988
  }
989
989
  };
990
- return (_ = t == null ? void 0 : t.configOptions) != null && _.numCpu && (g.runOpts.env = {
990
+ return (E = t == null ? void 0 : t.configOptions) != null && E.numCpu && (g.runOpts.env = {
991
991
  GOMAXPROCS: String((ge = t == null ? void 0 : t.configOptions) == null ? void 0 : ge.numCpu)
992
992
  }), o.push(g), u.setInstanceInfo(e, {
993
993
  type: "process",
@@ -1031,7 +1031,7 @@ ${r}`);
1031
1031
  createMinio(e, t) {
1032
1032
  this.logger.debug(" creating docker compose for minio service...");
1033
1033
  const r = Z("compose-backend.yaml"), n = u.instanceDir(e, "compose-minio.yaml");
1034
- Oe(
1034
+ Ee(
1035
1035
  r,
1036
1036
  n,
1037
1037
  `pl-${e}-minio`,
@@ -1045,7 +1045,7 @@ ${r}`);
1045
1045
  const i = (t == null ? void 0 : t.image) ?? `quay.io/minio/minio${s}`;
1046
1046
  this.logger.debug(` minio image: ${i}`);
1047
1047
  const c = (t == null ? void 0 : t.storage) ?? u.instanceDir(e, "minio");
1048
- Le(c, { mode: "0775" });
1048
+ Ae(c, { mode: "0775" });
1049
1049
  const o = (t == null ? void 0 : t.minioPort) ?? 9e3, g = (t == null ? void 0 : t.minioConsolePort) ?? 9001, d = {
1050
1050
  MINIO_IMAGE: i,
1051
1051
  MINIO_STORAGE: m.resolve(c),
@@ -1081,88 +1081,88 @@ ${r}`);
1081
1081
  const n = Z("compose-backend.yaml"), s = (r == null ? void 0 : r.image) ?? fr(r == null ? void 0 : r.version);
1082
1082
  this.checkLicense(r == null ? void 0 : r.license, r == null ? void 0 : r.licenseFile);
1083
1083
  const i = (...v) => m.join(t, ...v), c = (v) => {
1084
- const S = i(v);
1085
- return Le(S, { mode: "0775" }), S;
1084
+ const E = i(v);
1085
+ return Ae(E, { mode: "0775" }), E;
1086
1086
  }, o = i("logs", "platforma.log");
1087
1087
  f.existsSync(o) || (f.mkdirSync(m.dirname(o), { recursive: !0 }), f.writeFileSync(o, ""));
1088
- const g = (r == null ? void 0 : r.presignHost) ?? "localhost", d = ee("s3e://testuser:testpassword@minio:9000/main-bucket");
1089
- if (d.type !== "S3")
1090
- throw new Error("primary storage must have 'S3' type in 'docker s3' configuration");
1091
- d.presignEndpoint = `http://${g}:9000`;
1092
- const h = ee("s3e://testuser:testpassword@minio:9000/library-bucket");
1088
+ const g = (r == null ? void 0 : r.presignHost) ?? "localhost", d = (r == null ? void 0 : r.s3Port) ?? 9e3, h = ee(`s3e://testuser:testpassword@minio:${d}/main-bucket`);
1093
1089
  if (h.type !== "S3")
1094
- throw new Error(`${h.type} storage type is not supported for library storage`);
1095
- h.presignEndpoint = `http://${g}:9000`;
1096
- const b = c("db"), w = c("work"), y = i("users.htpasswd");
1097
- f.existsSync(y) || f.copyFileSync(Z("users.htpasswd"), y);
1098
- const P = i("compose.yaml");
1099
- f.existsSync(P) && this.logger.info(`replacing docker compose file ${P}`);
1100
- const $ = [];
1090
+ throw new Error("primary storage must have 'S3' type in 'docker s3' configuration");
1091
+ h.presignEndpoint = `http://${g}:${d}`;
1092
+ const b = ee(`s3e://testuser:testpassword@minio:${d}/library-bucket`);
1093
+ if (b.type !== "S3")
1094
+ throw new Error(`${b.type} storage type is not supported for library storage`);
1095
+ b.presignEndpoint = `http://${g}:${d}`;
1096
+ const w = c("db"), y = c("work"), k = i("users.htpasswd");
1097
+ f.existsSync(k) || f.copyFileSync(Z("users.htpasswd"), k);
1098
+ const S = i("compose.yaml");
1099
+ f.existsSync(S) && this.logger.info(`replacing docker compose file ${S}`);
1100
+ const I = [];
1101
1101
  for (const v of (r == null ? void 0 : r.customMounts) ?? [])
1102
- $.push({
1102
+ I.push({
1103
1103
  hostPath: v.hostPath,
1104
1104
  containerPath: v.containerPath ?? v.hostPath
1105
1105
  });
1106
- Oe(n, P, `pl-${e}`, /* @__PURE__ */ new Map([
1106
+ Ee(n, S, `pl-${e}`, /* @__PURE__ */ new Map([
1107
1107
  ["minio", {}],
1108
1108
  ["backend", {
1109
1109
  platform: r == null ? void 0 : r.platformOverride,
1110
- mounts: $
1110
+ mounts: I
1111
1111
  }]
1112
1112
  ]));
1113
- const k = {
1113
+ const p = {
1114
1114
  MINIO_IMAGE: "quay.io/minio/minio",
1115
1115
  MINIO_STORAGE: c("minio"),
1116
1116
  PL_IMAGE: s,
1117
- PL_AUTH_HTPASSWD_PATH: y,
1117
+ PL_AUTH_HTPASSWD_PATH: k,
1118
1118
  PL_LICENSE: r == null ? void 0 : r.license,
1119
1119
  PL_LICENSE_FILE: r == null ? void 0 : r.licenseFile,
1120
1120
  PL_LOG_LEVEL: (r == null ? void 0 : r.logLevel) ?? "info",
1121
1121
  PL_LOG_DIR: m.dirname(o),
1122
1122
  PL_LOG_ROTATION_ENABLED: "true",
1123
1123
  PL_RUNNER_WD_CACHE_ON_FAILURE: "1h",
1124
- PL_DATA_DB_ROOT: b,
1124
+ PL_DATA_DB_ROOT: w,
1125
1125
  PL_DATA_PRIMARY_ROOT: c("primary"),
1126
1126
  PL_DATA_LIBRARY_ROOT: c("library"),
1127
- PL_DATA_WORKDIR_ROOT: w,
1127
+ PL_DATA_WORKDIR_ROOT: y,
1128
1128
  // Mount packages storage as volume, because APFS is case-insensitive on Mac OS X and this breaks some pl software installation.
1129
1129
  // PL_DATA_PACKAGE_ROOT: storageDir('packages'),
1130
- ...this.configureDockerStorage("primary", d),
1131
- ...this.configureDockerStorage("library", h)
1130
+ ...this.configureDockerStorage("primary", h),
1131
+ ...this.configureDockerStorage("library", b)
1132
1132
  };
1133
- if (r != null && r.grpcAddr && (k.PL_GRPC_ADDR = r.grpcAddr), r != null && r.grpcPort && (k.PL_GRPC_PORT = r.grpcPort.toString()), r != null && r.monitoringAddr && (k.PL_MONITORING_ADDR = r.monitoringAddr), r != null && r.monitoringPort && (k.PL_MONITORING_PORT = r.monitoringPort.toString()), r != null && r.debugAddr && (k.PL_DEBUG_ADDR = r.debugAddr), r != null && r.debugPort && (k.PL_DEBUG_PORT = r.debugPort.toString()), r != null && r.s3Port && (k.MINIO_PORT = r.s3Port.toString()), r != null && r.s3ConsolePort && (k.MINIO_CONSOLE_PORT = r.s3ConsolePort.toString()), r != null && r.auth && (r.auth.enabled && (k.PL_AUTH_ENABLED = "true"), r.auth.drivers)) {
1133
+ if (r != null && r.grpcAddr && (p.PL_GRPC_ADDR = r.grpcAddr), r != null && r.grpcPort && (p.PL_GRPC_PORT = r.grpcPort.toString()), r != null && r.monitoringAddr && (p.PL_MONITORING_ADDR = r.monitoringAddr), r != null && r.monitoringPort && (p.PL_MONITORING_PORT = r.monitoringPort.toString()), r != null && r.debugAddr && (p.PL_DEBUG_ADDR = r.debugAddr), r != null && r.debugPort && (p.PL_DEBUG_PORT = r.debugPort.toString()), r != null && r.s3Port && (p.MINIO_PORT = r.s3Port.toString()), r != null && r.s3ConsolePort && (p.MINIO_CONSOLE_PORT = r.s3ConsolePort.toString()), r != null && r.auth && (r.auth.enabled && (p.PL_AUTH_ENABLED = "true"), r.auth.drivers)) {
1134
1134
  for (const v of r.auth.drivers)
1135
- v.driver === "htpasswd" && (k.PL_AUTH_HTPASSWD_PATH = m.resolve(v.path), v.path = "/etc/platforma/users.htpasswd");
1136
- k.PL_AUTH_DRIVERS = JSON.stringify(r.auth.drivers);
1135
+ v.driver === "htpasswd" && (p.PL_AUTH_HTPASSWD_PATH = m.resolve(v.path), v.path = "/etc/platforma/users.htpasswd");
1136
+ p.PL_AUTH_DRIVERS = JSON.stringify(r.auth.drivers);
1137
1137
  }
1138
1138
  return u.setInstanceInfo(e, {
1139
1139
  type: "docker",
1140
1140
  upCommands: [{
1141
1141
  cmd: "docker",
1142
- args: ["compose", `--file=${P}`, "up", "--detach", "--remove-orphans", "--pull=missing"],
1143
- envs: k,
1142
+ args: ["compose", `--file=${S}`, "up", "--detach", "--remove-orphans", "--pull=missing"],
1143
+ envs: p,
1144
1144
  runOpts: { stdio: "inherit" }
1145
1145
  }],
1146
1146
  downCommands: [{
1147
1147
  cmd: "docker",
1148
- args: ["compose", `--file=${P}`, "down"],
1149
- envs: k,
1148
+ args: ["compose", `--file=${S}`, "down"],
1149
+ envs: p,
1150
1150
  runOpts: { stdio: "inherit" }
1151
1151
  }],
1152
1152
  cleanupCommands: [{
1153
1153
  cmd: "docker",
1154
- args: ["compose", `--file=${P}`, "down", "--volumes", "--remove-orphans"],
1155
- envs: k,
1154
+ args: ["compose", `--file=${S}`, "down", "--volumes", "--remove-orphans"],
1155
+ envs: p,
1156
1156
  runOpts: { stdio: "inherit" }
1157
1157
  }],
1158
1158
  runInfo: {
1159
1159
  apiPort: r == null ? void 0 : r.grpcPort,
1160
1160
  apiAddr: r == null ? void 0 : r.grpcAddr,
1161
1161
  logPath: o,
1162
- primary: d,
1163
- work: { type: "FS", rootPath: w },
1164
- library: h,
1165
- dbPath: b
1162
+ primary: h,
1163
+ work: { type: "FS", rootPath: y },
1164
+ library: b,
1165
+ dbPath: w
1166
1166
  }
1167
1167
  }), u.getInstanceInfo(e);
1168
1168
  }
@@ -1170,28 +1170,28 @@ ${r}`);
1170
1170
  this.logger.debug("creating platforma instance in 'docker' mode...");
1171
1171
  const n = Z("compose-backend.yaml"), s = (r == null ? void 0 : r.image) ?? fr(r == null ? void 0 : r.version);
1172
1172
  this.checkLicense(r == null ? void 0 : r.license, r == null ? void 0 : r.licenseFile);
1173
- const i = (...S) => m.join(t, ...S), c = (S) => {
1174
- const _ = i(S);
1175
- return Le(_, { mode: "0775" }), _;
1173
+ const i = (...v) => m.join(t, ...v), c = (v) => {
1174
+ const E = i(v);
1175
+ return Ae(E, { mode: "0775" }), E;
1176
1176
  }, o = i("logs", "platforma.log");
1177
1177
  f.existsSync(o) || (f.mkdirSync(m.dirname(o), { recursive: !0 }), f.writeFileSync(o, ""));
1178
1178
  const g = c("db"), d = c("primary"), h = c("library"), b = c("work"), w = i("users.htpasswd");
1179
1179
  f.existsSync(w) || f.copyFileSync(Z("users.htpasswd"), w);
1180
1180
  const y = i("compose.yaml");
1181
1181
  f.existsSync(y) && this.logger.info(`replacing docker compose file ${y}`);
1182
- const P = [];
1183
- for (const S of (r == null ? void 0 : r.customMounts) ?? [])
1184
- P.push({
1185
- hostPath: S.hostPath,
1186
- containerPath: S.containerPath ?? S.hostPath
1182
+ const k = [];
1183
+ for (const v of (r == null ? void 0 : r.customMounts) ?? [])
1184
+ k.push({
1185
+ hostPath: v.hostPath,
1186
+ containerPath: v.containerPath ?? v.hostPath
1187
1187
  });
1188
- this.logger.debug(`Rendering docker compose file '${y}' using '${n}' as base template`), Oe(n, y, `pl-${e}`, /* @__PURE__ */ new Map([
1188
+ this.logger.debug(`Rendering docker compose file '${y}' using '${n}' as base template`), Ee(n, y, `pl-${e}`, /* @__PURE__ */ new Map([
1189
1189
  ["backend", {
1190
1190
  platform: r == null ? void 0 : r.platformOverride,
1191
- mounts: P
1191
+ mounts: k
1192
1192
  }]
1193
1193
  ]));
1194
- const $ = ee((r == null ? void 0 : r.primaryStorageURL) ?? `file:${d}`, "."), k = ee((r == null ? void 0 : r.libraryStorageURL) ?? `file:${h}`, "."), v = {
1194
+ const S = ee((r == null ? void 0 : r.primaryStorageURL) ?? `file:${d}`, "."), I = ee((r == null ? void 0 : r.libraryStorageURL) ?? `file:${h}`, "."), p = {
1195
1195
  PL_IMAGE: s,
1196
1196
  PL_AUTH_HTPASSWD_PATH: w,
1197
1197
  PL_LICENSE: r == null ? void 0 : r.license,
@@ -1205,41 +1205,41 @@ ${r}`);
1205
1205
  PL_DATA_LIBRARY_ROOT: h,
1206
1206
  PL_DATA_WORKDIR_ROOT: b,
1207
1207
  PL_DATA_PACKAGE_ROOT: c("packages"),
1208
- ...this.configureDockerStorage("primary", $),
1209
- ...this.configureDockerStorage("library", k)
1208
+ ...this.configureDockerStorage("primary", S),
1209
+ ...this.configureDockerStorage("library", I)
1210
1210
  };
1211
- 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)) {
1212
- for (const S of r.auth.drivers)
1213
- S.driver === "htpasswd" && (v.PL_AUTH_HTPASSWD_PATH = m.resolve(S.path), S.path = "/etc/platforma/users.htpasswd");
1214
- v.PL_AUTH_DRIVERS = JSON.stringify(r.auth.drivers);
1211
+ if (r != null && r.grpcAddr && (p.PL_GRPC_ADDR = r.grpcAddr), r != null && r.grpcPort && (p.PL_GRPC_PORT = r.grpcPort.toString()), r != null && r.monitoringAddr && (p.PL_MONITORING_ADDR = r.monitoringAddr), r != null && r.monitoringPort && (p.PL_MONITORING_PORT = r.monitoringPort.toString()), r != null && r.debugAddr && (p.PL_DEBUG_ADDR = r.debugAddr), r != null && r.debugPort && (p.PL_DEBUG_PORT = r.debugPort.toString()), r != null && r.auth && (r.auth.enabled && (p.PL_AUTH_ENABLED = "true"), r.auth.drivers)) {
1212
+ for (const v of r.auth.drivers)
1213
+ v.driver === "htpasswd" && (p.PL_AUTH_HTPASSWD_PATH = m.resolve(v.path), v.path = "/etc/platforma/users.htpasswd");
1214
+ p.PL_AUTH_DRIVERS = JSON.stringify(r.auth.drivers);
1215
1215
  }
1216
1216
  return u.setInstanceInfo(e, {
1217
1217
  type: "docker",
1218
1218
  upCommands: [{
1219
1219
  cmd: "docker",
1220
1220
  args: ["compose", `--file=${y}`, "up", "--detach", "--remove-orphans", "--pull=missing"],
1221
- envs: v,
1221
+ envs: p,
1222
1222
  runOpts: { stdio: "inherit" }
1223
1223
  }],
1224
1224
  downCommands: [{
1225
1225
  cmd: "docker",
1226
1226
  args: ["compose", `--file=${y}`, "down"],
1227
- envs: v,
1227
+ envs: p,
1228
1228
  runOpts: { stdio: "inherit" }
1229
1229
  }],
1230
1230
  cleanupCommands: [{
1231
1231
  cmd: "docker",
1232
1232
  args: ["compose", `--file=${y}`, "down", "--volumes", "--remove-orphans"],
1233
- envs: v,
1233
+ envs: p,
1234
1234
  runOpts: { stdio: "inherit" }
1235
1235
  }],
1236
1236
  runInfo: {
1237
1237
  apiPort: r == null ? void 0 : r.grpcPort,
1238
1238
  apiAddr: r == null ? void 0 : r.grpcAddr,
1239
1239
  logPath: o,
1240
- primary: $,
1240
+ primary: S,
1241
1241
  work: { type: "FS", rootPath: b },
1242
- library: k,
1242
+ library: I,
1243
1243
  dbPath: g
1244
1244
  }
1245
1245
  }), u.getInstanceInfo(e);
@@ -1287,8 +1287,8 @@ You are going to reset the state of all platforma services configured with pl-bo
1287
1287
  for (const [s, i] of r.entries()) {
1288
1288
  if (i.cleanupCommands.length) {
1289
1289
  this.logger.info(`Wiping instance ${s} services`);
1290
- const c = Ie(this.logger, i.cleanupCommands);
1291
- Ee(c.executed, `failed to wipe instance ${s} services`);
1290
+ const c = Oe(this.logger, i.cleanupCommands);
1291
+ Re(c.executed, `failed to wipe instance ${s} services`);
1292
1292
  }
1293
1293
  this.logger.info(`Destroying instance '${s}' data directory`), f.rmSync(u.instanceDir(s), { recursive: !0, force: !0 });
1294
1294
  }
@@ -1299,7 +1299,7 @@ If you want to remove all downloaded platforma binaries, delete '${u.binaries()}
1299
1299
  );
1300
1300
  }
1301
1301
  mergeLicenseEnvs(e) {
1302
- 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 : f.existsSync(m.resolve(N.homedir(), ".pl.license")) && (e["license-file"] = m.resolve(N.homedir(), ".pl.license")));
1302
+ 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 : f.existsSync(m.resolve(_.homedir(), ".pl.license")) && (e["license-file"] = m.resolve(_.homedir(), ".pl.license")));
1303
1303
  }
1304
1304
  initAuthDriversList(e, t) {
1305
1305
  const r = [];
@@ -1382,7 +1382,7 @@ You can obtain the license from "https://licensing.milaboratories.com".`), new E
1382
1382
  `);
1383
1383
  }
1384
1384
  }
1385
- function Ee(a, e) {
1385
+ function Re(a, e) {
1386
1386
  for (const t of a) {
1387
1387
  if (t.error)
1388
1388
  throw t.error;
@@ -1391,40 +1391,40 @@ function Ee(a, e) {
1391
1391
  throw new Error(`${r}, process exited with code '${t.status}'`);
1392
1392
  }
1393
1393
  }
1394
- const ne = class ne extends L {
1394
+ const ne = class ne extends $ {
1395
1395
  async run() {
1396
- const { flags: e } = await this.parse(ne), t = I(e["log-level"]);
1396
+ const { flags: e } = await this.parse(ne), t = A(e["log-level"]);
1397
1397
  new O(t).cleanupInstance();
1398
1398
  }
1399
1399
  };
1400
1400
  l(ne, "description", "Clear service state (forget last run command, destroy docker services, volumes and so on)"), l(ne, "examples", ["<%= config.bin %> <%= command.id %>"]), l(ne, "flags", {
1401
- ...A
1401
+ ...L
1402
1402
  });
1403
- let De = ne;
1404
- const se = class se extends L {
1403
+ let Ne = ne;
1404
+ const se = class se extends $ {
1405
1405
  async run() {
1406
- const { flags: e } = await this.parse(se), t = I(e["log-level"]);
1406
+ const { flags: e } = await this.parse(se), t = A(e["log-level"]);
1407
1407
  new O(t).startLast();
1408
1408
  }
1409
1409
  };
1410
1410
  l(se, "description", "Start last run service configuraiton"), l(se, "examples", ["<%= config.bin %> <%= command.id %>"]), l(se, "flags", {
1411
- ...A
1411
+ ...L
1412
1412
  });
1413
- let Ne = se;
1414
- const ie = class ie extends L {
1413
+ let _e = se;
1414
+ const ie = class ie extends $ {
1415
1415
  async run() {
1416
- const { flags: e } = await this.parse(ie), t = I(e["log-level"]), r = new O(t);
1416
+ const { flags: e } = await this.parse(ie), t = A(e["log-level"]), r = new O(t);
1417
1417
  u.currentInstance ? r.stopInstance(u.currentInstance) : t.warn("up/start command was not called for any instance, nothing to stop");
1418
1418
  }
1419
1419
  };
1420
1420
  l(ie, "description", "Stop platforma service"), l(ie, "examples", ["<%= config.bin %> <%= command.id %>"]), l(ie, "flags", {
1421
- ...A
1421
+ ...L
1422
1422
  });
1423
- let _e = ie;
1424
- var x;
1425
- let dt = (x = class extends L {
1423
+ let Ce = ie;
1424
+ var T;
1425
+ let dt = (T = class extends $ {
1426
1426
  async run() {
1427
- const { flags: e } = await this.parse(x), t = I(e["log-level"]), r = new O(t);
1427
+ const { flags: e } = await this.parse(T), t = A(e["log-level"]), r = new O(t);
1428
1428
  r.mergeLicenseEnvs(e);
1429
1429
  const n = "docker", s = e["auth-enabled"], i = s ? {
1430
1430
  enabled: s,
@@ -1452,24 +1452,24 @@ let dt = (x = class extends L {
1452
1452
  });
1453
1453
  r.switchInstance(d);
1454
1454
  }
1455
- }, l(x, "description", "Run platforma backend service with 'FS' primary storage type"), l(x, "examples", ["<%= config.bin %> <%= command.id %>"]), l(x, "flags", {
1456
- ...A,
1455
+ }, l(T, "description", "Run platforma backend service with 'FS' primary storage type"), l(T, "examples", ["<%= config.bin %> <%= command.id %>"]), l(T, "flags", {
1456
+ ...L,
1457
1457
  ...U,
1458
1458
  ...ye,
1459
1459
  ...j,
1460
1460
  ...be,
1461
1461
  ...J,
1462
1462
  ...B,
1463
- ...we,
1463
+ ...pe,
1464
1464
  ...G,
1465
1465
  ...le,
1466
1466
  ...oe,
1467
1467
  ...de
1468
- }), x);
1469
- var T;
1470
- let gt = (T = class extends L {
1468
+ }), T);
1469
+ var F;
1470
+ let gt = (F = class extends $ {
1471
1471
  async run() {
1472
- const { flags: e } = await this.parse(T), t = I(e["log-level"]), r = new O(t);
1472
+ const { flags: e } = await this.parse(F), t = A(e["log-level"]), r = new O(t);
1473
1473
  r.mergeLicenseEnvs(e);
1474
1474
  const n = "local", s = e["pl-workdir"] ?? ".", i = e.storage ? m.join(s, e.storage) : u.instanceDir(n), c = e["pl-log-file"] ? m.join(s, e["pl-log-file"]) : void 0, o = r.initAuthDriversList(e, s), g = e["auth-enabled"] ?? o !== void 0;
1475
1475
  let d = "127.0.0.1:6345";
@@ -1502,61 +1502,61 @@ let gt = (T = class extends L {
1502
1502
  numCpu: Math.max(me.cpus().length - 2, 1)
1503
1503
  }
1504
1504
  }, y = r.createLocal(n, w);
1505
- w.binaryPath || w.sourcesPath ? r.switchInstance(y) : $e(t, { version: e.version }).then(() => {
1506
- const P = r.switchInstance(y);
1505
+ w.binaryPath || w.sourcesPath ? r.switchInstance(y) : Le(t, { version: e.version }).then(() => {
1506
+ const k = r.switchInstance(y);
1507
1507
  setTimeout(() => {
1508
- for (const $ of P)
1509
- $.unref();
1508
+ for (const S of k)
1509
+ S.unref();
1510
1510
  }, 1e3);
1511
- }).catch(function(P) {
1512
- t.error(P.message);
1511
+ }).catch(function(k) {
1512
+ t.error(k.message);
1513
1513
  });
1514
1514
  }
1515
- }, l(T, "description", "Run Platforma Backend service as local process on current host (no docker container)"), l(T, "examples", ["<%= config.bin %> <%= command.id %>"]), l(T, "flags", {
1516
- ...A,
1515
+ }, l(F, "description", "Run Platforma Backend service as local process on current host (no docker container)"), l(F, "examples", ["<%= config.bin %> <%= command.id %>"]), l(F, "flags", {
1516
+ ...L,
1517
1517
  ...j,
1518
1518
  ...U,
1519
- ...Pe,
1520
1519
  ...ke,
1521
1520
  ...Se,
1521
+ ...$e,
1522
1522
  ...B,
1523
1523
  ...G,
1524
1524
  ...le,
1525
1525
  ...oe,
1526
1526
  ...de,
1527
- ...pe,
1527
+ ...Pe,
1528
1528
  ...ve,
1529
1529
  ...J
1530
- }), T);
1531
- const q = class q extends L {
1530
+ }), F);
1531
+ const q = class q extends $ {
1532
1532
  async run() {
1533
- const { flags: e, args: t } = await this.parse(q), r = I(e["log-level"]), n = new O(r), s = t.name;
1533
+ const { flags: e, args: t } = await this.parse(q), r = A(e["log-level"]), n = new O(r), s = t.name;
1534
1534
  e.all && (n.cleanupInstance(), process.exit(0)), s || (r.error("Please, specify name of instance to be removed or set '--all' flag instead"), process.exit(1)), n.cleanupInstance(s);
1535
1535
  }
1536
1536
  };
1537
1537
  l(q, "description", "List available instances"), l(q, "examples", ["<%= config.bin %> <%= command.id %>"]), l(q, "flags", {
1538
- ...A,
1539
- all: p.boolean({
1538
+ ...L,
1539
+ all: P.boolean({
1540
1540
  description: "remove all known instances",
1541
1541
  required: !1
1542
1542
  })
1543
1543
  }), l(q, "args", {
1544
1544
  name: Q.string({ required: !1 })
1545
1545
  });
1546
- let Ce = q;
1547
- const z = class z extends L {
1546
+ let Me = q;
1547
+ const z = class z extends $ {
1548
1548
  async run() {
1549
- const { flags: e, args: t } = await this.parse(z), r = I(e["log-level"]), n = new O(r), s = t.name ?? u.currentInstanceName;
1549
+ const { flags: e, args: t } = await this.parse(z), r = A(e["log-level"]), n = new O(r), s = t.name ?? u.currentInstanceName;
1550
1550
  s || (r.info("no pl service instance selected. No service was stopped"), process.exit(0)), n.stopInstance(u.getInstanceInfo(s));
1551
1551
  }
1552
1552
  };
1553
1553
  l(z, "description", "List available instances"), l(z, "examples", ["<%= config.bin %> <%= command.id %>"]), l(z, "flags", {
1554
- ...A
1554
+ ...L
1555
1555
  }), l(z, "args", {
1556
1556
  name: Q.string({ required: !1 })
1557
1557
  });
1558
- let Me = z;
1559
- const ce = class ce extends L {
1558
+ let je = z;
1559
+ const ce = class ce extends $ {
1560
1560
  async run() {
1561
1561
  await this.parse(ce);
1562
1562
  const e = u.instanceList, t = u.currentInstanceName;
@@ -1567,10 +1567,10 @@ const ce = class ce extends L {
1567
1567
  }
1568
1568
  };
1569
1569
  l(ce, "description", "List available instances"), l(ce, "examples", ["<%= config.bin %> <%= command.id %>"]), l(ce, "flags", {});
1570
- let je = ce;
1571
- const Y = class Y extends L {
1570
+ let Be = ce;
1571
+ const Y = class Y extends $ {
1572
1572
  async run() {
1573
- const { flags: e, args: t } = await this.parse(Y), r = I(e["log-level"]), n = new O(r), s = t.name ?? u.currentInstanceName;
1573
+ const { flags: e, args: t } = await this.parse(Y), r = A(e["log-level"]), n = new O(r), s = t.name ?? u.currentInstanceName;
1574
1574
  s || (r.error("no pl service instance is selected. Select instance with 'select' command or provide name to 'up'"), process.exit(1));
1575
1575
  const i = n.switchInstance(u.getInstanceInfo(s)), c = [];
1576
1576
  for (const o of i)
@@ -1581,15 +1581,15 @@ const Y = class Y extends L {
1581
1581
  }
1582
1582
  };
1583
1583
  l(Y, "description", "List available instances"), l(Y, "examples", ["<%= config.bin %> <%= command.id %>"]), l(Y, "flags", {
1584
- ...A
1584
+ ...L
1585
1585
  }), l(Y, "args", {
1586
1586
  name: Q.string({ required: !1 })
1587
1587
  });
1588
- let Be = Y;
1589
- var F;
1590
- let ut = (F = class extends L {
1588
+ let Ue = Y;
1589
+ var D;
1590
+ let ut = (D = class extends $ {
1591
1591
  async run() {
1592
- const { flags: e } = await this.parse(F), t = I(e["log-level"]), r = new O(t);
1592
+ const { flags: e } = await this.parse(D), t = A(e["log-level"]), r = new O(t);
1593
1593
  r.mergeLicenseEnvs(e);
1594
1594
  const n = "docker-s3", s = e["auth-enabled"], i = s ? {
1595
1595
  enabled: s,
@@ -1617,23 +1617,23 @@ let ut = (F = class extends L {
1617
1617
  });
1618
1618
  r.switchInstance(h);
1619
1619
  }
1620
- }, l(F, "description", "Run platforma backend service with 'S3' primary storage type"), l(F, "examples", ["<%= config.bin %> <%= command.id %>"]), l(F, "flags", {
1621
- ...A,
1620
+ }, l(D, "description", "Run platforma backend service with 'S3' primary storage type"), l(D, "examples", ["<%= config.bin %> <%= command.id %>"]), l(D, "flags", {
1621
+ ...L,
1622
1622
  ...U,
1623
- ...He,
1623
+ ...we,
1624
1624
  ...ye,
1625
1625
  ...j,
1626
1626
  ...be,
1627
1627
  ...J,
1628
1628
  ...B,
1629
- ...we,
1629
+ ...pe,
1630
1630
  ...G,
1631
1631
  ...yr
1632
- }), F);
1633
- var D;
1634
- let ft = (D = class extends L {
1632
+ }), D);
1633
+ var N;
1634
+ let ft = (N = class extends $ {
1635
1635
  async run() {
1636
- const { flags: e } = await this.parse(D), t = I(e["log-level"]), r = new O(t);
1636
+ const { flags: e } = await this.parse(N), t = A(e["log-level"]), r = new O(t);
1637
1637
  r.mergeLicenseEnvs(e);
1638
1638
  const n = "local-s3", s = e["pl-workdir"] ?? ".", i = e.storage ? m.join(s, e.storage) : u.instanceDir(n), c = e["pl-log-file"] ? m.join(s, e["pl-log-file"]) : void 0, o = r.initAuthDriversList(e, s), g = e["auth-enabled"] ?? o !== void 0;
1639
1639
  let d = "127.0.0.1:6345";
@@ -1670,37 +1670,37 @@ let ft = (D = class extends L {
1670
1670
  }
1671
1671
  }
1672
1672
  }, y = r.createLocalS3(n, w);
1673
- w.binaryPath || w.sourcesPath ? r.switchInstance(y) : await $e(t, { version: e.version }).then(() => {
1674
- const P = r.switchInstance(y), $ = [];
1675
- for (const k of P)
1676
- $.push(new Promise((v, S) => {
1677
- k.on("close", v), k.on("error", S);
1673
+ w.binaryPath || w.sourcesPath ? r.switchInstance(y) : await Le(t, { version: e.version }).then(() => {
1674
+ const k = r.switchInstance(y), S = [];
1675
+ for (const I of k)
1676
+ S.push(new Promise((p, v) => {
1677
+ I.on("close", p), I.on("error", v);
1678
1678
  }));
1679
- return Promise.all($);
1680
- }).catch(function(P) {
1681
- t.error(P.message);
1679
+ return Promise.all(S);
1680
+ }).catch(function(k) {
1681
+ t.error(k.message);
1682
1682
  });
1683
1683
  }
1684
- }, l(D, "description", "Run Platforma Backend service as local process on current host (no docker container)"), l(D, "examples", ["<%= config.bin %> <%= command.id %>"]), l(D, "flags", {
1685
- ...A,
1684
+ }, l(N, "description", "Run Platforma Backend service as local process on current host (no docker container)"), l(N, "examples", ["<%= config.bin %> <%= command.id %>"]), l(N, "flags", {
1685
+ ...L,
1686
1686
  ...j,
1687
1687
  ...U,
1688
- ...He,
1689
- ...Pe,
1688
+ ...we,
1690
1689
  ...ke,
1691
1690
  ...Se,
1691
+ ...$e,
1692
1692
  ...B,
1693
1693
  ...G,
1694
1694
  ...le,
1695
1695
  ...oe,
1696
1696
  ...de,
1697
- ...pe,
1697
+ ...Pe,
1698
1698
  ...ve,
1699
1699
  ...J
1700
- }), D);
1701
- const V = class V extends L {
1700
+ }), N);
1701
+ const V = class V extends $ {
1702
1702
  async run() {
1703
- const { flags: e, args: t } = await this.parse(V), r = I(e["log-level"]), n = new O(r);
1703
+ const { flags: e, args: t } = await this.parse(V), r = A(e["log-level"]), n = new O(r);
1704
1704
  n.mergeLicenseEnvs(e);
1705
1705
  const s = t.name, i = e["auth-enabled"], c = i ? {
1706
1706
  enabled: i,
@@ -1730,14 +1730,14 @@ const V = class V extends L {
1730
1730
  }
1731
1731
  };
1732
1732
  l(V, "description", "Run Platforma Backend service as docker container on current host"), l(V, "examples", ["<%= config.bin %> <%= command.id %>"]), l(V, "flags", {
1733
- ...A,
1733
+ ...L,
1734
1734
  ...U,
1735
1735
  ...ye,
1736
1736
  ...j,
1737
1737
  ...be,
1738
1738
  ...J,
1739
1739
  ...B,
1740
- ...we,
1740
+ ...pe,
1741
1741
  ...G,
1742
1742
  ...le,
1743
1743
  ...oe,
@@ -1745,11 +1745,11 @@ l(V, "description", "Run Platforma Backend service as docker container on curren
1745
1745
  }), l(V, "args", {
1746
1746
  name: Q.string({ required: !0 })
1747
1747
  });
1748
- let Ue = V;
1749
- var R;
1750
- let mt = (R = class extends L {
1748
+ let Ge = V;
1749
+ var x;
1750
+ let mt = (x = class extends $ {
1751
1751
  async run() {
1752
- const { flags: e, args: t } = await this.parse(R), r = I(e["log-level"]), n = new O(r);
1752
+ const { flags: e, args: t } = await this.parse(x), r = A(e["log-level"]), n = new O(r);
1753
1753
  n.mergeLicenseEnvs(e);
1754
1754
  const s = t.name, i = e["pl-workdir"] ?? ".", c = e.storage ? m.join(i, e.storage) : u.instanceDir(s), o = e["pl-log-file"] ? m.join(i, e["pl-log-file"]) : void 0, g = n.initAuthDriversList(e, i), d = e["auth-enabled"] ?? g !== void 0;
1755
1755
  let h = "127.0.0.1:6345";
@@ -1786,31 +1786,31 @@ let mt = (R = class extends L {
1786
1786
  r.info(`Instance '${s}' was created. To start it run 'up' command`);
1787
1787
  return;
1788
1788
  }
1789
- $e(r, { version: e.version }).then(() => r.info(`Instance '${s}' was created. To start it run 'svc up' command`)).catch(function(P) {
1790
- r.error(P.message);
1789
+ Le(r, { version: e.version }).then(() => r.info(`Instance '${s}' was created. To start it run 'svc up' command`)).catch(function(k) {
1790
+ r.error(k.message);
1791
1791
  });
1792
1792
  }
1793
- }, l(R, "description", "Run Platforma Backend service as local process on current host (no docker container)"), l(R, "examples", ["<%= config.bin %> <%= command.id %>"]), l(R, "flags", {
1794
- ...A,
1793
+ }, l(x, "description", "Run Platforma Backend service as local process on current host (no docker container)"), l(x, "examples", ["<%= config.bin %> <%= command.id %>"]), l(x, "flags", {
1794
+ ...L,
1795
1795
  ...j,
1796
1796
  ...U,
1797
- ...Pe,
1798
1797
  ...ke,
1799
1798
  ...Se,
1799
+ ...$e,
1800
1800
  ...B,
1801
1801
  ...G,
1802
1802
  ...le,
1803
1803
  ...oe,
1804
1804
  ...de,
1805
- ...pe,
1805
+ ...Pe,
1806
1806
  ...ve,
1807
1807
  ...J
1808
- }), l(R, "args", {
1808
+ }), l(x, "args", {
1809
1809
  name: Q.string({ required: !0 })
1810
- }), R);
1811
- const K = class K extends L {
1810
+ }), x);
1811
+ const K = class K extends $ {
1812
1812
  async run() {
1813
- const { flags: e, args: t } = await this.parse(K), r = I(e["log-level"]), n = new O(r);
1813
+ const { flags: e, args: t } = await this.parse(K), r = A(e["log-level"]), n = new O(r);
1814
1814
  n.mergeLicenseEnvs(e);
1815
1815
  const s = t.name, i = e["auth-enabled"], c = i ? {
1816
1816
  enabled: i,
@@ -1833,28 +1833,31 @@ const K = class K extends L {
1833
1833
  monitoringPort: e["monitoring-port"],
1834
1834
  debugAddr: e["debug-listen"],
1835
1835
  debugPort: e["debug-port"],
1836
+ s3Port: e["s3-port"],
1837
+ s3ConsolePort: e["s3-console-port"],
1836
1838
  presignHost: h
1837
1839
  }), r.info(`Instance '${s}' was created. To start it run 'up' command`), e["minio-presign-host"] && r.info(" NOTE: make sure you have 'minio' host in your hosts file as 127.0.0.1 address");
1838
1840
  }
1839
1841
  };
1840
1842
  l(K, "description", "Run Platforma Backend service as docker container on current host with MinIO as local S3 storage"), l(K, "examples", ["<%= config.bin %> <%= command.id %>"]), l(K, "flags", {
1841
- ...A,
1843
+ ...L,
1842
1844
  ...U,
1845
+ ...we,
1843
1846
  ...ye,
1844
1847
  ...j,
1845
1848
  ...be,
1846
1849
  ...J,
1847
1850
  ...B,
1848
- ...we,
1851
+ ...pe,
1849
1852
  ...G,
1850
1853
  ...yr
1851
1854
  }), l(K, "args", {
1852
1855
  name: Q.string({ required: !0 })
1853
1856
  });
1854
- let Ge = K;
1855
- const X = class X extends L {
1857
+ let Je = K;
1858
+ const X = class X extends $ {
1856
1859
  async run() {
1857
- const { flags: e, args: t } = await this.parse(X), r = I(e["log-level"]), n = new O(r);
1860
+ const { flags: e, args: t } = await this.parse(X), r = A(e["log-level"]), n = new O(r);
1858
1861
  n.mergeLicenseEnvs(e);
1859
1862
  const s = t.name, i = e["pl-workdir"] ?? ".", c = e.storage ? m.join(i, e.storage) : u.instanceDir(s), o = e["pl-log-file"] ? m.join(i, e["pl-log-file"]) : void 0, g = n.initAuthDriversList(e, i), d = e["auth-enabled"] ?? g !== void 0;
1860
1863
  let h = "127.0.0.1:6345";
@@ -1893,48 +1896,48 @@ const X = class X extends L {
1893
1896
  r.info(`Instance '${s}' was created. To start it run 'up' command`);
1894
1897
  return;
1895
1898
  }
1896
- $e(r, { version: e.version }).then(() => r.info(`Instance '${s}' was created. To start it run 'svc up' command`)).catch(function(P) {
1897
- r.error(P.message);
1899
+ Le(r, { version: e.version }).then(() => r.info(`Instance '${s}' was created. To start it run 'svc up' command`)).catch(function(k) {
1900
+ r.error(k.message);
1898
1901
  });
1899
1902
  }
1900
1903
  };
1901
1904
  l(X, "description", "Run Platforma Backend service as local process on current host (no docker container)"), l(X, "examples", ["<%= config.bin %> <%= command.id %>"]), l(X, "flags", {
1902
- ...A,
1905
+ ...L,
1903
1906
  ...j,
1904
- ...He,
1907
+ ...we,
1905
1908
  ...U,
1906
- ...Pe,
1907
1909
  ...ke,
1908
1910
  ...Se,
1911
+ ...$e,
1909
1912
  ...B,
1910
1913
  ...G,
1911
1914
  ...le,
1912
1915
  ...oe,
1913
1916
  ...de,
1914
- ...pe,
1917
+ ...Pe,
1915
1918
  ...ve,
1916
1919
  ...J
1917
1920
  }), l(X, "args", {
1918
1921
  name: Q.string({ required: !0 })
1919
1922
  });
1920
- let Je = X;
1923
+ let He = X;
1921
1924
  const Rt = {
1922
- "create-block": Te,
1923
- reset: De,
1924
- start: Ne,
1925
- stop: _e,
1925
+ "create-block": Fe,
1926
+ reset: Ne,
1927
+ start: _e,
1928
+ stop: Ce,
1926
1929
  "start:docker": dt,
1927
1930
  "start:local": gt,
1928
- "svc:delete": Ce,
1929
- "svc:down": Me,
1930
- "svc:list": je,
1931
- "svc:up": Be,
1931
+ "svc:delete": Me,
1932
+ "svc:down": je,
1933
+ "svc:list": Be,
1934
+ "svc:up": Ue,
1932
1935
  "start:docker:s3": ut,
1933
1936
  "start:local:s3": ft,
1934
- "svc:create:docker": Ue,
1937
+ "svc:create:docker": Ge,
1935
1938
  "svc:create:local": mt,
1936
- "svc:create:docker:s3": Ge,
1937
- "svc:create:local:s3": Je
1939
+ "svc:create:docker:s3": Je,
1940
+ "svc:create:local:s3": He
1938
1941
  };
1939
1942
  export {
1940
1943
  Rt as COMMANDS