@sprid/cli 0.1.9 → 0.1.10
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/args.mjs +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
sprid follows semver: a breaking change to a command's arguments, its output
|
|
4
4
|
shape or its exit codes is a major release.
|
|
5
5
|
|
|
6
|
+
## 0.1.10 - 2026-09-25
|
|
7
|
+
|
|
8
|
+
- `sprid connect github --repo owner/repo` works. In 0.1.9 `--repo` was read as
|
|
9
|
+
a switch without a value, so the command always asked for it. Repeating
|
|
10
|
+
`--repo` now adds each repo.
|
|
11
|
+
|
|
6
12
|
## 0.1.9 - 2026-09-25
|
|
7
13
|
|
|
8
14
|
- `sprid connect github --repo owner/repo` connects GitHub repository traffic
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sprid/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "The Sprid command line: connect your app, review results, prepare posts and store screenshots, and release mobile apps.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
package/src/args.mjs
CHANGED
|
@@ -56,6 +56,7 @@ export const VALUE_FLAGS = new Set([
|
|
|
56
56
|
"revenuecat-project",
|
|
57
57
|
"cloudflare-zone",
|
|
58
58
|
"repo-url",
|
|
59
|
+
"repo",
|
|
59
60
|
"website-url",
|
|
60
61
|
"channel",
|
|
61
62
|
"board",
|
|
@@ -95,6 +96,9 @@ export const BOOL_FLAGS = new Set(["json", "offline", "check", "no-browser", "fr
|
|
|
95
96
|
* Accepts `--flag value` and `--flag=value`. Unknown `--flags` are kept as
|
|
96
97
|
* booleans so a command can refuse them by name.
|
|
97
98
|
*/
|
|
99
|
+
/** Value flags that may be given more than once; they collect into an array. */
|
|
100
|
+
const REPEATABLE_FLAGS = new Set(["repo"]);
|
|
101
|
+
|
|
98
102
|
export function parseArgs(argv) {
|
|
99
103
|
const flags = {};
|
|
100
104
|
const positionals = [];
|
|
@@ -118,7 +122,7 @@ export function parseArgs(argv) {
|
|
|
118
122
|
if (v === undefined || v.startsWith("--")) {
|
|
119
123
|
throw new UsageError(`--${name} needs a value`);
|
|
120
124
|
}
|
|
121
|
-
flags[name] = v;
|
|
125
|
+
flags[name] = REPEATABLE_FLAGS.has(name) && flags[name] !== undefined ? [flags[name], v].flat() : v;
|
|
122
126
|
i++;
|
|
123
127
|
} else {
|
|
124
128
|
flags[name] = true;
|