@uniformdev/cli 19.214.0 → 19.214.1-alpha.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/dist/index.mjs
CHANGED
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
import * as dotenv from "dotenv";
|
|
23
|
-
import
|
|
23
|
+
import yargs34 from "yargs";
|
|
24
24
|
import { hideBin } from "yargs/helpers";
|
|
25
25
|
|
|
26
26
|
// src/commands/canvas/index.ts
|
|
27
|
-
import
|
|
27
|
+
import yargs17 from "yargs";
|
|
28
28
|
|
|
29
29
|
// src/commands/canvas/commands/asset.ts
|
|
30
30
|
import yargs from "yargs";
|
|
@@ -580,12 +580,12 @@ function getFileClient(options) {
|
|
|
580
580
|
var AssetGetModule = {
|
|
581
581
|
command: "get <id>",
|
|
582
582
|
describe: "Get an asset",
|
|
583
|
-
builder: (
|
|
583
|
+
builder: (yargs35) => withConfiguration(
|
|
584
584
|
withDebugOptions(
|
|
585
585
|
withFormatOptions(
|
|
586
586
|
withApiOptions(
|
|
587
587
|
withProjectOptions(
|
|
588
|
-
|
|
588
|
+
yargs35.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
|
|
589
589
|
)
|
|
590
590
|
)
|
|
591
591
|
)
|
|
@@ -606,7 +606,7 @@ var AssetGetModule = {
|
|
|
606
606
|
var AssetListModule = {
|
|
607
607
|
command: "list",
|
|
608
608
|
describe: "List assets",
|
|
609
|
-
builder: (
|
|
609
|
+
builder: (yargs35) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs35))))),
|
|
610
610
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
611
611
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
612
612
|
const client = getAssetClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -965,8 +965,8 @@ function prepCompositionForDisk(composition) {
|
|
|
965
965
|
delete prepped.state;
|
|
966
966
|
return prepped;
|
|
967
967
|
}
|
|
968
|
-
function withStateOptions(
|
|
969
|
-
return
|
|
968
|
+
function withStateOptions(yargs35, defaultState = "preview") {
|
|
969
|
+
return yargs35.option("state", {
|
|
970
970
|
type: "string",
|
|
971
971
|
describe: `State to fetch.`,
|
|
972
972
|
choices: ["preview", "published"],
|
|
@@ -1048,12 +1048,12 @@ function writeCanvasPackage(filename, packageContents) {
|
|
|
1048
1048
|
var AssetPullModule = {
|
|
1049
1049
|
command: "pull <directory>",
|
|
1050
1050
|
describe: "Pulls all assets to local files in a directory",
|
|
1051
|
-
builder: (
|
|
1051
|
+
builder: (yargs35) => withConfiguration(
|
|
1052
1052
|
withApiOptions(
|
|
1053
1053
|
withDebugOptions(
|
|
1054
1054
|
withProjectOptions(
|
|
1055
1055
|
withDiffOptions(
|
|
1056
|
-
|
|
1056
|
+
yargs35.positional("directory", {
|
|
1057
1057
|
describe: "Directory to save the assets to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
1058
1058
|
type: "string"
|
|
1059
1059
|
}).option("format", {
|
|
@@ -1167,12 +1167,12 @@ var AssetPullModule = {
|
|
|
1167
1167
|
var AssetPushModule = {
|
|
1168
1168
|
command: "push <directory>",
|
|
1169
1169
|
describe: "Pushes all assets from files in a directory to Uniform",
|
|
1170
|
-
builder: (
|
|
1170
|
+
builder: (yargs35) => withConfiguration(
|
|
1171
1171
|
withApiOptions(
|
|
1172
1172
|
withDebugOptions(
|
|
1173
1173
|
withProjectOptions(
|
|
1174
1174
|
withDiffOptions(
|
|
1175
|
-
|
|
1175
|
+
yargs35.positional("directory", {
|
|
1176
1176
|
describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
|
|
1177
1177
|
type: "string"
|
|
1178
1178
|
}).option("mode", {
|
|
@@ -1296,10 +1296,10 @@ var AssetRemoveModule = {
|
|
|
1296
1296
|
command: "remove <id>",
|
|
1297
1297
|
aliases: ["delete", "rm"],
|
|
1298
1298
|
describe: "Delete an asset",
|
|
1299
|
-
builder: (
|
|
1299
|
+
builder: (yargs35) => withConfiguration(
|
|
1300
1300
|
withDebugOptions(
|
|
1301
1301
|
withApiOptions(
|
|
1302
|
-
withProjectOptions(
|
|
1302
|
+
withProjectOptions(yargs35.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
|
|
1303
1303
|
)
|
|
1304
1304
|
)
|
|
1305
1305
|
),
|
|
@@ -1320,11 +1320,11 @@ var AssetUpdateModule = {
|
|
|
1320
1320
|
command: "update <filename>",
|
|
1321
1321
|
aliases: ["put"],
|
|
1322
1322
|
describe: "Insert or update an asset",
|
|
1323
|
-
builder: (
|
|
1323
|
+
builder: (yargs35) => withConfiguration(
|
|
1324
1324
|
withDebugOptions(
|
|
1325
1325
|
withApiOptions(
|
|
1326
1326
|
withProjectOptions(
|
|
1327
|
-
|
|
1327
|
+
yargs35.positional("filename", { demandOption: true, describe: "Asset file to put" })
|
|
1328
1328
|
)
|
|
1329
1329
|
)
|
|
1330
1330
|
)
|
|
@@ -1350,7 +1350,7 @@ var AssetUpdateModule = {
|
|
|
1350
1350
|
var AssetModule = {
|
|
1351
1351
|
command: "asset <command>",
|
|
1352
1352
|
describe: "Commands for Assets",
|
|
1353
|
-
builder: (
|
|
1353
|
+
builder: (yargs35) => yargs35.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
|
|
1354
1354
|
handler: () => {
|
|
1355
1355
|
yargs.help();
|
|
1356
1356
|
}
|
|
@@ -1371,12 +1371,12 @@ function getCategoryClient(options) {
|
|
|
1371
1371
|
var CategoryGetModule = {
|
|
1372
1372
|
command: "get <id>",
|
|
1373
1373
|
describe: "Fetch a category",
|
|
1374
|
-
builder: (
|
|
1374
|
+
builder: (yargs35) => withConfiguration(
|
|
1375
1375
|
withFormatOptions(
|
|
1376
1376
|
withDebugOptions(
|
|
1377
1377
|
withApiOptions(
|
|
1378
1378
|
withProjectOptions(
|
|
1379
|
-
|
|
1379
|
+
yargs35.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
|
|
1380
1380
|
)
|
|
1381
1381
|
)
|
|
1382
1382
|
)
|
|
@@ -1401,8 +1401,8 @@ var CategoryListModule = {
|
|
|
1401
1401
|
command: "list",
|
|
1402
1402
|
describe: "List categories",
|
|
1403
1403
|
aliases: ["ls"],
|
|
1404
|
-
builder: (
|
|
1405
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
1404
|
+
builder: (yargs35) => withConfiguration(
|
|
1405
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs35.options({})))))
|
|
1406
1406
|
),
|
|
1407
1407
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
1408
1408
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -1446,12 +1446,12 @@ function createCategoriesEngineDataSource({
|
|
|
1446
1446
|
var CategoryPullModule = {
|
|
1447
1447
|
command: "pull <directory>",
|
|
1448
1448
|
describe: "Pulls all categories to local files in a directory",
|
|
1449
|
-
builder: (
|
|
1449
|
+
builder: (yargs35) => withConfiguration(
|
|
1450
1450
|
withApiOptions(
|
|
1451
1451
|
withProjectOptions(
|
|
1452
1452
|
withDiffOptions(
|
|
1453
1453
|
withDebugOptions(
|
|
1454
|
-
|
|
1454
|
+
yargs35.positional("directory", {
|
|
1455
1455
|
describe: "Directory to save the categories to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
1456
1456
|
type: "string"
|
|
1457
1457
|
}).option("format", {
|
|
@@ -1526,12 +1526,12 @@ var CategoryPullModule = {
|
|
|
1526
1526
|
var CategoryPushModule = {
|
|
1527
1527
|
command: "push <directory>",
|
|
1528
1528
|
describe: "Pushes all categories from files in a directory to Uniform Canvas",
|
|
1529
|
-
builder: (
|
|
1529
|
+
builder: (yargs35) => withConfiguration(
|
|
1530
1530
|
withApiOptions(
|
|
1531
1531
|
withDebugOptions(
|
|
1532
1532
|
withProjectOptions(
|
|
1533
1533
|
withDiffOptions(
|
|
1534
|
-
|
|
1534
|
+
yargs35.positional("directory", {
|
|
1535
1535
|
describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
|
|
1536
1536
|
type: "string"
|
|
1537
1537
|
}).option("mode", {
|
|
@@ -1595,11 +1595,11 @@ var CategoryRemoveModule = {
|
|
|
1595
1595
|
command: "remove <id>",
|
|
1596
1596
|
aliases: ["delete", "rm"],
|
|
1597
1597
|
describe: "Delete a category",
|
|
1598
|
-
builder: (
|
|
1598
|
+
builder: (yargs35) => withConfiguration(
|
|
1599
1599
|
withApiOptions(
|
|
1600
1600
|
withDebugOptions(
|
|
1601
1601
|
withProjectOptions(
|
|
1602
|
-
|
|
1602
|
+
yargs35.positional("id", { demandOption: true, describe: "Category UUID to delete" })
|
|
1603
1603
|
)
|
|
1604
1604
|
)
|
|
1605
1605
|
)
|
|
@@ -1620,11 +1620,11 @@ var CategoryUpdateModule = {
|
|
|
1620
1620
|
command: "update <filename>",
|
|
1621
1621
|
aliases: ["put"],
|
|
1622
1622
|
describe: "Insert or update a category",
|
|
1623
|
-
builder: (
|
|
1623
|
+
builder: (yargs35) => withConfiguration(
|
|
1624
1624
|
withApiOptions(
|
|
1625
1625
|
withDebugOptions(
|
|
1626
1626
|
withProjectOptions(
|
|
1627
|
-
|
|
1627
|
+
yargs35.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
1628
1628
|
)
|
|
1629
1629
|
)
|
|
1630
1630
|
)
|
|
@@ -1646,7 +1646,7 @@ var CategoryModule = {
|
|
|
1646
1646
|
command: "category <command>",
|
|
1647
1647
|
aliases: ["cat"],
|
|
1648
1648
|
describe: "Commands for Canvas categories",
|
|
1649
|
-
builder: (
|
|
1649
|
+
builder: (yargs35) => yargs35.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
|
|
1650
1650
|
handler: () => {
|
|
1651
1651
|
yargs2.help();
|
|
1652
1652
|
}
|
|
@@ -1668,12 +1668,12 @@ function getCanvasClient(options) {
|
|
|
1668
1668
|
var ComponentGetModule = {
|
|
1669
1669
|
command: "get <id>",
|
|
1670
1670
|
describe: "Fetch a component definition",
|
|
1671
|
-
builder: (
|
|
1671
|
+
builder: (yargs35) => withConfiguration(
|
|
1672
1672
|
withFormatOptions(
|
|
1673
1673
|
withDebugOptions(
|
|
1674
1674
|
withApiOptions(
|
|
1675
1675
|
withProjectOptions(
|
|
1676
|
-
|
|
1676
|
+
yargs35.positional("id", {
|
|
1677
1677
|
demandOption: true,
|
|
1678
1678
|
describe: "Component definition public ID to fetch"
|
|
1679
1679
|
})
|
|
@@ -1707,12 +1707,12 @@ var ComponentListModule = {
|
|
|
1707
1707
|
command: "list",
|
|
1708
1708
|
describe: "List component definitions",
|
|
1709
1709
|
aliases: ["ls"],
|
|
1710
|
-
builder: (
|
|
1710
|
+
builder: (yargs35) => withConfiguration(
|
|
1711
1711
|
withFormatOptions(
|
|
1712
1712
|
withDebugOptions(
|
|
1713
1713
|
withApiOptions(
|
|
1714
1714
|
withProjectOptions(
|
|
1715
|
-
|
|
1715
|
+
yargs35.options({
|
|
1716
1716
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
1717
1717
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
|
|
1718
1718
|
})
|
|
@@ -1776,12 +1776,12 @@ function createComponentDefinitionEngineDataSource({
|
|
|
1776
1776
|
var ComponentPullModule = {
|
|
1777
1777
|
command: "pull <directory>",
|
|
1778
1778
|
describe: "Pulls all component definitions to local files in a directory",
|
|
1779
|
-
builder: (
|
|
1779
|
+
builder: (yargs35) => withConfiguration(
|
|
1780
1780
|
withApiOptions(
|
|
1781
1781
|
withDebugOptions(
|
|
1782
1782
|
withProjectOptions(
|
|
1783
1783
|
withDiffOptions(
|
|
1784
|
-
|
|
1784
|
+
yargs35.positional("directory", {
|
|
1785
1785
|
describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
1786
1786
|
type: "string"
|
|
1787
1787
|
}).option("format", {
|
|
@@ -1857,12 +1857,12 @@ var ComponentPullModule = {
|
|
|
1857
1857
|
var ComponentPushModule = {
|
|
1858
1858
|
command: "push <directory>",
|
|
1859
1859
|
describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
|
|
1860
|
-
builder: (
|
|
1860
|
+
builder: (yargs35) => withConfiguration(
|
|
1861
1861
|
withApiOptions(
|
|
1862
1862
|
withDebugOptions(
|
|
1863
1863
|
withProjectOptions(
|
|
1864
1864
|
withDiffOptions(
|
|
1865
|
-
|
|
1865
|
+
yargs35.positional("directory", {
|
|
1866
1866
|
describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
|
|
1867
1867
|
type: "string"
|
|
1868
1868
|
}).option("mode", {
|
|
@@ -1927,11 +1927,11 @@ var ComponentRemoveModule = {
|
|
|
1927
1927
|
command: "remove <id>",
|
|
1928
1928
|
aliases: ["delete", "rm"],
|
|
1929
1929
|
describe: "Delete a component definition",
|
|
1930
|
-
builder: (
|
|
1930
|
+
builder: (yargs35) => withConfiguration(
|
|
1931
1931
|
withDebugOptions(
|
|
1932
1932
|
withApiOptions(
|
|
1933
1933
|
withProjectOptions(
|
|
1934
|
-
|
|
1934
|
+
yargs35.positional("id", {
|
|
1935
1935
|
demandOption: true,
|
|
1936
1936
|
describe: "Component definition public ID to delete"
|
|
1937
1937
|
})
|
|
@@ -1955,11 +1955,11 @@ var ComponentUpdateModule = {
|
|
|
1955
1955
|
command: "update <filename>",
|
|
1956
1956
|
aliases: ["put"],
|
|
1957
1957
|
describe: "Insert or update a component definition",
|
|
1958
|
-
builder: (
|
|
1958
|
+
builder: (yargs35) => withConfiguration(
|
|
1959
1959
|
withApiOptions(
|
|
1960
1960
|
withDebugOptions(
|
|
1961
1961
|
withProjectOptions(
|
|
1962
|
-
|
|
1962
|
+
yargs35.positional("filename", { demandOption: true, describe: "Component definition file to put" })
|
|
1963
1963
|
)
|
|
1964
1964
|
)
|
|
1965
1965
|
)
|
|
@@ -1981,7 +1981,7 @@ var ComponentModule = {
|
|
|
1981
1981
|
command: "component <command>",
|
|
1982
1982
|
aliases: ["def"],
|
|
1983
1983
|
describe: "Commands for Canvas component definitions",
|
|
1984
|
-
builder: (
|
|
1984
|
+
builder: (yargs35) => yargs35.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
|
|
1985
1985
|
handler: () => {
|
|
1986
1986
|
yargs3.help();
|
|
1987
1987
|
}
|
|
@@ -1994,13 +1994,13 @@ import yargs4 from "yargs";
|
|
|
1994
1994
|
var CompositionGetModule = {
|
|
1995
1995
|
command: "get <id>",
|
|
1996
1996
|
describe: "Fetch a composition",
|
|
1997
|
-
builder: (
|
|
1997
|
+
builder: (yargs35) => withFormatOptions(
|
|
1998
1998
|
withConfiguration(
|
|
1999
1999
|
withApiOptions(
|
|
2000
2000
|
withProjectOptions(
|
|
2001
2001
|
withStateOptions(
|
|
2002
2002
|
withDebugOptions(
|
|
2003
|
-
|
|
2003
|
+
yargs35.positional("id", {
|
|
2004
2004
|
demandOption: true,
|
|
2005
2005
|
describe: "Composition/pattern public ID to fetch"
|
|
2006
2006
|
}).option({
|
|
@@ -2090,13 +2090,13 @@ var CompositionListModule = {
|
|
|
2090
2090
|
command: "list",
|
|
2091
2091
|
describe: "List compositions",
|
|
2092
2092
|
aliases: ["ls"],
|
|
2093
|
-
builder: (
|
|
2093
|
+
builder: (yargs35) => withFormatOptions(
|
|
2094
2094
|
withConfiguration(
|
|
2095
2095
|
withApiOptions(
|
|
2096
2096
|
withProjectOptions(
|
|
2097
2097
|
withDebugOptions(
|
|
2098
2098
|
withStateOptions(
|
|
2099
|
-
|
|
2099
|
+
yargs35.options({
|
|
2100
2100
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
2101
2101
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
2102
2102
|
search: { describe: "Search query", type: "string", default: "" },
|
|
@@ -2177,13 +2177,13 @@ var CompositionListModule = {
|
|
|
2177
2177
|
var ComponentPatternListModule = {
|
|
2178
2178
|
...CompositionListModule,
|
|
2179
2179
|
describe: "List component patterns",
|
|
2180
|
-
builder: (
|
|
2180
|
+
builder: (yargs35) => withFormatOptions(
|
|
2181
2181
|
withConfiguration(
|
|
2182
2182
|
withApiOptions(
|
|
2183
2183
|
withDebugOptions(
|
|
2184
2184
|
withProjectOptions(
|
|
2185
2185
|
withStateOptions(
|
|
2186
|
-
|
|
2186
|
+
yargs35.options({
|
|
2187
2187
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
2188
2188
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
2189
2189
|
resolvePatterns: {
|
|
@@ -2306,12 +2306,12 @@ function createComponentInstanceEngineDataSource({
|
|
|
2306
2306
|
var CompositionPublishModule = {
|
|
2307
2307
|
command: "publish [ids]",
|
|
2308
2308
|
describe: "Publishes composition(s)",
|
|
2309
|
-
builder: (
|
|
2309
|
+
builder: (yargs35) => withConfiguration(
|
|
2310
2310
|
withApiOptions(
|
|
2311
2311
|
withProjectOptions(
|
|
2312
2312
|
withDebugOptions(
|
|
2313
2313
|
withDiffOptions(
|
|
2314
|
-
|
|
2314
|
+
yargs35.positional("ids", {
|
|
2315
2315
|
describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
2316
2316
|
type: "string"
|
|
2317
2317
|
}).option("all", {
|
|
@@ -2388,12 +2388,12 @@ var CompositionPublishModule = {
|
|
|
2388
2388
|
var ComponentPatternPublishModule = {
|
|
2389
2389
|
...CompositionPublishModule,
|
|
2390
2390
|
describe: "Publishes component pattern(s)",
|
|
2391
|
-
builder: (
|
|
2391
|
+
builder: (yargs35) => withConfiguration(
|
|
2392
2392
|
withApiOptions(
|
|
2393
2393
|
withDebugOptions(
|
|
2394
2394
|
withProjectOptions(
|
|
2395
2395
|
withDiffOptions(
|
|
2396
|
-
|
|
2396
|
+
yargs35.positional("ids", {
|
|
2397
2397
|
describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
2398
2398
|
type: "string"
|
|
2399
2399
|
}).option("all", {
|
|
@@ -2431,13 +2431,13 @@ var ComponentPatternPublishModule = {
|
|
|
2431
2431
|
var CompositionPullModule = {
|
|
2432
2432
|
command: "pull <directory>",
|
|
2433
2433
|
describe: "Pulls all compositions to local files in a directory",
|
|
2434
|
-
builder: (
|
|
2434
|
+
builder: (yargs35) => withConfiguration(
|
|
2435
2435
|
withApiOptions(
|
|
2436
2436
|
withProjectOptions(
|
|
2437
2437
|
withStateOptions(
|
|
2438
2438
|
withDebugOptions(
|
|
2439
2439
|
withDiffOptions(
|
|
2440
|
-
|
|
2440
|
+
yargs35.positional("directory", {
|
|
2441
2441
|
describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
2442
2442
|
type: "string"
|
|
2443
2443
|
}).option("format", {
|
|
@@ -2546,13 +2546,13 @@ var CompositionPullModule = {
|
|
|
2546
2546
|
var ComponentPatternPullModule = {
|
|
2547
2547
|
...CompositionPullModule,
|
|
2548
2548
|
describe: "Pulls all component patterns to local files in a directory",
|
|
2549
|
-
builder: (
|
|
2549
|
+
builder: (yargs35) => withConfiguration(
|
|
2550
2550
|
withApiOptions(
|
|
2551
2551
|
withProjectOptions(
|
|
2552
2552
|
withDebugOptions(
|
|
2553
2553
|
withStateOptions(
|
|
2554
2554
|
withDiffOptions(
|
|
2555
|
-
|
|
2555
|
+
yargs35.positional("directory", {
|
|
2556
2556
|
describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
2557
2557
|
type: "string"
|
|
2558
2558
|
}).option("format", {
|
|
@@ -2595,13 +2595,13 @@ var ComponentPatternPullModule = {
|
|
|
2595
2595
|
var CompositionPushModule = {
|
|
2596
2596
|
command: "push <directory>",
|
|
2597
2597
|
describe: "Pushes all compositions from files in a directory to Uniform Canvas",
|
|
2598
|
-
builder: (
|
|
2598
|
+
builder: (yargs35) => withConfiguration(
|
|
2599
2599
|
withApiOptions(
|
|
2600
2600
|
withProjectOptions(
|
|
2601
2601
|
withStateOptions(
|
|
2602
2602
|
withDebugOptions(
|
|
2603
2603
|
withDiffOptions(
|
|
2604
|
-
|
|
2604
|
+
yargs35.positional("directory", {
|
|
2605
2605
|
describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
|
|
2606
2606
|
type: "string"
|
|
2607
2607
|
}).option("mode", {
|
|
@@ -2698,13 +2698,13 @@ var CompositionPushModule = {
|
|
|
2698
2698
|
var ComponentPatternPushModule = {
|
|
2699
2699
|
...CompositionPushModule,
|
|
2700
2700
|
describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
|
|
2701
|
-
builder: (
|
|
2701
|
+
builder: (yargs35) => withConfiguration(
|
|
2702
2702
|
withApiOptions(
|
|
2703
2703
|
withProjectOptions(
|
|
2704
2704
|
withStateOptions(
|
|
2705
2705
|
withDiffOptions(
|
|
2706
2706
|
withDebugOptions(
|
|
2707
|
-
|
|
2707
|
+
yargs35.positional("directory", {
|
|
2708
2708
|
describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
|
|
2709
2709
|
type: "string"
|
|
2710
2710
|
}).option("mode", {
|
|
@@ -2737,11 +2737,11 @@ var CompositionRemoveModule = {
|
|
|
2737
2737
|
command: "remove <id>",
|
|
2738
2738
|
aliases: ["delete", "rm"],
|
|
2739
2739
|
describe: "Delete a composition",
|
|
2740
|
-
builder: (
|
|
2740
|
+
builder: (yargs35) => withConfiguration(
|
|
2741
2741
|
withApiOptions(
|
|
2742
2742
|
withDebugOptions(
|
|
2743
2743
|
withProjectOptions(
|
|
2744
|
-
|
|
2744
|
+
yargs35.positional("id", {
|
|
2745
2745
|
demandOption: true,
|
|
2746
2746
|
describe: "Composition/pattern public ID to delete"
|
|
2747
2747
|
})
|
|
@@ -2775,11 +2775,11 @@ import { diffJson as diffJson2 } from "diff";
|
|
|
2775
2775
|
var CompositionUnpublishModule = {
|
|
2776
2776
|
command: "unpublish [ids]",
|
|
2777
2777
|
describe: "Unpublish a composition(s)",
|
|
2778
|
-
builder: (
|
|
2778
|
+
builder: (yargs35) => withConfiguration(
|
|
2779
2779
|
withApiOptions(
|
|
2780
2780
|
withDebugOptions(
|
|
2781
2781
|
withProjectOptions(
|
|
2782
|
-
|
|
2782
|
+
yargs35.positional("ids", {
|
|
2783
2783
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
2784
2784
|
type: "string"
|
|
2785
2785
|
}).option("all", {
|
|
@@ -2876,11 +2876,11 @@ var CompositionUnpublishModule = {
|
|
|
2876
2876
|
var ComponentPatternUnpublishModule = {
|
|
2877
2877
|
command: "unpublish [ids]",
|
|
2878
2878
|
describe: "Unpublish a component pattern(s)",
|
|
2879
|
-
builder: (
|
|
2879
|
+
builder: (yargs35) => withConfiguration(
|
|
2880
2880
|
withApiOptions(
|
|
2881
2881
|
withDebugOptions(
|
|
2882
2882
|
withProjectOptions(
|
|
2883
|
-
|
|
2883
|
+
yargs35.positional("ids", {
|
|
2884
2884
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
2885
2885
|
type: "string"
|
|
2886
2886
|
}).option("all", {
|
|
@@ -2914,12 +2914,12 @@ var CompositionUpdateModule = {
|
|
|
2914
2914
|
command: "update <filename>",
|
|
2915
2915
|
aliases: ["put"],
|
|
2916
2916
|
describe: "Insert or update a composition",
|
|
2917
|
-
builder: (
|
|
2917
|
+
builder: (yargs35) => withConfiguration(
|
|
2918
2918
|
withApiOptions(
|
|
2919
2919
|
withProjectOptions(
|
|
2920
2920
|
withDebugOptions(
|
|
2921
2921
|
withStateOptions(
|
|
2922
|
-
|
|
2922
|
+
yargs35.positional("filename", {
|
|
2923
2923
|
demandOption: true,
|
|
2924
2924
|
describe: "Composition/pattern file to put"
|
|
2925
2925
|
})
|
|
@@ -2957,7 +2957,7 @@ var ComponentPatternUpdateModule = {
|
|
|
2957
2957
|
var ComponentPatternModule = {
|
|
2958
2958
|
command: "component-pattern <command>",
|
|
2959
2959
|
describe: "Commands for Canvas component patterns",
|
|
2960
|
-
builder: (
|
|
2960
|
+
builder: (yargs35) => yargs35.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
|
|
2961
2961
|
handler: () => {
|
|
2962
2962
|
yargs4.help();
|
|
2963
2963
|
}
|
|
@@ -2969,7 +2969,7 @@ var CompositionModule = {
|
|
|
2969
2969
|
command: "composition <command>",
|
|
2970
2970
|
describe: "Commands for Canvas compositions",
|
|
2971
2971
|
aliases: ["comp"],
|
|
2972
|
-
builder: (
|
|
2972
|
+
builder: (yargs35) => yargs35.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
|
|
2973
2973
|
handler: () => {
|
|
2974
2974
|
yargs5.help();
|
|
2975
2975
|
}
|
|
@@ -2988,13 +2988,13 @@ var CompositionPatternGetModule = {
|
|
|
2988
2988
|
var CompositionPatternListModule = {
|
|
2989
2989
|
...CompositionListModule,
|
|
2990
2990
|
describe: "List composition patterns",
|
|
2991
|
-
builder: (
|
|
2991
|
+
builder: (yargs35) => withFormatOptions(
|
|
2992
2992
|
withConfiguration(
|
|
2993
2993
|
withApiOptions(
|
|
2994
2994
|
withDebugOptions(
|
|
2995
2995
|
withProjectOptions(
|
|
2996
2996
|
withStateOptions(
|
|
2997
|
-
|
|
2997
|
+
yargs35.options({
|
|
2998
2998
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
2999
2999
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
3000
3000
|
resolvePatterns: {
|
|
@@ -3038,12 +3038,12 @@ var CompositionPatternListModule = {
|
|
|
3038
3038
|
var CompositionPatternPublishModule = {
|
|
3039
3039
|
...CompositionPublishModule,
|
|
3040
3040
|
describe: "Publishes composition pattern(s)",
|
|
3041
|
-
builder: (
|
|
3041
|
+
builder: (yargs35) => withConfiguration(
|
|
3042
3042
|
withApiOptions(
|
|
3043
3043
|
withDebugOptions(
|
|
3044
3044
|
withProjectOptions(
|
|
3045
3045
|
withDiffOptions(
|
|
3046
|
-
|
|
3046
|
+
yargs35.positional("ids", {
|
|
3047
3047
|
describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
3048
3048
|
type: "string"
|
|
3049
3049
|
}).option("all", {
|
|
@@ -3082,13 +3082,13 @@ var CompositionPatternPublishModule = {
|
|
|
3082
3082
|
var CompositionPatternPullModule = {
|
|
3083
3083
|
...CompositionPullModule,
|
|
3084
3084
|
describe: "Pulls all composition patterns to local files in a directory",
|
|
3085
|
-
builder: (
|
|
3085
|
+
builder: (yargs35) => withConfiguration(
|
|
3086
3086
|
withApiOptions(
|
|
3087
3087
|
withDebugOptions(
|
|
3088
3088
|
withProjectOptions(
|
|
3089
3089
|
withStateOptions(
|
|
3090
3090
|
withDiffOptions(
|
|
3091
|
-
|
|
3091
|
+
yargs35.positional("directory", {
|
|
3092
3092
|
describe: "Directory to save the composition patterns to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
3093
3093
|
type: "string"
|
|
3094
3094
|
}).option("format", {
|
|
@@ -3126,13 +3126,13 @@ var CompositionPatternPullModule = {
|
|
|
3126
3126
|
var CompositionPatternPushModule = {
|
|
3127
3127
|
...CompositionPushModule,
|
|
3128
3128
|
describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
|
|
3129
|
-
builder: (
|
|
3129
|
+
builder: (yargs35) => withConfiguration(
|
|
3130
3130
|
withApiOptions(
|
|
3131
3131
|
withDebugOptions(
|
|
3132
3132
|
withProjectOptions(
|
|
3133
3133
|
withStateOptions(
|
|
3134
3134
|
withDiffOptions(
|
|
3135
|
-
|
|
3135
|
+
yargs35.positional("directory", {
|
|
3136
3136
|
describe: "Directory to read the compositions patterns from. If a filename is used, a package will be read instead.",
|
|
3137
3137
|
type: "string"
|
|
3138
3138
|
}).option("mode", {
|
|
@@ -3170,11 +3170,11 @@ var CompositionPatternRemoveModule = {
|
|
|
3170
3170
|
var CompositionPatternUnpublishModule = {
|
|
3171
3171
|
command: "unpublish [ids]",
|
|
3172
3172
|
describe: "Unpublish a composition pattern(s)",
|
|
3173
|
-
builder: (
|
|
3173
|
+
builder: (yargs35) => withConfiguration(
|
|
3174
3174
|
withApiOptions(
|
|
3175
3175
|
withDebugOptions(
|
|
3176
3176
|
withProjectOptions(
|
|
3177
|
-
|
|
3177
|
+
yargs35.positional("ids", {
|
|
3178
3178
|
describe: "Un-publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
3179
3179
|
type: "string"
|
|
3180
3180
|
}).option("all", {
|
|
@@ -3210,7 +3210,7 @@ var CompositionPatternUpdateModule = {
|
|
|
3210
3210
|
var CompositionPatternModule = {
|
|
3211
3211
|
command: "composition-pattern <command>",
|
|
3212
3212
|
describe: "Commands for Canvas composition patterns",
|
|
3213
|
-
builder: (
|
|
3213
|
+
builder: (yargs35) => yargs35.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
|
|
3214
3214
|
handler: () => {
|
|
3215
3215
|
yargs6.help();
|
|
3216
3216
|
}
|
|
@@ -3231,12 +3231,12 @@ function getContentClient(options) {
|
|
|
3231
3231
|
var ContentTypeGetModule = {
|
|
3232
3232
|
command: "get <id>",
|
|
3233
3233
|
describe: "Get a content type",
|
|
3234
|
-
builder: (
|
|
3234
|
+
builder: (yargs35) => withConfiguration(
|
|
3235
3235
|
withDebugOptions(
|
|
3236
3236
|
withFormatOptions(
|
|
3237
3237
|
withApiOptions(
|
|
3238
3238
|
withProjectOptions(
|
|
3239
|
-
|
|
3239
|
+
yargs35.positional("id", {
|
|
3240
3240
|
demandOption: true,
|
|
3241
3241
|
describe: "Content type public ID to fetch"
|
|
3242
3242
|
})
|
|
@@ -3261,7 +3261,7 @@ var ContentTypeGetModule = {
|
|
|
3261
3261
|
var ContentTypeListModule = {
|
|
3262
3262
|
command: "list",
|
|
3263
3263
|
describe: "List content types",
|
|
3264
|
-
builder: (
|
|
3264
|
+
builder: (yargs35) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs35))))),
|
|
3265
3265
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
3266
3266
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
3267
3267
|
const client = getContentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -3302,12 +3302,12 @@ function createContentTypeEngineDataSource({
|
|
|
3302
3302
|
var ContentTypePullModule = {
|
|
3303
3303
|
command: "pull <directory>",
|
|
3304
3304
|
describe: "Pulls all content types to local files in a directory",
|
|
3305
|
-
builder: (
|
|
3305
|
+
builder: (yargs35) => withConfiguration(
|
|
3306
3306
|
withApiOptions(
|
|
3307
3307
|
withDebugOptions(
|
|
3308
3308
|
withProjectOptions(
|
|
3309
3309
|
withDiffOptions(
|
|
3310
|
-
|
|
3310
|
+
yargs35.positional("directory", {
|
|
3311
3311
|
describe: "Directory to save the content types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
3312
3312
|
type: "string"
|
|
3313
3313
|
}).option("format", {
|
|
@@ -3387,12 +3387,12 @@ var ContentTypePullModule = {
|
|
|
3387
3387
|
var ContentTypePushModule = {
|
|
3388
3388
|
command: "push <directory>",
|
|
3389
3389
|
describe: "Pushes all content types from files in a directory to Uniform",
|
|
3390
|
-
builder: (
|
|
3390
|
+
builder: (yargs35) => withConfiguration(
|
|
3391
3391
|
withApiOptions(
|
|
3392
3392
|
withDebugOptions(
|
|
3393
3393
|
withProjectOptions(
|
|
3394
3394
|
withDiffOptions(
|
|
3395
|
-
|
|
3395
|
+
yargs35.positional("directory", {
|
|
3396
3396
|
describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
|
|
3397
3397
|
type: "string"
|
|
3398
3398
|
}).option("what-if", {
|
|
@@ -3466,11 +3466,11 @@ var ContentTypeRemoveModule = {
|
|
|
3466
3466
|
command: "remove <id>",
|
|
3467
3467
|
aliases: ["delete", "rm"],
|
|
3468
3468
|
describe: "Delete a content type",
|
|
3469
|
-
builder: (
|
|
3469
|
+
builder: (yargs35) => withConfiguration(
|
|
3470
3470
|
withDebugOptions(
|
|
3471
3471
|
withApiOptions(
|
|
3472
3472
|
withProjectOptions(
|
|
3473
|
-
|
|
3473
|
+
yargs35.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
|
|
3474
3474
|
)
|
|
3475
3475
|
)
|
|
3476
3476
|
)
|
|
@@ -3491,11 +3491,11 @@ var ContentTypeUpdateModule = {
|
|
|
3491
3491
|
command: "update <filename>",
|
|
3492
3492
|
aliases: ["put"],
|
|
3493
3493
|
describe: "Insert or update a content type",
|
|
3494
|
-
builder: (
|
|
3494
|
+
builder: (yargs35) => withConfiguration(
|
|
3495
3495
|
withDebugOptions(
|
|
3496
3496
|
withApiOptions(
|
|
3497
3497
|
withProjectOptions(
|
|
3498
|
-
|
|
3498
|
+
yargs35.positional("filename", { demandOption: true, describe: "Content type file to put" })
|
|
3499
3499
|
)
|
|
3500
3500
|
)
|
|
3501
3501
|
)
|
|
@@ -3517,7 +3517,7 @@ var ContentTypeModule = {
|
|
|
3517
3517
|
command: "contenttype <command>",
|
|
3518
3518
|
aliases: ["ct"],
|
|
3519
3519
|
describe: "Commands for Content Types",
|
|
3520
|
-
builder: (
|
|
3520
|
+
builder: (yargs35) => yargs35.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
|
|
3521
3521
|
handler: () => {
|
|
3522
3522
|
yargs7.help();
|
|
3523
3523
|
}
|
|
@@ -3536,11 +3536,11 @@ function getDataSourceClient(options) {
|
|
|
3536
3536
|
var DataSourceGetModule = {
|
|
3537
3537
|
command: "get <id>",
|
|
3538
3538
|
describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
|
|
3539
|
-
builder: (
|
|
3539
|
+
builder: (yargs35) => withConfiguration(
|
|
3540
3540
|
withApiOptions(
|
|
3541
3541
|
withDebugOptions(
|
|
3542
3542
|
withProjectOptions(
|
|
3543
|
-
|
|
3543
|
+
yargs35.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
|
|
3544
3544
|
)
|
|
3545
3545
|
)
|
|
3546
3546
|
)
|
|
@@ -3558,11 +3558,11 @@ var DataSourceRemoveModule = {
|
|
|
3558
3558
|
command: "remove <id>",
|
|
3559
3559
|
aliases: ["delete", "rm"],
|
|
3560
3560
|
describe: "Delete a data source",
|
|
3561
|
-
builder: (
|
|
3561
|
+
builder: (yargs35) => withConfiguration(
|
|
3562
3562
|
withDebugOptions(
|
|
3563
3563
|
withApiOptions(
|
|
3564
3564
|
withProjectOptions(
|
|
3565
|
-
|
|
3565
|
+
yargs35.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
|
|
3566
3566
|
)
|
|
3567
3567
|
)
|
|
3568
3568
|
)
|
|
@@ -3583,11 +3583,11 @@ var DataSourceUpdateModule = {
|
|
|
3583
3583
|
command: "update <dataSource>",
|
|
3584
3584
|
aliases: ["put"],
|
|
3585
3585
|
describe: "Insert or update a data source",
|
|
3586
|
-
builder: (
|
|
3586
|
+
builder: (yargs35) => withConfiguration(
|
|
3587
3587
|
withApiOptions(
|
|
3588
3588
|
withDebugOptions(
|
|
3589
3589
|
withProjectOptions(
|
|
3590
|
-
|
|
3590
|
+
yargs35.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
|
|
3591
3591
|
describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
|
|
3592
3592
|
type: "string",
|
|
3593
3593
|
demandOption: true
|
|
@@ -3622,7 +3622,7 @@ var DataSourceModule = {
|
|
|
3622
3622
|
command: "datasource <command>",
|
|
3623
3623
|
aliases: ["ds"],
|
|
3624
3624
|
describe: "Commands for Data Source definitions",
|
|
3625
|
-
builder: (
|
|
3625
|
+
builder: (yargs35) => yargs35.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
|
|
3626
3626
|
handler: () => {
|
|
3627
3627
|
yargs8.help();
|
|
3628
3628
|
}
|
|
@@ -3644,12 +3644,12 @@ var DataTypeGetModule = {
|
|
|
3644
3644
|
command: "get <id>",
|
|
3645
3645
|
describe: "Get a data type",
|
|
3646
3646
|
aliases: ["ls"],
|
|
3647
|
-
builder: (
|
|
3647
|
+
builder: (yargs35) => withConfiguration(
|
|
3648
3648
|
withFormatOptions(
|
|
3649
3649
|
withDebugOptions(
|
|
3650
3650
|
withApiOptions(
|
|
3651
3651
|
withProjectOptions(
|
|
3652
|
-
|
|
3652
|
+
yargs35.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
|
|
3653
3653
|
)
|
|
3654
3654
|
)
|
|
3655
3655
|
)
|
|
@@ -3672,7 +3672,7 @@ var DataTypeListModule = {
|
|
|
3672
3672
|
command: "list",
|
|
3673
3673
|
describe: "List data types",
|
|
3674
3674
|
aliases: ["ls"],
|
|
3675
|
-
builder: (
|
|
3675
|
+
builder: (yargs35) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs35))))),
|
|
3676
3676
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
3677
3677
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
3678
3678
|
const client = getDataTypeClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -3715,12 +3715,12 @@ function createDataTypeEngineDataSource({
|
|
|
3715
3715
|
var DataTypePullModule = {
|
|
3716
3716
|
command: "pull <directory>",
|
|
3717
3717
|
describe: "Pulls all data types to local files in a directory",
|
|
3718
|
-
builder: (
|
|
3718
|
+
builder: (yargs35) => withConfiguration(
|
|
3719
3719
|
withApiOptions(
|
|
3720
3720
|
withDebugOptions(
|
|
3721
3721
|
withProjectOptions(
|
|
3722
3722
|
withDiffOptions(
|
|
3723
|
-
|
|
3723
|
+
yargs35.positional("directory", {
|
|
3724
3724
|
describe: "Directory to save the data types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
3725
3725
|
type: "string"
|
|
3726
3726
|
}).option("format", {
|
|
@@ -3800,12 +3800,12 @@ var DataTypePullModule = {
|
|
|
3800
3800
|
var DataTypePushModule = {
|
|
3801
3801
|
command: "push <directory>",
|
|
3802
3802
|
describe: "Pushes all data types from files in a directory to Uniform",
|
|
3803
|
-
builder: (
|
|
3803
|
+
builder: (yargs35) => withConfiguration(
|
|
3804
3804
|
withApiOptions(
|
|
3805
3805
|
withDebugOptions(
|
|
3806
3806
|
withProjectOptions(
|
|
3807
3807
|
withDiffOptions(
|
|
3808
|
-
|
|
3808
|
+
yargs35.positional("directory", {
|
|
3809
3809
|
describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
|
|
3810
3810
|
type: "string"
|
|
3811
3811
|
}).option("mode", {
|
|
@@ -3874,11 +3874,11 @@ var DataTypeRemoveModule = {
|
|
|
3874
3874
|
command: "remove <id>",
|
|
3875
3875
|
aliases: ["delete", "rm"],
|
|
3876
3876
|
describe: "Delete a data type",
|
|
3877
|
-
builder: (
|
|
3877
|
+
builder: (yargs35) => withConfiguration(
|
|
3878
3878
|
withDebugOptions(
|
|
3879
3879
|
withApiOptions(
|
|
3880
3880
|
withProjectOptions(
|
|
3881
|
-
|
|
3881
|
+
yargs35.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
|
|
3882
3882
|
)
|
|
3883
3883
|
)
|
|
3884
3884
|
)
|
|
@@ -3899,11 +3899,11 @@ var DataTypeUpdateModule = {
|
|
|
3899
3899
|
command: "update <filename>",
|
|
3900
3900
|
aliases: ["put"],
|
|
3901
3901
|
describe: "Insert or update a data type",
|
|
3902
|
-
builder: (
|
|
3902
|
+
builder: (yargs35) => withConfiguration(
|
|
3903
3903
|
withDebugOptions(
|
|
3904
3904
|
withApiOptions(
|
|
3905
3905
|
withProjectOptions(
|
|
3906
|
-
|
|
3906
|
+
yargs35.positional("filename", { demandOption: true, describe: "Data type file to put" })
|
|
3907
3907
|
)
|
|
3908
3908
|
)
|
|
3909
3909
|
)
|
|
@@ -3925,7 +3925,7 @@ var DataTypeModule = {
|
|
|
3925
3925
|
command: "datatype <command>",
|
|
3926
3926
|
aliases: ["dt"],
|
|
3927
3927
|
describe: "Commands for Data Type definitions",
|
|
3928
|
-
builder: (
|
|
3928
|
+
builder: (yargs35) => yargs35.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
|
|
3929
3929
|
handler: () => {
|
|
3930
3930
|
yargs9.help();
|
|
3931
3931
|
}
|
|
@@ -3938,13 +3938,13 @@ import yargs10 from "yargs";
|
|
|
3938
3938
|
var EntryGetModule = {
|
|
3939
3939
|
command: "get <id>",
|
|
3940
3940
|
describe: "Get an entry",
|
|
3941
|
-
builder: (
|
|
3941
|
+
builder: (yargs35) => withConfiguration(
|
|
3942
3942
|
withDebugOptions(
|
|
3943
3943
|
withFormatOptions(
|
|
3944
3944
|
withApiOptions(
|
|
3945
3945
|
withProjectOptions(
|
|
3946
3946
|
withStateOptions(
|
|
3947
|
-
|
|
3947
|
+
yargs35.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
|
|
3948
3948
|
resolveData: {
|
|
3949
3949
|
type: "boolean",
|
|
3950
3950
|
default: false,
|
|
@@ -4009,13 +4009,13 @@ var LEGACY_DEFAULT_LIMIT = 1e3;
|
|
|
4009
4009
|
var EntryListModule = {
|
|
4010
4010
|
command: "list",
|
|
4011
4011
|
describe: "List entries",
|
|
4012
|
-
builder: (
|
|
4012
|
+
builder: (yargs35) => withConfiguration(
|
|
4013
4013
|
withDebugOptions(
|
|
4014
4014
|
withFormatOptions(
|
|
4015
4015
|
withApiOptions(
|
|
4016
4016
|
withProjectOptions(
|
|
4017
4017
|
withStateOptions(
|
|
4018
|
-
|
|
4018
|
+
yargs35.options({
|
|
4019
4019
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
4020
4020
|
limit: {
|
|
4021
4021
|
describe: "Number of rows to fetch",
|
|
@@ -4143,12 +4143,12 @@ function createEntryEngineDataSource({
|
|
|
4143
4143
|
var EntryPublishModule = {
|
|
4144
4144
|
command: "publish [ids]",
|
|
4145
4145
|
describe: "Publishes entry(ies)",
|
|
4146
|
-
builder: (
|
|
4146
|
+
builder: (yargs35) => withConfiguration(
|
|
4147
4147
|
withDiffOptions(
|
|
4148
4148
|
withApiOptions(
|
|
4149
4149
|
withProjectOptions(
|
|
4150
4150
|
withDiffOptions(
|
|
4151
|
-
|
|
4151
|
+
yargs35.positional("ids", {
|
|
4152
4152
|
describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4153
4153
|
type: "string"
|
|
4154
4154
|
}).option("all", {
|
|
@@ -4197,13 +4197,13 @@ var EntryPublishModule = {
|
|
|
4197
4197
|
var EntryPullModule = {
|
|
4198
4198
|
command: "pull <directory>",
|
|
4199
4199
|
describe: "Pulls all entries to local files in a directory",
|
|
4200
|
-
builder: (
|
|
4200
|
+
builder: (yargs35) => withConfiguration(
|
|
4201
4201
|
withDebugOptions(
|
|
4202
4202
|
withApiOptions(
|
|
4203
4203
|
withProjectOptions(
|
|
4204
4204
|
withStateOptions(
|
|
4205
4205
|
withDiffOptions(
|
|
4206
|
-
|
|
4206
|
+
yargs35.positional("directory", {
|
|
4207
4207
|
describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
4208
4208
|
type: "string"
|
|
4209
4209
|
}).option("format", {
|
|
@@ -4298,13 +4298,13 @@ var EntryPullModule = {
|
|
|
4298
4298
|
var EntryPushModule = {
|
|
4299
4299
|
command: "push <directory>",
|
|
4300
4300
|
describe: "Pushes all entries from files in a directory to Uniform",
|
|
4301
|
-
builder: (
|
|
4301
|
+
builder: (yargs35) => withConfiguration(
|
|
4302
4302
|
withDebugOptions(
|
|
4303
4303
|
withApiOptions(
|
|
4304
4304
|
withProjectOptions(
|
|
4305
4305
|
withStateOptions(
|
|
4306
4306
|
withDiffOptions(
|
|
4307
|
-
|
|
4307
|
+
yargs35.positional("directory", {
|
|
4308
4308
|
describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
|
|
4309
4309
|
type: "string"
|
|
4310
4310
|
}).option("mode", {
|
|
@@ -4387,11 +4387,11 @@ var EntryRemoveModule = {
|
|
|
4387
4387
|
command: "remove <id>",
|
|
4388
4388
|
aliases: ["delete", "rm"],
|
|
4389
4389
|
describe: "Delete an entry",
|
|
4390
|
-
builder: (
|
|
4390
|
+
builder: (yargs35) => withConfiguration(
|
|
4391
4391
|
withDebugOptions(
|
|
4392
4392
|
withApiOptions(
|
|
4393
4393
|
withProjectOptions(
|
|
4394
|
-
|
|
4394
|
+
yargs35.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
|
|
4395
4395
|
)
|
|
4396
4396
|
)
|
|
4397
4397
|
)
|
|
@@ -4413,11 +4413,11 @@ import { diffJson as diffJson3 } from "diff";
|
|
|
4413
4413
|
var EntryUnpublishModule = {
|
|
4414
4414
|
command: "unpublish [ids]",
|
|
4415
4415
|
describe: "Unpublish an entry(ies)",
|
|
4416
|
-
builder: (
|
|
4416
|
+
builder: (yargs35) => withConfiguration(
|
|
4417
4417
|
withDebugOptions(
|
|
4418
4418
|
withApiOptions(
|
|
4419
4419
|
withProjectOptions(
|
|
4420
|
-
|
|
4420
|
+
yargs35.positional("ids", {
|
|
4421
4421
|
describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4422
4422
|
type: "string"
|
|
4423
4423
|
}).option("all", {
|
|
@@ -4487,12 +4487,12 @@ var EntryUpdateModule = {
|
|
|
4487
4487
|
command: "update <filename>",
|
|
4488
4488
|
aliases: ["put"],
|
|
4489
4489
|
describe: "Insert or update an entry",
|
|
4490
|
-
builder: (
|
|
4490
|
+
builder: (yargs35) => withConfiguration(
|
|
4491
4491
|
withDebugOptions(
|
|
4492
4492
|
withApiOptions(
|
|
4493
4493
|
withProjectOptions(
|
|
4494
4494
|
withStateOptions(
|
|
4495
|
-
|
|
4495
|
+
yargs35.positional("filename", { demandOption: true, describe: "Entry file to put" })
|
|
4496
4496
|
)
|
|
4497
4497
|
)
|
|
4498
4498
|
)
|
|
@@ -4524,7 +4524,7 @@ var EntryUpdateModule = {
|
|
|
4524
4524
|
var EntryModule = {
|
|
4525
4525
|
command: "entry <command>",
|
|
4526
4526
|
describe: "Commands for Entries",
|
|
4527
|
-
builder: (
|
|
4527
|
+
builder: (yargs35) => yargs35.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
|
|
4528
4528
|
handler: () => {
|
|
4529
4529
|
yargs10.help();
|
|
4530
4530
|
}
|
|
@@ -4537,13 +4537,13 @@ import yargs11 from "yargs";
|
|
|
4537
4537
|
var EntryPatternGetModule = {
|
|
4538
4538
|
command: "get <id>",
|
|
4539
4539
|
describe: "Get an entry pattern",
|
|
4540
|
-
builder: (
|
|
4540
|
+
builder: (yargs35) => withConfiguration(
|
|
4541
4541
|
withDebugOptions(
|
|
4542
4542
|
withFormatOptions(
|
|
4543
4543
|
withApiOptions(
|
|
4544
4544
|
withProjectOptions(
|
|
4545
4545
|
withStateOptions(
|
|
4546
|
-
|
|
4546
|
+
yargs35.positional("id", {
|
|
4547
4547
|
demandOption: true,
|
|
4548
4548
|
describe: "Entry pattern public ID to fetch"
|
|
4549
4549
|
}),
|
|
@@ -4578,9 +4578,9 @@ var EntryPatternGetModule = {
|
|
|
4578
4578
|
var EntryPatternListModule = {
|
|
4579
4579
|
command: "list",
|
|
4580
4580
|
describe: "List entry patterns",
|
|
4581
|
-
builder: (
|
|
4581
|
+
builder: (yargs35) => withConfiguration(
|
|
4582
4582
|
withDebugOptions(
|
|
4583
|
-
withFormatOptions(withApiOptions(withProjectOptions(withStateOptions(
|
|
4583
|
+
withFormatOptions(withApiOptions(withProjectOptions(withStateOptions(yargs35, "published"))))
|
|
4584
4584
|
)
|
|
4585
4585
|
),
|
|
4586
4586
|
handler: async ({
|
|
@@ -4613,12 +4613,12 @@ var EntryPatternListModule = {
|
|
|
4613
4613
|
var EntryPatternPublishModule = {
|
|
4614
4614
|
command: "publish [ids]",
|
|
4615
4615
|
describe: "Publishes entry pattern(s)",
|
|
4616
|
-
builder: (
|
|
4616
|
+
builder: (yargs35) => withConfiguration(
|
|
4617
4617
|
withDebugOptions(
|
|
4618
4618
|
withApiOptions(
|
|
4619
4619
|
withProjectOptions(
|
|
4620
4620
|
withDiffOptions(
|
|
4621
|
-
|
|
4621
|
+
yargs35.positional("ids", {
|
|
4622
4622
|
describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4623
4623
|
type: "string"
|
|
4624
4624
|
}).option("all", {
|
|
@@ -4667,13 +4667,13 @@ var EntryPatternPublishModule = {
|
|
|
4667
4667
|
var EntryPatternPullModule = {
|
|
4668
4668
|
command: "pull <directory>",
|
|
4669
4669
|
describe: "Pulls all entry patterns to local files in a directory",
|
|
4670
|
-
builder: (
|
|
4670
|
+
builder: (yargs35) => withConfiguration(
|
|
4671
4671
|
withApiOptions(
|
|
4672
4672
|
withDebugOptions(
|
|
4673
4673
|
withProjectOptions(
|
|
4674
4674
|
withStateOptions(
|
|
4675
4675
|
withDiffOptions(
|
|
4676
|
-
|
|
4676
|
+
yargs35.positional("directory", {
|
|
4677
4677
|
describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
4678
4678
|
type: "string"
|
|
4679
4679
|
}).option("format", {
|
|
@@ -4768,13 +4768,13 @@ var EntryPatternPullModule = {
|
|
|
4768
4768
|
var EntryPatternPushModule = {
|
|
4769
4769
|
command: "push <directory>",
|
|
4770
4770
|
describe: "Pushes all entry patterns from files in a directory to Uniform",
|
|
4771
|
-
builder: (
|
|
4771
|
+
builder: (yargs35) => withConfiguration(
|
|
4772
4772
|
withDebugOptions(
|
|
4773
4773
|
withApiOptions(
|
|
4774
4774
|
withProjectOptions(
|
|
4775
4775
|
withStateOptions(
|
|
4776
4776
|
withDiffOptions(
|
|
4777
|
-
|
|
4777
|
+
yargs35.positional("directory", {
|
|
4778
4778
|
describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
|
|
4779
4779
|
type: "string"
|
|
4780
4780
|
}).option("what-if", {
|
|
@@ -4862,11 +4862,11 @@ var EntryPatternRemoveModule = {
|
|
|
4862
4862
|
command: "remove <id>",
|
|
4863
4863
|
aliases: ["delete", "rm"],
|
|
4864
4864
|
describe: "Delete an entry pattern",
|
|
4865
|
-
builder: (
|
|
4865
|
+
builder: (yargs35) => withConfiguration(
|
|
4866
4866
|
withDebugOptions(
|
|
4867
4867
|
withApiOptions(
|
|
4868
4868
|
withProjectOptions(
|
|
4869
|
-
|
|
4869
|
+
yargs35.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
|
|
4870
4870
|
)
|
|
4871
4871
|
)
|
|
4872
4872
|
)
|
|
@@ -4888,11 +4888,11 @@ import { diffJson as diffJson4 } from "diff";
|
|
|
4888
4888
|
var EntryPatternUnpublishModule = {
|
|
4889
4889
|
command: "unpublish [ids]",
|
|
4890
4890
|
describe: "Unpublish an entry patterns",
|
|
4891
|
-
builder: (
|
|
4891
|
+
builder: (yargs35) => withConfiguration(
|
|
4892
4892
|
withDebugOptions(
|
|
4893
4893
|
withApiOptions(
|
|
4894
4894
|
withProjectOptions(
|
|
4895
|
-
|
|
4895
|
+
yargs35.positional("ids", {
|
|
4896
4896
|
describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4897
4897
|
type: "string"
|
|
4898
4898
|
}).option("all", {
|
|
@@ -4962,12 +4962,12 @@ var EntryPatternUpdateModule = {
|
|
|
4962
4962
|
command: "update <filename>",
|
|
4963
4963
|
aliases: ["put"],
|
|
4964
4964
|
describe: "Insert or update an entry pattern",
|
|
4965
|
-
builder: (
|
|
4965
|
+
builder: (yargs35) => withConfiguration(
|
|
4966
4966
|
withDebugOptions(
|
|
4967
4967
|
withApiOptions(
|
|
4968
4968
|
withProjectOptions(
|
|
4969
4969
|
withStateOptions(
|
|
4970
|
-
|
|
4970
|
+
yargs35.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
|
|
4971
4971
|
)
|
|
4972
4972
|
)
|
|
4973
4973
|
)
|
|
@@ -5003,7 +5003,7 @@ var EntryPatternUpdateModule = {
|
|
|
5003
5003
|
var EntryPatternModule = {
|
|
5004
5004
|
command: "entry-pattern <command>",
|
|
5005
5005
|
describe: "Commands for Entry patterns",
|
|
5006
|
-
builder: (
|
|
5006
|
+
builder: (yargs35) => yargs35.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
|
|
5007
5007
|
handler: () => {
|
|
5008
5008
|
yargs11.help();
|
|
5009
5009
|
}
|
|
@@ -5052,12 +5052,12 @@ function getLocaleClient(options) {
|
|
|
5052
5052
|
var LocalePullModule = {
|
|
5053
5053
|
command: "pull <directory>",
|
|
5054
5054
|
describe: "Pulls all locales to local files in a directory",
|
|
5055
|
-
builder: (
|
|
5055
|
+
builder: (yargs35) => withConfiguration(
|
|
5056
5056
|
withDebugOptions(
|
|
5057
5057
|
withApiOptions(
|
|
5058
5058
|
withProjectOptions(
|
|
5059
5059
|
withDiffOptions(
|
|
5060
|
-
|
|
5060
|
+
yargs35.positional("directory", {
|
|
5061
5061
|
describe: "Directory to save the locales to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
5062
5062
|
type: "string"
|
|
5063
5063
|
}).option("format", {
|
|
@@ -5137,12 +5137,12 @@ var LocalePullModule = {
|
|
|
5137
5137
|
var LocalePushModule = {
|
|
5138
5138
|
command: "push <directory>",
|
|
5139
5139
|
describe: "Pushes all locales from files in a directory to Uniform",
|
|
5140
|
-
builder: (
|
|
5140
|
+
builder: (yargs35) => withConfiguration(
|
|
5141
5141
|
withDebugOptions(
|
|
5142
5142
|
withApiOptions(
|
|
5143
5143
|
withProjectOptions(
|
|
5144
5144
|
withDiffOptions(
|
|
5145
|
-
|
|
5145
|
+
yargs35.positional("directory", {
|
|
5146
5146
|
describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
|
|
5147
5147
|
type: "string"
|
|
5148
5148
|
}).option("mode", {
|
|
@@ -5210,241 +5210,14 @@ var LocalePushModule = {
|
|
|
5210
5210
|
var LocaleModule = {
|
|
5211
5211
|
command: "locale <command>",
|
|
5212
5212
|
describe: "Commands for locale definitions",
|
|
5213
|
-
builder: (
|
|
5213
|
+
builder: (yargs35) => yargs35.command(LocalePullModule).command(LocalePushModule),
|
|
5214
5214
|
handler: () => {
|
|
5215
5215
|
yargs12.help();
|
|
5216
5216
|
}
|
|
5217
5217
|
};
|
|
5218
5218
|
|
|
5219
|
-
// src/commands/canvas/commands/pattern.ts
|
|
5220
|
-
import yargs13 from "yargs";
|
|
5221
|
-
|
|
5222
|
-
// src/commands/canvas/commands/pattern/get.ts
|
|
5223
|
-
var PatternGetModule = {
|
|
5224
|
-
...CompositionGetModule,
|
|
5225
|
-
describe: "Fetch a pattern"
|
|
5226
|
-
};
|
|
5227
|
-
|
|
5228
|
-
// src/commands/canvas/commands/pattern/list.ts
|
|
5229
|
-
var PatternListModule = {
|
|
5230
|
-
...CompositionListModule,
|
|
5231
|
-
describe: "List patterns",
|
|
5232
|
-
builder: (yargs36) => withFormatOptions(
|
|
5233
|
-
withConfiguration(
|
|
5234
|
-
withApiOptions(
|
|
5235
|
-
withDebugOptions(
|
|
5236
|
-
withProjectOptions(
|
|
5237
|
-
withStateOptions(
|
|
5238
|
-
yargs36.options({
|
|
5239
|
-
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
5240
|
-
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
5241
|
-
resolvePatterns: {
|
|
5242
|
-
type: "boolean",
|
|
5243
|
-
default: false,
|
|
5244
|
-
describe: "Resolve pattern references in the composition"
|
|
5245
|
-
},
|
|
5246
|
-
resolveOverrides: {
|
|
5247
|
-
type: "boolean",
|
|
5248
|
-
default: false,
|
|
5249
|
-
describe: "Resolves pattern overrides in the pattern and removes override definition data"
|
|
5250
|
-
},
|
|
5251
|
-
onlyPatterns: {
|
|
5252
|
-
describe: "Only pulling patterns and not compositions",
|
|
5253
|
-
// This default differentiate this list command from composition list command
|
|
5254
|
-
default: true,
|
|
5255
|
-
type: "boolean",
|
|
5256
|
-
hidden: true
|
|
5257
|
-
},
|
|
5258
|
-
componentIDs: {
|
|
5259
|
-
alias: ["componentIDs"],
|
|
5260
|
-
type: "boolean",
|
|
5261
|
-
default: false,
|
|
5262
|
-
describe: "Include individual component UIDs"
|
|
5263
|
-
}
|
|
5264
|
-
})
|
|
5265
|
-
)
|
|
5266
|
-
)
|
|
5267
|
-
)
|
|
5268
|
-
)
|
|
5269
|
-
)
|
|
5270
|
-
)
|
|
5271
|
-
};
|
|
5272
|
-
|
|
5273
|
-
// src/commands/canvas/commands/pattern/publish.ts
|
|
5274
|
-
var PatternPublishModule = {
|
|
5275
|
-
...CompositionPublishModule,
|
|
5276
|
-
describe: "Publishes pattern(s)",
|
|
5277
|
-
builder: (yargs36) => withConfiguration(
|
|
5278
|
-
withDebugOptions(
|
|
5279
|
-
withApiOptions(
|
|
5280
|
-
withProjectOptions(
|
|
5281
|
-
withDiffOptions(
|
|
5282
|
-
yargs36.positional("ids", {
|
|
5283
|
-
describe: "Publishes pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
5284
|
-
type: "string"
|
|
5285
|
-
}).option("all", {
|
|
5286
|
-
alias: ["a"],
|
|
5287
|
-
describe: "Publishes all patterns. Use compositionId to publish one instead.",
|
|
5288
|
-
default: false,
|
|
5289
|
-
type: "boolean"
|
|
5290
|
-
}).option("publishingState", {
|
|
5291
|
-
describe: 'Publishing state to update to. Can be "published" or "preview".',
|
|
5292
|
-
default: "published",
|
|
5293
|
-
type: "string",
|
|
5294
|
-
hidden: true
|
|
5295
|
-
}).option("onlyCompositions", {
|
|
5296
|
-
describe: "Only publishing compositions and not patterns",
|
|
5297
|
-
default: false,
|
|
5298
|
-
type: "boolean"
|
|
5299
|
-
}).option("onlyPatterns", {
|
|
5300
|
-
describe: "Only pulling patterns and not compositions",
|
|
5301
|
-
default: true,
|
|
5302
|
-
type: "boolean",
|
|
5303
|
-
hidden: true
|
|
5304
|
-
})
|
|
5305
|
-
)
|
|
5306
|
-
)
|
|
5307
|
-
)
|
|
5308
|
-
)
|
|
5309
|
-
)
|
|
5310
|
-
};
|
|
5311
|
-
|
|
5312
|
-
// src/commands/canvas/commands/pattern/pull.ts
|
|
5313
|
-
var PatternPullModule = {
|
|
5314
|
-
...CompositionPullModule,
|
|
5315
|
-
describe: "Pulls all patterns to local files in a directory",
|
|
5316
|
-
builder: (yargs36) => withConfiguration(
|
|
5317
|
-
withDebugOptions(
|
|
5318
|
-
withApiOptions(
|
|
5319
|
-
withProjectOptions(
|
|
5320
|
-
withStateOptions(
|
|
5321
|
-
withDiffOptions(
|
|
5322
|
-
yargs36.positional("directory", {
|
|
5323
|
-
describe: "Directory to save the definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
5324
|
-
type: "string"
|
|
5325
|
-
}).option("format", {
|
|
5326
|
-
alias: ["f"],
|
|
5327
|
-
describe: "Output format",
|
|
5328
|
-
default: "yaml",
|
|
5329
|
-
choices: ["yaml", "json"],
|
|
5330
|
-
type: "string"
|
|
5331
|
-
}).option("onlyPatterns", {
|
|
5332
|
-
describe: "Only pulling patterns and not compositions",
|
|
5333
|
-
// This default differentiate this list command from composition list command
|
|
5334
|
-
default: true,
|
|
5335
|
-
type: "boolean",
|
|
5336
|
-
hidden: true
|
|
5337
|
-
}).option("mode", {
|
|
5338
|
-
alias: ["m"],
|
|
5339
|
-
describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
|
|
5340
|
-
choices: ["create", "createOrUpdate", "mirror"],
|
|
5341
|
-
default: "mirror",
|
|
5342
|
-
type: "string"
|
|
5343
|
-
})
|
|
5344
|
-
)
|
|
5345
|
-
)
|
|
5346
|
-
)
|
|
5347
|
-
)
|
|
5348
|
-
)
|
|
5349
|
-
)
|
|
5350
|
-
};
|
|
5351
|
-
|
|
5352
|
-
// src/commands/canvas/commands/pattern/push.ts
|
|
5353
|
-
var PatternPushModule = {
|
|
5354
|
-
...CompositionPushModule,
|
|
5355
|
-
describe: "Pushes all patterns from files in a directory to Uniform Canvas",
|
|
5356
|
-
builder: (yargs36) => withConfiguration(
|
|
5357
|
-
withDebugOptions(
|
|
5358
|
-
withApiOptions(
|
|
5359
|
-
withProjectOptions(
|
|
5360
|
-
withStateOptions(
|
|
5361
|
-
withDiffOptions(
|
|
5362
|
-
yargs36.positional("directory", {
|
|
5363
|
-
describe: "Directory to read the patterns from. If a filename is used, a package will be read instead.",
|
|
5364
|
-
type: "string"
|
|
5365
|
-
}).option("mode", {
|
|
5366
|
-
alias: ["m"],
|
|
5367
|
-
describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
|
|
5368
|
-
choices: ["create", "createOrUpdate", "mirror"],
|
|
5369
|
-
default: "mirror",
|
|
5370
|
-
type: "string"
|
|
5371
|
-
}).option("onlyPatterns", {
|
|
5372
|
-
describe: "Only pulling patterns and not compositions",
|
|
5373
|
-
// This default differentiate this list command from composition list command
|
|
5374
|
-
default: true,
|
|
5375
|
-
type: "boolean",
|
|
5376
|
-
hidden: true
|
|
5377
|
-
}).option("patternType", {
|
|
5378
|
-
default: "all",
|
|
5379
|
-
choices: ["all", "component", "composition"],
|
|
5380
|
-
hidden: true
|
|
5381
|
-
})
|
|
5382
|
-
)
|
|
5383
|
-
)
|
|
5384
|
-
)
|
|
5385
|
-
)
|
|
5386
|
-
)
|
|
5387
|
-
)
|
|
5388
|
-
};
|
|
5389
|
-
|
|
5390
|
-
// src/commands/canvas/commands/pattern/remove.ts
|
|
5391
|
-
var PatternRemoveModule = {
|
|
5392
|
-
...CompositionRemoveModule,
|
|
5393
|
-
describe: "Delete a pattern"
|
|
5394
|
-
};
|
|
5395
|
-
|
|
5396
|
-
// src/commands/canvas/commands/pattern/unpublish.ts
|
|
5397
|
-
var PatternUnpublishModule = {
|
|
5398
|
-
command: "unpublish [ids]",
|
|
5399
|
-
describe: "Unpublish a pattern(s)",
|
|
5400
|
-
builder: (yargs36) => withConfiguration(
|
|
5401
|
-
withDebugOptions(
|
|
5402
|
-
withApiOptions(
|
|
5403
|
-
withProjectOptions(
|
|
5404
|
-
yargs36.positional("ids", {
|
|
5405
|
-
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
5406
|
-
type: "string"
|
|
5407
|
-
}).option("all", {
|
|
5408
|
-
alias: ["a"],
|
|
5409
|
-
describe: "Un-publishes all compositions. Use compositionId to publish one instead.",
|
|
5410
|
-
default: false,
|
|
5411
|
-
type: "boolean"
|
|
5412
|
-
}).option("onlyCompositions", {
|
|
5413
|
-
describe: "Only un-publishing compositions and not patterns",
|
|
5414
|
-
default: false,
|
|
5415
|
-
type: "boolean"
|
|
5416
|
-
}).option("onlyPatterns", {
|
|
5417
|
-
describe: "Only un-publishing patterns and not compositions",
|
|
5418
|
-
default: true,
|
|
5419
|
-
type: "boolean",
|
|
5420
|
-
hidden: true
|
|
5421
|
-
})
|
|
5422
|
-
)
|
|
5423
|
-
)
|
|
5424
|
-
)
|
|
5425
|
-
),
|
|
5426
|
-
handler: CompositionUnpublishModule.handler
|
|
5427
|
-
};
|
|
5428
|
-
|
|
5429
|
-
// src/commands/canvas/commands/pattern/update.ts
|
|
5430
|
-
var PatternUpdateModule = {
|
|
5431
|
-
...CompositionUpdateModule,
|
|
5432
|
-
describe: "Insert or update a pattern"
|
|
5433
|
-
};
|
|
5434
|
-
|
|
5435
|
-
// src/commands/canvas/commands/pattern.ts
|
|
5436
|
-
var PatternModule = {
|
|
5437
|
-
command: "pattern <command>",
|
|
5438
|
-
describe: "Commands for Canvas patterns",
|
|
5439
|
-
deprecated: 'will be removed in a future major release. Use "component-pattern" and "composition-pattern" instead.',
|
|
5440
|
-
builder: (yargs36) => yargs36.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
|
|
5441
|
-
handler: () => {
|
|
5442
|
-
yargs13.help();
|
|
5443
|
-
}
|
|
5444
|
-
};
|
|
5445
|
-
|
|
5446
5219
|
// src/commands/canvas/commands/previewUrl.ts
|
|
5447
|
-
import
|
|
5220
|
+
import yargs13 from "yargs";
|
|
5448
5221
|
|
|
5449
5222
|
// src/commands/canvas/commands/previewUrl/_util.ts
|
|
5450
5223
|
import { PreviewClient } from "@uniformdev/canvas";
|
|
@@ -5458,12 +5231,12 @@ function getPreviewClient(options) {
|
|
|
5458
5231
|
var PreviewUrlGetModule = {
|
|
5459
5232
|
command: "get <id>",
|
|
5460
5233
|
describe: "Fetch a preview URL",
|
|
5461
|
-
builder: (
|
|
5234
|
+
builder: (yargs35) => withConfiguration(
|
|
5462
5235
|
withFormatOptions(
|
|
5463
5236
|
withDebugOptions(
|
|
5464
5237
|
withApiOptions(
|
|
5465
5238
|
withProjectOptions(
|
|
5466
|
-
|
|
5239
|
+
yargs35.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
|
|
5467
5240
|
)
|
|
5468
5241
|
)
|
|
5469
5242
|
)
|
|
@@ -5487,8 +5260,8 @@ var PreviewUrlListModule = {
|
|
|
5487
5260
|
command: "list",
|
|
5488
5261
|
describe: "List preview URLs",
|
|
5489
5262
|
aliases: ["ls"],
|
|
5490
|
-
builder: (
|
|
5491
|
-
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(
|
|
5263
|
+
builder: (yargs35) => withConfiguration(
|
|
5264
|
+
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs35.options({})))))
|
|
5492
5265
|
),
|
|
5493
5266
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5494
5267
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -5530,12 +5303,12 @@ function createPreviewUrlEngineDataSource({
|
|
|
5530
5303
|
var PreviewUrlPullModule = {
|
|
5531
5304
|
command: "pull <directory>",
|
|
5532
5305
|
describe: "Pulls all preview urls to local files in a directory",
|
|
5533
|
-
builder: (
|
|
5306
|
+
builder: (yargs35) => withConfiguration(
|
|
5534
5307
|
withApiOptions(
|
|
5535
5308
|
withProjectOptions(
|
|
5536
5309
|
withDebugOptions(
|
|
5537
5310
|
withDiffOptions(
|
|
5538
|
-
|
|
5311
|
+
yargs35.positional("directory", {
|
|
5539
5312
|
describe: "Directory to save to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
5540
5313
|
type: "string"
|
|
5541
5314
|
}).option("format", {
|
|
@@ -5610,12 +5383,12 @@ var PreviewUrlPullModule = {
|
|
|
5610
5383
|
var PreviewUrlPushModule = {
|
|
5611
5384
|
command: "push <directory>",
|
|
5612
5385
|
describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
|
|
5613
|
-
builder: (
|
|
5386
|
+
builder: (yargs35) => withConfiguration(
|
|
5614
5387
|
withApiOptions(
|
|
5615
5388
|
withProjectOptions(
|
|
5616
5389
|
withDiffOptions(
|
|
5617
5390
|
withDebugOptions(
|
|
5618
|
-
|
|
5391
|
+
yargs35.positional("directory", {
|
|
5619
5392
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
5620
5393
|
type: "string"
|
|
5621
5394
|
}).option("mode", {
|
|
@@ -5679,11 +5452,11 @@ var PreviewUrlRemoveModule = {
|
|
|
5679
5452
|
command: "remove <id>",
|
|
5680
5453
|
aliases: ["delete", "rm"],
|
|
5681
5454
|
describe: "Delete a preview URL",
|
|
5682
|
-
builder: (
|
|
5455
|
+
builder: (yargs35) => withConfiguration(
|
|
5683
5456
|
withApiOptions(
|
|
5684
5457
|
withDebugOptions(
|
|
5685
5458
|
withProjectOptions(
|
|
5686
|
-
|
|
5459
|
+
yargs35.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
|
|
5687
5460
|
)
|
|
5688
5461
|
)
|
|
5689
5462
|
)
|
|
@@ -5704,11 +5477,11 @@ var PreviewUrlUpdateModule = {
|
|
|
5704
5477
|
command: "update <filename>",
|
|
5705
5478
|
aliases: ["put"],
|
|
5706
5479
|
describe: "Insert or update a preview URL",
|
|
5707
|
-
builder: (
|
|
5480
|
+
builder: (yargs35) => withConfiguration(
|
|
5708
5481
|
withDebugOptions(
|
|
5709
5482
|
withApiOptions(
|
|
5710
5483
|
withProjectOptions(
|
|
5711
|
-
|
|
5484
|
+
yargs35.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
5712
5485
|
)
|
|
5713
5486
|
)
|
|
5714
5487
|
)
|
|
@@ -5730,25 +5503,25 @@ var PreviewUrlModule = {
|
|
|
5730
5503
|
command: "preview-url <command>",
|
|
5731
5504
|
aliases: ["pu"],
|
|
5732
5505
|
describe: "Commands for Canvas preview urls",
|
|
5733
|
-
builder: (
|
|
5506
|
+
builder: (yargs35) => yargs35.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
|
|
5734
5507
|
handler: () => {
|
|
5735
|
-
|
|
5508
|
+
yargs13.help();
|
|
5736
5509
|
}
|
|
5737
5510
|
};
|
|
5738
5511
|
|
|
5739
5512
|
// src/commands/canvas/commands/previewViewport.ts
|
|
5740
|
-
import
|
|
5513
|
+
import yargs14 from "yargs";
|
|
5741
5514
|
|
|
5742
5515
|
// src/commands/canvas/commands/previewViewport/get.ts
|
|
5743
5516
|
var PreviewViewportGetModule = {
|
|
5744
5517
|
command: "get <id>",
|
|
5745
5518
|
describe: "Fetch a preview viewport",
|
|
5746
|
-
builder: (
|
|
5519
|
+
builder: (yargs35) => withConfiguration(
|
|
5747
5520
|
withFormatOptions(
|
|
5748
5521
|
withDebugOptions(
|
|
5749
5522
|
withApiOptions(
|
|
5750
5523
|
withProjectOptions(
|
|
5751
|
-
|
|
5524
|
+
yargs35.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
|
|
5752
5525
|
)
|
|
5753
5526
|
)
|
|
5754
5527
|
)
|
|
@@ -5772,8 +5545,8 @@ var PreviewViewportListModule = {
|
|
|
5772
5545
|
command: "list",
|
|
5773
5546
|
describe: "List preview viewports",
|
|
5774
5547
|
aliases: ["ls"],
|
|
5775
|
-
builder: (
|
|
5776
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
5548
|
+
builder: (yargs35) => withConfiguration(
|
|
5549
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs35.options({})))))
|
|
5777
5550
|
),
|
|
5778
5551
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5779
5552
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -5819,12 +5592,12 @@ function createPreviewViewportEngineDataSource({
|
|
|
5819
5592
|
var PreviewViewportPullModule = {
|
|
5820
5593
|
command: "pull <directory>",
|
|
5821
5594
|
describe: "Pulls all preview viewports to local files in a directory",
|
|
5822
|
-
builder: (
|
|
5595
|
+
builder: (yargs35) => withConfiguration(
|
|
5823
5596
|
withApiOptions(
|
|
5824
5597
|
withProjectOptions(
|
|
5825
5598
|
withDebugOptions(
|
|
5826
5599
|
withDiffOptions(
|
|
5827
|
-
|
|
5600
|
+
yargs35.positional("directory", {
|
|
5828
5601
|
describe: "Directory to save to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
5829
5602
|
type: "string"
|
|
5830
5603
|
}).option("format", {
|
|
@@ -5899,12 +5672,12 @@ var PreviewViewportPullModule = {
|
|
|
5899
5672
|
var PreviewViewportPushModule = {
|
|
5900
5673
|
command: "push <directory>",
|
|
5901
5674
|
describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
|
|
5902
|
-
builder: (
|
|
5675
|
+
builder: (yargs35) => withConfiguration(
|
|
5903
5676
|
withApiOptions(
|
|
5904
5677
|
withProjectOptions(
|
|
5905
5678
|
withDiffOptions(
|
|
5906
5679
|
withDebugOptions(
|
|
5907
|
-
|
|
5680
|
+
yargs35.positional("directory", {
|
|
5908
5681
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
5909
5682
|
type: "string"
|
|
5910
5683
|
}).option("mode", {
|
|
@@ -5968,11 +5741,11 @@ var PreviewViewportRemoveModule = {
|
|
|
5968
5741
|
command: "remove <id>",
|
|
5969
5742
|
aliases: ["delete", "rm"],
|
|
5970
5743
|
describe: "Delete a preview viewport",
|
|
5971
|
-
builder: (
|
|
5744
|
+
builder: (yargs35) => withConfiguration(
|
|
5972
5745
|
withApiOptions(
|
|
5973
5746
|
withDebugOptions(
|
|
5974
5747
|
withProjectOptions(
|
|
5975
|
-
|
|
5748
|
+
yargs35.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
|
|
5976
5749
|
)
|
|
5977
5750
|
)
|
|
5978
5751
|
)
|
|
@@ -5993,11 +5766,11 @@ var PreviewViewportUpdateModule = {
|
|
|
5993
5766
|
command: "update <filename>",
|
|
5994
5767
|
aliases: ["put"],
|
|
5995
5768
|
describe: "Insert or update a preview viewport",
|
|
5996
|
-
builder: (
|
|
5769
|
+
builder: (yargs35) => withConfiguration(
|
|
5997
5770
|
withDebugOptions(
|
|
5998
5771
|
withApiOptions(
|
|
5999
5772
|
withProjectOptions(
|
|
6000
|
-
|
|
5773
|
+
yargs35.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
|
|
6001
5774
|
)
|
|
6002
5775
|
)
|
|
6003
5776
|
)
|
|
@@ -6019,14 +5792,14 @@ var PreviewViewportModule = {
|
|
|
6019
5792
|
command: "preview-viewport <command>",
|
|
6020
5793
|
aliases: ["pv"],
|
|
6021
5794
|
describe: "Commands for Canvas preview viewports",
|
|
6022
|
-
builder: (
|
|
5795
|
+
builder: (yargs35) => yargs35.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
|
|
6023
5796
|
handler: () => {
|
|
6024
|
-
|
|
5797
|
+
yargs14.help();
|
|
6025
5798
|
}
|
|
6026
5799
|
};
|
|
6027
5800
|
|
|
6028
5801
|
// src/commands/canvas/commands/prompts.ts
|
|
6029
|
-
import
|
|
5802
|
+
import yargs15 from "yargs";
|
|
6030
5803
|
|
|
6031
5804
|
// src/commands/canvas/commands/prompts/_util.ts
|
|
6032
5805
|
import { PromptClient } from "@uniformdev/canvas";
|
|
@@ -6038,12 +5811,12 @@ var getPromptClient = (options) => new PromptClient({ ...options, bypassCache: t
|
|
|
6038
5811
|
var PromptGetModule = {
|
|
6039
5812
|
command: "get <id>",
|
|
6040
5813
|
describe: "Get a prompt",
|
|
6041
|
-
builder: (
|
|
5814
|
+
builder: (yargs35) => withConfiguration(
|
|
6042
5815
|
withDebugOptions(
|
|
6043
5816
|
withFormatOptions(
|
|
6044
5817
|
withApiOptions(
|
|
6045
5818
|
withProjectOptions(
|
|
6046
|
-
|
|
5819
|
+
yargs35.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
|
|
6047
5820
|
)
|
|
6048
5821
|
)
|
|
6049
5822
|
)
|
|
@@ -6064,7 +5837,7 @@ var PromptGetModule = {
|
|
|
6064
5837
|
var PromptListModule = {
|
|
6065
5838
|
command: "list",
|
|
6066
5839
|
describe: "List prompts",
|
|
6067
|
-
builder: (
|
|
5840
|
+
builder: (yargs35) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs35))))),
|
|
6068
5841
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
6069
5842
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
6070
5843
|
const client = getPromptClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -6105,13 +5878,13 @@ function createPromptEngineDataSource({
|
|
|
6105
5878
|
var PromptPullModule = {
|
|
6106
5879
|
command: "pull <directory>",
|
|
6107
5880
|
describe: "Pulls all prompts to local files in a directory",
|
|
6108
|
-
builder: (
|
|
5881
|
+
builder: (yargs35) => withConfiguration(
|
|
6109
5882
|
withDebugOptions(
|
|
6110
5883
|
withApiOptions(
|
|
6111
5884
|
withProjectOptions(
|
|
6112
5885
|
withStateOptions(
|
|
6113
5886
|
withDiffOptions(
|
|
6114
|
-
|
|
5887
|
+
yargs35.positional("directory", {
|
|
6115
5888
|
describe: "Directory to save the prompts to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
6116
5889
|
type: "string"
|
|
6117
5890
|
}).option("format", {
|
|
@@ -6192,12 +5965,12 @@ var PromptPullModule = {
|
|
|
6192
5965
|
var PromptPushModule = {
|
|
6193
5966
|
command: "push <directory>",
|
|
6194
5967
|
describe: "Pushes all prompts from files in a directory to Uniform",
|
|
6195
|
-
builder: (
|
|
5968
|
+
builder: (yargs35) => withConfiguration(
|
|
6196
5969
|
withApiOptions(
|
|
6197
5970
|
withProjectOptions(
|
|
6198
5971
|
withStateOptions(
|
|
6199
5972
|
withDiffOptions(
|
|
6200
|
-
|
|
5973
|
+
yargs35.positional("directory", {
|
|
6201
5974
|
describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
|
|
6202
5975
|
type: "string"
|
|
6203
5976
|
}).option("mode", {
|
|
@@ -6266,10 +6039,10 @@ var PromptRemoveModule = {
|
|
|
6266
6039
|
command: "remove <id>",
|
|
6267
6040
|
aliases: ["delete", "rm"],
|
|
6268
6041
|
describe: "Delete a prompt",
|
|
6269
|
-
builder: (
|
|
6042
|
+
builder: (yargs35) => withConfiguration(
|
|
6270
6043
|
withDebugOptions(
|
|
6271
6044
|
withApiOptions(
|
|
6272
|
-
withProjectOptions(
|
|
6045
|
+
withProjectOptions(yargs35.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
|
|
6273
6046
|
)
|
|
6274
6047
|
)
|
|
6275
6048
|
),
|
|
@@ -6289,11 +6062,11 @@ var PromptUpdateModule = {
|
|
|
6289
6062
|
command: "update <filename>",
|
|
6290
6063
|
aliases: ["put"],
|
|
6291
6064
|
describe: "Insert or update a prompt",
|
|
6292
|
-
builder: (
|
|
6065
|
+
builder: (yargs35) => withConfiguration(
|
|
6293
6066
|
withDebugOptions(
|
|
6294
6067
|
withApiOptions(
|
|
6295
6068
|
withProjectOptions(
|
|
6296
|
-
|
|
6069
|
+
yargs35.positional("filename", { demandOption: true, describe: "Prompt file to put" })
|
|
6297
6070
|
)
|
|
6298
6071
|
)
|
|
6299
6072
|
)
|
|
@@ -6315,14 +6088,14 @@ var PromptModule = {
|
|
|
6315
6088
|
command: "prompt <command>",
|
|
6316
6089
|
aliases: ["dt"],
|
|
6317
6090
|
describe: "Commands for AI Prompt definitions",
|
|
6318
|
-
builder: (
|
|
6091
|
+
builder: (yargs35) => yargs35.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
|
|
6319
6092
|
handler: () => {
|
|
6320
|
-
|
|
6093
|
+
yargs15.help();
|
|
6321
6094
|
}
|
|
6322
6095
|
};
|
|
6323
6096
|
|
|
6324
6097
|
// src/commands/canvas/commands/workflow.ts
|
|
6325
|
-
import
|
|
6098
|
+
import yargs16 from "yargs";
|
|
6326
6099
|
|
|
6327
6100
|
// src/commands/canvas/commands/workflow/_util.ts
|
|
6328
6101
|
import { WorkflowClient } from "@uniformdev/canvas";
|
|
@@ -6365,12 +6138,12 @@ function createWorkflowEngineDataSource({
|
|
|
6365
6138
|
var WorkflowPullModule = {
|
|
6366
6139
|
command: "pull <directory>",
|
|
6367
6140
|
describe: "Pulls all workflows to local files in a directory",
|
|
6368
|
-
builder: (
|
|
6141
|
+
builder: (yargs35) => withConfiguration(
|
|
6369
6142
|
withApiOptions(
|
|
6370
6143
|
withDebugOptions(
|
|
6371
6144
|
withProjectOptions(
|
|
6372
6145
|
withDiffOptions(
|
|
6373
|
-
|
|
6146
|
+
yargs35.positional("directory", {
|
|
6374
6147
|
describe: "Directory to save to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
6375
6148
|
type: "string"
|
|
6376
6149
|
}).option("format", {
|
|
@@ -6445,12 +6218,12 @@ var WorkflowPullModule = {
|
|
|
6445
6218
|
var WorkflowPushModule = {
|
|
6446
6219
|
command: "push <directory>",
|
|
6447
6220
|
describe: "Pushes all workflows from files in a directory to Uniform Canvas",
|
|
6448
|
-
builder: (
|
|
6221
|
+
builder: (yargs35) => withConfiguration(
|
|
6449
6222
|
withDebugOptions(
|
|
6450
6223
|
withApiOptions(
|
|
6451
6224
|
withProjectOptions(
|
|
6452
6225
|
withDiffOptions(
|
|
6453
|
-
|
|
6226
|
+
yargs35.positional("directory", {
|
|
6454
6227
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
6455
6228
|
type: "string"
|
|
6456
6229
|
}).option("mode", {
|
|
@@ -6514,9 +6287,9 @@ var WorkflowModule = {
|
|
|
6514
6287
|
command: "workflow <command>",
|
|
6515
6288
|
aliases: ["wf"],
|
|
6516
6289
|
describe: "Commands for Canvas workflows",
|
|
6517
|
-
builder: (
|
|
6290
|
+
builder: (yargs35) => yargs35.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
|
|
6518
6291
|
handler: () => {
|
|
6519
|
-
|
|
6292
|
+
yargs16.help();
|
|
6520
6293
|
}
|
|
6521
6294
|
};
|
|
6522
6295
|
|
|
@@ -6525,17 +6298,17 @@ var CanvasCommand = {
|
|
|
6525
6298
|
command: "canvas <command>",
|
|
6526
6299
|
aliases: ["cv", "pm", "presentation"],
|
|
6527
6300
|
describe: "Uniform Canvas commands",
|
|
6528
|
-
builder: (
|
|
6301
|
+
builder: (yargs35) => yargs35.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(ComponentPatternModule).command(CompositionPatternModule).command(ContentTypeModule).command(EntryModule).command(EntryPatternModule).command(PromptModule).command(AssetModule).command(LocaleModule).command(WorkflowModule).command(PreviewUrlModule).command(PreviewViewportModule).demandCommand(),
|
|
6529
6302
|
handler: () => {
|
|
6530
|
-
|
|
6303
|
+
yargs17.showHelp();
|
|
6531
6304
|
}
|
|
6532
6305
|
};
|
|
6533
6306
|
|
|
6534
6307
|
// src/commands/context/index.ts
|
|
6535
|
-
import
|
|
6308
|
+
import yargs24 from "yargs";
|
|
6536
6309
|
|
|
6537
6310
|
// src/commands/context/commands/aggregate.ts
|
|
6538
|
-
import
|
|
6311
|
+
import yargs18 from "yargs";
|
|
6539
6312
|
|
|
6540
6313
|
// src/commands/context/commands/aggregate/_util.ts
|
|
6541
6314
|
import { AggregateClient } from "@uniformdev/context/api";
|
|
@@ -6547,11 +6320,11 @@ var getAggregateClient = (options) => new AggregateClient({ ...options, bypassCa
|
|
|
6547
6320
|
var AggregateGetModule = {
|
|
6548
6321
|
command: "get <id>",
|
|
6549
6322
|
describe: "Fetch an aggregate",
|
|
6550
|
-
builder: (
|
|
6323
|
+
builder: (yargs35) => withConfiguration(
|
|
6551
6324
|
withFormatOptions(
|
|
6552
6325
|
withApiOptions(
|
|
6553
6326
|
withProjectOptions(
|
|
6554
|
-
|
|
6327
|
+
yargs35.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
|
|
6555
6328
|
)
|
|
6556
6329
|
)
|
|
6557
6330
|
)
|
|
@@ -6574,7 +6347,7 @@ var AggregateListModule = {
|
|
|
6574
6347
|
command: "list",
|
|
6575
6348
|
describe: "List aggregates",
|
|
6576
6349
|
aliases: ["ls"],
|
|
6577
|
-
builder: (
|
|
6350
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
6578
6351
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
6579
6352
|
const fetch2 = nodeFetchProxy(proxy);
|
|
6580
6353
|
const client = getAggregateClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -6637,12 +6410,12 @@ function writeContextPackage(filename, packageContents) {
|
|
|
6637
6410
|
var AggregatePullModule = {
|
|
6638
6411
|
command: "pull <directory>",
|
|
6639
6412
|
describe: "Pulls all aggregates to local files in a directory",
|
|
6640
|
-
builder: (
|
|
6413
|
+
builder: (yargs35) => withConfiguration(
|
|
6641
6414
|
withApiOptions(
|
|
6642
6415
|
withDebugOptions(
|
|
6643
6416
|
withProjectOptions(
|
|
6644
6417
|
withDiffOptions(
|
|
6645
|
-
|
|
6418
|
+
yargs35.positional("directory", {
|
|
6646
6419
|
describe: "Directory to save the aggregates to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
6647
6420
|
type: "string"
|
|
6648
6421
|
}).option("format", {
|
|
@@ -6717,12 +6490,12 @@ var AggregatePullModule = {
|
|
|
6717
6490
|
var AggregatePushModule = {
|
|
6718
6491
|
command: "push <directory>",
|
|
6719
6492
|
describe: "Pushes all aggregates from files in a directory or package to Uniform",
|
|
6720
|
-
builder: (
|
|
6493
|
+
builder: (yargs35) => withConfiguration(
|
|
6721
6494
|
withApiOptions(
|
|
6722
6495
|
withProjectOptions(
|
|
6723
6496
|
withDiffOptions(
|
|
6724
6497
|
withDebugOptions(
|
|
6725
|
-
|
|
6498
|
+
yargs35.positional("directory", {
|
|
6726
6499
|
describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
|
|
6727
6500
|
type: "string"
|
|
6728
6501
|
}).option("mode", {
|
|
@@ -6787,10 +6560,10 @@ var AggregateRemoveModule = {
|
|
|
6787
6560
|
command: "remove <id>",
|
|
6788
6561
|
aliases: ["delete", "rm"],
|
|
6789
6562
|
describe: "Delete an aggregate",
|
|
6790
|
-
builder: (
|
|
6563
|
+
builder: (yargs35) => withConfiguration(
|
|
6791
6564
|
withApiOptions(
|
|
6792
6565
|
withProjectOptions(
|
|
6793
|
-
|
|
6566
|
+
yargs35.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
|
|
6794
6567
|
)
|
|
6795
6568
|
)
|
|
6796
6569
|
),
|
|
@@ -6806,10 +6579,10 @@ var AggregateUpdateModule = {
|
|
|
6806
6579
|
command: "update <filename>",
|
|
6807
6580
|
aliases: ["put"],
|
|
6808
6581
|
describe: "Insert or update an aggregate",
|
|
6809
|
-
builder: (
|
|
6582
|
+
builder: (yargs35) => withConfiguration(
|
|
6810
6583
|
withApiOptions(
|
|
6811
6584
|
withProjectOptions(
|
|
6812
|
-
|
|
6585
|
+
yargs35.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
|
|
6813
6586
|
)
|
|
6814
6587
|
)
|
|
6815
6588
|
),
|
|
@@ -6826,14 +6599,14 @@ var AggregateModule = {
|
|
|
6826
6599
|
command: "aggregate <command>",
|
|
6827
6600
|
aliases: ["agg", "intent", "audience"],
|
|
6828
6601
|
describe: "Commands for Context aggregates (intents, audiences)",
|
|
6829
|
-
builder: (
|
|
6602
|
+
builder: (yargs35) => yargs35.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
|
|
6830
6603
|
handler: () => {
|
|
6831
|
-
|
|
6604
|
+
yargs18.help();
|
|
6832
6605
|
}
|
|
6833
6606
|
};
|
|
6834
6607
|
|
|
6835
6608
|
// src/commands/context/commands/enrichment.ts
|
|
6836
|
-
import
|
|
6609
|
+
import yargs19 from "yargs";
|
|
6837
6610
|
|
|
6838
6611
|
// src/commands/context/commands/enrichment/_util.ts
|
|
6839
6612
|
import { UncachedEnrichmentClient } from "@uniformdev/context/api";
|
|
@@ -6847,11 +6620,11 @@ function getEnrichmentClient(options) {
|
|
|
6847
6620
|
var EnrichmentGetModule = {
|
|
6848
6621
|
command: "get <id>",
|
|
6849
6622
|
describe: "Fetch an enrichment category and its values",
|
|
6850
|
-
builder: (
|
|
6623
|
+
builder: (yargs35) => withFormatOptions(
|
|
6851
6624
|
withConfiguration(
|
|
6852
6625
|
withApiOptions(
|
|
6853
6626
|
withProjectOptions(
|
|
6854
|
-
|
|
6627
|
+
yargs35.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
|
|
6855
6628
|
)
|
|
6856
6629
|
)
|
|
6857
6630
|
)
|
|
@@ -6874,7 +6647,7 @@ var EnrichmentListModule = {
|
|
|
6874
6647
|
command: "list",
|
|
6875
6648
|
describe: "List enrichments",
|
|
6876
6649
|
aliases: ["ls"],
|
|
6877
|
-
builder: (
|
|
6650
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
6878
6651
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
6879
6652
|
const fetch2 = nodeFetchProxy(proxy);
|
|
6880
6653
|
const client = getEnrichmentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -6969,12 +6742,12 @@ var createEnrichmentValueEngineDataSource = ({
|
|
|
6969
6742
|
var EnrichmentPullModule = {
|
|
6970
6743
|
command: "pull <directory>",
|
|
6971
6744
|
describe: "Pulls all enrichments to local files in a directory",
|
|
6972
|
-
builder: (
|
|
6745
|
+
builder: (yargs35) => withConfiguration(
|
|
6973
6746
|
withDebugOptions(
|
|
6974
6747
|
withApiOptions(
|
|
6975
6748
|
withProjectOptions(
|
|
6976
6749
|
withDiffOptions(
|
|
6977
|
-
|
|
6750
|
+
yargs35.positional("directory", {
|
|
6978
6751
|
describe: "Directory to save the enrichments to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
6979
6752
|
type: "string"
|
|
6980
6753
|
}).option("format", {
|
|
@@ -7049,11 +6822,11 @@ var EnrichmentPullModule = {
|
|
|
7049
6822
|
var EnrichmentPushModule = {
|
|
7050
6823
|
command: "push <directory>",
|
|
7051
6824
|
describe: "Pushes all enrichments from files in a directory or package to Uniform",
|
|
7052
|
-
builder: (
|
|
6825
|
+
builder: (yargs35) => withConfiguration(
|
|
7053
6826
|
withApiOptions(
|
|
7054
6827
|
withProjectOptions(
|
|
7055
6828
|
withDiffOptions(
|
|
7056
|
-
|
|
6829
|
+
yargs35.positional("directory", {
|
|
7057
6830
|
describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
|
|
7058
6831
|
type: "string"
|
|
7059
6832
|
}).option("mode", {
|
|
@@ -7116,10 +6889,10 @@ var EnrichmentRemoveModule = {
|
|
|
7116
6889
|
command: "remove <id>",
|
|
7117
6890
|
aliases: ["delete", "rm"],
|
|
7118
6891
|
describe: "Delete an enrichment category and its values",
|
|
7119
|
-
builder: (
|
|
6892
|
+
builder: (yargs35) => withConfiguration(
|
|
7120
6893
|
withApiOptions(
|
|
7121
6894
|
withProjectOptions(
|
|
7122
|
-
|
|
6895
|
+
yargs35.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
|
|
7123
6896
|
)
|
|
7124
6897
|
)
|
|
7125
6898
|
),
|
|
@@ -7135,14 +6908,14 @@ var EnrichmentModule = {
|
|
|
7135
6908
|
command: "enrichment <command>",
|
|
7136
6909
|
aliases: ["enr"],
|
|
7137
6910
|
describe: "Commands for Context enrichments",
|
|
7138
|
-
builder: (
|
|
6911
|
+
builder: (yargs35) => yargs35.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
|
|
7139
6912
|
handler: () => {
|
|
7140
|
-
|
|
6913
|
+
yargs19.help();
|
|
7141
6914
|
}
|
|
7142
6915
|
};
|
|
7143
6916
|
|
|
7144
6917
|
// src/commands/context/commands/manifest.ts
|
|
7145
|
-
import
|
|
6918
|
+
import yargs20 from "yargs";
|
|
7146
6919
|
|
|
7147
6920
|
// src/commands/context/commands/manifest/get.ts
|
|
7148
6921
|
import { ApiClientError as ApiClientError2, UncachedManifestClient } from "@uniformdev/context/api";
|
|
@@ -7153,10 +6926,10 @@ var ManifestGetModule = {
|
|
|
7153
6926
|
command: "get [output]",
|
|
7154
6927
|
aliases: ["dl", "download"],
|
|
7155
6928
|
describe: "Download the Uniform Context manifest for a project",
|
|
7156
|
-
builder: (
|
|
6929
|
+
builder: (yargs35) => withConfiguration(
|
|
7157
6930
|
withApiOptions(
|
|
7158
6931
|
withProjectOptions(
|
|
7159
|
-
|
|
6932
|
+
yargs35.option("preview", {
|
|
7160
6933
|
describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
|
|
7161
6934
|
default: false,
|
|
7162
6935
|
type: "boolean",
|
|
@@ -7218,7 +6991,7 @@ import { exit as exit2 } from "process";
|
|
|
7218
6991
|
var ManifestPublishModule = {
|
|
7219
6992
|
command: "publish",
|
|
7220
6993
|
describe: "Publish the Uniform Context manifest for a project",
|
|
7221
|
-
builder: (
|
|
6994
|
+
builder: (yargs35) => withConfiguration(withApiOptions(withProjectOptions(yargs35))),
|
|
7222
6995
|
handler: async ({ apiKey, apiHost, proxy, project }) => {
|
|
7223
6996
|
const fetch2 = nodeFetchProxy(proxy);
|
|
7224
6997
|
try {
|
|
@@ -7251,25 +7024,25 @@ var ManifestModule = {
|
|
|
7251
7024
|
command: "manifest <command>",
|
|
7252
7025
|
describe: "Commands for context manifests",
|
|
7253
7026
|
aliases: ["man"],
|
|
7254
|
-
builder: (
|
|
7027
|
+
builder: (yargs35) => yargs35.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
|
|
7255
7028
|
handler: () => {
|
|
7256
|
-
|
|
7029
|
+
yargs20.help();
|
|
7257
7030
|
}
|
|
7258
7031
|
};
|
|
7259
7032
|
|
|
7260
7033
|
// src/commands/context/commands/quirk.ts
|
|
7261
|
-
import
|
|
7034
|
+
import yargs21 from "yargs";
|
|
7262
7035
|
|
|
7263
7036
|
// src/commands/context/commands/quirk/get.ts
|
|
7264
7037
|
import { UncachedQuirkClient } from "@uniformdev/context/api";
|
|
7265
7038
|
var QuirkGetModule = {
|
|
7266
7039
|
command: "get <id>",
|
|
7267
7040
|
describe: "Fetch a quirk",
|
|
7268
|
-
builder: (
|
|
7041
|
+
builder: (yargs35) => withConfiguration(
|
|
7269
7042
|
withFormatOptions(
|
|
7270
7043
|
withApiOptions(
|
|
7271
7044
|
withProjectOptions(
|
|
7272
|
-
|
|
7045
|
+
yargs35.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
|
|
7273
7046
|
)
|
|
7274
7047
|
)
|
|
7275
7048
|
)
|
|
@@ -7293,11 +7066,11 @@ var QuirkListModule = {
|
|
|
7293
7066
|
command: "list",
|
|
7294
7067
|
describe: "List quirks",
|
|
7295
7068
|
aliases: ["ls"],
|
|
7296
|
-
builder: (
|
|
7069
|
+
builder: (yargs35) => withConfiguration(
|
|
7297
7070
|
withFormatOptions(
|
|
7298
7071
|
withApiOptions(
|
|
7299
7072
|
withProjectOptions(
|
|
7300
|
-
|
|
7073
|
+
yargs35.option("withIntegrations", {
|
|
7301
7074
|
alias: ["i"],
|
|
7302
7075
|
describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
|
|
7303
7076
|
type: "boolean"
|
|
@@ -7355,12 +7128,12 @@ function createQuirkEngineDataSource({
|
|
|
7355
7128
|
var QuirkPullModule = {
|
|
7356
7129
|
command: "pull <directory>",
|
|
7357
7130
|
describe: "Pulls all quirks to local files in a directory",
|
|
7358
|
-
builder: (
|
|
7131
|
+
builder: (yargs35) => withConfiguration(
|
|
7359
7132
|
withDebugOptions(
|
|
7360
7133
|
withApiOptions(
|
|
7361
7134
|
withProjectOptions(
|
|
7362
7135
|
withDiffOptions(
|
|
7363
|
-
|
|
7136
|
+
yargs35.positional("directory", {
|
|
7364
7137
|
describe: "Directory to save the quirks to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
7365
7138
|
type: "string"
|
|
7366
7139
|
}).option("format", {
|
|
@@ -7436,12 +7209,12 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
|
|
|
7436
7209
|
var QuirkPushModule = {
|
|
7437
7210
|
command: "push <directory>",
|
|
7438
7211
|
describe: "Pushes all quirks from files in a directory or package to Uniform",
|
|
7439
|
-
builder: (
|
|
7212
|
+
builder: (yargs35) => withConfiguration(
|
|
7440
7213
|
withDebugOptions(
|
|
7441
7214
|
withApiOptions(
|
|
7442
7215
|
withProjectOptions(
|
|
7443
7216
|
withDiffOptions(
|
|
7444
|
-
|
|
7217
|
+
yargs35.positional("directory", {
|
|
7445
7218
|
describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
|
|
7446
7219
|
type: "string"
|
|
7447
7220
|
}).option("mode", {
|
|
@@ -7506,10 +7279,10 @@ var QuirkRemoveModule = {
|
|
|
7506
7279
|
command: "remove <id>",
|
|
7507
7280
|
aliases: ["delete", "rm"],
|
|
7508
7281
|
describe: "Delete a quirk",
|
|
7509
|
-
builder: (
|
|
7282
|
+
builder: (yargs35) => withConfiguration(
|
|
7510
7283
|
withApiOptions(
|
|
7511
7284
|
withProjectOptions(
|
|
7512
|
-
|
|
7285
|
+
yargs35.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
|
|
7513
7286
|
)
|
|
7514
7287
|
)
|
|
7515
7288
|
),
|
|
@@ -7526,10 +7299,10 @@ var QuirkUpdateModule = {
|
|
|
7526
7299
|
command: "update <filename>",
|
|
7527
7300
|
aliases: ["put"],
|
|
7528
7301
|
describe: "Insert or update a quirk",
|
|
7529
|
-
builder: (
|
|
7302
|
+
builder: (yargs35) => withConfiguration(
|
|
7530
7303
|
withApiOptions(
|
|
7531
7304
|
withProjectOptions(
|
|
7532
|
-
|
|
7305
|
+
yargs35.positional("filename", { demandOption: true, describe: "Quirk file to put" })
|
|
7533
7306
|
)
|
|
7534
7307
|
)
|
|
7535
7308
|
),
|
|
@@ -7546,25 +7319,25 @@ var QuirkModule = {
|
|
|
7546
7319
|
command: "quirk <command>",
|
|
7547
7320
|
aliases: ["qk"],
|
|
7548
7321
|
describe: "Commands for Context quirks",
|
|
7549
|
-
builder: (
|
|
7322
|
+
builder: (yargs35) => yargs35.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
|
|
7550
7323
|
handler: () => {
|
|
7551
|
-
|
|
7324
|
+
yargs21.help();
|
|
7552
7325
|
}
|
|
7553
7326
|
};
|
|
7554
7327
|
|
|
7555
7328
|
// src/commands/context/commands/signal.ts
|
|
7556
|
-
import
|
|
7329
|
+
import yargs22 from "yargs";
|
|
7557
7330
|
|
|
7558
7331
|
// src/commands/context/commands/signal/get.ts
|
|
7559
7332
|
import { UncachedSignalClient } from "@uniformdev/context/api";
|
|
7560
7333
|
var SignalGetModule = {
|
|
7561
7334
|
command: "get <id>",
|
|
7562
7335
|
describe: "Fetch a signal",
|
|
7563
|
-
builder: (
|
|
7336
|
+
builder: (yargs35) => withConfiguration(
|
|
7564
7337
|
withFormatOptions(
|
|
7565
7338
|
withApiOptions(
|
|
7566
7339
|
withProjectOptions(
|
|
7567
|
-
|
|
7340
|
+
yargs35.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
|
|
7568
7341
|
)
|
|
7569
7342
|
)
|
|
7570
7343
|
)
|
|
@@ -7588,7 +7361,7 @@ var SignalListModule = {
|
|
|
7588
7361
|
command: "list",
|
|
7589
7362
|
describe: "List signals",
|
|
7590
7363
|
aliases: ["ls"],
|
|
7591
|
-
builder: (
|
|
7364
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
7592
7365
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
7593
7366
|
const fetch2 = nodeFetchProxy(proxy);
|
|
7594
7367
|
const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -7638,12 +7411,12 @@ function createSignalEngineDataSource({
|
|
|
7638
7411
|
var SignalPullModule = {
|
|
7639
7412
|
command: "pull <directory>",
|
|
7640
7413
|
describe: "Pulls all signals to local files in a directory",
|
|
7641
|
-
builder: (
|
|
7414
|
+
builder: (yargs35) => withConfiguration(
|
|
7642
7415
|
withDebugOptions(
|
|
7643
7416
|
withApiOptions(
|
|
7644
7417
|
withProjectOptions(
|
|
7645
7418
|
withDiffOptions(
|
|
7646
|
-
|
|
7419
|
+
yargs35.positional("directory", {
|
|
7647
7420
|
describe: "Directory to save the signals to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
7648
7421
|
type: "string"
|
|
7649
7422
|
}).option("format", {
|
|
@@ -7719,12 +7492,12 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
|
|
|
7719
7492
|
var SignalPushModule = {
|
|
7720
7493
|
command: "push <directory>",
|
|
7721
7494
|
describe: "Pushes all signals from files in a directory or package to Uniform",
|
|
7722
|
-
builder: (
|
|
7495
|
+
builder: (yargs35) => withConfiguration(
|
|
7723
7496
|
withDebugOptions(
|
|
7724
7497
|
withApiOptions(
|
|
7725
7498
|
withProjectOptions(
|
|
7726
7499
|
withDiffOptions(
|
|
7727
|
-
|
|
7500
|
+
yargs35.positional("directory", {
|
|
7728
7501
|
describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
|
|
7729
7502
|
type: "string"
|
|
7730
7503
|
}).option("mode", {
|
|
@@ -7789,10 +7562,10 @@ var SignalRemoveModule = {
|
|
|
7789
7562
|
command: "remove <id>",
|
|
7790
7563
|
aliases: ["delete", "rm"],
|
|
7791
7564
|
describe: "Delete a signal",
|
|
7792
|
-
builder: (
|
|
7565
|
+
builder: (yargs35) => withConfiguration(
|
|
7793
7566
|
withApiOptions(
|
|
7794
7567
|
withProjectOptions(
|
|
7795
|
-
|
|
7568
|
+
yargs35.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
|
|
7796
7569
|
)
|
|
7797
7570
|
)
|
|
7798
7571
|
),
|
|
@@ -7809,10 +7582,10 @@ var SignalUpdateModule = {
|
|
|
7809
7582
|
command: "update <filename>",
|
|
7810
7583
|
aliases: ["put"],
|
|
7811
7584
|
describe: "Insert or update a signal",
|
|
7812
|
-
builder: (
|
|
7585
|
+
builder: (yargs35) => withConfiguration(
|
|
7813
7586
|
withApiOptions(
|
|
7814
7587
|
withProjectOptions(
|
|
7815
|
-
|
|
7588
|
+
yargs35.positional("filename", { demandOption: true, describe: "Signal file to put" })
|
|
7816
7589
|
)
|
|
7817
7590
|
)
|
|
7818
7591
|
),
|
|
@@ -7829,25 +7602,25 @@ var SignalModule = {
|
|
|
7829
7602
|
command: "signal <command>",
|
|
7830
7603
|
aliases: ["sig"],
|
|
7831
7604
|
describe: "Commands for Context signals",
|
|
7832
|
-
builder: (
|
|
7605
|
+
builder: (yargs35) => yargs35.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
|
|
7833
7606
|
handler: () => {
|
|
7834
|
-
|
|
7607
|
+
yargs22.help();
|
|
7835
7608
|
}
|
|
7836
7609
|
};
|
|
7837
7610
|
|
|
7838
7611
|
// src/commands/context/commands/test.ts
|
|
7839
|
-
import
|
|
7612
|
+
import yargs23 from "yargs";
|
|
7840
7613
|
|
|
7841
7614
|
// src/commands/context/commands/test/get.ts
|
|
7842
7615
|
import { UncachedTestClient } from "@uniformdev/context/api";
|
|
7843
7616
|
var TestGetModule = {
|
|
7844
7617
|
command: "get <id>",
|
|
7845
7618
|
describe: "Fetch a test",
|
|
7846
|
-
builder: (
|
|
7619
|
+
builder: (yargs35) => withConfiguration(
|
|
7847
7620
|
withFormatOptions(
|
|
7848
7621
|
withApiOptions(
|
|
7849
7622
|
withProjectOptions(
|
|
7850
|
-
|
|
7623
|
+
yargs35.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
|
|
7851
7624
|
)
|
|
7852
7625
|
)
|
|
7853
7626
|
)
|
|
@@ -7871,7 +7644,7 @@ var TestListModule = {
|
|
|
7871
7644
|
command: "list",
|
|
7872
7645
|
describe: "List tests",
|
|
7873
7646
|
aliases: ["ls"],
|
|
7874
|
-
builder: (
|
|
7647
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
7875
7648
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
7876
7649
|
const fetch2 = nodeFetchProxy(proxy);
|
|
7877
7650
|
const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -7921,12 +7694,12 @@ function createTestEngineDataSource({
|
|
|
7921
7694
|
var TestPullModule = {
|
|
7922
7695
|
command: "pull <directory>",
|
|
7923
7696
|
describe: "Pulls all tests to local files in a directory",
|
|
7924
|
-
builder: (
|
|
7697
|
+
builder: (yargs35) => withConfiguration(
|
|
7925
7698
|
withDebugOptions(
|
|
7926
7699
|
withApiOptions(
|
|
7927
7700
|
withProjectOptions(
|
|
7928
7701
|
withDiffOptions(
|
|
7929
|
-
|
|
7702
|
+
yargs35.positional("directory", {
|
|
7930
7703
|
describe: "Directory to save the tests to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
7931
7704
|
type: "string"
|
|
7932
7705
|
}).option("format", {
|
|
@@ -8002,12 +7775,12 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
|
|
|
8002
7775
|
var TestPushModule = {
|
|
8003
7776
|
command: "push <directory>",
|
|
8004
7777
|
describe: "Pushes all tests from files in a directory or package to Uniform",
|
|
8005
|
-
builder: (
|
|
7778
|
+
builder: (yargs35) => withConfiguration(
|
|
8006
7779
|
withDebugOptions(
|
|
8007
7780
|
withApiOptions(
|
|
8008
7781
|
withProjectOptions(
|
|
8009
7782
|
withDiffOptions(
|
|
8010
|
-
|
|
7783
|
+
yargs35.positional("directory", {
|
|
8011
7784
|
describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
|
|
8012
7785
|
type: "string"
|
|
8013
7786
|
}).option("mode", {
|
|
@@ -8072,10 +7845,10 @@ var TestRemoveModule = {
|
|
|
8072
7845
|
command: "remove <id>",
|
|
8073
7846
|
aliases: ["delete", "rm"],
|
|
8074
7847
|
describe: "Delete a test",
|
|
8075
|
-
builder: (
|
|
7848
|
+
builder: (yargs35) => withConfiguration(
|
|
8076
7849
|
withApiOptions(
|
|
8077
7850
|
withProjectOptions(
|
|
8078
|
-
|
|
7851
|
+
yargs35.positional("id", { demandOption: true, describe: "Test public ID to delete" })
|
|
8079
7852
|
)
|
|
8080
7853
|
)
|
|
8081
7854
|
),
|
|
@@ -8092,9 +7865,9 @@ var TestUpdateModule = {
|
|
|
8092
7865
|
command: "update <filename>",
|
|
8093
7866
|
aliases: ["put"],
|
|
8094
7867
|
describe: "Insert or update a test",
|
|
8095
|
-
builder: (
|
|
7868
|
+
builder: (yargs35) => withConfiguration(
|
|
8096
7869
|
withApiOptions(
|
|
8097
|
-
withProjectOptions(
|
|
7870
|
+
withProjectOptions(yargs35.positional("filename", { demandOption: true, describe: "Test file to put" }))
|
|
8098
7871
|
)
|
|
8099
7872
|
),
|
|
8100
7873
|
handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
|
|
@@ -8109,9 +7882,9 @@ var TestUpdateModule = {
|
|
|
8109
7882
|
var TestModule = {
|
|
8110
7883
|
command: "test <command>",
|
|
8111
7884
|
describe: "Commands for Context A/B tests",
|
|
8112
|
-
builder: (
|
|
7885
|
+
builder: (yargs35) => yargs35.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
|
|
8113
7886
|
handler: () => {
|
|
8114
|
-
|
|
7887
|
+
yargs23.help();
|
|
8115
7888
|
}
|
|
8116
7889
|
};
|
|
8117
7890
|
|
|
@@ -8120,20 +7893,20 @@ var ContextCommand = {
|
|
|
8120
7893
|
command: "context <command>",
|
|
8121
7894
|
aliases: ["ctx"],
|
|
8122
7895
|
describe: "Uniform Context commands",
|
|
8123
|
-
builder: (
|
|
7896
|
+
builder: (yargs35) => yargs35.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
|
|
8124
7897
|
handler: () => {
|
|
8125
|
-
|
|
7898
|
+
yargs24.showHelp();
|
|
8126
7899
|
}
|
|
8127
7900
|
};
|
|
8128
7901
|
|
|
8129
7902
|
// src/commands/integration/index.ts
|
|
8130
|
-
import
|
|
7903
|
+
import yargs27 from "yargs";
|
|
8131
7904
|
|
|
8132
7905
|
// src/commands/integration/commands/definition.ts
|
|
8133
|
-
import
|
|
7906
|
+
import yargs26 from "yargs";
|
|
8134
7907
|
|
|
8135
7908
|
// src/commands/integration/commands/definition/edgehancer/edgehancer.ts
|
|
8136
|
-
import
|
|
7909
|
+
import yargs25 from "yargs";
|
|
8137
7910
|
|
|
8138
7911
|
// src/commands/integration/commands/definition/edgehancer/deploy.ts
|
|
8139
7912
|
import { readFileSync } from "fs";
|
|
@@ -8171,8 +7944,8 @@ var EdgehancerClient = class extends ApiClient {
|
|
|
8171
7944
|
};
|
|
8172
7945
|
|
|
8173
7946
|
// src/commands/integration/commands/definition/edgehancer/util.ts
|
|
8174
|
-
function withEdgehancerIdOptions(
|
|
8175
|
-
return
|
|
7947
|
+
function withEdgehancerIdOptions(yargs35) {
|
|
7948
|
+
return yargs35.option("connectorType", {
|
|
8176
7949
|
describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
|
|
8177
7950
|
demandOption: true,
|
|
8178
7951
|
type: "string"
|
|
@@ -8192,11 +7965,11 @@ function withEdgehancerIdOptions(yargs36) {
|
|
|
8192
7965
|
var IntegrationEdgehancerDeployModule = {
|
|
8193
7966
|
command: "deploy <filename>",
|
|
8194
7967
|
describe: "Deploys a custom edgehancer hook to run when a data resource of a specific archetype is fetched. The API key used must have team admin permissions.",
|
|
8195
|
-
builder: (
|
|
7968
|
+
builder: (yargs35) => withConfiguration(
|
|
8196
7969
|
withApiOptions(
|
|
8197
7970
|
withTeamOptions(
|
|
8198
7971
|
withEdgehancerIdOptions(
|
|
8199
|
-
|
|
7972
|
+
yargs35.positional("filename", {
|
|
8200
7973
|
demandOption: true,
|
|
8201
7974
|
describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
|
|
8202
7975
|
})
|
|
@@ -8216,7 +7989,7 @@ var IntegrationEdgehancerDeployModule = {
|
|
|
8216
7989
|
var IntegrationEdgehancerRemoveModule = {
|
|
8217
7990
|
command: "remove",
|
|
8218
7991
|
describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
|
|
8219
|
-
builder: (
|
|
7992
|
+
builder: (yargs35) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs35)))),
|
|
8220
7993
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
|
|
8221
7994
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8222
7995
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -8228,9 +8001,9 @@ var IntegrationEdgehancerRemoveModule = {
|
|
|
8228
8001
|
var IntegrationEdgehancerModule = {
|
|
8229
8002
|
command: "edgehancer <command>",
|
|
8230
8003
|
describe: "Commands for managing custom integration edgehancers at the team level.",
|
|
8231
|
-
builder: (
|
|
8004
|
+
builder: (yargs35) => yargs35.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
|
|
8232
8005
|
handler: () => {
|
|
8233
|
-
|
|
8006
|
+
yargs25.help();
|
|
8234
8007
|
}
|
|
8235
8008
|
};
|
|
8236
8009
|
|
|
@@ -8270,10 +8043,10 @@ var DefinitionClient = class extends ApiClient2 {
|
|
|
8270
8043
|
var IntegrationDefinitionRegisterModule = {
|
|
8271
8044
|
command: "register <filename>",
|
|
8272
8045
|
describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
|
|
8273
|
-
builder: (
|
|
8046
|
+
builder: (yargs35) => withConfiguration(
|
|
8274
8047
|
withApiOptions(
|
|
8275
8048
|
withTeamOptions(
|
|
8276
|
-
|
|
8049
|
+
yargs35.positional("filename", {
|
|
8277
8050
|
demandOption: true,
|
|
8278
8051
|
describe: "Integration definition manifest to register"
|
|
8279
8052
|
})
|
|
@@ -8292,10 +8065,10 @@ var IntegrationDefinitionRegisterModule = {
|
|
|
8292
8065
|
var IntegrationDefinitionRemoveModule = {
|
|
8293
8066
|
command: "remove <type>",
|
|
8294
8067
|
describe: "Deletes a custom integration definition from a team. This will uninstall it on any active projects. Existing usages of the integration may break. The API key used must have team admin permissions.",
|
|
8295
|
-
builder: (
|
|
8068
|
+
builder: (yargs35) => withConfiguration(
|
|
8296
8069
|
withApiOptions(
|
|
8297
8070
|
withTeamOptions(
|
|
8298
|
-
|
|
8071
|
+
yargs35.positional("type", {
|
|
8299
8072
|
demandOption: true,
|
|
8300
8073
|
describe: "Integration type (from its manifest) to remove."
|
|
8301
8074
|
})
|
|
@@ -8313,9 +8086,9 @@ var IntegrationDefinitionRemoveModule = {
|
|
|
8313
8086
|
var IntegrationDefinitionModule = {
|
|
8314
8087
|
command: "definition <command>",
|
|
8315
8088
|
describe: "Commands for managing custom integration definitions at the team level.",
|
|
8316
|
-
builder: (
|
|
8089
|
+
builder: (yargs35) => yargs35.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
|
|
8317
8090
|
handler: () => {
|
|
8318
|
-
|
|
8091
|
+
yargs26.help();
|
|
8319
8092
|
}
|
|
8320
8093
|
};
|
|
8321
8094
|
|
|
@@ -8355,10 +8128,10 @@ var InstallClient = class extends ApiClient3 {
|
|
|
8355
8128
|
var IntegrationInstallModule = {
|
|
8356
8129
|
command: "install <type>",
|
|
8357
8130
|
describe: "Installs an integration to a project. The integration may be built-in or custom. Custom integrations must be registered to the parent team first.",
|
|
8358
|
-
builder: (
|
|
8131
|
+
builder: (yargs35) => withConfiguration(
|
|
8359
8132
|
withApiOptions(
|
|
8360
8133
|
withProjectOptions(
|
|
8361
|
-
|
|
8134
|
+
yargs35.positional("type", {
|
|
8362
8135
|
demandOption: true,
|
|
8363
8136
|
describe: "Integration type to install (as defined in its manifest)"
|
|
8364
8137
|
}).option("configuration", {
|
|
@@ -8380,10 +8153,10 @@ var IntegrationInstallModule = {
|
|
|
8380
8153
|
var IntegrationUninstallModule = {
|
|
8381
8154
|
command: "uninstall <type>",
|
|
8382
8155
|
describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
|
|
8383
|
-
builder: (
|
|
8156
|
+
builder: (yargs35) => withConfiguration(
|
|
8384
8157
|
withApiOptions(
|
|
8385
8158
|
withProjectOptions(
|
|
8386
|
-
|
|
8159
|
+
yargs35.positional("type", {
|
|
8387
8160
|
demandOption: true,
|
|
8388
8161
|
describe: "Integration type to uninstall (as defined in its manifest)"
|
|
8389
8162
|
})
|
|
@@ -8401,9 +8174,9 @@ var IntegrationUninstallModule = {
|
|
|
8401
8174
|
var IntegrationCommand = {
|
|
8402
8175
|
command: "integration <command>",
|
|
8403
8176
|
describe: "Integration management commands",
|
|
8404
|
-
builder: (
|
|
8177
|
+
builder: (yargs35) => yargs35.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
|
|
8405
8178
|
handler: () => {
|
|
8406
|
-
|
|
8179
|
+
yargs27.showHelp();
|
|
8407
8180
|
}
|
|
8408
8181
|
};
|
|
8409
8182
|
|
|
@@ -9446,10 +9219,10 @@ var NewMeshCmd = {
|
|
|
9446
9219
|
};
|
|
9447
9220
|
|
|
9448
9221
|
// src/commands/project-map/index.ts
|
|
9449
|
-
import
|
|
9222
|
+
import yargs30 from "yargs";
|
|
9450
9223
|
|
|
9451
9224
|
// src/commands/project-map/commands/projectMapDefinition.ts
|
|
9452
|
-
import
|
|
9225
|
+
import yargs28 from "yargs";
|
|
9453
9226
|
|
|
9454
9227
|
// src/commands/project-map/commands/ProjectMapDefinition/_util.ts
|
|
9455
9228
|
import { UncachedProjectMapClient } from "@uniformdev/project-map";
|
|
@@ -9463,11 +9236,11 @@ function getProjectMapClient(options) {
|
|
|
9463
9236
|
var ProjectMapDefinitionGetModule = {
|
|
9464
9237
|
command: "get <id>",
|
|
9465
9238
|
describe: "Fetch a project map",
|
|
9466
|
-
builder: (
|
|
9239
|
+
builder: (yargs35) => withFormatOptions(
|
|
9467
9240
|
withConfiguration(
|
|
9468
9241
|
withApiOptions(
|
|
9469
9242
|
withProjectOptions(
|
|
9470
|
-
|
|
9243
|
+
yargs35.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
|
|
9471
9244
|
)
|
|
9472
9245
|
)
|
|
9473
9246
|
)
|
|
@@ -9490,7 +9263,7 @@ var ProjectMapDefinitionListModule = {
|
|
|
9490
9263
|
command: "list",
|
|
9491
9264
|
describe: "List of project maps",
|
|
9492
9265
|
aliases: ["ls"],
|
|
9493
|
-
builder: (
|
|
9266
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
9494
9267
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9495
9268
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9496
9269
|
const client = getProjectMapClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9544,12 +9317,12 @@ function createProjectMapDefinitionEngineDataSource({
|
|
|
9544
9317
|
var ProjectMapDefinitionPullModule = {
|
|
9545
9318
|
command: "pull <directory>",
|
|
9546
9319
|
describe: "Pulls all project maps to local files in a directory",
|
|
9547
|
-
builder: (
|
|
9320
|
+
builder: (yargs35) => withConfiguration(
|
|
9548
9321
|
withDebugOptions(
|
|
9549
9322
|
withApiOptions(
|
|
9550
9323
|
withProjectOptions(
|
|
9551
9324
|
withDiffOptions(
|
|
9552
|
-
|
|
9325
|
+
yargs35.positional("directory", {
|
|
9553
9326
|
describe: "Directory to save project maps to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
9554
9327
|
type: "string"
|
|
9555
9328
|
}).option("format", {
|
|
@@ -9624,12 +9397,12 @@ var ProjectMapDefinitionPullModule = {
|
|
|
9624
9397
|
var ProjectMapDefinitionPushModule = {
|
|
9625
9398
|
command: "push <directory>",
|
|
9626
9399
|
describe: "Pushes all project maps from files in a directory or package to Uniform",
|
|
9627
|
-
builder: (
|
|
9400
|
+
builder: (yargs35) => withConfiguration(
|
|
9628
9401
|
withDebugOptions(
|
|
9629
9402
|
withApiOptions(
|
|
9630
9403
|
withProjectOptions(
|
|
9631
9404
|
withDiffOptions(
|
|
9632
|
-
|
|
9405
|
+
yargs35.positional("directory", {
|
|
9633
9406
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
9634
9407
|
type: "string"
|
|
9635
9408
|
}).option("mode", {
|
|
@@ -9693,9 +9466,9 @@ var ProjectMapDefinitionRemoveModule = {
|
|
|
9693
9466
|
command: "remove <id>",
|
|
9694
9467
|
aliases: ["delete", "rm"],
|
|
9695
9468
|
describe: "Delete a project map",
|
|
9696
|
-
builder: (
|
|
9469
|
+
builder: (yargs35) => withConfiguration(
|
|
9697
9470
|
withApiOptions(
|
|
9698
|
-
withProjectOptions(
|
|
9471
|
+
withProjectOptions(yargs35.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
9699
9472
|
)
|
|
9700
9473
|
),
|
|
9701
9474
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -9710,10 +9483,10 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
9710
9483
|
command: "update <filename>",
|
|
9711
9484
|
aliases: ["put"],
|
|
9712
9485
|
describe: "Insert or update a project map",
|
|
9713
|
-
builder: (
|
|
9486
|
+
builder: (yargs35) => withConfiguration(
|
|
9714
9487
|
withApiOptions(
|
|
9715
9488
|
withProjectOptions(
|
|
9716
|
-
|
|
9489
|
+
yargs35.positional("filename", { demandOption: true, describe: "Project map file to put" })
|
|
9717
9490
|
)
|
|
9718
9491
|
)
|
|
9719
9492
|
),
|
|
@@ -9729,24 +9502,24 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
9729
9502
|
var ProjectMapDefinitionModule = {
|
|
9730
9503
|
command: "definition <command>",
|
|
9731
9504
|
describe: "Commands for ProjectMap Definitions",
|
|
9732
|
-
builder: (
|
|
9505
|
+
builder: (yargs35) => yargs35.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
|
|
9733
9506
|
handler: () => {
|
|
9734
|
-
|
|
9507
|
+
yargs28.help();
|
|
9735
9508
|
}
|
|
9736
9509
|
};
|
|
9737
9510
|
|
|
9738
9511
|
// src/commands/project-map/commands/projectMapNode.ts
|
|
9739
|
-
import
|
|
9512
|
+
import yargs29 from "yargs";
|
|
9740
9513
|
|
|
9741
9514
|
// src/commands/project-map/commands/ProjectMapNode/get.ts
|
|
9742
9515
|
var ProjectMapNodeGetModule = {
|
|
9743
9516
|
command: "get <id> <projectMapId>",
|
|
9744
9517
|
describe: "Fetch a project map node",
|
|
9745
|
-
builder: (
|
|
9518
|
+
builder: (yargs35) => withConfiguration(
|
|
9746
9519
|
withFormatOptions(
|
|
9747
9520
|
withApiOptions(
|
|
9748
9521
|
withProjectOptions(
|
|
9749
|
-
|
|
9522
|
+
yargs35.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
|
|
9750
9523
|
)
|
|
9751
9524
|
)
|
|
9752
9525
|
)
|
|
@@ -9770,12 +9543,12 @@ var ProjectMapNodeListModule = {
|
|
|
9770
9543
|
command: "list <projectMapId>",
|
|
9771
9544
|
describe: "List project map nodes",
|
|
9772
9545
|
aliases: ["ls"],
|
|
9773
|
-
builder: (
|
|
9546
|
+
builder: (yargs35) => withConfiguration(
|
|
9774
9547
|
withFormatOptions(
|
|
9775
9548
|
withApiOptions(
|
|
9776
9549
|
withProjectOptions(
|
|
9777
9550
|
withStateOptions(
|
|
9778
|
-
|
|
9551
|
+
yargs35.positional("projectMapId", {
|
|
9779
9552
|
demandOption: true,
|
|
9780
9553
|
describe: "ProjectMap UUID to fetch from"
|
|
9781
9554
|
})
|
|
@@ -9853,12 +9626,12 @@ function createProjectMapNodeEngineDataSource({
|
|
|
9853
9626
|
var ProjectMapNodePullModule = {
|
|
9854
9627
|
command: "pull <directory>",
|
|
9855
9628
|
describe: "Pulls all project maps nodes to local files in a directory",
|
|
9856
|
-
builder: (
|
|
9629
|
+
builder: (yargs35) => withConfiguration(
|
|
9857
9630
|
withDebugOptions(
|
|
9858
9631
|
withApiOptions(
|
|
9859
9632
|
withProjectOptions(
|
|
9860
9633
|
withDiffOptions(
|
|
9861
|
-
|
|
9634
|
+
yargs35.positional("directory", {
|
|
9862
9635
|
describe: "Directory to save project maps to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
9863
9636
|
type: "string"
|
|
9864
9637
|
}).option("format", {
|
|
@@ -9940,12 +9713,12 @@ import {
|
|
|
9940
9713
|
var ProjectMapNodePushModule = {
|
|
9941
9714
|
command: "push <directory>",
|
|
9942
9715
|
describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
|
|
9943
|
-
builder: (
|
|
9716
|
+
builder: (yargs35) => withConfiguration(
|
|
9944
9717
|
withDebugOptions(
|
|
9945
9718
|
withApiOptions(
|
|
9946
9719
|
withProjectOptions(
|
|
9947
9720
|
withDiffOptions(
|
|
9948
|
-
|
|
9721
|
+
yargs35.positional("directory", {
|
|
9949
9722
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
9950
9723
|
type: "string"
|
|
9951
9724
|
}).option("mode", {
|
|
@@ -10047,10 +9820,10 @@ var ProjectMapNodeRemoveModule = {
|
|
|
10047
9820
|
command: "remove <id> <projectMapId>",
|
|
10048
9821
|
aliases: ["delete", "rm"],
|
|
10049
9822
|
describe: "Delete a project map node",
|
|
10050
|
-
builder: (
|
|
9823
|
+
builder: (yargs35) => withConfiguration(
|
|
10051
9824
|
withApiOptions(
|
|
10052
9825
|
withProjectOptions(
|
|
10053
|
-
|
|
9826
|
+
yargs35.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
|
|
10054
9827
|
)
|
|
10055
9828
|
)
|
|
10056
9829
|
),
|
|
@@ -10066,10 +9839,10 @@ var ProjectMapNodeUpdateModule = {
|
|
|
10066
9839
|
command: "update <filename> <projectMapId>",
|
|
10067
9840
|
aliases: ["put"],
|
|
10068
9841
|
describe: "Insert or update a project map node",
|
|
10069
|
-
builder: (
|
|
9842
|
+
builder: (yargs35) => withConfiguration(
|
|
10070
9843
|
withApiOptions(
|
|
10071
9844
|
withProjectOptions(
|
|
10072
|
-
|
|
9845
|
+
yargs35.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
|
|
10073
9846
|
)
|
|
10074
9847
|
)
|
|
10075
9848
|
),
|
|
@@ -10085,9 +9858,9 @@ var ProjectMapNodeUpdateModule = {
|
|
|
10085
9858
|
var ProjectMapNodeModule = {
|
|
10086
9859
|
command: "node <command>",
|
|
10087
9860
|
describe: "Commands for ProjectMap Nodes",
|
|
10088
|
-
builder: (
|
|
9861
|
+
builder: (yargs35) => yargs35.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
|
|
10089
9862
|
handler: () => {
|
|
10090
|
-
|
|
9863
|
+
yargs29.help();
|
|
10091
9864
|
}
|
|
10092
9865
|
};
|
|
10093
9866
|
|
|
@@ -10096,17 +9869,17 @@ var ProjectMapCommand = {
|
|
|
10096
9869
|
command: "project-map <command>",
|
|
10097
9870
|
aliases: ["prm"],
|
|
10098
9871
|
describe: "Uniform ProjectMap commands",
|
|
10099
|
-
builder: (
|
|
9872
|
+
builder: (yargs35) => yargs35.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
|
|
10100
9873
|
handler: () => {
|
|
10101
|
-
|
|
9874
|
+
yargs30.showHelp();
|
|
10102
9875
|
}
|
|
10103
9876
|
};
|
|
10104
9877
|
|
|
10105
9878
|
// src/commands/redirect/index.ts
|
|
10106
|
-
import
|
|
9879
|
+
import yargs32 from "yargs";
|
|
10107
9880
|
|
|
10108
9881
|
// src/commands/redirect/commands/redirect.ts
|
|
10109
|
-
import
|
|
9882
|
+
import yargs31 from "yargs";
|
|
10110
9883
|
|
|
10111
9884
|
// src/commands/redirect/commands/RedirectDefinition/_util.ts
|
|
10112
9885
|
import { UncachedRedirectClient } from "@uniformdev/redirect";
|
|
@@ -10131,11 +9904,11 @@ function getRedirectClient(options) {
|
|
|
10131
9904
|
var RedirectDefinitionGetModule = {
|
|
10132
9905
|
command: "get <id>",
|
|
10133
9906
|
describe: "Fetch a redirect",
|
|
10134
|
-
builder: (
|
|
9907
|
+
builder: (yargs35) => withConfiguration(
|
|
10135
9908
|
withFormatOptions(
|
|
10136
9909
|
withApiOptions(
|
|
10137
9910
|
withProjectOptions(
|
|
10138
|
-
|
|
9911
|
+
yargs35.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
|
|
10139
9912
|
)
|
|
10140
9913
|
)
|
|
10141
9914
|
)
|
|
@@ -10158,7 +9931,7 @@ var RedirectDefinitionListModule = {
|
|
|
10158
9931
|
command: "list",
|
|
10159
9932
|
describe: "List of redirects",
|
|
10160
9933
|
aliases: ["ls"],
|
|
10161
|
-
builder: (
|
|
9934
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
10162
9935
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
10163
9936
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10164
9937
|
const client = getRedirectClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -10210,12 +9983,12 @@ function createRedirectDefinitionEngineDataSource({
|
|
|
10210
9983
|
var RedirectDefinitionPullModule = {
|
|
10211
9984
|
command: "pull <directory>",
|
|
10212
9985
|
describe: "Pulls all redirects to local files in a directory",
|
|
10213
|
-
builder: (
|
|
9986
|
+
builder: (yargs35) => withConfiguration(
|
|
10214
9987
|
withDebugOptions(
|
|
10215
9988
|
withApiOptions(
|
|
10216
9989
|
withProjectOptions(
|
|
10217
9990
|
withDiffOptions(
|
|
10218
|
-
|
|
9991
|
+
yargs35.positional("directory", {
|
|
10219
9992
|
describe: "Directory to save redirects to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
10220
9993
|
type: "string"
|
|
10221
9994
|
}).option("format", {
|
|
@@ -10291,12 +10064,12 @@ var RedirectDefinitionPullModule = {
|
|
|
10291
10064
|
var RedirectDefinitionPushModule = {
|
|
10292
10065
|
command: "push <directory>",
|
|
10293
10066
|
describe: "Pushes all redirects from files in a directory or package to Uniform",
|
|
10294
|
-
builder: (
|
|
10067
|
+
builder: (yargs35) => withConfiguration(
|
|
10295
10068
|
withDebugOptions(
|
|
10296
10069
|
withApiOptions(
|
|
10297
10070
|
withProjectOptions(
|
|
10298
10071
|
withDiffOptions(
|
|
10299
|
-
|
|
10072
|
+
yargs35.positional("directory", {
|
|
10300
10073
|
describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
|
|
10301
10074
|
type: "string"
|
|
10302
10075
|
}).option("mode", {
|
|
@@ -10360,9 +10133,9 @@ var RedirectDefinitionRemoveModule = {
|
|
|
10360
10133
|
command: "remove <id>",
|
|
10361
10134
|
aliases: ["delete", "rm"],
|
|
10362
10135
|
describe: "Delete a redirect",
|
|
10363
|
-
builder: (
|
|
10136
|
+
builder: (yargs35) => withConfiguration(
|
|
10364
10137
|
withApiOptions(
|
|
10365
|
-
withProjectOptions(
|
|
10138
|
+
withProjectOptions(yargs35.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
10366
10139
|
)
|
|
10367
10140
|
),
|
|
10368
10141
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -10377,10 +10150,10 @@ var RedirectDefinitionUpdateModule = {
|
|
|
10377
10150
|
command: "update <filename>",
|
|
10378
10151
|
aliases: ["put"],
|
|
10379
10152
|
describe: "Insert or update a redirect",
|
|
10380
|
-
builder: (
|
|
10153
|
+
builder: (yargs35) => withConfiguration(
|
|
10381
10154
|
withApiOptions(
|
|
10382
10155
|
withProjectOptions(
|
|
10383
|
-
|
|
10156
|
+
yargs35.positional("filename", { demandOption: true, describe: "Redirect file to put" })
|
|
10384
10157
|
)
|
|
10385
10158
|
)
|
|
10386
10159
|
),
|
|
@@ -10396,9 +10169,9 @@ var RedirectDefinitionUpdateModule = {
|
|
|
10396
10169
|
var RedirectDefinitionModule = {
|
|
10397
10170
|
command: "definition <command>",
|
|
10398
10171
|
describe: "Commands for Redirect Definitions",
|
|
10399
|
-
builder: (
|
|
10172
|
+
builder: (yargs35) => yargs35.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
|
|
10400
10173
|
handler: () => {
|
|
10401
|
-
|
|
10174
|
+
yargs31.help();
|
|
10402
10175
|
}
|
|
10403
10176
|
};
|
|
10404
10177
|
|
|
@@ -10407,14 +10180,14 @@ var RedirectCommand = {
|
|
|
10407
10180
|
command: "redirect <command>",
|
|
10408
10181
|
aliases: ["red"],
|
|
10409
10182
|
describe: "Uniform Redirect commands",
|
|
10410
|
-
builder: (
|
|
10183
|
+
builder: (yargs35) => yargs35.command(RedirectDefinitionModule).demandCommand(),
|
|
10411
10184
|
handler: () => {
|
|
10412
|
-
|
|
10185
|
+
yargs32.showHelp();
|
|
10413
10186
|
}
|
|
10414
10187
|
};
|
|
10415
10188
|
|
|
10416
10189
|
// src/commands/sync/index.ts
|
|
10417
|
-
import
|
|
10190
|
+
import yargs33 from "yargs";
|
|
10418
10191
|
|
|
10419
10192
|
// src/commands/sync/commands/util.ts
|
|
10420
10193
|
import ora2 from "ora";
|
|
@@ -10530,7 +10303,7 @@ function numPad(num, spaces = 6) {
|
|
|
10530
10303
|
var SyncPullModule = {
|
|
10531
10304
|
command: "pull",
|
|
10532
10305
|
describe: "Pulls whole project to local files in a directory",
|
|
10533
|
-
builder: (
|
|
10306
|
+
builder: (yargs35) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs35))))),
|
|
10534
10307
|
handler: async ({ serialization, ...otherParams }) => {
|
|
10535
10308
|
const config2 = serialization;
|
|
10536
10309
|
const enabledEntities = Object.entries({
|
|
@@ -10546,7 +10319,6 @@ var SyncPullModule = {
|
|
|
10546
10319
|
enrichment: EnrichmentPullModule,
|
|
10547
10320
|
aggregate: AggregatePullModule,
|
|
10548
10321
|
component: ComponentPullModule,
|
|
10549
|
-
pattern: PatternPullModule,
|
|
10550
10322
|
componentPattern: ComponentPatternPullModule,
|
|
10551
10323
|
compositionPattern: CompositionPatternPullModule,
|
|
10552
10324
|
composition: CompositionPullModule,
|
|
@@ -10628,7 +10400,7 @@ var getFormat = (entityType, config2) => {
|
|
|
10628
10400
|
var SyncPushModule = {
|
|
10629
10401
|
command: "push",
|
|
10630
10402
|
describe: "Pushes whole project data from files in a directory or package to Uniform",
|
|
10631
|
-
builder: (
|
|
10403
|
+
builder: (yargs35) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs35))))),
|
|
10632
10404
|
handler: async ({ serialization, ...otherParams }) => {
|
|
10633
10405
|
const config2 = serialization;
|
|
10634
10406
|
const enabledEntities = Object.entries({
|
|
@@ -10644,7 +10416,6 @@ var SyncPushModule = {
|
|
|
10644
10416
|
enrichment: EnrichmentPushModule,
|
|
10645
10417
|
aggregate: AggregatePushModule,
|
|
10646
10418
|
component: ComponentPushModule,
|
|
10647
|
-
pattern: PatternPushModule,
|
|
10648
10419
|
componentPattern: ComponentPatternPushModule,
|
|
10649
10420
|
compositionPattern: CompositionPatternPushModule,
|
|
10650
10421
|
composition: CompositionPushModule,
|
|
@@ -10820,9 +10591,9 @@ var getFormat2 = (entityType, config2) => {
|
|
|
10820
10591
|
var SyncCommand = {
|
|
10821
10592
|
command: "sync <command>",
|
|
10822
10593
|
describe: "Uniform Sync commands",
|
|
10823
|
-
builder: (
|
|
10594
|
+
builder: (yargs35) => yargs35.command(SyncPullModule).command(SyncPushModule).demandCommand(),
|
|
10824
10595
|
handler: () => {
|
|
10825
|
-
|
|
10596
|
+
yargs33.showHelp();
|
|
10826
10597
|
}
|
|
10827
10598
|
};
|
|
10828
10599
|
|
|
@@ -11074,7 +10845,7 @@ First found was: v${firstVersion}`;
|
|
|
11074
10845
|
|
|
11075
10846
|
// src/index.ts
|
|
11076
10847
|
dotenv.config();
|
|
11077
|
-
var yarggery =
|
|
10848
|
+
var yarggery = yargs34(hideBin(process.argv));
|
|
11078
10849
|
var useDefaultConfig = !process.argv.includes("--config");
|
|
11079
10850
|
var defaultConfig2 = useDefaultConfig ? loadConfig(null) : {};
|
|
11080
10851
|
yarggery.option("verbose", {
|