@pmate/cli 0.17.6 → 0.17.8
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 +5 -38
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20652,14 +20652,9 @@ function parseAgentArgs(tokens) {
|
|
|
20652
20652
|
"Usage: agent view <ns:objectId> [--base-url <url>]"
|
|
20653
20653
|
);
|
|
20654
20654
|
}
|
|
20655
|
-
let namespaceFromOption;
|
|
20656
20655
|
while (rest.length > 0) {
|
|
20657
20656
|
const token = rest.shift();
|
|
20658
20657
|
switch (token) {
|
|
20659
|
-
case "--ns":
|
|
20660
|
-
case "--namespace":
|
|
20661
|
-
namespaceFromOption = requireValue(rest, token);
|
|
20662
|
-
break;
|
|
20663
20658
|
case "--base-url":
|
|
20664
20659
|
baseUrl = requireValue(rest, token);
|
|
20665
20660
|
break;
|
|
@@ -20668,7 +20663,6 @@ function parseAgentArgs(tokens) {
|
|
|
20668
20663
|
}
|
|
20669
20664
|
}
|
|
20670
20665
|
const parsed = parseNamespacedRef(ref, {
|
|
20671
|
-
defaultNamespace: namespaceFromOption,
|
|
20672
20666
|
entityLabel: "agent ref"
|
|
20673
20667
|
});
|
|
20674
20668
|
return {
|
|
@@ -21159,18 +21153,7 @@ function parseAppArgs(tokens) {
|
|
|
21159
21153
|
"Usage: app view <ns:objectId> [--base-url <url>]"
|
|
21160
21154
|
);
|
|
21161
21155
|
}
|
|
21162
|
-
let namespace;
|
|
21163
|
-
while (rest.length > 0) {
|
|
21164
|
-
const token = rest[0];
|
|
21165
|
-
if (token === "--ns" || token === "--namespace") {
|
|
21166
|
-
rest.shift();
|
|
21167
|
-
namespace = requireValue4(rest, token);
|
|
21168
|
-
continue;
|
|
21169
|
-
}
|
|
21170
|
-
break;
|
|
21171
|
-
}
|
|
21172
21156
|
const id = parseNamespacedRef(rawRef, {
|
|
21173
|
-
defaultNamespace: namespace,
|
|
21174
21157
|
entityLabel: "app ref"
|
|
21175
21158
|
}).fullId;
|
|
21176
21159
|
while (rest.length > 0) {
|
|
@@ -21344,25 +21327,17 @@ function parseServiceArgs(tokens) {
|
|
|
21344
21327
|
if (!ref || ref.startsWith("-")) {
|
|
21345
21328
|
throw new Error("Usage: service view <ns:objectId> [--base-url <url>]");
|
|
21346
21329
|
}
|
|
21347
|
-
let namespaceFromOption;
|
|
21348
21330
|
while (rest.length > 0) {
|
|
21349
21331
|
const token = rest.shift();
|
|
21350
21332
|
switch (token) {
|
|
21351
21333
|
case "--base-url":
|
|
21352
21334
|
baseUrl = requireValue5(rest, token);
|
|
21353
21335
|
break;
|
|
21354
|
-
case "--ns":
|
|
21355
|
-
case "--namespace":
|
|
21356
|
-
namespaceFromOption = requireValue5(rest, token);
|
|
21357
|
-
break;
|
|
21358
21336
|
default:
|
|
21359
21337
|
throw new Error(`Unknown service view option: ${token}`);
|
|
21360
21338
|
}
|
|
21361
21339
|
}
|
|
21362
|
-
const parsedRef = parseNamespacedRef(ref, {
|
|
21363
|
-
defaultNamespace: namespaceFromOption,
|
|
21364
|
-
entityLabel: "service ref"
|
|
21365
|
-
});
|
|
21340
|
+
const parsedRef = parseNamespacedRef(ref, { entityLabel: "service ref" });
|
|
21366
21341
|
return {
|
|
21367
21342
|
type: "service" /* Service */,
|
|
21368
21343
|
action,
|
|
@@ -21377,7 +21352,6 @@ function parseServiceArgs(tokens) {
|
|
|
21377
21352
|
if (!ref || ref.startsWith("-")) {
|
|
21378
21353
|
throw new Error(`Usage: service ${action} <ns:objectId> [--base-url <url>] [--json]`);
|
|
21379
21354
|
}
|
|
21380
|
-
let namespaceFromOption;
|
|
21381
21355
|
let cwd;
|
|
21382
21356
|
let page = 0;
|
|
21383
21357
|
let history = false;
|
|
@@ -21388,10 +21362,6 @@ function parseServiceArgs(tokens) {
|
|
|
21388
21362
|
case "--base-url":
|
|
21389
21363
|
baseUrl = requireValue5(rest, token);
|
|
21390
21364
|
break;
|
|
21391
|
-
case "--ns":
|
|
21392
|
-
case "--namespace":
|
|
21393
|
-
namespaceFromOption = requireValue5(rest, token);
|
|
21394
|
-
break;
|
|
21395
21365
|
case "--cwd":
|
|
21396
21366
|
cwd = requireValue5(rest, token);
|
|
21397
21367
|
break;
|
|
@@ -21411,10 +21381,7 @@ function parseServiceArgs(tokens) {
|
|
|
21411
21381
|
throw new Error(`Unknown service ${action} option: ${token}`);
|
|
21412
21382
|
}
|
|
21413
21383
|
}
|
|
21414
|
-
const parsedRef = parseNamespacedRef(ref, {
|
|
21415
|
-
defaultNamespace: action === "deploy" || action === "init" || action === "log" ? namespaceFromOption : void 0,
|
|
21416
|
-
entityLabel: "service ref"
|
|
21417
|
-
});
|
|
21384
|
+
const parsedRef = parseNamespacedRef(ref, { entityLabel: "service ref" });
|
|
21418
21385
|
const namespace = parsedRef.namespace;
|
|
21419
21386
|
const name = parsedRef.objectId;
|
|
21420
21387
|
if (action === "log") {
|
|
@@ -21847,7 +21814,7 @@ var HELP_TEXT = [
|
|
|
21847
21814
|
` ${import_chalk3.default.gray(" namespaces [--base-url <url>] [--json]")}`,
|
|
21848
21815
|
` ${import_chalk3.default.gray(" list [--namespace <ns>] [--base-url <url>] [--json]")}`,
|
|
21849
21816
|
` ${import_chalk3.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
|
|
21850
|
-
` ${import_chalk3.default.gray(" view
|
|
21817
|
+
` ${import_chalk3.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
|
|
21851
21818
|
` ${import_chalk3.default.gray(" create [<namespace>] --file <path> [--base-url <url>] [--json]")}`,
|
|
21852
21819
|
` ${import_chalk3.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
|
|
21853
21820
|
` ${import_chalk3.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
|
|
@@ -21875,7 +21842,7 @@ var HELP_TEXT = [
|
|
|
21875
21842
|
` ${import_chalk3.default.cyan("app")} Manage app registry entries via apps-api`,
|
|
21876
21843
|
` ${import_chalk3.default.gray(" list [--ns <namespace>] [--base-url <url>] [--json]")}`,
|
|
21877
21844
|
` ${import_chalk3.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
|
|
21878
|
-
` ${import_chalk3.default.gray(" view
|
|
21845
|
+
` ${import_chalk3.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
|
|
21879
21846
|
` ${import_chalk3.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
|
|
21880
21847
|
` ${import_chalk3.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
|
|
21881
21848
|
` ${import_chalk3.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
|
|
@@ -21884,7 +21851,7 @@ var HELP_TEXT = [
|
|
|
21884
21851
|
` ${import_chalk3.default.cyan("service")} Manage service registry entries via apps-api`,
|
|
21885
21852
|
` ${import_chalk3.default.gray(" list [--namespace <ns>] [--repo <owner/name|https://github.com/owner/name>] [--base-url <url>] [--json]")}`,
|
|
21886
21853
|
` ${import_chalk3.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
|
|
21887
|
-
` ${import_chalk3.default.gray(" view
|
|
21854
|
+
` ${import_chalk3.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
|
|
21888
21855
|
` ${import_chalk3.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
|
|
21889
21856
|
` ${import_chalk3.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
|
|
21890
21857
|
` ${import_chalk3.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
|