@tenderprompt/cli 0.1.7 → 0.1.9
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 +165 -142
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,38 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
3
4
|
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
4
5
|
import os from "node:os";
|
|
5
6
|
import path from "node:path";
|
|
6
7
|
import { fileURLToPath } from "node:url";
|
|
7
8
|
import { generateTenderAppEnvTypes, validateTenderApp, } from "@tenderprompt/tender-app-validator";
|
|
8
9
|
import { collectTenderAppFiles } from "./local-files.js";
|
|
10
|
+
const CLI_PACKAGE_NAME = "@tenderprompt/cli";
|
|
11
|
+
const UNKNOWN_CLI_VERSION = "0.0.0";
|
|
12
|
+
const RECOMMENDED_TENDER_PROMPT_SKILL = {
|
|
13
|
+
name: "tender-prompt",
|
|
14
|
+
version: "0.1.1",
|
|
15
|
+
source: "git@github.com:tenderprompt/skills.git",
|
|
16
|
+
path: "skills/tender-prompt/SKILL.md",
|
|
17
|
+
updateHint: "Refresh the tender-prompt skill from git@github.com:tenderprompt/skills.git when the local skill version is older.",
|
|
18
|
+
};
|
|
19
|
+
function readCliPackageVersion() {
|
|
20
|
+
try {
|
|
21
|
+
const packageJsonPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../package.json");
|
|
22
|
+
const parsed = JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
23
|
+
if (typeof parsed === "object" &&
|
|
24
|
+
parsed !== null &&
|
|
25
|
+
"version" in parsed &&
|
|
26
|
+
typeof parsed.version === "string") {
|
|
27
|
+
return parsed.version;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return UNKNOWN_CLI_VERSION;
|
|
32
|
+
}
|
|
33
|
+
return UNKNOWN_CLI_VERSION;
|
|
34
|
+
}
|
|
35
|
+
const CLI_PACKAGE_VERSION = readCliPackageVersion();
|
|
9
36
|
class TenderCliUsageError extends Error {
|
|
10
37
|
constructor(message) {
|
|
11
38
|
super(message);
|
|
@@ -68,9 +95,6 @@ Commands:
|
|
|
68
95
|
tender app generate-env-types
|
|
69
96
|
Regenerate src/env.d.ts from app.json and bindings
|
|
70
97
|
|
|
71
|
-
Compatibility:
|
|
72
|
-
tender artifacts ... Legacy alias for Tender App commands
|
|
73
|
-
|
|
74
98
|
Examples:
|
|
75
99
|
tender capabilities --json
|
|
76
100
|
tender auth login --device --profile edit-preview --artifact artifact_123 --ttl 7d
|
|
@@ -220,12 +244,6 @@ Examples:
|
|
|
220
244
|
tender app doctor --json
|
|
221
245
|
tender app git remote artifact_123 --ttl 7d --json`;
|
|
222
246
|
}
|
|
223
|
-
function artifactsHelp() {
|
|
224
|
-
return `${appHelp()}
|
|
225
|
-
|
|
226
|
-
Legacy alias:
|
|
227
|
-
tender artifacts ... continues to work for existing automation. Prefer tender app ... for new workflows.`;
|
|
228
|
-
}
|
|
229
247
|
function capabilitiesHelp() {
|
|
230
248
|
return `Usage: tender capabilities [--json]
|
|
231
249
|
|
|
@@ -647,9 +665,15 @@ function tenderCliCapabilities() {
|
|
|
647
665
|
return {
|
|
648
666
|
ok: true,
|
|
649
667
|
surface: "tender_cli",
|
|
668
|
+
cli: {
|
|
669
|
+
name: CLI_PACKAGE_NAME,
|
|
670
|
+
version: CLI_PACKAGE_VERSION,
|
|
671
|
+
latestRunner: "npm exec --yes @tenderprompt/cli@latest --",
|
|
672
|
+
},
|
|
673
|
+
recommendedSkill: RECOMMENDED_TENDER_PROMPT_SKILL,
|
|
650
674
|
description: "Agent-safe Tender App source, lifecycle, analytics, and local scaffold controls.",
|
|
651
675
|
discovery: {
|
|
652
|
-
primary: "
|
|
676
|
+
primary: "npm exec --yes @tenderprompt/cli@latest -- capabilities --json",
|
|
653
677
|
layeredHelp: [
|
|
654
678
|
"tender --help",
|
|
655
679
|
"tender auth --help",
|
|
@@ -927,7 +951,7 @@ function parseTtl(value) {
|
|
|
927
951
|
}
|
|
928
952
|
function parseGitRemoteArgs(args) {
|
|
929
953
|
if (args.includes("--help") || args.includes("-h")) {
|
|
930
|
-
return { command: "help", topic: "
|
|
954
|
+
return { command: "help", topic: "app git remote" };
|
|
931
955
|
}
|
|
932
956
|
const artifactId = args[0];
|
|
933
957
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -967,7 +991,7 @@ function parseGitRemoteArgs(args) {
|
|
|
967
991
|
throw new TenderCliUsageError(`Unknown git remote option: ${arg}`);
|
|
968
992
|
}
|
|
969
993
|
return {
|
|
970
|
-
command: "
|
|
994
|
+
command: "app git remote",
|
|
971
995
|
artifactId,
|
|
972
996
|
baseUrl,
|
|
973
997
|
flagToken,
|
|
@@ -987,7 +1011,7 @@ function parseRemoteName(value) {
|
|
|
987
1011
|
}
|
|
988
1012
|
function parseGitSetupArgs(args) {
|
|
989
1013
|
if (args.includes("--help") || args.includes("-h")) {
|
|
990
|
-
return { command: "help", topic: "
|
|
1014
|
+
return { command: "help", topic: "app git setup" };
|
|
991
1015
|
}
|
|
992
1016
|
const artifactId = args[0];
|
|
993
1017
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1048,7 +1072,7 @@ function parseGitSetupArgs(args) {
|
|
|
1048
1072
|
throw new TenderCliUsageError(`Unknown git setup option: ${arg}`);
|
|
1049
1073
|
}
|
|
1050
1074
|
return {
|
|
1051
|
-
command: "
|
|
1075
|
+
command: "app git setup",
|
|
1052
1076
|
artifactId,
|
|
1053
1077
|
dir,
|
|
1054
1078
|
remoteName,
|
|
@@ -1080,7 +1104,7 @@ function isGitCredentialOperation(value) {
|
|
|
1080
1104
|
}
|
|
1081
1105
|
function parseGitCredentialArgs(args) {
|
|
1082
1106
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1083
|
-
return { command: "help", topic: "
|
|
1107
|
+
return { command: "help", topic: "app git credential" };
|
|
1084
1108
|
}
|
|
1085
1109
|
const artifactId = args[0];
|
|
1086
1110
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1141,7 +1165,7 @@ function parseGitCredentialArgs(args) {
|
|
|
1141
1165
|
throw new TenderCliUsageError(`Unknown git credential option: ${arg}`);
|
|
1142
1166
|
}
|
|
1143
1167
|
return {
|
|
1144
|
-
command: "
|
|
1168
|
+
command: "app git credential",
|
|
1145
1169
|
artifactId,
|
|
1146
1170
|
operation,
|
|
1147
1171
|
baseUrl,
|
|
@@ -1154,7 +1178,7 @@ function parseGitCredentialArgs(args) {
|
|
|
1154
1178
|
}
|
|
1155
1179
|
function parseValidateArgs(args) {
|
|
1156
1180
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1157
|
-
return { command: "help", topic: "
|
|
1181
|
+
return { command: "help", topic: "app validate" };
|
|
1158
1182
|
}
|
|
1159
1183
|
const artifactId = args[0];
|
|
1160
1184
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1193,7 +1217,7 @@ function parseValidateArgs(args) {
|
|
|
1193
1217
|
throw new TenderCliUsageError(`Unknown validate option: ${arg}`);
|
|
1194
1218
|
}
|
|
1195
1219
|
return {
|
|
1196
|
-
command: "
|
|
1220
|
+
command: "app validate",
|
|
1197
1221
|
artifactId,
|
|
1198
1222
|
baseUrl,
|
|
1199
1223
|
flagToken,
|
|
@@ -1204,7 +1228,7 @@ function parseValidateArgs(args) {
|
|
|
1204
1228
|
}
|
|
1205
1229
|
function parseBuildArgs(args) {
|
|
1206
1230
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1207
|
-
return { command: "help", topic: "
|
|
1231
|
+
return { command: "help", topic: "app build" };
|
|
1208
1232
|
}
|
|
1209
1233
|
const artifactId = args[0];
|
|
1210
1234
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1253,7 +1277,7 @@ function parseBuildArgs(args) {
|
|
|
1253
1277
|
throw new TenderCliUsageError(`Unknown build option: ${arg}`);
|
|
1254
1278
|
}
|
|
1255
1279
|
return {
|
|
1256
|
-
command: "
|
|
1280
|
+
command: "app build",
|
|
1257
1281
|
artifactId,
|
|
1258
1282
|
commitSha,
|
|
1259
1283
|
baseUrl,
|
|
@@ -1265,7 +1289,7 @@ function parseBuildArgs(args) {
|
|
|
1265
1289
|
}
|
|
1266
1290
|
function parsePreviewRebuildArgs(args) {
|
|
1267
1291
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1268
|
-
return { command: "help", topic: "
|
|
1292
|
+
return { command: "help", topic: "app preview rebuild" };
|
|
1269
1293
|
}
|
|
1270
1294
|
const artifactId = args[0];
|
|
1271
1295
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1314,7 +1338,7 @@ function parsePreviewRebuildArgs(args) {
|
|
|
1314
1338
|
throw new TenderCliUsageError(`Unknown preview rebuild option: ${arg}`);
|
|
1315
1339
|
}
|
|
1316
1340
|
return {
|
|
1317
|
-
command: "
|
|
1341
|
+
command: "app preview rebuild",
|
|
1318
1342
|
artifactId,
|
|
1319
1343
|
commitSha,
|
|
1320
1344
|
baseUrl,
|
|
@@ -1392,7 +1416,7 @@ function readPreviewLookupOptions(input) {
|
|
|
1392
1416
|
}
|
|
1393
1417
|
function parsePreviewStatusArgs(args) {
|
|
1394
1418
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1395
|
-
return { command: "help", topic: "
|
|
1419
|
+
return { command: "help", topic: "app preview status" };
|
|
1396
1420
|
}
|
|
1397
1421
|
const artifactId = args[0];
|
|
1398
1422
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1407,7 +1431,7 @@ function parsePreviewStatusArgs(args) {
|
|
|
1407
1431
|
throw new TenderCliUsageError("preview status does not support --stream. Use tender app preview watch.");
|
|
1408
1432
|
}
|
|
1409
1433
|
return {
|
|
1410
|
-
command: "
|
|
1434
|
+
command: "app preview status",
|
|
1411
1435
|
artifactId,
|
|
1412
1436
|
commitSha: options.commitSha,
|
|
1413
1437
|
jobId: options.jobId,
|
|
@@ -1419,7 +1443,7 @@ function parsePreviewStatusArgs(args) {
|
|
|
1419
1443
|
}
|
|
1420
1444
|
function parsePreviewWatchArgs(args) {
|
|
1421
1445
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1422
|
-
return { command: "help", topic: "
|
|
1446
|
+
return { command: "help", topic: "app preview watch" };
|
|
1423
1447
|
}
|
|
1424
1448
|
const artifactId = args[0];
|
|
1425
1449
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1431,7 +1455,7 @@ function parsePreviewWatchArgs(args) {
|
|
|
1431
1455
|
commandName: "preview watch",
|
|
1432
1456
|
});
|
|
1433
1457
|
return {
|
|
1434
|
-
command: "
|
|
1458
|
+
command: "app preview watch",
|
|
1435
1459
|
artifactId,
|
|
1436
1460
|
commitSha: options.commitSha,
|
|
1437
1461
|
jobId: options.jobId,
|
|
@@ -1444,7 +1468,7 @@ function parsePreviewWatchArgs(args) {
|
|
|
1444
1468
|
}
|
|
1445
1469
|
function parsePublishArgs(args) {
|
|
1446
1470
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1447
|
-
return { command: "help", topic: "
|
|
1471
|
+
return { command: "help", topic: "app publish" };
|
|
1448
1472
|
}
|
|
1449
1473
|
const artifactId = args[0];
|
|
1450
1474
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1521,7 +1545,7 @@ function parsePublishArgs(args) {
|
|
|
1521
1545
|
throw new TenderCliUsageError("publish requires --dry-run or --confirm publish.");
|
|
1522
1546
|
}
|
|
1523
1547
|
return {
|
|
1524
|
-
command: "
|
|
1548
|
+
command: "app publish",
|
|
1525
1549
|
artifactId,
|
|
1526
1550
|
commitSha,
|
|
1527
1551
|
baseUrl,
|
|
@@ -1591,7 +1615,7 @@ function readPublishJobLookupOptions(input) {
|
|
|
1591
1615
|
}
|
|
1592
1616
|
function parsePublishStatusArgs(args) {
|
|
1593
1617
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1594
|
-
return { command: "help", topic: "
|
|
1618
|
+
return { command: "help", topic: "app publish status" };
|
|
1595
1619
|
}
|
|
1596
1620
|
const artifactId = args[0];
|
|
1597
1621
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1606,7 +1630,7 @@ function parsePublishStatusArgs(args) {
|
|
|
1606
1630
|
throw new TenderCliUsageError("publish status does not support --stream. Use tender app publish watch.");
|
|
1607
1631
|
}
|
|
1608
1632
|
return {
|
|
1609
|
-
command: "
|
|
1633
|
+
command: "app publish status",
|
|
1610
1634
|
artifactId,
|
|
1611
1635
|
jobId: options.jobId,
|
|
1612
1636
|
baseUrl: options.baseUrl,
|
|
@@ -1617,7 +1641,7 @@ function parsePublishStatusArgs(args) {
|
|
|
1617
1641
|
}
|
|
1618
1642
|
function parsePublishWatchArgs(args) {
|
|
1619
1643
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1620
|
-
return { command: "help", topic: "
|
|
1644
|
+
return { command: "help", topic: "app publish watch" };
|
|
1621
1645
|
}
|
|
1622
1646
|
const artifactId = args[0];
|
|
1623
1647
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1629,7 +1653,7 @@ function parsePublishWatchArgs(args) {
|
|
|
1629
1653
|
commandName: "publish watch",
|
|
1630
1654
|
});
|
|
1631
1655
|
return {
|
|
1632
|
-
command: "
|
|
1656
|
+
command: "app publish watch",
|
|
1633
1657
|
artifactId,
|
|
1634
1658
|
jobId: options.jobId,
|
|
1635
1659
|
baseUrl: options.baseUrl,
|
|
@@ -1641,7 +1665,7 @@ function parsePublishWatchArgs(args) {
|
|
|
1641
1665
|
}
|
|
1642
1666
|
function parseArtifactsListArgs(args) {
|
|
1643
1667
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1644
|
-
return { command: "help", topic: "
|
|
1668
|
+
return { command: "help", topic: "app list" };
|
|
1645
1669
|
}
|
|
1646
1670
|
let baseUrl = null;
|
|
1647
1671
|
let flagToken = null;
|
|
@@ -1671,7 +1695,7 @@ function parseArtifactsListArgs(args) {
|
|
|
1671
1695
|
throw new TenderCliUsageError(`Unknown app list option: ${arg}`);
|
|
1672
1696
|
}
|
|
1673
1697
|
return {
|
|
1674
|
-
command: "
|
|
1698
|
+
command: "app list",
|
|
1675
1699
|
baseUrl,
|
|
1676
1700
|
flagToken,
|
|
1677
1701
|
profileName,
|
|
@@ -1680,7 +1704,7 @@ function parseArtifactsListArgs(args) {
|
|
|
1680
1704
|
}
|
|
1681
1705
|
function parseArtifactsCreateArgs(args) {
|
|
1682
1706
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1683
|
-
return { command: "help", topic: "
|
|
1707
|
+
return { command: "help", topic: "app create" };
|
|
1684
1708
|
}
|
|
1685
1709
|
let name = "";
|
|
1686
1710
|
let targetPackId = null;
|
|
@@ -1743,7 +1767,7 @@ function parseArtifactsCreateArgs(args) {
|
|
|
1743
1767
|
throw new TenderCliUsageError("--name is required. Example: tender app create --name \"Exit Intent Widget\" --json");
|
|
1744
1768
|
}
|
|
1745
1769
|
return {
|
|
1746
|
-
command: "
|
|
1770
|
+
command: "app create",
|
|
1747
1771
|
name: name.trim(),
|
|
1748
1772
|
targetPackId,
|
|
1749
1773
|
targetPackVersion,
|
|
@@ -1755,7 +1779,7 @@ function parseArtifactsCreateArgs(args) {
|
|
|
1755
1779
|
}
|
|
1756
1780
|
function parseArtifactsUpdateArgs(args) {
|
|
1757
1781
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1758
|
-
return { command: "help", topic: "
|
|
1782
|
+
return { command: "help", topic: "app update" };
|
|
1759
1783
|
}
|
|
1760
1784
|
const artifactId = args[0];
|
|
1761
1785
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1802,7 +1826,7 @@ function parseArtifactsUpdateArgs(args) {
|
|
|
1802
1826
|
throw new TenderCliUsageError("--name is required. Example: tender app update artifact_123 --name \"Sale Widget\" --json");
|
|
1803
1827
|
}
|
|
1804
1828
|
return {
|
|
1805
|
-
command: "
|
|
1829
|
+
command: "app update",
|
|
1806
1830
|
artifactId,
|
|
1807
1831
|
name: name.trim(),
|
|
1808
1832
|
baseUrl,
|
|
@@ -1813,7 +1837,7 @@ function parseArtifactsUpdateArgs(args) {
|
|
|
1813
1837
|
}
|
|
1814
1838
|
function parseArtifactsInitArgs(args) {
|
|
1815
1839
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1816
|
-
return { command: "help", topic: "
|
|
1840
|
+
return { command: "help", topic: "app init" };
|
|
1817
1841
|
}
|
|
1818
1842
|
const artifactId = args[0];
|
|
1819
1843
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1879,7 +1903,7 @@ function parseArtifactsInitArgs(args) {
|
|
|
1879
1903
|
throw new TenderCliUsageError(`Unknown app init option: ${arg}`);
|
|
1880
1904
|
}
|
|
1881
1905
|
return {
|
|
1882
|
-
command: "
|
|
1906
|
+
command: "app init",
|
|
1883
1907
|
artifactId,
|
|
1884
1908
|
dir,
|
|
1885
1909
|
remoteName,
|
|
@@ -1894,7 +1918,7 @@ function parseArtifactsInitArgs(args) {
|
|
|
1894
1918
|
}
|
|
1895
1919
|
function parseContextFetchArgs(args) {
|
|
1896
1920
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1897
|
-
return { command: "help", topic: "
|
|
1921
|
+
return { command: "help", topic: "app context fetch" };
|
|
1898
1922
|
}
|
|
1899
1923
|
const artifactId = args[0];
|
|
1900
1924
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -1948,7 +1972,7 @@ function parseContextFetchArgs(args) {
|
|
|
1948
1972
|
throw new TenderCliUsageError(`Unknown context fetch option: ${arg}`);
|
|
1949
1973
|
}
|
|
1950
1974
|
return {
|
|
1951
|
-
command: "
|
|
1975
|
+
command: "app context fetch",
|
|
1952
1976
|
artifactId,
|
|
1953
1977
|
dir,
|
|
1954
1978
|
baseUrl,
|
|
@@ -1961,7 +1985,7 @@ function parseContextFetchArgs(args) {
|
|
|
1961
1985
|
}
|
|
1962
1986
|
function parseContextStatusArgs(args) {
|
|
1963
1987
|
if (args.includes("--help") || args.includes("-h")) {
|
|
1964
|
-
return { command: "help", topic: "
|
|
1988
|
+
return { command: "help", topic: "app context status" };
|
|
1965
1989
|
}
|
|
1966
1990
|
const artifactId = args[0];
|
|
1967
1991
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2005,7 +2029,7 @@ function parseContextStatusArgs(args) {
|
|
|
2005
2029
|
throw new TenderCliUsageError(`Unknown context status option: ${arg}`);
|
|
2006
2030
|
}
|
|
2007
2031
|
return {
|
|
2008
|
-
command: "
|
|
2032
|
+
command: "app context status",
|
|
2009
2033
|
artifactId,
|
|
2010
2034
|
dir,
|
|
2011
2035
|
baseUrl,
|
|
@@ -2016,7 +2040,7 @@ function parseContextStatusArgs(args) {
|
|
|
2016
2040
|
}
|
|
2017
2041
|
function parseContextRefreshArgs(args) {
|
|
2018
2042
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2019
|
-
return { command: "help", topic: "
|
|
2043
|
+
return { command: "help", topic: "app context refresh" };
|
|
2020
2044
|
}
|
|
2021
2045
|
const artifactId = args[0];
|
|
2022
2046
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2070,7 +2094,7 @@ function parseContextRefreshArgs(args) {
|
|
|
2070
2094
|
throw new TenderCliUsageError(`Unknown context refresh option: ${arg}`);
|
|
2071
2095
|
}
|
|
2072
2096
|
return {
|
|
2073
|
-
command: "
|
|
2097
|
+
command: "app context refresh",
|
|
2074
2098
|
artifactId,
|
|
2075
2099
|
dir,
|
|
2076
2100
|
baseUrl,
|
|
@@ -2201,7 +2225,7 @@ function parseAuthStatusArgs(args) {
|
|
|
2201
2225
|
}
|
|
2202
2226
|
function parseGenerateEnvTypesArgs(args) {
|
|
2203
2227
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2204
|
-
return { command: "help", topic: "
|
|
2228
|
+
return { command: "help", topic: "app generate-env-types" };
|
|
2205
2229
|
}
|
|
2206
2230
|
let dir = ".";
|
|
2207
2231
|
let json = false;
|
|
@@ -2223,7 +2247,7 @@ function parseGenerateEnvTypesArgs(args) {
|
|
|
2223
2247
|
throw new TenderCliUsageError(`Unknown generate-env-types option: ${arg}`);
|
|
2224
2248
|
}
|
|
2225
2249
|
return {
|
|
2226
|
-
command: "
|
|
2250
|
+
command: "app generate-env-types",
|
|
2227
2251
|
dir,
|
|
2228
2252
|
json,
|
|
2229
2253
|
};
|
|
@@ -2310,7 +2334,7 @@ function parseTypeName(value, flag) {
|
|
|
2310
2334
|
}
|
|
2311
2335
|
function parseBindingsOutboundArgs(args) {
|
|
2312
2336
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2313
|
-
return { command: "help", topic: "
|
|
2337
|
+
return { command: "help", topic: "app bindings outbound" };
|
|
2314
2338
|
}
|
|
2315
2339
|
let id = null;
|
|
2316
2340
|
let host = null;
|
|
@@ -2363,7 +2387,7 @@ function parseBindingsOutboundArgs(args) {
|
|
|
2363
2387
|
throw new TenderCliUsageError("bindings outbound currently requires --dry-run. Example: tender app bindings outbound --id shopify --host admin.shopify.com --dry-run --json");
|
|
2364
2388
|
}
|
|
2365
2389
|
return {
|
|
2366
|
-
command: "
|
|
2390
|
+
command: "app bindings outbound",
|
|
2367
2391
|
id,
|
|
2368
2392
|
host,
|
|
2369
2393
|
name,
|
|
@@ -2406,7 +2430,7 @@ function parseAnalyticsCommonArgs(args, startIndex) {
|
|
|
2406
2430
|
}
|
|
2407
2431
|
function parseAnalyticsSummaryArgs(args) {
|
|
2408
2432
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2409
|
-
return { command: "help", topic: "
|
|
2433
|
+
return { command: "help", topic: "app analytics summary" };
|
|
2410
2434
|
}
|
|
2411
2435
|
const artifactId = args[0];
|
|
2412
2436
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2423,11 +2447,11 @@ function parseAnalyticsSummaryArgs(args) {
|
|
|
2423
2447
|
}
|
|
2424
2448
|
throw new TenderCliUsageError(`Unknown analytics summary option: ${arg}`);
|
|
2425
2449
|
}
|
|
2426
|
-
return { command: "
|
|
2450
|
+
return { command: "app analytics summary", artifactId, range, ...parsed };
|
|
2427
2451
|
}
|
|
2428
2452
|
function parseAnalyticsQueryArgs(args) {
|
|
2429
2453
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2430
|
-
return { command: "help", topic: "
|
|
2454
|
+
return { command: "help", topic: "app analytics query" };
|
|
2431
2455
|
}
|
|
2432
2456
|
const artifactId = args[0];
|
|
2433
2457
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2447,11 +2471,11 @@ function parseAnalyticsQueryArgs(args) {
|
|
|
2447
2471
|
if (!specPath) {
|
|
2448
2472
|
throw new TenderCliUsageError("--spec is required. Example: tender app analytics query artifact_123 --spec chart.json --json");
|
|
2449
2473
|
}
|
|
2450
|
-
return { command: "
|
|
2474
|
+
return { command: "app analytics query", artifactId, specPath, ...parsed };
|
|
2451
2475
|
}
|
|
2452
2476
|
function parseAnalyticsCapabilitiesArgs(args) {
|
|
2453
2477
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2454
|
-
return { command: "help", topic: "
|
|
2478
|
+
return { command: "help", topic: "app analytics capabilities" };
|
|
2455
2479
|
}
|
|
2456
2480
|
const artifactId = args[0];
|
|
2457
2481
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2474,7 +2498,7 @@ function parseAnalyticsCapabilitiesArgs(args) {
|
|
|
2474
2498
|
throw new TenderCliUsageError(`Unknown analytics capabilities option: ${arg}`);
|
|
2475
2499
|
}
|
|
2476
2500
|
return {
|
|
2477
|
-
command: "
|
|
2501
|
+
command: "app analytics capabilities",
|
|
2478
2502
|
artifactId,
|
|
2479
2503
|
includeCatalog,
|
|
2480
2504
|
range,
|
|
@@ -2483,7 +2507,7 @@ function parseAnalyticsCapabilitiesArgs(args) {
|
|
|
2483
2507
|
}
|
|
2484
2508
|
function parseAnalyticsSuggestionsArgs(args) {
|
|
2485
2509
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2486
|
-
return { command: "help", topic: "
|
|
2510
|
+
return { command: "help", topic: "app analytics suggestions" };
|
|
2487
2511
|
}
|
|
2488
2512
|
const artifactId = args[0];
|
|
2489
2513
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2500,11 +2524,11 @@ function parseAnalyticsSuggestionsArgs(args) {
|
|
|
2500
2524
|
}
|
|
2501
2525
|
throw new TenderCliUsageError(`Unknown analytics suggestions option: ${arg}`);
|
|
2502
2526
|
}
|
|
2503
|
-
return { command: "
|
|
2527
|
+
return { command: "app analytics suggestions", artifactId, range, ...parsed };
|
|
2504
2528
|
}
|
|
2505
2529
|
function parseAnalyticsDashboardsArgs(args) {
|
|
2506
2530
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2507
|
-
return { command: "help", topic: "
|
|
2531
|
+
return { command: "help", topic: "app analytics dashboards" };
|
|
2508
2532
|
}
|
|
2509
2533
|
const artifactId = args[0];
|
|
2510
2534
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2529,11 +2553,11 @@ function parseAnalyticsDashboardsArgs(args) {
|
|
|
2529
2553
|
if (dryRun && !name) {
|
|
2530
2554
|
throw new TenderCliUsageError("--dry-run is only valid with --create. Example: tender app analytics dashboards artifact_123 --create \"Agent dashboard\" --dry-run --json");
|
|
2531
2555
|
}
|
|
2532
|
-
return { command: "
|
|
2556
|
+
return { command: "app analytics dashboards", artifactId, name, dryRun, ...parsed };
|
|
2533
2557
|
}
|
|
2534
2558
|
function parseAnalyticsExportCatalogArgs(args) {
|
|
2535
2559
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2536
|
-
return { command: "help", topic: "
|
|
2560
|
+
return { command: "help", topic: "app analytics export catalog" };
|
|
2537
2561
|
}
|
|
2538
2562
|
const artifactId = args[0];
|
|
2539
2563
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2561,7 +2585,7 @@ function parseAnalyticsExportCatalogArgs(args) {
|
|
|
2561
2585
|
throw new TenderCliUsageError(`Unknown analytics export catalog option: ${arg}`);
|
|
2562
2586
|
}
|
|
2563
2587
|
return {
|
|
2564
|
-
command: "
|
|
2588
|
+
command: "app analytics export catalog",
|
|
2565
2589
|
artifactId,
|
|
2566
2590
|
format,
|
|
2567
2591
|
range,
|
|
@@ -2570,7 +2594,7 @@ function parseAnalyticsExportCatalogArgs(args) {
|
|
|
2570
2594
|
}
|
|
2571
2595
|
function parseAnalyticsExportQueryArgs(args) {
|
|
2572
2596
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2573
|
-
return { command: "help", topic: "
|
|
2597
|
+
return { command: "help", topic: "app analytics export query" };
|
|
2574
2598
|
}
|
|
2575
2599
|
const artifactId = args[0];
|
|
2576
2600
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2601,7 +2625,7 @@ function parseAnalyticsExportQueryArgs(args) {
|
|
|
2601
2625
|
throw new TenderCliUsageError("--spec is required. Example: tender app analytics export query artifact_123 --spec chart.json --format csv");
|
|
2602
2626
|
}
|
|
2603
2627
|
return {
|
|
2604
|
-
command: "
|
|
2628
|
+
command: "app analytics export query",
|
|
2605
2629
|
artifactId,
|
|
2606
2630
|
specPath,
|
|
2607
2631
|
format,
|
|
@@ -2610,7 +2634,7 @@ function parseAnalyticsExportQueryArgs(args) {
|
|
|
2610
2634
|
}
|
|
2611
2635
|
function parseAnalyticsChartsCreateArgs(args) {
|
|
2612
2636
|
if (args.includes("--help") || args.includes("-h")) {
|
|
2613
|
-
return { command: "help", topic: "
|
|
2637
|
+
return { command: "help", topic: "app analytics charts create" };
|
|
2614
2638
|
}
|
|
2615
2639
|
const artifactId = args[0];
|
|
2616
2640
|
if (!artifactId || artifactId.startsWith("-")) {
|
|
@@ -2648,7 +2672,7 @@ function parseAnalyticsChartsCreateArgs(args) {
|
|
|
2648
2672
|
throw new TenderCliUsageError("--dashboard, --title, and --spec are required. Example: tender app analytics charts create artifact_123 --dashboard analytics_dashboard_123 --title \"Signup funnel\" --spec chart.json --json");
|
|
2649
2673
|
}
|
|
2650
2674
|
return {
|
|
2651
|
-
command: "
|
|
2675
|
+
command: "app analytics charts create",
|
|
2652
2676
|
artifactId,
|
|
2653
2677
|
dashboardId,
|
|
2654
2678
|
title,
|
|
@@ -2679,15 +2703,14 @@ function parseTenderArgs(args) {
|
|
|
2679
2703
|
if (args[0] === "apps") {
|
|
2680
2704
|
throw new TenderCliUsageError("Unknown command: apps. Use `tender app ...` for Tender App workflows.");
|
|
2681
2705
|
}
|
|
2682
|
-
if (args[0] !== "
|
|
2706
|
+
if (args[0] !== "app") {
|
|
2683
2707
|
throw new TenderCliUsageError(`Unknown command: ${args[0]}`);
|
|
2684
2708
|
}
|
|
2685
2709
|
const resourceArgs = normalizeAppArgs(args);
|
|
2686
|
-
const resourceName = args[0] === "app" ? "app" : "artifacts";
|
|
2687
2710
|
if (resourceArgs[1] === undefined ||
|
|
2688
2711
|
resourceArgs[1] === "--help" ||
|
|
2689
2712
|
resourceArgs[1] === "-h") {
|
|
2690
|
-
return { command: "help", topic: "
|
|
2713
|
+
return { command: "help", topic: "app" };
|
|
2691
2714
|
}
|
|
2692
2715
|
if (resourceArgs[1] !== "doctor") {
|
|
2693
2716
|
if (resourceArgs[1] === "list") {
|
|
@@ -2718,13 +2741,13 @@ function parseTenderArgs(args) {
|
|
|
2718
2741
|
(resourceArgs[2] === undefined ||
|
|
2719
2742
|
resourceArgs[2] === "--help" ||
|
|
2720
2743
|
resourceArgs[2] === "-h")) {
|
|
2721
|
-
return { command: "help", topic: "
|
|
2744
|
+
return { command: "help", topic: "app bindings outbound" };
|
|
2722
2745
|
}
|
|
2723
2746
|
if (resourceArgs[1] === "analytics" &&
|
|
2724
2747
|
(resourceArgs[2] === undefined ||
|
|
2725
2748
|
resourceArgs[2] === "--help" ||
|
|
2726
2749
|
resourceArgs[2] === "-h")) {
|
|
2727
|
-
return { command: "help", topic: "
|
|
2750
|
+
return { command: "help", topic: "app analytics" };
|
|
2728
2751
|
}
|
|
2729
2752
|
if (resourceArgs[1] === "analytics" && resourceArgs[2] === "summary") {
|
|
2730
2753
|
return parseAnalyticsSummaryArgs(resourceArgs.slice(3));
|
|
@@ -2746,7 +2769,7 @@ function parseTenderArgs(args) {
|
|
|
2746
2769
|
(resourceArgs[3] === undefined ||
|
|
2747
2770
|
resourceArgs[3] === "--help" ||
|
|
2748
2771
|
resourceArgs[3] === "-h")) {
|
|
2749
|
-
return { command: "help", topic: "
|
|
2772
|
+
return { command: "help", topic: "app analytics export" };
|
|
2750
2773
|
}
|
|
2751
2774
|
if (resourceArgs[1] === "analytics" &&
|
|
2752
2775
|
resourceArgs[2] === "export" &&
|
|
@@ -2767,7 +2790,7 @@ function parseTenderArgs(args) {
|
|
|
2767
2790
|
(resourceArgs[2] === undefined ||
|
|
2768
2791
|
resourceArgs[2] === "--help" ||
|
|
2769
2792
|
resourceArgs[2] === "-h")) {
|
|
2770
|
-
return { command: "help", topic: "
|
|
2793
|
+
return { command: "help", topic: "app" };
|
|
2771
2794
|
}
|
|
2772
2795
|
if (resourceArgs[1] === "git" && resourceArgs[2] === "remote") {
|
|
2773
2796
|
return parseGitRemoteArgs(resourceArgs.slice(3));
|
|
@@ -2800,7 +2823,7 @@ function parseTenderArgs(args) {
|
|
|
2800
2823
|
(resourceArgs[2] === undefined ||
|
|
2801
2824
|
resourceArgs[2] === "--help" ||
|
|
2802
2825
|
resourceArgs[2] === "-h")) {
|
|
2803
|
-
return { command: "help", topic: "
|
|
2826
|
+
return { command: "help", topic: "app" };
|
|
2804
2827
|
}
|
|
2805
2828
|
if (resourceArgs[1] === "publish" && resourceArgs[2] === "status") {
|
|
2806
2829
|
return parsePublishStatusArgs(resourceArgs.slice(3));
|
|
@@ -2815,13 +2838,13 @@ function parseTenderArgs(args) {
|
|
|
2815
2838
|
(resourceArgs[2] === undefined ||
|
|
2816
2839
|
resourceArgs[2] === "--help" ||
|
|
2817
2840
|
resourceArgs[2] === "-h")) {
|
|
2818
|
-
return { command: "help", topic: "
|
|
2841
|
+
return { command: "help", topic: "app" };
|
|
2819
2842
|
}
|
|
2820
|
-
throw new TenderCliUsageError(`Unknown
|
|
2843
|
+
throw new TenderCliUsageError(`Unknown app command: ${resourceArgs[1]}`);
|
|
2821
2844
|
}
|
|
2822
2845
|
const rest = resourceArgs.slice(2);
|
|
2823
2846
|
if (rest.includes("--help") || rest.includes("-h")) {
|
|
2824
|
-
return { command: "help", topic: "
|
|
2847
|
+
return { command: "help", topic: "app doctor" };
|
|
2825
2848
|
}
|
|
2826
2849
|
let dir = ".";
|
|
2827
2850
|
let json = false;
|
|
@@ -2843,7 +2866,7 @@ function parseTenderArgs(args) {
|
|
|
2843
2866
|
throw new TenderCliUsageError(`Unknown doctor option: ${arg}`);
|
|
2844
2867
|
}
|
|
2845
2868
|
return {
|
|
2846
|
-
command: "
|
|
2869
|
+
command: "app doctor",
|
|
2847
2870
|
dir,
|
|
2848
2871
|
json,
|
|
2849
2872
|
};
|
|
@@ -2859,9 +2882,9 @@ function normalizeAppArgs(args) {
|
|
|
2859
2882
|
args[2] !== "watch" &&
|
|
2860
2883
|
args[2] !== "--help" &&
|
|
2861
2884
|
args[2] !== "-h") {
|
|
2862
|
-
return ["
|
|
2885
|
+
return ["app", "preview", "rebuild", ...args.slice(2)];
|
|
2863
2886
|
}
|
|
2864
|
-
return
|
|
2887
|
+
return args;
|
|
2865
2888
|
}
|
|
2866
2889
|
function formatDoctorHuman(result) {
|
|
2867
2890
|
if (result.diagnostics.length === 0) {
|
|
@@ -5390,101 +5413,101 @@ export async function runTenderCli(args, io = {
|
|
|
5390
5413
|
else if (command.topic === "auth") {
|
|
5391
5414
|
io.stdout(authHelp());
|
|
5392
5415
|
}
|
|
5393
|
-
else if (command.topic === "
|
|
5416
|
+
else if (command.topic === "app create") {
|
|
5394
5417
|
io.stdout(artifactsCreateHelp());
|
|
5395
5418
|
}
|
|
5396
|
-
else if (command.topic === "
|
|
5419
|
+
else if (command.topic === "app update") {
|
|
5397
5420
|
io.stdout(artifactsUpdateHelp());
|
|
5398
5421
|
}
|
|
5399
|
-
else if (command.topic === "
|
|
5422
|
+
else if (command.topic === "app init") {
|
|
5400
5423
|
io.stdout(artifactsInitHelp());
|
|
5401
5424
|
}
|
|
5402
|
-
else if (command.topic === "
|
|
5425
|
+
else if (command.topic === "app doctor") {
|
|
5403
5426
|
io.stdout(doctorHelp());
|
|
5404
5427
|
}
|
|
5405
|
-
else if (command.topic === "
|
|
5428
|
+
else if (command.topic === "app generate-env-types") {
|
|
5406
5429
|
io.stdout(generateEnvTypesHelp());
|
|
5407
5430
|
}
|
|
5408
|
-
else if (command.topic === "
|
|
5431
|
+
else if (command.topic === "app list") {
|
|
5409
5432
|
io.stdout(artifactsListHelp());
|
|
5410
5433
|
}
|
|
5411
|
-
else if (command.topic === "
|
|
5434
|
+
else if (command.topic === "app context fetch") {
|
|
5412
5435
|
io.stdout(artifactsContextFetchHelp());
|
|
5413
5436
|
}
|
|
5414
|
-
else if (command.topic === "
|
|
5437
|
+
else if (command.topic === "app context status") {
|
|
5415
5438
|
io.stdout(artifactsContextStatusHelp());
|
|
5416
5439
|
}
|
|
5417
|
-
else if (command.topic === "
|
|
5440
|
+
else if (command.topic === "app context refresh") {
|
|
5418
5441
|
io.stdout(artifactsContextRefreshHelp());
|
|
5419
5442
|
}
|
|
5420
|
-
else if (command.topic === "
|
|
5443
|
+
else if (command.topic === "app bindings outbound") {
|
|
5421
5444
|
io.stdout(bindingsOutboundHelp());
|
|
5422
5445
|
}
|
|
5423
|
-
else if (command.topic === "
|
|
5446
|
+
else if (command.topic === "app git setup") {
|
|
5424
5447
|
io.stdout(gitSetupHelp());
|
|
5425
5448
|
}
|
|
5426
|
-
else if (command.topic === "
|
|
5449
|
+
else if (command.topic === "app git credential") {
|
|
5427
5450
|
io.stdout(gitCredentialHelp());
|
|
5428
5451
|
}
|
|
5429
|
-
else if (command.topic === "
|
|
5452
|
+
else if (command.topic === "app git remote") {
|
|
5430
5453
|
io.stdout(gitRemoteHelp());
|
|
5431
5454
|
}
|
|
5432
|
-
else if (command.topic === "
|
|
5455
|
+
else if (command.topic === "app validate") {
|
|
5433
5456
|
io.stdout(validateHelp());
|
|
5434
5457
|
}
|
|
5435
|
-
else if (command.topic === "
|
|
5458
|
+
else if (command.topic === "app build") {
|
|
5436
5459
|
io.stdout(buildHelp());
|
|
5437
5460
|
}
|
|
5438
|
-
else if (command.topic === "
|
|
5461
|
+
else if (command.topic === "app preview rebuild") {
|
|
5439
5462
|
io.stdout(previewRebuildHelp());
|
|
5440
5463
|
}
|
|
5441
|
-
else if (command.topic === "
|
|
5464
|
+
else if (command.topic === "app preview status") {
|
|
5442
5465
|
io.stdout(previewStatusHelp());
|
|
5443
5466
|
}
|
|
5444
|
-
else if (command.topic === "
|
|
5467
|
+
else if (command.topic === "app preview watch") {
|
|
5445
5468
|
io.stdout(previewWatchHelp());
|
|
5446
5469
|
}
|
|
5447
|
-
else if (command.topic === "
|
|
5470
|
+
else if (command.topic === "app publish") {
|
|
5448
5471
|
io.stdout(publishHelp());
|
|
5449
5472
|
}
|
|
5450
|
-
else if (command.topic === "
|
|
5473
|
+
else if (command.topic === "app publish status") {
|
|
5451
5474
|
io.stdout(publishStatusHelp());
|
|
5452
5475
|
}
|
|
5453
|
-
else if (command.topic === "
|
|
5476
|
+
else if (command.topic === "app publish watch") {
|
|
5454
5477
|
io.stdout(publishWatchHelp());
|
|
5455
5478
|
}
|
|
5456
|
-
else if (command.topic === "
|
|
5479
|
+
else if (command.topic === "app analytics") {
|
|
5457
5480
|
io.stdout(analyticsHelp());
|
|
5458
5481
|
}
|
|
5459
|
-
else if (command.topic === "
|
|
5482
|
+
else if (command.topic === "app analytics summary") {
|
|
5460
5483
|
io.stdout(analyticsSummaryHelp());
|
|
5461
5484
|
}
|
|
5462
|
-
else if (command.topic === "
|
|
5485
|
+
else if (command.topic === "app analytics query") {
|
|
5463
5486
|
io.stdout(analyticsQueryHelp());
|
|
5464
5487
|
}
|
|
5465
|
-
else if (command.topic === "
|
|
5488
|
+
else if (command.topic === "app analytics capabilities") {
|
|
5466
5489
|
io.stdout(analyticsCapabilitiesHelp());
|
|
5467
5490
|
}
|
|
5468
|
-
else if (command.topic === "
|
|
5491
|
+
else if (command.topic === "app analytics suggestions") {
|
|
5469
5492
|
io.stdout(analyticsSuggestionsHelp());
|
|
5470
5493
|
}
|
|
5471
|
-
else if (command.topic === "
|
|
5494
|
+
else if (command.topic === "app analytics dashboards") {
|
|
5472
5495
|
io.stdout(analyticsDashboardsHelp());
|
|
5473
5496
|
}
|
|
5474
|
-
else if (command.topic === "
|
|
5497
|
+
else if (command.topic === "app analytics export") {
|
|
5475
5498
|
io.stdout(analyticsExportHelp());
|
|
5476
5499
|
}
|
|
5477
|
-
else if (command.topic === "
|
|
5500
|
+
else if (command.topic === "app analytics export catalog") {
|
|
5478
5501
|
io.stdout(analyticsExportCatalogHelp());
|
|
5479
5502
|
}
|
|
5480
|
-
else if (command.topic === "
|
|
5503
|
+
else if (command.topic === "app analytics export query") {
|
|
5481
5504
|
io.stdout(analyticsExportQueryHelp());
|
|
5482
5505
|
}
|
|
5483
|
-
else if (command.topic === "
|
|
5506
|
+
else if (command.topic === "app analytics charts create") {
|
|
5484
5507
|
io.stdout(analyticsChartsCreateHelp());
|
|
5485
5508
|
}
|
|
5486
|
-
else if (command.topic === "
|
|
5487
|
-
io.stdout(
|
|
5509
|
+
else if (command.topic === "app") {
|
|
5510
|
+
io.stdout(appHelp());
|
|
5488
5511
|
}
|
|
5489
5512
|
else {
|
|
5490
5513
|
io.stdout(rootHelp());
|
|
@@ -5500,88 +5523,88 @@ export async function runTenderCli(args, io = {
|
|
|
5500
5523
|
if (command.command === "auth status") {
|
|
5501
5524
|
return await runAuthStatus(command, io, runtime);
|
|
5502
5525
|
}
|
|
5503
|
-
if (command.command === "
|
|
5526
|
+
if (command.command === "app list") {
|
|
5504
5527
|
return await runArtifactsList(command, io, runtime);
|
|
5505
5528
|
}
|
|
5506
|
-
if (command.command === "
|
|
5529
|
+
if (command.command === "app create") {
|
|
5507
5530
|
return await runArtifactsCreate(command, io, runtime);
|
|
5508
5531
|
}
|
|
5509
|
-
if (command.command === "
|
|
5532
|
+
if (command.command === "app update") {
|
|
5510
5533
|
return await runArtifactsUpdate(command, io, runtime);
|
|
5511
5534
|
}
|
|
5512
|
-
if (command.command === "
|
|
5535
|
+
if (command.command === "app init") {
|
|
5513
5536
|
return await runArtifactsInit(command, io, runtime);
|
|
5514
5537
|
}
|
|
5515
|
-
if (command.command === "
|
|
5538
|
+
if (command.command === "app generate-env-types") {
|
|
5516
5539
|
return await runGenerateEnvTypes(command, io);
|
|
5517
5540
|
}
|
|
5518
|
-
if (command.command === "
|
|
5541
|
+
if (command.command === "app context fetch") {
|
|
5519
5542
|
return await runContextFetch(command, io, runtime);
|
|
5520
5543
|
}
|
|
5521
|
-
if (command.command === "
|
|
5544
|
+
if (command.command === "app context status") {
|
|
5522
5545
|
return await runContextStatus(command, io, runtime);
|
|
5523
5546
|
}
|
|
5524
|
-
if (command.command === "
|
|
5547
|
+
if (command.command === "app context refresh") {
|
|
5525
5548
|
return await runContextFetch(command, io, runtime);
|
|
5526
5549
|
}
|
|
5527
|
-
if (command.command === "
|
|
5550
|
+
if (command.command === "app bindings outbound") {
|
|
5528
5551
|
return runBindingsOutbound(command, io);
|
|
5529
5552
|
}
|
|
5530
|
-
if (command.command === "
|
|
5553
|
+
if (command.command === "app git setup") {
|
|
5531
5554
|
return await runGitSetup(command, io, runtime);
|
|
5532
5555
|
}
|
|
5533
|
-
if (command.command === "
|
|
5556
|
+
if (command.command === "app git credential") {
|
|
5534
5557
|
return await runGitCredential(command, io, runtime);
|
|
5535
5558
|
}
|
|
5536
|
-
if (command.command === "
|
|
5559
|
+
if (command.command === "app validate") {
|
|
5537
5560
|
return await runValidate(command, io, runtime);
|
|
5538
5561
|
}
|
|
5539
|
-
if (command.command === "
|
|
5562
|
+
if (command.command === "app build") {
|
|
5540
5563
|
return await runBuild(command, io, runtime);
|
|
5541
5564
|
}
|
|
5542
|
-
if (command.command === "
|
|
5565
|
+
if (command.command === "app preview rebuild") {
|
|
5543
5566
|
return await runPreviewRebuild(command, io, runtime);
|
|
5544
5567
|
}
|
|
5545
|
-
if (command.command === "
|
|
5568
|
+
if (command.command === "app preview status") {
|
|
5546
5569
|
return await runPreviewStatus(command, io, runtime);
|
|
5547
5570
|
}
|
|
5548
|
-
if (command.command === "
|
|
5571
|
+
if (command.command === "app preview watch") {
|
|
5549
5572
|
return await runPreviewWatch(command, io, runtime);
|
|
5550
5573
|
}
|
|
5551
|
-
if (command.command === "
|
|
5574
|
+
if (command.command === "app publish") {
|
|
5552
5575
|
return await runPublish(command, io, runtime);
|
|
5553
5576
|
}
|
|
5554
|
-
if (command.command === "
|
|
5577
|
+
if (command.command === "app publish status") {
|
|
5555
5578
|
return await runPublishStatus(command, io, runtime);
|
|
5556
5579
|
}
|
|
5557
|
-
if (command.command === "
|
|
5580
|
+
if (command.command === "app publish watch") {
|
|
5558
5581
|
return await runPublishWatch(command, io, runtime);
|
|
5559
5582
|
}
|
|
5560
|
-
if (command.command === "
|
|
5583
|
+
if (command.command === "app analytics summary") {
|
|
5561
5584
|
return await runAnalyticsSummary(command, io, runtime);
|
|
5562
5585
|
}
|
|
5563
|
-
if (command.command === "
|
|
5586
|
+
if (command.command === "app analytics query") {
|
|
5564
5587
|
return await runAnalyticsQuery(command, io, runtime);
|
|
5565
5588
|
}
|
|
5566
|
-
if (command.command === "
|
|
5589
|
+
if (command.command === "app analytics capabilities") {
|
|
5567
5590
|
return await runAnalyticsCapabilities(command, io, runtime);
|
|
5568
5591
|
}
|
|
5569
|
-
if (command.command === "
|
|
5592
|
+
if (command.command === "app analytics suggestions") {
|
|
5570
5593
|
return await runAnalyticsSuggestions(command, io, runtime);
|
|
5571
5594
|
}
|
|
5572
|
-
if (command.command === "
|
|
5595
|
+
if (command.command === "app analytics dashboards") {
|
|
5573
5596
|
return await runAnalyticsDashboards(command, io, runtime);
|
|
5574
5597
|
}
|
|
5575
|
-
if (command.command === "
|
|
5598
|
+
if (command.command === "app analytics export catalog") {
|
|
5576
5599
|
return await runAnalyticsExportCatalog(command, io, runtime);
|
|
5577
5600
|
}
|
|
5578
|
-
if (command.command === "
|
|
5601
|
+
if (command.command === "app analytics export query") {
|
|
5579
5602
|
return await runAnalyticsExportQuery(command, io, runtime);
|
|
5580
5603
|
}
|
|
5581
|
-
if (command.command === "
|
|
5604
|
+
if (command.command === "app analytics charts create") {
|
|
5582
5605
|
return await runAnalyticsChartsCreate(command, io, runtime);
|
|
5583
5606
|
}
|
|
5584
|
-
if (command.command === "
|
|
5607
|
+
if (command.command === "app git remote") {
|
|
5585
5608
|
return await runGitRemote(command, io, runtime);
|
|
5586
5609
|
}
|
|
5587
5610
|
return await runDoctor(command, io);
|
|
@@ -5594,7 +5617,7 @@ export async function runTenderCli(args, io = {
|
|
|
5594
5617
|
}
|
|
5595
5618
|
const currentFile = fileURLToPath(import.meta.url);
|
|
5596
5619
|
function shouldReadEntrypointStdin(args) {
|
|
5597
|
-
return (
|
|
5620
|
+
return (args[0] === "app" &&
|
|
5598
5621
|
((args[1] === "git" && args[2] === "credential") ||
|
|
5599
5622
|
(args[1] === "analytics" && args.includes("--spec") && args.includes("-"))));
|
|
5600
5623
|
}
|