@swipt/cli 0.1.0-nightly.97 → 0.1.0-nightly.99
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/availability.d.ts +3 -1
- package/dist/availability.js +173 -151
- package/dist/availability.js.map +1 -1
- package/dist/cli/cli.js +52 -66
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/command.d.ts +9 -0
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/data/clear.js +2 -2
- package/dist/cli/commands/data/clear.js.map +1 -1
- package/dist/cli/commands/data/data.js +2 -2
- package/dist/cli/commands/data/data.js.map +1 -1
- package/dist/cli/commands/data/list.js +3 -3
- package/dist/cli/commands/data/list.js.map +1 -1
- package/dist/cli/commands/data/operand.js.map +1 -1
- package/dist/cli/commands/data/read.js +4 -7
- package/dist/cli/commands/data/read.js.map +1 -1
- package/dist/cli/commands/data/remove.js +3 -3
- package/dist/cli/commands/data/remove.js.map +1 -1
- package/dist/cli/commands/data/write.js +2 -2
- package/dist/cli/commands/data/write.js.map +1 -1
- package/dist/cli/commands/device/add.js +2 -2
- package/dist/cli/commands/device/add.js.map +1 -1
- package/dist/cli/commands/device/device.js +2 -2
- package/dist/cli/commands/device/device.js.map +1 -1
- package/dist/cli/commands/device/list.js +2 -2
- package/dist/cli/commands/device/list.js.map +1 -1
- package/dist/cli/commands/device/logs.js +44 -46
- package/dist/cli/commands/device/logs.js.map +1 -1
- package/dist/cli/commands/device/remove.js +2 -2
- package/dist/cli/commands/device/remove.js.map +1 -1
- package/dist/cli/commands/device/stop.js +3 -3
- package/dist/cli/commands/device/stop.js.map +1 -1
- package/dist/cli/commands/driver/driver.js +6 -6
- package/dist/cli/commands/driver/driver.js.map +1 -1
- package/dist/cli/commands/flags.js +9 -9
- package/dist/cli/commands/flags.js.map +1 -1
- package/dist/cli/commands/index.js +2 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/project/build.js +2 -2
- package/dist/cli/commands/project/build.js.map +1 -1
- package/dist/cli/commands/project/create.js +3 -3
- package/dist/cli/commands/project/create.js.map +1 -1
- package/dist/cli/commands/project/deploy.js +2 -2
- package/dist/cli/commands/project/deploy.js.map +1 -1
- package/dist/cli/commands/project/develop.js +19 -19
- package/dist/cli/commands/project/develop.js.map +1 -1
- package/dist/cli/commands/project/project.js +2 -2
- package/dist/cli/commands/project/project.js.map +1 -1
- package/dist/cli/commands/project/source.js +62 -37
- package/dist/cli/commands/project/source.js.map +1 -1
- package/dist/cli/commands/repl/api.js +2 -2
- package/dist/cli/commands/repl/api.js.map +1 -1
- package/dist/cli/commands/repl/repl.js +4 -4
- package/dist/cli/commands/repl/repl.js.map +1 -1
- package/dist/cli/commands/repl/reset.js +2 -2
- package/dist/cli/commands/repl/reset.js.map +1 -1
- package/dist/cli/commands/repl/run.js +5 -5
- package/dist/cli/commands/repl/run.js.map +1 -1
- package/dist/cli/commands/sideload/install.js +4 -4
- package/dist/cli/commands/sideload/install.js.map +1 -1
- package/dist/cli/commands/sideload/setup.js +3 -3
- package/dist/cli/commands/sideload/setup.js.map +1 -1
- package/dist/cli/commands/sideload/sideload.js +2 -2
- package/dist/cli/commands/sideload/sideload.js.map +1 -1
- package/dist/cli/commands/sideload/uninstall.js +2 -2
- package/dist/cli/commands/sideload/uninstall.js.map +1 -1
- package/dist/cli/commands/sideload/update.js +3 -3
- package/dist/cli/commands/sideload/update.js.map +1 -1
- package/dist/cli/commands/swiplet/call.js +6 -6
- package/dist/cli/commands/swiplet/call.js.map +1 -1
- package/dist/cli/commands/swiplet/install.js +3 -3
- package/dist/cli/commands/swiplet/install.js.map +1 -1
- package/dist/cli/commands/swiplet/list.js +8 -8
- package/dist/cli/commands/swiplet/list.js.map +1 -1
- package/dist/cli/commands/swiplet/remove.js +3 -3
- package/dist/cli/commands/swiplet/remove.js.map +1 -1
- package/dist/cli/commands/swiplet/service/disable.js +3 -3
- package/dist/cli/commands/swiplet/service/disable.js.map +1 -1
- package/dist/cli/commands/swiplet/service/enable.js +3 -3
- package/dist/cli/commands/swiplet/service/enable.js.map +1 -1
- package/dist/cli/commands/swiplet/service/service.js +2 -2
- package/dist/cli/commands/swiplet/service/service.js.map +1 -1
- package/dist/cli/commands/swiplet/service/services.js +2 -2
- package/dist/cli/commands/swiplet/service/services.js.map +1 -1
- package/dist/cli/commands/swiplet/service/watch.js +2 -2
- package/dist/cli/commands/swiplet/service/watch.js.map +1 -1
- package/dist/cli/commands/swiplet/show.js +6 -6
- package/dist/cli/commands/swiplet/show.js.map +1 -1
- package/dist/cli/commands/swiplet/swiplet.js +4 -4
- package/dist/cli/commands/swiplet/swiplet.js.map +1 -1
- package/dist/cli/commands/version/version.js +2 -2
- package/dist/cli/commands/version/version.js.map +1 -1
- package/dist/cli/deploy.js +9 -7
- package/dist/cli/deploy.js.map +1 -1
- package/dist/cli/session.js.map +1 -1
- package/dist/client.d.ts +145 -7
- package/dist/client.js +20 -22
- package/dist/client.js.map +1 -1
- package/dist/connection.d.ts +292 -25
- package/dist/connection.js +36 -35
- package/dist/connection.js.map +1 -1
- package/dist/driver.d.ts +62 -23
- package/dist/driver.js +29 -33
- package/dist/driver.js.map +1 -1
- package/dist/i18n.d.ts +2 -5
- package/dist/i18n.js +15 -13
- package/dist/i18n.js.map +1 -1
- package/dist/i18next.d.ts +7 -0
- package/dist/ignore.d.ts +14 -7
- package/dist/ignore.js +13 -14
- package/dist/ignore.js.map +1 -1
- package/dist/mdns.d.ts +2 -2
- package/dist/mdns.js +1 -1
- package/dist/mdns.js.map +1 -1
- package/dist/metro.d.ts +19 -5
- package/dist/metro.js +61 -63
- package/dist/metro.js.map +1 -1
- package/dist/output.d.ts +29 -14
- package/dist/output.js +17 -15
- package/dist/output.js.map +1 -1
- package/dist/passcode.d.ts +12 -8
- package/dist/passcode.js +18 -18
- package/dist/passcode.js.map +1 -1
- package/dist/project.d.ts +20 -10
- package/dist/project.js +72 -49
- package/dist/project.js.map +1 -1
- package/dist/proto/common_pb.d.ts +240 -0
- package/dist/proto/common_pb.js +7 -2
- package/dist/proto/common_pb.js.map +1 -1
- package/dist/proto/logs_pb.d.ts +38 -0
- package/dist/proto/repl_pb.d.ts +96 -0
- package/dist/proto/swiplets_pb.d.ts +361 -0
- package/dist/proto/swiplets_pb.js +7 -2
- package/dist/proto/swiplets_pb.js.map +1 -1
- package/dist/proto/system_pb.d.ts +33 -0
- package/dist/resources.d.ts +400 -0
- package/dist/serve.d.ts +9 -1
- package/dist/serve.js +17 -16
- package/dist/serve.js.map +1 -1
- package/dist/sideload.d.ts +27 -14
- package/dist/sideload.js +102 -89
- package/dist/sideload.js.map +1 -1
- package/dist/swipt-app.d.ts +19 -9
- package/dist/swipt-app.js +1 -1
- package/dist/swipt-app.js.map +1 -1
- package/locales/ar/translation.json +413 -0
- package/locales/bg/translation.json +397 -0
- package/locales/bn/translation.json +397 -0
- package/locales/ca/translation.json +401 -0
- package/locales/cs/translation.json +405 -0
- package/locales/da/translation.json +397 -0
- package/locales/de/translation.json +397 -0
- package/locales/el/translation.json +397 -0
- package/locales/en/translation.json +397 -0
- package/locales/es/translation.json +401 -0
- package/locales/es-419/translation.json +401 -0
- package/locales/fi/translation.json +397 -0
- package/locales/fr/translation.json +401 -0
- package/locales/fr-CA/translation.json +401 -0
- package/locales/gu/translation.json +397 -0
- package/locales/he/translation.json +401 -0
- package/locales/hi/translation.json +397 -0
- package/locales/hr/translation.json +401 -0
- package/locales/hu/translation.json +397 -0
- package/locales/id/translation.json +393 -0
- package/locales/it/translation.json +401 -0
- package/locales/ja/translation.json +393 -0
- package/locales/kk/translation.json +397 -0
- package/locales/kn/translation.json +397 -0
- package/locales/ko/translation.json +393 -0
- package/locales/lt/translation.json +405 -0
- package/locales/ml/translation.json +397 -0
- package/locales/mr/translation.json +397 -0
- package/locales/ms/translation.json +393 -0
- package/locales/nb/translation.json +397 -0
- package/locales/nl/translation.json +397 -0
- package/locales/or/translation.json +397 -0
- package/locales/pa/translation.json +397 -0
- package/locales/pl/translation.json +405 -0
- package/locales/pt-BR/translation.json +401 -0
- package/locales/pt-PT/translation.json +401 -0
- package/locales/ro/translation.json +401 -0
- package/locales/ru/translation.json +405 -0
- package/locales/sk/translation.json +405 -0
- package/locales/sl/translation.json +405 -0
- package/locales/sv/translation.json +397 -0
- package/locales/ta/translation.json +397 -0
- package/locales/te/translation.json +397 -0
- package/locales/th/translation.json +393 -0
- package/locales/tr/translation.json +397 -0
- package/locales/uk/translation.json +405 -0
- package/locales/ur/translation.json +397 -0
- package/locales/vi/translation.json +397 -0
- package/locales/zh-HK/translation.json +393 -0
- package/locales/zh-Hans/translation.json +393 -0
- package/locales/zh-Hant/translation.json +393 -0
- package/package.json +14 -9
- package/locales/ar.json +0 -311
- package/locales/bg.json +0 -295
- package/locales/bn.json +0 -295
- package/locales/ca.json +0 -299
- package/locales/cs.json +0 -303
- package/locales/da.json +0 -295
- package/locales/de.json +0 -295
- package/locales/el.json +0 -295
- package/locales/es-419.json +0 -299
- package/locales/es.json +0 -299
- package/locales/fi.json +0 -295
- package/locales/fr-CA.json +0 -299
- package/locales/fr.json +0 -299
- package/locales/gu.json +0 -295
- package/locales/he.json +0 -299
- package/locales/hi.json +0 -295
- package/locales/hr.json +0 -299
- package/locales/hu.json +0 -295
- package/locales/id.json +0 -283
- package/locales/it.json +0 -299
- package/locales/ja.json +0 -283
- package/locales/kk.json +0 -295
- package/locales/kn.json +0 -295
- package/locales/ko.json +0 -283
- package/locales/lt.json +0 -303
- package/locales/ml.json +0 -295
- package/locales/mr.json +0 -295
- package/locales/ms.json +0 -283
- package/locales/nb.json +0 -295
- package/locales/nl.json +0 -295
- package/locales/or.json +0 -295
- package/locales/pa.json +0 -295
- package/locales/pl.json +0 -303
- package/locales/pt-BR.json +0 -299
- package/locales/pt-PT.json +0 -299
- package/locales/ro.json +0 -299
- package/locales/ru.json +0 -303
- package/locales/sk.json +0 -303
- package/locales/sl.json +0 -303
- package/locales/sv.json +0 -295
- package/locales/ta.json +0 -295
- package/locales/te.json +0 -295
- package/locales/th.json +0 -283
- package/locales/tr.json +0 -295
- package/locales/uk.json +0 -303
- package/locales/ur.json +0 -295
- package/locales/vi.json +0 -295
- package/locales/zh-HK.json +0 -283
- package/locales/zh-Hans.json +0 -283
- package/locales/zh-Hant.json +0 -283
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UsageError } from "../../../client.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t } from "../../../i18n.js";
|
|
3
3
|
import { printScriptError } from "../../../output.js";
|
|
4
4
|
import "../../../proto/common_pb.js";
|
|
5
5
|
import { defineCommand } from "../../command.js";
|
|
@@ -31,7 +31,7 @@ function readScript([first, ...args]) {
|
|
|
31
31
|
program: true,
|
|
32
32
|
file: first
|
|
33
33
|
};
|
|
34
|
-
if (args.length > 0) throw new UsageError(
|
|
34
|
+
if (args.length > 0) throw new UsageError(t("commands.repl.run.extraArguments", { argument: JSON.stringify(first) }));
|
|
35
35
|
return {
|
|
36
36
|
code: first,
|
|
37
37
|
args,
|
|
@@ -92,14 +92,14 @@ async function runScript(context) {
|
|
|
92
92
|
const run = defineCommand({
|
|
93
93
|
name: "run",
|
|
94
94
|
use: "run [CODE | FILE [ARG...] | - [ARG...]]",
|
|
95
|
-
short:
|
|
96
|
-
description: [
|
|
95
|
+
short: t("commands.repl.run.description"),
|
|
96
|
+
description: [t("commands.repl.run.arguments"), t("commands.repl.run.details")],
|
|
97
97
|
args: [0, Infinity],
|
|
98
98
|
passthrough: isProgram,
|
|
99
99
|
options: { output: {
|
|
100
100
|
type: "string",
|
|
101
101
|
value: "DIRECTORY",
|
|
102
|
-
help:
|
|
102
|
+
help: t("commands.repl.run.images")
|
|
103
103
|
} },
|
|
104
104
|
run: runScript
|
|
105
105
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","names":[],"sources":["../../../../src/cli/commands/repl/run.ts"],"sourcesContent":["import crypto from \"node:crypto\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport { UsageError } from \"../../../client\";\nimport {
|
|
1
|
+
{"version":3,"file":"run.js","names":[],"sources":["../../../../src/cli/commands/repl/run.ts"],"sourcesContent":["import crypto from \"node:crypto\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport { UsageError } from \"../../../client\";\nimport { t } from \"../../../i18n\";\nimport { printScriptError } from \"../../../output\";\nimport { LogLevel } from \"../../../proto/common_pb\";\nimport { type Context, defineCommand } from \"../../command\";\nimport { readStdin } from \"../../io\";\nimport { session } from \"../../session\";\n\nconst isFile = (name: string) => {\n try {\n return fs.statSync(name).isFile();\n } catch {\n return false;\n }\n};\n\nconst isProgram = (first: string) => first === \"-\" || isFile(first);\n\nfunction readScript([first, ...args]: string[]) {\n if (first === undefined || first === \"-\") {\n return {\n code: readStdin().toString(),\n args,\n program: true,\n file: \"input.js\",\n };\n }\n if (isFile(first)) {\n return {\n code: fs.readFileSync(first, \"utf8\"),\n args,\n program: true,\n file: first,\n };\n }\n if (args.length > 0) {\n throw new UsageError(\n t(\"commands.repl.run.extraArguments\", {\n argument: JSON.stringify(first),\n }),\n );\n }\n return { code: first, args, program: false, file: \"input.js\" };\n}\n\nclass ImageSink {\n declare output: string | undefined;\n directory = \"\";\n\n constructor(output: string | undefined) {\n this.output = output;\n }\n\n save(data: Uint8Array) {\n if (this.directory === \"\") {\n if (this.output !== undefined && this.output !== \"\") {\n this.directory = path.resolve(this.output);\n fs.mkdirSync(this.directory, { recursive: true });\n } else {\n this.directory = fs.mkdtempSync(path.join(os.tmpdir(), \"swipt-repl-\"));\n }\n }\n const name = path.join(\n this.directory,\n `image-${crypto.randomBytes(5).toString(\"hex\")}.png`,\n );\n fs.writeFileSync(name, data);\n return name;\n }\n}\n\nasync function runScript(\n context: Context<{ device?: string; output?: string }>,\n) {\n const { args, options, signal } = context;\n const script = readScript(args);\n await session(context, async (client) => {\n const images = new ImageSink(options.output);\n let failure;\n for await (const response of client.repl.execute(\n { code: script.code, args: script.args, program: script.program },\n { signal },\n )) {\n switch (response.part.case) {\n case \"console\": {\n const output = response.part.value;\n (output.level === LogLevel.ERROR || output.level === LogLevel.WARN\n ? console.error\n : console.log)(output.text);\n break;\n }\n case \"value\":\n console.log(response.part.value.text);\n break;\n case \"image\":\n console.log(`[image: ${images.save(response.part.value)}]`);\n break;\n case \"error\":\n failure = response.part.value;\n break;\n }\n }\n if (failure) {\n throw printScriptError({\n ...failure,\n stack: failure.stack.map((frame) =>\n frame.file === \"input.js\" ? { ...frame, file: script.file } : frame,\n ),\n });\n }\n });\n}\n\nexport const run = defineCommand({\n name: \"run\",\n use: \"run [CODE | FILE [ARG...] | - [ARG...]]\",\n short: t(\"commands.repl.run.description\"),\n description: [\n t(\"commands.repl.run.arguments\"),\n t(\"commands.repl.run.details\"),\n ],\n args: [0, Infinity],\n passthrough: isProgram,\n options: {\n output: {\n type: \"string\",\n value: \"DIRECTORY\",\n help: t(\"commands.repl.run.images\"),\n },\n },\n run: runScript,\n});\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,UAAU,SAAiB;CAC/B,IAAI;EACF,OAAO,GAAG,SAAS,IAAI,CAAC,CAAC,OAAO;CAClC,QAAQ;EACN,OAAO;CACT;AACF;AAEA,MAAM,aAAa,UAAkB,UAAU,OAAO,OAAO,KAAK;AAElE,SAAS,WAAW,CAAC,OAAO,GAAG,OAAiB;CAC9C,IAAI,UAAU,KAAA,KAAa,UAAU,KACnC,OAAO;EACL,MAAM,UAAU,CAAC,CAAC,SAAS;EAC3B;EACA,SAAS;EACT,MAAM;CACR;CAEF,IAAI,OAAO,KAAK,GACd,OAAO;EACL,MAAM,GAAG,aAAa,OAAO,MAAM;EACnC;EACA,SAAS;EACT,MAAM;CACR;CAEF,IAAI,KAAK,SAAS,GAChB,MAAM,IAAI,WACR,EAAE,oCAAoC,EACpC,UAAU,KAAK,UAAU,KAAK,EAChC,CAAC,CACH;CAEF,OAAO;EAAE,MAAM;EAAO;EAAM,SAAS;EAAO,MAAM;CAAW;AAC/D;AAEA,IAAM,YAAN,MAAgB;CAEd,YAAY;CAEZ,YAAY,QAA4B;EACtC,KAAK,SAAS;CAChB;CAEA,KAAK,MAAkB;EACrB,IAAI,KAAK,cAAc,IAAI;GACzB,IAAI,KAAK,WAAW,KAAA,KAAa,KAAK,WAAW,IAAI;IACnD,KAAK,YAAY,KAAK,QAAQ,KAAK,MAAM;IACzC,GAAG,UAAU,KAAK,WAAW,EAAE,WAAW,KAAK,CAAC;GAClD,OACE,KAAK,YAAY,GAAG,YAAY,KAAK,KAAK,GAAG,OAAO,GAAG,aAAa,CAAC;EAEzE;EACA,MAAM,OAAO,KAAK,KAChB,KAAK,WACL,SAAS,OAAO,YAAY,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,KACjD;EACA,GAAG,cAAc,MAAM,IAAI;EAC3B,OAAO;CACT;AACF;AAEA,eAAe,UACb,SACA;CACA,MAAM,EAAE,MAAM,SAAS,WAAW;CAClC,MAAM,SAAS,WAAW,IAAI;CAC9B,MAAM,QAAQ,SAAS,OAAO,WAAW;EACvC,MAAM,SAAS,IAAI,UAAU,QAAQ,MAAM;EAC3C,IAAI;EACJ,WAAW,MAAM,YAAY,OAAO,KAAK,QACvC;GAAE,MAAM,OAAO;GAAM,MAAM,OAAO;GAAM,SAAS,OAAO;EAAQ,GAChE,EAAE,OAAO,CACX,GACE,QAAQ,SAAS,KAAK,MAAtB;GACE,KAAK,WAAW;IACd,MAAM,SAAS,SAAS,KAAK;IAC7B,CAAC,OAAO,UAAA,KAA4B,OAAO,UAAA,IACvC,QAAQ,QACR,QAAQ,IAAA,CAAK,OAAO,IAAI;IAC5B;GACF;GACA,KAAK;IACH,QAAQ,IAAI,SAAS,KAAK,MAAM,IAAI;IACpC;GACF,KAAK;IACH,QAAQ,IAAI,WAAW,OAAO,KAAK,SAAS,KAAK,KAAK,EAAE,EAAE;IAC1D;GACF,KAAK,SACH,UAAU,SAAS,KAAK;EAE5B;EAEF,IAAI,SACF,MAAM,iBAAiB;GACrB,GAAG;GACH,OAAO,QAAQ,MAAM,KAAK,UACxB,MAAM,SAAS,aAAa;IAAE,GAAG;IAAO,MAAM,OAAO;GAAK,IAAI,KAChE;EACF,CAAC;CAEL,CAAC;AACH;AAEA,MAAa,MAAM,cAAc;CAC/B,MAAM;CACN,KAAK;CACL,OAAO,EAAE,+BAA+B;CACxC,aAAa,CACX,EAAE,6BAA6B,GAC/B,EAAE,2BAA2B,CAC/B;CACA,MAAM,CAAC,GAAG,QAAQ;CAClB,aAAa;CACb,SAAS,EACP,QAAQ;EACN,MAAM;EACN,OAAO;EACP,MAAM,EAAE,0BAA0B;CACpC,EACF;CACA,KAAK;AACP,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { install as install$1 } from "../../../sideload.js";
|
|
3
3
|
import { defineCommand } from "../../command.js";
|
|
4
4
|
import { nightlyOption, passcodeOptions, setupOptions } from "../flags.js";
|
|
5
5
|
// src/cli/commands/sideload/install.ts
|
|
6
6
|
const install = defineCommand({
|
|
7
7
|
name: "install",
|
|
8
|
-
short:
|
|
8
|
+
short: t("commands.sideload.install.description"),
|
|
9
9
|
args: [0, 0],
|
|
10
10
|
options: {
|
|
11
|
-
...passcodeOptions(
|
|
11
|
+
...passcodeOptions(t("commands.sideload.passcode")),
|
|
12
12
|
...nightlyOption,
|
|
13
13
|
force: {
|
|
14
14
|
type: "boolean",
|
|
15
|
-
help:
|
|
15
|
+
help: t("commands.sideload.install.force")
|
|
16
16
|
},
|
|
17
17
|
...setupOptions
|
|
18
18
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","names":["sideload.install"],"sources":["../../../../src/cli/commands/sideload/install.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"install.js","names":["sideload.install"],"sources":["../../../../src/cli/commands/sideload/install.ts"],"sourcesContent":["import { t } from \"../../../i18n\";\nimport * as sideload from \"../../../sideload\";\nimport { defineCommand } from \"../../command\";\nimport { nightlyOption, passcodeOptions, setupOptions } from \"../flags\";\n\nexport const install = defineCommand({\n name: \"install\",\n short: t(\"commands.sideload.install.description\"),\n args: [0, 0],\n options: {\n ...passcodeOptions(t(\"commands.sideload.passcode\")),\n ...nightlyOption,\n force: {\n type: \"boolean\",\n help: t(\"commands.sideload.install.force\"),\n },\n ...setupOptions,\n },\n run: sideload.install,\n});\n"],"mappings":";;;;;AAKA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,OAAO,EAAE,uCAAuC;CAChD,MAAM,CAAC,GAAG,CAAC;CACX,SAAS;EACP,GAAG,gBAAgB,EAAE,4BAA4B,CAAC;EAClD,GAAG;EACH,OAAO;GACL,MAAM;GACN,MAAM,EAAE,iCAAiC;EAC3C;EACA,GAAG;CACL;CACA,KAAKA;AACP,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { setup as setup$1 } from "../../../sideload.js";
|
|
3
3
|
import { defineCommand } from "../../command.js";
|
|
4
4
|
import { passcodeOptions, setupStepOptions } from "../flags.js";
|
|
5
5
|
// src/cli/commands/sideload/setup.ts
|
|
6
6
|
const setup = defineCommand({
|
|
7
7
|
name: "setup",
|
|
8
|
-
short:
|
|
8
|
+
short: t("commands.sideload.setup.description"),
|
|
9
9
|
args: [0, 0],
|
|
10
10
|
options: {
|
|
11
|
-
...passcodeOptions(
|
|
11
|
+
...passcodeOptions(t("commands.sideload.passcode")),
|
|
12
12
|
...setupStepOptions
|
|
13
13
|
},
|
|
14
14
|
run: setup$1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","names":["sideload.setup"],"sources":["../../../../src/cli/commands/sideload/setup.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"setup.js","names":["sideload.setup"],"sources":["../../../../src/cli/commands/sideload/setup.ts"],"sourcesContent":["import { t } from \"../../../i18n\";\nimport * as sideload from \"../../../sideload\";\nimport { defineCommand } from \"../../command\";\nimport { passcodeOptions, setupStepOptions } from \"../flags\";\n\nexport const setup = defineCommand({\n name: \"setup\",\n short: t(\"commands.sideload.setup.description\"),\n args: [0, 0],\n options: {\n ...passcodeOptions(t(\"commands.sideload.passcode\")),\n ...setupStepOptions,\n },\n run: sideload.setup,\n});\n"],"mappings":";;;;;AAKA,MAAa,QAAQ,cAAc;CACjC,MAAM;CACN,OAAO,EAAE,qCAAqC;CAC9C,MAAM,CAAC,GAAG,CAAC;CACX,SAAS;EACP,GAAG,gBAAgB,EAAE,4BAA4B,CAAC;EAClD,GAAG;CACL;CACA,KAAKA;AACP,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { defineCommand } from "../../command.js";
|
|
3
3
|
import { sideloadOptions } from "../flags.js";
|
|
4
4
|
import { install } from "./install.js";
|
|
@@ -8,7 +8,7 @@ import { update } from "./update.js";
|
|
|
8
8
|
// src/cli/commands/sideload/sideload.ts
|
|
9
9
|
const sideload = defineCommand({
|
|
10
10
|
name: "sideload",
|
|
11
|
-
short:
|
|
11
|
+
short: t("commands.sideload.description"),
|
|
12
12
|
options: sideloadOptions,
|
|
13
13
|
commands: [
|
|
14
14
|
install,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sideload.js","names":[],"sources":["../../../../src/cli/commands/sideload/sideload.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"sideload.js","names":[],"sources":["../../../../src/cli/commands/sideload/sideload.ts"],"sourcesContent":["import { t } from \"../../../i18n\";\nimport { defineCommand } from \"../../command\";\nimport { sideloadOptions } from \"../flags\";\nimport { install } from \"./install\";\nimport { setup } from \"./setup\";\nimport { uninstall } from \"./uninstall\";\nimport { update } from \"./update\";\n\nexport const sideload = defineCommand({\n name: \"sideload\",\n short: t(\"commands.sideload.description\"),\n options: sideloadOptions,\n commands: [install, update, setup, uninstall],\n});\n"],"mappings":";;;;;;;;AAQA,MAAa,WAAW,cAAc;CACpC,MAAM;CACN,OAAO,EAAE,+BAA+B;CACxC,SAAS;CACT,UAAU;EAAC;EAAS;EAAQ;EAAO;CAAS;AAC9C,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { uninstall as uninstall$1 } from "../../../sideload.js";
|
|
3
3
|
import { defineCommand } from "../../command.js";
|
|
4
4
|
// src/cli/commands/sideload/uninstall.ts
|
|
5
5
|
const uninstall = defineCommand({
|
|
6
6
|
name: "uninstall",
|
|
7
|
-
short:
|
|
7
|
+
short: t("commands.sideload.uninstall.description"),
|
|
8
8
|
args: [0, 0],
|
|
9
9
|
run: uninstall$1
|
|
10
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","names":["sideload.uninstall"],"sources":["../../../../src/cli/commands/sideload/uninstall.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"uninstall.js","names":["sideload.uninstall"],"sources":["../../../../src/cli/commands/sideload/uninstall.ts"],"sourcesContent":["import { t } from \"../../../i18n\";\nimport * as sideload from \"../../../sideload\";\nimport { defineCommand } from \"../../command\";\n\nexport const uninstall = defineCommand({\n name: \"uninstall\",\n short: t(\"commands.sideload.uninstall.description\"),\n args: [0, 0],\n run: sideload.uninstall,\n});\n"],"mappings":";;;;AAIA,MAAa,YAAY,cAAc;CACrC,MAAM;CACN,OAAO,EAAE,yCAAyC;CAClD,MAAM,CAAC,GAAG,CAAC;CACX,KAAKA;AACP,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { update as update$1 } from "../../../sideload.js";
|
|
3
3
|
import { defineCommand } from "../../command.js";
|
|
4
4
|
import { nightlyOption, passcodeOptions, setupOptions } from "../flags.js";
|
|
5
5
|
// src/cli/commands/sideload/update.ts
|
|
6
6
|
const update = defineCommand({
|
|
7
7
|
name: "update",
|
|
8
|
-
short:
|
|
8
|
+
short: t("commands.sideload.update.description"),
|
|
9
9
|
args: [0, 0],
|
|
10
10
|
options: {
|
|
11
|
-
...passcodeOptions(
|
|
11
|
+
...passcodeOptions(t("commands.sideload.update.passcode")),
|
|
12
12
|
...nightlyOption,
|
|
13
13
|
...setupOptions
|
|
14
14
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","names":["sideload.update"],"sources":["../../../../src/cli/commands/sideload/update.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"update.js","names":["sideload.update"],"sources":["../../../../src/cli/commands/sideload/update.ts"],"sourcesContent":["import { t } from \"../../../i18n\";\nimport * as sideload from \"../../../sideload\";\nimport { defineCommand } from \"../../command\";\nimport { nightlyOption, passcodeOptions, setupOptions } from \"../flags\";\n\nexport const update = defineCommand({\n name: \"update\",\n short: t(\"commands.sideload.update.description\"),\n args: [0, 0],\n options: {\n ...passcodeOptions(t(\"commands.sideload.update.passcode\")),\n ...nightlyOption,\n ...setupOptions,\n },\n run: sideload.update,\n});\n"],"mappings":";;;;;AAKA,MAAa,SAAS,cAAc;CAClC,MAAM;CACN,OAAO,EAAE,sCAAsC;CAC/C,MAAM,CAAC,GAAG,CAAC;CACX,SAAS;EACP,GAAG,gBAAgB,EAAE,mCAAmC,CAAC;EACzD,GAAG;EACH,GAAG;CACL;CACA,KAAKA;AACP,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UsageError } from "../../../client.js";
|
|
2
|
-
import {
|
|
3
|
-
import { printLog, printScriptError } from "../../../output.js";
|
|
2
|
+
import { t } from "../../../i18n.js";
|
|
3
|
+
import { errorMessage, printLog, printScriptError } from "../../../output.js";
|
|
4
4
|
import { defineCommand } from "../../command.js";
|
|
5
5
|
import { readStdin } from "../../io.js";
|
|
6
6
|
import { session } from "../../session.js";
|
|
@@ -15,12 +15,12 @@ function readInput(value) {
|
|
|
15
15
|
if (value === "-") data = readStdin().toString();
|
|
16
16
|
else if (value.startsWith("@")) data = fs.readFileSync(value.slice(1), "utf8");
|
|
17
17
|
} catch (error) {
|
|
18
|
-
throw new Error(`read --input: ${error
|
|
18
|
+
throw new Error(`read --input: ${errorMessage(error)}`);
|
|
19
19
|
}
|
|
20
20
|
try {
|
|
21
21
|
return fromJson(ValueSchema, JSON.parse(data));
|
|
22
22
|
} catch (error) {
|
|
23
|
-
throw new UsageError(
|
|
23
|
+
throw new UsageError(t("commands.swiplet.call.invalidInput", { error: errorMessage(error) }));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
const callAction = (context) => session(context, async (client) => {
|
|
@@ -44,12 +44,12 @@ const callAction = (context) => session(context, async (client) => {
|
|
|
44
44
|
const call = defineCommand({
|
|
45
45
|
name: "call",
|
|
46
46
|
use: "call ID ACTION",
|
|
47
|
-
short:
|
|
47
|
+
short: t("commands.swiplet.call.description"),
|
|
48
48
|
args: [2, 2],
|
|
49
49
|
options: { input: {
|
|
50
50
|
type: "string",
|
|
51
51
|
value: "JSON",
|
|
52
|
-
help:
|
|
52
|
+
help: t("commands.swiplet.call.input")
|
|
53
53
|
} },
|
|
54
54
|
run: callAction
|
|
55
55
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.js","names":[],"sources":["../../../../src/cli/commands/swiplet/call.ts"],"sourcesContent":["import fs from \"node:fs\";\n\nimport { fromJson, toJson } from \"@bufbuild/protobuf\";\nimport { ValueSchema } from \"@bufbuild/protobuf/wkt\";\n\nimport { UsageError } from \"../../../client\";\nimport {
|
|
1
|
+
{"version":3,"file":"call.js","names":[],"sources":["../../../../src/cli/commands/swiplet/call.ts"],"sourcesContent":["import fs from \"node:fs\";\n\nimport { fromJson, toJson } from \"@bufbuild/protobuf\";\nimport { ValueSchema } from \"@bufbuild/protobuf/wkt\";\n\nimport { UsageError } from \"../../../client\";\nimport { t } from \"../../../i18n\";\nimport { errorMessage, printLog, printScriptError } from \"../../../output\";\nimport { type Context, defineCommand } from \"../../command\";\nimport { readStdin } from \"../../io\";\nimport { session } from \"../../session\";\n\nfunction readInput(value: string | undefined) {\n if (value === undefined || value === \"\") {\n return undefined;\n }\n let data = value;\n try {\n if (value === \"-\") {\n data = readStdin().toString();\n } else if (value.startsWith(\"@\")) {\n data = fs.readFileSync(value.slice(1), \"utf8\");\n }\n } catch (error) {\n throw new Error(`read --input: ${errorMessage(error)}`);\n }\n try {\n return fromJson(ValueSchema, JSON.parse(data));\n } catch (error) {\n throw new UsageError(\n t(\"commands.swiplet.call.invalidInput\", {\n error: errorMessage(error),\n }),\n );\n }\n}\n\nconst callAction = (context: Context<{ device?: string; input?: string }>) =>\n session(context, async (client) => {\n const [id, action] = context.args;\n const input = readInput(context.options.input);\n let result;\n for await (const response of client.swiplets.callAction(\n { swipletId: id, action, input },\n { signal: context.signal },\n )) {\n if (response.part.case === \"log\") {\n printLog(response.part.value, false);\n } else if (response.part.case === \"value\") {\n console.log(JSON.stringify(toJson(ValueSchema, response.part.value)));\n } else if (response.part.case === \"result\") {\n result = response.part.value;\n }\n }\n if (result?.outcome.case === \"output\") {\n console.log(\n JSON.stringify(toJson(ValueSchema, result.outcome.value), null, 2),\n );\n return;\n }\n if (result?.outcome.case === \"error\") {\n throw printScriptError(result.outcome.value);\n }\n if (result === undefined) {\n throw new Error(\"the server sent no result\");\n }\n });\n\nexport const call = defineCommand({\n name: \"call\",\n use: \"call ID ACTION\",\n short: t(\"commands.swiplet.call.description\"),\n args: [2, 2],\n options: {\n input: {\n type: \"string\",\n value: \"JSON\",\n help: t(\"commands.swiplet.call.input\"),\n },\n },\n run: callAction,\n});\n"],"mappings":";;;;;;;;;;AAYA,SAAS,UAAU,OAA2B;CAC5C,IAAI,UAAU,KAAA,KAAa,UAAU,IACnC;CAEF,IAAI,OAAO;CACX,IAAI;EACF,IAAI,UAAU,KACZ,OAAO,UAAU,CAAC,CAAC,SAAS;OACvB,IAAI,MAAM,WAAW,GAAG,GAC7B,OAAO,GAAG,aAAa,MAAM,MAAM,CAAC,GAAG,MAAM;CAEjD,SAAS,OAAO;EACd,MAAM,IAAI,MAAM,iBAAiB,aAAa,KAAK,GAAG;CACxD;CACA,IAAI;EACF,OAAO,SAAS,aAAa,KAAK,MAAM,IAAI,CAAC;CAC/C,SAAS,OAAO;EACd,MAAM,IAAI,WACR,EAAE,sCAAsC,EACtC,OAAO,aAAa,KAAK,EAC3B,CAAC,CACH;CACF;AACF;AAEA,MAAM,cAAc,YAClB,QAAQ,SAAS,OAAO,WAAW;CACjC,MAAM,CAAC,IAAI,UAAU,QAAQ;CAC7B,MAAM,QAAQ,UAAU,QAAQ,QAAQ,KAAK;CAC7C,IAAI;CACJ,WAAW,MAAM,YAAY,OAAO,SAAS,WAC3C;EAAE,WAAW;EAAI;EAAQ;CAAM,GAC/B,EAAE,QAAQ,QAAQ,OAAO,CAC3B,GACE,IAAI,SAAS,KAAK,SAAS,OACzB,SAAS,SAAS,KAAK,OAAO,KAAK;MAC9B,IAAI,SAAS,KAAK,SAAS,SAChC,QAAQ,IAAI,KAAK,UAAU,OAAO,aAAa,SAAS,KAAK,KAAK,CAAC,CAAC;MAC/D,IAAI,SAAS,KAAK,SAAS,UAChC,SAAS,SAAS,KAAK;CAG3B,IAAI,QAAQ,QAAQ,SAAS,UAAU;EACrC,QAAQ,IACN,KAAK,UAAU,OAAO,aAAa,OAAO,QAAQ,KAAK,GAAG,MAAM,CAAC,CACnE;EACA;CACF;CACA,IAAI,QAAQ,QAAQ,SAAS,SAC3B,MAAM,iBAAiB,OAAO,QAAQ,KAAK;CAE7C,IAAI,WAAW,KAAA,GACb,MAAM,IAAI,MAAM,2BAA2B;AAE/C,CAAC;AAEH,MAAa,OAAO,cAAc;CAChC,MAAM;CACN,KAAK;CACL,OAAO,EAAE,mCAAmC;CAC5C,MAAM,CAAC,GAAG,CAAC;CACX,SAAS,EACP,OAAO;EACL,MAAM;EACN,OAAO;EACP,MAAM,EAAE,6BAA6B;CACvC,EACF;CACA,KAAK;AACP,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { defineCommand } from "../../command.js";
|
|
3
3
|
import { deploy, printDeployed } from "../../deploy.js";
|
|
4
4
|
import { session } from "../../session.js";
|
|
@@ -6,13 +6,13 @@ import fs from "node:fs";
|
|
|
6
6
|
// src/cli/commands/swiplet/install.ts
|
|
7
7
|
async function installArchive(context) {
|
|
8
8
|
const [archive] = context.args;
|
|
9
|
-
if (!fs.existsSync(archive)) throw new Error(
|
|
9
|
+
if (!fs.existsSync(archive)) throw new Error(t("commands.swiplet.install.notFound", { path: archive }));
|
|
10
10
|
await session(context, async (client) => printDeployed(await deploy(client, archive, context.signal), true));
|
|
11
11
|
}
|
|
12
12
|
const install = defineCommand({
|
|
13
13
|
name: "install",
|
|
14
14
|
use: "install ARCHIVE",
|
|
15
|
-
short:
|
|
15
|
+
short: t("commands.swiplet.install.description"),
|
|
16
16
|
args: [1, 1],
|
|
17
17
|
run: installArchive
|
|
18
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","names":[],"sources":["../../../../src/cli/commands/swiplet/install.ts"],"sourcesContent":["import fs from \"node:fs\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"install.js","names":[],"sources":["../../../../src/cli/commands/swiplet/install.ts"],"sourcesContent":["import fs from \"node:fs\";\n\nimport { t } from \"../../../i18n\";\nimport { type Context, defineCommand } from \"../../command\";\nimport { deploy, printDeployed } from \"../../deploy\";\nimport { session } from \"../../session\";\n\nasync function installArchive(context: Context<{ device?: string }>) {\n const [archive] = context.args;\n if (!fs.existsSync(archive)) {\n throw new Error(t(\"commands.swiplet.install.notFound\", { path: archive }));\n }\n await session(context, async (client) =>\n printDeployed(await deploy(client, archive, context.signal), true),\n );\n}\n\nexport const install = defineCommand({\n name: \"install\",\n use: \"install ARCHIVE\",\n short: t(\"commands.swiplet.install.description\"),\n args: [1, 1],\n run: installArchive,\n});\n"],"mappings":";;;;;;AAOA,eAAe,eAAe,SAAuC;CACnE,MAAM,CAAC,WAAW,QAAQ;CAC1B,IAAI,CAAC,GAAG,WAAW,OAAO,GACxB,MAAM,IAAI,MAAM,EAAE,qCAAqC,EAAE,MAAM,QAAQ,CAAC,CAAC;CAE3E,MAAM,QAAQ,SAAS,OAAO,WAC5B,cAAc,MAAM,OAAO,QAAQ,SAAS,QAAQ,MAAM,GAAG,IAAI,CACnE;AACF;AAEA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,KAAK;CACL,OAAO,EAAE,sCAAsC;CAC/C,MAAM,CAAC,GAAG,CAAC;CACX,KAAK;AACP,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { columns, serviceEnabledText, serviceStatusText } from "../../../output.js";
|
|
3
3
|
import { defineCommand } from "../../command.js";
|
|
4
4
|
import { session } from "../../session.js";
|
|
@@ -23,17 +23,17 @@ const listSwiplets = (context) => session(context, async (client) => {
|
|
|
23
23
|
];
|
|
24
24
|
});
|
|
25
25
|
console.log(columns([[
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
t("commands.swiplet.list.id"),
|
|
27
|
+
t("commands.swiplet.list.title"),
|
|
28
|
+
t("commands.swiplet.list.version"),
|
|
29
|
+
t("commands.swiplet.list.actions"),
|
|
30
|
+
t("commands.swiplet.list.service"),
|
|
31
|
+
t("commands.swiplet.list.status")
|
|
32
32
|
], ...rows]));
|
|
33
33
|
});
|
|
34
34
|
const list = defineCommand({
|
|
35
35
|
name: "list",
|
|
36
|
-
short:
|
|
36
|
+
short: t("commands.swiplet.list.description"),
|
|
37
37
|
args: [0, 0],
|
|
38
38
|
run: listSwiplets
|
|
39
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","names":[],"sources":["../../../../src/cli/commands/swiplet/list.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"list.js","names":[],"sources":["../../../../src/cli/commands/swiplet/list.ts"],"sourcesContent":["import { t } from \"../../../i18n\";\nimport {\n columns,\n serviceEnabledText,\n serviceStatusText,\n} from \"../../../output\";\nimport { type Context, defineCommand } from \"../../command\";\nimport { session } from \"../../session\";\n\nconst listSwiplets = (context: Context<{ device?: string }>) =>\n session(context, async (client) => {\n const { swiplets } = await client.swiplets.listSwiplets(\n {},\n { signal: context.signal },\n );\n const rows = swiplets.map((swiplet) => {\n let service = \"\";\n let status = \"\";\n if (swiplet.service) {\n service = serviceEnabledText(swiplet.service.enabled);\n status = serviceStatusText(swiplet.service.status);\n if (swiplet.service.error) {\n status += `: ${swiplet.service.error.name}: ${swiplet.service.error.message}`;\n }\n }\n return [\n swiplet.id,\n swiplet.title,\n swiplet.version,\n swiplet.actions.map((action) => action.name).join(\",\"),\n service,\n status,\n ];\n });\n console.log(\n columns([\n [\n t(\"commands.swiplet.list.id\"),\n t(\"commands.swiplet.list.title\"),\n t(\"commands.swiplet.list.version\"),\n t(\"commands.swiplet.list.actions\"),\n t(\"commands.swiplet.list.service\"),\n t(\"commands.swiplet.list.status\"),\n ],\n ...rows,\n ]),\n );\n });\n\nexport const list = defineCommand({\n name: \"list\",\n short: t(\"commands.swiplet.list.description\"),\n args: [0, 0],\n run: listSwiplets,\n});\n"],"mappings":";;;;;AASA,MAAM,gBAAgB,YACpB,QAAQ,SAAS,OAAO,WAAW;CACjC,MAAM,EAAE,aAAa,MAAM,OAAO,SAAS,aACzC,CAAC,GACD,EAAE,QAAQ,QAAQ,OAAO,CAC3B;CACA,MAAM,OAAO,SAAS,KAAK,YAAY;EACrC,IAAI,UAAU;EACd,IAAI,SAAS;EACb,IAAI,QAAQ,SAAS;GACnB,UAAU,mBAAmB,QAAQ,QAAQ,OAAO;GACpD,SAAS,kBAAkB,QAAQ,QAAQ,MAAM;GACjD,IAAI,QAAQ,QAAQ,OAClB,UAAU,KAAK,QAAQ,QAAQ,MAAM,KAAK,IAAI,QAAQ,QAAQ,MAAM;EAExE;EACA,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QAAQ;GACR,QAAQ,QAAQ,KAAK,WAAW,OAAO,IAAI,CAAC,CAAC,KAAK,GAAG;GACrD;GACA;EACF;CACF,CAAC;CACD,QAAQ,IACN,QAAQ,CACN;EACE,EAAE,0BAA0B;EAC5B,EAAE,6BAA6B;EAC/B,EAAE,+BAA+B;EACjC,EAAE,+BAA+B;EACjC,EAAE,+BAA+B;EACjC,EAAE,8BAA8B;CAClC,GACA,GAAG,IACL,CAAC,CACH;AACF,CAAC;AAEH,MAAa,OAAO,cAAc;CAChC,MAAM;CACN,OAAO,EAAE,mCAAmC;CAC5C,MAAM,CAAC,GAAG,CAAC;CACX,KAAK;AACP,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { defineCommand } from "../../command.js";
|
|
3
3
|
import { session } from "../../session.js";
|
|
4
4
|
// src/cli/commands/swiplet/remove.ts
|
|
5
5
|
const removeSwiplet = (context) => session(context, async (client) => {
|
|
6
6
|
await client.swiplets.removeSwiplet({ swipletId: context.args[0] }, { signal: context.signal });
|
|
7
|
-
console.log(
|
|
7
|
+
console.log(t("commands.swiplet.remove.removed", { name: context.args[0] }));
|
|
8
8
|
});
|
|
9
9
|
const remove = defineCommand({
|
|
10
10
|
name: "remove",
|
|
11
11
|
use: "remove ID",
|
|
12
|
-
short:
|
|
12
|
+
short: t("commands.swiplet.remove.description"),
|
|
13
13
|
args: [1, 1],
|
|
14
14
|
run: removeSwiplet
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","names":[],"sources":["../../../../src/cli/commands/swiplet/remove.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"remove.js","names":[],"sources":["../../../../src/cli/commands/swiplet/remove.ts"],"sourcesContent":["import { t } from \"../../../i18n\";\nimport { type Context, defineCommand } from \"../../command\";\nimport { session } from \"../../session\";\n\nconst removeSwiplet = (context: Context<{ device?: string }>) =>\n session(context, async (client) => {\n await client.swiplets.removeSwiplet(\n { swipletId: context.args[0] },\n { signal: context.signal },\n );\n console.log(\n t(\"commands.swiplet.remove.removed\", { name: context.args[0] }),\n );\n });\n\nexport const remove = defineCommand({\n name: \"remove\",\n use: \"remove ID\",\n short: t(\"commands.swiplet.remove.description\"),\n args: [1, 1],\n run: removeSwiplet,\n});\n"],"mappings":";;;;AAIA,MAAM,iBAAiB,YACrB,QAAQ,SAAS,OAAO,WAAW;CACjC,MAAM,OAAO,SAAS,cACpB,EAAE,WAAW,QAAQ,KAAK,GAAG,GAC7B,EAAE,QAAQ,QAAQ,OAAO,CAC3B;CACA,QAAQ,IACN,EAAE,mCAAmC,EAAE,MAAM,QAAQ,KAAK,GAAG,CAAC,CAChE;AACF,CAAC;AAEH,MAAa,SAAS,cAAc;CAClC,MAAM;CACN,KAAK;CACL,OAAO,EAAE,qCAAqC;CAC9C,MAAM,CAAC,GAAG,CAAC;CACX,KAAK;AACP,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../../i18n.js";
|
|
2
2
|
import { defineCommand } from "../../../command.js";
|
|
3
3
|
import { setService } from "./services.js";
|
|
4
4
|
// src/cli/commands/swiplet/service/disable.ts
|
|
5
5
|
const disable = defineCommand({
|
|
6
6
|
name: "disable",
|
|
7
7
|
use: "disable ID",
|
|
8
|
-
short:
|
|
8
|
+
short: t("commands.swiplet.service.disable.description"),
|
|
9
9
|
args: [1, 1],
|
|
10
10
|
options: { watch: {
|
|
11
11
|
type: "boolean",
|
|
12
|
-
help:
|
|
12
|
+
help: t("commands.swiplet.service.watchState")
|
|
13
13
|
} },
|
|
14
14
|
run: setService(false)
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disable.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/disable.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"disable.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/disable.ts"],"sourcesContent":["import { t } from \"../../../../i18n\";\nimport { defineCommand } from \"../../../command\";\nimport { setService } from \"./services\";\n\nexport const disable = defineCommand({\n name: \"disable\",\n use: \"disable ID\",\n short: t(\"commands.swiplet.service.disable.description\"),\n args: [1, 1],\n options: {\n watch: { type: \"boolean\", help: t(\"commands.swiplet.service.watchState\") },\n },\n run: setService(false),\n});\n"],"mappings":";;;;AAIA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,KAAK;CACL,OAAO,EAAE,8CAA8C;CACvD,MAAM,CAAC,GAAG,CAAC;CACX,SAAS,EACP,OAAO;EAAE,MAAM;EAAW,MAAM,EAAE,qCAAqC;CAAE,EAC3E;CACA,KAAK,WAAW,KAAK;AACvB,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../../i18n.js";
|
|
2
2
|
import { defineCommand } from "../../../command.js";
|
|
3
3
|
import { setService } from "./services.js";
|
|
4
4
|
// src/cli/commands/swiplet/service/enable.ts
|
|
5
5
|
const enable = defineCommand({
|
|
6
6
|
name: "enable",
|
|
7
7
|
use: "enable ID",
|
|
8
|
-
short:
|
|
8
|
+
short: t("commands.swiplet.service.enable.description"),
|
|
9
9
|
args: [1, 1],
|
|
10
10
|
options: { watch: {
|
|
11
11
|
type: "boolean",
|
|
12
|
-
help:
|
|
12
|
+
help: t("commands.swiplet.service.watchState")
|
|
13
13
|
} },
|
|
14
14
|
run: setService(true)
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enable.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/enable.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"enable.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/enable.ts"],"sourcesContent":["import { t } from \"../../../../i18n\";\nimport { defineCommand } from \"../../../command\";\nimport { setService } from \"./services\";\n\nexport const enable = defineCommand({\n name: \"enable\",\n use: \"enable ID\",\n short: t(\"commands.swiplet.service.enable.description\"),\n args: [1, 1],\n options: {\n watch: { type: \"boolean\", help: t(\"commands.swiplet.service.watchState\") },\n },\n run: setService(true),\n});\n"],"mappings":";;;;AAIA,MAAa,SAAS,cAAc;CAClC,MAAM;CACN,KAAK;CACL,OAAO,EAAE,6CAA6C;CACtD,MAAM,CAAC,GAAG,CAAC;CACX,SAAS,EACP,OAAO;EAAE,MAAM;EAAW,MAAM,EAAE,qCAAqC;CAAE,EAC3E;CACA,KAAK,WAAW,IAAI;AACtB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../../i18n.js";
|
|
2
2
|
import { defineCommand } from "../../../command.js";
|
|
3
3
|
import { disable } from "./disable.js";
|
|
4
4
|
import { enable } from "./enable.js";
|
|
@@ -6,7 +6,7 @@ import { watch } from "./watch.js";
|
|
|
6
6
|
// src/cli/commands/swiplet/service/service.ts
|
|
7
7
|
const service = defineCommand({
|
|
8
8
|
name: "service",
|
|
9
|
-
short:
|
|
9
|
+
short: t("commands.swiplet.service.description"),
|
|
10
10
|
commands: [
|
|
11
11
|
enable,
|
|
12
12
|
disable,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/service.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"service.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/service.ts"],"sourcesContent":["import { t } from \"../../../../i18n\";\nimport { defineCommand } from \"../../../command\";\nimport { disable } from \"./disable\";\nimport { enable } from \"./enable\";\nimport { watch } from \"./watch\";\n\nexport const service = defineCommand({\n name: \"service\",\n short: t(\"commands.swiplet.service.description\"),\n commands: [enable, disable, watch],\n});\n"],"mappings":";;;;;;AAMA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,OAAO,EAAE,sCAAsC;CAC/C,UAAU;EAAC;EAAQ;EAAS;CAAK;AACnC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { serviceText } from "../../../../output.js";
|
|
|
2
2
|
import { session } from "../../../session.js";
|
|
3
3
|
// src/cli/commands/swiplet/service/services.ts
|
|
4
4
|
async function watchServices(client, id, signal) {
|
|
5
|
-
for await (const response of client.swiplets.watchServices({ swipletId: id }, { signal })) console.log(`${response.swipletId}: ${serviceText(response.
|
|
5
|
+
for await (const response of client.swiplets.watchServices({ swipletId: id }, { signal })) console.log(`${response.swipletId}: ${serviceText(response.service)}`);
|
|
6
6
|
}
|
|
7
7
|
const setService = (enabled) => (context) => session(context, async (client) => {
|
|
8
8
|
const id = context.args[0];
|
|
@@ -14,7 +14,7 @@ const setService = (enabled) => (context) => session(context, async (client) =>
|
|
|
14
14
|
await watchServices(client, id, context.signal);
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
console.log(`${id}: ${serviceText(
|
|
17
|
+
console.log(`${id}: ${serviceText(response.service)}`);
|
|
18
18
|
});
|
|
19
19
|
export { setService, watchServices };
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/services.ts"],"sourcesContent":["import { serviceText } from \"../../../../output\";\nimport { session } from \"../../../session\";\n\nexport async function watchServices(client
|
|
1
|
+
{"version":3,"file":"services.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/services.ts"],"sourcesContent":["import type { Client } from \"../../../../client\";\nimport { serviceText } from \"../../../../output\";\nimport type { Context } from \"../../../command\";\nimport { session } from \"../../../session\";\n\nexport async function watchServices(\n client: Client,\n id: string,\n signal: AbortSignal,\n) {\n for await (const response of client.swiplets.watchServices(\n { swipletId: id },\n { signal },\n )) {\n console.log(`${response.swipletId}: ${serviceText(response.service)}`);\n }\n}\n\nexport const setService =\n (enabled: boolean) =>\n (context: Context<{ device?: string; watch?: boolean }>) =>\n session(context, async (client) => {\n const id = context.args[0];\n const response = await client.swiplets.setServiceEnabled(\n { swipletId: id, enabled },\n { signal: context.signal },\n );\n if (context.options.watch) {\n await watchServices(client, id, context.signal);\n return;\n }\n console.log(`${id}: ${serviceText(response.service)}`);\n });\n"],"mappings":";;;AAKA,eAAsB,cACpB,QACA,IACA,QACA;CACA,WAAW,MAAM,YAAY,OAAO,SAAS,cAC3C,EAAE,WAAW,GAAG,GAChB,EAAE,OAAO,CACX,GACE,QAAQ,IAAI,GAAG,SAAS,UAAU,IAAI,YAAY,SAAS,OAAO,GAAG;AAEzE;AAEA,MAAa,cACV,aACA,YACC,QAAQ,SAAS,OAAO,WAAW;CACjC,MAAM,KAAK,QAAQ,KAAK;CACxB,MAAM,WAAW,MAAM,OAAO,SAAS,kBACrC;EAAE,WAAW;EAAI;CAAQ,GACzB,EAAE,QAAQ,QAAQ,OAAO,CAC3B;CACA,IAAI,QAAQ,QAAQ,OAAO;EACzB,MAAM,cAAc,QAAQ,IAAI,QAAQ,MAAM;EAC9C;CACF;CACA,QAAQ,IAAI,GAAG,GAAG,IAAI,YAAY,SAAS,OAAO,GAAG;AACvD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../../i18n.js";
|
|
2
2
|
import { defineCommand } from "../../../command.js";
|
|
3
3
|
import { session } from "../../../session.js";
|
|
4
4
|
import { watchServices } from "./services.js";
|
|
@@ -7,7 +7,7 @@ const serviceWatch = (context) => session(context, (client) => watchServices(cli
|
|
|
7
7
|
const watch = defineCommand({
|
|
8
8
|
name: "watch",
|
|
9
9
|
use: "watch [ID]",
|
|
10
|
-
short:
|
|
10
|
+
short: t("commands.swiplet.service.watch.description"),
|
|
11
11
|
args: [0, 1],
|
|
12
12
|
run: serviceWatch
|
|
13
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/watch.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"watch.js","names":[],"sources":["../../../../../src/cli/commands/swiplet/service/watch.ts"],"sourcesContent":["import { t } from \"../../../../i18n\";\nimport { type Context, defineCommand } from \"../../../command\";\nimport { session } from \"../../../session\";\nimport { watchServices } from \"./services\";\n\nconst serviceWatch = (context: Context<{ device?: string }>) =>\n session(context, (client) =>\n watchServices(client, context.args[0] ?? \"\", context.signal),\n );\n\nexport const watch = defineCommand({\n name: \"watch\",\n use: \"watch [ID]\",\n short: t(\"commands.swiplet.service.watch.description\"),\n args: [0, 1],\n run: serviceWatch,\n});\n"],"mappings":";;;;;AAKA,MAAM,gBAAgB,YACpB,QAAQ,UAAU,WAChB,cAAc,QAAQ,QAAQ,KAAK,MAAM,IAAI,QAAQ,MAAM,CAC7D;AAEF,MAAa,QAAQ,cAAc;CACjC,MAAM;CACN,KAAK;CACL,OAAO,EAAE,4CAA4C;CACrD,MAAM,CAAC,GAAG,CAAC;CACX,KAAK;AACP,CAAC"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { serviceText } from "../../../output.js";
|
|
3
3
|
import { defineCommand } from "../../command.js";
|
|
4
4
|
import { session } from "../../session.js";
|
|
5
5
|
// src/cli/commands/swiplet/show.ts
|
|
6
6
|
const indented = (value) => JSON.stringify(value, null, 2).replaceAll("\n", "\n ");
|
|
7
|
-
const notInstalled = (id) => new Error(
|
|
7
|
+
const notInstalled = (id) => new Error(t("commands.swiplet.show.notFound", { id: JSON.stringify(id) }));
|
|
8
8
|
const showSwiplet = (context) => session(context, async (client) => {
|
|
9
9
|
const { swiplets } = await client.swiplets.listSwiplets({}, { signal: context.signal });
|
|
10
10
|
const swiplet = swiplets.find((it) => it.id === context.args[0]);
|
|
11
11
|
if (!swiplet) throw notInstalled(context.args[0]);
|
|
12
12
|
console.log(swiplet.id, JSON.stringify(swiplet.title), swiplet.version);
|
|
13
|
-
if (swiplet.service) console.log(
|
|
13
|
+
if (swiplet.service) console.log(t("commands.swiplet.show.service", { status: serviceText(swiplet.service) }));
|
|
14
14
|
for (const action of swiplet.actions) {
|
|
15
15
|
console.log();
|
|
16
16
|
console.log(action.name, JSON.stringify(action.title));
|
|
17
17
|
if (action.description !== "") console.log(` ${action.description}`);
|
|
18
|
-
if (action.inputSchema) console.log(` ${
|
|
19
|
-
if (action.outputSchema) console.log(` ${
|
|
18
|
+
if (action.inputSchema) console.log(` ${t("commands.swiplet.show.input", { schema: indented(action.inputSchema) })}`);
|
|
19
|
+
if (action.outputSchema) console.log(` ${t("commands.swiplet.show.output", { schema: indented(action.outputSchema) })}`);
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
const show = defineCommand({
|
|
23
23
|
name: "show",
|
|
24
24
|
use: "show ID",
|
|
25
|
-
short:
|
|
25
|
+
short: t("commands.swiplet.show.description"),
|
|
26
26
|
args: [1, 1],
|
|
27
27
|
run: showSwiplet
|
|
28
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show.js","names":[],"sources":["../../../../src/cli/commands/swiplet/show.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"show.js","names":[],"sources":["../../../../src/cli/commands/swiplet/show.ts"],"sourcesContent":["import type { JsonObject } from \"@bufbuild/protobuf\";\n\nimport { t } from \"../../../i18n\";\nimport { serviceText } from \"../../../output\";\nimport { type Context, defineCommand } from \"../../command\";\nimport { session } from \"../../session\";\n\nconst indented = (value: JsonObject) =>\n JSON.stringify(value, null, 2).replaceAll(\"\\n\", \"\\n \");\n\nconst notInstalled = (id: string) =>\n new Error(t(\"commands.swiplet.show.notFound\", { id: JSON.stringify(id) }));\n\nconst showSwiplet = (context: Context<{ device?: string }>) =>\n session(context, async (client) => {\n const { swiplets } = await client.swiplets.listSwiplets(\n {},\n { signal: context.signal },\n );\n const swiplet = swiplets.find((it) => it.id === context.args[0]);\n if (!swiplet) {\n throw notInstalled(context.args[0]);\n }\n console.log(swiplet.id, JSON.stringify(swiplet.title), swiplet.version);\n if (swiplet.service) {\n console.log(\n t(\"commands.swiplet.show.service\", {\n status: serviceText(swiplet.service),\n }),\n );\n }\n for (const action of swiplet.actions) {\n console.log();\n console.log(action.name, JSON.stringify(action.title));\n if (action.description !== \"\") {\n console.log(` ${action.description}`);\n }\n if (action.inputSchema) {\n console.log(\n ` ${t(\"commands.swiplet.show.input\", { schema: indented(action.inputSchema) })}`,\n );\n }\n if (action.outputSchema) {\n console.log(\n ` ${t(\"commands.swiplet.show.output\", { schema: indented(action.outputSchema) })}`,\n );\n }\n }\n });\n\nexport const show = defineCommand({\n name: \"show\",\n use: \"show ID\",\n short: t(\"commands.swiplet.show.description\"),\n args: [1, 1],\n run: showSwiplet,\n});\n"],"mappings":";;;;;AAOA,MAAM,YAAY,UAChB,KAAK,UAAU,OAAO,MAAM,CAAC,CAAC,CAAC,WAAW,MAAM,MAAM;AAExD,MAAM,gBAAgB,OACpB,IAAI,MAAM,EAAE,kCAAkC,EAAE,IAAI,KAAK,UAAU,EAAE,EAAE,CAAC,CAAC;AAE3E,MAAM,eAAe,YACnB,QAAQ,SAAS,OAAO,WAAW;CACjC,MAAM,EAAE,aAAa,MAAM,OAAO,SAAS,aACzC,CAAC,GACD,EAAE,QAAQ,QAAQ,OAAO,CAC3B;CACA,MAAM,UAAU,SAAS,MAAM,OAAO,GAAG,OAAO,QAAQ,KAAK,EAAE;CAC/D,IAAI,CAAC,SACH,MAAM,aAAa,QAAQ,KAAK,EAAE;CAEpC,QAAQ,IAAI,QAAQ,IAAI,KAAK,UAAU,QAAQ,KAAK,GAAG,QAAQ,OAAO;CACtE,IAAI,QAAQ,SACV,QAAQ,IACN,EAAE,iCAAiC,EACjC,QAAQ,YAAY,QAAQ,OAAO,EACrC,CAAC,CACH;CAEF,KAAK,MAAM,UAAU,QAAQ,SAAS;EACpC,QAAQ,IAAI;EACZ,QAAQ,IAAI,OAAO,MAAM,KAAK,UAAU,OAAO,KAAK,CAAC;EACrD,IAAI,OAAO,gBAAgB,IACzB,QAAQ,IAAI,KAAK,OAAO,aAAa;EAEvC,IAAI,OAAO,aACT,QAAQ,IACN,KAAK,EAAE,+BAA+B,EAAE,QAAQ,SAAS,OAAO,WAAW,EAAE,CAAC,GAChF;EAEF,IAAI,OAAO,cACT,QAAQ,IACN,KAAK,EAAE,gCAAgC,EAAE,QAAQ,SAAS,OAAO,YAAY,EAAE,CAAC,GAClF;CAEJ;AACF,CAAC;AAEH,MAAa,OAAO,cAAc;CAChC,MAAM;CACN,KAAK;CACL,OAAO,EAAE,mCAAmC;CAC5C,MAAM,CAAC,GAAG,CAAC;CACX,KAAK;AACP,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t } from "../../../i18n.js";
|
|
2
2
|
import { defineCommand } from "../../command.js";
|
|
3
3
|
import "../data/index.js";
|
|
4
4
|
import { data } from "../data/data.js";
|
|
@@ -13,11 +13,11 @@ import { show } from "./show.js";
|
|
|
13
13
|
// src/cli/commands/swiplet/swiplet.ts
|
|
14
14
|
const swipletData = ([id, ...args]) => ({
|
|
15
15
|
id,
|
|
16
|
-
wholeDirectory: (name) =>
|
|
16
|
+
wholeDirectory: (name) => t("commands.swiplet.dataDirectory", {
|
|
17
17
|
path: name,
|
|
18
18
|
swiplet: id
|
|
19
19
|
}),
|
|
20
|
-
subdirectory: (name) =>
|
|
20
|
+
subdirectory: (name) => t("commands.swiplet.directory", {
|
|
21
21
|
path: name,
|
|
22
22
|
swiplet: id
|
|
23
23
|
}),
|
|
@@ -25,7 +25,7 @@ const swipletData = ([id, ...args]) => ({
|
|
|
25
25
|
});
|
|
26
26
|
const swiplet = defineCommand({
|
|
27
27
|
name: "swiplet",
|
|
28
|
-
short:
|
|
28
|
+
short: t("commands.swiplet.description"),
|
|
29
29
|
options: deviceOption,
|
|
30
30
|
commands: [
|
|
31
31
|
list,
|