@liquidmetal-ai/raindrop 0.8.1 → 0.9.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/README.md +254 -207
- package/bundle/chunk-5AOMZVOJ.js +48 -0
- package/bundle/chunk-5AP5HNN3.js +133 -0
- package/bundle/chunk-6CDCK5IP.js +58 -0
- package/bundle/chunk-6GTBXHHK.js +502 -0
- package/bundle/chunk-A26NDSVL.js +12148 -0
- package/bundle/{chunk-6UE75KX2.js → chunk-AKNNZNIC.js} +1 -2
- package/bundle/{chunk-CW5ZHVPX.js → chunk-DOTQ3CSX.js} +2 -2
- package/bundle/chunk-FO7VH4GU.js +75 -0
- package/bundle/chunk-HEOY5F6W.js +147 -0
- package/bundle/chunk-HMD2JXLE.js +238722 -0
- package/bundle/chunk-KGZ7KWP4.js +44 -0
- package/bundle/chunk-MNUILM7W.js +380 -0
- package/bundle/chunk-OROAB5YF.js +805 -0
- package/bundle/chunk-OZWZILJX.js +4539 -0
- package/bundle/{chunk-6B4I2CKP.js → chunk-YDVG2SA2.js} +4 -4
- package/bundle/chunk-ZQQFKWNC.js +22452 -0
- package/bundle/commands/annotation/get.js +4 -4
- package/bundle/commands/annotation/list.js +4 -4
- package/bundle/commands/annotation/put.js +4 -4
- package/bundle/commands/auth/list.js +2 -2
- package/bundle/commands/auth/login.js +3 -3
- package/bundle/commands/auth/logout.js +2 -2
- package/bundle/commands/auth/select.js +3 -3
- package/bundle/commands/bucket/create-credential.js +3 -3
- package/bundle/commands/bucket/delete-credential.js +3 -3
- package/bundle/commands/bucket/get-credential.js +3 -3
- package/bundle/commands/bucket/list-credentials.js +3 -3
- package/bundle/commands/build/branch.js +26 -14
- package/bundle/commands/build/checkout.js +6 -6
- package/bundle/commands/build/clone.js +5 -5
- package/bundle/commands/build/delete.js +24 -14
- package/bundle/commands/build/deploy.js +25 -13
- package/bundle/commands/build/env/get.js +19 -6
- package/bundle/commands/build/env/set.js +19 -6
- package/bundle/commands/build/find.js +18 -10
- package/bundle/commands/build/generate.js +4 -4
- package/bundle/commands/build/init.js +3 -3
- package/bundle/commands/build/list-templates.js +63 -0
- package/bundle/commands/build/list.js +4 -4
- package/bundle/commands/build/package-template.js +238 -0
- package/bundle/commands/build/sandbox.js +16 -10
- package/bundle/commands/build/start.js +10 -6
- package/bundle/commands/build/status.js +16 -11
- package/bundle/commands/build/stop.js +10 -6
- package/bundle/commands/build/tools/check.js +2 -2
- package/bundle/commands/build/tools/fmt.js +2 -2
- package/bundle/commands/build/unsandbox.js +16 -10
- package/bundle/commands/build/upload.js +23 -9
- package/bundle/commands/build/validate.js +5 -5
- package/bundle/commands/build/workos/delete.js +4 -4
- package/bundle/commands/build/workos/env/attach.js +20 -8
- package/bundle/commands/build/workos/env/create.js +60 -11
- package/bundle/commands/build/workos/env/delete.js +3 -3
- package/bundle/commands/build/workos/env/detach.js +20 -8
- package/bundle/commands/build/workos/env/get.js +21 -3
- package/bundle/commands/build/workos/env/list.js +3 -3
- package/bundle/commands/build/workos/env/set.js +91 -25
- package/bundle/commands/build/workos/invite.js +3 -3
- package/bundle/commands/build/workos/setup.js +14 -5
- package/bundle/commands/build/workos/status.js +116 -25
- package/bundle/commands/dns/create.js +2 -2
- package/bundle/commands/dns/delete.js +4 -4
- package/bundle/commands/dns/get.js +4 -4
- package/bundle/commands/dns/list.js +3 -3
- package/bundle/commands/dns/records/create.js +2 -2
- package/bundle/commands/dns/records/delete.js +3 -3
- package/bundle/commands/dns/records/get.js +2 -2
- package/bundle/commands/dns/records/list.js +2 -2
- package/bundle/commands/dns/records/update.js +2 -2
- package/bundle/commands/logs/query.js +15 -10
- package/bundle/commands/logs/tail.js +16 -11
- package/bundle/commands/mcp/install-claude.js +2 -2
- package/bundle/commands/mcp/install-gemini.js +2 -2
- package/bundle/commands/mcp/install-goose.js +2 -2
- package/bundle/commands/mcp/status.js +2 -2
- package/bundle/commands/object/delete.js +27 -14
- package/bundle/commands/object/get.js +27 -14
- package/bundle/commands/object/list.js +28 -15
- package/bundle/commands/object/put.js +27 -14
- package/bundle/commands/query/chunk-search.js +24 -10
- package/bundle/commands/query/document.js +39 -16
- package/bundle/commands/query/events.js +13 -8
- package/bundle/commands/query/reindex.js +14 -6
- package/bundle/commands/query/search.js +40 -17
- package/bundle/commands/tail.js +2 -2
- package/bundle/index.js +1 -1
- package/dist/base-command.d.ts.map +1 -1
- package/dist/base-command.js +27 -0
- package/dist/commands/annotation/get.js +1 -1
- package/dist/commands/annotation/list.js +1 -1
- package/dist/commands/annotation/put.js +1 -1
- package/dist/commands/bucket/create-credential.js +1 -1
- package/dist/commands/bucket/delete-credential.js +1 -1
- package/dist/commands/bucket/get-credential.js +1 -1
- package/dist/commands/bucket/list-credentials.js +1 -1
- package/dist/commands/build/branch.d.ts +2 -0
- package/dist/commands/build/branch.d.ts.map +1 -1
- package/dist/commands/build/branch.js +18 -5
- package/dist/commands/build/checkout.js +1 -1
- package/dist/commands/build/delete.d.ts +1 -0
- package/dist/commands/build/delete.d.ts.map +1 -1
- package/dist/commands/build/delete.js +25 -12
- package/dist/commands/build/deploy.d.ts +2 -0
- package/dist/commands/build/deploy.d.ts.map +1 -1
- package/dist/commands/build/deploy.js +17 -4
- package/dist/commands/build/env/get.d.ts +2 -0
- package/dist/commands/build/env/get.d.ts.map +1 -1
- package/dist/commands/build/env/get.js +18 -4
- package/dist/commands/build/env/set.d.ts +2 -0
- package/dist/commands/build/env/set.d.ts.map +1 -1
- package/dist/commands/build/env/set.js +18 -4
- package/dist/commands/build/find.d.ts +1 -0
- package/dist/commands/build/find.d.ts.map +1 -1
- package/dist/commands/build/find.js +18 -7
- package/dist/commands/build/generate.js +1 -1
- package/dist/commands/build/list-templates.d.ts +11 -0
- package/dist/commands/build/list-templates.d.ts.map +1 -0
- package/dist/commands/build/list-templates.js +47 -0
- package/dist/commands/build/list.js +1 -1
- package/dist/commands/build/package-template.d.ts +28 -0
- package/dist/commands/build/package-template.d.ts.map +1 -0
- package/dist/commands/build/package-template.js +256 -0
- package/dist/commands/build/sandbox.d.ts +1 -0
- package/dist/commands/build/sandbox.d.ts.map +1 -1
- package/dist/commands/build/sandbox.js +10 -3
- package/dist/commands/build/start.d.ts +1 -0
- package/dist/commands/build/start.d.ts.map +1 -1
- package/dist/commands/build/start.js +9 -4
- package/dist/commands/build/status.d.ts +1 -0
- package/dist/commands/build/status.d.ts.map +1 -1
- package/dist/commands/build/status.js +13 -7
- package/dist/commands/build/stop.d.ts +1 -0
- package/dist/commands/build/stop.d.ts.map +1 -1
- package/dist/commands/build/stop.js +9 -4
- package/dist/commands/build/unsandbox.d.ts +1 -0
- package/dist/commands/build/unsandbox.d.ts.map +1 -1
- package/dist/commands/build/unsandbox.js +10 -3
- package/dist/commands/build/upload.d.ts +3 -1
- package/dist/commands/build/upload.d.ts.map +1 -1
- package/dist/commands/build/upload.js +19 -4
- package/dist/commands/build/validate.js +1 -1
- package/dist/commands/build/workos/env/attach.d.ts +2 -0
- package/dist/commands/build/workos/env/attach.d.ts.map +1 -1
- package/dist/commands/build/workos/env/attach.js +17 -5
- package/dist/commands/build/workos/env/create.d.ts +3 -0
- package/dist/commands/build/workos/env/create.d.ts.map +1 -1
- package/dist/commands/build/workos/env/create.js +61 -8
- package/dist/commands/build/workos/env/detach.d.ts +2 -0
- package/dist/commands/build/workos/env/detach.d.ts.map +1 -1
- package/dist/commands/build/workos/env/detach.js +17 -5
- package/dist/commands/build/workos/env/get.d.ts.map +1 -1
- package/dist/commands/build/workos/env/get.js +19 -0
- package/dist/commands/build/workos/env/set.d.ts +12 -6
- package/dist/commands/build/workos/env/set.d.ts.map +1 -1
- package/dist/commands/build/workos/env/set.js +83 -22
- package/dist/commands/build/workos/setup.d.ts +1 -0
- package/dist/commands/build/workos/setup.d.ts.map +1 -1
- package/dist/commands/build/workos/setup.js +12 -3
- package/dist/commands/build/workos/status.d.ts +5 -0
- package/dist/commands/build/workos/status.d.ts.map +1 -1
- package/dist/commands/build/workos/status.js +128 -21
- package/dist/commands/logs/query.d.ts +1 -0
- package/dist/commands/logs/query.d.ts.map +1 -1
- package/dist/commands/logs/query.js +13 -7
- package/dist/commands/logs/tail.d.ts +1 -0
- package/dist/commands/logs/tail.d.ts.map +1 -1
- package/dist/commands/logs/tail.js +14 -8
- package/dist/commands/object/delete.d.ts +1 -0
- package/dist/commands/object/delete.d.ts.map +1 -1
- package/dist/commands/object/delete.js +25 -11
- package/dist/commands/object/get.d.ts +1 -0
- package/dist/commands/object/get.d.ts.map +1 -1
- package/dist/commands/object/get.js +25 -11
- package/dist/commands/object/list.d.ts +1 -0
- package/dist/commands/object/list.d.ts.map +1 -1
- package/dist/commands/object/list.js +26 -12
- package/dist/commands/object/put.d.ts +1 -0
- package/dist/commands/object/put.d.ts.map +1 -1
- package/dist/commands/object/put.js +25 -11
- package/dist/commands/query/chunk-search.d.ts +1 -0
- package/dist/commands/query/chunk-search.d.ts.map +1 -1
- package/dist/commands/query/chunk-search.js +21 -6
- package/dist/commands/query/document.d.ts +3 -1
- package/dist/commands/query/document.d.ts.map +1 -1
- package/dist/commands/query/document.js +36 -13
- package/dist/commands/query/events.d.ts +1 -0
- package/dist/commands/query/events.d.ts.map +1 -1
- package/dist/commands/query/events.js +12 -6
- package/dist/commands/query/reindex.d.ts +1 -0
- package/dist/commands/query/reindex.d.ts.map +1 -1
- package/dist/commands/query/reindex.js +13 -4
- package/dist/commands/query/search.d.ts +2 -0
- package/dist/commands/query/search.d.ts.map +1 -1
- package/dist/commands/query/search.js +37 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/templates/registry.d.ts +38 -0
- package/dist/templates/registry.d.ts.map +1 -0
- package/dist/templates/registry.js +72 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/oclif.manifest.json +3066 -2290
- package/package.json +3 -3
- package/templates/db/node_modules/.bin/prisma +2 -2
- package/templates/db/node_modules/.bin/prisma-kysely +2 -2
- package/templates/db/node_modules/.bin/tsc +2 -2
- package/templates/db/node_modules/.bin/tsserver +2 -2
- package/templates/db/node_modules/.bin/zx +2 -2
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
init_cjs_shims,
|
|
6
6
|
require_source_map,
|
|
7
7
|
valueOf
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HMD2JXLE.js";
|
|
9
9
|
|
|
10
10
|
// ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js
|
|
11
11
|
var require_utils = __commonJS({
|
|
@@ -4410,7 +4410,6 @@ function gatherEnvForHandler(handler, app) {
|
|
|
4410
4410
|
for (const env of handler.env) {
|
|
4411
4411
|
bindings[kebabCaseToConstantCase(valueOf(env.name))] = "string";
|
|
4412
4412
|
}
|
|
4413
|
-
bindings["WORKOS_ENVIRONMENT"] = "string | undefined";
|
|
4414
4413
|
if ("visibility" in handler && handler.visibility && valueOf(handler.visibility) === "protected") {
|
|
4415
4414
|
bindings["LM_AUTH_ALLOWED_ORIGINS"] = "string";
|
|
4416
4415
|
bindings["LM_AUTH_ALLOWED_ISSUERS"] = "string";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HANDLERS_DIR
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AKNNZNIC.js";
|
|
4
4
|
import {
|
|
5
5
|
Actor,
|
|
6
6
|
Service,
|
|
7
7
|
init_cjs_shims,
|
|
8
8
|
valueOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HMD2JXLE.js";
|
|
10
10
|
|
|
11
11
|
// src/build.ts
|
|
12
12
|
init_cjs_shims();
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_cjs_shims
|
|
3
|
+
} from "./chunk-HMD2JXLE.js";
|
|
4
|
+
|
|
5
|
+
// ../drizzle/dist/ulid.js
|
|
6
|
+
init_cjs_shims();
|
|
7
|
+
var BASE32_ENCODING = "0123456789abcdefghjkmnpqrstvwxyz";
|
|
8
|
+
var ENCODING_LEN = BASE32_ENCODING.length;
|
|
9
|
+
var TIME_MAX = Math.pow(2, 48) - 1;
|
|
10
|
+
var TIME_LEN = 10;
|
|
11
|
+
var RANDOM_LEN = 16;
|
|
12
|
+
function monotonic() {
|
|
13
|
+
let lastTime = 0;
|
|
14
|
+
let lastRandom;
|
|
15
|
+
return function ulid2() {
|
|
16
|
+
const seed = (/* @__PURE__ */ new Date()).getTime();
|
|
17
|
+
if (seed <= lastTime) {
|
|
18
|
+
lastRandom = incrementBase32(lastRandom);
|
|
19
|
+
return encodeTime(lastTime) + lastRandom;
|
|
20
|
+
}
|
|
21
|
+
lastTime = seed;
|
|
22
|
+
lastRandom = encodeRandom();
|
|
23
|
+
return encodeTime(seed) + lastRandom;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
var ulid = monotonic();
|
|
27
|
+
function encodeRandom() {
|
|
28
|
+
const bytes = crypto.getRandomValues(new Uint8Array(RANDOM_LEN));
|
|
29
|
+
let str = "";
|
|
30
|
+
for (let i = 0; i < RANDOM_LEN; i++) {
|
|
31
|
+
str = str + BASE32_ENCODING[bytes[i] % ENCODING_LEN];
|
|
32
|
+
}
|
|
33
|
+
return str;
|
|
34
|
+
}
|
|
35
|
+
function encodeTime(ms) {
|
|
36
|
+
if (ms > TIME_MAX)
|
|
37
|
+
throw new Error("cannot encode time greater than " + TIME_MAX);
|
|
38
|
+
if (ms < 0)
|
|
39
|
+
throw new Error("time must be positive");
|
|
40
|
+
let mod;
|
|
41
|
+
let str = "";
|
|
42
|
+
for (let len = TIME_LEN; len > 0; len--) {
|
|
43
|
+
mod = ms % ENCODING_LEN;
|
|
44
|
+
str = BASE32_ENCODING[mod] + str;
|
|
45
|
+
ms = (ms - mod) / ENCODING_LEN;
|
|
46
|
+
}
|
|
47
|
+
return str;
|
|
48
|
+
}
|
|
49
|
+
function incrementBase32(str) {
|
|
50
|
+
function replaceCharAt(str2, index2, char2) {
|
|
51
|
+
if (index2 > str2.length - 1)
|
|
52
|
+
return str2;
|
|
53
|
+
return str2.substring(0, index2) + char2 + str2.substring(index2 + 1);
|
|
54
|
+
}
|
|
55
|
+
const maxCharIndex = ENCODING_LEN - 1;
|
|
56
|
+
let index = str ? str.length : 0;
|
|
57
|
+
let char;
|
|
58
|
+
let charIndex;
|
|
59
|
+
while (index-- >= 0) {
|
|
60
|
+
char = str[index];
|
|
61
|
+
charIndex = BASE32_ENCODING.indexOf(char);
|
|
62
|
+
if (charIndex === -1)
|
|
63
|
+
throw new Error("incorrectly encoded string");
|
|
64
|
+
if (charIndex === maxCharIndex) {
|
|
65
|
+
str = replaceCharAt(str, index, BASE32_ENCODING[0]);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
return replaceCharAt(str, index, BASE32_ENCODING[charIndex + 1]);
|
|
69
|
+
}
|
|
70
|
+
return str;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
ulid
|
|
75
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import {
|
|
2
|
+
source_default
|
|
3
|
+
} from "./chunk-6GTBXHHK.js";
|
|
4
|
+
import {
|
|
5
|
+
UnitState,
|
|
6
|
+
init_cjs_shims,
|
|
7
|
+
valueOf
|
|
8
|
+
} from "./chunk-HMD2JXLE.js";
|
|
9
|
+
|
|
10
|
+
// src/status.ts
|
|
11
|
+
init_cjs_shims();
|
|
12
|
+
import * as readline from "readline";
|
|
13
|
+
var statusString = {
|
|
14
|
+
[UnitState.UNSPECIFIED]: "<unknown>",
|
|
15
|
+
[UnitState.PENDING]: "pending...",
|
|
16
|
+
[UnitState.STARTING]: "starting...",
|
|
17
|
+
[UnitState.RUNNING]: "running",
|
|
18
|
+
[UnitState.STOPPING]: "stopping...",
|
|
19
|
+
[UnitState.STOPPED]: "stopped",
|
|
20
|
+
[UnitState.DELETING]: "deleting...",
|
|
21
|
+
[UnitState.DELETED]: "deleted"
|
|
22
|
+
};
|
|
23
|
+
async function getStatus(options) {
|
|
24
|
+
const { command, impersonate } = options;
|
|
25
|
+
let applicationName = options.applicationName;
|
|
26
|
+
let versionId = options.versionId;
|
|
27
|
+
if (!versionId) {
|
|
28
|
+
const config = await command.loadConfig();
|
|
29
|
+
versionId = config.versionId;
|
|
30
|
+
}
|
|
31
|
+
if (!applicationName) {
|
|
32
|
+
const apps = await command.loadManifest();
|
|
33
|
+
const app = apps[0];
|
|
34
|
+
if (app === void 0) {
|
|
35
|
+
command.error("No application provided or found in manifest");
|
|
36
|
+
}
|
|
37
|
+
applicationName = valueOf(app.name);
|
|
38
|
+
}
|
|
39
|
+
const { client: catalogService, userId, organizationId: defaultOrganizationId } = await command.catalogService();
|
|
40
|
+
const organizationId = impersonate ?? defaultOrganizationId;
|
|
41
|
+
const status = await catalogService.status({
|
|
42
|
+
userId,
|
|
43
|
+
organizationId,
|
|
44
|
+
applicationName,
|
|
45
|
+
currentVersionId: versionId || ""
|
|
46
|
+
});
|
|
47
|
+
if (status === void 0) {
|
|
48
|
+
command.error(`Application ${applicationName} not found`);
|
|
49
|
+
}
|
|
50
|
+
return status;
|
|
51
|
+
}
|
|
52
|
+
async function watchStatus(options) {
|
|
53
|
+
const { command } = options;
|
|
54
|
+
const renderer = new StatusRenderer();
|
|
55
|
+
let applicationName = options.applicationName;
|
|
56
|
+
let versionId = options.versionId;
|
|
57
|
+
if (!applicationName) {
|
|
58
|
+
const apps = await command.loadManifest();
|
|
59
|
+
const app = apps[0];
|
|
60
|
+
if (app) {
|
|
61
|
+
applicationName = valueOf(app.name);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (!versionId) {
|
|
65
|
+
const config = await command.loadConfig();
|
|
66
|
+
versionId = config.versionId;
|
|
67
|
+
}
|
|
68
|
+
let status = await getStatus(options);
|
|
69
|
+
while (true) {
|
|
70
|
+
renderer.renderLive(status, applicationName, versionId);
|
|
71
|
+
if (status.state === UnitState.RUNNING || status.state === UnitState.STOPPED) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
75
|
+
status = await getStatus(options);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
var StatusRenderer = class {
|
|
79
|
+
linesLastRendered = 0;
|
|
80
|
+
getStatusColor(state) {
|
|
81
|
+
switch (state) {
|
|
82
|
+
case UnitState.RUNNING:
|
|
83
|
+
return source_default.green;
|
|
84
|
+
case UnitState.PENDING:
|
|
85
|
+
case UnitState.STARTING:
|
|
86
|
+
return source_default.yellow;
|
|
87
|
+
case UnitState.STOPPING:
|
|
88
|
+
case UnitState.DELETING:
|
|
89
|
+
return source_default.yellow;
|
|
90
|
+
case UnitState.STOPPED:
|
|
91
|
+
case UnitState.DELETED:
|
|
92
|
+
return source_default.red;
|
|
93
|
+
default:
|
|
94
|
+
return source_default.gray;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
renderLive(status, applicationName, versionId) {
|
|
98
|
+
if (this.linesLastRendered > 0) {
|
|
99
|
+
readline.moveCursor(process.stdout, 0, -this.linesLastRendered);
|
|
100
|
+
readline.clearScreenDown(process.stdout);
|
|
101
|
+
}
|
|
102
|
+
const lines = [];
|
|
103
|
+
lines.push("");
|
|
104
|
+
lines.push(`${source_default.bold(applicationName)} ${source_default.dim(versionId ? `@${versionId.substring(0, 8)}...` : "")}`);
|
|
105
|
+
lines.push(source_default.dim(`Status: ${this.getStatusColor(status.state)(statusString[status.state])}`));
|
|
106
|
+
lines.push("");
|
|
107
|
+
lines.push(`${source_default.bold("Modules")} ${source_default.dim(`(${status.modules.length})`)}`);
|
|
108
|
+
for (const module of status.modules) {
|
|
109
|
+
const statusColor = this.getStatusColor(module.state);
|
|
110
|
+
const notification = module.notification ? ` - ${source_default.cyan(module.notification)}` : "";
|
|
111
|
+
lines.push(` \u2514\u2500 ${source_default.yellow(module.name)} - ${statusColor(statusString[module.state])}${notification}`);
|
|
112
|
+
}
|
|
113
|
+
const runningModules = status.modules.filter((m) => m.state === UnitState.RUNNING).length;
|
|
114
|
+
const totalModules = status.modules.length;
|
|
115
|
+
lines.push("");
|
|
116
|
+
lines.push(source_default.dim("\u2500".repeat(50)));
|
|
117
|
+
lines.push(source_default.dim(`Total: ${totalModules} modules (${runningModules} running)`));
|
|
118
|
+
for (const line of lines) {
|
|
119
|
+
console.log(line);
|
|
120
|
+
}
|
|
121
|
+
this.linesLastRendered = lines.length;
|
|
122
|
+
}
|
|
123
|
+
renderCompact(status, applicationName, versionId) {
|
|
124
|
+
console.log(`
|
|
125
|
+
${source_default.bold(applicationName)} ${source_default.dim(versionId ? `@${versionId.substring(0, 8)}...` : "")}`);
|
|
126
|
+
console.log(source_default.dim(`Status: ${this.getStatusColor(status.state)(statusString[status.state])}`));
|
|
127
|
+
console.log(`
|
|
128
|
+
${source_default.bold("Modules")} ${source_default.dim(`(${status.modules.length})`)}`);
|
|
129
|
+
for (const module of status.modules) {
|
|
130
|
+
const statusColor = this.getStatusColor(module.state);
|
|
131
|
+
const notification = module.notification ? ` - ${source_default.cyan(module.notification)}` : "";
|
|
132
|
+
console.log(` \u2514\u2500 ${source_default.yellow(module.name)} - ${statusColor(statusString[module.state])}${notification}`);
|
|
133
|
+
}
|
|
134
|
+
const runningModules = status.modules.filter((m) => m.state === UnitState.RUNNING).length;
|
|
135
|
+
const totalModules = status.modules.length;
|
|
136
|
+
console.log("");
|
|
137
|
+
console.log(source_default.dim("\u2500".repeat(50)));
|
|
138
|
+
console.log(source_default.dim(`Total: ${totalModules} modules (${runningModules} running)`));
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export {
|
|
143
|
+
statusString,
|
|
144
|
+
getStatus,
|
|
145
|
+
watchStatus,
|
|
146
|
+
StatusRenderer
|
|
147
|
+
};
|