@putdotio/taizn 1.0.1 → 1.1.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 +8 -1
- package/dist/taizn.mjs +20 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -28,6 +28,7 @@ locally.
|
|
|
28
28
|
Create `taizn.json` in the app directory, keep `.taizn/` ignored, then run:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
+
pnpm exec taizn check
|
|
31
32
|
pnpm exec taizn package
|
|
32
33
|
pnpm exec taizn install
|
|
33
34
|
```
|
|
@@ -42,18 +43,24 @@ Project files:
|
|
|
42
43
|
## Commands
|
|
43
44
|
|
|
44
45
|
```bash
|
|
46
|
+
taizn check
|
|
45
47
|
taizn profile
|
|
46
48
|
taizn package
|
|
47
49
|
taizn install
|
|
48
50
|
taizn --version
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
`
|
|
53
|
+
`check` verifies the configured Tizen CLI and `sdb`, then prints connected
|
|
54
|
+
targets without requiring `taizn.json`. `profile` imports
|
|
55
|
+
`.taizn/certificates/author.p12` and
|
|
52
56
|
`.taizn/certificates/distributor.p12` into a Tizen security profile.
|
|
53
57
|
`package` builds and signs a `.wgt`. `install` packages and sideloads it.
|
|
54
58
|
|
|
55
59
|
## Environment
|
|
56
60
|
|
|
61
|
+
Copy [.env.example](./.env.example) into `.taizn/.env` or export values in the
|
|
62
|
+
shell:
|
|
63
|
+
|
|
57
64
|
```bash
|
|
58
65
|
TAIZN_CERT_PASSWORD=...
|
|
59
66
|
TAIZN_DIST_PASSWORD=...
|
package/dist/taizn.mjs
CHANGED
|
@@ -191,6 +191,19 @@ const setXmlAttribute = (tag, attribute, value) => {
|
|
|
191
191
|
};
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region src/tizen.ts
|
|
194
|
+
const checkTizen = (env) => {
|
|
195
|
+
const tizenPath = tizenCli(env.tizenCli);
|
|
196
|
+
const sdbPath = sdb(env.sdb);
|
|
197
|
+
const devices = listSdbDevices(sdbPath);
|
|
198
|
+
console.log(`Tizen CLI: ${tizenPath}`);
|
|
199
|
+
console.log(`sdb: ${sdbPath}`);
|
|
200
|
+
if (devices.length === 0) {
|
|
201
|
+
console.log("connected targets: none");
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
console.log("connected targets:");
|
|
205
|
+
for (const device of devices) console.log(`- ${device.id}${device.label ? ` (${device.label})` : ""}`);
|
|
206
|
+
};
|
|
194
207
|
const createProfile = async ({ config, env }) => {
|
|
195
208
|
const password = await readPassword(env.certPassword, "Tizen certificate password: ");
|
|
196
209
|
if (!password) fail("TAIZN_CERT_PASSWORD is required to create the signing profile.");
|
|
@@ -340,9 +353,15 @@ const resolveInstallTarget = (env) => {
|
|
|
340
353
|
const runSync = (operation) => Effect.sync(() => {
|
|
341
354
|
operation(loadContext());
|
|
342
355
|
});
|
|
356
|
+
const runEnvSync = (operation) => Effect.sync(() => {
|
|
357
|
+
operation(loadEnv());
|
|
358
|
+
});
|
|
343
359
|
const taizn = Command.make("taizn", {}, () => runSync((context) => {
|
|
344
360
|
packageWidget(context);
|
|
345
361
|
}));
|
|
362
|
+
const check = Command.make("check", {}, () => runEnvSync((env) => {
|
|
363
|
+
checkTizen(env);
|
|
364
|
+
}));
|
|
346
365
|
const profile = Command.make("profile", {}, () => Effect.promise(async () => {
|
|
347
366
|
await createProfile(loadContext());
|
|
348
367
|
}));
|
|
@@ -353,6 +372,7 @@ const install = Command.make("install", {}, () => runSync((context) => {
|
|
|
353
372
|
installWidget(context);
|
|
354
373
|
}));
|
|
355
374
|
const command = taizn.pipe(Command.withSubcommands([
|
|
375
|
+
check,
|
|
356
376
|
profile,
|
|
357
377
|
pack,
|
|
358
378
|
install
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putdotio/taizn",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A tiny CLI companion for interacting with Tizen ecosystem.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"effect": "^3.21.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@types/node": "^
|
|
56
|
+
"@types/node": "^25.7.0",
|
|
57
57
|
"typescript": "^6.0.2",
|
|
58
58
|
"vite-plus": "^0.1.20",
|
|
59
|
-
"vitest": "^4.1.
|
|
59
|
+
"vitest": "^4.1.6"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=24.14.0 <25"
|