@zixt/host 0.0.24 → 0.0.25
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/dist/index.js +31 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import { homedir } from "node:os";
|
|
|
31
31
|
// package.json
|
|
32
32
|
var package_default = {
|
|
33
33
|
name: "@zixt/host",
|
|
34
|
-
version: "0.0.
|
|
34
|
+
version: "0.0.25",
|
|
35
35
|
type: "module",
|
|
36
36
|
exports: {
|
|
37
37
|
".": "./src/client.ts",
|
|
@@ -31982,7 +31982,36 @@ function githubRepositoryFromGhArgs(args) {
|
|
|
31982
31982
|
}
|
|
31983
31983
|
}
|
|
31984
31984
|
if (command === "api") {
|
|
31985
|
-
const
|
|
31985
|
+
const valueOptions = /* @__PURE__ */ new Set([
|
|
31986
|
+
"--cache",
|
|
31987
|
+
"--field",
|
|
31988
|
+
"-F",
|
|
31989
|
+
"--header",
|
|
31990
|
+
"-H",
|
|
31991
|
+
"--hostname",
|
|
31992
|
+
"--input",
|
|
31993
|
+
"--jq",
|
|
31994
|
+
"-q",
|
|
31995
|
+
"--method",
|
|
31996
|
+
"-X",
|
|
31997
|
+
"--preview",
|
|
31998
|
+
"-p",
|
|
31999
|
+
"--raw-field",
|
|
32000
|
+
"-f",
|
|
32001
|
+
"--template",
|
|
32002
|
+
"-t"
|
|
32003
|
+
]);
|
|
32004
|
+
let endpoint;
|
|
32005
|
+
for (let index = commandIndex + 1; index < args.length; index++) {
|
|
32006
|
+
const argument = args[index];
|
|
32007
|
+
if (valueOptions.has(argument)) {
|
|
32008
|
+
index++;
|
|
32009
|
+
continue;
|
|
32010
|
+
}
|
|
32011
|
+
if (argument.startsWith("-")) continue;
|
|
32012
|
+
endpoint = argument;
|
|
32013
|
+
break;
|
|
32014
|
+
}
|
|
31986
32015
|
const match = endpoint?.match(/^\/?repos\/([^/]+\/[^/?]+)(?:[/?]|$)/i);
|
|
31987
32016
|
return match?.[1] ? githubRepositoryFromSpecifier(match[1]) : null;
|
|
31988
32017
|
}
|