@uniformdev/cli 19.159.0 → 19.159.1-alpha.16
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
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
import * as dotenv from "dotenv";
|
|
22
|
-
import
|
|
22
|
+
import yargs34 from "yargs";
|
|
23
23
|
import { hideBin } from "yargs/helpers";
|
|
24
24
|
|
|
25
25
|
// src/commands/canvas/index.ts
|
|
26
|
-
import
|
|
26
|
+
import yargs15 from "yargs";
|
|
27
27
|
|
|
28
28
|
// src/commands/canvas/commands/asset.ts
|
|
29
29
|
import yargs from "yargs";
|
|
@@ -408,12 +408,12 @@ function createPublishStatusSyncEngineConsoleLogger(options) {
|
|
|
408
408
|
var AssetGetModule = {
|
|
409
409
|
command: "get <id>",
|
|
410
410
|
describe: "Get an asset",
|
|
411
|
-
builder: (
|
|
411
|
+
builder: (yargs35) => withConfiguration(
|
|
412
412
|
withFormatOptions(
|
|
413
413
|
withApiOptions(
|
|
414
414
|
withProjectOptions(
|
|
415
415
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
416
|
-
|
|
416
|
+
yargs35.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
|
|
417
417
|
)
|
|
418
418
|
)
|
|
419
419
|
)
|
|
@@ -434,7 +434,7 @@ import { UncachedAssetClient as UncachedAssetClient2 } from "@uniformdev/assets"
|
|
|
434
434
|
var AssetListModule = {
|
|
435
435
|
command: "list",
|
|
436
436
|
describe: "List assets",
|
|
437
|
-
builder: (
|
|
437
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
438
438
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
439
439
|
const fetch3 = nodeFetchProxy(proxy);
|
|
440
440
|
const client = new UncachedAssetClient2({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
@@ -786,8 +786,8 @@ function prepCompositionForDisk(composition) {
|
|
|
786
786
|
delete prepped.state;
|
|
787
787
|
return prepped;
|
|
788
788
|
}
|
|
789
|
-
function withStateOptions(
|
|
790
|
-
return
|
|
789
|
+
function withStateOptions(yargs35, defaultState = "preview") {
|
|
790
|
+
return yargs35.option("state", {
|
|
791
791
|
type: "string",
|
|
792
792
|
describe: `State to fetch.`,
|
|
793
793
|
choices: ["preview", "published"],
|
|
@@ -854,11 +854,11 @@ function writeCanvasPackage(filename, packageContents) {
|
|
|
854
854
|
var AssetPullModule = {
|
|
855
855
|
command: "pull <directory>",
|
|
856
856
|
describe: "Pulls all assets to local files in a directory",
|
|
857
|
-
builder: (
|
|
857
|
+
builder: (yargs35) => withConfiguration(
|
|
858
858
|
withApiOptions(
|
|
859
859
|
withProjectOptions(
|
|
860
860
|
withDiffOptions(
|
|
861
|
-
|
|
861
|
+
yargs35.positional("directory", {
|
|
862
862
|
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.",
|
|
863
863
|
type: "string"
|
|
864
864
|
}).option("format", {
|
|
@@ -976,11 +976,11 @@ import { UncachedFileClient as UncachedFileClient2 } from "@uniformdev/files";
|
|
|
976
976
|
var AssetPushModule = {
|
|
977
977
|
command: "push <directory>",
|
|
978
978
|
describe: "Pushes all assets from files in a directory to Uniform",
|
|
979
|
-
builder: (
|
|
979
|
+
builder: (yargs35) => withConfiguration(
|
|
980
980
|
withApiOptions(
|
|
981
981
|
withProjectOptions(
|
|
982
982
|
withDiffOptions(
|
|
983
|
-
|
|
983
|
+
yargs35.positional("directory", {
|
|
984
984
|
describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
|
|
985
985
|
type: "string"
|
|
986
986
|
}).option("what-if", {
|
|
@@ -1081,9 +1081,9 @@ var AssetRemoveModule = {
|
|
|
1081
1081
|
command: "remove <id>",
|
|
1082
1082
|
aliases: ["delete", "rm"],
|
|
1083
1083
|
describe: "Delete an asset",
|
|
1084
|
-
builder: (
|
|
1084
|
+
builder: (yargs35) => withConfiguration(
|
|
1085
1085
|
withApiOptions(
|
|
1086
|
-
withProjectOptions(
|
|
1086
|
+
withProjectOptions(yargs35.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
|
|
1087
1087
|
)
|
|
1088
1088
|
),
|
|
1089
1089
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -1099,10 +1099,10 @@ var AssetUpdateModule = {
|
|
|
1099
1099
|
command: "update <filename>",
|
|
1100
1100
|
aliases: ["put"],
|
|
1101
1101
|
describe: "Insert or update an asset",
|
|
1102
|
-
builder: (
|
|
1102
|
+
builder: (yargs35) => withConfiguration(
|
|
1103
1103
|
withApiOptions(
|
|
1104
1104
|
withProjectOptions(
|
|
1105
|
-
|
|
1105
|
+
yargs35.positional("filename", { demandOption: true, describe: "Asset file to put" })
|
|
1106
1106
|
)
|
|
1107
1107
|
)
|
|
1108
1108
|
),
|
|
@@ -1118,7 +1118,7 @@ var AssetUpdateModule = {
|
|
|
1118
1118
|
var AssetModule = {
|
|
1119
1119
|
command: "asset <command>",
|
|
1120
1120
|
describe: "Commands for Assets",
|
|
1121
|
-
builder: (
|
|
1121
|
+
builder: (yargs35) => yargs35.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
|
|
1122
1122
|
handler: () => {
|
|
1123
1123
|
yargs.help();
|
|
1124
1124
|
}
|
|
@@ -1132,11 +1132,11 @@ import { UncachedCategoryClient } from "@uniformdev/canvas";
|
|
|
1132
1132
|
var CategoryGetModule = {
|
|
1133
1133
|
command: "get <id>",
|
|
1134
1134
|
describe: "Fetch a category",
|
|
1135
|
-
builder: (
|
|
1135
|
+
builder: (yargs35) => withConfiguration(
|
|
1136
1136
|
withFormatOptions(
|
|
1137
1137
|
withApiOptions(
|
|
1138
1138
|
withProjectOptions(
|
|
1139
|
-
|
|
1139
|
+
yargs35.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
|
|
1140
1140
|
)
|
|
1141
1141
|
)
|
|
1142
1142
|
)
|
|
@@ -1161,7 +1161,7 @@ var CategoryListModule = {
|
|
|
1161
1161
|
command: "list",
|
|
1162
1162
|
describe: "List categories",
|
|
1163
1163
|
aliases: ["ls"],
|
|
1164
|
-
builder: (
|
|
1164
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35.options({}))))),
|
|
1165
1165
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
1166
1166
|
const fetch3 = nodeFetchProxy(proxy);
|
|
1167
1167
|
const client = new UncachedCategoryClient2({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
@@ -1211,11 +1211,11 @@ function createCategoriesEngineDataSource({
|
|
|
1211
1211
|
var CategoryPullModule = {
|
|
1212
1212
|
command: "pull <directory>",
|
|
1213
1213
|
describe: "Pulls all categories to local files in a directory",
|
|
1214
|
-
builder: (
|
|
1214
|
+
builder: (yargs35) => withConfiguration(
|
|
1215
1215
|
withApiOptions(
|
|
1216
1216
|
withProjectOptions(
|
|
1217
1217
|
withDiffOptions(
|
|
1218
|
-
|
|
1218
|
+
yargs35.positional("directory", {
|
|
1219
1219
|
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.",
|
|
1220
1220
|
type: "string"
|
|
1221
1221
|
}).option("format", {
|
|
@@ -1293,11 +1293,11 @@ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/c
|
|
|
1293
1293
|
var CategoryPushModule = {
|
|
1294
1294
|
command: "push <directory>",
|
|
1295
1295
|
describe: "Pushes all categories from files in a directory to Uniform Canvas",
|
|
1296
|
-
builder: (
|
|
1296
|
+
builder: (yargs35) => withConfiguration(
|
|
1297
1297
|
withApiOptions(
|
|
1298
1298
|
withProjectOptions(
|
|
1299
1299
|
withDiffOptions(
|
|
1300
|
-
|
|
1300
|
+
yargs35.positional("directory", {
|
|
1301
1301
|
describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
|
|
1302
1302
|
type: "string"
|
|
1303
1303
|
}).option("what-if", {
|
|
@@ -1364,10 +1364,10 @@ var CategoryRemoveModule = {
|
|
|
1364
1364
|
command: "remove <id>",
|
|
1365
1365
|
aliases: ["delete", "rm"],
|
|
1366
1366
|
describe: "Delete a category",
|
|
1367
|
-
builder: (
|
|
1367
|
+
builder: (yargs35) => withConfiguration(
|
|
1368
1368
|
withApiOptions(
|
|
1369
1369
|
withProjectOptions(
|
|
1370
|
-
|
|
1370
|
+
yargs35.positional("id", { demandOption: true, describe: "Category UUID to delete" })
|
|
1371
1371
|
)
|
|
1372
1372
|
)
|
|
1373
1373
|
),
|
|
@@ -1384,10 +1384,10 @@ var CategoryUpdateModule = {
|
|
|
1384
1384
|
command: "update <filename>",
|
|
1385
1385
|
aliases: ["put"],
|
|
1386
1386
|
describe: "Insert or update a category",
|
|
1387
|
-
builder: (
|
|
1387
|
+
builder: (yargs35) => withConfiguration(
|
|
1388
1388
|
withApiOptions(
|
|
1389
1389
|
withProjectOptions(
|
|
1390
|
-
|
|
1390
|
+
yargs35.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
1391
1391
|
)
|
|
1392
1392
|
)
|
|
1393
1393
|
),
|
|
@@ -1404,7 +1404,7 @@ var CategoryModule = {
|
|
|
1404
1404
|
command: "category <command>",
|
|
1405
1405
|
aliases: ["cat"],
|
|
1406
1406
|
describe: "Commands for Canvas categories",
|
|
1407
|
-
builder: (
|
|
1407
|
+
builder: (yargs35) => yargs35.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
|
|
1408
1408
|
handler: () => {
|
|
1409
1409
|
yargs2.help();
|
|
1410
1410
|
}
|
|
@@ -1425,11 +1425,11 @@ var selectSchemaUrl = () => "/schemas/json-schema/component-definition/v1.json";
|
|
|
1425
1425
|
var ComponentGetModule = {
|
|
1426
1426
|
command: "get <id>",
|
|
1427
1427
|
describe: "Fetch a component definition",
|
|
1428
|
-
builder: (
|
|
1428
|
+
builder: (yargs35) => withConfiguration(
|
|
1429
1429
|
withFormatOptions(
|
|
1430
1430
|
withApiOptions(
|
|
1431
1431
|
withProjectOptions(
|
|
1432
|
-
|
|
1432
|
+
yargs35.positional("id", {
|
|
1433
1433
|
demandOption: true,
|
|
1434
1434
|
describe: "Component definition public ID to fetch"
|
|
1435
1435
|
})
|
|
@@ -1463,11 +1463,11 @@ var ComponentListModule = {
|
|
|
1463
1463
|
command: "list",
|
|
1464
1464
|
describe: "List component definitions",
|
|
1465
1465
|
aliases: ["ls"],
|
|
1466
|
-
builder: (
|
|
1466
|
+
builder: (yargs35) => withConfiguration(
|
|
1467
1467
|
withFormatOptions(
|
|
1468
1468
|
withApiOptions(
|
|
1469
1469
|
withProjectOptions(
|
|
1470
|
-
|
|
1470
|
+
yargs35.options({
|
|
1471
1471
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
1472
1472
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
|
|
1473
1473
|
})
|
|
@@ -1523,11 +1523,11 @@ function createComponentDefinitionEngineDataSource({
|
|
|
1523
1523
|
var ComponentPullModule = {
|
|
1524
1524
|
command: "pull <directory>",
|
|
1525
1525
|
describe: "Pulls all component definitions to local files in a directory",
|
|
1526
|
-
builder: (
|
|
1526
|
+
builder: (yargs35) => withConfiguration(
|
|
1527
1527
|
withApiOptions(
|
|
1528
1528
|
withProjectOptions(
|
|
1529
1529
|
withDiffOptions(
|
|
1530
|
-
|
|
1530
|
+
yargs35.positional("directory", {
|
|
1531
1531
|
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.",
|
|
1532
1532
|
type: "string"
|
|
1533
1533
|
}).option("format", {
|
|
@@ -1606,11 +1606,11 @@ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canva
|
|
|
1606
1606
|
var ComponentPushModule = {
|
|
1607
1607
|
command: "push <directory>",
|
|
1608
1608
|
describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
|
|
1609
|
-
builder: (
|
|
1609
|
+
builder: (yargs35) => withConfiguration(
|
|
1610
1610
|
withApiOptions(
|
|
1611
1611
|
withProjectOptions(
|
|
1612
1612
|
withDiffOptions(
|
|
1613
|
-
|
|
1613
|
+
yargs35.positional("directory", {
|
|
1614
1614
|
describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
|
|
1615
1615
|
type: "string"
|
|
1616
1616
|
}).option("what-if", {
|
|
@@ -1678,10 +1678,10 @@ var ComponentRemoveModule = {
|
|
|
1678
1678
|
command: "remove <id>",
|
|
1679
1679
|
aliases: ["delete", "rm"],
|
|
1680
1680
|
describe: "Delete a component definition",
|
|
1681
|
-
builder: (
|
|
1681
|
+
builder: (yargs35) => withConfiguration(
|
|
1682
1682
|
withApiOptions(
|
|
1683
1683
|
withProjectOptions(
|
|
1684
|
-
|
|
1684
|
+
yargs35.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
|
|
1685
1685
|
)
|
|
1686
1686
|
)
|
|
1687
1687
|
),
|
|
@@ -1698,10 +1698,10 @@ var ComponentUpdateModule = {
|
|
|
1698
1698
|
command: "update <filename>",
|
|
1699
1699
|
aliases: ["put"],
|
|
1700
1700
|
describe: "Insert or update a component definition",
|
|
1701
|
-
builder: (
|
|
1701
|
+
builder: (yargs35) => withConfiguration(
|
|
1702
1702
|
withApiOptions(
|
|
1703
1703
|
withProjectOptions(
|
|
1704
|
-
|
|
1704
|
+
yargs35.positional("filename", { demandOption: true, describe: "Component definition file to put" })
|
|
1705
1705
|
)
|
|
1706
1706
|
)
|
|
1707
1707
|
),
|
|
@@ -1718,7 +1718,7 @@ var ComponentModule = {
|
|
|
1718
1718
|
command: "component <command>",
|
|
1719
1719
|
aliases: ["def"],
|
|
1720
1720
|
describe: "Commands for Canvas component definitions",
|
|
1721
|
-
builder: (
|
|
1721
|
+
builder: (yargs35) => yargs35.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
|
|
1722
1722
|
handler: () => {
|
|
1723
1723
|
yargs3.help();
|
|
1724
1724
|
}
|
|
@@ -1732,12 +1732,12 @@ import { UncachedCanvasClient as UncachedCanvasClient7 } from "@uniformdev/canva
|
|
|
1732
1732
|
var CompositionGetModule = {
|
|
1733
1733
|
command: "get <id>",
|
|
1734
1734
|
describe: "Fetch a composition",
|
|
1735
|
-
builder: (
|
|
1735
|
+
builder: (yargs35) => withFormatOptions(
|
|
1736
1736
|
withConfiguration(
|
|
1737
1737
|
withApiOptions(
|
|
1738
1738
|
withProjectOptions(
|
|
1739
1739
|
withStateOptions(
|
|
1740
|
-
|
|
1740
|
+
yargs35.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
|
|
1741
1741
|
resolvePatterns: {
|
|
1742
1742
|
type: "boolean",
|
|
1743
1743
|
default: false,
|
|
@@ -1814,12 +1814,12 @@ var CompositionListModule = {
|
|
|
1814
1814
|
command: "list",
|
|
1815
1815
|
describe: "List compositions",
|
|
1816
1816
|
aliases: ["ls"],
|
|
1817
|
-
builder: (
|
|
1817
|
+
builder: (yargs35) => withFormatOptions(
|
|
1818
1818
|
withConfiguration(
|
|
1819
1819
|
withApiOptions(
|
|
1820
1820
|
withProjectOptions(
|
|
1821
1821
|
withStateOptions(
|
|
1822
|
-
|
|
1822
|
+
yargs35.options({
|
|
1823
1823
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
1824
1824
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
1825
1825
|
search: { describe: "Search query", type: "string", default: "" },
|
|
@@ -1866,6 +1866,7 @@ var CompositionListModule = {
|
|
|
1866
1866
|
filename,
|
|
1867
1867
|
onlyCompositions,
|
|
1868
1868
|
onlyPatterns,
|
|
1869
|
+
patternType,
|
|
1869
1870
|
project: projectId,
|
|
1870
1871
|
state,
|
|
1871
1872
|
resolvePatterns,
|
|
@@ -1879,6 +1880,7 @@ var CompositionListModule = {
|
|
|
1879
1880
|
offset,
|
|
1880
1881
|
search: search.length > 0 ? search : void 0,
|
|
1881
1882
|
pattern: onlyCompositions ? false : onlyPatterns ? true : void 0,
|
|
1883
|
+
patternType,
|
|
1882
1884
|
state: convertStateOption(state),
|
|
1883
1885
|
skipPatternResolution: !resolvePatterns,
|
|
1884
1886
|
withComponentIDs: componentIDs,
|
|
@@ -1892,12 +1894,12 @@ var CompositionListModule = {
|
|
|
1892
1894
|
var ComponentPatternListModule = {
|
|
1893
1895
|
...CompositionListModule,
|
|
1894
1896
|
describe: "List component patterns",
|
|
1895
|
-
builder: (
|
|
1897
|
+
builder: (yargs35) => withFormatOptions(
|
|
1896
1898
|
withConfiguration(
|
|
1897
1899
|
withApiOptions(
|
|
1898
1900
|
withProjectOptions(
|
|
1899
1901
|
withStateOptions(
|
|
1900
|
-
|
|
1902
|
+
yargs35.options({
|
|
1901
1903
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
1902
1904
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
1903
1905
|
resolvePatterns: {
|
|
@@ -1917,6 +1919,11 @@ var ComponentPatternListModule = {
|
|
|
1917
1919
|
type: "boolean",
|
|
1918
1920
|
hidden: true
|
|
1919
1921
|
},
|
|
1922
|
+
patternType: {
|
|
1923
|
+
default: "component",
|
|
1924
|
+
choices: ["all", "component", "composition"],
|
|
1925
|
+
hidden: true
|
|
1926
|
+
},
|
|
1920
1927
|
componentIDs: {
|
|
1921
1928
|
alias: ["componentIDs"],
|
|
1922
1929
|
type: "boolean",
|
|
@@ -1944,6 +1951,7 @@ function createComponentInstanceEngineDataSource({
|
|
|
1944
1951
|
state,
|
|
1945
1952
|
onlyCompositions,
|
|
1946
1953
|
onlyPatterns,
|
|
1954
|
+
patternType,
|
|
1947
1955
|
...clientOptions
|
|
1948
1956
|
}) {
|
|
1949
1957
|
const stateId = convertStateOption(state);
|
|
@@ -1957,7 +1965,8 @@ function createComponentInstanceEngineDataSource({
|
|
|
1957
1965
|
state: stateId,
|
|
1958
1966
|
skipPatternResolution: true,
|
|
1959
1967
|
skipOverridesResolution: true,
|
|
1960
|
-
withComponentIDs: true
|
|
1968
|
+
withComponentIDs: true,
|
|
1969
|
+
patternType
|
|
1961
1970
|
})).compositions,
|
|
1962
1971
|
{ pageSize: 100 }
|
|
1963
1972
|
);
|
|
@@ -1987,11 +1996,11 @@ function createComponentInstanceEngineDataSource({
|
|
|
1987
1996
|
var CompositionPublishModule = {
|
|
1988
1997
|
command: "publish [ids]",
|
|
1989
1998
|
describe: "Publishes composition(s)",
|
|
1990
|
-
builder: (
|
|
1999
|
+
builder: (yargs35) => withConfiguration(
|
|
1991
2000
|
withApiOptions(
|
|
1992
2001
|
withProjectOptions(
|
|
1993
2002
|
withDiffOptions(
|
|
1994
|
-
|
|
2003
|
+
yargs35.positional("ids", {
|
|
1995
2004
|
describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
1996
2005
|
type: "string"
|
|
1997
2006
|
}).option("all", {
|
|
@@ -2027,7 +2036,8 @@ var CompositionPublishModule = {
|
|
|
2027
2036
|
whatIf,
|
|
2028
2037
|
project: projectId,
|
|
2029
2038
|
onlyCompositions,
|
|
2030
|
-
onlyPatterns
|
|
2039
|
+
onlyPatterns,
|
|
2040
|
+
patternType
|
|
2031
2041
|
}) => {
|
|
2032
2042
|
if (!all && !ids || all && ids) {
|
|
2033
2043
|
console.error(`Specify --all or composition ID(s) to publish.`);
|
|
@@ -2041,14 +2051,16 @@ var CompositionPublishModule = {
|
|
|
2041
2051
|
state: "preview",
|
|
2042
2052
|
compositionIDs: compositionIDsArray,
|
|
2043
2053
|
onlyCompositions,
|
|
2044
|
-
onlyPatterns
|
|
2054
|
+
onlyPatterns,
|
|
2055
|
+
patternType
|
|
2045
2056
|
});
|
|
2046
2057
|
const target = createComponentInstanceEngineDataSource({
|
|
2047
2058
|
client,
|
|
2048
2059
|
state: "published",
|
|
2049
2060
|
compositionIDs: compositionIDsArray,
|
|
2050
2061
|
onlyCompositions,
|
|
2051
|
-
onlyPatterns
|
|
2062
|
+
onlyPatterns,
|
|
2063
|
+
patternType
|
|
2052
2064
|
});
|
|
2053
2065
|
await syncEngine({
|
|
2054
2066
|
source,
|
|
@@ -2065,11 +2077,11 @@ var CompositionPublishModule = {
|
|
|
2065
2077
|
var ComponentPatternPublishModule = {
|
|
2066
2078
|
...CompositionPublishModule,
|
|
2067
2079
|
describe: "Publishes component pattern(s)",
|
|
2068
|
-
builder: (
|
|
2080
|
+
builder: (yargs35) => withConfiguration(
|
|
2069
2081
|
withApiOptions(
|
|
2070
2082
|
withProjectOptions(
|
|
2071
2083
|
withDiffOptions(
|
|
2072
|
-
|
|
2084
|
+
yargs35.positional("ids", {
|
|
2073
2085
|
describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
2074
2086
|
type: "string"
|
|
2075
2087
|
}).option("all", {
|
|
@@ -2096,6 +2108,10 @@ var ComponentPatternPublishModule = {
|
|
|
2096
2108
|
default: true,
|
|
2097
2109
|
type: "boolean",
|
|
2098
2110
|
hidden: true
|
|
2111
|
+
}).option("patternType", {
|
|
2112
|
+
default: "component",
|
|
2113
|
+
choices: ["all", "component", "composition"],
|
|
2114
|
+
hidden: true
|
|
2099
2115
|
})
|
|
2100
2116
|
)
|
|
2101
2117
|
)
|
|
@@ -2109,12 +2125,12 @@ import { UncachedFileClient as UncachedFileClient3 } from "@uniformdev/files";
|
|
|
2109
2125
|
var CompositionPullModule = {
|
|
2110
2126
|
command: "pull <directory>",
|
|
2111
2127
|
describe: "Pulls all compositions to local files in a directory",
|
|
2112
|
-
builder: (
|
|
2128
|
+
builder: (yargs35) => withConfiguration(
|
|
2113
2129
|
withApiOptions(
|
|
2114
2130
|
withProjectOptions(
|
|
2115
2131
|
withStateOptions(
|
|
2116
2132
|
withDiffOptions(
|
|
2117
|
-
|
|
2133
|
+
yargs35.positional("directory", {
|
|
2118
2134
|
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.",
|
|
2119
2135
|
type: "string"
|
|
2120
2136
|
}).option("format", {
|
|
@@ -2157,6 +2173,7 @@ var CompositionPullModule = {
|
|
|
2157
2173
|
format,
|
|
2158
2174
|
onlyCompositions,
|
|
2159
2175
|
onlyPatterns,
|
|
2176
|
+
patternType = "all",
|
|
2160
2177
|
mode,
|
|
2161
2178
|
whatIf,
|
|
2162
2179
|
state,
|
|
@@ -2167,7 +2184,13 @@ var CompositionPullModule = {
|
|
|
2167
2184
|
const fetch3 = nodeFetchProxy(proxy);
|
|
2168
2185
|
const client = new UncachedCanvasClient10({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
2169
2186
|
const fileClient = new UncachedFileClient3({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
2170
|
-
const source = createComponentInstanceEngineDataSource({
|
|
2187
|
+
const source = createComponentInstanceEngineDataSource({
|
|
2188
|
+
client,
|
|
2189
|
+
state,
|
|
2190
|
+
onlyCompositions,
|
|
2191
|
+
onlyPatterns,
|
|
2192
|
+
patternType
|
|
2193
|
+
});
|
|
2171
2194
|
const isPackage = isPathAPackageFile(directory);
|
|
2172
2195
|
let target;
|
|
2173
2196
|
if (isPackage) {
|
|
@@ -2217,12 +2240,12 @@ var CompositionPullModule = {
|
|
|
2217
2240
|
var ComponentPatternPullModule = {
|
|
2218
2241
|
...CompositionPullModule,
|
|
2219
2242
|
describe: "Pulls all component patterns to local files in a directory",
|
|
2220
|
-
builder: (
|
|
2243
|
+
builder: (yargs35) => withConfiguration(
|
|
2221
2244
|
withApiOptions(
|
|
2222
2245
|
withProjectOptions(
|
|
2223
2246
|
withStateOptions(
|
|
2224
2247
|
withDiffOptions(
|
|
2225
|
-
|
|
2248
|
+
yargs35.positional("directory", {
|
|
2226
2249
|
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.",
|
|
2227
2250
|
type: "string"
|
|
2228
2251
|
}).option("format", {
|
|
@@ -2237,6 +2260,10 @@ var ComponentPatternPullModule = {
|
|
|
2237
2260
|
default: true,
|
|
2238
2261
|
type: "boolean",
|
|
2239
2262
|
hidden: true
|
|
2263
|
+
}).option("patternType", {
|
|
2264
|
+
default: "component",
|
|
2265
|
+
choices: ["all", "component", "composition"],
|
|
2266
|
+
hidden: true
|
|
2240
2267
|
}).option("what-if", {
|
|
2241
2268
|
alias: ["w"],
|
|
2242
2269
|
describe: "What-if mode reports what would be done but changes no files",
|
|
@@ -2262,12 +2289,12 @@ import { UncachedFileClient as UncachedFileClient4 } from "@uniformdev/files";
|
|
|
2262
2289
|
var CompositionPushModule = {
|
|
2263
2290
|
command: "push <directory>",
|
|
2264
2291
|
describe: "Pushes all compositions from files in a directory to Uniform Canvas",
|
|
2265
|
-
builder: (
|
|
2292
|
+
builder: (yargs35) => withConfiguration(
|
|
2266
2293
|
withApiOptions(
|
|
2267
2294
|
withProjectOptions(
|
|
2268
2295
|
withStateOptions(
|
|
2269
2296
|
withDiffOptions(
|
|
2270
|
-
|
|
2297
|
+
yargs35.positional("directory", {
|
|
2271
2298
|
describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
|
|
2272
2299
|
type: "string"
|
|
2273
2300
|
}).option("what-if", {
|
|
@@ -2307,6 +2334,7 @@ var CompositionPushModule = {
|
|
|
2307
2334
|
project: projectId,
|
|
2308
2335
|
onlyCompositions,
|
|
2309
2336
|
onlyPatterns,
|
|
2337
|
+
patternType,
|
|
2310
2338
|
diff: diffMode,
|
|
2311
2339
|
allowEmptySource
|
|
2312
2340
|
}) => {
|
|
@@ -2329,7 +2357,13 @@ var CompositionPushModule = {
|
|
|
2329
2357
|
selectDisplayName: selectDisplayName3
|
|
2330
2358
|
});
|
|
2331
2359
|
}
|
|
2332
|
-
const target = createComponentInstanceEngineDataSource({
|
|
2360
|
+
const target = createComponentInstanceEngineDataSource({
|
|
2361
|
+
client,
|
|
2362
|
+
state,
|
|
2363
|
+
onlyCompositions,
|
|
2364
|
+
onlyPatterns,
|
|
2365
|
+
patternType
|
|
2366
|
+
});
|
|
2333
2367
|
const fileClient = new UncachedFileClient4({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
2334
2368
|
await syncEngine({
|
|
2335
2369
|
source,
|
|
@@ -2357,12 +2391,12 @@ var CompositionPushModule = {
|
|
|
2357
2391
|
var ComponentPatternPushModule = {
|
|
2358
2392
|
...CompositionPushModule,
|
|
2359
2393
|
describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
|
|
2360
|
-
builder: (
|
|
2394
|
+
builder: (yargs35) => withConfiguration(
|
|
2361
2395
|
withApiOptions(
|
|
2362
2396
|
withProjectOptions(
|
|
2363
2397
|
withStateOptions(
|
|
2364
2398
|
withDiffOptions(
|
|
2365
|
-
|
|
2399
|
+
yargs35.positional("directory", {
|
|
2366
2400
|
describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
|
|
2367
2401
|
type: "string"
|
|
2368
2402
|
}).option("what-if", {
|
|
@@ -2382,6 +2416,10 @@ var ComponentPatternPushModule = {
|
|
|
2382
2416
|
default: true,
|
|
2383
2417
|
type: "boolean",
|
|
2384
2418
|
hidden: true
|
|
2419
|
+
}).option("patternType", {
|
|
2420
|
+
default: "component",
|
|
2421
|
+
choices: ["all", "component", "composition"],
|
|
2422
|
+
hidden: true
|
|
2385
2423
|
})
|
|
2386
2424
|
)
|
|
2387
2425
|
)
|
|
@@ -2396,10 +2434,10 @@ var CompositionRemoveModule = {
|
|
|
2396
2434
|
command: "remove <id>",
|
|
2397
2435
|
aliases: ["delete", "rm"],
|
|
2398
2436
|
describe: "Delete a composition",
|
|
2399
|
-
builder: (
|
|
2437
|
+
builder: (yargs35) => withConfiguration(
|
|
2400
2438
|
withApiOptions(
|
|
2401
2439
|
withProjectOptions(
|
|
2402
|
-
|
|
2440
|
+
yargs35.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
|
|
2403
2441
|
)
|
|
2404
2442
|
)
|
|
2405
2443
|
),
|
|
@@ -2417,15 +2455,18 @@ var ComponentPatternRemoveModule = {
|
|
|
2417
2455
|
};
|
|
2418
2456
|
|
|
2419
2457
|
// src/commands/canvas/commands/composition/unpublish.ts
|
|
2420
|
-
import {
|
|
2458
|
+
import {
|
|
2459
|
+
CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE2,
|
|
2460
|
+
UncachedCanvasClient as UncachedCanvasClient13
|
|
2461
|
+
} from "@uniformdev/canvas";
|
|
2421
2462
|
import { diffJson as diffJson2 } from "diff";
|
|
2422
2463
|
var CompositionUnpublishModule = {
|
|
2423
2464
|
command: "unpublish [ids]",
|
|
2424
2465
|
describe: "Unpublish a composition(s)",
|
|
2425
|
-
builder: (
|
|
2466
|
+
builder: (yargs35) => withConfiguration(
|
|
2426
2467
|
withApiOptions(
|
|
2427
2468
|
withProjectOptions(
|
|
2428
|
-
|
|
2469
|
+
yargs35.positional("ids", {
|
|
2429
2470
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
2430
2471
|
type: "string"
|
|
2431
2472
|
}).option("all", {
|
|
@@ -2459,6 +2500,7 @@ var CompositionUnpublishModule = {
|
|
|
2459
2500
|
all,
|
|
2460
2501
|
onlyCompositions,
|
|
2461
2502
|
onlyPatterns,
|
|
2503
|
+
patternType,
|
|
2462
2504
|
project: projectId,
|
|
2463
2505
|
whatIf
|
|
2464
2506
|
}) => {
|
|
@@ -2475,14 +2517,16 @@ var CompositionUnpublishModule = {
|
|
|
2475
2517
|
state: "published",
|
|
2476
2518
|
compositionIDs: compositionIDsArray,
|
|
2477
2519
|
onlyCompositions,
|
|
2478
|
-
onlyPatterns
|
|
2520
|
+
onlyPatterns,
|
|
2521
|
+
patternType
|
|
2479
2522
|
});
|
|
2480
2523
|
const target = createComponentInstanceEngineDataSource({
|
|
2481
2524
|
client,
|
|
2482
2525
|
state: "preview",
|
|
2483
2526
|
compositionIDs: compositionIDsArray,
|
|
2484
2527
|
onlyCompositions,
|
|
2485
|
-
onlyPatterns
|
|
2528
|
+
onlyPatterns,
|
|
2529
|
+
patternType
|
|
2486
2530
|
});
|
|
2487
2531
|
const actions = [];
|
|
2488
2532
|
const log = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
|
|
@@ -2517,15 +2561,15 @@ var CompositionUnpublishModule = {
|
|
|
2517
2561
|
var ComponentPatternUnpublishModule = {
|
|
2518
2562
|
command: "unpublish [ids]",
|
|
2519
2563
|
describe: "Unpublish a component pattern(s)",
|
|
2520
|
-
builder: (
|
|
2564
|
+
builder: (yargs35) => withConfiguration(
|
|
2521
2565
|
withApiOptions(
|
|
2522
2566
|
withProjectOptions(
|
|
2523
|
-
|
|
2567
|
+
yargs35.positional("ids", {
|
|
2524
2568
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
2525
2569
|
type: "string"
|
|
2526
2570
|
}).option("all", {
|
|
2527
2571
|
alias: ["a"],
|
|
2528
|
-
describe: "Un-
|
|
2572
|
+
describe: "Un-publishes all compositions. Use compositionId to publish one instead.",
|
|
2529
2573
|
default: false,
|
|
2530
2574
|
type: "boolean"
|
|
2531
2575
|
}).option("what-if", {
|
|
@@ -2534,14 +2578,18 @@ var ComponentPatternUnpublishModule = {
|
|
|
2534
2578
|
default: false,
|
|
2535
2579
|
type: "boolean"
|
|
2536
2580
|
}).option("onlyCompositions", {
|
|
2537
|
-
describe: "Only publishing compositions and not component patterns",
|
|
2581
|
+
describe: "Only un-publishing compositions and not component patterns",
|
|
2538
2582
|
default: false,
|
|
2539
2583
|
type: "boolean"
|
|
2540
2584
|
}).option("onlyPatterns", {
|
|
2541
|
-
describe: "Only
|
|
2585
|
+
describe: "Only un-publishing component patterns and not compositions",
|
|
2542
2586
|
default: true,
|
|
2543
2587
|
type: "boolean",
|
|
2544
2588
|
hidden: true
|
|
2589
|
+
}).option("patternType", {
|
|
2590
|
+
default: "component",
|
|
2591
|
+
choices: ["all", "component", "composition"],
|
|
2592
|
+
hidden: true
|
|
2545
2593
|
})
|
|
2546
2594
|
)
|
|
2547
2595
|
)
|
|
@@ -2555,11 +2603,11 @@ var CompositionUpdateModule = {
|
|
|
2555
2603
|
command: "update <filename>",
|
|
2556
2604
|
aliases: ["put"],
|
|
2557
2605
|
describe: "Insert or update a composition",
|
|
2558
|
-
builder: (
|
|
2606
|
+
builder: (yargs35) => withConfiguration(
|
|
2559
2607
|
withApiOptions(
|
|
2560
2608
|
withProjectOptions(
|
|
2561
2609
|
withStateOptions(
|
|
2562
|
-
|
|
2610
|
+
yargs35.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
|
|
2563
2611
|
)
|
|
2564
2612
|
)
|
|
2565
2613
|
)
|
|
@@ -2581,9 +2629,8 @@ var ComponentPatternUpdateModule = {
|
|
|
2581
2629
|
// src/commands/canvas/commands/componentPattern.ts
|
|
2582
2630
|
var ComponentPatternModule = {
|
|
2583
2631
|
command: "component-pattern <command>",
|
|
2584
|
-
aliases: ["pattern"],
|
|
2585
2632
|
describe: "Commands for Canvas component patterns",
|
|
2586
|
-
builder: (
|
|
2633
|
+
builder: (yargs35) => yargs35.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
|
|
2587
2634
|
handler: () => {
|
|
2588
2635
|
yargs4.help();
|
|
2589
2636
|
}
|
|
@@ -2595,26 +2642,277 @@ var CompositionModule = {
|
|
|
2595
2642
|
command: "composition <command>",
|
|
2596
2643
|
describe: "Commands for Canvas compositions",
|
|
2597
2644
|
aliases: ["comp"],
|
|
2598
|
-
builder: (
|
|
2645
|
+
builder: (yargs35) => yargs35.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
|
|
2599
2646
|
handler: () => {
|
|
2600
2647
|
yargs5.help();
|
|
2601
2648
|
}
|
|
2602
2649
|
};
|
|
2603
2650
|
|
|
2604
|
-
// src/commands/canvas/commands/
|
|
2651
|
+
// src/commands/canvas/commands/compositionPattern.ts
|
|
2605
2652
|
import yargs6 from "yargs";
|
|
2606
2653
|
|
|
2654
|
+
// src/commands/canvas/commands/compositionPattern/get.ts
|
|
2655
|
+
var CompositionPatternGetModule = {
|
|
2656
|
+
...CompositionGetModule,
|
|
2657
|
+
describe: "Fetch a composition pattern"
|
|
2658
|
+
};
|
|
2659
|
+
|
|
2660
|
+
// src/commands/canvas/commands/compositionPattern/list.ts
|
|
2661
|
+
var CompositionPatternListModule = {
|
|
2662
|
+
...CompositionListModule,
|
|
2663
|
+
describe: "List composition patterns",
|
|
2664
|
+
builder: (yargs35) => withFormatOptions(
|
|
2665
|
+
withConfiguration(
|
|
2666
|
+
withApiOptions(
|
|
2667
|
+
withProjectOptions(
|
|
2668
|
+
withStateOptions(
|
|
2669
|
+
yargs35.options({
|
|
2670
|
+
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
2671
|
+
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
2672
|
+
resolvePatterns: {
|
|
2673
|
+
type: "boolean",
|
|
2674
|
+
default: false,
|
|
2675
|
+
describe: "Resolve composition pattern references in the composition"
|
|
2676
|
+
},
|
|
2677
|
+
resolveOverrides: {
|
|
2678
|
+
type: "boolean",
|
|
2679
|
+
default: false,
|
|
2680
|
+
describe: "Resolves composition pattern overrides in the composition and removes override definition data"
|
|
2681
|
+
},
|
|
2682
|
+
onlyPatterns: {
|
|
2683
|
+
describe: "Only pulling composition patterns and not compositions",
|
|
2684
|
+
// This default differentiate this list command from composition list command
|
|
2685
|
+
default: true,
|
|
2686
|
+
type: "boolean",
|
|
2687
|
+
hidden: true
|
|
2688
|
+
},
|
|
2689
|
+
patternType: {
|
|
2690
|
+
default: "composition",
|
|
2691
|
+
choices: ["all", "component", "composition"],
|
|
2692
|
+
hidden: true
|
|
2693
|
+
},
|
|
2694
|
+
componentIDs: {
|
|
2695
|
+
alias: ["componentIDs"],
|
|
2696
|
+
type: "boolean",
|
|
2697
|
+
default: false,
|
|
2698
|
+
describe: "Include individual composition pattern UIDs"
|
|
2699
|
+
}
|
|
2700
|
+
})
|
|
2701
|
+
)
|
|
2702
|
+
)
|
|
2703
|
+
)
|
|
2704
|
+
)
|
|
2705
|
+
)
|
|
2706
|
+
};
|
|
2707
|
+
|
|
2708
|
+
// src/commands/canvas/commands/compositionPattern/publish.ts
|
|
2709
|
+
var CompositionPatternPublishModule = {
|
|
2710
|
+
...CompositionPublishModule,
|
|
2711
|
+
describe: "Publishes composition pattern(s)",
|
|
2712
|
+
builder: (yargs35) => withConfiguration(
|
|
2713
|
+
withApiOptions(
|
|
2714
|
+
withProjectOptions(
|
|
2715
|
+
withDiffOptions(
|
|
2716
|
+
yargs35.positional("ids", {
|
|
2717
|
+
describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
2718
|
+
type: "string"
|
|
2719
|
+
}).option("all", {
|
|
2720
|
+
alias: ["a"],
|
|
2721
|
+
describe: "Publishes all composition patterns. Use compositionId to publish one instead.",
|
|
2722
|
+
default: false,
|
|
2723
|
+
type: "boolean"
|
|
2724
|
+
}).option("what-if", {
|
|
2725
|
+
alias: ["w"],
|
|
2726
|
+
describe: "What-if mode reports what would be done but does not perform any un-publishing",
|
|
2727
|
+
default: false,
|
|
2728
|
+
type: "boolean"
|
|
2729
|
+
}).option("publishingState", {
|
|
2730
|
+
describe: 'Publishing state to update to. Can be "published" or "preview".',
|
|
2731
|
+
default: "published",
|
|
2732
|
+
type: "string",
|
|
2733
|
+
hidden: true
|
|
2734
|
+
}).option("onlyCompositions", {
|
|
2735
|
+
describe: "Only publishing compositions and not composition patterns",
|
|
2736
|
+
default: false,
|
|
2737
|
+
type: "boolean",
|
|
2738
|
+
hidden: true
|
|
2739
|
+
}).option("patternType", {
|
|
2740
|
+
default: "composition",
|
|
2741
|
+
choices: ["all", "component", "composition"],
|
|
2742
|
+
hidden: true
|
|
2743
|
+
}).option("onlyPatterns", {
|
|
2744
|
+
describe: "Only pulling composition patterns and not compositions",
|
|
2745
|
+
default: true,
|
|
2746
|
+
type: "boolean",
|
|
2747
|
+
hidden: true
|
|
2748
|
+
})
|
|
2749
|
+
)
|
|
2750
|
+
)
|
|
2751
|
+
)
|
|
2752
|
+
)
|
|
2753
|
+
};
|
|
2754
|
+
|
|
2755
|
+
// src/commands/canvas/commands/compositionPattern/pull.ts
|
|
2756
|
+
var CompositionPatternPullModule = {
|
|
2757
|
+
...CompositionPullModule,
|
|
2758
|
+
describe: "Pulls all composition patterns to local files in a directory",
|
|
2759
|
+
builder: (yargs35) => withConfiguration(
|
|
2760
|
+
withApiOptions(
|
|
2761
|
+
withProjectOptions(
|
|
2762
|
+
withStateOptions(
|
|
2763
|
+
withDiffOptions(
|
|
2764
|
+
yargs35.positional("directory", {
|
|
2765
|
+
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.",
|
|
2766
|
+
type: "string"
|
|
2767
|
+
}).option("format", {
|
|
2768
|
+
alias: ["f"],
|
|
2769
|
+
describe: "Output format",
|
|
2770
|
+
default: "yaml",
|
|
2771
|
+
choices: ["yaml", "json"],
|
|
2772
|
+
type: "string"
|
|
2773
|
+
}).option("onlyPatterns", {
|
|
2774
|
+
describe: "Only pulling composition patterns and not compositions",
|
|
2775
|
+
// This default differentiates this list command from composition list command
|
|
2776
|
+
default: true,
|
|
2777
|
+
type: "boolean",
|
|
2778
|
+
hidden: true
|
|
2779
|
+
}).option("patternType", {
|
|
2780
|
+
default: "composition",
|
|
2781
|
+
choices: ["all", "component", "composition"],
|
|
2782
|
+
hidden: true
|
|
2783
|
+
}).option("what-if", {
|
|
2784
|
+
alias: ["w"],
|
|
2785
|
+
describe: "What-if mode reports what would be done but changes no files",
|
|
2786
|
+
default: false,
|
|
2787
|
+
type: "boolean"
|
|
2788
|
+
}).option("mode", {
|
|
2789
|
+
alias: ["m"],
|
|
2790
|
+
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',
|
|
2791
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
2792
|
+
default: "mirror",
|
|
2793
|
+
type: "string"
|
|
2794
|
+
})
|
|
2795
|
+
)
|
|
2796
|
+
)
|
|
2797
|
+
)
|
|
2798
|
+
)
|
|
2799
|
+
)
|
|
2800
|
+
};
|
|
2801
|
+
|
|
2802
|
+
// src/commands/canvas/commands/compositionPattern/push.ts
|
|
2803
|
+
var CompositionPatternPushModule = {
|
|
2804
|
+
...CompositionPushModule,
|
|
2805
|
+
describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
|
|
2806
|
+
builder: (yargs35) => withConfiguration(
|
|
2807
|
+
withApiOptions(
|
|
2808
|
+
withProjectOptions(
|
|
2809
|
+
withStateOptions(
|
|
2810
|
+
withDiffOptions(
|
|
2811
|
+
yargs35.positional("directory", {
|
|
2812
|
+
describe: "Directory to read the compositions patterns from. If a filename is used, a package will be read instead.",
|
|
2813
|
+
type: "string"
|
|
2814
|
+
}).option("what-if", {
|
|
2815
|
+
alias: ["w"],
|
|
2816
|
+
describe: "What-if mode reports what would be done but changes nothing",
|
|
2817
|
+
default: false,
|
|
2818
|
+
type: "boolean"
|
|
2819
|
+
}).option("mode", {
|
|
2820
|
+
alias: ["m"],
|
|
2821
|
+
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',
|
|
2822
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
2823
|
+
default: "mirror",
|
|
2824
|
+
type: "string"
|
|
2825
|
+
}).option("onlyPatterns", {
|
|
2826
|
+
describe: "Only pulling composition patterns and not compositions",
|
|
2827
|
+
// This default differentiate this list command from composition list command
|
|
2828
|
+
default: true,
|
|
2829
|
+
type: "boolean",
|
|
2830
|
+
hidden: true
|
|
2831
|
+
}).option("patternType", {
|
|
2832
|
+
default: "composition",
|
|
2833
|
+
choices: ["all", "component", "composition"],
|
|
2834
|
+
hidden: true
|
|
2835
|
+
})
|
|
2836
|
+
)
|
|
2837
|
+
)
|
|
2838
|
+
)
|
|
2839
|
+
)
|
|
2840
|
+
)
|
|
2841
|
+
};
|
|
2842
|
+
|
|
2843
|
+
// src/commands/canvas/commands/compositionPattern/remove.ts
|
|
2844
|
+
var CompositionPatternRemoveModule = {
|
|
2845
|
+
...CompositionRemoveModule,
|
|
2846
|
+
describe: "Delete a composition pattern"
|
|
2847
|
+
};
|
|
2848
|
+
|
|
2849
|
+
// src/commands/canvas/commands/compositionPattern/unpublish.ts
|
|
2850
|
+
var CompositionPatternUnpublishModule = {
|
|
2851
|
+
command: "unpublish [ids]",
|
|
2852
|
+
describe: "Unpublish a composition pattern(s)",
|
|
2853
|
+
builder: (yargs35) => withConfiguration(
|
|
2854
|
+
withApiOptions(
|
|
2855
|
+
withProjectOptions(
|
|
2856
|
+
yargs35.positional("ids", {
|
|
2857
|
+
describe: "Un-publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
2858
|
+
type: "string"
|
|
2859
|
+
}).option("all", {
|
|
2860
|
+
alias: ["a"],
|
|
2861
|
+
describe: "Un-publishes all compositions. Use compositionId to publish one instead.",
|
|
2862
|
+
default: false,
|
|
2863
|
+
type: "boolean"
|
|
2864
|
+
}).option("what-if", {
|
|
2865
|
+
alias: ["w"],
|
|
2866
|
+
describe: "What-if mode reports what would be done but does not perform any publishing",
|
|
2867
|
+
default: false,
|
|
2868
|
+
type: "boolean"
|
|
2869
|
+
}).option("onlyCompositions", {
|
|
2870
|
+
describe: "Only un-publishing compositions and not composition patterns",
|
|
2871
|
+
default: false,
|
|
2872
|
+
type: "boolean",
|
|
2873
|
+
hidden: true
|
|
2874
|
+
}).option("onlyPatterns", {
|
|
2875
|
+
describe: "Only un-publishing composition patterns and not compositions",
|
|
2876
|
+
default: true,
|
|
2877
|
+
type: "boolean",
|
|
2878
|
+
hidden: true
|
|
2879
|
+
})
|
|
2880
|
+
)
|
|
2881
|
+
)
|
|
2882
|
+
),
|
|
2883
|
+
handler: CompositionUnpublishModule.handler
|
|
2884
|
+
};
|
|
2885
|
+
|
|
2886
|
+
// src/commands/canvas/commands/compositionPattern/update.ts
|
|
2887
|
+
var CompositionPatternUpdateModule = {
|
|
2888
|
+
...CompositionUpdateModule,
|
|
2889
|
+
describe: "Insert or update a composition pattern"
|
|
2890
|
+
};
|
|
2891
|
+
|
|
2892
|
+
// src/commands/canvas/commands/compositionPattern.ts
|
|
2893
|
+
var CompositionPatternModule = {
|
|
2894
|
+
command: "composition-pattern <command>",
|
|
2895
|
+
describe: "Commands for Canvas composition patterns",
|
|
2896
|
+
builder: (yargs35) => yargs35.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
|
|
2897
|
+
handler: () => {
|
|
2898
|
+
yargs6.help();
|
|
2899
|
+
}
|
|
2900
|
+
};
|
|
2901
|
+
|
|
2902
|
+
// src/commands/canvas/commands/contentType.ts
|
|
2903
|
+
import yargs7 from "yargs";
|
|
2904
|
+
|
|
2607
2905
|
// src/commands/canvas/commands/contentType/get.ts
|
|
2608
2906
|
import { ContentClient } from "@uniformdev/canvas";
|
|
2609
2907
|
var ContentTypeGetModule = {
|
|
2610
2908
|
command: "get <id>",
|
|
2611
2909
|
describe: "Get a content type",
|
|
2612
|
-
builder: (
|
|
2910
|
+
builder: (yargs35) => withConfiguration(
|
|
2613
2911
|
withFormatOptions(
|
|
2614
2912
|
withApiOptions(
|
|
2615
2913
|
withProjectOptions(
|
|
2616
2914
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2617
|
-
|
|
2915
|
+
yargs35.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
|
|
2618
2916
|
)
|
|
2619
2917
|
)
|
|
2620
2918
|
)
|
|
@@ -2636,7 +2934,7 @@ import { ContentClient as ContentClient2 } from "@uniformdev/canvas";
|
|
|
2636
2934
|
var ContentTypeListModule = {
|
|
2637
2935
|
command: "list",
|
|
2638
2936
|
describe: "List content types",
|
|
2639
|
-
builder: (
|
|
2937
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
2640
2938
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
2641
2939
|
const fetch3 = nodeFetchProxy(proxy);
|
|
2642
2940
|
const client = new ContentClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
@@ -2684,11 +2982,11 @@ function createContentTypeEngineDataSource({
|
|
|
2684
2982
|
var ContentTypePullModule = {
|
|
2685
2983
|
command: "pull <directory>",
|
|
2686
2984
|
describe: "Pulls all content types to local files in a directory",
|
|
2687
|
-
builder: (
|
|
2985
|
+
builder: (yargs35) => withConfiguration(
|
|
2688
2986
|
withApiOptions(
|
|
2689
2987
|
withProjectOptions(
|
|
2690
2988
|
withDiffOptions(
|
|
2691
|
-
|
|
2989
|
+
yargs35.positional("directory", {
|
|
2692
2990
|
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.",
|
|
2693
2991
|
type: "string"
|
|
2694
2992
|
}).option("format", {
|
|
@@ -2772,11 +3070,11 @@ import { ContentClient as ContentClient4 } from "@uniformdev/canvas";
|
|
|
2772
3070
|
var ContentTypePushModule = {
|
|
2773
3071
|
command: "push <directory>",
|
|
2774
3072
|
describe: "Pushes all content types from files in a directory to Uniform",
|
|
2775
|
-
builder: (
|
|
3073
|
+
builder: (yargs35) => withConfiguration(
|
|
2776
3074
|
withApiOptions(
|
|
2777
3075
|
withProjectOptions(
|
|
2778
3076
|
withDiffOptions(
|
|
2779
|
-
|
|
3077
|
+
yargs35.positional("directory", {
|
|
2780
3078
|
describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
|
|
2781
3079
|
type: "string"
|
|
2782
3080
|
}).option("what-if", {
|
|
@@ -2849,10 +3147,10 @@ var ContentTypeRemoveModule = {
|
|
|
2849
3147
|
command: "remove <id>",
|
|
2850
3148
|
aliases: ["delete", "rm"],
|
|
2851
3149
|
describe: "Delete a content type",
|
|
2852
|
-
builder: (
|
|
3150
|
+
builder: (yargs35) => withConfiguration(
|
|
2853
3151
|
withApiOptions(
|
|
2854
3152
|
withProjectOptions(
|
|
2855
|
-
|
|
3153
|
+
yargs35.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
|
|
2856
3154
|
)
|
|
2857
3155
|
)
|
|
2858
3156
|
),
|
|
@@ -2869,10 +3167,10 @@ var ContentTypeUpdateModule = {
|
|
|
2869
3167
|
command: "update <filename>",
|
|
2870
3168
|
aliases: ["put"],
|
|
2871
3169
|
describe: "Insert or update a content type",
|
|
2872
|
-
builder: (
|
|
3170
|
+
builder: (yargs35) => withConfiguration(
|
|
2873
3171
|
withApiOptions(
|
|
2874
3172
|
withProjectOptions(
|
|
2875
|
-
|
|
3173
|
+
yargs35.positional("filename", { demandOption: true, describe: "Content type file to put" })
|
|
2876
3174
|
)
|
|
2877
3175
|
)
|
|
2878
3176
|
),
|
|
@@ -2889,25 +3187,25 @@ var ContentTypeModule = {
|
|
|
2889
3187
|
command: "contenttype <command>",
|
|
2890
3188
|
aliases: ["ct"],
|
|
2891
3189
|
describe: "Commands for Content Types",
|
|
2892
|
-
builder: (
|
|
3190
|
+
builder: (yargs35) => yargs35.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
|
|
2893
3191
|
handler: () => {
|
|
2894
|
-
|
|
3192
|
+
yargs7.help();
|
|
2895
3193
|
}
|
|
2896
3194
|
};
|
|
2897
3195
|
|
|
2898
3196
|
// src/commands/canvas/commands/dataSource.ts
|
|
2899
|
-
import
|
|
3197
|
+
import yargs8 from "yargs";
|
|
2900
3198
|
|
|
2901
3199
|
// src/commands/canvas/commands/dataSource/get.ts
|
|
2902
3200
|
import { DataSourceClient } from "@uniformdev/canvas";
|
|
2903
3201
|
var DataSourceGetModule = {
|
|
2904
3202
|
command: "get <id>",
|
|
2905
3203
|
describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
|
|
2906
|
-
builder: (
|
|
3204
|
+
builder: (yargs35) => withConfiguration(
|
|
2907
3205
|
withApiOptions(
|
|
2908
3206
|
withProjectOptions(
|
|
2909
3207
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2910
|
-
|
|
3208
|
+
yargs35.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
|
|
2911
3209
|
)
|
|
2912
3210
|
)
|
|
2913
3211
|
),
|
|
@@ -2925,10 +3223,10 @@ var DataSourceRemoveModule = {
|
|
|
2925
3223
|
command: "remove <id>",
|
|
2926
3224
|
aliases: ["delete", "rm"],
|
|
2927
3225
|
describe: "Delete a data source",
|
|
2928
|
-
builder: (
|
|
3226
|
+
builder: (yargs35) => withConfiguration(
|
|
2929
3227
|
withApiOptions(
|
|
2930
3228
|
withProjectOptions(
|
|
2931
|
-
|
|
3229
|
+
yargs35.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
|
|
2932
3230
|
)
|
|
2933
3231
|
)
|
|
2934
3232
|
),
|
|
@@ -2945,10 +3243,10 @@ var DataSourceUpdateModule = {
|
|
|
2945
3243
|
command: "update <dataSource>",
|
|
2946
3244
|
aliases: ["put"],
|
|
2947
3245
|
describe: "Insert or update a data source",
|
|
2948
|
-
builder: (
|
|
3246
|
+
builder: (yargs35) => withConfiguration(
|
|
2949
3247
|
withApiOptions(
|
|
2950
3248
|
withProjectOptions(
|
|
2951
|
-
|
|
3249
|
+
yargs35.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
|
|
2952
3250
|
describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
|
|
2953
3251
|
type: "string",
|
|
2954
3252
|
demandOption: true
|
|
@@ -2968,14 +3266,14 @@ var DataSourceModule = {
|
|
|
2968
3266
|
command: "datasource <command>",
|
|
2969
3267
|
aliases: ["ds"],
|
|
2970
3268
|
describe: "Commands for Data Source definitions",
|
|
2971
|
-
builder: (
|
|
3269
|
+
builder: (yargs35) => yargs35.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
|
|
2972
3270
|
handler: () => {
|
|
2973
|
-
|
|
3271
|
+
yargs8.help();
|
|
2974
3272
|
}
|
|
2975
3273
|
};
|
|
2976
3274
|
|
|
2977
3275
|
// src/commands/canvas/commands/dataType.ts
|
|
2978
|
-
import
|
|
3276
|
+
import yargs9 from "yargs";
|
|
2979
3277
|
|
|
2980
3278
|
// src/commands/canvas/commands/dataType/get.ts
|
|
2981
3279
|
import { DataTypeClient } from "@uniformdev/canvas";
|
|
@@ -2983,12 +3281,12 @@ var DataTypeGetModule = {
|
|
|
2983
3281
|
command: "get <id>",
|
|
2984
3282
|
describe: "Get a data type",
|
|
2985
3283
|
aliases: ["ls"],
|
|
2986
|
-
builder: (
|
|
3284
|
+
builder: (yargs35) => withConfiguration(
|
|
2987
3285
|
withFormatOptions(
|
|
2988
3286
|
withApiOptions(
|
|
2989
3287
|
withProjectOptions(
|
|
2990
3288
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2991
|
-
|
|
3289
|
+
yargs35.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
|
|
2992
3290
|
)
|
|
2993
3291
|
)
|
|
2994
3292
|
)
|
|
@@ -3011,7 +3309,7 @@ var DataTypeListModule = {
|
|
|
3011
3309
|
command: "list",
|
|
3012
3310
|
describe: "List data types",
|
|
3013
3311
|
aliases: ["ls"],
|
|
3014
|
-
builder: (
|
|
3312
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
3015
3313
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
3016
3314
|
const fetch3 = nodeFetchProxy(proxy);
|
|
3017
3315
|
const client = new DataTypeClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
@@ -3061,11 +3359,11 @@ function createDataTypeEngineDataSource({
|
|
|
3061
3359
|
var DataTypePullModule = {
|
|
3062
3360
|
command: "pull <directory>",
|
|
3063
3361
|
describe: "Pulls all data types to local files in a directory",
|
|
3064
|
-
builder: (
|
|
3362
|
+
builder: (yargs35) => withConfiguration(
|
|
3065
3363
|
withApiOptions(
|
|
3066
3364
|
withProjectOptions(
|
|
3067
3365
|
withDiffOptions(
|
|
3068
|
-
|
|
3366
|
+
yargs35.positional("directory", {
|
|
3069
3367
|
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.",
|
|
3070
3368
|
type: "string"
|
|
3071
3369
|
}).option("format", {
|
|
@@ -3149,11 +3447,11 @@ import { DataTypeClient as DataTypeClient4 } from "@uniformdev/canvas";
|
|
|
3149
3447
|
var DataTypePushModule = {
|
|
3150
3448
|
command: "push <directory>",
|
|
3151
3449
|
describe: "Pushes all data types from files in a directory to Uniform",
|
|
3152
|
-
builder: (
|
|
3450
|
+
builder: (yargs35) => withConfiguration(
|
|
3153
3451
|
withApiOptions(
|
|
3154
3452
|
withProjectOptions(
|
|
3155
3453
|
withDiffOptions(
|
|
3156
|
-
|
|
3454
|
+
yargs35.positional("directory", {
|
|
3157
3455
|
describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
|
|
3158
3456
|
type: "string"
|
|
3159
3457
|
}).option("what-if", {
|
|
@@ -3226,10 +3524,10 @@ var DataTypeRemoveModule = {
|
|
|
3226
3524
|
command: "remove <id>",
|
|
3227
3525
|
aliases: ["delete", "rm"],
|
|
3228
3526
|
describe: "Delete a data type",
|
|
3229
|
-
builder: (
|
|
3527
|
+
builder: (yargs35) => withConfiguration(
|
|
3230
3528
|
withApiOptions(
|
|
3231
3529
|
withProjectOptions(
|
|
3232
|
-
|
|
3530
|
+
yargs35.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
|
|
3233
3531
|
)
|
|
3234
3532
|
)
|
|
3235
3533
|
),
|
|
@@ -3246,10 +3544,10 @@ var DataTypeUpdateModule = {
|
|
|
3246
3544
|
command: "update <filename>",
|
|
3247
3545
|
aliases: ["put"],
|
|
3248
3546
|
describe: "Insert or update a data type",
|
|
3249
|
-
builder: (
|
|
3547
|
+
builder: (yargs35) => withConfiguration(
|
|
3250
3548
|
withApiOptions(
|
|
3251
3549
|
withProjectOptions(
|
|
3252
|
-
|
|
3550
|
+
yargs35.positional("filename", { demandOption: true, describe: "Data type file to put" })
|
|
3253
3551
|
)
|
|
3254
3552
|
)
|
|
3255
3553
|
),
|
|
@@ -3266,27 +3564,27 @@ var DataTypeModule = {
|
|
|
3266
3564
|
command: "datatype <command>",
|
|
3267
3565
|
aliases: ["dt"],
|
|
3268
3566
|
describe: "Commands for Data Type definitions",
|
|
3269
|
-
builder: (
|
|
3567
|
+
builder: (yargs35) => yargs35.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
|
|
3270
3568
|
handler: () => {
|
|
3271
|
-
|
|
3569
|
+
yargs9.help();
|
|
3272
3570
|
}
|
|
3273
3571
|
};
|
|
3274
3572
|
|
|
3275
3573
|
// src/commands/canvas/commands/entry.ts
|
|
3276
|
-
import
|
|
3574
|
+
import yargs10 from "yargs";
|
|
3277
3575
|
|
|
3278
3576
|
// src/commands/canvas/commands/entry/get.ts
|
|
3279
3577
|
import { ContentClient as ContentClient7 } from "@uniformdev/canvas";
|
|
3280
3578
|
var EntryGetModule = {
|
|
3281
3579
|
command: "get <id>",
|
|
3282
3580
|
describe: "Get an entry",
|
|
3283
|
-
builder: (
|
|
3581
|
+
builder: (yargs35) => withConfiguration(
|
|
3284
3582
|
withFormatOptions(
|
|
3285
3583
|
withApiOptions(
|
|
3286
3584
|
withProjectOptions(
|
|
3287
3585
|
withStateOptions(
|
|
3288
3586
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3289
|
-
|
|
3587
|
+
yargs35.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }),
|
|
3290
3588
|
// for backwards compatibility, we default to the "published" state, unlike compositions
|
|
3291
3589
|
"published"
|
|
3292
3590
|
)
|
|
@@ -3329,12 +3627,12 @@ var LEGACY_DEFAULT_LIMIT = 1e3;
|
|
|
3329
3627
|
var EntryListModule = {
|
|
3330
3628
|
command: "list",
|
|
3331
3629
|
describe: "List entries",
|
|
3332
|
-
builder: (
|
|
3630
|
+
builder: (yargs35) => withConfiguration(
|
|
3333
3631
|
withFormatOptions(
|
|
3334
3632
|
withApiOptions(
|
|
3335
3633
|
withProjectOptions(
|
|
3336
3634
|
withStateOptions(
|
|
3337
|
-
|
|
3635
|
+
yargs35.options({
|
|
3338
3636
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3339
3637
|
limit: { describe: "Number of rows to fetch", type: "number", default: LEGACY_DEFAULT_LIMIT },
|
|
3340
3638
|
search: { describe: "Search query", type: "string", default: "" }
|
|
@@ -3435,11 +3733,11 @@ function createEntryEngineDataSource({
|
|
|
3435
3733
|
var EntryPublishModule = {
|
|
3436
3734
|
command: "publish [ids]",
|
|
3437
3735
|
describe: "Publishes entry(ies)",
|
|
3438
|
-
builder: (
|
|
3736
|
+
builder: (yargs35) => withConfiguration(
|
|
3439
3737
|
withApiOptions(
|
|
3440
3738
|
withProjectOptions(
|
|
3441
3739
|
withDiffOptions(
|
|
3442
|
-
|
|
3740
|
+
yargs35.positional("ids", {
|
|
3443
3741
|
describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
3444
3742
|
type: "string"
|
|
3445
3743
|
}).option("all", {
|
|
@@ -3494,12 +3792,12 @@ import { UncachedFileClient as UncachedFileClient5 } from "@uniformdev/files";
|
|
|
3494
3792
|
var EntryPullModule = {
|
|
3495
3793
|
command: "pull <directory>",
|
|
3496
3794
|
describe: "Pulls all entries to local files in a directory",
|
|
3497
|
-
builder: (
|
|
3795
|
+
builder: (yargs35) => withConfiguration(
|
|
3498
3796
|
withApiOptions(
|
|
3499
3797
|
withProjectOptions(
|
|
3500
3798
|
withStateOptions(
|
|
3501
3799
|
withDiffOptions(
|
|
3502
|
-
|
|
3800
|
+
yargs35.positional("directory", {
|
|
3503
3801
|
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.",
|
|
3504
3802
|
type: "string"
|
|
3505
3803
|
}).option("format", {
|
|
@@ -3599,12 +3897,12 @@ import { UncachedFileClient as UncachedFileClient6 } from "@uniformdev/files";
|
|
|
3599
3897
|
var EntryPushModule = {
|
|
3600
3898
|
command: "push <directory>",
|
|
3601
3899
|
describe: "Pushes all entries from files in a directory to Uniform",
|
|
3602
|
-
builder: (
|
|
3900
|
+
builder: (yargs35) => withConfiguration(
|
|
3603
3901
|
withApiOptions(
|
|
3604
3902
|
withProjectOptions(
|
|
3605
3903
|
withStateOptions(
|
|
3606
3904
|
withDiffOptions(
|
|
3607
|
-
|
|
3905
|
+
yargs35.positional("directory", {
|
|
3608
3906
|
describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
|
|
3609
3907
|
type: "string"
|
|
3610
3908
|
}).option("what-if", {
|
|
@@ -3691,10 +3989,10 @@ var EntryRemoveModule = {
|
|
|
3691
3989
|
command: "remove <id>",
|
|
3692
3990
|
aliases: ["delete", "rm"],
|
|
3693
3991
|
describe: "Delete an entry",
|
|
3694
|
-
builder: (
|
|
3992
|
+
builder: (yargs35) => withConfiguration(
|
|
3695
3993
|
withApiOptions(
|
|
3696
3994
|
withProjectOptions(
|
|
3697
|
-
|
|
3995
|
+
yargs35.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
|
|
3698
3996
|
)
|
|
3699
3997
|
)
|
|
3700
3998
|
),
|
|
@@ -3711,10 +4009,10 @@ import { diffJson as diffJson3 } from "diff";
|
|
|
3711
4009
|
var EntryUnpublishModule = {
|
|
3712
4010
|
command: "unpublish [ids]",
|
|
3713
4011
|
describe: "Unpublish an entry(ies)",
|
|
3714
|
-
builder: (
|
|
4012
|
+
builder: (yargs35) => withConfiguration(
|
|
3715
4013
|
withApiOptions(
|
|
3716
4014
|
withProjectOptions(
|
|
3717
|
-
|
|
4015
|
+
yargs35.positional("ids", {
|
|
3718
4016
|
describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
3719
4017
|
type: "string"
|
|
3720
4018
|
}).option("all", {
|
|
@@ -3787,11 +4085,11 @@ var EntryUpdateModule = {
|
|
|
3787
4085
|
command: "update <filename>",
|
|
3788
4086
|
aliases: ["put"],
|
|
3789
4087
|
describe: "Insert or update an entry",
|
|
3790
|
-
builder: (
|
|
4088
|
+
builder: (yargs35) => withConfiguration(
|
|
3791
4089
|
withApiOptions(
|
|
3792
4090
|
withProjectOptions(
|
|
3793
4091
|
withStateOptions(
|
|
3794
|
-
|
|
4092
|
+
yargs35.positional("filename", { demandOption: true, describe: "Entry file to put" })
|
|
3795
4093
|
)
|
|
3796
4094
|
)
|
|
3797
4095
|
)
|
|
@@ -3808,27 +4106,27 @@ var EntryUpdateModule = {
|
|
|
3808
4106
|
var EntryModule = {
|
|
3809
4107
|
command: "entry <command>",
|
|
3810
4108
|
describe: "Commands for Entries",
|
|
3811
|
-
builder: (
|
|
4109
|
+
builder: (yargs35) => yargs35.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
|
|
3812
4110
|
handler: () => {
|
|
3813
|
-
|
|
4111
|
+
yargs10.help();
|
|
3814
4112
|
}
|
|
3815
4113
|
};
|
|
3816
4114
|
|
|
3817
4115
|
// src/commands/canvas/commands/entryPattern.ts
|
|
3818
|
-
import
|
|
4116
|
+
import yargs11 from "yargs";
|
|
3819
4117
|
|
|
3820
4118
|
// src/commands/canvas/commands/entryPattern/get.ts
|
|
3821
4119
|
import { ContentClient as ContentClient16 } from "@uniformdev/canvas";
|
|
3822
4120
|
var EntryPatternGetModule = {
|
|
3823
4121
|
command: "get <id>",
|
|
3824
4122
|
describe: "Get an entry pattern",
|
|
3825
|
-
builder: (
|
|
4123
|
+
builder: (yargs35) => withConfiguration(
|
|
3826
4124
|
withFormatOptions(
|
|
3827
4125
|
withApiOptions(
|
|
3828
4126
|
withProjectOptions(
|
|
3829
4127
|
withStateOptions(
|
|
3830
4128
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3831
|
-
|
|
4129
|
+
yargs35.positional("id", {
|
|
3832
4130
|
demandOption: true,
|
|
3833
4131
|
describe: "Entry pattern public ID to fetch"
|
|
3834
4132
|
}),
|
|
@@ -3863,8 +4161,8 @@ import { ContentClient as ContentClient17 } from "@uniformdev/canvas";
|
|
|
3863
4161
|
var EntryPatternListModule = {
|
|
3864
4162
|
command: "list",
|
|
3865
4163
|
describe: "List entry patterns",
|
|
3866
|
-
builder: (
|
|
3867
|
-
withFormatOptions(withApiOptions(withProjectOptions(withStateOptions(
|
|
4164
|
+
builder: (yargs35) => withConfiguration(
|
|
4165
|
+
withFormatOptions(withApiOptions(withProjectOptions(withStateOptions(yargs35, "published"))))
|
|
3868
4166
|
),
|
|
3869
4167
|
handler: async ({ apiHost, edgeApiHost, apiKey, proxy, format, filename, project: projectId, state }) => {
|
|
3870
4168
|
const fetch3 = nodeFetchProxy(proxy);
|
|
@@ -3887,11 +4185,11 @@ import { ContentClient as ContentClient18 } from "@uniformdev/canvas";
|
|
|
3887
4185
|
var EntryPatternPublishModule = {
|
|
3888
4186
|
command: "publish [ids]",
|
|
3889
4187
|
describe: "Publishes entry pattern(s)",
|
|
3890
|
-
builder: (
|
|
4188
|
+
builder: (yargs35) => withConfiguration(
|
|
3891
4189
|
withApiOptions(
|
|
3892
4190
|
withProjectOptions(
|
|
3893
4191
|
withDiffOptions(
|
|
3894
|
-
|
|
4192
|
+
yargs35.positional("ids", {
|
|
3895
4193
|
describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
3896
4194
|
type: "string"
|
|
3897
4195
|
}).option("all", {
|
|
@@ -3946,12 +4244,12 @@ import { UncachedFileClient as UncachedFileClient7 } from "@uniformdev/files";
|
|
|
3946
4244
|
var EntryPatternPullModule = {
|
|
3947
4245
|
command: "pull <directory>",
|
|
3948
4246
|
describe: "Pulls all entry patterns to local files in a directory",
|
|
3949
|
-
builder: (
|
|
4247
|
+
builder: (yargs35) => withConfiguration(
|
|
3950
4248
|
withApiOptions(
|
|
3951
4249
|
withProjectOptions(
|
|
3952
4250
|
withStateOptions(
|
|
3953
4251
|
withDiffOptions(
|
|
3954
|
-
|
|
4252
|
+
yargs35.positional("directory", {
|
|
3955
4253
|
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.",
|
|
3956
4254
|
type: "string"
|
|
3957
4255
|
}).option("format", {
|
|
@@ -4051,12 +4349,12 @@ import { UncachedFileClient as UncachedFileClient8 } from "@uniformdev/files";
|
|
|
4051
4349
|
var EntryPatternPushModule = {
|
|
4052
4350
|
command: "push <directory>",
|
|
4053
4351
|
describe: "Pushes all entry patterns from files in a directory to Uniform",
|
|
4054
|
-
builder: (
|
|
4352
|
+
builder: (yargs35) => withConfiguration(
|
|
4055
4353
|
withApiOptions(
|
|
4056
4354
|
withProjectOptions(
|
|
4057
4355
|
withStateOptions(
|
|
4058
4356
|
withDiffOptions(
|
|
4059
|
-
|
|
4357
|
+
yargs35.positional("directory", {
|
|
4060
4358
|
describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
|
|
4061
4359
|
type: "string"
|
|
4062
4360
|
}).option("what-if", {
|
|
@@ -4143,10 +4441,10 @@ var EntryPatternRemoveModule = {
|
|
|
4143
4441
|
command: "remove <id>",
|
|
4144
4442
|
aliases: ["delete", "rm"],
|
|
4145
4443
|
describe: "Delete an entry pattern",
|
|
4146
|
-
builder: (
|
|
4444
|
+
builder: (yargs35) => withConfiguration(
|
|
4147
4445
|
withApiOptions(
|
|
4148
4446
|
withProjectOptions(
|
|
4149
|
-
|
|
4447
|
+
yargs35.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
|
|
4150
4448
|
)
|
|
4151
4449
|
)
|
|
4152
4450
|
),
|
|
@@ -4163,10 +4461,10 @@ import { diffJson as diffJson4 } from "diff";
|
|
|
4163
4461
|
var EntryPatternUnpublishModule = {
|
|
4164
4462
|
command: "unpublish [ids]",
|
|
4165
4463
|
describe: "Unpublish an entry patterns",
|
|
4166
|
-
builder: (
|
|
4464
|
+
builder: (yargs35) => withConfiguration(
|
|
4167
4465
|
withApiOptions(
|
|
4168
4466
|
withProjectOptions(
|
|
4169
|
-
|
|
4467
|
+
yargs35.positional("ids", {
|
|
4170
4468
|
describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4171
4469
|
type: "string"
|
|
4172
4470
|
}).option("all", {
|
|
@@ -4239,11 +4537,11 @@ var EntryPatternUpdateModule = {
|
|
|
4239
4537
|
command: "update <filename>",
|
|
4240
4538
|
aliases: ["put"],
|
|
4241
4539
|
describe: "Insert or update an entry pattern",
|
|
4242
|
-
builder: (
|
|
4540
|
+
builder: (yargs35) => withConfiguration(
|
|
4243
4541
|
withApiOptions(
|
|
4244
4542
|
withProjectOptions(
|
|
4245
4543
|
withStateOptions(
|
|
4246
|
-
|
|
4544
|
+
yargs35.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
|
|
4247
4545
|
)
|
|
4248
4546
|
)
|
|
4249
4547
|
)
|
|
@@ -4260,14 +4558,14 @@ var EntryPatternUpdateModule = {
|
|
|
4260
4558
|
var EntryPatternModule = {
|
|
4261
4559
|
command: "entry-pattern <command>",
|
|
4262
4560
|
describe: "Commands for Entry patterns",
|
|
4263
|
-
builder: (
|
|
4561
|
+
builder: (yargs35) => yargs35.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
|
|
4264
4562
|
handler: () => {
|
|
4265
|
-
|
|
4563
|
+
yargs11.help();
|
|
4266
4564
|
}
|
|
4267
4565
|
};
|
|
4268
4566
|
|
|
4269
4567
|
// src/commands/canvas/commands/locale.ts
|
|
4270
|
-
import
|
|
4568
|
+
import yargs12 from "yargs";
|
|
4271
4569
|
|
|
4272
4570
|
// src/commands/canvas/commands/locale/pull.ts
|
|
4273
4571
|
import { LocaleClient } from "@uniformdev/canvas";
|
|
@@ -4306,11 +4604,11 @@ function createLocaleEngineDataSource({
|
|
|
4306
4604
|
var LocalePullModule = {
|
|
4307
4605
|
command: "pull <directory>",
|
|
4308
4606
|
describe: "Pulls all locales to local files in a directory",
|
|
4309
|
-
builder: (
|
|
4607
|
+
builder: (yargs35) => withConfiguration(
|
|
4310
4608
|
withApiOptions(
|
|
4311
4609
|
withProjectOptions(
|
|
4312
4610
|
withDiffOptions(
|
|
4313
|
-
|
|
4611
|
+
yargs35.positional("directory", {
|
|
4314
4612
|
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.",
|
|
4315
4613
|
type: "string"
|
|
4316
4614
|
}).option("format", {
|
|
@@ -4394,11 +4692,11 @@ import { LocaleClient as LocaleClient2 } from "@uniformdev/canvas";
|
|
|
4394
4692
|
var LocalePushModule = {
|
|
4395
4693
|
command: "push <directory>",
|
|
4396
4694
|
describe: "Pushes all locales from files in a directory to Uniform",
|
|
4397
|
-
builder: (
|
|
4695
|
+
builder: (yargs35) => withConfiguration(
|
|
4398
4696
|
withApiOptions(
|
|
4399
4697
|
withProjectOptions(
|
|
4400
4698
|
withDiffOptions(
|
|
4401
|
-
|
|
4699
|
+
yargs35.positional("directory", {
|
|
4402
4700
|
describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
|
|
4403
4701
|
type: "string"
|
|
4404
4702
|
}).option("what-if", {
|
|
@@ -4469,26 +4767,26 @@ var LocalePushModule = {
|
|
|
4469
4767
|
var LocaleModule = {
|
|
4470
4768
|
command: "locale <command>",
|
|
4471
4769
|
describe: "Commands for locale definitions",
|
|
4472
|
-
builder: (
|
|
4770
|
+
builder: (yargs35) => yargs35.command(LocalePullModule).command(LocalePushModule),
|
|
4473
4771
|
handler: () => {
|
|
4474
|
-
|
|
4772
|
+
yargs12.help();
|
|
4475
4773
|
}
|
|
4476
4774
|
};
|
|
4477
4775
|
|
|
4478
4776
|
// src/commands/canvas/commands/prompts.ts
|
|
4479
|
-
import
|
|
4777
|
+
import yargs13 from "yargs";
|
|
4480
4778
|
|
|
4481
4779
|
// src/commands/canvas/commands/prompts/get.ts
|
|
4482
4780
|
import { PromptClient } from "@uniformdev/canvas";
|
|
4483
4781
|
var PromptGetModule = {
|
|
4484
4782
|
command: "get <id>",
|
|
4485
4783
|
describe: "Get a prompt",
|
|
4486
|
-
builder: (
|
|
4784
|
+
builder: (yargs35) => withConfiguration(
|
|
4487
4785
|
withFormatOptions(
|
|
4488
4786
|
withApiOptions(
|
|
4489
4787
|
withProjectOptions(
|
|
4490
4788
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4491
|
-
|
|
4789
|
+
yargs35.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
|
|
4492
4790
|
)
|
|
4493
4791
|
)
|
|
4494
4792
|
)
|
|
@@ -4509,7 +4807,7 @@ import { PromptClient as PromptClient2 } from "@uniformdev/canvas";
|
|
|
4509
4807
|
var PromptListModule = {
|
|
4510
4808
|
command: "list",
|
|
4511
4809
|
describe: "List prompts",
|
|
4512
|
-
builder: (
|
|
4810
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
4513
4811
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
4514
4812
|
const fetch3 = nodeFetchProxy(proxy);
|
|
4515
4813
|
const client = new PromptClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
@@ -4557,12 +4855,12 @@ function createPromptEngineDataSource({
|
|
|
4557
4855
|
var PromptPullModule = {
|
|
4558
4856
|
command: "pull <directory>",
|
|
4559
4857
|
describe: "Pulls all prompts to local files in a directory",
|
|
4560
|
-
builder: (
|
|
4858
|
+
builder: (yargs35) => withConfiguration(
|
|
4561
4859
|
withApiOptions(
|
|
4562
4860
|
withProjectOptions(
|
|
4563
4861
|
withStateOptions(
|
|
4564
4862
|
withDiffOptions(
|
|
4565
|
-
|
|
4863
|
+
yargs35.positional("directory", {
|
|
4566
4864
|
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.",
|
|
4567
4865
|
type: "string"
|
|
4568
4866
|
}).option("format", {
|
|
@@ -4647,12 +4945,12 @@ import { PromptClient as PromptClient4 } from "@uniformdev/canvas";
|
|
|
4647
4945
|
var PromptPushModule = {
|
|
4648
4946
|
command: "push <directory>",
|
|
4649
4947
|
describe: "Pushes all prompts from files in a directory to Uniform",
|
|
4650
|
-
builder: (
|
|
4948
|
+
builder: (yargs35) => withConfiguration(
|
|
4651
4949
|
withApiOptions(
|
|
4652
4950
|
withProjectOptions(
|
|
4653
4951
|
withStateOptions(
|
|
4654
4952
|
withDiffOptions(
|
|
4655
|
-
|
|
4953
|
+
yargs35.positional("directory", {
|
|
4656
4954
|
describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
|
|
4657
4955
|
type: "string"
|
|
4658
4956
|
}).option("what-if", {
|
|
@@ -4726,9 +5024,9 @@ var PromptRemoveModule = {
|
|
|
4726
5024
|
command: "remove <id>",
|
|
4727
5025
|
aliases: ["delete", "rm"],
|
|
4728
5026
|
describe: "Delete a prompt",
|
|
4729
|
-
builder: (
|
|
5027
|
+
builder: (yargs35) => withConfiguration(
|
|
4730
5028
|
withApiOptions(
|
|
4731
|
-
withProjectOptions(
|
|
5029
|
+
withProjectOptions(yargs35.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
|
|
4732
5030
|
)
|
|
4733
5031
|
),
|
|
4734
5032
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -4744,10 +5042,10 @@ var PromptUpdateModule = {
|
|
|
4744
5042
|
command: "update <filename>",
|
|
4745
5043
|
aliases: ["put"],
|
|
4746
5044
|
describe: "Insert or update a prompt",
|
|
4747
|
-
builder: (
|
|
5045
|
+
builder: (yargs35) => withConfiguration(
|
|
4748
5046
|
withApiOptions(
|
|
4749
5047
|
withProjectOptions(
|
|
4750
|
-
|
|
5048
|
+
yargs35.positional("filename", { demandOption: true, describe: "Prompt file to put" })
|
|
4751
5049
|
)
|
|
4752
5050
|
)
|
|
4753
5051
|
),
|
|
@@ -4764,14 +5062,14 @@ var PromptModule = {
|
|
|
4764
5062
|
command: "prompt <command>",
|
|
4765
5063
|
aliases: ["dt"],
|
|
4766
5064
|
describe: "Commands for AI Prompt definitions",
|
|
4767
|
-
builder: (
|
|
5065
|
+
builder: (yargs35) => yargs35.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
|
|
4768
5066
|
handler: () => {
|
|
4769
|
-
|
|
5067
|
+
yargs13.help();
|
|
4770
5068
|
}
|
|
4771
5069
|
};
|
|
4772
5070
|
|
|
4773
5071
|
// src/commands/canvas/commands/workflow.ts
|
|
4774
|
-
import
|
|
5072
|
+
import yargs14 from "yargs";
|
|
4775
5073
|
|
|
4776
5074
|
// src/commands/canvas/commands/workflow/pull.ts
|
|
4777
5075
|
import { WorkflowClient } from "@uniformdev/canvas";
|
|
@@ -4815,11 +5113,11 @@ function createWorkflowEngineDataSource({
|
|
|
4815
5113
|
var WorkflowPullModule = {
|
|
4816
5114
|
command: "pull <directory>",
|
|
4817
5115
|
describe: "Pulls all workflows to local files in a directory",
|
|
4818
|
-
builder: (
|
|
5116
|
+
builder: (yargs35) => withConfiguration(
|
|
4819
5117
|
withApiOptions(
|
|
4820
5118
|
withProjectOptions(
|
|
4821
5119
|
withDiffOptions(
|
|
4822
|
-
|
|
5120
|
+
yargs35.positional("directory", {
|
|
4823
5121
|
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.",
|
|
4824
5122
|
type: "string"
|
|
4825
5123
|
}).option("format", {
|
|
@@ -4897,11 +5195,11 @@ import { WorkflowClient as WorkflowClient2 } from "@uniformdev/canvas";
|
|
|
4897
5195
|
var WorkflowPushModule = {
|
|
4898
5196
|
command: "push <directory>",
|
|
4899
5197
|
describe: "Pushes all workflows from files in a directory to Uniform Canvas",
|
|
4900
|
-
builder: (
|
|
5198
|
+
builder: (yargs35) => withConfiguration(
|
|
4901
5199
|
withApiOptions(
|
|
4902
5200
|
withProjectOptions(
|
|
4903
5201
|
withDiffOptions(
|
|
4904
|
-
|
|
5202
|
+
yargs35.positional("directory", {
|
|
4905
5203
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
4906
5204
|
type: "string"
|
|
4907
5205
|
}).option("what-if", {
|
|
@@ -4967,9 +5265,9 @@ var WorkflowModule = {
|
|
|
4967
5265
|
command: "workflow <command>",
|
|
4968
5266
|
aliases: ["wf"],
|
|
4969
5267
|
describe: "Commands for Canvas workflows",
|
|
4970
|
-
builder: (
|
|
5268
|
+
builder: (yargs35) => yargs35.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
|
|
4971
5269
|
handler: () => {
|
|
4972
|
-
|
|
5270
|
+
yargs14.help();
|
|
4973
5271
|
}
|
|
4974
5272
|
};
|
|
4975
5273
|
|
|
@@ -4978,28 +5276,28 @@ var CanvasCommand = {
|
|
|
4978
5276
|
command: "canvas <command>",
|
|
4979
5277
|
aliases: ["cv", "pm", "presentation"],
|
|
4980
5278
|
describe: "Uniform Canvas commands",
|
|
4981
|
-
builder: (
|
|
5279
|
+
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).demandCommand(),
|
|
4982
5280
|
handler: () => {
|
|
4983
|
-
|
|
5281
|
+
yargs15.showHelp();
|
|
4984
5282
|
}
|
|
4985
5283
|
};
|
|
4986
5284
|
|
|
4987
5285
|
// src/commands/context/index.ts
|
|
4988
|
-
import
|
|
5286
|
+
import yargs22 from "yargs";
|
|
4989
5287
|
|
|
4990
5288
|
// src/commands/context/commands/aggregate.ts
|
|
4991
|
-
import
|
|
5289
|
+
import yargs16 from "yargs";
|
|
4992
5290
|
|
|
4993
5291
|
// src/commands/context/commands/aggregate/get.ts
|
|
4994
5292
|
import { UncachedAggregateClient } from "@uniformdev/context/api";
|
|
4995
5293
|
var AggregateGetModule = {
|
|
4996
5294
|
command: "get <id>",
|
|
4997
5295
|
describe: "Fetch an aggregate",
|
|
4998
|
-
builder: (
|
|
5296
|
+
builder: (yargs35) => withConfiguration(
|
|
4999
5297
|
withFormatOptions(
|
|
5000
5298
|
withApiOptions(
|
|
5001
5299
|
withProjectOptions(
|
|
5002
|
-
|
|
5300
|
+
yargs35.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
|
|
5003
5301
|
)
|
|
5004
5302
|
)
|
|
5005
5303
|
)
|
|
@@ -5023,7 +5321,7 @@ var AggregateListModule = {
|
|
|
5023
5321
|
command: "list",
|
|
5024
5322
|
describe: "List aggregates",
|
|
5025
5323
|
aliases: ["ls"],
|
|
5026
|
-
builder: (
|
|
5324
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
5027
5325
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
5028
5326
|
const fetch3 = nodeFetchProxy(proxy);
|
|
5029
5327
|
const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
@@ -5090,11 +5388,11 @@ function writeContextPackage(filename, packageContents) {
|
|
|
5090
5388
|
var AggregatePullModule = {
|
|
5091
5389
|
command: "pull <directory>",
|
|
5092
5390
|
describe: "Pulls all aggregates to local files in a directory",
|
|
5093
|
-
builder: (
|
|
5391
|
+
builder: (yargs35) => withConfiguration(
|
|
5094
5392
|
withApiOptions(
|
|
5095
5393
|
withProjectOptions(
|
|
5096
5394
|
withDiffOptions(
|
|
5097
|
-
|
|
5395
|
+
yargs35.positional("directory", {
|
|
5098
5396
|
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.",
|
|
5099
5397
|
type: "string"
|
|
5100
5398
|
}).option("format", {
|
|
@@ -5172,11 +5470,11 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
|
|
|
5172
5470
|
var AggregatePushModule = {
|
|
5173
5471
|
command: "push <directory>",
|
|
5174
5472
|
describe: "Pushes all aggregates from files in a directory or package to Uniform",
|
|
5175
|
-
builder: (
|
|
5473
|
+
builder: (yargs35) => withConfiguration(
|
|
5176
5474
|
withApiOptions(
|
|
5177
5475
|
withProjectOptions(
|
|
5178
5476
|
withDiffOptions(
|
|
5179
|
-
|
|
5477
|
+
yargs35.positional("directory", {
|
|
5180
5478
|
describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
|
|
5181
5479
|
type: "string"
|
|
5182
5480
|
}).option("what-if", {
|
|
@@ -5244,10 +5542,10 @@ var AggregateRemoveModule = {
|
|
|
5244
5542
|
command: "remove <id>",
|
|
5245
5543
|
aliases: ["delete", "rm"],
|
|
5246
5544
|
describe: "Delete an aggregate",
|
|
5247
|
-
builder: (
|
|
5545
|
+
builder: (yargs35) => withConfiguration(
|
|
5248
5546
|
withApiOptions(
|
|
5249
5547
|
withProjectOptions(
|
|
5250
|
-
|
|
5548
|
+
yargs35.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
|
|
5251
5549
|
)
|
|
5252
5550
|
)
|
|
5253
5551
|
),
|
|
@@ -5264,10 +5562,10 @@ var AggregateUpdateModule = {
|
|
|
5264
5562
|
command: "update <filename>",
|
|
5265
5563
|
aliases: ["put"],
|
|
5266
5564
|
describe: "Insert or update an aggregate",
|
|
5267
|
-
builder: (
|
|
5565
|
+
builder: (yargs35) => withConfiguration(
|
|
5268
5566
|
withApiOptions(
|
|
5269
5567
|
withProjectOptions(
|
|
5270
|
-
|
|
5568
|
+
yargs35.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
|
|
5271
5569
|
)
|
|
5272
5570
|
)
|
|
5273
5571
|
),
|
|
@@ -5284,25 +5582,25 @@ var AggregateModule = {
|
|
|
5284
5582
|
command: "aggregate <command>",
|
|
5285
5583
|
aliases: ["agg", "intent", "audience"],
|
|
5286
5584
|
describe: "Commands for Context aggregates (intents, audiences)",
|
|
5287
|
-
builder: (
|
|
5585
|
+
builder: (yargs35) => yargs35.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
|
|
5288
5586
|
handler: () => {
|
|
5289
|
-
|
|
5587
|
+
yargs16.help();
|
|
5290
5588
|
}
|
|
5291
5589
|
};
|
|
5292
5590
|
|
|
5293
5591
|
// src/commands/context/commands/enrichment.ts
|
|
5294
|
-
import
|
|
5592
|
+
import yargs17 from "yargs";
|
|
5295
5593
|
|
|
5296
5594
|
// src/commands/context/commands/enrichment/get.ts
|
|
5297
5595
|
import { UncachedEnrichmentClient } from "@uniformdev/context/api";
|
|
5298
5596
|
var EnrichmentGetModule = {
|
|
5299
5597
|
command: "get <id>",
|
|
5300
5598
|
describe: "Fetch an enrichment category and its values",
|
|
5301
|
-
builder: (
|
|
5599
|
+
builder: (yargs35) => withFormatOptions(
|
|
5302
5600
|
withConfiguration(
|
|
5303
5601
|
withApiOptions(
|
|
5304
5602
|
withProjectOptions(
|
|
5305
|
-
|
|
5603
|
+
yargs35.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
|
|
5306
5604
|
)
|
|
5307
5605
|
)
|
|
5308
5606
|
)
|
|
@@ -5326,7 +5624,7 @@ var EnrichmentListModule = {
|
|
|
5326
5624
|
command: "list",
|
|
5327
5625
|
describe: "List enrichments",
|
|
5328
5626
|
aliases: ["ls"],
|
|
5329
|
-
builder: (
|
|
5627
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
5330
5628
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
5331
5629
|
const fetch3 = nodeFetchProxy(proxy);
|
|
5332
5630
|
const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
@@ -5428,11 +5726,11 @@ var createEnrichmentValueEngineDataSource = ({
|
|
|
5428
5726
|
var EnrichmentPullModule = {
|
|
5429
5727
|
command: "pull <directory>",
|
|
5430
5728
|
describe: "Pulls all enrichments to local files in a directory",
|
|
5431
|
-
builder: (
|
|
5729
|
+
builder: (yargs35) => withConfiguration(
|
|
5432
5730
|
withApiOptions(
|
|
5433
5731
|
withProjectOptions(
|
|
5434
5732
|
withDiffOptions(
|
|
5435
|
-
|
|
5733
|
+
yargs35.positional("directory", {
|
|
5436
5734
|
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.",
|
|
5437
5735
|
type: "string"
|
|
5438
5736
|
}).option("format", {
|
|
@@ -5510,11 +5808,11 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
|
|
|
5510
5808
|
var EnrichmentPushModule = {
|
|
5511
5809
|
command: "push <directory>",
|
|
5512
5810
|
describe: "Pushes all enrichments from files in a directory or package to Uniform",
|
|
5513
|
-
builder: (
|
|
5811
|
+
builder: (yargs35) => withConfiguration(
|
|
5514
5812
|
withApiOptions(
|
|
5515
5813
|
withProjectOptions(
|
|
5516
5814
|
withDiffOptions(
|
|
5517
|
-
|
|
5815
|
+
yargs35.positional("directory", {
|
|
5518
5816
|
describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
|
|
5519
5817
|
type: "string"
|
|
5520
5818
|
}).option("what-if", {
|
|
@@ -5581,10 +5879,10 @@ var EnrichmentRemoveModule = {
|
|
|
5581
5879
|
command: "remove <id>",
|
|
5582
5880
|
aliases: ["delete", "rm"],
|
|
5583
5881
|
describe: "Delete an enrichment category and its values",
|
|
5584
|
-
builder: (
|
|
5882
|
+
builder: (yargs35) => withConfiguration(
|
|
5585
5883
|
withApiOptions(
|
|
5586
5884
|
withProjectOptions(
|
|
5587
|
-
|
|
5885
|
+
yargs35.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
|
|
5588
5886
|
)
|
|
5589
5887
|
)
|
|
5590
5888
|
),
|
|
@@ -5600,14 +5898,14 @@ var EnrichmentModule = {
|
|
|
5600
5898
|
command: "enrichment <command>",
|
|
5601
5899
|
aliases: ["enr"],
|
|
5602
5900
|
describe: "Commands for Context enrichments",
|
|
5603
|
-
builder: (
|
|
5901
|
+
builder: (yargs35) => yargs35.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
|
|
5604
5902
|
handler: () => {
|
|
5605
|
-
|
|
5903
|
+
yargs17.help();
|
|
5606
5904
|
}
|
|
5607
5905
|
};
|
|
5608
5906
|
|
|
5609
5907
|
// src/commands/context/commands/manifest.ts
|
|
5610
|
-
import
|
|
5908
|
+
import yargs18 from "yargs";
|
|
5611
5909
|
|
|
5612
5910
|
// src/commands/context/commands/manifest/get.ts
|
|
5613
5911
|
import { ApiClientError, UncachedManifestClient } from "@uniformdev/context/api";
|
|
@@ -5618,10 +5916,10 @@ var ManifestGetModule = {
|
|
|
5618
5916
|
command: "get [output]",
|
|
5619
5917
|
aliases: ["dl", "download"],
|
|
5620
5918
|
describe: "Download the Uniform Context manifest for a project",
|
|
5621
|
-
builder: (
|
|
5919
|
+
builder: (yargs35) => withConfiguration(
|
|
5622
5920
|
withApiOptions(
|
|
5623
5921
|
withProjectOptions(
|
|
5624
|
-
|
|
5922
|
+
yargs35.option("preview", {
|
|
5625
5923
|
describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
|
|
5626
5924
|
default: false,
|
|
5627
5925
|
type: "boolean",
|
|
@@ -5683,7 +5981,7 @@ import { exit as exit2 } from "process";
|
|
|
5683
5981
|
var ManifestPublishModule = {
|
|
5684
5982
|
command: "publish",
|
|
5685
5983
|
describe: "Publish the Uniform Context manifest for a project",
|
|
5686
|
-
builder: (
|
|
5984
|
+
builder: (yargs35) => withConfiguration(withApiOptions(withProjectOptions(yargs35))),
|
|
5687
5985
|
handler: async ({ apiKey, apiHost, proxy, project }) => {
|
|
5688
5986
|
const fetch3 = nodeFetchProxy(proxy);
|
|
5689
5987
|
try {
|
|
@@ -5716,25 +6014,25 @@ var ManifestModule = {
|
|
|
5716
6014
|
command: "manifest <command>",
|
|
5717
6015
|
describe: "Commands for context manifests",
|
|
5718
6016
|
aliases: ["man"],
|
|
5719
|
-
builder: (
|
|
6017
|
+
builder: (yargs35) => yargs35.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
|
|
5720
6018
|
handler: () => {
|
|
5721
|
-
|
|
6019
|
+
yargs18.help();
|
|
5722
6020
|
}
|
|
5723
6021
|
};
|
|
5724
6022
|
|
|
5725
6023
|
// src/commands/context/commands/quirk.ts
|
|
5726
|
-
import
|
|
6024
|
+
import yargs19 from "yargs";
|
|
5727
6025
|
|
|
5728
6026
|
// src/commands/context/commands/quirk/get.ts
|
|
5729
6027
|
import { UncachedQuirkClient } from "@uniformdev/context/api";
|
|
5730
6028
|
var QuirkGetModule = {
|
|
5731
6029
|
command: "get <id>",
|
|
5732
6030
|
describe: "Fetch a quirk",
|
|
5733
|
-
builder: (
|
|
6031
|
+
builder: (yargs35) => withConfiguration(
|
|
5734
6032
|
withFormatOptions(
|
|
5735
6033
|
withApiOptions(
|
|
5736
6034
|
withProjectOptions(
|
|
5737
|
-
|
|
6035
|
+
yargs35.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
|
|
5738
6036
|
)
|
|
5739
6037
|
)
|
|
5740
6038
|
)
|
|
@@ -5758,11 +6056,11 @@ var QuirkListModule = {
|
|
|
5758
6056
|
command: "list",
|
|
5759
6057
|
describe: "List quirks",
|
|
5760
6058
|
aliases: ["ls"],
|
|
5761
|
-
builder: (
|
|
6059
|
+
builder: (yargs35) => withConfiguration(
|
|
5762
6060
|
withFormatOptions(
|
|
5763
6061
|
withApiOptions(
|
|
5764
6062
|
withProjectOptions(
|
|
5765
|
-
|
|
6063
|
+
yargs35.option("withIntegrations", {
|
|
5766
6064
|
alias: ["i"],
|
|
5767
6065
|
describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
|
|
5768
6066
|
type: "boolean"
|
|
@@ -5820,11 +6118,11 @@ function createQuirkEngineDataSource({
|
|
|
5820
6118
|
var QuirkPullModule = {
|
|
5821
6119
|
command: "pull <directory>",
|
|
5822
6120
|
describe: "Pulls all quirks to local files in a directory",
|
|
5823
|
-
builder: (
|
|
6121
|
+
builder: (yargs35) => withConfiguration(
|
|
5824
6122
|
withApiOptions(
|
|
5825
6123
|
withProjectOptions(
|
|
5826
6124
|
withDiffOptions(
|
|
5827
|
-
|
|
6125
|
+
yargs35.positional("directory", {
|
|
5828
6126
|
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.",
|
|
5829
6127
|
type: "string"
|
|
5830
6128
|
}).option("format", {
|
|
@@ -5902,11 +6200,11 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
|
|
|
5902
6200
|
var QuirkPushModule = {
|
|
5903
6201
|
command: "push <directory>",
|
|
5904
6202
|
describe: "Pushes all quirks from files in a directory or package to Uniform",
|
|
5905
|
-
builder: (
|
|
6203
|
+
builder: (yargs35) => withConfiguration(
|
|
5906
6204
|
withApiOptions(
|
|
5907
6205
|
withProjectOptions(
|
|
5908
6206
|
withDiffOptions(
|
|
5909
|
-
|
|
6207
|
+
yargs35.positional("directory", {
|
|
5910
6208
|
describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
|
|
5911
6209
|
type: "string"
|
|
5912
6210
|
}).option("what-if", {
|
|
@@ -5973,10 +6271,10 @@ var QuirkRemoveModule = {
|
|
|
5973
6271
|
command: "remove <id>",
|
|
5974
6272
|
aliases: ["delete", "rm"],
|
|
5975
6273
|
describe: "Delete a quirk",
|
|
5976
|
-
builder: (
|
|
6274
|
+
builder: (yargs35) => withConfiguration(
|
|
5977
6275
|
withApiOptions(
|
|
5978
6276
|
withProjectOptions(
|
|
5979
|
-
|
|
6277
|
+
yargs35.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
|
|
5980
6278
|
)
|
|
5981
6279
|
)
|
|
5982
6280
|
),
|
|
@@ -5993,10 +6291,10 @@ var QuirkUpdateModule = {
|
|
|
5993
6291
|
command: "update <filename>",
|
|
5994
6292
|
aliases: ["put"],
|
|
5995
6293
|
describe: "Insert or update a quirk",
|
|
5996
|
-
builder: (
|
|
6294
|
+
builder: (yargs35) => withConfiguration(
|
|
5997
6295
|
withApiOptions(
|
|
5998
6296
|
withProjectOptions(
|
|
5999
|
-
|
|
6297
|
+
yargs35.positional("filename", { demandOption: true, describe: "Quirk file to put" })
|
|
6000
6298
|
)
|
|
6001
6299
|
)
|
|
6002
6300
|
),
|
|
@@ -6013,25 +6311,25 @@ var QuirkModule = {
|
|
|
6013
6311
|
command: "quirk <command>",
|
|
6014
6312
|
aliases: ["qk"],
|
|
6015
6313
|
describe: "Commands for Context quirks",
|
|
6016
|
-
builder: (
|
|
6314
|
+
builder: (yargs35) => yargs35.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
|
|
6017
6315
|
handler: () => {
|
|
6018
|
-
|
|
6316
|
+
yargs19.help();
|
|
6019
6317
|
}
|
|
6020
6318
|
};
|
|
6021
6319
|
|
|
6022
6320
|
// src/commands/context/commands/signal.ts
|
|
6023
|
-
import
|
|
6321
|
+
import yargs20 from "yargs";
|
|
6024
6322
|
|
|
6025
6323
|
// src/commands/context/commands/signal/get.ts
|
|
6026
6324
|
import { UncachedSignalClient } from "@uniformdev/context/api";
|
|
6027
6325
|
var SignalGetModule = {
|
|
6028
6326
|
command: "get <id>",
|
|
6029
6327
|
describe: "Fetch a signal",
|
|
6030
|
-
builder: (
|
|
6328
|
+
builder: (yargs35) => withConfiguration(
|
|
6031
6329
|
withFormatOptions(
|
|
6032
6330
|
withApiOptions(
|
|
6033
6331
|
withProjectOptions(
|
|
6034
|
-
|
|
6332
|
+
yargs35.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
|
|
6035
6333
|
)
|
|
6036
6334
|
)
|
|
6037
6335
|
)
|
|
@@ -6055,7 +6353,7 @@ var SignalListModule = {
|
|
|
6055
6353
|
command: "list",
|
|
6056
6354
|
describe: "List signals",
|
|
6057
6355
|
aliases: ["ls"],
|
|
6058
|
-
builder: (
|
|
6356
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
6059
6357
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
6060
6358
|
const fetch3 = nodeFetchProxy(proxy);
|
|
6061
6359
|
const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
@@ -6105,11 +6403,11 @@ function createSignalEngineDataSource({
|
|
|
6105
6403
|
var SignalPullModule = {
|
|
6106
6404
|
command: "pull <directory>",
|
|
6107
6405
|
describe: "Pulls all signals to local files in a directory",
|
|
6108
|
-
builder: (
|
|
6406
|
+
builder: (yargs35) => withConfiguration(
|
|
6109
6407
|
withApiOptions(
|
|
6110
6408
|
withProjectOptions(
|
|
6111
6409
|
withDiffOptions(
|
|
6112
|
-
|
|
6410
|
+
yargs35.positional("directory", {
|
|
6113
6411
|
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.",
|
|
6114
6412
|
type: "string"
|
|
6115
6413
|
}).option("format", {
|
|
@@ -6187,11 +6485,11 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
|
|
|
6187
6485
|
var SignalPushModule = {
|
|
6188
6486
|
command: "push <directory>",
|
|
6189
6487
|
describe: "Pushes all signals from files in a directory or package to Uniform",
|
|
6190
|
-
builder: (
|
|
6488
|
+
builder: (yargs35) => withConfiguration(
|
|
6191
6489
|
withApiOptions(
|
|
6192
6490
|
withProjectOptions(
|
|
6193
6491
|
withDiffOptions(
|
|
6194
|
-
|
|
6492
|
+
yargs35.positional("directory", {
|
|
6195
6493
|
describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
|
|
6196
6494
|
type: "string"
|
|
6197
6495
|
}).option("what-if", {
|
|
@@ -6258,10 +6556,10 @@ var SignalRemoveModule = {
|
|
|
6258
6556
|
command: "remove <id>",
|
|
6259
6557
|
aliases: ["delete", "rm"],
|
|
6260
6558
|
describe: "Delete a signal",
|
|
6261
|
-
builder: (
|
|
6559
|
+
builder: (yargs35) => withConfiguration(
|
|
6262
6560
|
withApiOptions(
|
|
6263
6561
|
withProjectOptions(
|
|
6264
|
-
|
|
6562
|
+
yargs35.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
|
|
6265
6563
|
)
|
|
6266
6564
|
)
|
|
6267
6565
|
),
|
|
@@ -6278,10 +6576,10 @@ var SignalUpdateModule = {
|
|
|
6278
6576
|
command: "update <filename>",
|
|
6279
6577
|
aliases: ["put"],
|
|
6280
6578
|
describe: "Insert or update a signal",
|
|
6281
|
-
builder: (
|
|
6579
|
+
builder: (yargs35) => withConfiguration(
|
|
6282
6580
|
withApiOptions(
|
|
6283
6581
|
withProjectOptions(
|
|
6284
|
-
|
|
6582
|
+
yargs35.positional("filename", { demandOption: true, describe: "Signal file to put" })
|
|
6285
6583
|
)
|
|
6286
6584
|
)
|
|
6287
6585
|
),
|
|
@@ -6298,25 +6596,25 @@ var SignalModule = {
|
|
|
6298
6596
|
command: "signal <command>",
|
|
6299
6597
|
aliases: ["sig"],
|
|
6300
6598
|
describe: "Commands for Context signals",
|
|
6301
|
-
builder: (
|
|
6599
|
+
builder: (yargs35) => yargs35.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
|
|
6302
6600
|
handler: () => {
|
|
6303
|
-
|
|
6601
|
+
yargs20.help();
|
|
6304
6602
|
}
|
|
6305
6603
|
};
|
|
6306
6604
|
|
|
6307
6605
|
// src/commands/context/commands/test.ts
|
|
6308
|
-
import
|
|
6606
|
+
import yargs21 from "yargs";
|
|
6309
6607
|
|
|
6310
6608
|
// src/commands/context/commands/test/get.ts
|
|
6311
6609
|
import { UncachedTestClient } from "@uniformdev/context/api";
|
|
6312
6610
|
var TestGetModule = {
|
|
6313
6611
|
command: "get <id>",
|
|
6314
6612
|
describe: "Fetch a test",
|
|
6315
|
-
builder: (
|
|
6613
|
+
builder: (yargs35) => withConfiguration(
|
|
6316
6614
|
withFormatOptions(
|
|
6317
6615
|
withApiOptions(
|
|
6318
6616
|
withProjectOptions(
|
|
6319
|
-
|
|
6617
|
+
yargs35.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
|
|
6320
6618
|
)
|
|
6321
6619
|
)
|
|
6322
6620
|
)
|
|
@@ -6340,7 +6638,7 @@ var TestListModule = {
|
|
|
6340
6638
|
command: "list",
|
|
6341
6639
|
describe: "List tests",
|
|
6342
6640
|
aliases: ["ls"],
|
|
6343
|
-
builder: (
|
|
6641
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
6344
6642
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
6345
6643
|
const fetch3 = nodeFetchProxy(proxy);
|
|
6346
6644
|
const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
@@ -6390,11 +6688,11 @@ function createTestEngineDataSource({
|
|
|
6390
6688
|
var TestPullModule = {
|
|
6391
6689
|
command: "pull <directory>",
|
|
6392
6690
|
describe: "Pulls all tests to local files in a directory",
|
|
6393
|
-
builder: (
|
|
6691
|
+
builder: (yargs35) => withConfiguration(
|
|
6394
6692
|
withApiOptions(
|
|
6395
6693
|
withProjectOptions(
|
|
6396
6694
|
withDiffOptions(
|
|
6397
|
-
|
|
6695
|
+
yargs35.positional("directory", {
|
|
6398
6696
|
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.",
|
|
6399
6697
|
type: "string"
|
|
6400
6698
|
}).option("format", {
|
|
@@ -6472,11 +6770,11 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
|
|
|
6472
6770
|
var TestPushModule = {
|
|
6473
6771
|
command: "push <directory>",
|
|
6474
6772
|
describe: "Pushes all tests from files in a directory or package to Uniform",
|
|
6475
|
-
builder: (
|
|
6773
|
+
builder: (yargs35) => withConfiguration(
|
|
6476
6774
|
withApiOptions(
|
|
6477
6775
|
withProjectOptions(
|
|
6478
6776
|
withDiffOptions(
|
|
6479
|
-
|
|
6777
|
+
yargs35.positional("directory", {
|
|
6480
6778
|
describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
|
|
6481
6779
|
type: "string"
|
|
6482
6780
|
}).option("what-if", {
|
|
@@ -6543,10 +6841,10 @@ var TestRemoveModule = {
|
|
|
6543
6841
|
command: "remove <id>",
|
|
6544
6842
|
aliases: ["delete", "rm"],
|
|
6545
6843
|
describe: "Delete a test",
|
|
6546
|
-
builder: (
|
|
6844
|
+
builder: (yargs35) => withConfiguration(
|
|
6547
6845
|
withApiOptions(
|
|
6548
6846
|
withProjectOptions(
|
|
6549
|
-
|
|
6847
|
+
yargs35.positional("id", { demandOption: true, describe: "Test public ID to delete" })
|
|
6550
6848
|
)
|
|
6551
6849
|
)
|
|
6552
6850
|
),
|
|
@@ -6563,9 +6861,9 @@ var TestUpdateModule = {
|
|
|
6563
6861
|
command: "update <filename>",
|
|
6564
6862
|
aliases: ["put"],
|
|
6565
6863
|
describe: "Insert or update a test",
|
|
6566
|
-
builder: (
|
|
6864
|
+
builder: (yargs35) => withConfiguration(
|
|
6567
6865
|
withApiOptions(
|
|
6568
|
-
withProjectOptions(
|
|
6866
|
+
withProjectOptions(yargs35.positional("filename", { demandOption: true, describe: "Test file to put" }))
|
|
6569
6867
|
)
|
|
6570
6868
|
),
|
|
6571
6869
|
handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
|
|
@@ -6580,9 +6878,9 @@ var TestUpdateModule = {
|
|
|
6580
6878
|
var TestModule = {
|
|
6581
6879
|
command: "test <command>",
|
|
6582
6880
|
describe: "Commands for Context A/B tests",
|
|
6583
|
-
builder: (
|
|
6881
|
+
builder: (yargs35) => yargs35.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
|
|
6584
6882
|
handler: () => {
|
|
6585
|
-
|
|
6883
|
+
yargs21.help();
|
|
6586
6884
|
}
|
|
6587
6885
|
};
|
|
6588
6886
|
|
|
@@ -6591,20 +6889,20 @@ var ContextCommand = {
|
|
|
6591
6889
|
command: "context <command>",
|
|
6592
6890
|
aliases: ["ctx"],
|
|
6593
6891
|
describe: "Uniform Context commands",
|
|
6594
|
-
builder: (
|
|
6892
|
+
builder: (yargs35) => yargs35.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
|
|
6595
6893
|
handler: () => {
|
|
6596
|
-
|
|
6894
|
+
yargs22.showHelp();
|
|
6597
6895
|
}
|
|
6598
6896
|
};
|
|
6599
6897
|
|
|
6600
6898
|
// src/commands/integration/index.ts
|
|
6601
|
-
import
|
|
6899
|
+
import yargs25 from "yargs";
|
|
6602
6900
|
|
|
6603
6901
|
// src/commands/integration/commands/definition.ts
|
|
6604
|
-
import
|
|
6902
|
+
import yargs24 from "yargs";
|
|
6605
6903
|
|
|
6606
6904
|
// src/commands/integration/commands/definition/edgehancer/edgehancer.ts
|
|
6607
|
-
import
|
|
6905
|
+
import yargs23 from "yargs";
|
|
6608
6906
|
|
|
6609
6907
|
// src/commands/integration/commands/definition/edgehancer/deploy.ts
|
|
6610
6908
|
import { readFileSync } from "fs";
|
|
@@ -6642,8 +6940,8 @@ var EdgehancerClient = class extends ApiClient {
|
|
|
6642
6940
|
};
|
|
6643
6941
|
|
|
6644
6942
|
// src/commands/integration/commands/definition/edgehancer/util.ts
|
|
6645
|
-
function withEdgehancerIdOptions(
|
|
6646
|
-
return
|
|
6943
|
+
function withEdgehancerIdOptions(yargs35) {
|
|
6944
|
+
return yargs35.option("connectorType", {
|
|
6647
6945
|
describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
|
|
6648
6946
|
demandOption: true,
|
|
6649
6947
|
type: "string"
|
|
@@ -6663,11 +6961,11 @@ function withEdgehancerIdOptions(yargs34) {
|
|
|
6663
6961
|
var IntegrationEdgehancerDeployModule = {
|
|
6664
6962
|
command: "deploy <filename>",
|
|
6665
6963
|
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.",
|
|
6666
|
-
builder: (
|
|
6964
|
+
builder: (yargs35) => withConfiguration(
|
|
6667
6965
|
withApiOptions(
|
|
6668
6966
|
withTeamOptions(
|
|
6669
6967
|
withEdgehancerIdOptions(
|
|
6670
|
-
|
|
6968
|
+
yargs35.positional("filename", {
|
|
6671
6969
|
demandOption: true,
|
|
6672
6970
|
describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
|
|
6673
6971
|
})
|
|
@@ -6687,7 +6985,7 @@ var IntegrationEdgehancerDeployModule = {
|
|
|
6687
6985
|
var IntegrationEdgehancerRemoveModule = {
|
|
6688
6986
|
command: "remove",
|
|
6689
6987
|
describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
|
|
6690
|
-
builder: (
|
|
6988
|
+
builder: (yargs35) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs35)))),
|
|
6691
6989
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
|
|
6692
6990
|
const fetch3 = nodeFetchProxy(proxy);
|
|
6693
6991
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch3, teamId });
|
|
@@ -6699,9 +6997,9 @@ var IntegrationEdgehancerRemoveModule = {
|
|
|
6699
6997
|
var IntegrationEdgehancerModule = {
|
|
6700
6998
|
command: "edgehancer <command>",
|
|
6701
6999
|
describe: "Commands for managing custom integration edgehancers at the team level.",
|
|
6702
|
-
builder: (
|
|
7000
|
+
builder: (yargs35) => yargs35.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
|
|
6703
7001
|
handler: () => {
|
|
6704
|
-
|
|
7002
|
+
yargs23.help();
|
|
6705
7003
|
}
|
|
6706
7004
|
};
|
|
6707
7005
|
|
|
@@ -6741,10 +7039,10 @@ var DefinitionClient = class extends ApiClient2 {
|
|
|
6741
7039
|
var IntegrationDefinitionRegisterModule = {
|
|
6742
7040
|
command: "register <filename>",
|
|
6743
7041
|
describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
|
|
6744
|
-
builder: (
|
|
7042
|
+
builder: (yargs35) => withConfiguration(
|
|
6745
7043
|
withApiOptions(
|
|
6746
7044
|
withTeamOptions(
|
|
6747
|
-
|
|
7045
|
+
yargs35.positional("filename", {
|
|
6748
7046
|
demandOption: true,
|
|
6749
7047
|
describe: "Integration definition manifest to register"
|
|
6750
7048
|
})
|
|
@@ -6763,10 +7061,10 @@ var IntegrationDefinitionRegisterModule = {
|
|
|
6763
7061
|
var IntegrationDefinitionRemoveModule = {
|
|
6764
7062
|
command: "remove <type>",
|
|
6765
7063
|
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.",
|
|
6766
|
-
builder: (
|
|
7064
|
+
builder: (yargs35) => withConfiguration(
|
|
6767
7065
|
withApiOptions(
|
|
6768
7066
|
withTeamOptions(
|
|
6769
|
-
|
|
7067
|
+
yargs35.positional("type", {
|
|
6770
7068
|
demandOption: true,
|
|
6771
7069
|
describe: "Integration type (from its manifest) to remove."
|
|
6772
7070
|
})
|
|
@@ -6784,9 +7082,9 @@ var IntegrationDefinitionRemoveModule = {
|
|
|
6784
7082
|
var IntegrationDefinitionModule = {
|
|
6785
7083
|
command: "definition <command>",
|
|
6786
7084
|
describe: "Commands for managing custom integration definitions at the team level.",
|
|
6787
|
-
builder: (
|
|
7085
|
+
builder: (yargs35) => yargs35.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
|
|
6788
7086
|
handler: () => {
|
|
6789
|
-
|
|
7087
|
+
yargs24.help();
|
|
6790
7088
|
}
|
|
6791
7089
|
};
|
|
6792
7090
|
|
|
@@ -6826,10 +7124,10 @@ var InstallClient = class extends ApiClient3 {
|
|
|
6826
7124
|
var IntegrationInstallModule = {
|
|
6827
7125
|
command: "install <type>",
|
|
6828
7126
|
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.",
|
|
6829
|
-
builder: (
|
|
7127
|
+
builder: (yargs35) => withConfiguration(
|
|
6830
7128
|
withApiOptions(
|
|
6831
7129
|
withProjectOptions(
|
|
6832
|
-
|
|
7130
|
+
yargs35.positional("type", {
|
|
6833
7131
|
demandOption: true,
|
|
6834
7132
|
describe: "Integration type to install (as defined in its manifest)"
|
|
6835
7133
|
}).option("configuration", {
|
|
@@ -6851,10 +7149,10 @@ var IntegrationInstallModule = {
|
|
|
6851
7149
|
var IntegrationUninstallModule = {
|
|
6852
7150
|
command: "uninstall <type>",
|
|
6853
7151
|
describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
|
|
6854
|
-
builder: (
|
|
7152
|
+
builder: (yargs35) => withConfiguration(
|
|
6855
7153
|
withApiOptions(
|
|
6856
7154
|
withProjectOptions(
|
|
6857
|
-
|
|
7155
|
+
yargs35.positional("type", {
|
|
6858
7156
|
demandOption: true,
|
|
6859
7157
|
describe: "Integration type to uninstall (as defined in its manifest)"
|
|
6860
7158
|
})
|
|
@@ -6872,9 +7170,9 @@ var IntegrationUninstallModule = {
|
|
|
6872
7170
|
var IntegrationCommand = {
|
|
6873
7171
|
command: "integration <command>",
|
|
6874
7172
|
describe: "Integration management commands",
|
|
6875
|
-
builder: (
|
|
7173
|
+
builder: (yargs35) => yargs35.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
|
|
6876
7174
|
handler: () => {
|
|
6877
|
-
|
|
7175
|
+
yargs25.showHelp();
|
|
6878
7176
|
}
|
|
6879
7177
|
};
|
|
6880
7178
|
|
|
@@ -6902,7 +7200,7 @@ import { PostHog } from "posthog-node";
|
|
|
6902
7200
|
// package.json
|
|
6903
7201
|
var package_default = {
|
|
6904
7202
|
name: "@uniformdev/cli",
|
|
6905
|
-
version: "19.
|
|
7203
|
+
version: "19.164.0",
|
|
6906
7204
|
description: "Uniform command line interface tool",
|
|
6907
7205
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
6908
7206
|
main: "./cli.js",
|
|
@@ -7918,10 +8216,10 @@ var NewMeshCmd = {
|
|
|
7918
8216
|
};
|
|
7919
8217
|
|
|
7920
8218
|
// src/commands/optimize/index.ts
|
|
7921
|
-
import
|
|
8219
|
+
import yargs27 from "yargs";
|
|
7922
8220
|
|
|
7923
8221
|
// src/commands/optimize/manifest.ts
|
|
7924
|
-
import
|
|
8222
|
+
import yargs26 from "yargs";
|
|
7925
8223
|
|
|
7926
8224
|
// src/commands/optimize/manifest/download.ts
|
|
7927
8225
|
import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
|
|
@@ -7936,7 +8234,7 @@ var UniformBaseUrl = "https://uniform.app";
|
|
|
7936
8234
|
var module = {
|
|
7937
8235
|
command: "download [output]",
|
|
7938
8236
|
describe: "Download intent manifest",
|
|
7939
|
-
builder: (
|
|
8237
|
+
builder: (yargs35) => yargs35.option("apiKey", {
|
|
7940
8238
|
alias: "k",
|
|
7941
8239
|
demandOption: true,
|
|
7942
8240
|
string: true,
|
|
@@ -8037,10 +8335,10 @@ var module2 = {
|
|
|
8037
8335
|
command: "manifest <command>",
|
|
8038
8336
|
describe: "Intent manifest commands",
|
|
8039
8337
|
builder: () => {
|
|
8040
|
-
return
|
|
8338
|
+
return yargs26.command(download_default);
|
|
8041
8339
|
},
|
|
8042
8340
|
handler: () => {
|
|
8043
|
-
|
|
8341
|
+
yargs26.showHelp();
|
|
8044
8342
|
}
|
|
8045
8343
|
};
|
|
8046
8344
|
var manifest_default = module2;
|
|
@@ -8051,29 +8349,29 @@ var OptimizeCommand = {
|
|
|
8051
8349
|
aliases: ["opt"],
|
|
8052
8350
|
describe: "Uniform Optimize commands",
|
|
8053
8351
|
builder: () => {
|
|
8054
|
-
return
|
|
8352
|
+
return yargs27.command(manifest_default);
|
|
8055
8353
|
},
|
|
8056
8354
|
handler: () => {
|
|
8057
|
-
|
|
8355
|
+
yargs27.showHelp();
|
|
8058
8356
|
}
|
|
8059
8357
|
};
|
|
8060
8358
|
|
|
8061
8359
|
// src/commands/project-map/index.ts
|
|
8062
|
-
import
|
|
8360
|
+
import yargs30 from "yargs";
|
|
8063
8361
|
|
|
8064
8362
|
// src/commands/project-map/commands/projectMapDefinition.ts
|
|
8065
|
-
import
|
|
8363
|
+
import yargs28 from "yargs";
|
|
8066
8364
|
|
|
8067
8365
|
// src/commands/project-map/commands/ProjectMapDefinition/get.ts
|
|
8068
8366
|
import { UncachedProjectMapClient } from "@uniformdev/project-map";
|
|
8069
8367
|
var ProjectMapDefinitionGetModule = {
|
|
8070
8368
|
command: "get <id>",
|
|
8071
8369
|
describe: "Fetch a project map",
|
|
8072
|
-
builder: (
|
|
8370
|
+
builder: (yargs35) => withFormatOptions(
|
|
8073
8371
|
withConfiguration(
|
|
8074
8372
|
withApiOptions(
|
|
8075
8373
|
withProjectOptions(
|
|
8076
|
-
|
|
8374
|
+
yargs35.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
|
|
8077
8375
|
)
|
|
8078
8376
|
)
|
|
8079
8377
|
)
|
|
@@ -8097,7 +8395,7 @@ var ProjectMapDefinitionListModule = {
|
|
|
8097
8395
|
command: "list",
|
|
8098
8396
|
describe: "List of project maps",
|
|
8099
8397
|
aliases: ["ls"],
|
|
8100
|
-
builder: (
|
|
8398
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
8101
8399
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8102
8400
|
const fetch3 = nodeFetchProxy(proxy);
|
|
8103
8401
|
const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
@@ -8155,11 +8453,11 @@ function createProjectMapDefinitionEngineDataSource({
|
|
|
8155
8453
|
var ProjectMapDefinitionPullModule = {
|
|
8156
8454
|
command: "pull <directory>",
|
|
8157
8455
|
describe: "Pulls all project maps to local files in a directory",
|
|
8158
|
-
builder: (
|
|
8456
|
+
builder: (yargs35) => withConfiguration(
|
|
8159
8457
|
withApiOptions(
|
|
8160
8458
|
withProjectOptions(
|
|
8161
8459
|
withDiffOptions(
|
|
8162
|
-
|
|
8460
|
+
yargs35.positional("directory", {
|
|
8163
8461
|
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.",
|
|
8164
8462
|
type: "string"
|
|
8165
8463
|
}).option("format", {
|
|
@@ -8237,11 +8535,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
|
|
|
8237
8535
|
var ProjectMapDefinitionPushModule = {
|
|
8238
8536
|
command: "push <directory>",
|
|
8239
8537
|
describe: "Pushes all project maps from files in a directory or package to Uniform",
|
|
8240
|
-
builder: (
|
|
8538
|
+
builder: (yargs35) => withConfiguration(
|
|
8241
8539
|
withApiOptions(
|
|
8242
8540
|
withProjectOptions(
|
|
8243
8541
|
withDiffOptions(
|
|
8244
|
-
|
|
8542
|
+
yargs35.positional("directory", {
|
|
8245
8543
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
8246
8544
|
type: "string"
|
|
8247
8545
|
}).option("what-if", {
|
|
@@ -8308,9 +8606,9 @@ var ProjectMapDefinitionRemoveModule = {
|
|
|
8308
8606
|
command: "remove <id>",
|
|
8309
8607
|
aliases: ["delete", "rm"],
|
|
8310
8608
|
describe: "Delete a project map",
|
|
8311
|
-
builder: (
|
|
8609
|
+
builder: (yargs35) => withConfiguration(
|
|
8312
8610
|
withApiOptions(
|
|
8313
|
-
withProjectOptions(
|
|
8611
|
+
withProjectOptions(yargs35.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
8314
8612
|
)
|
|
8315
8613
|
),
|
|
8316
8614
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -8326,10 +8624,10 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
8326
8624
|
command: "update <filename>",
|
|
8327
8625
|
aliases: ["put"],
|
|
8328
8626
|
describe: "Insert or update a project map",
|
|
8329
|
-
builder: (
|
|
8627
|
+
builder: (yargs35) => withConfiguration(
|
|
8330
8628
|
withApiOptions(
|
|
8331
8629
|
withProjectOptions(
|
|
8332
|
-
|
|
8630
|
+
yargs35.positional("filename", { demandOption: true, describe: "Project map file to put" })
|
|
8333
8631
|
)
|
|
8334
8632
|
)
|
|
8335
8633
|
),
|
|
@@ -8345,25 +8643,25 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
8345
8643
|
var ProjectMapDefinitionModule = {
|
|
8346
8644
|
command: "definition <command>",
|
|
8347
8645
|
describe: "Commands for ProjectMap Definitions",
|
|
8348
|
-
builder: (
|
|
8646
|
+
builder: (yargs35) => yargs35.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
|
|
8349
8647
|
handler: () => {
|
|
8350
|
-
|
|
8648
|
+
yargs28.help();
|
|
8351
8649
|
}
|
|
8352
8650
|
};
|
|
8353
8651
|
|
|
8354
8652
|
// src/commands/project-map/commands/projectMapNode.ts
|
|
8355
|
-
import
|
|
8653
|
+
import yargs29 from "yargs";
|
|
8356
8654
|
|
|
8357
8655
|
// src/commands/project-map/commands/ProjectMapNode/get.ts
|
|
8358
8656
|
import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
|
|
8359
8657
|
var ProjectMapNodeGetModule = {
|
|
8360
8658
|
command: "get <id> <projectMapId>",
|
|
8361
8659
|
describe: "Fetch a project map node",
|
|
8362
|
-
builder: (
|
|
8660
|
+
builder: (yargs35) => withConfiguration(
|
|
8363
8661
|
withFormatOptions(
|
|
8364
8662
|
withApiOptions(
|
|
8365
8663
|
withProjectOptions(
|
|
8366
|
-
|
|
8664
|
+
yargs35.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
|
|
8367
8665
|
)
|
|
8368
8666
|
)
|
|
8369
8667
|
)
|
|
@@ -8388,12 +8686,12 @@ var ProjectMapNodeListModule = {
|
|
|
8388
8686
|
command: "list <projectMapId>",
|
|
8389
8687
|
describe: "List project map nodes",
|
|
8390
8688
|
aliases: ["ls"],
|
|
8391
|
-
builder: (
|
|
8689
|
+
builder: (yargs35) => withConfiguration(
|
|
8392
8690
|
withFormatOptions(
|
|
8393
8691
|
withApiOptions(
|
|
8394
8692
|
withProjectOptions(
|
|
8395
8693
|
withStateOptions(
|
|
8396
|
-
|
|
8694
|
+
yargs35.positional("projectMapId", {
|
|
8397
8695
|
demandOption: true,
|
|
8398
8696
|
describe: "ProjectMap UUID to fetch from"
|
|
8399
8697
|
})
|
|
@@ -8466,11 +8764,11 @@ function createProjectMapNodeEngineDataSource({
|
|
|
8466
8764
|
var ProjectMapNodePullModule = {
|
|
8467
8765
|
command: "pull <directory>",
|
|
8468
8766
|
describe: "Pulls all project maps nodes to local files in a directory",
|
|
8469
|
-
builder: (
|
|
8767
|
+
builder: (yargs35) => withConfiguration(
|
|
8470
8768
|
withApiOptions(
|
|
8471
8769
|
withProjectOptions(
|
|
8472
8770
|
withDiffOptions(
|
|
8473
|
-
|
|
8771
|
+
yargs35.positional("directory", {
|
|
8474
8772
|
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.",
|
|
8475
8773
|
type: "string"
|
|
8476
8774
|
}).option("format", {
|
|
@@ -8552,11 +8850,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient10 } from "@uniform
|
|
|
8552
8850
|
var ProjectMapNodePushModule = {
|
|
8553
8851
|
command: "push <directory>",
|
|
8554
8852
|
describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
|
|
8555
|
-
builder: (
|
|
8853
|
+
builder: (yargs35) => withConfiguration(
|
|
8556
8854
|
withApiOptions(
|
|
8557
8855
|
withProjectOptions(
|
|
8558
8856
|
withDiffOptions(
|
|
8559
|
-
|
|
8857
|
+
yargs35.positional("directory", {
|
|
8560
8858
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
8561
8859
|
type: "string"
|
|
8562
8860
|
}).option("what-if", {
|
|
@@ -8632,10 +8930,10 @@ var ProjectMapNodeRemoveModule = {
|
|
|
8632
8930
|
command: "remove <id> <projectMapId>",
|
|
8633
8931
|
aliases: ["delete", "rm"],
|
|
8634
8932
|
describe: "Delete a project map node",
|
|
8635
|
-
builder: (
|
|
8933
|
+
builder: (yargs35) => withConfiguration(
|
|
8636
8934
|
withApiOptions(
|
|
8637
8935
|
withProjectOptions(
|
|
8638
|
-
|
|
8936
|
+
yargs35.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
|
|
8639
8937
|
)
|
|
8640
8938
|
)
|
|
8641
8939
|
),
|
|
@@ -8652,10 +8950,10 @@ var ProjectMapNodeUpdateModule = {
|
|
|
8652
8950
|
command: "update <filename> <projectMapId>",
|
|
8653
8951
|
aliases: ["put"],
|
|
8654
8952
|
describe: "Insert or update a project map node",
|
|
8655
|
-
builder: (
|
|
8953
|
+
builder: (yargs35) => withConfiguration(
|
|
8656
8954
|
withApiOptions(
|
|
8657
8955
|
withProjectOptions(
|
|
8658
|
-
|
|
8956
|
+
yargs35.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
|
|
8659
8957
|
)
|
|
8660
8958
|
)
|
|
8661
8959
|
),
|
|
@@ -8671,9 +8969,9 @@ var ProjectMapNodeUpdateModule = {
|
|
|
8671
8969
|
var ProjectMapNodeModule = {
|
|
8672
8970
|
command: "node <command>",
|
|
8673
8971
|
describe: "Commands for ProjectMap Nodes",
|
|
8674
|
-
builder: (
|
|
8972
|
+
builder: (yargs35) => yargs35.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
|
|
8675
8973
|
handler: () => {
|
|
8676
|
-
|
|
8974
|
+
yargs29.help();
|
|
8677
8975
|
}
|
|
8678
8976
|
};
|
|
8679
8977
|
|
|
@@ -8682,28 +8980,28 @@ var ProjectMapCommand = {
|
|
|
8682
8980
|
command: "project-map <command>",
|
|
8683
8981
|
aliases: ["prm"],
|
|
8684
8982
|
describe: "Uniform ProjectMap commands",
|
|
8685
|
-
builder: (
|
|
8983
|
+
builder: (yargs35) => yargs35.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
|
|
8686
8984
|
handler: () => {
|
|
8687
|
-
|
|
8985
|
+
yargs30.showHelp();
|
|
8688
8986
|
}
|
|
8689
8987
|
};
|
|
8690
8988
|
|
|
8691
8989
|
// src/commands/redirect/index.ts
|
|
8692
|
-
import
|
|
8990
|
+
import yargs32 from "yargs";
|
|
8693
8991
|
|
|
8694
8992
|
// src/commands/redirect/commands/redirect.ts
|
|
8695
|
-
import
|
|
8993
|
+
import yargs31 from "yargs";
|
|
8696
8994
|
|
|
8697
8995
|
// src/commands/redirect/commands/RedirectDefinition/get.ts
|
|
8698
8996
|
import { UncachedRedirectClient } from "@uniformdev/redirect";
|
|
8699
8997
|
var RedirectDefinitionGetModule = {
|
|
8700
8998
|
command: "get <id>",
|
|
8701
8999
|
describe: "Fetch a redirect",
|
|
8702
|
-
builder: (
|
|
9000
|
+
builder: (yargs35) => withConfiguration(
|
|
8703
9001
|
withFormatOptions(
|
|
8704
9002
|
withApiOptions(
|
|
8705
9003
|
withProjectOptions(
|
|
8706
|
-
|
|
9004
|
+
yargs35.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
|
|
8707
9005
|
)
|
|
8708
9006
|
)
|
|
8709
9007
|
)
|
|
@@ -8727,7 +9025,7 @@ var RedirectDefinitionListModule = {
|
|
|
8727
9025
|
command: "list",
|
|
8728
9026
|
describe: "List of redirects",
|
|
8729
9027
|
aliases: ["ls"],
|
|
8730
|
-
builder: (
|
|
9028
|
+
builder: (yargs35) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs35)))),
|
|
8731
9029
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8732
9030
|
const fetch3 = nodeFetchProxy(proxy);
|
|
8733
9031
|
const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
|
|
@@ -8794,11 +9092,11 @@ function createRedirectDefinitionEngineDataSource({
|
|
|
8794
9092
|
var RedirectDefinitionPullModule = {
|
|
8795
9093
|
command: "pull <directory>",
|
|
8796
9094
|
describe: "Pulls all redirects to local files in a directory",
|
|
8797
|
-
builder: (
|
|
9095
|
+
builder: (yargs35) => withConfiguration(
|
|
8798
9096
|
withApiOptions(
|
|
8799
9097
|
withProjectOptions(
|
|
8800
9098
|
withDiffOptions(
|
|
8801
|
-
|
|
9099
|
+
yargs35.positional("directory", {
|
|
8802
9100
|
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.",
|
|
8803
9101
|
type: "string"
|
|
8804
9102
|
}).option("format", {
|
|
@@ -8877,11 +9175,11 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
|
|
|
8877
9175
|
var RedirectDefinitionPushModule = {
|
|
8878
9176
|
command: "push <directory>",
|
|
8879
9177
|
describe: "Pushes all redirects from files in a directory or package to Uniform",
|
|
8880
|
-
builder: (
|
|
9178
|
+
builder: (yargs35) => withConfiguration(
|
|
8881
9179
|
withApiOptions(
|
|
8882
9180
|
withProjectOptions(
|
|
8883
9181
|
withDiffOptions(
|
|
8884
|
-
|
|
9182
|
+
yargs35.positional("directory", {
|
|
8885
9183
|
describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
|
|
8886
9184
|
type: "string"
|
|
8887
9185
|
}).option("what-if", {
|
|
@@ -8948,9 +9246,9 @@ var RedirectDefinitionRemoveModule = {
|
|
|
8948
9246
|
command: "remove <id>",
|
|
8949
9247
|
aliases: ["delete", "rm"],
|
|
8950
9248
|
describe: "Delete a redirect",
|
|
8951
|
-
builder: (
|
|
9249
|
+
builder: (yargs35) => withConfiguration(
|
|
8952
9250
|
withApiOptions(
|
|
8953
|
-
withProjectOptions(
|
|
9251
|
+
withProjectOptions(yargs35.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
8954
9252
|
)
|
|
8955
9253
|
),
|
|
8956
9254
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -8966,10 +9264,10 @@ var RedirectDefinitionUpdateModule = {
|
|
|
8966
9264
|
command: "update <filename>",
|
|
8967
9265
|
aliases: ["put"],
|
|
8968
9266
|
describe: "Insert or update a redirect",
|
|
8969
|
-
builder: (
|
|
9267
|
+
builder: (yargs35) => withConfiguration(
|
|
8970
9268
|
withApiOptions(
|
|
8971
9269
|
withProjectOptions(
|
|
8972
|
-
|
|
9270
|
+
yargs35.positional("filename", { demandOption: true, describe: "Redirect file to put" })
|
|
8973
9271
|
)
|
|
8974
9272
|
)
|
|
8975
9273
|
),
|
|
@@ -8985,9 +9283,9 @@ var RedirectDefinitionUpdateModule = {
|
|
|
8985
9283
|
var RedirectDefinitionModule = {
|
|
8986
9284
|
command: "definition <command>",
|
|
8987
9285
|
describe: "Commands for Redirect Definitions",
|
|
8988
|
-
builder: (
|
|
9286
|
+
builder: (yargs35) => yargs35.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
|
|
8989
9287
|
handler: () => {
|
|
8990
|
-
|
|
9288
|
+
yargs31.help();
|
|
8991
9289
|
}
|
|
8992
9290
|
};
|
|
8993
9291
|
|
|
@@ -8996,14 +9294,57 @@ var RedirectCommand = {
|
|
|
8996
9294
|
command: "redirect <command>",
|
|
8997
9295
|
aliases: ["red"],
|
|
8998
9296
|
describe: "Uniform Redirect commands",
|
|
8999
|
-
builder: (
|
|
9297
|
+
builder: (yargs35) => yargs35.command(RedirectDefinitionModule).demandCommand(),
|
|
9000
9298
|
handler: () => {
|
|
9001
|
-
|
|
9299
|
+
yargs32.showHelp();
|
|
9002
9300
|
}
|
|
9003
9301
|
};
|
|
9004
9302
|
|
|
9005
9303
|
// src/commands/sync/index.ts
|
|
9006
|
-
import
|
|
9304
|
+
import yargs33 from "yargs";
|
|
9305
|
+
|
|
9306
|
+
// src/commands/canvas/commands/pattern/pull.ts
|
|
9307
|
+
var PatternPullModule = {
|
|
9308
|
+
...CompositionPullModule,
|
|
9309
|
+
describe: "Pulls all patterns to local files in a directory",
|
|
9310
|
+
builder: (yargs35) => withConfiguration(
|
|
9311
|
+
withApiOptions(
|
|
9312
|
+
withProjectOptions(
|
|
9313
|
+
withStateOptions(
|
|
9314
|
+
withDiffOptions(
|
|
9315
|
+
yargs35.positional("directory", {
|
|
9316
|
+
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.",
|
|
9317
|
+
type: "string"
|
|
9318
|
+
}).option("format", {
|
|
9319
|
+
alias: ["f"],
|
|
9320
|
+
describe: "Output format",
|
|
9321
|
+
default: "yaml",
|
|
9322
|
+
choices: ["yaml", "json"],
|
|
9323
|
+
type: "string"
|
|
9324
|
+
}).option("onlyPatterns", {
|
|
9325
|
+
describe: "Only pulling patterns and not compositions",
|
|
9326
|
+
// This default differentiate this list command from composition list command
|
|
9327
|
+
default: true,
|
|
9328
|
+
type: "boolean",
|
|
9329
|
+
hidden: true
|
|
9330
|
+
}).option("what-if", {
|
|
9331
|
+
alias: ["w"],
|
|
9332
|
+
describe: "What-if mode reports what would be done but changes no files",
|
|
9333
|
+
default: false,
|
|
9334
|
+
type: "boolean"
|
|
9335
|
+
}).option("mode", {
|
|
9336
|
+
alias: ["m"],
|
|
9337
|
+
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',
|
|
9338
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
9339
|
+
default: "mirror",
|
|
9340
|
+
type: "string"
|
|
9341
|
+
})
|
|
9342
|
+
)
|
|
9343
|
+
)
|
|
9344
|
+
)
|
|
9345
|
+
)
|
|
9346
|
+
)
|
|
9347
|
+
};
|
|
9007
9348
|
|
|
9008
9349
|
// src/commands/sync/commands/util.ts
|
|
9009
9350
|
import ora2 from "ora";
|
|
@@ -9063,11 +9404,11 @@ function patchConsole(fn, ora3, replay = []) {
|
|
|
9063
9404
|
var SyncPullModule = {
|
|
9064
9405
|
command: "pull",
|
|
9065
9406
|
describe: "Pulls whole project to local files in a directory",
|
|
9066
|
-
builder: (
|
|
9407
|
+
builder: (yargs35) => withConfiguration(
|
|
9067
9408
|
withApiOptions(
|
|
9068
9409
|
withProjectOptions(
|
|
9069
9410
|
withDiffOptions(
|
|
9070
|
-
|
|
9411
|
+
yargs35.option("what-if", {
|
|
9071
9412
|
alias: ["w"],
|
|
9072
9413
|
describe: "What-if mode reports what would be done but changes no files",
|
|
9073
9414
|
default: false,
|
|
@@ -9079,11 +9420,6 @@ var SyncPullModule = {
|
|
|
9079
9420
|
),
|
|
9080
9421
|
handler: async ({ serialization, ...otherParams }) => {
|
|
9081
9422
|
const config2 = serialization;
|
|
9082
|
-
let isUsingDeprecatedPatternConfig = false;
|
|
9083
|
-
if (config2.entitiesConfig.pattern) {
|
|
9084
|
-
isUsingDeprecatedPatternConfig = true;
|
|
9085
|
-
config2.entitiesConfig.componentPattern ??= config2.entitiesConfig.pattern;
|
|
9086
|
-
}
|
|
9087
9423
|
const enabledEntities = Object.entries({
|
|
9088
9424
|
locale: LocalePullModule,
|
|
9089
9425
|
asset: AssetPullModule,
|
|
@@ -9097,7 +9433,9 @@ var SyncPullModule = {
|
|
|
9097
9433
|
enrichment: EnrichmentPullModule,
|
|
9098
9434
|
aggregate: AggregatePullModule,
|
|
9099
9435
|
component: ComponentPullModule,
|
|
9436
|
+
pattern: PatternPullModule,
|
|
9100
9437
|
componentPattern: ComponentPatternPullModule,
|
|
9438
|
+
compositionPattern: CompositionPatternPullModule,
|
|
9101
9439
|
composition: CompositionPullModule,
|
|
9102
9440
|
projectMapDefinition: ProjectMapDefinitionPullModule,
|
|
9103
9441
|
projectMapNode: ProjectMapNodePullModule,
|
|
@@ -9126,9 +9464,10 @@ var SyncPullModule = {
|
|
|
9126
9464
|
state: entityConfigSupportsPullState(entityConfig) ? entityConfig.state ?? 0 : 0,
|
|
9127
9465
|
format: getFormat(entityType, config2),
|
|
9128
9466
|
onlyCompositions: entityType === "composition" ? true : void 0,
|
|
9129
|
-
onlyPatterns:
|
|
9467
|
+
onlyPatterns: ["componentPattern", "compositionPattern"].includes(entityType) ? true : void 0,
|
|
9468
|
+
patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
|
|
9130
9469
|
mode: getPullMode(entityType, config2),
|
|
9131
|
-
directory: getPullFilename(entityType, config2
|
|
9470
|
+
directory: getPullFilename(entityType, config2),
|
|
9132
9471
|
allowEmptySource: config2.allowEmptySource
|
|
9133
9472
|
}),
|
|
9134
9473
|
{
|
|
@@ -9155,13 +9494,11 @@ var getPullMode = (entityType, config2) => {
|
|
|
9155
9494
|
entityType
|
|
9156
9495
|
});
|
|
9157
9496
|
};
|
|
9158
|
-
var getPullFilename = (entityType, config2
|
|
9497
|
+
var getPullFilename = (entityType, config2) => {
|
|
9159
9498
|
return getDirectoryOrFilename({
|
|
9160
9499
|
operation: "pull",
|
|
9161
9500
|
config: config2,
|
|
9162
|
-
entityType
|
|
9163
|
-
// This fallback can be removed when publishing a major release
|
|
9164
|
-
defaultEntityFolderName: isUsingDeprecatedPatternConfig && entityType === "componentPattern" ? "pattern" : void 0
|
|
9501
|
+
entityType
|
|
9165
9502
|
});
|
|
9166
9503
|
};
|
|
9167
9504
|
var getFormat = (entityType, config2) => {
|
|
@@ -9173,15 +9510,52 @@ var getFormat = (entityType, config2) => {
|
|
|
9173
9510
|
});
|
|
9174
9511
|
};
|
|
9175
9512
|
|
|
9513
|
+
// src/commands/canvas/commands/pattern/push.ts
|
|
9514
|
+
var PatternPushModule = {
|
|
9515
|
+
...CompositionPushModule,
|
|
9516
|
+
describe: "Pushes all patterns from files in a directory to Uniform Canvas",
|
|
9517
|
+
builder: (yargs35) => withConfiguration(
|
|
9518
|
+
withApiOptions(
|
|
9519
|
+
withProjectOptions(
|
|
9520
|
+
withStateOptions(
|
|
9521
|
+
withDiffOptions(
|
|
9522
|
+
yargs35.positional("directory", {
|
|
9523
|
+
describe: "Directory to read the patterns from. If a filename is used, a package will be read instead.",
|
|
9524
|
+
type: "string"
|
|
9525
|
+
}).option("what-if", {
|
|
9526
|
+
alias: ["w"],
|
|
9527
|
+
describe: "What-if mode reports what would be done but changes nothing",
|
|
9528
|
+
default: false,
|
|
9529
|
+
type: "boolean"
|
|
9530
|
+
}).option("mode", {
|
|
9531
|
+
alias: ["m"],
|
|
9532
|
+
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',
|
|
9533
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
9534
|
+
default: "mirror",
|
|
9535
|
+
type: "string"
|
|
9536
|
+
}).option("onlyPatterns", {
|
|
9537
|
+
describe: "Only pulling patterns and not compositions",
|
|
9538
|
+
// This default differentiate this list command from composition list command
|
|
9539
|
+
default: true,
|
|
9540
|
+
type: "boolean",
|
|
9541
|
+
hidden: true
|
|
9542
|
+
})
|
|
9543
|
+
)
|
|
9544
|
+
)
|
|
9545
|
+
)
|
|
9546
|
+
)
|
|
9547
|
+
)
|
|
9548
|
+
};
|
|
9549
|
+
|
|
9176
9550
|
// src/commands/sync/commands/push.ts
|
|
9177
9551
|
var SyncPushModule = {
|
|
9178
9552
|
command: "push",
|
|
9179
9553
|
describe: "Pushes whole project data from files in a directory or package to Uniform",
|
|
9180
|
-
builder: (
|
|
9554
|
+
builder: (yargs35) => withConfiguration(
|
|
9181
9555
|
withApiOptions(
|
|
9182
9556
|
withProjectOptions(
|
|
9183
9557
|
withDiffOptions(
|
|
9184
|
-
|
|
9558
|
+
yargs35.option("what-if", {
|
|
9185
9559
|
alias: ["w"],
|
|
9186
9560
|
describe: "What-if mode reports what would be done but changes nothing",
|
|
9187
9561
|
default: false,
|
|
@@ -9193,11 +9567,6 @@ var SyncPushModule = {
|
|
|
9193
9567
|
),
|
|
9194
9568
|
handler: async ({ serialization, ...otherParams }) => {
|
|
9195
9569
|
const config2 = serialization;
|
|
9196
|
-
let isUsingDeprecatedPatternConfig = false;
|
|
9197
|
-
if (config2.entitiesConfig.pattern) {
|
|
9198
|
-
isUsingDeprecatedPatternConfig = true;
|
|
9199
|
-
config2.entitiesConfig.componentPattern ??= config2.entitiesConfig.pattern;
|
|
9200
|
-
}
|
|
9201
9570
|
const enabledEntities = Object.entries({
|
|
9202
9571
|
locale: LocalePushModule,
|
|
9203
9572
|
asset: AssetPushModule,
|
|
@@ -9211,7 +9580,9 @@ var SyncPushModule = {
|
|
|
9211
9580
|
enrichment: EnrichmentPushModule,
|
|
9212
9581
|
aggregate: AggregatePushModule,
|
|
9213
9582
|
component: ComponentPushModule,
|
|
9583
|
+
pattern: PatternPushModule,
|
|
9214
9584
|
componentPattern: ComponentPatternPushModule,
|
|
9585
|
+
compositionPattern: CompositionPatternPushModule,
|
|
9215
9586
|
composition: CompositionPushModule,
|
|
9216
9587
|
projectMapDefinition: ProjectMapDefinitionPushModule,
|
|
9217
9588
|
projectMapNode: ProjectMapNodePushModule,
|
|
@@ -9236,9 +9607,10 @@ var SyncPushModule = {
|
|
|
9236
9607
|
state: 0,
|
|
9237
9608
|
format: getFormat2(entityType, config2),
|
|
9238
9609
|
onlyCompositions: entityType === "composition" ? true : void 0,
|
|
9239
|
-
onlyPatterns:
|
|
9610
|
+
onlyPatterns: ["componentPattern", "compositionPattern"].includes(entityType) ? true : void 0,
|
|
9611
|
+
patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
|
|
9240
9612
|
mode: getPushMode(entityType, config2),
|
|
9241
|
-
directory: getPushFilename(entityType, config2
|
|
9613
|
+
directory: getPushFilename(entityType, config2),
|
|
9242
9614
|
allowEmptySource: config2.allowEmptySource
|
|
9243
9615
|
}),
|
|
9244
9616
|
{
|
|
@@ -9258,6 +9630,9 @@ var SyncPushModule = {
|
|
|
9258
9630
|
if (config2.entitiesConfig?.componentPattern && config2.entitiesConfig?.componentPattern?.push?.disabled !== true && config2.entitiesConfig?.componentPattern?.publish) {
|
|
9259
9631
|
await ComponentPatternPublishModule.handler({ ...otherParams, all: true });
|
|
9260
9632
|
}
|
|
9633
|
+
if (config2.entitiesConfig?.compositionPattern && config2.entitiesConfig?.compositionPattern?.push?.disabled !== true && config2.entitiesConfig?.compositionPattern?.publish) {
|
|
9634
|
+
await CompositionPatternPublishModule.handler({ ...otherParams, all: true });
|
|
9635
|
+
}
|
|
9261
9636
|
if (config2.entitiesConfig?.composition && config2.entitiesConfig?.composition?.push?.disabled !== true && config2.entitiesConfig?.composition?.publish) {
|
|
9262
9637
|
await CompositionPublishModule.handler({ ...otherParams, all: true });
|
|
9263
9638
|
}
|
|
@@ -9277,13 +9652,11 @@ var getPushMode = (entityType, config2) => {
|
|
|
9277
9652
|
entityType
|
|
9278
9653
|
});
|
|
9279
9654
|
};
|
|
9280
|
-
var getPushFilename = (entityType, config2
|
|
9655
|
+
var getPushFilename = (entityType, config2) => {
|
|
9281
9656
|
return getDirectoryOrFilename({
|
|
9282
9657
|
operation: "push",
|
|
9283
9658
|
config: config2,
|
|
9284
|
-
entityType
|
|
9285
|
-
// This fallback can be removed when publishing a major release
|
|
9286
|
-
defaultEntityFolderName: isUsingDeprecatedPatternConfig && entityType === "componentPattern" ? "pattern" : void 0
|
|
9659
|
+
entityType
|
|
9287
9660
|
});
|
|
9288
9661
|
};
|
|
9289
9662
|
var getFormat2 = (entityType, config2) => {
|
|
@@ -9299,9 +9672,9 @@ var getFormat2 = (entityType, config2) => {
|
|
|
9299
9672
|
var SyncCommand = {
|
|
9300
9673
|
command: "sync <command>",
|
|
9301
9674
|
describe: "Uniform Sync commands",
|
|
9302
|
-
builder: (
|
|
9675
|
+
builder: (yargs35) => yargs35.command(SyncPullModule).command(SyncPushModule).demandCommand(),
|
|
9303
9676
|
handler: () => {
|
|
9304
|
-
|
|
9677
|
+
yargs33.showHelp();
|
|
9305
9678
|
}
|
|
9306
9679
|
};
|
|
9307
9680
|
|
|
@@ -9568,7 +9941,7 @@ First found was: v${firstVersion}`;
|
|
|
9568
9941
|
|
|
9569
9942
|
// src/index.ts
|
|
9570
9943
|
dotenv.config();
|
|
9571
|
-
var yarggery =
|
|
9944
|
+
var yarggery = yargs34(hideBin(process.argv));
|
|
9572
9945
|
var inlineConfigurationFilePath = "config" in yarggery.argv && yarggery.argv.config;
|
|
9573
9946
|
var configuration = loadConfig(inlineConfigurationFilePath || null);
|
|
9574
9947
|
yarggery.option("verbose", {
|