run402 4.36.0 → 4.36.1
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/lib/functions.mjs +11 -3
- package/lib/rooms.mjs +5 -3
- package/package.json +1 -1
package/lib/functions.mjs
CHANGED
|
@@ -842,6 +842,8 @@ async function rebuild(projectId, args = []) {
|
|
|
842
842
|
const positionals = [];
|
|
843
843
|
for (const arg of args) {
|
|
844
844
|
if (arg === "--all") { all = true; continue; }
|
|
845
|
+
// Same rule as assertNoExtraPositionals: a flag is not a positional.
|
|
846
|
+
if (typeof arg === "string" && arg.startsWith("-")) continue;
|
|
845
847
|
positionals.push(arg);
|
|
846
848
|
}
|
|
847
849
|
if (positionals.length > 1) {
|
|
@@ -957,12 +959,18 @@ function parseDepsFlag(value) {
|
|
|
957
959
|
}
|
|
958
960
|
|
|
959
961
|
function assertNoExtraPositionals(args, usage) {
|
|
960
|
-
|
|
962
|
+
// Only POSITIONALS count. A flag-shaped argument that survived
|
|
963
|
+
// assertKnownFlags is an accepted convention flag (`--json`), not a stray
|
|
964
|
+
// positional — reporting it as one made `functions list --json` fail with
|
|
965
|
+
// "Unexpected argument: --json" while the same command without it worked.
|
|
966
|
+
// Its sibling assertNoUnexpectedPositionals already skips these.
|
|
967
|
+
const extra = args.filter((a) => !(typeof a === "string" && a.startsWith("-")));
|
|
968
|
+
if (extra.length > 0) {
|
|
961
969
|
fail({
|
|
962
970
|
code: "BAD_USAGE",
|
|
963
|
-
message: `Unexpected argument: ${
|
|
971
|
+
message: `Unexpected argument: ${extra[0]}`,
|
|
964
972
|
hint: usage,
|
|
965
|
-
details: { argument:
|
|
973
|
+
details: { argument: extra[0] },
|
|
966
974
|
});
|
|
967
975
|
}
|
|
968
976
|
}
|
package/lib/rooms.mjs
CHANGED
|
@@ -148,9 +148,11 @@ async function who(args) {
|
|
|
148
148
|
|
|
149
149
|
async function leave(argv) {
|
|
150
150
|
const args = normalizeArgv(argv);
|
|
151
|
-
assertKnownFlags(
|
|
152
|
-
const positionals = positionalArgs(args);
|
|
153
|
-
requirePositionalCount(
|
|
151
|
+
assertKnownFlags(args, [...ROOM_FLAGS, "--help", "-h"], ROOM_FLAGS);
|
|
152
|
+
const positionals = positionalArgs(args, ROOM_FLAGS);
|
|
153
|
+
requirePositionalCount(positionals, ROOM_FLAGS, {
|
|
154
|
+
min: 0, max: 1, command: "run402 rooms leave [<presence_id>]",
|
|
155
|
+
});
|
|
154
156
|
const room = await resolveRoom({
|
|
155
157
|
org: flagValue(args, "--org"),
|
|
156
158
|
room: flagValue(args, "--room"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "run402",
|
|
3
|
-
"version": "4.36.
|
|
3
|
+
"version": "4.36.1",
|
|
4
4
|
"description": "CLI for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|