@aikdna/kdna-studio-cli 0.8.0 → 0.8.2
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/bin/kdna-studio.js +14 -5
- package/package.json +2 -2
package/bin/kdna-studio.js
CHANGED
|
@@ -1606,11 +1606,20 @@ function cmdExport(args) {
|
|
|
1606
1606
|
if (!projectInput || !out) fail('Usage: kdna-studio export <project> --out <file.kdna> [--format v1] [--sign] [--allow-incomplete]');
|
|
1607
1607
|
if (option(args, '--format') === 'v1') {
|
|
1608
1608
|
const { project } = readProject(projectInput);
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1609
|
+
// BUG-11 (2026-06-27): previous logic required --password to be set
|
|
1610
|
+
// before --password-stdin would take effect. That meant callers using
|
|
1611
|
+
// `--password-stdin` alone (the recommended path) got `password = null`
|
|
1612
|
+
// and the export ran unencrypted. Resolve the two flags independently:
|
|
1613
|
+
// - --password-stdin → read password from stdin (preferred)
|
|
1614
|
+
// - --password <pw> → take password from the flag (insecure)
|
|
1615
|
+
// - --passphrase <pw> → legacy alias for --password
|
|
1616
|
+
// If both are given, --password-stdin wins (it is the explicit intent).
|
|
1617
|
+
// Use args.includes() for --password-stdin since it is a boolean flag
|
|
1618
|
+
// (option() rejects it for "missing value").
|
|
1619
|
+
const useStdin = args.includes('--password-stdin');
|
|
1620
|
+
const password = useStdin
|
|
1621
|
+
? fs.readFileSync(0, 'utf8').trim()
|
|
1622
|
+
: option(args, '--password') || option(args, '--passphrase');
|
|
1614
1623
|
exportProjectV1(project, option(args, '--name') || project.name, path.resolve(out), {
|
|
1615
1624
|
allowIncomplete: args.includes('--allow-incomplete'),
|
|
1616
1625
|
password,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikdna/kdna-studio-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Official KDNA Studio command-line authoring entry for creating, reviewing, compiling, and exporting .kdna judgment assets through the KDNA toolchain.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"node": ">=18"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@aikdna/kdna-studio-core": "^1.7.
|
|
42
|
+
"@aikdna/kdna-studio-core": "^1.7.1",
|
|
43
43
|
"ajv": "^8.20.0",
|
|
44
44
|
"ajv-formats": "^3.0.1",
|
|
45
45
|
"cbor-x": "^1.6.4"
|