@productbrain/cli 0.1.0-beta.8240 → 0.1.0-beta.8251
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.
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Sweep finding #9: `-f`/`--field` is already REPEATABLE at the Commander layer
|
|
6
6
|
* (index.ts: `(val, prev) => [...prev, val]`) — that is this CLI's existing, documented
|
|
7
|
-
* convention for a multi-select/array field (e.g. a
|
|
7
|
+
* convention for a multi-select/array field (e.g. a collection's `tags`,
|
|
8
8
|
* `type: 'multi-select'` server-side). But this function silently let the LAST occurrence of a
|
|
9
9
|
* repeated key clobber every earlier one (`data[key] = value` unconditionally), so
|
|
10
|
-
* `-f
|
|
11
|
-
* an array, and silently dropping `
|
|
10
|
+
* `-f tags=a -f tags=b` sent only the string `"b"` — never
|
|
11
|
+
* an array, and silently dropping `a` besides. The server then rejects a bare string
|
|
12
12
|
* against an array-typed field ("rejects non-array input"). Fixed by accumulating repeated keys
|
|
13
13
|
* into an array instead of overwriting — a single-occurrence key (the overwhelming majority of
|
|
14
14
|
* calls, e.g. the documented `rationale="..."` example) is completely unaffected: no comma
|
package/dist/lib/parseFields.js
CHANGED
|
@@ -5,11 +5,11 @@ import { CLIError, ErrorCode } from './errors.js';
|
|
|
5
5
|
*
|
|
6
6
|
* Sweep finding #9: `-f`/`--field` is already REPEATABLE at the Commander layer
|
|
7
7
|
* (index.ts: `(val, prev) => [...prev, val]`) — that is this CLI's existing, documented
|
|
8
|
-
* convention for a multi-select/array field (e.g. a
|
|
8
|
+
* convention for a multi-select/array field (e.g. a collection's `tags`,
|
|
9
9
|
* `type: 'multi-select'` server-side). But this function silently let the LAST occurrence of a
|
|
10
10
|
* repeated key clobber every earlier one (`data[key] = value` unconditionally), so
|
|
11
|
-
* `-f
|
|
12
|
-
* an array, and silently dropping `
|
|
11
|
+
* `-f tags=a -f tags=b` sent only the string `"b"` — never
|
|
12
|
+
* an array, and silently dropping `a` besides. The server then rejects a bare string
|
|
13
13
|
* against an array-typed field ("rejects non-array input"). Fixed by accumulating repeated keys
|
|
14
14
|
* into an array instead of overwriting — a single-occurrence key (the overwhelming majority of
|
|
15
15
|
* calls, e.g. the documented `rationale="..."` example) is completely unaffected: no comma
|