@putdotio/taizn 1.8.0 → 1.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 CHANGED
@@ -48,6 +48,7 @@ Project files:
48
48
  taizn check
49
49
  taizn apps
50
50
  taizn apps put
51
+ taizn apps --json put
51
52
  taizn launch GinifYRGmZ.putio
52
53
  taizn prove GinifYRGmZ.putio
53
54
  taizn prove --json GinifYRGmZ.putio
@@ -64,7 +65,8 @@ taizn --version
64
65
 
65
66
  `check` verifies the configured Tizen CLI and `sdb`, then prints connected
66
67
  targets without requiring `taizn.json`. `apps` lists installed applications on
67
- the target, with an optional query filter. `launch` starts an already-installed
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
70
  application by exact application ID, exact name, or a unique query. `prove`
69
71
  checks the installed app inventory, launches the matched app, and prints a
70
72
  compact proof transcript. Add `--json` when an agent or script needs structured
package/dist/taizn.mjs CHANGED
@@ -811,11 +811,22 @@ const runWidget = Effect.fn("runWidget")(function* ({ config, env }) {
811
811
  ], { env: yield* baseChildEnv() });
812
812
  yield* Console.log(`Launched ${variant.applicationId}`);
813
813
  });
814
- const listInstalledApplications = Effect.fn("listInstalledApplications")(function* (env, query) {
815
- const { applications: installedApplications, target } = yield* loadInstalledApplications(env);
814
+ const listInstalledApplications = Effect.fn("listInstalledApplications")(function* (env, query, options = {}) {
815
+ const { applications: installedApplications, target } = yield* loadInstalledApplications(env, { quiet: options.json });
816
816
  const queryLabel = query?.trim();
817
817
  const normalizedQuery = normalizeQuery(queryLabel);
818
818
  const applications = installedApplications.filter((application) => matchesApplicationQuery(application, normalizedQuery));
819
+ if (options.json) {
820
+ yield* Console.log(JSON.stringify({
821
+ applications: applications.map((application) => ({
822
+ id: application.applicationId,
823
+ name: application.name
824
+ })),
825
+ query: queryLabel || void 0,
826
+ target
827
+ }));
828
+ return;
829
+ }
819
830
  const suffix = queryLabel ? ` matching "${queryLabel}"` : "";
820
831
  yield* Console.log(`Installed Tizen applications${suffix} on ${target}:`);
821
832
  if (applications.length === 0) {
@@ -1173,8 +1184,11 @@ const taizn = Command.make("taizn", {}, () => withContext((context) => packageWi
1173
1184
  const check = Command.make("check", {}, () => Effect.gen(function* () {
1174
1185
  yield* checkTizen(yield* loadEnv());
1175
1186
  }));
1176
- const apps = Command.make("apps", { query: Argument.string("query").pipe(Argument.optional) }, ({ query }) => Effect.gen(function* () {
1177
- yield* listInstalledApplications(yield* loadEnv(), Option.getOrUndefined(query));
1187
+ const apps = Command.make("apps", {
1188
+ json: Flag.boolean("json"),
1189
+ query: Argument.string("query").pipe(Argument.optional)
1190
+ }, ({ json, query }) => Effect.gen(function* () {
1191
+ yield* listInstalledApplications(yield* loadEnv(), Option.getOrUndefined(query), { json });
1178
1192
  }));
1179
1193
  const launch = Command.make("launch", { query: Argument.string("query") }, ({ query }) => Effect.gen(function* () {
1180
1194
  yield* launchInstalledApplication(yield* loadEnv(), query);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putdotio/taizn",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "A tiny CLI companion for interacting with Tizen ecosystem.",
5
5
  "keywords": [
6
6
  "cli",