@putdotio/taizn 1.9.0 → 1.10.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 CHANGED
@@ -46,6 +46,7 @@ Project files:
46
46
 
47
47
  ```bash
48
48
  taizn check
49
+ taizn check --json
49
50
  taizn apps
50
51
  taizn apps put
51
52
  taizn apps --json put
@@ -64,9 +65,10 @@ taizn --version
64
65
  ```
65
66
 
66
67
  `check` verifies the configured Tizen CLI and `sdb`, then prints connected
67
- targets without requiring `taizn.json`. `apps` lists installed applications on
68
- the target, with an optional query filter. Add `--json` to emit a structured
69
- inventory for agents and scripts. `launch` starts an already-installed
68
+ targets without requiring `taizn.json`. Add `--json` to emit the configured
69
+ tool paths and connected targets for agents and scripts. `apps` lists installed
70
+ applications on the target, with an optional query filter. Add `--json` to emit
71
+ a structured inventory for agents and scripts. `launch` starts an already-installed
70
72
  application by exact application ID, exact name, or a unique query. `prove`
71
73
  checks the installed app inventory, launches the matched app, and prints a
72
74
  compact proof transcript. Add `--json` when an agent or script needs structured
package/dist/taizn.mjs CHANGED
@@ -707,10 +707,25 @@ const setXmlAttribute = (tag, attribute, value) => {
707
707
  };
708
708
  //#endregion
709
709
  //#region src/tizen.ts
710
- const checkTizen = Effect.fn("checkTizen")(function* (env) {
710
+ const checkTizen = Effect.fn("checkTizen")(function* (env, options = {}) {
711
711
  const tizenPath = yield* resolveTizenCli(env);
712
712
  const sdbPath = yield* resolveSdb(env);
713
713
  const devices = yield* listSdbDevices(sdbPath);
714
+ if (options.json) {
715
+ yield* Console.log(JSON.stringify({
716
+ configuredTarget: env.target,
717
+ targets: devices.map((device) => ({
718
+ id: device.id,
719
+ label: device.label,
720
+ state: device.state
721
+ })),
722
+ tools: {
723
+ sdb: sdbPath,
724
+ tizenCli: tizenPath
725
+ }
726
+ }));
727
+ return;
728
+ }
714
729
  yield* Console.log(`Tizen CLI: ${tizenPath}`);
715
730
  yield* Console.log(`sdb: ${sdbPath}`);
716
731
  if (devices.length === 0) {
@@ -1181,8 +1196,8 @@ const withContext = (operation) => Effect.gen(function* () {
1181
1196
  yield* operation(yield* loadContext());
1182
1197
  });
1183
1198
  const taizn = Command.make("taizn", {}, () => withContext((context) => packageWidget(context).pipe(Effect.asVoid)));
1184
- const check = Command.make("check", {}, () => Effect.gen(function* () {
1185
- yield* checkTizen(yield* loadEnv());
1199
+ const check = Command.make("check", { json: Flag.boolean("json") }, ({ json }) => Effect.gen(function* () {
1200
+ yield* checkTizen(yield* loadEnv(), { json });
1186
1201
  }));
1187
1202
  const apps = Command.make("apps", {
1188
1203
  json: Flag.boolean("json"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putdotio/taizn",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "A tiny CLI companion for interacting with Tizen ecosystem.",
5
5
  "keywords": [
6
6
  "cli",