@uniformdev/cli 20.49.4-alpha.102 → 20.49.4-alpha.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
import * as dotenv from "dotenv";
|
|
23
|
-
import
|
|
23
|
+
import yargs42 from "yargs";
|
|
24
24
|
import { hideBin } from "yargs/helpers";
|
|
25
25
|
|
|
26
26
|
// src/commands/ai/index.ts
|
|
@@ -1403,8 +1403,8 @@ function getExistingServers(config2) {
|
|
|
1403
1403
|
var InstallMcpCommand = {
|
|
1404
1404
|
command: "install",
|
|
1405
1405
|
describe: "Install Uniform MCP server configuration (use --team, --project, and --apiKey for non-interactive mode)",
|
|
1406
|
-
builder: (
|
|
1407
|
-
|
|
1406
|
+
builder: (yargs43) => withConfiguration(
|
|
1407
|
+
yargs43.option("agent", {
|
|
1408
1408
|
alias: "a",
|
|
1409
1409
|
describe: "Specify agent type (cursor, claude, copilot, other)",
|
|
1410
1410
|
type: "string",
|
|
@@ -1604,7 +1604,7 @@ Selected agent: ${agentType}`));
|
|
|
1604
1604
|
var McpCommand = {
|
|
1605
1605
|
command: "mcp <command>",
|
|
1606
1606
|
describe: "Uniform MCP server management commands",
|
|
1607
|
-
builder: (
|
|
1607
|
+
builder: (yargs43) => yargs43.command(InstallMcpCommand).demandCommand(),
|
|
1608
1608
|
handler: () => {
|
|
1609
1609
|
yargs.showHelp();
|
|
1610
1610
|
}
|
|
@@ -2079,8 +2079,8 @@ ${gray2("Rules source:")} https://github.com/uniformdev/ai-rules`);
|
|
|
2079
2079
|
var InstallRulesCommand = {
|
|
2080
2080
|
command: "install",
|
|
2081
2081
|
describe: "Install Uniform AI rules for your development assistant",
|
|
2082
|
-
builder: (
|
|
2083
|
-
|
|
2082
|
+
builder: (yargs43) => withConfiguration(
|
|
2083
|
+
yargs43.option("agent", {
|
|
2084
2084
|
alias: "a",
|
|
2085
2085
|
describe: "Specify agent type (cursor, claude, copilot, other)",
|
|
2086
2086
|
type: "string",
|
|
@@ -2118,7 +2118,7 @@ import { blue as blue4, bold as bold2, gray as gray3, green as green5, red as re
|
|
|
2118
2118
|
var ListRulesCommand = {
|
|
2119
2119
|
command: "list",
|
|
2120
2120
|
describe: "List available Uniform AI rules",
|
|
2121
|
-
builder: (
|
|
2121
|
+
builder: (yargs43) => withConfiguration(yargs43),
|
|
2122
2122
|
handler: async function() {
|
|
2123
2123
|
const { stopAllSpinners, spin } = makeSpinner();
|
|
2124
2124
|
try {
|
|
@@ -2147,7 +2147,7 @@ var ListRulesCommand = {
|
|
|
2147
2147
|
var RulesCommand = {
|
|
2148
2148
|
command: "rules <command>",
|
|
2149
2149
|
describe: "Uniform AI rules management commands",
|
|
2150
|
-
builder: (
|
|
2150
|
+
builder: (yargs43) => yargs43.command(InstallRulesCommand).command(ListRulesCommand).demandCommand(),
|
|
2151
2151
|
handler: () => {
|
|
2152
2152
|
yargs2.showHelp();
|
|
2153
2153
|
}
|
|
@@ -2157,14 +2157,14 @@ var RulesCommand = {
|
|
|
2157
2157
|
var AiCommand = {
|
|
2158
2158
|
command: "ai <command>",
|
|
2159
2159
|
describe: "Uniform AI development assistant commands",
|
|
2160
|
-
builder: (
|
|
2160
|
+
builder: (yargs43) => yargs43.command(RulesCommand).command(McpCommand).demandCommand(),
|
|
2161
2161
|
handler: () => {
|
|
2162
2162
|
yargs3.showHelp();
|
|
2163
2163
|
}
|
|
2164
2164
|
};
|
|
2165
2165
|
|
|
2166
2166
|
// src/commands/canvas/index.ts
|
|
2167
|
-
import
|
|
2167
|
+
import yargs21 from "yargs";
|
|
2168
2168
|
|
|
2169
2169
|
// src/commands/canvas/commands/asset.ts
|
|
2170
2170
|
import yargs4 from "yargs";
|
|
@@ -2196,12 +2196,12 @@ function getFileClient(options) {
|
|
|
2196
2196
|
var AssetGetModule = {
|
|
2197
2197
|
command: "get <id>",
|
|
2198
2198
|
describe: "Get an asset",
|
|
2199
|
-
builder: (
|
|
2199
|
+
builder: (yargs43) => withConfiguration(
|
|
2200
2200
|
withDebugOptions(
|
|
2201
2201
|
withFormatOptions(
|
|
2202
2202
|
withApiOptions(
|
|
2203
2203
|
withProjectOptions(
|
|
2204
|
-
|
|
2204
|
+
yargs43.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
|
|
2205
2205
|
)
|
|
2206
2206
|
)
|
|
2207
2207
|
)
|
|
@@ -2222,7 +2222,7 @@ var AssetGetModule = {
|
|
|
2222
2222
|
var AssetListModule = {
|
|
2223
2223
|
command: "list",
|
|
2224
2224
|
describe: "List assets",
|
|
2225
|
-
builder: (
|
|
2225
|
+
builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
|
|
2226
2226
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
2227
2227
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
2228
2228
|
const client = getAssetClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -2784,8 +2784,8 @@ function prepCompositionForDisk(composition) {
|
|
|
2784
2784
|
delete prepped.state;
|
|
2785
2785
|
return prepped;
|
|
2786
2786
|
}
|
|
2787
|
-
function withStateOptions(
|
|
2788
|
-
return
|
|
2787
|
+
function withStateOptions(yargs43, defaultState = "preview") {
|
|
2788
|
+
return yargs43.option("state", {
|
|
2789
2789
|
type: "string",
|
|
2790
2790
|
describe: `State to fetch.`,
|
|
2791
2791
|
choices: ["preview", "published"],
|
|
@@ -2867,12 +2867,12 @@ function writeCanvasPackage(filename, packageContents) {
|
|
|
2867
2867
|
var AssetPullModule = {
|
|
2868
2868
|
command: "pull <directory>",
|
|
2869
2869
|
describe: "Pulls all assets to local files in a directory",
|
|
2870
|
-
builder: (
|
|
2870
|
+
builder: (yargs43) => withConfiguration(
|
|
2871
2871
|
withApiOptions(
|
|
2872
2872
|
withDebugOptions(
|
|
2873
2873
|
withProjectOptions(
|
|
2874
2874
|
withDiffOptions(
|
|
2875
|
-
|
|
2875
|
+
yargs43.positional("directory", {
|
|
2876
2876
|
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.",
|
|
2877
2877
|
type: "string"
|
|
2878
2878
|
}).option("format", {
|
|
@@ -2984,12 +2984,12 @@ var AssetPullModule = {
|
|
|
2984
2984
|
var AssetPushModule = {
|
|
2985
2985
|
command: "push <directory>",
|
|
2986
2986
|
describe: "Pushes all assets from files in a directory to Uniform",
|
|
2987
|
-
builder: (
|
|
2987
|
+
builder: (yargs43) => withConfiguration(
|
|
2988
2988
|
withApiOptions(
|
|
2989
2989
|
withDebugOptions(
|
|
2990
2990
|
withProjectOptions(
|
|
2991
2991
|
withDiffOptions(
|
|
2992
|
-
|
|
2992
|
+
yargs43.positional("directory", {
|
|
2993
2993
|
describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
|
|
2994
2994
|
type: "string"
|
|
2995
2995
|
}).option("mode", {
|
|
@@ -3113,10 +3113,10 @@ var AssetRemoveModule = {
|
|
|
3113
3113
|
command: "remove <id>",
|
|
3114
3114
|
aliases: ["delete", "rm"],
|
|
3115
3115
|
describe: "Delete an asset",
|
|
3116
|
-
builder: (
|
|
3116
|
+
builder: (yargs43) => withConfiguration(
|
|
3117
3117
|
withDebugOptions(
|
|
3118
3118
|
withApiOptions(
|
|
3119
|
-
withProjectOptions(
|
|
3119
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
|
|
3120
3120
|
)
|
|
3121
3121
|
)
|
|
3122
3122
|
),
|
|
@@ -3137,11 +3137,11 @@ var AssetUpdateModule = {
|
|
|
3137
3137
|
command: "update <filename>",
|
|
3138
3138
|
aliases: ["put"],
|
|
3139
3139
|
describe: "Insert or update an asset",
|
|
3140
|
-
builder: (
|
|
3140
|
+
builder: (yargs43) => withConfiguration(
|
|
3141
3141
|
withDebugOptions(
|
|
3142
3142
|
withApiOptions(
|
|
3143
3143
|
withProjectOptions(
|
|
3144
|
-
|
|
3144
|
+
yargs43.positional("filename", { demandOption: true, describe: "Asset file to put" })
|
|
3145
3145
|
)
|
|
3146
3146
|
)
|
|
3147
3147
|
)
|
|
@@ -3167,7 +3167,7 @@ var AssetUpdateModule = {
|
|
|
3167
3167
|
var AssetModule = {
|
|
3168
3168
|
command: "asset <command>",
|
|
3169
3169
|
describe: "Commands for Assets",
|
|
3170
|
-
builder: (
|
|
3170
|
+
builder: (yargs43) => yargs43.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
|
|
3171
3171
|
handler: () => {
|
|
3172
3172
|
yargs4.help();
|
|
3173
3173
|
}
|
|
@@ -3188,12 +3188,12 @@ function getCategoryClient(options) {
|
|
|
3188
3188
|
var CategoryGetModule = {
|
|
3189
3189
|
command: "get <id>",
|
|
3190
3190
|
describe: "Fetch a category",
|
|
3191
|
-
builder: (
|
|
3191
|
+
builder: (yargs43) => withConfiguration(
|
|
3192
3192
|
withFormatOptions(
|
|
3193
3193
|
withDebugOptions(
|
|
3194
3194
|
withApiOptions(
|
|
3195
3195
|
withProjectOptions(
|
|
3196
|
-
|
|
3196
|
+
yargs43.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
|
|
3197
3197
|
)
|
|
3198
3198
|
)
|
|
3199
3199
|
)
|
|
@@ -3218,8 +3218,8 @@ var CategoryListModule = {
|
|
|
3218
3218
|
command: "list",
|
|
3219
3219
|
describe: "List categories",
|
|
3220
3220
|
aliases: ["ls"],
|
|
3221
|
-
builder: (
|
|
3222
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
3221
|
+
builder: (yargs43) => withConfiguration(
|
|
3222
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs43.options({})))))
|
|
3223
3223
|
),
|
|
3224
3224
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
3225
3225
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -3263,12 +3263,12 @@ function createCategoriesEngineDataSource({
|
|
|
3263
3263
|
var CategoryPullModule = {
|
|
3264
3264
|
command: "pull <directory>",
|
|
3265
3265
|
describe: "Pulls all categories to local files in a directory",
|
|
3266
|
-
builder: (
|
|
3266
|
+
builder: (yargs43) => withConfiguration(
|
|
3267
3267
|
withApiOptions(
|
|
3268
3268
|
withProjectOptions(
|
|
3269
3269
|
withDiffOptions(
|
|
3270
3270
|
withDebugOptions(
|
|
3271
|
-
|
|
3271
|
+
yargs43.positional("directory", {
|
|
3272
3272
|
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.",
|
|
3273
3273
|
type: "string"
|
|
3274
3274
|
}).option("format", {
|
|
@@ -3343,12 +3343,12 @@ var CategoryPullModule = {
|
|
|
3343
3343
|
var CategoryPushModule = {
|
|
3344
3344
|
command: "push <directory>",
|
|
3345
3345
|
describe: "Pushes all categories from files in a directory to Uniform Canvas",
|
|
3346
|
-
builder: (
|
|
3346
|
+
builder: (yargs43) => withConfiguration(
|
|
3347
3347
|
withApiOptions(
|
|
3348
3348
|
withDebugOptions(
|
|
3349
3349
|
withProjectOptions(
|
|
3350
3350
|
withDiffOptions(
|
|
3351
|
-
|
|
3351
|
+
yargs43.positional("directory", {
|
|
3352
3352
|
describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
|
|
3353
3353
|
type: "string"
|
|
3354
3354
|
}).option("mode", {
|
|
@@ -3412,11 +3412,11 @@ var CategoryRemoveModule = {
|
|
|
3412
3412
|
command: "remove <id>",
|
|
3413
3413
|
aliases: ["delete", "rm"],
|
|
3414
3414
|
describe: "Delete a category",
|
|
3415
|
-
builder: (
|
|
3415
|
+
builder: (yargs43) => withConfiguration(
|
|
3416
3416
|
withApiOptions(
|
|
3417
3417
|
withDebugOptions(
|
|
3418
3418
|
withProjectOptions(
|
|
3419
|
-
|
|
3419
|
+
yargs43.positional("id", { demandOption: true, describe: "Category UUID to delete" })
|
|
3420
3420
|
)
|
|
3421
3421
|
)
|
|
3422
3422
|
)
|
|
@@ -3437,11 +3437,11 @@ var CategoryUpdateModule = {
|
|
|
3437
3437
|
command: "update <filename>",
|
|
3438
3438
|
aliases: ["put"],
|
|
3439
3439
|
describe: "Insert or update a category",
|
|
3440
|
-
builder: (
|
|
3440
|
+
builder: (yargs43) => withConfiguration(
|
|
3441
3441
|
withApiOptions(
|
|
3442
3442
|
withDebugOptions(
|
|
3443
3443
|
withProjectOptions(
|
|
3444
|
-
|
|
3444
|
+
yargs43.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
3445
3445
|
)
|
|
3446
3446
|
)
|
|
3447
3447
|
)
|
|
@@ -3463,7 +3463,7 @@ var CategoryModule = {
|
|
|
3463
3463
|
command: "category <command>",
|
|
3464
3464
|
aliases: ["cat"],
|
|
3465
3465
|
describe: "Commands for Canvas categories",
|
|
3466
|
-
builder: (
|
|
3466
|
+
builder: (yargs43) => yargs43.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
|
|
3467
3467
|
handler: () => {
|
|
3468
3468
|
yargs5.help();
|
|
3469
3469
|
}
|
|
@@ -3485,12 +3485,12 @@ function getCanvasClient(options) {
|
|
|
3485
3485
|
var ComponentGetModule = {
|
|
3486
3486
|
command: "get <id>",
|
|
3487
3487
|
describe: "Fetch a component definition",
|
|
3488
|
-
builder: (
|
|
3488
|
+
builder: (yargs43) => withConfiguration(
|
|
3489
3489
|
withFormatOptions(
|
|
3490
3490
|
withDebugOptions(
|
|
3491
3491
|
withApiOptions(
|
|
3492
3492
|
withProjectOptions(
|
|
3493
|
-
|
|
3493
|
+
yargs43.positional("id", {
|
|
3494
3494
|
demandOption: true,
|
|
3495
3495
|
describe: "Component definition public ID to fetch"
|
|
3496
3496
|
})
|
|
@@ -3524,12 +3524,12 @@ var ComponentListModule = {
|
|
|
3524
3524
|
command: "list",
|
|
3525
3525
|
describe: "List component definitions",
|
|
3526
3526
|
aliases: ["ls"],
|
|
3527
|
-
builder: (
|
|
3527
|
+
builder: (yargs43) => withConfiguration(
|
|
3528
3528
|
withFormatOptions(
|
|
3529
3529
|
withDebugOptions(
|
|
3530
3530
|
withApiOptions(
|
|
3531
3531
|
withProjectOptions(
|
|
3532
|
-
|
|
3532
|
+
yargs43.options({
|
|
3533
3533
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3534
3534
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
|
|
3535
3535
|
})
|
|
@@ -3598,12 +3598,12 @@ function createComponentDefinitionEngineDataSource({
|
|
|
3598
3598
|
var ComponentPullModule = {
|
|
3599
3599
|
command: "pull <directory>",
|
|
3600
3600
|
describe: "Pulls all component definitions to local files in a directory",
|
|
3601
|
-
builder: (
|
|
3601
|
+
builder: (yargs43) => withConfiguration(
|
|
3602
3602
|
withApiOptions(
|
|
3603
3603
|
withDebugOptions(
|
|
3604
3604
|
withProjectOptions(
|
|
3605
3605
|
withDiffOptions(
|
|
3606
|
-
|
|
3606
|
+
yargs43.positional("directory", {
|
|
3607
3607
|
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.",
|
|
3608
3608
|
type: "string"
|
|
3609
3609
|
}).option("format", {
|
|
@@ -3679,12 +3679,12 @@ var ComponentPullModule = {
|
|
|
3679
3679
|
var ComponentPushModule = {
|
|
3680
3680
|
command: "push <directory>",
|
|
3681
3681
|
describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
|
|
3682
|
-
builder: (
|
|
3682
|
+
builder: (yargs43) => withConfiguration(
|
|
3683
3683
|
withApiOptions(
|
|
3684
3684
|
withDebugOptions(
|
|
3685
3685
|
withProjectOptions(
|
|
3686
3686
|
withDiffOptions(
|
|
3687
|
-
|
|
3687
|
+
yargs43.positional("directory", {
|
|
3688
3688
|
describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
|
|
3689
3689
|
type: "string"
|
|
3690
3690
|
}).option("mode", {
|
|
@@ -3749,11 +3749,11 @@ var ComponentRemoveModule = {
|
|
|
3749
3749
|
command: "remove <id>",
|
|
3750
3750
|
aliases: ["delete", "rm"],
|
|
3751
3751
|
describe: "Delete a component definition",
|
|
3752
|
-
builder: (
|
|
3752
|
+
builder: (yargs43) => withConfiguration(
|
|
3753
3753
|
withDebugOptions(
|
|
3754
3754
|
withApiOptions(
|
|
3755
3755
|
withProjectOptions(
|
|
3756
|
-
|
|
3756
|
+
yargs43.positional("id", {
|
|
3757
3757
|
demandOption: true,
|
|
3758
3758
|
describe: "Component definition public ID to delete"
|
|
3759
3759
|
})
|
|
@@ -3777,11 +3777,11 @@ var ComponentUpdateModule = {
|
|
|
3777
3777
|
command: "update <filename>",
|
|
3778
3778
|
aliases: ["put"],
|
|
3779
3779
|
describe: "Insert or update a component definition",
|
|
3780
|
-
builder: (
|
|
3780
|
+
builder: (yargs43) => withConfiguration(
|
|
3781
3781
|
withApiOptions(
|
|
3782
3782
|
withDebugOptions(
|
|
3783
3783
|
withProjectOptions(
|
|
3784
|
-
|
|
3784
|
+
yargs43.positional("filename", { demandOption: true, describe: "Component definition file to put" })
|
|
3785
3785
|
)
|
|
3786
3786
|
)
|
|
3787
3787
|
)
|
|
@@ -3803,7 +3803,7 @@ var ComponentModule = {
|
|
|
3803
3803
|
command: "component <command>",
|
|
3804
3804
|
aliases: ["def"],
|
|
3805
3805
|
describe: "Commands for Canvas component definitions",
|
|
3806
|
-
builder: (
|
|
3806
|
+
builder: (yargs43) => yargs43.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
|
|
3807
3807
|
handler: () => {
|
|
3808
3808
|
yargs6.help();
|
|
3809
3809
|
}
|
|
@@ -3816,13 +3816,13 @@ import yargs7 from "yargs";
|
|
|
3816
3816
|
var CompositionGetModule = {
|
|
3817
3817
|
command: "get <id>",
|
|
3818
3818
|
describe: "Fetch a composition",
|
|
3819
|
-
builder: (
|
|
3819
|
+
builder: (yargs43) => withFormatOptions(
|
|
3820
3820
|
withConfiguration(
|
|
3821
3821
|
withApiOptions(
|
|
3822
3822
|
withProjectOptions(
|
|
3823
3823
|
withStateOptions(
|
|
3824
3824
|
withDebugOptions(
|
|
3825
|
-
|
|
3825
|
+
yargs43.positional("id", {
|
|
3826
3826
|
demandOption: true,
|
|
3827
3827
|
describe: "Composition/pattern public ID to fetch"
|
|
3828
3828
|
}).option({
|
|
@@ -3912,13 +3912,13 @@ var CompositionListModule = {
|
|
|
3912
3912
|
command: "list",
|
|
3913
3913
|
describe: "List compositions",
|
|
3914
3914
|
aliases: ["ls"],
|
|
3915
|
-
builder: (
|
|
3915
|
+
builder: (yargs43) => withFormatOptions(
|
|
3916
3916
|
withConfiguration(
|
|
3917
3917
|
withApiOptions(
|
|
3918
3918
|
withProjectOptions(
|
|
3919
3919
|
withDebugOptions(
|
|
3920
3920
|
withStateOptions(
|
|
3921
|
-
|
|
3921
|
+
yargs43.options({
|
|
3922
3922
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3923
3923
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
3924
3924
|
search: { describe: "Search query", type: "string", default: "" },
|
|
@@ -3999,13 +3999,13 @@ var CompositionListModule = {
|
|
|
3999
3999
|
var ComponentPatternListModule = {
|
|
4000
4000
|
...CompositionListModule,
|
|
4001
4001
|
describe: "List component patterns",
|
|
4002
|
-
builder: (
|
|
4002
|
+
builder: (yargs43) => withFormatOptions(
|
|
4003
4003
|
withConfiguration(
|
|
4004
4004
|
withApiOptions(
|
|
4005
4005
|
withDebugOptions(
|
|
4006
4006
|
withProjectOptions(
|
|
4007
4007
|
withStateOptions(
|
|
4008
|
-
|
|
4008
|
+
yargs43.options({
|
|
4009
4009
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
4010
4010
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
4011
4011
|
resolvePatterns: {
|
|
@@ -4128,12 +4128,12 @@ function createComponentInstanceEngineDataSource({
|
|
|
4128
4128
|
var CompositionPublishModule = {
|
|
4129
4129
|
command: "publish [ids]",
|
|
4130
4130
|
describe: "Publishes composition(s)",
|
|
4131
|
-
builder: (
|
|
4131
|
+
builder: (yargs43) => withConfiguration(
|
|
4132
4132
|
withApiOptions(
|
|
4133
4133
|
withProjectOptions(
|
|
4134
4134
|
withDebugOptions(
|
|
4135
4135
|
withDiffOptions(
|
|
4136
|
-
|
|
4136
|
+
yargs43.positional("ids", {
|
|
4137
4137
|
describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4138
4138
|
type: "string"
|
|
4139
4139
|
}).option("all", {
|
|
@@ -4226,12 +4226,12 @@ var CompositionPublishModule = {
|
|
|
4226
4226
|
var ComponentPatternPublishModule = {
|
|
4227
4227
|
...CompositionPublishModule,
|
|
4228
4228
|
describe: "Publishes component pattern(s)",
|
|
4229
|
-
builder: (
|
|
4229
|
+
builder: (yargs43) => withConfiguration(
|
|
4230
4230
|
withApiOptions(
|
|
4231
4231
|
withDebugOptions(
|
|
4232
4232
|
withProjectOptions(
|
|
4233
4233
|
withDiffOptions(
|
|
4234
|
-
|
|
4234
|
+
yargs43.positional("ids", {
|
|
4235
4235
|
describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4236
4236
|
type: "string"
|
|
4237
4237
|
}).option("all", {
|
|
@@ -4271,13 +4271,13 @@ function componentInstancePullModuleFactory(type) {
|
|
|
4271
4271
|
return {
|
|
4272
4272
|
command: "pull <directory>",
|
|
4273
4273
|
describe: "Pulls all compositions to local files in a directory",
|
|
4274
|
-
builder: (
|
|
4274
|
+
builder: (yargs43) => withConfiguration(
|
|
4275
4275
|
withApiOptions(
|
|
4276
4276
|
withProjectOptions(
|
|
4277
4277
|
withStateOptions(
|
|
4278
4278
|
withDebugOptions(
|
|
4279
4279
|
withDiffOptions(
|
|
4280
|
-
|
|
4280
|
+
yargs43.positional("directory", {
|
|
4281
4281
|
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.",
|
|
4282
4282
|
type: "string"
|
|
4283
4283
|
}).option("format", {
|
|
@@ -4392,13 +4392,13 @@ function componentInstancePullModuleFactory(type) {
|
|
|
4392
4392
|
var ComponentPatternPullModule = {
|
|
4393
4393
|
...componentInstancePullModuleFactory("componentPatterns"),
|
|
4394
4394
|
describe: "Pulls all component patterns to local files in a directory",
|
|
4395
|
-
builder: (
|
|
4395
|
+
builder: (yargs43) => withConfiguration(
|
|
4396
4396
|
withApiOptions(
|
|
4397
4397
|
withProjectOptions(
|
|
4398
4398
|
withDebugOptions(
|
|
4399
4399
|
withStateOptions(
|
|
4400
4400
|
withDiffOptions(
|
|
4401
|
-
|
|
4401
|
+
yargs43.positional("directory", {
|
|
4402
4402
|
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.",
|
|
4403
4403
|
type: "string"
|
|
4404
4404
|
}).option("format", {
|
|
@@ -4472,13 +4472,13 @@ function componentInstancePushModuleFactory(type) {
|
|
|
4472
4472
|
return {
|
|
4473
4473
|
command: "push <directory>",
|
|
4474
4474
|
describe: "Pushes all compositions from files in a directory to Uniform Canvas",
|
|
4475
|
-
builder: (
|
|
4475
|
+
builder: (yargs43) => withConfiguration(
|
|
4476
4476
|
withApiOptions(
|
|
4477
4477
|
withProjectOptions(
|
|
4478
4478
|
withStateOptions(
|
|
4479
4479
|
withDebugOptions(
|
|
4480
4480
|
withDiffOptions(
|
|
4481
|
-
|
|
4481
|
+
yargs43.positional("directory", {
|
|
4482
4482
|
describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
|
|
4483
4483
|
type: "string"
|
|
4484
4484
|
}).option("mode", {
|
|
@@ -4592,13 +4592,13 @@ function componentInstancePushModuleFactory(type) {
|
|
|
4592
4592
|
var ComponentPatternPushModule = {
|
|
4593
4593
|
...componentInstancePushModuleFactory("componentPatterns"),
|
|
4594
4594
|
describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
|
|
4595
|
-
builder: (
|
|
4595
|
+
builder: (yargs43) => withConfiguration(
|
|
4596
4596
|
withApiOptions(
|
|
4597
4597
|
withProjectOptions(
|
|
4598
4598
|
withStateOptions(
|
|
4599
4599
|
withDiffOptions(
|
|
4600
4600
|
withDebugOptions(
|
|
4601
|
-
|
|
4601
|
+
yargs43.positional("directory", {
|
|
4602
4602
|
describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
|
|
4603
4603
|
type: "string"
|
|
4604
4604
|
}).option("mode", {
|
|
@@ -4632,11 +4632,11 @@ var CompositionRemoveModule = {
|
|
|
4632
4632
|
command: "remove <id>",
|
|
4633
4633
|
aliases: ["delete", "rm"],
|
|
4634
4634
|
describe: "Delete a composition",
|
|
4635
|
-
builder: (
|
|
4635
|
+
builder: (yargs43) => withConfiguration(
|
|
4636
4636
|
withApiOptions(
|
|
4637
4637
|
withDebugOptions(
|
|
4638
4638
|
withProjectOptions(
|
|
4639
|
-
|
|
4639
|
+
yargs43.positional("id", {
|
|
4640
4640
|
demandOption: true,
|
|
4641
4641
|
describe: "Composition/pattern public ID to delete"
|
|
4642
4642
|
})
|
|
@@ -4673,11 +4673,11 @@ import { diffJson as diffJson2 } from "diff";
|
|
|
4673
4673
|
var CompositionUnpublishModule = {
|
|
4674
4674
|
command: "unpublish [ids]",
|
|
4675
4675
|
describe: "Unpublish a composition(s)",
|
|
4676
|
-
builder: (
|
|
4676
|
+
builder: (yargs43) => withConfiguration(
|
|
4677
4677
|
withApiOptions(
|
|
4678
4678
|
withDebugOptions(
|
|
4679
4679
|
withProjectOptions(
|
|
4680
|
-
|
|
4680
|
+
yargs43.positional("ids", {
|
|
4681
4681
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4682
4682
|
type: "string"
|
|
4683
4683
|
}).option("all", {
|
|
@@ -4788,11 +4788,11 @@ var CompositionUnpublishModule = {
|
|
|
4788
4788
|
var ComponentPatternUnpublishModule = {
|
|
4789
4789
|
command: "unpublish [ids]",
|
|
4790
4790
|
describe: "Unpublish a component pattern(s)",
|
|
4791
|
-
builder: (
|
|
4791
|
+
builder: (yargs43) => withConfiguration(
|
|
4792
4792
|
withApiOptions(
|
|
4793
4793
|
withDebugOptions(
|
|
4794
4794
|
withProjectOptions(
|
|
4795
|
-
|
|
4795
|
+
yargs43.positional("ids", {
|
|
4796
4796
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4797
4797
|
type: "string"
|
|
4798
4798
|
}).option("all", {
|
|
@@ -4826,12 +4826,12 @@ var CompositionUpdateModule = {
|
|
|
4826
4826
|
command: "update <filename>",
|
|
4827
4827
|
aliases: ["put"],
|
|
4828
4828
|
describe: "Insert or update a composition",
|
|
4829
|
-
builder: (
|
|
4829
|
+
builder: (yargs43) => withConfiguration(
|
|
4830
4830
|
withApiOptions(
|
|
4831
4831
|
withProjectOptions(
|
|
4832
4832
|
withDebugOptions(
|
|
4833
4833
|
withStateOptions(
|
|
4834
|
-
|
|
4834
|
+
yargs43.positional("filename", {
|
|
4835
4835
|
demandOption: true,
|
|
4836
4836
|
describe: "Composition/pattern file to put"
|
|
4837
4837
|
})
|
|
@@ -4869,7 +4869,7 @@ var ComponentPatternUpdateModule = {
|
|
|
4869
4869
|
var ComponentPatternModule = {
|
|
4870
4870
|
command: "component-pattern <command>",
|
|
4871
4871
|
describe: "Commands for Canvas component patterns",
|
|
4872
|
-
builder: (
|
|
4872
|
+
builder: (yargs43) => yargs43.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
|
|
4873
4873
|
handler: () => {
|
|
4874
4874
|
yargs7.help();
|
|
4875
4875
|
}
|
|
@@ -4881,7 +4881,7 @@ var CompositionModule = {
|
|
|
4881
4881
|
command: "composition <command>",
|
|
4882
4882
|
describe: "Commands for Canvas compositions",
|
|
4883
4883
|
aliases: ["comp"],
|
|
4884
|
-
builder: (
|
|
4884
|
+
builder: (yargs43) => yargs43.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
|
|
4885
4885
|
handler: () => {
|
|
4886
4886
|
yargs8.help();
|
|
4887
4887
|
}
|
|
@@ -4900,13 +4900,13 @@ var CompositionPatternGetModule = {
|
|
|
4900
4900
|
var CompositionPatternListModule = {
|
|
4901
4901
|
...CompositionListModule,
|
|
4902
4902
|
describe: "List composition patterns",
|
|
4903
|
-
builder: (
|
|
4903
|
+
builder: (yargs43) => withFormatOptions(
|
|
4904
4904
|
withConfiguration(
|
|
4905
4905
|
withApiOptions(
|
|
4906
4906
|
withDebugOptions(
|
|
4907
4907
|
withProjectOptions(
|
|
4908
4908
|
withStateOptions(
|
|
4909
|
-
|
|
4909
|
+
yargs43.options({
|
|
4910
4910
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
4911
4911
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
4912
4912
|
resolvePatterns: {
|
|
@@ -4950,12 +4950,12 @@ var CompositionPatternListModule = {
|
|
|
4950
4950
|
var CompositionPatternPublishModule = {
|
|
4951
4951
|
...CompositionPublishModule,
|
|
4952
4952
|
describe: "Publishes composition pattern(s)",
|
|
4953
|
-
builder: (
|
|
4953
|
+
builder: (yargs43) => withConfiguration(
|
|
4954
4954
|
withApiOptions(
|
|
4955
4955
|
withDebugOptions(
|
|
4956
4956
|
withProjectOptions(
|
|
4957
4957
|
withDiffOptions(
|
|
4958
|
-
|
|
4958
|
+
yargs43.positional("ids", {
|
|
4959
4959
|
describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4960
4960
|
type: "string"
|
|
4961
4961
|
}).option("all", {
|
|
@@ -4994,13 +4994,13 @@ var CompositionPatternPublishModule = {
|
|
|
4994
4994
|
var CompositionPatternPullModule = {
|
|
4995
4995
|
...componentInstancePullModuleFactory("compositionPatterns"),
|
|
4996
4996
|
describe: "Pulls all composition patterns to local files in a directory",
|
|
4997
|
-
builder: (
|
|
4997
|
+
builder: (yargs43) => withConfiguration(
|
|
4998
4998
|
withApiOptions(
|
|
4999
4999
|
withDebugOptions(
|
|
5000
5000
|
withProjectOptions(
|
|
5001
5001
|
withStateOptions(
|
|
5002
5002
|
withDiffOptions(
|
|
5003
|
-
|
|
5003
|
+
yargs43.positional("directory", {
|
|
5004
5004
|
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.",
|
|
5005
5005
|
type: "string"
|
|
5006
5006
|
}).option("format", {
|
|
@@ -5038,13 +5038,13 @@ var CompositionPatternPullModule = {
|
|
|
5038
5038
|
var CompositionPatternPushModule = {
|
|
5039
5039
|
...componentInstancePushModuleFactory("compositionPatterns"),
|
|
5040
5040
|
describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
|
|
5041
|
-
builder: (
|
|
5041
|
+
builder: (yargs43) => withConfiguration(
|
|
5042
5042
|
withApiOptions(
|
|
5043
5043
|
withDebugOptions(
|
|
5044
5044
|
withProjectOptions(
|
|
5045
5045
|
withStateOptions(
|
|
5046
5046
|
withDiffOptions(
|
|
5047
|
-
|
|
5047
|
+
yargs43.positional("directory", {
|
|
5048
5048
|
describe: "Directory to read the compositions patterns from. If a filename is used, a package will be read instead.",
|
|
5049
5049
|
type: "string"
|
|
5050
5050
|
}).option("mode", {
|
|
@@ -5083,11 +5083,11 @@ var CompositionPatternRemoveModule = {
|
|
|
5083
5083
|
var CompositionPatternUnpublishModule = {
|
|
5084
5084
|
command: "unpublish [ids]",
|
|
5085
5085
|
describe: "Unpublish a composition pattern(s)",
|
|
5086
|
-
builder: (
|
|
5086
|
+
builder: (yargs43) => withConfiguration(
|
|
5087
5087
|
withApiOptions(
|
|
5088
5088
|
withDebugOptions(
|
|
5089
5089
|
withProjectOptions(
|
|
5090
|
-
|
|
5090
|
+
yargs43.positional("ids", {
|
|
5091
5091
|
describe: "Un-publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
5092
5092
|
type: "string"
|
|
5093
5093
|
}).option("all", {
|
|
@@ -5123,7 +5123,7 @@ var CompositionPatternUpdateModule = {
|
|
|
5123
5123
|
var CompositionPatternModule = {
|
|
5124
5124
|
command: "composition-pattern <command>",
|
|
5125
5125
|
describe: "Commands for Canvas composition patterns",
|
|
5126
|
-
builder: (
|
|
5126
|
+
builder: (yargs43) => yargs43.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
|
|
5127
5127
|
handler: () => {
|
|
5128
5128
|
yargs9.help();
|
|
5129
5129
|
}
|
|
@@ -5144,12 +5144,12 @@ function getContentClient(options) {
|
|
|
5144
5144
|
var ContentTypeGetModule = {
|
|
5145
5145
|
command: "get <id>",
|
|
5146
5146
|
describe: "Get a content type",
|
|
5147
|
-
builder: (
|
|
5147
|
+
builder: (yargs43) => withConfiguration(
|
|
5148
5148
|
withDebugOptions(
|
|
5149
5149
|
withFormatOptions(
|
|
5150
5150
|
withApiOptions(
|
|
5151
5151
|
withProjectOptions(
|
|
5152
|
-
|
|
5152
|
+
yargs43.positional("id", {
|
|
5153
5153
|
demandOption: true,
|
|
5154
5154
|
describe: "Content type public ID to fetch"
|
|
5155
5155
|
})
|
|
@@ -5174,7 +5174,7 @@ var ContentTypeGetModule = {
|
|
|
5174
5174
|
var ContentTypeListModule = {
|
|
5175
5175
|
command: "list",
|
|
5176
5176
|
describe: "List content types",
|
|
5177
|
-
builder: (
|
|
5177
|
+
builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
|
|
5178
5178
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5179
5179
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
5180
5180
|
const client = getContentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -5215,12 +5215,12 @@ function createContentTypeEngineDataSource({
|
|
|
5215
5215
|
var ContentTypePullModule = {
|
|
5216
5216
|
command: "pull <directory>",
|
|
5217
5217
|
describe: "Pulls all content types to local files in a directory",
|
|
5218
|
-
builder: (
|
|
5218
|
+
builder: (yargs43) => withConfiguration(
|
|
5219
5219
|
withApiOptions(
|
|
5220
5220
|
withDebugOptions(
|
|
5221
5221
|
withProjectOptions(
|
|
5222
5222
|
withDiffOptions(
|
|
5223
|
-
|
|
5223
|
+
yargs43.positional("directory", {
|
|
5224
5224
|
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.",
|
|
5225
5225
|
type: "string"
|
|
5226
5226
|
}).option("format", {
|
|
@@ -5300,12 +5300,12 @@ var ContentTypePullModule = {
|
|
|
5300
5300
|
var ContentTypePushModule = {
|
|
5301
5301
|
command: "push <directory>",
|
|
5302
5302
|
describe: "Pushes all content types from files in a directory to Uniform",
|
|
5303
|
-
builder: (
|
|
5303
|
+
builder: (yargs43) => withConfiguration(
|
|
5304
5304
|
withApiOptions(
|
|
5305
5305
|
withDebugOptions(
|
|
5306
5306
|
withProjectOptions(
|
|
5307
5307
|
withDiffOptions(
|
|
5308
|
-
|
|
5308
|
+
yargs43.positional("directory", {
|
|
5309
5309
|
describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
|
|
5310
5310
|
type: "string"
|
|
5311
5311
|
}).option("what-if", {
|
|
@@ -5379,11 +5379,11 @@ var ContentTypeRemoveModule = {
|
|
|
5379
5379
|
command: "remove <id>",
|
|
5380
5380
|
aliases: ["delete", "rm"],
|
|
5381
5381
|
describe: "Delete a content type",
|
|
5382
|
-
builder: (
|
|
5382
|
+
builder: (yargs43) => withConfiguration(
|
|
5383
5383
|
withDebugOptions(
|
|
5384
5384
|
withApiOptions(
|
|
5385
5385
|
withProjectOptions(
|
|
5386
|
-
|
|
5386
|
+
yargs43.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
|
|
5387
5387
|
)
|
|
5388
5388
|
)
|
|
5389
5389
|
)
|
|
@@ -5404,11 +5404,11 @@ var ContentTypeUpdateModule = {
|
|
|
5404
5404
|
command: "update <filename>",
|
|
5405
5405
|
aliases: ["put"],
|
|
5406
5406
|
describe: "Insert or update a content type",
|
|
5407
|
-
builder: (
|
|
5407
|
+
builder: (yargs43) => withConfiguration(
|
|
5408
5408
|
withDebugOptions(
|
|
5409
5409
|
withApiOptions(
|
|
5410
5410
|
withProjectOptions(
|
|
5411
|
-
|
|
5411
|
+
yargs43.positional("filename", { demandOption: true, describe: "Content type file to put" })
|
|
5412
5412
|
)
|
|
5413
5413
|
)
|
|
5414
5414
|
)
|
|
@@ -5430,7 +5430,7 @@ var ContentTypeModule = {
|
|
|
5430
5430
|
command: "contenttype <command>",
|
|
5431
5431
|
aliases: ["ct"],
|
|
5432
5432
|
describe: "Commands for Content Types",
|
|
5433
|
-
builder: (
|
|
5433
|
+
builder: (yargs43) => yargs43.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
|
|
5434
5434
|
handler: () => {
|
|
5435
5435
|
yargs10.help();
|
|
5436
5436
|
}
|
|
@@ -5449,11 +5449,11 @@ function getDataSourceClient(options) {
|
|
|
5449
5449
|
var DataSourceGetModule = {
|
|
5450
5450
|
command: "get <id>",
|
|
5451
5451
|
describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
|
|
5452
|
-
builder: (
|
|
5452
|
+
builder: (yargs43) => withConfiguration(
|
|
5453
5453
|
withApiOptions(
|
|
5454
5454
|
withDebugOptions(
|
|
5455
5455
|
withProjectOptions(
|
|
5456
|
-
|
|
5456
|
+
yargs43.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
|
|
5457
5457
|
)
|
|
5458
5458
|
)
|
|
5459
5459
|
)
|
|
@@ -5471,11 +5471,11 @@ var DataSourceRemoveModule = {
|
|
|
5471
5471
|
command: "remove <id>",
|
|
5472
5472
|
aliases: ["delete", "rm"],
|
|
5473
5473
|
describe: "Delete a data source",
|
|
5474
|
-
builder: (
|
|
5474
|
+
builder: (yargs43) => withConfiguration(
|
|
5475
5475
|
withDebugOptions(
|
|
5476
5476
|
withApiOptions(
|
|
5477
5477
|
withProjectOptions(
|
|
5478
|
-
|
|
5478
|
+
yargs43.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
|
|
5479
5479
|
)
|
|
5480
5480
|
)
|
|
5481
5481
|
)
|
|
@@ -5496,11 +5496,11 @@ var DataSourceUpdateModule = {
|
|
|
5496
5496
|
command: "update <dataSource>",
|
|
5497
5497
|
aliases: ["put"],
|
|
5498
5498
|
describe: "Insert or update a data source",
|
|
5499
|
-
builder: (
|
|
5499
|
+
builder: (yargs43) => withConfiguration(
|
|
5500
5500
|
withApiOptions(
|
|
5501
5501
|
withDebugOptions(
|
|
5502
5502
|
withProjectOptions(
|
|
5503
|
-
|
|
5503
|
+
yargs43.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
|
|
5504
5504
|
describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
|
|
5505
5505
|
type: "string",
|
|
5506
5506
|
demandOption: true
|
|
@@ -5535,7 +5535,7 @@ var DataSourceModule = {
|
|
|
5535
5535
|
command: "datasource <command>",
|
|
5536
5536
|
aliases: ["ds"],
|
|
5537
5537
|
describe: "Commands for Data Source definitions",
|
|
5538
|
-
builder: (
|
|
5538
|
+
builder: (yargs43) => yargs43.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
|
|
5539
5539
|
handler: () => {
|
|
5540
5540
|
yargs11.help();
|
|
5541
5541
|
}
|
|
@@ -5557,12 +5557,12 @@ var DataTypeGetModule = {
|
|
|
5557
5557
|
command: "get <id>",
|
|
5558
5558
|
describe: "Get a data type",
|
|
5559
5559
|
aliases: ["ls"],
|
|
5560
|
-
builder: (
|
|
5560
|
+
builder: (yargs43) => withConfiguration(
|
|
5561
5561
|
withFormatOptions(
|
|
5562
5562
|
withDebugOptions(
|
|
5563
5563
|
withApiOptions(
|
|
5564
5564
|
withProjectOptions(
|
|
5565
|
-
|
|
5565
|
+
yargs43.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
|
|
5566
5566
|
)
|
|
5567
5567
|
)
|
|
5568
5568
|
)
|
|
@@ -5585,7 +5585,7 @@ var DataTypeListModule = {
|
|
|
5585
5585
|
command: "list",
|
|
5586
5586
|
describe: "List data types",
|
|
5587
5587
|
aliases: ["ls"],
|
|
5588
|
-
builder: (
|
|
5588
|
+
builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
|
|
5589
5589
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5590
5590
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
5591
5591
|
const client = getDataTypeClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -5628,12 +5628,12 @@ function createDataTypeEngineDataSource({
|
|
|
5628
5628
|
var DataTypePullModule = {
|
|
5629
5629
|
command: "pull <directory>",
|
|
5630
5630
|
describe: "Pulls all data types to local files in a directory",
|
|
5631
|
-
builder: (
|
|
5631
|
+
builder: (yargs43) => withConfiguration(
|
|
5632
5632
|
withApiOptions(
|
|
5633
5633
|
withDebugOptions(
|
|
5634
5634
|
withProjectOptions(
|
|
5635
5635
|
withDiffOptions(
|
|
5636
|
-
|
|
5636
|
+
yargs43.positional("directory", {
|
|
5637
5637
|
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.",
|
|
5638
5638
|
type: "string"
|
|
5639
5639
|
}).option("format", {
|
|
@@ -5713,12 +5713,12 @@ var DataTypePullModule = {
|
|
|
5713
5713
|
var DataTypePushModule = {
|
|
5714
5714
|
command: "push <directory>",
|
|
5715
5715
|
describe: "Pushes all data types from files in a directory to Uniform",
|
|
5716
|
-
builder: (
|
|
5716
|
+
builder: (yargs43) => withConfiguration(
|
|
5717
5717
|
withApiOptions(
|
|
5718
5718
|
withDebugOptions(
|
|
5719
5719
|
withProjectOptions(
|
|
5720
5720
|
withDiffOptions(
|
|
5721
|
-
|
|
5721
|
+
yargs43.positional("directory", {
|
|
5722
5722
|
describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
|
|
5723
5723
|
type: "string"
|
|
5724
5724
|
}).option("mode", {
|
|
@@ -5787,11 +5787,11 @@ var DataTypeRemoveModule = {
|
|
|
5787
5787
|
command: "remove <id>",
|
|
5788
5788
|
aliases: ["delete", "rm"],
|
|
5789
5789
|
describe: "Delete a data type",
|
|
5790
|
-
builder: (
|
|
5790
|
+
builder: (yargs43) => withConfiguration(
|
|
5791
5791
|
withDebugOptions(
|
|
5792
5792
|
withApiOptions(
|
|
5793
5793
|
withProjectOptions(
|
|
5794
|
-
|
|
5794
|
+
yargs43.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
|
|
5795
5795
|
)
|
|
5796
5796
|
)
|
|
5797
5797
|
)
|
|
@@ -5812,11 +5812,11 @@ var DataTypeUpdateModule = {
|
|
|
5812
5812
|
command: "update <filename>",
|
|
5813
5813
|
aliases: ["put"],
|
|
5814
5814
|
describe: "Insert or update a data type",
|
|
5815
|
-
builder: (
|
|
5815
|
+
builder: (yargs43) => withConfiguration(
|
|
5816
5816
|
withDebugOptions(
|
|
5817
5817
|
withApiOptions(
|
|
5818
5818
|
withProjectOptions(
|
|
5819
|
-
|
|
5819
|
+
yargs43.positional("filename", { demandOption: true, describe: "Data type file to put" })
|
|
5820
5820
|
)
|
|
5821
5821
|
)
|
|
5822
5822
|
)
|
|
@@ -5838,7 +5838,7 @@ var DataTypeModule = {
|
|
|
5838
5838
|
command: "datatype <command>",
|
|
5839
5839
|
aliases: ["dt"],
|
|
5840
5840
|
describe: "Commands for Data Type definitions",
|
|
5841
|
-
builder: (
|
|
5841
|
+
builder: (yargs43) => yargs43.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
|
|
5842
5842
|
handler: () => {
|
|
5843
5843
|
yargs12.help();
|
|
5844
5844
|
}
|
|
@@ -5851,13 +5851,13 @@ import yargs13 from "yargs";
|
|
|
5851
5851
|
var EntryGetModule = {
|
|
5852
5852
|
command: "get <id>",
|
|
5853
5853
|
describe: "Get an entry",
|
|
5854
|
-
builder: (
|
|
5854
|
+
builder: (yargs43) => withConfiguration(
|
|
5855
5855
|
withDebugOptions(
|
|
5856
5856
|
withFormatOptions(
|
|
5857
5857
|
withApiOptions(
|
|
5858
5858
|
withProjectOptions(
|
|
5859
5859
|
withStateOptions(
|
|
5860
|
-
|
|
5860
|
+
yargs43.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
|
|
5861
5861
|
resolveData: {
|
|
5862
5862
|
type: "boolean",
|
|
5863
5863
|
default: false,
|
|
@@ -5929,13 +5929,13 @@ var LEGACY_DEFAULT_LIMIT = 1e3;
|
|
|
5929
5929
|
var EntryListModule = {
|
|
5930
5930
|
command: "list",
|
|
5931
5931
|
describe: "List entries",
|
|
5932
|
-
builder: (
|
|
5932
|
+
builder: (yargs43) => withConfiguration(
|
|
5933
5933
|
withDebugOptions(
|
|
5934
5934
|
withFormatOptions(
|
|
5935
5935
|
withApiOptions(
|
|
5936
5936
|
withProjectOptions(
|
|
5937
5937
|
withStateOptions(
|
|
5938
|
-
|
|
5938
|
+
yargs43.options({
|
|
5939
5939
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
5940
5940
|
limit: {
|
|
5941
5941
|
describe: "Number of rows to fetch",
|
|
@@ -6070,12 +6070,12 @@ function createEntryEngineDataSource({
|
|
|
6070
6070
|
var EntryPublishModule = {
|
|
6071
6071
|
command: "publish [ids]",
|
|
6072
6072
|
describe: "Publishes entry(ies)",
|
|
6073
|
-
builder: (
|
|
6073
|
+
builder: (yargs43) => withConfiguration(
|
|
6074
6074
|
withDebugOptions(
|
|
6075
6075
|
withDiffOptions(
|
|
6076
6076
|
withApiOptions(
|
|
6077
6077
|
withProjectOptions(
|
|
6078
|
-
|
|
6078
|
+
yargs43.positional("ids", {
|
|
6079
6079
|
describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
6080
6080
|
type: "string"
|
|
6081
6081
|
}).option("all", {
|
|
@@ -6150,13 +6150,13 @@ var EntryPublishModule = {
|
|
|
6150
6150
|
var EntryPullModule = {
|
|
6151
6151
|
command: "pull <directory>",
|
|
6152
6152
|
describe: "Pulls all entries to local files in a directory",
|
|
6153
|
-
builder: (
|
|
6153
|
+
builder: (yargs43) => withConfiguration(
|
|
6154
6154
|
withDebugOptions(
|
|
6155
6155
|
withApiOptions(
|
|
6156
6156
|
withProjectOptions(
|
|
6157
6157
|
withStateOptions(
|
|
6158
6158
|
withDiffOptions(
|
|
6159
|
-
|
|
6159
|
+
yargs43.positional("directory", {
|
|
6160
6160
|
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.",
|
|
6161
6161
|
type: "string"
|
|
6162
6162
|
}).option("format", {
|
|
@@ -6256,13 +6256,13 @@ var EntryPullModule = {
|
|
|
6256
6256
|
var EntryPushModule = {
|
|
6257
6257
|
command: "push <directory>",
|
|
6258
6258
|
describe: "Pushes all entries from files in a directory to Uniform",
|
|
6259
|
-
builder: (
|
|
6259
|
+
builder: (yargs43) => withConfiguration(
|
|
6260
6260
|
withDebugOptions(
|
|
6261
6261
|
withApiOptions(
|
|
6262
6262
|
withProjectOptions(
|
|
6263
6263
|
withStateOptions(
|
|
6264
6264
|
withDiffOptions(
|
|
6265
|
-
|
|
6265
|
+
yargs43.positional("directory", {
|
|
6266
6266
|
describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
|
|
6267
6267
|
type: "string"
|
|
6268
6268
|
}).option("mode", {
|
|
@@ -6361,11 +6361,11 @@ var EntryRemoveModule = {
|
|
|
6361
6361
|
command: "remove <id>",
|
|
6362
6362
|
aliases: ["delete", "rm"],
|
|
6363
6363
|
describe: "Delete an entry",
|
|
6364
|
-
builder: (
|
|
6364
|
+
builder: (yargs43) => withConfiguration(
|
|
6365
6365
|
withDebugOptions(
|
|
6366
6366
|
withApiOptions(
|
|
6367
6367
|
withProjectOptions(
|
|
6368
|
-
|
|
6368
|
+
yargs43.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
|
|
6369
6369
|
)
|
|
6370
6370
|
)
|
|
6371
6371
|
)
|
|
@@ -6387,11 +6387,11 @@ import { diffJson as diffJson3 } from "diff";
|
|
|
6387
6387
|
var EntryUnpublishModule = {
|
|
6388
6388
|
command: "unpublish [ids]",
|
|
6389
6389
|
describe: "Unpublish an entry(ies)",
|
|
6390
|
-
builder: (
|
|
6390
|
+
builder: (yargs43) => withConfiguration(
|
|
6391
6391
|
withDebugOptions(
|
|
6392
6392
|
withApiOptions(
|
|
6393
6393
|
withProjectOptions(
|
|
6394
|
-
|
|
6394
|
+
yargs43.positional("ids", {
|
|
6395
6395
|
describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
6396
6396
|
type: "string"
|
|
6397
6397
|
}).option("all", {
|
|
@@ -6476,12 +6476,12 @@ var EntryUpdateModule = {
|
|
|
6476
6476
|
command: "update <filename>",
|
|
6477
6477
|
aliases: ["put"],
|
|
6478
6478
|
describe: "Insert or update an entry",
|
|
6479
|
-
builder: (
|
|
6479
|
+
builder: (yargs43) => withConfiguration(
|
|
6480
6480
|
withDebugOptions(
|
|
6481
6481
|
withApiOptions(
|
|
6482
6482
|
withProjectOptions(
|
|
6483
6483
|
withStateOptions(
|
|
6484
|
-
|
|
6484
|
+
yargs43.positional("filename", { demandOption: true, describe: "Entry file to put" })
|
|
6485
6485
|
)
|
|
6486
6486
|
)
|
|
6487
6487
|
)
|
|
@@ -6513,7 +6513,7 @@ var EntryUpdateModule = {
|
|
|
6513
6513
|
var EntryModule = {
|
|
6514
6514
|
command: "entry <command>",
|
|
6515
6515
|
describe: "Commands for Entries",
|
|
6516
|
-
builder: (
|
|
6516
|
+
builder: (yargs43) => yargs43.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
|
|
6517
6517
|
handler: () => {
|
|
6518
6518
|
yargs13.help();
|
|
6519
6519
|
}
|
|
@@ -6526,13 +6526,13 @@ import yargs14 from "yargs";
|
|
|
6526
6526
|
var EntryPatternGetModule = {
|
|
6527
6527
|
command: "get <id>",
|
|
6528
6528
|
describe: "Get an entry pattern",
|
|
6529
|
-
builder: (
|
|
6529
|
+
builder: (yargs43) => withConfiguration(
|
|
6530
6530
|
withDebugOptions(
|
|
6531
6531
|
withFormatOptions(
|
|
6532
6532
|
withApiOptions(
|
|
6533
6533
|
withProjectOptions(
|
|
6534
6534
|
withStateOptions(
|
|
6535
|
-
|
|
6535
|
+
yargs43.positional("id", {
|
|
6536
6536
|
demandOption: true,
|
|
6537
6537
|
describe: "Entry pattern public ID to fetch"
|
|
6538
6538
|
}).option({
|
|
@@ -6585,13 +6585,13 @@ var EntryPatternGetModule = {
|
|
|
6585
6585
|
var EntryPatternListModule = {
|
|
6586
6586
|
command: "list",
|
|
6587
6587
|
describe: "List entry patterns",
|
|
6588
|
-
builder: (
|
|
6588
|
+
builder: (yargs43) => withConfiguration(
|
|
6589
6589
|
withDebugOptions(
|
|
6590
6590
|
withFormatOptions(
|
|
6591
6591
|
withApiOptions(
|
|
6592
6592
|
withProjectOptions(
|
|
6593
6593
|
withStateOptions(
|
|
6594
|
-
|
|
6594
|
+
yargs43.option({
|
|
6595
6595
|
withComponentIDs: {
|
|
6596
6596
|
type: "boolean",
|
|
6597
6597
|
default: false,
|
|
@@ -6637,12 +6637,12 @@ var EntryPatternListModule = {
|
|
|
6637
6637
|
var EntryPatternPublishModule = {
|
|
6638
6638
|
command: "publish [ids]",
|
|
6639
6639
|
describe: "Publishes entry pattern(s)",
|
|
6640
|
-
builder: (
|
|
6640
|
+
builder: (yargs43) => withConfiguration(
|
|
6641
6641
|
withDebugOptions(
|
|
6642
6642
|
withApiOptions(
|
|
6643
6643
|
withProjectOptions(
|
|
6644
6644
|
withDiffOptions(
|
|
6645
|
-
|
|
6645
|
+
yargs43.positional("ids", {
|
|
6646
6646
|
describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
6647
6647
|
type: "string"
|
|
6648
6648
|
}).option("all", {
|
|
@@ -6717,13 +6717,13 @@ var EntryPatternPublishModule = {
|
|
|
6717
6717
|
var EntryPatternPullModule = {
|
|
6718
6718
|
command: "pull <directory>",
|
|
6719
6719
|
describe: "Pulls all entry patterns to local files in a directory",
|
|
6720
|
-
builder: (
|
|
6720
|
+
builder: (yargs43) => withConfiguration(
|
|
6721
6721
|
withApiOptions(
|
|
6722
6722
|
withDebugOptions(
|
|
6723
6723
|
withProjectOptions(
|
|
6724
6724
|
withStateOptions(
|
|
6725
6725
|
withDiffOptions(
|
|
6726
|
-
|
|
6726
|
+
yargs43.positional("directory", {
|
|
6727
6727
|
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.",
|
|
6728
6728
|
type: "string"
|
|
6729
6729
|
}).option("format", {
|
|
@@ -6823,13 +6823,13 @@ var EntryPatternPullModule = {
|
|
|
6823
6823
|
var EntryPatternPushModule = {
|
|
6824
6824
|
command: "push <directory>",
|
|
6825
6825
|
describe: "Pushes all entry patterns from files in a directory to Uniform",
|
|
6826
|
-
builder: (
|
|
6826
|
+
builder: (yargs43) => withConfiguration(
|
|
6827
6827
|
withDebugOptions(
|
|
6828
6828
|
withApiOptions(
|
|
6829
6829
|
withProjectOptions(
|
|
6830
6830
|
withStateOptions(
|
|
6831
6831
|
withDiffOptions(
|
|
6832
|
-
|
|
6832
|
+
yargs43.positional("directory", {
|
|
6833
6833
|
describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
|
|
6834
6834
|
type: "string"
|
|
6835
6835
|
}).option("what-if", {
|
|
@@ -6933,11 +6933,11 @@ var EntryPatternRemoveModule = {
|
|
|
6933
6933
|
command: "remove <id>",
|
|
6934
6934
|
aliases: ["delete", "rm"],
|
|
6935
6935
|
describe: "Delete an entry pattern",
|
|
6936
|
-
builder: (
|
|
6936
|
+
builder: (yargs43) => withConfiguration(
|
|
6937
6937
|
withDebugOptions(
|
|
6938
6938
|
withApiOptions(
|
|
6939
6939
|
withProjectOptions(
|
|
6940
|
-
|
|
6940
|
+
yargs43.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
|
|
6941
6941
|
)
|
|
6942
6942
|
)
|
|
6943
6943
|
)
|
|
@@ -6959,11 +6959,11 @@ import { diffJson as diffJson4 } from "diff";
|
|
|
6959
6959
|
var EntryPatternUnpublishModule = {
|
|
6960
6960
|
command: "unpublish [ids]",
|
|
6961
6961
|
describe: "Unpublish entry pattern(s)",
|
|
6962
|
-
builder: (
|
|
6962
|
+
builder: (yargs43) => withConfiguration(
|
|
6963
6963
|
withDebugOptions(
|
|
6964
6964
|
withApiOptions(
|
|
6965
6965
|
withProjectOptions(
|
|
6966
|
-
|
|
6966
|
+
yargs43.positional("ids", {
|
|
6967
6967
|
describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
6968
6968
|
type: "string"
|
|
6969
6969
|
}).option("all", {
|
|
@@ -7048,12 +7048,12 @@ var EntryPatternUpdateModule = {
|
|
|
7048
7048
|
command: "update <filename>",
|
|
7049
7049
|
aliases: ["put"],
|
|
7050
7050
|
describe: "Insert or update an entry pattern",
|
|
7051
|
-
builder: (
|
|
7051
|
+
builder: (yargs43) => withConfiguration(
|
|
7052
7052
|
withDebugOptions(
|
|
7053
7053
|
withApiOptions(
|
|
7054
7054
|
withProjectOptions(
|
|
7055
7055
|
withStateOptions(
|
|
7056
|
-
|
|
7056
|
+
yargs43.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
|
|
7057
7057
|
)
|
|
7058
7058
|
)
|
|
7059
7059
|
)
|
|
@@ -7089,15 +7089,219 @@ var EntryPatternUpdateModule = {
|
|
|
7089
7089
|
var EntryPatternModule = {
|
|
7090
7090
|
command: "entry-pattern <command>",
|
|
7091
7091
|
describe: "Commands for Entry patterns",
|
|
7092
|
-
builder: (
|
|
7092
|
+
builder: (yargs43) => yargs43.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
|
|
7093
7093
|
handler: () => {
|
|
7094
7094
|
yargs14.help();
|
|
7095
7095
|
}
|
|
7096
7096
|
};
|
|
7097
7097
|
|
|
7098
|
-
// src/commands/canvas/commands/
|
|
7098
|
+
// src/commands/canvas/commands/label.ts
|
|
7099
7099
|
import yargs15 from "yargs";
|
|
7100
7100
|
|
|
7101
|
+
// src/commands/canvas/commands/label/_util.ts
|
|
7102
|
+
import { LabelClient } from "@uniformdev/canvas";
|
|
7103
|
+
var selectLabelIdentifier = (label) => label.label.publicId;
|
|
7104
|
+
var selectLabelDisplayName = (label) => `${label.label.displayName} (pid: ${label.label.publicId})`;
|
|
7105
|
+
function getLabelClient(options) {
|
|
7106
|
+
return new LabelClient({ ...options, bypassCache: true, limitPolicy: cliLimitPolicy });
|
|
7107
|
+
}
|
|
7108
|
+
|
|
7109
|
+
// src/commands/canvas/labelsEngineDataSource.ts
|
|
7110
|
+
function createLabelsEngineDataSource({
|
|
7111
|
+
client
|
|
7112
|
+
}) {
|
|
7113
|
+
async function* getObjects() {
|
|
7114
|
+
const labels = (await client.getLabels()).labels;
|
|
7115
|
+
for await (const label of labels) {
|
|
7116
|
+
const result = {
|
|
7117
|
+
id: label.label.publicId,
|
|
7118
|
+
displayName: `${label.label.displayName} (pid: ${label.label.publicId})`,
|
|
7119
|
+
providerId: label.label.publicId,
|
|
7120
|
+
object: label
|
|
7121
|
+
};
|
|
7122
|
+
yield result;
|
|
7123
|
+
}
|
|
7124
|
+
}
|
|
7125
|
+
return {
|
|
7126
|
+
name: "Uniform API",
|
|
7127
|
+
objects: getObjects(),
|
|
7128
|
+
deleteObject: async (providerId) => {
|
|
7129
|
+
await client.removeLabel({ labelId: providerId });
|
|
7130
|
+
},
|
|
7131
|
+
writeObject: async ({ object: object4 }) => {
|
|
7132
|
+
await client.upsertLabel({ label: object4.label });
|
|
7133
|
+
}
|
|
7134
|
+
};
|
|
7135
|
+
}
|
|
7136
|
+
|
|
7137
|
+
// src/commands/canvas/commands/label/pull.ts
|
|
7138
|
+
var LabelPullModule = {
|
|
7139
|
+
command: "pull <directory>",
|
|
7140
|
+
describe: "Pulls all labels to local files in a directory",
|
|
7141
|
+
builder: (yargs43) => withConfiguration(
|
|
7142
|
+
withDebugOptions(
|
|
7143
|
+
withApiOptions(
|
|
7144
|
+
withProjectOptions(
|
|
7145
|
+
withDiffOptions(
|
|
7146
|
+
yargs43.positional("directory", {
|
|
7147
|
+
describe: "Directory to save the labels to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
|
|
7148
|
+
type: "string"
|
|
7149
|
+
}).option("format", {
|
|
7150
|
+
alias: ["f"],
|
|
7151
|
+
describe: "Output format",
|
|
7152
|
+
default: "yaml",
|
|
7153
|
+
choices: ["yaml", "json"],
|
|
7154
|
+
type: "string"
|
|
7155
|
+
}).option("mode", {
|
|
7156
|
+
alias: ["m"],
|
|
7157
|
+
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',
|
|
7158
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
7159
|
+
default: "mirror",
|
|
7160
|
+
type: "string"
|
|
7161
|
+
})
|
|
7162
|
+
)
|
|
7163
|
+
)
|
|
7164
|
+
)
|
|
7165
|
+
)
|
|
7166
|
+
),
|
|
7167
|
+
handler: async ({
|
|
7168
|
+
apiHost,
|
|
7169
|
+
apiKey,
|
|
7170
|
+
proxy,
|
|
7171
|
+
directory,
|
|
7172
|
+
format,
|
|
7173
|
+
mode,
|
|
7174
|
+
whatIf,
|
|
7175
|
+
project: projectId,
|
|
7176
|
+
diff: diffMode,
|
|
7177
|
+
allowEmptySource,
|
|
7178
|
+
verbose
|
|
7179
|
+
}) => {
|
|
7180
|
+
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7181
|
+
const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
7182
|
+
const source = createLabelsEngineDataSource({ client });
|
|
7183
|
+
let target;
|
|
7184
|
+
const isPackage = isPathAPackageFile(directory);
|
|
7185
|
+
if (isPackage) {
|
|
7186
|
+
const packageContents = readCanvasPackage(directory, false, verbose);
|
|
7187
|
+
const packageLabels = Array.isArray(packageContents.labels) ? packageContents.labels : [];
|
|
7188
|
+
target = await createArraySyncEngineDataSource({
|
|
7189
|
+
name: `Package file ${directory}`,
|
|
7190
|
+
objects: packageLabels,
|
|
7191
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7192
|
+
selectDisplayName: selectLabelDisplayName,
|
|
7193
|
+
onSyncComplete: async (_, synced) => {
|
|
7194
|
+
packageContents.labels = synced;
|
|
7195
|
+
writeCanvasPackage(directory, packageContents);
|
|
7196
|
+
}
|
|
7197
|
+
});
|
|
7198
|
+
} else {
|
|
7199
|
+
target = await createFileSyncEngineDataSource({
|
|
7200
|
+
directory,
|
|
7201
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7202
|
+
selectDisplayName: selectLabelDisplayName,
|
|
7203
|
+
format,
|
|
7204
|
+
verbose
|
|
7205
|
+
});
|
|
7206
|
+
}
|
|
7207
|
+
await syncEngine({
|
|
7208
|
+
source,
|
|
7209
|
+
target,
|
|
7210
|
+
mode,
|
|
7211
|
+
whatIf,
|
|
7212
|
+
allowEmptySource: allowEmptySource ?? true,
|
|
7213
|
+
log: createSyncEngineConsoleLogger({ diffMode }),
|
|
7214
|
+
onBeforeWriteObject: async (sourceObject) => {
|
|
7215
|
+
delete sourceObject.object.createdBy;
|
|
7216
|
+
delete sourceObject.object.modifiedBy;
|
|
7217
|
+
return sourceObject;
|
|
7218
|
+
}
|
|
7219
|
+
});
|
|
7220
|
+
}
|
|
7221
|
+
};
|
|
7222
|
+
|
|
7223
|
+
// src/commands/canvas/commands/label/push.ts
|
|
7224
|
+
var LabelPushModule = {
|
|
7225
|
+
command: "push <directory>",
|
|
7226
|
+
describe: "Pushes all labels from files in a directory to Uniform",
|
|
7227
|
+
builder: (yargs43) => withConfiguration(
|
|
7228
|
+
withDebugOptions(
|
|
7229
|
+
withApiOptions(
|
|
7230
|
+
withProjectOptions(
|
|
7231
|
+
withDiffOptions(
|
|
7232
|
+
yargs43.positional("directory", {
|
|
7233
|
+
describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
|
|
7234
|
+
type: "string"
|
|
7235
|
+
}).option("mode", {
|
|
7236
|
+
alias: ["m"],
|
|
7237
|
+
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',
|
|
7238
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
7239
|
+
default: "mirror",
|
|
7240
|
+
type: "string"
|
|
7241
|
+
})
|
|
7242
|
+
)
|
|
7243
|
+
)
|
|
7244
|
+
)
|
|
7245
|
+
)
|
|
7246
|
+
),
|
|
7247
|
+
handler: async ({
|
|
7248
|
+
apiHost,
|
|
7249
|
+
apiKey,
|
|
7250
|
+
proxy,
|
|
7251
|
+
directory,
|
|
7252
|
+
mode,
|
|
7253
|
+
whatIf,
|
|
7254
|
+
project: projectId,
|
|
7255
|
+
diff: diffMode,
|
|
7256
|
+
allowEmptySource,
|
|
7257
|
+
verbose
|
|
7258
|
+
}) => {
|
|
7259
|
+
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7260
|
+
const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
7261
|
+
let source;
|
|
7262
|
+
const isPackage = isPathAPackageFile(directory);
|
|
7263
|
+
if (isPackage) {
|
|
7264
|
+
const packageContents = readCanvasPackage(directory, true, verbose);
|
|
7265
|
+
const packageLabels = Array.isArray(packageContents.labels) ? packageContents.labels : [];
|
|
7266
|
+
source = await createArraySyncEngineDataSource({
|
|
7267
|
+
name: `Package file ${directory}`,
|
|
7268
|
+
objects: packageLabels,
|
|
7269
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7270
|
+
selectDisplayName: selectLabelDisplayName
|
|
7271
|
+
});
|
|
7272
|
+
} else {
|
|
7273
|
+
source = await createFileSyncEngineDataSource({
|
|
7274
|
+
directory,
|
|
7275
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7276
|
+
selectDisplayName: selectLabelDisplayName,
|
|
7277
|
+
verbose
|
|
7278
|
+
});
|
|
7279
|
+
}
|
|
7280
|
+
const target = createLabelsEngineDataSource({ client });
|
|
7281
|
+
await syncEngine({
|
|
7282
|
+
source,
|
|
7283
|
+
target,
|
|
7284
|
+
mode,
|
|
7285
|
+
whatIf,
|
|
7286
|
+
allowEmptySource,
|
|
7287
|
+
log: createSyncEngineConsoleLogger({ diffMode })
|
|
7288
|
+
});
|
|
7289
|
+
}
|
|
7290
|
+
};
|
|
7291
|
+
|
|
7292
|
+
// src/commands/canvas/commands/label.ts
|
|
7293
|
+
var LabelModule = {
|
|
7294
|
+
command: "label <command>",
|
|
7295
|
+
describe: "Commands for label definitions",
|
|
7296
|
+
builder: (yargs43) => yargs43.command(LabelPullModule).command(LabelPushModule),
|
|
7297
|
+
handler: () => {
|
|
7298
|
+
yargs15.help();
|
|
7299
|
+
}
|
|
7300
|
+
};
|
|
7301
|
+
|
|
7302
|
+
// src/commands/canvas/commands/locale.ts
|
|
7303
|
+
import yargs16 from "yargs";
|
|
7304
|
+
|
|
7101
7305
|
// src/commands/canvas/localesEngineDataSource.ts
|
|
7102
7306
|
function createLocaleEngineDataSource({
|
|
7103
7307
|
client
|
|
@@ -7138,12 +7342,12 @@ function getLocaleClient(options) {
|
|
|
7138
7342
|
var LocalePullModule = {
|
|
7139
7343
|
command: "pull <directory>",
|
|
7140
7344
|
describe: "Pulls all locales to local files in a directory",
|
|
7141
|
-
builder: (
|
|
7345
|
+
builder: (yargs43) => withConfiguration(
|
|
7142
7346
|
withDebugOptions(
|
|
7143
7347
|
withApiOptions(
|
|
7144
7348
|
withProjectOptions(
|
|
7145
7349
|
withDiffOptions(
|
|
7146
|
-
|
|
7350
|
+
yargs43.positional("directory", {
|
|
7147
7351
|
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.",
|
|
7148
7352
|
type: "string"
|
|
7149
7353
|
}).option("format", {
|
|
@@ -7223,12 +7427,12 @@ var LocalePullModule = {
|
|
|
7223
7427
|
var LocalePushModule = {
|
|
7224
7428
|
command: "push <directory>",
|
|
7225
7429
|
describe: "Pushes all locales from files in a directory to Uniform",
|
|
7226
|
-
builder: (
|
|
7430
|
+
builder: (yargs43) => withConfiguration(
|
|
7227
7431
|
withDebugOptions(
|
|
7228
7432
|
withApiOptions(
|
|
7229
7433
|
withProjectOptions(
|
|
7230
7434
|
withDiffOptions(
|
|
7231
|
-
|
|
7435
|
+
yargs43.positional("directory", {
|
|
7232
7436
|
describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
|
|
7233
7437
|
type: "string"
|
|
7234
7438
|
}).option("mode", {
|
|
@@ -7296,14 +7500,14 @@ var LocalePushModule = {
|
|
|
7296
7500
|
var LocaleModule = {
|
|
7297
7501
|
command: "locale <command>",
|
|
7298
7502
|
describe: "Commands for locale definitions",
|
|
7299
|
-
builder: (
|
|
7503
|
+
builder: (yargs43) => yargs43.command(LocalePullModule).command(LocalePushModule),
|
|
7300
7504
|
handler: () => {
|
|
7301
|
-
|
|
7505
|
+
yargs16.help();
|
|
7302
7506
|
}
|
|
7303
7507
|
};
|
|
7304
7508
|
|
|
7305
7509
|
// src/commands/canvas/commands/previewUrl.ts
|
|
7306
|
-
import
|
|
7510
|
+
import yargs17 from "yargs";
|
|
7307
7511
|
|
|
7308
7512
|
// src/commands/canvas/commands/previewUrl/_util.ts
|
|
7309
7513
|
import { PreviewClient } from "@uniformdev/canvas";
|
|
@@ -7317,12 +7521,12 @@ function getPreviewClient(options) {
|
|
|
7317
7521
|
var PreviewUrlGetModule = {
|
|
7318
7522
|
command: "get <id>",
|
|
7319
7523
|
describe: "Fetch a preview URL",
|
|
7320
|
-
builder: (
|
|
7524
|
+
builder: (yargs43) => withConfiguration(
|
|
7321
7525
|
withFormatOptions(
|
|
7322
7526
|
withDebugOptions(
|
|
7323
7527
|
withApiOptions(
|
|
7324
7528
|
withProjectOptions(
|
|
7325
|
-
|
|
7529
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
|
|
7326
7530
|
)
|
|
7327
7531
|
)
|
|
7328
7532
|
)
|
|
@@ -7346,8 +7550,8 @@ var PreviewUrlListModule = {
|
|
|
7346
7550
|
command: "list",
|
|
7347
7551
|
describe: "List preview URLs",
|
|
7348
7552
|
aliases: ["ls"],
|
|
7349
|
-
builder: (
|
|
7350
|
-
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(
|
|
7553
|
+
builder: (yargs43) => withConfiguration(
|
|
7554
|
+
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs43.options({})))))
|
|
7351
7555
|
),
|
|
7352
7556
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7353
7557
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7389,12 +7593,12 @@ function createPreviewUrlEngineDataSource({
|
|
|
7389
7593
|
var PreviewUrlPullModule = {
|
|
7390
7594
|
command: "pull <directory>",
|
|
7391
7595
|
describe: "Pulls all preview urls to local files in a directory",
|
|
7392
|
-
builder: (
|
|
7596
|
+
builder: (yargs43) => withConfiguration(
|
|
7393
7597
|
withApiOptions(
|
|
7394
7598
|
withProjectOptions(
|
|
7395
7599
|
withDebugOptions(
|
|
7396
7600
|
withDiffOptions(
|
|
7397
|
-
|
|
7601
|
+
yargs43.positional("directory", {
|
|
7398
7602
|
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.",
|
|
7399
7603
|
type: "string"
|
|
7400
7604
|
}).option("format", {
|
|
@@ -7469,12 +7673,12 @@ var PreviewUrlPullModule = {
|
|
|
7469
7673
|
var PreviewUrlPushModule = {
|
|
7470
7674
|
command: "push <directory>",
|
|
7471
7675
|
describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
|
|
7472
|
-
builder: (
|
|
7676
|
+
builder: (yargs43) => withConfiguration(
|
|
7473
7677
|
withApiOptions(
|
|
7474
7678
|
withProjectOptions(
|
|
7475
7679
|
withDiffOptions(
|
|
7476
7680
|
withDebugOptions(
|
|
7477
|
-
|
|
7681
|
+
yargs43.positional("directory", {
|
|
7478
7682
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7479
7683
|
type: "string"
|
|
7480
7684
|
}).option("mode", {
|
|
@@ -7538,11 +7742,11 @@ var PreviewUrlRemoveModule = {
|
|
|
7538
7742
|
command: "remove <id>",
|
|
7539
7743
|
aliases: ["delete", "rm"],
|
|
7540
7744
|
describe: "Delete a preview URL",
|
|
7541
|
-
builder: (
|
|
7745
|
+
builder: (yargs43) => withConfiguration(
|
|
7542
7746
|
withApiOptions(
|
|
7543
7747
|
withDebugOptions(
|
|
7544
7748
|
withProjectOptions(
|
|
7545
|
-
|
|
7749
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
|
|
7546
7750
|
)
|
|
7547
7751
|
)
|
|
7548
7752
|
)
|
|
@@ -7563,11 +7767,11 @@ var PreviewUrlUpdateModule = {
|
|
|
7563
7767
|
command: "update <filename>",
|
|
7564
7768
|
aliases: ["put"],
|
|
7565
7769
|
describe: "Insert or update a preview URL",
|
|
7566
|
-
builder: (
|
|
7770
|
+
builder: (yargs43) => withConfiguration(
|
|
7567
7771
|
withDebugOptions(
|
|
7568
7772
|
withApiOptions(
|
|
7569
7773
|
withProjectOptions(
|
|
7570
|
-
|
|
7774
|
+
yargs43.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
7571
7775
|
)
|
|
7572
7776
|
)
|
|
7573
7777
|
)
|
|
@@ -7589,25 +7793,25 @@ var PreviewUrlModule = {
|
|
|
7589
7793
|
command: "preview-url <command>",
|
|
7590
7794
|
aliases: ["pu"],
|
|
7591
7795
|
describe: "Commands for Canvas preview urls",
|
|
7592
|
-
builder: (
|
|
7796
|
+
builder: (yargs43) => yargs43.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
|
|
7593
7797
|
handler: () => {
|
|
7594
|
-
|
|
7798
|
+
yargs17.help();
|
|
7595
7799
|
}
|
|
7596
7800
|
};
|
|
7597
7801
|
|
|
7598
7802
|
// src/commands/canvas/commands/previewViewport.ts
|
|
7599
|
-
import
|
|
7803
|
+
import yargs18 from "yargs";
|
|
7600
7804
|
|
|
7601
7805
|
// src/commands/canvas/commands/previewViewport/get.ts
|
|
7602
7806
|
var PreviewViewportGetModule = {
|
|
7603
7807
|
command: "get <id>",
|
|
7604
7808
|
describe: "Fetch a preview viewport",
|
|
7605
|
-
builder: (
|
|
7809
|
+
builder: (yargs43) => withConfiguration(
|
|
7606
7810
|
withFormatOptions(
|
|
7607
7811
|
withDebugOptions(
|
|
7608
7812
|
withApiOptions(
|
|
7609
7813
|
withProjectOptions(
|
|
7610
|
-
|
|
7814
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
|
|
7611
7815
|
)
|
|
7612
7816
|
)
|
|
7613
7817
|
)
|
|
@@ -7631,8 +7835,8 @@ var PreviewViewportListModule = {
|
|
|
7631
7835
|
command: "list",
|
|
7632
7836
|
describe: "List preview viewports",
|
|
7633
7837
|
aliases: ["ls"],
|
|
7634
|
-
builder: (
|
|
7635
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
7838
|
+
builder: (yargs43) => withConfiguration(
|
|
7839
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs43.options({})))))
|
|
7636
7840
|
),
|
|
7637
7841
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7638
7842
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7678,12 +7882,12 @@ function createPreviewViewportEngineDataSource({
|
|
|
7678
7882
|
var PreviewViewportPullModule = {
|
|
7679
7883
|
command: "pull <directory>",
|
|
7680
7884
|
describe: "Pulls all preview viewports to local files in a directory",
|
|
7681
|
-
builder: (
|
|
7885
|
+
builder: (yargs43) => withConfiguration(
|
|
7682
7886
|
withApiOptions(
|
|
7683
7887
|
withProjectOptions(
|
|
7684
7888
|
withDebugOptions(
|
|
7685
7889
|
withDiffOptions(
|
|
7686
|
-
|
|
7890
|
+
yargs43.positional("directory", {
|
|
7687
7891
|
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.",
|
|
7688
7892
|
type: "string"
|
|
7689
7893
|
}).option("format", {
|
|
@@ -7758,12 +7962,12 @@ var PreviewViewportPullModule = {
|
|
|
7758
7962
|
var PreviewViewportPushModule = {
|
|
7759
7963
|
command: "push <directory>",
|
|
7760
7964
|
describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
|
|
7761
|
-
builder: (
|
|
7965
|
+
builder: (yargs43) => withConfiguration(
|
|
7762
7966
|
withApiOptions(
|
|
7763
7967
|
withProjectOptions(
|
|
7764
7968
|
withDiffOptions(
|
|
7765
7969
|
withDebugOptions(
|
|
7766
|
-
|
|
7970
|
+
yargs43.positional("directory", {
|
|
7767
7971
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7768
7972
|
type: "string"
|
|
7769
7973
|
}).option("mode", {
|
|
@@ -7827,11 +8031,11 @@ var PreviewViewportRemoveModule = {
|
|
|
7827
8031
|
command: "remove <id>",
|
|
7828
8032
|
aliases: ["delete", "rm"],
|
|
7829
8033
|
describe: "Delete a preview viewport",
|
|
7830
|
-
builder: (
|
|
8034
|
+
builder: (yargs43) => withConfiguration(
|
|
7831
8035
|
withApiOptions(
|
|
7832
8036
|
withDebugOptions(
|
|
7833
8037
|
withProjectOptions(
|
|
7834
|
-
|
|
8038
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
|
|
7835
8039
|
)
|
|
7836
8040
|
)
|
|
7837
8041
|
)
|
|
@@ -7852,11 +8056,11 @@ var PreviewViewportUpdateModule = {
|
|
|
7852
8056
|
command: "update <filename>",
|
|
7853
8057
|
aliases: ["put"],
|
|
7854
8058
|
describe: "Insert or update a preview viewport",
|
|
7855
|
-
builder: (
|
|
8059
|
+
builder: (yargs43) => withConfiguration(
|
|
7856
8060
|
withDebugOptions(
|
|
7857
8061
|
withApiOptions(
|
|
7858
8062
|
withProjectOptions(
|
|
7859
|
-
|
|
8063
|
+
yargs43.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
|
|
7860
8064
|
)
|
|
7861
8065
|
)
|
|
7862
8066
|
)
|
|
@@ -7878,14 +8082,14 @@ var PreviewViewportModule = {
|
|
|
7878
8082
|
command: "preview-viewport <command>",
|
|
7879
8083
|
aliases: ["pv"],
|
|
7880
8084
|
describe: "Commands for Canvas preview viewports",
|
|
7881
|
-
builder: (
|
|
8085
|
+
builder: (yargs43) => yargs43.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
|
|
7882
8086
|
handler: () => {
|
|
7883
|
-
|
|
8087
|
+
yargs18.help();
|
|
7884
8088
|
}
|
|
7885
8089
|
};
|
|
7886
8090
|
|
|
7887
8091
|
// src/commands/canvas/commands/prompts.ts
|
|
7888
|
-
import
|
|
8092
|
+
import yargs19 from "yargs";
|
|
7889
8093
|
|
|
7890
8094
|
// src/commands/canvas/commands/prompts/_util.ts
|
|
7891
8095
|
import { PromptClient } from "@uniformdev/canvas";
|
|
@@ -7897,12 +8101,12 @@ var getPromptClient = (options) => new PromptClient({ ...options, bypassCache: t
|
|
|
7897
8101
|
var PromptGetModule = {
|
|
7898
8102
|
command: "get <id>",
|
|
7899
8103
|
describe: "Get a prompt",
|
|
7900
|
-
builder: (
|
|
8104
|
+
builder: (yargs43) => withConfiguration(
|
|
7901
8105
|
withDebugOptions(
|
|
7902
8106
|
withFormatOptions(
|
|
7903
8107
|
withApiOptions(
|
|
7904
8108
|
withProjectOptions(
|
|
7905
|
-
|
|
8109
|
+
yargs43.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
|
|
7906
8110
|
)
|
|
7907
8111
|
)
|
|
7908
8112
|
)
|
|
@@ -7923,7 +8127,7 @@ var PromptGetModule = {
|
|
|
7923
8127
|
var PromptListModule = {
|
|
7924
8128
|
command: "list",
|
|
7925
8129
|
describe: "List prompts",
|
|
7926
|
-
builder: (
|
|
8130
|
+
builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
|
|
7927
8131
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7928
8132
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7929
8133
|
const client = getPromptClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -7964,13 +8168,13 @@ function createPromptEngineDataSource({
|
|
|
7964
8168
|
var PromptPullModule = {
|
|
7965
8169
|
command: "pull <directory>",
|
|
7966
8170
|
describe: "Pulls all prompts to local files in a directory",
|
|
7967
|
-
builder: (
|
|
8171
|
+
builder: (yargs43) => withConfiguration(
|
|
7968
8172
|
withDebugOptions(
|
|
7969
8173
|
withApiOptions(
|
|
7970
8174
|
withProjectOptions(
|
|
7971
8175
|
withStateOptions(
|
|
7972
8176
|
withDiffOptions(
|
|
7973
|
-
|
|
8177
|
+
yargs43.positional("directory", {
|
|
7974
8178
|
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.",
|
|
7975
8179
|
type: "string"
|
|
7976
8180
|
}).option("format", {
|
|
@@ -8051,12 +8255,12 @@ var PromptPullModule = {
|
|
|
8051
8255
|
var PromptPushModule = {
|
|
8052
8256
|
command: "push <directory>",
|
|
8053
8257
|
describe: "Pushes all prompts from files in a directory to Uniform",
|
|
8054
|
-
builder: (
|
|
8258
|
+
builder: (yargs43) => withConfiguration(
|
|
8055
8259
|
withApiOptions(
|
|
8056
8260
|
withProjectOptions(
|
|
8057
8261
|
withStateOptions(
|
|
8058
8262
|
withDiffOptions(
|
|
8059
|
-
|
|
8263
|
+
yargs43.positional("directory", {
|
|
8060
8264
|
describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
|
|
8061
8265
|
type: "string"
|
|
8062
8266
|
}).option("mode", {
|
|
@@ -8125,10 +8329,10 @@ var PromptRemoveModule = {
|
|
|
8125
8329
|
command: "remove <id>",
|
|
8126
8330
|
aliases: ["delete", "rm"],
|
|
8127
8331
|
describe: "Delete a prompt",
|
|
8128
|
-
builder: (
|
|
8332
|
+
builder: (yargs43) => withConfiguration(
|
|
8129
8333
|
withDebugOptions(
|
|
8130
8334
|
withApiOptions(
|
|
8131
|
-
withProjectOptions(
|
|
8335
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
|
|
8132
8336
|
)
|
|
8133
8337
|
)
|
|
8134
8338
|
),
|
|
@@ -8148,11 +8352,11 @@ var PromptUpdateModule = {
|
|
|
8148
8352
|
command: "update <filename>",
|
|
8149
8353
|
aliases: ["put"],
|
|
8150
8354
|
describe: "Insert or update a prompt",
|
|
8151
|
-
builder: (
|
|
8355
|
+
builder: (yargs43) => withConfiguration(
|
|
8152
8356
|
withDebugOptions(
|
|
8153
8357
|
withApiOptions(
|
|
8154
8358
|
withProjectOptions(
|
|
8155
|
-
|
|
8359
|
+
yargs43.positional("filename", { demandOption: true, describe: "Prompt file to put" })
|
|
8156
8360
|
)
|
|
8157
8361
|
)
|
|
8158
8362
|
)
|
|
@@ -8174,14 +8378,14 @@ var PromptModule = {
|
|
|
8174
8378
|
command: "prompt <command>",
|
|
8175
8379
|
aliases: ["dt"],
|
|
8176
8380
|
describe: "Commands for AI Prompt definitions",
|
|
8177
|
-
builder: (
|
|
8381
|
+
builder: (yargs43) => yargs43.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
|
|
8178
8382
|
handler: () => {
|
|
8179
|
-
|
|
8383
|
+
yargs19.help();
|
|
8180
8384
|
}
|
|
8181
8385
|
};
|
|
8182
8386
|
|
|
8183
8387
|
// src/commands/canvas/commands/workflow.ts
|
|
8184
|
-
import
|
|
8388
|
+
import yargs20 from "yargs";
|
|
8185
8389
|
|
|
8186
8390
|
// src/commands/canvas/commands/workflow/_util.ts
|
|
8187
8391
|
import { WorkflowClient } from "@uniformdev/canvas";
|
|
@@ -8224,12 +8428,12 @@ function createWorkflowEngineDataSource({
|
|
|
8224
8428
|
var WorkflowPullModule = {
|
|
8225
8429
|
command: "pull <directory>",
|
|
8226
8430
|
describe: "Pulls all workflows to local files in a directory",
|
|
8227
|
-
builder: (
|
|
8431
|
+
builder: (yargs43) => withConfiguration(
|
|
8228
8432
|
withApiOptions(
|
|
8229
8433
|
withDebugOptions(
|
|
8230
8434
|
withProjectOptions(
|
|
8231
8435
|
withDiffOptions(
|
|
8232
|
-
|
|
8436
|
+
yargs43.positional("directory", {
|
|
8233
8437
|
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.",
|
|
8234
8438
|
type: "string"
|
|
8235
8439
|
}).option("format", {
|
|
@@ -8304,12 +8508,12 @@ var WorkflowPullModule = {
|
|
|
8304
8508
|
var WorkflowPushModule = {
|
|
8305
8509
|
command: "push <directory>",
|
|
8306
8510
|
describe: "Pushes all workflows from files in a directory to Uniform Canvas",
|
|
8307
|
-
builder: (
|
|
8511
|
+
builder: (yargs43) => withConfiguration(
|
|
8308
8512
|
withDebugOptions(
|
|
8309
8513
|
withApiOptions(
|
|
8310
8514
|
withProjectOptions(
|
|
8311
8515
|
withDiffOptions(
|
|
8312
|
-
|
|
8516
|
+
yargs43.positional("directory", {
|
|
8313
8517
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
8314
8518
|
type: "string"
|
|
8315
8519
|
}).option("mode", {
|
|
@@ -8373,9 +8577,9 @@ var WorkflowModule = {
|
|
|
8373
8577
|
command: "workflow <command>",
|
|
8374
8578
|
aliases: ["wf"],
|
|
8375
8579
|
describe: "Commands for Canvas workflows",
|
|
8376
|
-
builder: (
|
|
8580
|
+
builder: (yargs43) => yargs43.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
|
|
8377
8581
|
handler: () => {
|
|
8378
|
-
|
|
8582
|
+
yargs20.help();
|
|
8379
8583
|
}
|
|
8380
8584
|
};
|
|
8381
8585
|
|
|
@@ -8384,17 +8588,17 @@ var CanvasCommand = {
|
|
|
8384
8588
|
command: "canvas <command>",
|
|
8385
8589
|
aliases: ["cv", "pm", "presentation"],
|
|
8386
8590
|
describe: "Uniform Canvas commands",
|
|
8387
|
-
builder: (
|
|
8591
|
+
builder: (yargs43) => yargs43.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(LabelModule).command(LocaleModule).command(WorkflowModule).command(PreviewUrlModule).command(PreviewViewportModule).demandCommand(),
|
|
8388
8592
|
handler: () => {
|
|
8389
|
-
|
|
8593
|
+
yargs21.showHelp();
|
|
8390
8594
|
}
|
|
8391
8595
|
};
|
|
8392
8596
|
|
|
8393
8597
|
// src/commands/context/index.ts
|
|
8394
|
-
import
|
|
8598
|
+
import yargs28 from "yargs";
|
|
8395
8599
|
|
|
8396
8600
|
// src/commands/context/commands/aggregate.ts
|
|
8397
|
-
import
|
|
8601
|
+
import yargs22 from "yargs";
|
|
8398
8602
|
|
|
8399
8603
|
// src/commands/context/commands/aggregate/_util.ts
|
|
8400
8604
|
import { AggregateClient } from "@uniformdev/context/api";
|
|
@@ -8406,11 +8610,11 @@ var getAggregateClient = (options) => new AggregateClient({ ...options, bypassCa
|
|
|
8406
8610
|
var AggregateGetModule = {
|
|
8407
8611
|
command: "get <id>",
|
|
8408
8612
|
describe: "Fetch an aggregate",
|
|
8409
|
-
builder: (
|
|
8613
|
+
builder: (yargs43) => withConfiguration(
|
|
8410
8614
|
withFormatOptions(
|
|
8411
8615
|
withApiOptions(
|
|
8412
8616
|
withProjectOptions(
|
|
8413
|
-
|
|
8617
|
+
yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
|
|
8414
8618
|
)
|
|
8415
8619
|
)
|
|
8416
8620
|
)
|
|
@@ -8433,7 +8637,7 @@ var AggregateListModule = {
|
|
|
8433
8637
|
command: "list",
|
|
8434
8638
|
describe: "List aggregates",
|
|
8435
8639
|
aliases: ["ls"],
|
|
8436
|
-
builder: (
|
|
8640
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
8437
8641
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8438
8642
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8439
8643
|
const client = getAggregateClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8496,12 +8700,12 @@ function writeContextPackage(filename, packageContents) {
|
|
|
8496
8700
|
var AggregatePullModule = {
|
|
8497
8701
|
command: "pull <directory>",
|
|
8498
8702
|
describe: "Pulls all aggregates to local files in a directory",
|
|
8499
|
-
builder: (
|
|
8703
|
+
builder: (yargs43) => withConfiguration(
|
|
8500
8704
|
withApiOptions(
|
|
8501
8705
|
withDebugOptions(
|
|
8502
8706
|
withProjectOptions(
|
|
8503
8707
|
withDiffOptions(
|
|
8504
|
-
|
|
8708
|
+
yargs43.positional("directory", {
|
|
8505
8709
|
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.",
|
|
8506
8710
|
type: "string"
|
|
8507
8711
|
}).option("format", {
|
|
@@ -8576,12 +8780,12 @@ var AggregatePullModule = {
|
|
|
8576
8780
|
var AggregatePushModule = {
|
|
8577
8781
|
command: "push <directory>",
|
|
8578
8782
|
describe: "Pushes all aggregates from files in a directory or package to Uniform",
|
|
8579
|
-
builder: (
|
|
8783
|
+
builder: (yargs43) => withConfiguration(
|
|
8580
8784
|
withApiOptions(
|
|
8581
8785
|
withProjectOptions(
|
|
8582
8786
|
withDiffOptions(
|
|
8583
8787
|
withDebugOptions(
|
|
8584
|
-
|
|
8788
|
+
yargs43.positional("directory", {
|
|
8585
8789
|
describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
|
|
8586
8790
|
type: "string"
|
|
8587
8791
|
}).option("mode", {
|
|
@@ -8646,10 +8850,10 @@ var AggregateRemoveModule = {
|
|
|
8646
8850
|
command: "remove <id>",
|
|
8647
8851
|
aliases: ["delete", "rm"],
|
|
8648
8852
|
describe: "Delete an aggregate",
|
|
8649
|
-
builder: (
|
|
8853
|
+
builder: (yargs43) => withConfiguration(
|
|
8650
8854
|
withApiOptions(
|
|
8651
8855
|
withProjectOptions(
|
|
8652
|
-
|
|
8856
|
+
yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
|
|
8653
8857
|
)
|
|
8654
8858
|
)
|
|
8655
8859
|
),
|
|
@@ -8665,10 +8869,10 @@ var AggregateUpdateModule = {
|
|
|
8665
8869
|
command: "update <filename>",
|
|
8666
8870
|
aliases: ["put"],
|
|
8667
8871
|
describe: "Insert or update an aggregate",
|
|
8668
|
-
builder: (
|
|
8872
|
+
builder: (yargs43) => withConfiguration(
|
|
8669
8873
|
withApiOptions(
|
|
8670
8874
|
withProjectOptions(
|
|
8671
|
-
|
|
8875
|
+
yargs43.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
|
|
8672
8876
|
)
|
|
8673
8877
|
)
|
|
8674
8878
|
),
|
|
@@ -8685,14 +8889,14 @@ var AggregateModule = {
|
|
|
8685
8889
|
command: "aggregate <command>",
|
|
8686
8890
|
aliases: ["agg", "intent", "audience"],
|
|
8687
8891
|
describe: "Commands for Context aggregates (intents, audiences)",
|
|
8688
|
-
builder: (
|
|
8892
|
+
builder: (yargs43) => yargs43.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
|
|
8689
8893
|
handler: () => {
|
|
8690
|
-
|
|
8894
|
+
yargs22.help();
|
|
8691
8895
|
}
|
|
8692
8896
|
};
|
|
8693
8897
|
|
|
8694
8898
|
// src/commands/context/commands/enrichment.ts
|
|
8695
|
-
import
|
|
8899
|
+
import yargs23 from "yargs";
|
|
8696
8900
|
|
|
8697
8901
|
// src/commands/context/commands/enrichment/_util.ts
|
|
8698
8902
|
import { UncachedEnrichmentClient } from "@uniformdev/context/api";
|
|
@@ -8706,11 +8910,11 @@ function getEnrichmentClient(options) {
|
|
|
8706
8910
|
var EnrichmentGetModule = {
|
|
8707
8911
|
command: "get <id>",
|
|
8708
8912
|
describe: "Fetch an enrichment category and its values",
|
|
8709
|
-
builder: (
|
|
8913
|
+
builder: (yargs43) => withFormatOptions(
|
|
8710
8914
|
withConfiguration(
|
|
8711
8915
|
withApiOptions(
|
|
8712
8916
|
withProjectOptions(
|
|
8713
|
-
|
|
8917
|
+
yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
|
|
8714
8918
|
)
|
|
8715
8919
|
)
|
|
8716
8920
|
)
|
|
@@ -8733,7 +8937,7 @@ var EnrichmentListModule = {
|
|
|
8733
8937
|
command: "list",
|
|
8734
8938
|
describe: "List enrichments",
|
|
8735
8939
|
aliases: ["ls"],
|
|
8736
|
-
builder: (
|
|
8940
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
8737
8941
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8738
8942
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8739
8943
|
const client = getEnrichmentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8828,12 +9032,12 @@ var createEnrichmentValueEngineDataSource = ({
|
|
|
8828
9032
|
var EnrichmentPullModule = {
|
|
8829
9033
|
command: "pull <directory>",
|
|
8830
9034
|
describe: "Pulls all enrichments to local files in a directory",
|
|
8831
|
-
builder: (
|
|
9035
|
+
builder: (yargs43) => withConfiguration(
|
|
8832
9036
|
withDebugOptions(
|
|
8833
9037
|
withApiOptions(
|
|
8834
9038
|
withProjectOptions(
|
|
8835
9039
|
withDiffOptions(
|
|
8836
|
-
|
|
9040
|
+
yargs43.positional("directory", {
|
|
8837
9041
|
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.",
|
|
8838
9042
|
type: "string"
|
|
8839
9043
|
}).option("format", {
|
|
@@ -8908,11 +9112,11 @@ var EnrichmentPullModule = {
|
|
|
8908
9112
|
var EnrichmentPushModule = {
|
|
8909
9113
|
command: "push <directory>",
|
|
8910
9114
|
describe: "Pushes all enrichments from files in a directory or package to Uniform",
|
|
8911
|
-
builder: (
|
|
9115
|
+
builder: (yargs43) => withConfiguration(
|
|
8912
9116
|
withApiOptions(
|
|
8913
9117
|
withProjectOptions(
|
|
8914
9118
|
withDiffOptions(
|
|
8915
|
-
|
|
9119
|
+
yargs43.positional("directory", {
|
|
8916
9120
|
describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
|
|
8917
9121
|
type: "string"
|
|
8918
9122
|
}).option("mode", {
|
|
@@ -8975,10 +9179,10 @@ var EnrichmentRemoveModule = {
|
|
|
8975
9179
|
command: "remove <id>",
|
|
8976
9180
|
aliases: ["delete", "rm"],
|
|
8977
9181
|
describe: "Delete an enrichment category and its values",
|
|
8978
|
-
builder: (
|
|
9182
|
+
builder: (yargs43) => withConfiguration(
|
|
8979
9183
|
withApiOptions(
|
|
8980
9184
|
withProjectOptions(
|
|
8981
|
-
|
|
9185
|
+
yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
|
|
8982
9186
|
)
|
|
8983
9187
|
)
|
|
8984
9188
|
),
|
|
@@ -8994,14 +9198,14 @@ var EnrichmentModule = {
|
|
|
8994
9198
|
command: "enrichment <command>",
|
|
8995
9199
|
aliases: ["enr"],
|
|
8996
9200
|
describe: "Commands for Context enrichments",
|
|
8997
|
-
builder: (
|
|
9201
|
+
builder: (yargs43) => yargs43.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
|
|
8998
9202
|
handler: () => {
|
|
8999
|
-
|
|
9203
|
+
yargs23.help();
|
|
9000
9204
|
}
|
|
9001
9205
|
};
|
|
9002
9206
|
|
|
9003
9207
|
// src/commands/context/commands/manifest.ts
|
|
9004
|
-
import
|
|
9208
|
+
import yargs24 from "yargs";
|
|
9005
9209
|
|
|
9006
9210
|
// src/commands/context/commands/manifest/get.ts
|
|
9007
9211
|
import { ApiClientError as ApiClientError5, UncachedManifestClient } from "@uniformdev/context/api";
|
|
@@ -9012,10 +9216,10 @@ var ManifestGetModule = {
|
|
|
9012
9216
|
command: "get [output]",
|
|
9013
9217
|
aliases: ["dl", "download"],
|
|
9014
9218
|
describe: "Download the Uniform Context manifest for a project",
|
|
9015
|
-
builder: (
|
|
9219
|
+
builder: (yargs43) => withConfiguration(
|
|
9016
9220
|
withApiOptions(
|
|
9017
9221
|
withProjectOptions(
|
|
9018
|
-
|
|
9222
|
+
yargs43.option("preview", {
|
|
9019
9223
|
describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
|
|
9020
9224
|
default: false,
|
|
9021
9225
|
type: "boolean",
|
|
@@ -9077,7 +9281,7 @@ import { exit as exit2 } from "process";
|
|
|
9077
9281
|
var ManifestPublishModule = {
|
|
9078
9282
|
command: "publish",
|
|
9079
9283
|
describe: "Publish the Uniform Context manifest for a project",
|
|
9080
|
-
builder: (
|
|
9284
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(yargs43))),
|
|
9081
9285
|
handler: async ({ apiKey, apiHost, proxy, project }) => {
|
|
9082
9286
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9083
9287
|
try {
|
|
@@ -9110,25 +9314,25 @@ var ManifestModule = {
|
|
|
9110
9314
|
command: "manifest <command>",
|
|
9111
9315
|
describe: "Commands for context manifests",
|
|
9112
9316
|
aliases: ["man"],
|
|
9113
|
-
builder: (
|
|
9317
|
+
builder: (yargs43) => yargs43.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
|
|
9114
9318
|
handler: () => {
|
|
9115
|
-
|
|
9319
|
+
yargs24.help();
|
|
9116
9320
|
}
|
|
9117
9321
|
};
|
|
9118
9322
|
|
|
9119
9323
|
// src/commands/context/commands/quirk.ts
|
|
9120
|
-
import
|
|
9324
|
+
import yargs25 from "yargs";
|
|
9121
9325
|
|
|
9122
9326
|
// src/commands/context/commands/quirk/get.ts
|
|
9123
9327
|
import { UncachedQuirkClient } from "@uniformdev/context/api";
|
|
9124
9328
|
var QuirkGetModule = {
|
|
9125
9329
|
command: "get <id>",
|
|
9126
9330
|
describe: "Fetch a quirk",
|
|
9127
|
-
builder: (
|
|
9331
|
+
builder: (yargs43) => withConfiguration(
|
|
9128
9332
|
withFormatOptions(
|
|
9129
9333
|
withApiOptions(
|
|
9130
9334
|
withProjectOptions(
|
|
9131
|
-
|
|
9335
|
+
yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
|
|
9132
9336
|
)
|
|
9133
9337
|
)
|
|
9134
9338
|
)
|
|
@@ -9152,11 +9356,11 @@ var QuirkListModule = {
|
|
|
9152
9356
|
command: "list",
|
|
9153
9357
|
describe: "List quirks",
|
|
9154
9358
|
aliases: ["ls"],
|
|
9155
|
-
builder: (
|
|
9359
|
+
builder: (yargs43) => withConfiguration(
|
|
9156
9360
|
withFormatOptions(
|
|
9157
9361
|
withApiOptions(
|
|
9158
9362
|
withProjectOptions(
|
|
9159
|
-
|
|
9363
|
+
yargs43.option("withIntegrations", {
|
|
9160
9364
|
alias: ["i"],
|
|
9161
9365
|
describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
|
|
9162
9366
|
type: "boolean"
|
|
@@ -9214,12 +9418,12 @@ function createQuirkEngineDataSource({
|
|
|
9214
9418
|
var QuirkPullModule = {
|
|
9215
9419
|
command: "pull <directory>",
|
|
9216
9420
|
describe: "Pulls all quirks to local files in a directory",
|
|
9217
|
-
builder: (
|
|
9421
|
+
builder: (yargs43) => withConfiguration(
|
|
9218
9422
|
withDebugOptions(
|
|
9219
9423
|
withApiOptions(
|
|
9220
9424
|
withProjectOptions(
|
|
9221
9425
|
withDiffOptions(
|
|
9222
|
-
|
|
9426
|
+
yargs43.positional("directory", {
|
|
9223
9427
|
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.",
|
|
9224
9428
|
type: "string"
|
|
9225
9429
|
}).option("format", {
|
|
@@ -9295,12 +9499,12 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
|
|
|
9295
9499
|
var QuirkPushModule = {
|
|
9296
9500
|
command: "push <directory>",
|
|
9297
9501
|
describe: "Pushes all quirks from files in a directory or package to Uniform",
|
|
9298
|
-
builder: (
|
|
9502
|
+
builder: (yargs43) => withConfiguration(
|
|
9299
9503
|
withDebugOptions(
|
|
9300
9504
|
withApiOptions(
|
|
9301
9505
|
withProjectOptions(
|
|
9302
9506
|
withDiffOptions(
|
|
9303
|
-
|
|
9507
|
+
yargs43.positional("directory", {
|
|
9304
9508
|
describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
|
|
9305
9509
|
type: "string"
|
|
9306
9510
|
}).option("mode", {
|
|
@@ -9365,10 +9569,10 @@ var QuirkRemoveModule = {
|
|
|
9365
9569
|
command: "remove <id>",
|
|
9366
9570
|
aliases: ["delete", "rm"],
|
|
9367
9571
|
describe: "Delete a quirk",
|
|
9368
|
-
builder: (
|
|
9572
|
+
builder: (yargs43) => withConfiguration(
|
|
9369
9573
|
withApiOptions(
|
|
9370
9574
|
withProjectOptions(
|
|
9371
|
-
|
|
9575
|
+
yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
|
|
9372
9576
|
)
|
|
9373
9577
|
)
|
|
9374
9578
|
),
|
|
@@ -9385,10 +9589,10 @@ var QuirkUpdateModule = {
|
|
|
9385
9589
|
command: "update <filename>",
|
|
9386
9590
|
aliases: ["put"],
|
|
9387
9591
|
describe: "Insert or update a quirk",
|
|
9388
|
-
builder: (
|
|
9592
|
+
builder: (yargs43) => withConfiguration(
|
|
9389
9593
|
withApiOptions(
|
|
9390
9594
|
withProjectOptions(
|
|
9391
|
-
|
|
9595
|
+
yargs43.positional("filename", { demandOption: true, describe: "Quirk file to put" })
|
|
9392
9596
|
)
|
|
9393
9597
|
)
|
|
9394
9598
|
),
|
|
@@ -9405,25 +9609,25 @@ var QuirkModule = {
|
|
|
9405
9609
|
command: "quirk <command>",
|
|
9406
9610
|
aliases: ["qk"],
|
|
9407
9611
|
describe: "Commands for Context quirks",
|
|
9408
|
-
builder: (
|
|
9612
|
+
builder: (yargs43) => yargs43.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
|
|
9409
9613
|
handler: () => {
|
|
9410
|
-
|
|
9614
|
+
yargs25.help();
|
|
9411
9615
|
}
|
|
9412
9616
|
};
|
|
9413
9617
|
|
|
9414
9618
|
// src/commands/context/commands/signal.ts
|
|
9415
|
-
import
|
|
9619
|
+
import yargs26 from "yargs";
|
|
9416
9620
|
|
|
9417
9621
|
// src/commands/context/commands/signal/get.ts
|
|
9418
9622
|
import { UncachedSignalClient } from "@uniformdev/context/api";
|
|
9419
9623
|
var SignalGetModule = {
|
|
9420
9624
|
command: "get <id>",
|
|
9421
9625
|
describe: "Fetch a signal",
|
|
9422
|
-
builder: (
|
|
9626
|
+
builder: (yargs43) => withConfiguration(
|
|
9423
9627
|
withFormatOptions(
|
|
9424
9628
|
withApiOptions(
|
|
9425
9629
|
withProjectOptions(
|
|
9426
|
-
|
|
9630
|
+
yargs43.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
|
|
9427
9631
|
)
|
|
9428
9632
|
)
|
|
9429
9633
|
)
|
|
@@ -9447,7 +9651,7 @@ var SignalListModule = {
|
|
|
9447
9651
|
command: "list",
|
|
9448
9652
|
describe: "List signals",
|
|
9449
9653
|
aliases: ["ls"],
|
|
9450
|
-
builder: (
|
|
9654
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
9451
9655
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9452
9656
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9453
9657
|
const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9497,12 +9701,12 @@ function createSignalEngineDataSource({
|
|
|
9497
9701
|
var SignalPullModule = {
|
|
9498
9702
|
command: "pull <directory>",
|
|
9499
9703
|
describe: "Pulls all signals to local files in a directory",
|
|
9500
|
-
builder: (
|
|
9704
|
+
builder: (yargs43) => withConfiguration(
|
|
9501
9705
|
withDebugOptions(
|
|
9502
9706
|
withApiOptions(
|
|
9503
9707
|
withProjectOptions(
|
|
9504
9708
|
withDiffOptions(
|
|
9505
|
-
|
|
9709
|
+
yargs43.positional("directory", {
|
|
9506
9710
|
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.",
|
|
9507
9711
|
type: "string"
|
|
9508
9712
|
}).option("format", {
|
|
@@ -9578,12 +9782,12 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
|
|
|
9578
9782
|
var SignalPushModule = {
|
|
9579
9783
|
command: "push <directory>",
|
|
9580
9784
|
describe: "Pushes all signals from files in a directory or package to Uniform",
|
|
9581
|
-
builder: (
|
|
9785
|
+
builder: (yargs43) => withConfiguration(
|
|
9582
9786
|
withDebugOptions(
|
|
9583
9787
|
withApiOptions(
|
|
9584
9788
|
withProjectOptions(
|
|
9585
9789
|
withDiffOptions(
|
|
9586
|
-
|
|
9790
|
+
yargs43.positional("directory", {
|
|
9587
9791
|
describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
|
|
9588
9792
|
type: "string"
|
|
9589
9793
|
}).option("mode", {
|
|
@@ -9648,10 +9852,10 @@ var SignalRemoveModule = {
|
|
|
9648
9852
|
command: "remove <id>",
|
|
9649
9853
|
aliases: ["delete", "rm"],
|
|
9650
9854
|
describe: "Delete a signal",
|
|
9651
|
-
builder: (
|
|
9855
|
+
builder: (yargs43) => withConfiguration(
|
|
9652
9856
|
withApiOptions(
|
|
9653
9857
|
withProjectOptions(
|
|
9654
|
-
|
|
9858
|
+
yargs43.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
|
|
9655
9859
|
)
|
|
9656
9860
|
)
|
|
9657
9861
|
),
|
|
@@ -9668,10 +9872,10 @@ var SignalUpdateModule = {
|
|
|
9668
9872
|
command: "update <filename>",
|
|
9669
9873
|
aliases: ["put"],
|
|
9670
9874
|
describe: "Insert or update a signal",
|
|
9671
|
-
builder: (
|
|
9875
|
+
builder: (yargs43) => withConfiguration(
|
|
9672
9876
|
withApiOptions(
|
|
9673
9877
|
withProjectOptions(
|
|
9674
|
-
|
|
9878
|
+
yargs43.positional("filename", { demandOption: true, describe: "Signal file to put" })
|
|
9675
9879
|
)
|
|
9676
9880
|
)
|
|
9677
9881
|
),
|
|
@@ -9688,25 +9892,25 @@ var SignalModule = {
|
|
|
9688
9892
|
command: "signal <command>",
|
|
9689
9893
|
aliases: ["sig"],
|
|
9690
9894
|
describe: "Commands for Context signals",
|
|
9691
|
-
builder: (
|
|
9895
|
+
builder: (yargs43) => yargs43.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
|
|
9692
9896
|
handler: () => {
|
|
9693
|
-
|
|
9897
|
+
yargs26.help();
|
|
9694
9898
|
}
|
|
9695
9899
|
};
|
|
9696
9900
|
|
|
9697
9901
|
// src/commands/context/commands/test.ts
|
|
9698
|
-
import
|
|
9902
|
+
import yargs27 from "yargs";
|
|
9699
9903
|
|
|
9700
9904
|
// src/commands/context/commands/test/get.ts
|
|
9701
9905
|
import { UncachedTestClient } from "@uniformdev/context/api";
|
|
9702
9906
|
var TestGetModule = {
|
|
9703
9907
|
command: "get <id>",
|
|
9704
9908
|
describe: "Fetch a test",
|
|
9705
|
-
builder: (
|
|
9909
|
+
builder: (yargs43) => withConfiguration(
|
|
9706
9910
|
withFormatOptions(
|
|
9707
9911
|
withApiOptions(
|
|
9708
9912
|
withProjectOptions(
|
|
9709
|
-
|
|
9913
|
+
yargs43.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
|
|
9710
9914
|
)
|
|
9711
9915
|
)
|
|
9712
9916
|
)
|
|
@@ -9730,7 +9934,7 @@ var TestListModule = {
|
|
|
9730
9934
|
command: "list",
|
|
9731
9935
|
describe: "List tests",
|
|
9732
9936
|
aliases: ["ls"],
|
|
9733
|
-
builder: (
|
|
9937
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
9734
9938
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9735
9939
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9736
9940
|
const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9780,12 +9984,12 @@ function createTestEngineDataSource({
|
|
|
9780
9984
|
var TestPullModule = {
|
|
9781
9985
|
command: "pull <directory>",
|
|
9782
9986
|
describe: "Pulls all tests to local files in a directory",
|
|
9783
|
-
builder: (
|
|
9987
|
+
builder: (yargs43) => withConfiguration(
|
|
9784
9988
|
withDebugOptions(
|
|
9785
9989
|
withApiOptions(
|
|
9786
9990
|
withProjectOptions(
|
|
9787
9991
|
withDiffOptions(
|
|
9788
|
-
|
|
9992
|
+
yargs43.positional("directory", {
|
|
9789
9993
|
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.",
|
|
9790
9994
|
type: "string"
|
|
9791
9995
|
}).option("format", {
|
|
@@ -9861,12 +10065,12 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
|
|
|
9861
10065
|
var TestPushModule = {
|
|
9862
10066
|
command: "push <directory>",
|
|
9863
10067
|
describe: "Pushes all tests from files in a directory or package to Uniform",
|
|
9864
|
-
builder: (
|
|
10068
|
+
builder: (yargs43) => withConfiguration(
|
|
9865
10069
|
withDebugOptions(
|
|
9866
10070
|
withApiOptions(
|
|
9867
10071
|
withProjectOptions(
|
|
9868
10072
|
withDiffOptions(
|
|
9869
|
-
|
|
10073
|
+
yargs43.positional("directory", {
|
|
9870
10074
|
describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
|
|
9871
10075
|
type: "string"
|
|
9872
10076
|
}).option("mode", {
|
|
@@ -9931,10 +10135,10 @@ var TestRemoveModule = {
|
|
|
9931
10135
|
command: "remove <id>",
|
|
9932
10136
|
aliases: ["delete", "rm"],
|
|
9933
10137
|
describe: "Delete a test",
|
|
9934
|
-
builder: (
|
|
10138
|
+
builder: (yargs43) => withConfiguration(
|
|
9935
10139
|
withApiOptions(
|
|
9936
10140
|
withProjectOptions(
|
|
9937
|
-
|
|
10141
|
+
yargs43.positional("id", { demandOption: true, describe: "Test public ID to delete" })
|
|
9938
10142
|
)
|
|
9939
10143
|
)
|
|
9940
10144
|
),
|
|
@@ -9951,9 +10155,9 @@ var TestUpdateModule = {
|
|
|
9951
10155
|
command: "update <filename>",
|
|
9952
10156
|
aliases: ["put"],
|
|
9953
10157
|
describe: "Insert or update a test",
|
|
9954
|
-
builder: (
|
|
10158
|
+
builder: (yargs43) => withConfiguration(
|
|
9955
10159
|
withApiOptions(
|
|
9956
|
-
withProjectOptions(
|
|
10160
|
+
withProjectOptions(yargs43.positional("filename", { demandOption: true, describe: "Test file to put" }))
|
|
9957
10161
|
)
|
|
9958
10162
|
),
|
|
9959
10163
|
handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
|
|
@@ -9968,9 +10172,9 @@ var TestUpdateModule = {
|
|
|
9968
10172
|
var TestModule = {
|
|
9969
10173
|
command: "test <command>",
|
|
9970
10174
|
describe: "Commands for Context A/B tests",
|
|
9971
|
-
builder: (
|
|
10175
|
+
builder: (yargs43) => yargs43.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
|
|
9972
10176
|
handler: () => {
|
|
9973
|
-
|
|
10177
|
+
yargs27.help();
|
|
9974
10178
|
}
|
|
9975
10179
|
};
|
|
9976
10180
|
|
|
@@ -9979,20 +10183,20 @@ var ContextCommand = {
|
|
|
9979
10183
|
command: "context <command>",
|
|
9980
10184
|
aliases: ["ctx"],
|
|
9981
10185
|
describe: "Uniform Context commands",
|
|
9982
|
-
builder: (
|
|
10186
|
+
builder: (yargs43) => yargs43.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
|
|
9983
10187
|
handler: () => {
|
|
9984
|
-
|
|
10188
|
+
yargs28.showHelp();
|
|
9985
10189
|
}
|
|
9986
10190
|
};
|
|
9987
10191
|
|
|
9988
10192
|
// src/commands/integration/index.ts
|
|
9989
|
-
import
|
|
10193
|
+
import yargs33 from "yargs";
|
|
9990
10194
|
|
|
9991
10195
|
// src/commands/integration/commands/definition.ts
|
|
9992
|
-
import
|
|
10196
|
+
import yargs32 from "yargs";
|
|
9993
10197
|
|
|
9994
10198
|
// src/commands/integration/commands/definition/dataResourceEditor/dataResourceEditor.ts
|
|
9995
|
-
import
|
|
10199
|
+
import yargs29 from "yargs";
|
|
9996
10200
|
|
|
9997
10201
|
// src/commands/integration/commands/definition/dataResourceEditor/deploy.ts
|
|
9998
10202
|
import { readFileSync as readFileSync2 } from "fs";
|
|
@@ -10063,8 +10267,8 @@ var EdgehancerClient = class extends ApiClient {
|
|
|
10063
10267
|
};
|
|
10064
10268
|
|
|
10065
10269
|
// src/commands/integration/commands/definition/dataResourceEditor/util.ts
|
|
10066
|
-
function withDataResourceEditorIdOptions(
|
|
10067
|
-
return
|
|
10270
|
+
function withDataResourceEditorIdOptions(yargs43) {
|
|
10271
|
+
return yargs43.option("connectorType", {
|
|
10068
10272
|
describe: "Integration data connector type to attach the data resource editor to, as defined in the integration manifest file.",
|
|
10069
10273
|
demandOption: true,
|
|
10070
10274
|
type: "string"
|
|
@@ -10084,11 +10288,11 @@ function withDataResourceEditorIdOptions(yargs42) {
|
|
|
10084
10288
|
var IntegrationDataResourceEditorDeployModule = {
|
|
10085
10289
|
command: "deploy <filename>",
|
|
10086
10290
|
describe: "Deploys a custom AI data resource editor hook to run when AI edits data resources of a specific archetype. The API key used must have team admin permissions.",
|
|
10087
|
-
builder: (
|
|
10291
|
+
builder: (yargs43) => withConfiguration(
|
|
10088
10292
|
withApiOptions(
|
|
10089
10293
|
withTeamOptions(
|
|
10090
10294
|
withDataResourceEditorIdOptions(
|
|
10091
|
-
|
|
10295
|
+
yargs43.positional("filename", {
|
|
10092
10296
|
demandOption: true,
|
|
10093
10297
|
describe: "ESM code file to run for the target data resource editor hook. Refer to the documentation for expected types."
|
|
10094
10298
|
}).option("compatibilityDate", {
|
|
@@ -10131,7 +10335,7 @@ var IntegrationDataResourceEditorDeployModule = {
|
|
|
10131
10335
|
var IntegrationDataResourceEditorRemoveModule = {
|
|
10132
10336
|
command: "remove",
|
|
10133
10337
|
describe: "Removes a custom AI data resource editor hook from a data resource archetype. The API key used must have team admin permissions.",
|
|
10134
|
-
builder: (
|
|
10338
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withDataResourceEditorIdOptions(yargs43)))),
|
|
10135
10339
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, connectorType, archetype, hook }) => {
|
|
10136
10340
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10137
10341
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -10143,21 +10347,21 @@ var IntegrationDataResourceEditorRemoveModule = {
|
|
|
10143
10347
|
var IntegrationDataResourceEditorModule = {
|
|
10144
10348
|
command: "dataResourceEditor <command>",
|
|
10145
10349
|
describe: "Commands for managing custom AI data resource editors at the team level.",
|
|
10146
|
-
builder: (
|
|
10350
|
+
builder: (yargs43) => yargs43.command(IntegrationDataResourceEditorDeployModule).command(IntegrationDataResourceEditorRemoveModule).demandCommand(),
|
|
10147
10351
|
handler: () => {
|
|
10148
|
-
|
|
10352
|
+
yargs29.help();
|
|
10149
10353
|
}
|
|
10150
10354
|
};
|
|
10151
10355
|
|
|
10152
10356
|
// src/commands/integration/commands/definition/edgehancer/edgehancer.ts
|
|
10153
|
-
import
|
|
10357
|
+
import yargs30 from "yargs";
|
|
10154
10358
|
|
|
10155
10359
|
// src/commands/integration/commands/definition/edgehancer/deploy.ts
|
|
10156
10360
|
import { readFileSync as readFileSync3 } from "fs";
|
|
10157
10361
|
|
|
10158
10362
|
// src/commands/integration/commands/definition/edgehancer/util.ts
|
|
10159
|
-
function withEdgehancerIdOptions(
|
|
10160
|
-
return
|
|
10363
|
+
function withEdgehancerIdOptions(yargs43) {
|
|
10364
|
+
return yargs43.option("connectorType", {
|
|
10161
10365
|
describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
|
|
10162
10366
|
demandOption: true,
|
|
10163
10367
|
type: "string"
|
|
@@ -10177,11 +10381,11 @@ function withEdgehancerIdOptions(yargs42) {
|
|
|
10177
10381
|
var IntegrationEdgehancerDeployModule = {
|
|
10178
10382
|
command: "deploy <filename>",
|
|
10179
10383
|
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.",
|
|
10180
|
-
builder: (
|
|
10384
|
+
builder: (yargs43) => withConfiguration(
|
|
10181
10385
|
withApiOptions(
|
|
10182
10386
|
withTeamOptions(
|
|
10183
10387
|
withEdgehancerIdOptions(
|
|
10184
|
-
|
|
10388
|
+
yargs43.positional("filename", {
|
|
10185
10389
|
demandOption: true,
|
|
10186
10390
|
describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
|
|
10187
10391
|
}).option("compatibilityDate", {
|
|
@@ -10224,7 +10428,7 @@ var IntegrationEdgehancerDeployModule = {
|
|
|
10224
10428
|
var IntegrationEdgehancerRemoveModule = {
|
|
10225
10429
|
command: "remove",
|
|
10226
10430
|
describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
|
|
10227
|
-
builder: (
|
|
10431
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs43)))),
|
|
10228
10432
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
|
|
10229
10433
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10230
10434
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -10236,22 +10440,22 @@ var IntegrationEdgehancerRemoveModule = {
|
|
|
10236
10440
|
var IntegrationEdgehancerModule = {
|
|
10237
10441
|
command: "edgehancer <command>",
|
|
10238
10442
|
describe: "Commands for managing custom integration edgehancers at the team level.",
|
|
10239
|
-
builder: (
|
|
10443
|
+
builder: (yargs43) => yargs43.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
|
|
10240
10444
|
handler: () => {
|
|
10241
|
-
|
|
10445
|
+
yargs30.help();
|
|
10242
10446
|
}
|
|
10243
10447
|
};
|
|
10244
10448
|
|
|
10245
10449
|
// src/commands/integration/commands/definition/propertyEditor/propertyEditor.ts
|
|
10246
|
-
import
|
|
10450
|
+
import yargs31 from "yargs";
|
|
10247
10451
|
|
|
10248
10452
|
// src/commands/integration/commands/definition/propertyEditor/deploy.ts
|
|
10249
10453
|
import { IntegrationPropertyEditorsClient } from "@uniformdev/canvas";
|
|
10250
10454
|
import { readFileSync as readFileSync4 } from "fs";
|
|
10251
10455
|
|
|
10252
10456
|
// src/commands/integration/commands/definition/propertyEditor/util.ts
|
|
10253
|
-
function withPropertyEditorIdOptions(
|
|
10254
|
-
return
|
|
10457
|
+
function withPropertyEditorIdOptions(yargs43) {
|
|
10458
|
+
return yargs43.option("propertyType", {
|
|
10255
10459
|
describe: "Property type to attach the editor to.",
|
|
10256
10460
|
demandOption: true,
|
|
10257
10461
|
type: "string"
|
|
@@ -10267,11 +10471,11 @@ function withPropertyEditorIdOptions(yargs42) {
|
|
|
10267
10471
|
var IntegrationPropertyEditorDeployModule = {
|
|
10268
10472
|
command: "deploy <filename>",
|
|
10269
10473
|
describe: "Deploys a custom AI property editor hook to run when a property of a specific type is edited. The API key used must have team admin permissions.",
|
|
10270
|
-
builder: (
|
|
10474
|
+
builder: (yargs43) => withConfiguration(
|
|
10271
10475
|
withApiOptions(
|
|
10272
10476
|
withTeamOptions(
|
|
10273
10477
|
withPropertyEditorIdOptions(
|
|
10274
|
-
|
|
10478
|
+
yargs43.positional("filename", {
|
|
10275
10479
|
demandOption: true,
|
|
10276
10480
|
describe: "ESM code file to run for the target property editor hook. Refer to the documentation for expected types."
|
|
10277
10481
|
}).option("compatibilityDate", {
|
|
@@ -10314,7 +10518,7 @@ import { IntegrationPropertyEditorsClient as IntegrationPropertyEditorsClient2 }
|
|
|
10314
10518
|
var IntegrationPropertyEditorRemoveModule = {
|
|
10315
10519
|
command: "remove",
|
|
10316
10520
|
describe: "Deletes a custom AI property editor hook from a property type. The API key used must have team admin permissions.",
|
|
10317
|
-
builder: (
|
|
10521
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withPropertyEditorIdOptions(yargs43)))),
|
|
10318
10522
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, propertyType, hook }) => {
|
|
10319
10523
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10320
10524
|
const client = new IntegrationPropertyEditorsClient2({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -10326,9 +10530,9 @@ var IntegrationPropertyEditorRemoveModule = {
|
|
|
10326
10530
|
var IntegrationPropertyEditorModule = {
|
|
10327
10531
|
command: "propertyEditor <command>",
|
|
10328
10532
|
describe: "Commands for managing custom AI property editors at the team level.",
|
|
10329
|
-
builder: (
|
|
10533
|
+
builder: (yargs43) => yargs43.command(IntegrationPropertyEditorDeployModule).command(IntegrationPropertyEditorRemoveModule).demandCommand(),
|
|
10330
10534
|
handler: () => {
|
|
10331
|
-
|
|
10535
|
+
yargs31.help();
|
|
10332
10536
|
}
|
|
10333
10537
|
};
|
|
10334
10538
|
|
|
@@ -10368,10 +10572,10 @@ var DefinitionClient = class extends ApiClient2 {
|
|
|
10368
10572
|
var IntegrationDefinitionRegisterModule = {
|
|
10369
10573
|
command: "register <filename>",
|
|
10370
10574
|
describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
|
|
10371
|
-
builder: (
|
|
10575
|
+
builder: (yargs43) => withConfiguration(
|
|
10372
10576
|
withApiOptions(
|
|
10373
10577
|
withTeamOptions(
|
|
10374
|
-
|
|
10578
|
+
yargs43.positional("filename", {
|
|
10375
10579
|
demandOption: true,
|
|
10376
10580
|
describe: "Integration definition manifest to register"
|
|
10377
10581
|
})
|
|
@@ -10390,10 +10594,10 @@ var IntegrationDefinitionRegisterModule = {
|
|
|
10390
10594
|
var IntegrationDefinitionRemoveModule = {
|
|
10391
10595
|
command: "remove <type>",
|
|
10392
10596
|
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.",
|
|
10393
|
-
builder: (
|
|
10597
|
+
builder: (yargs43) => withConfiguration(
|
|
10394
10598
|
withApiOptions(
|
|
10395
10599
|
withTeamOptions(
|
|
10396
|
-
|
|
10600
|
+
yargs43.positional("type", {
|
|
10397
10601
|
demandOption: true,
|
|
10398
10602
|
describe: "Integration type (from its manifest) to remove."
|
|
10399
10603
|
})
|
|
@@ -10411,9 +10615,9 @@ var IntegrationDefinitionRemoveModule = {
|
|
|
10411
10615
|
var IntegrationDefinitionModule = {
|
|
10412
10616
|
command: "definition <command>",
|
|
10413
10617
|
describe: "Commands for managing custom integration definitions at the team level.",
|
|
10414
|
-
builder: (
|
|
10618
|
+
builder: (yargs43) => yargs43.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).command(IntegrationDataResourceEditorModule).command(IntegrationPropertyEditorModule).demandCommand(),
|
|
10415
10619
|
handler: () => {
|
|
10416
|
-
|
|
10620
|
+
yargs32.help();
|
|
10417
10621
|
}
|
|
10418
10622
|
};
|
|
10419
10623
|
|
|
@@ -10453,10 +10657,10 @@ var InstallClient = class extends ApiClient3 {
|
|
|
10453
10657
|
var IntegrationInstallModule = {
|
|
10454
10658
|
command: "install <type>",
|
|
10455
10659
|
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.",
|
|
10456
|
-
builder: (
|
|
10660
|
+
builder: (yargs43) => withConfiguration(
|
|
10457
10661
|
withApiOptions(
|
|
10458
10662
|
withProjectOptions(
|
|
10459
|
-
|
|
10663
|
+
yargs43.positional("type", {
|
|
10460
10664
|
demandOption: true,
|
|
10461
10665
|
describe: "Integration type to install (as defined in its manifest)"
|
|
10462
10666
|
}).option("configuration", {
|
|
@@ -10478,10 +10682,10 @@ var IntegrationInstallModule = {
|
|
|
10478
10682
|
var IntegrationUninstallModule = {
|
|
10479
10683
|
command: "uninstall <type>",
|
|
10480
10684
|
describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
|
|
10481
|
-
builder: (
|
|
10685
|
+
builder: (yargs43) => withConfiguration(
|
|
10482
10686
|
withApiOptions(
|
|
10483
10687
|
withProjectOptions(
|
|
10484
|
-
|
|
10688
|
+
yargs43.positional("type", {
|
|
10485
10689
|
demandOption: true,
|
|
10486
10690
|
describe: "Integration type to uninstall (as defined in its manifest)"
|
|
10487
10691
|
})
|
|
@@ -10499,9 +10703,9 @@ var IntegrationUninstallModule = {
|
|
|
10499
10703
|
var IntegrationCommand = {
|
|
10500
10704
|
command: "integration <command>",
|
|
10501
10705
|
describe: "Integration management commands",
|
|
10502
|
-
builder: (
|
|
10706
|
+
builder: (yargs43) => yargs43.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
|
|
10503
10707
|
handler: () => {
|
|
10504
|
-
|
|
10708
|
+
yargs33.showHelp();
|
|
10505
10709
|
}
|
|
10506
10710
|
};
|
|
10507
10711
|
|
|
@@ -10966,14 +11170,14 @@ var NewMeshCmd = {
|
|
|
10966
11170
|
};
|
|
10967
11171
|
|
|
10968
11172
|
// src/commands/policy-documents/index.ts
|
|
10969
|
-
import
|
|
11173
|
+
import yargs34 from "yargs";
|
|
10970
11174
|
|
|
10971
11175
|
// src/commands/policy-documents/commands/list.ts
|
|
10972
11176
|
var PolicyDocumentsListModule = {
|
|
10973
11177
|
command: "list",
|
|
10974
11178
|
describe: "List policy documents for a project",
|
|
10975
11179
|
aliases: ["ls"],
|
|
10976
|
-
builder: (
|
|
11180
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
10977
11181
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
10978
11182
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
10979
11183
|
const url = new URL(`/api/v1/policy-documents`, apiHost);
|
|
@@ -11058,12 +11262,12 @@ var selectDisplayName13 = (policyDoc) => `Policy document for role ${policyDoc.r
|
|
|
11058
11262
|
var PolicyDocumentsPullModule = {
|
|
11059
11263
|
command: "pull <directory>",
|
|
11060
11264
|
describe: "Pulls all policy documents to local files in a directory",
|
|
11061
|
-
builder: (
|
|
11265
|
+
builder: (yargs43) => withConfiguration(
|
|
11062
11266
|
withApiOptions(
|
|
11063
11267
|
withDebugOptions(
|
|
11064
11268
|
withProjectOptions(
|
|
11065
11269
|
withDiffOptions(
|
|
11066
|
-
|
|
11270
|
+
yargs43.positional("directory", {
|
|
11067
11271
|
describe: "Directory to save to. Each policy document will be saved as a separate file named by role ID.",
|
|
11068
11272
|
type: "string"
|
|
11069
11273
|
}).option("format", {
|
|
@@ -11196,12 +11400,12 @@ function mergePolicyDocuments(localDocs, remoteDocs, mode) {
|
|
|
11196
11400
|
var PolicyDocumentsPushModule = {
|
|
11197
11401
|
command: "push <directory>",
|
|
11198
11402
|
describe: "Pushes policy documents from local files to Uniform",
|
|
11199
|
-
builder: (
|
|
11403
|
+
builder: (yargs43) => withConfiguration(
|
|
11200
11404
|
withApiOptions(
|
|
11201
11405
|
withDebugOptions(
|
|
11202
11406
|
withProjectOptions(
|
|
11203
11407
|
withDiffOptions(
|
|
11204
|
-
|
|
11408
|
+
yargs43.positional("directory", {
|
|
11205
11409
|
describe: "Directory containing policy document files (one file per role ID).",
|
|
11206
11410
|
type: "string"
|
|
11207
11411
|
}).option("format", {
|
|
@@ -11302,17 +11506,17 @@ var PolicyDocumentsCommand = {
|
|
|
11302
11506
|
command: "policy-documents <command>",
|
|
11303
11507
|
aliases: ["policy", "policies"],
|
|
11304
11508
|
describe: "Uniform Policy Documents commands",
|
|
11305
|
-
builder: (
|
|
11509
|
+
builder: (yargs43) => yargs43.command(PolicyDocumentsListModule).command(PolicyDocumentsPullModule).command(PolicyDocumentsPushModule).demandCommand(),
|
|
11306
11510
|
handler: () => {
|
|
11307
|
-
|
|
11511
|
+
yargs34.showHelp();
|
|
11308
11512
|
}
|
|
11309
11513
|
};
|
|
11310
11514
|
|
|
11311
11515
|
// src/commands/project-map/index.ts
|
|
11312
|
-
import
|
|
11516
|
+
import yargs37 from "yargs";
|
|
11313
11517
|
|
|
11314
11518
|
// src/commands/project-map/commands/projectMapDefinition.ts
|
|
11315
|
-
import
|
|
11519
|
+
import yargs35 from "yargs";
|
|
11316
11520
|
|
|
11317
11521
|
// src/commands/project-map/commands/ProjectMapDefinition/_util.ts
|
|
11318
11522
|
import { UncachedProjectMapClient } from "@uniformdev/project-map";
|
|
@@ -11326,11 +11530,11 @@ function getProjectMapClient(options) {
|
|
|
11326
11530
|
var ProjectMapDefinitionGetModule = {
|
|
11327
11531
|
command: "get <id>",
|
|
11328
11532
|
describe: "Fetch a project map",
|
|
11329
|
-
builder: (
|
|
11533
|
+
builder: (yargs43) => withFormatOptions(
|
|
11330
11534
|
withConfiguration(
|
|
11331
11535
|
withApiOptions(
|
|
11332
11536
|
withProjectOptions(
|
|
11333
|
-
|
|
11537
|
+
yargs43.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
|
|
11334
11538
|
)
|
|
11335
11539
|
)
|
|
11336
11540
|
)
|
|
@@ -11353,7 +11557,7 @@ var ProjectMapDefinitionListModule = {
|
|
|
11353
11557
|
command: "list",
|
|
11354
11558
|
describe: "List of project maps",
|
|
11355
11559
|
aliases: ["ls"],
|
|
11356
|
-
builder: (
|
|
11560
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
11357
11561
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
11358
11562
|
const fetch2 = nodeFetchProxy(proxy);
|
|
11359
11563
|
const client = getProjectMapClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -11407,12 +11611,12 @@ function createProjectMapDefinitionEngineDataSource({
|
|
|
11407
11611
|
var ProjectMapDefinitionPullModule = {
|
|
11408
11612
|
command: "pull <directory>",
|
|
11409
11613
|
describe: "Pulls all project maps to local files in a directory",
|
|
11410
|
-
builder: (
|
|
11614
|
+
builder: (yargs43) => withConfiguration(
|
|
11411
11615
|
withDebugOptions(
|
|
11412
11616
|
withApiOptions(
|
|
11413
11617
|
withProjectOptions(
|
|
11414
11618
|
withDiffOptions(
|
|
11415
|
-
|
|
11619
|
+
yargs43.positional("directory", {
|
|
11416
11620
|
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.",
|
|
11417
11621
|
type: "string"
|
|
11418
11622
|
}).option("format", {
|
|
@@ -11487,12 +11691,12 @@ var ProjectMapDefinitionPullModule = {
|
|
|
11487
11691
|
var ProjectMapDefinitionPushModule = {
|
|
11488
11692
|
command: "push <directory>",
|
|
11489
11693
|
describe: "Pushes all project maps from files in a directory or package to Uniform",
|
|
11490
|
-
builder: (
|
|
11694
|
+
builder: (yargs43) => withConfiguration(
|
|
11491
11695
|
withDebugOptions(
|
|
11492
11696
|
withApiOptions(
|
|
11493
11697
|
withProjectOptions(
|
|
11494
11698
|
withDiffOptions(
|
|
11495
|
-
|
|
11699
|
+
yargs43.positional("directory", {
|
|
11496
11700
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
11497
11701
|
type: "string"
|
|
11498
11702
|
}).option("mode", {
|
|
@@ -11556,9 +11760,9 @@ var ProjectMapDefinitionRemoveModule = {
|
|
|
11556
11760
|
command: "remove <id>",
|
|
11557
11761
|
aliases: ["delete", "rm"],
|
|
11558
11762
|
describe: "Delete a project map",
|
|
11559
|
-
builder: (
|
|
11763
|
+
builder: (yargs43) => withConfiguration(
|
|
11560
11764
|
withApiOptions(
|
|
11561
|
-
withProjectOptions(
|
|
11765
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
11562
11766
|
)
|
|
11563
11767
|
),
|
|
11564
11768
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -11573,10 +11777,10 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
11573
11777
|
command: "update <filename>",
|
|
11574
11778
|
aliases: ["put"],
|
|
11575
11779
|
describe: "Insert or update a project map",
|
|
11576
|
-
builder: (
|
|
11780
|
+
builder: (yargs43) => withConfiguration(
|
|
11577
11781
|
withApiOptions(
|
|
11578
11782
|
withProjectOptions(
|
|
11579
|
-
|
|
11783
|
+
yargs43.positional("filename", { demandOption: true, describe: "Project map file to put" })
|
|
11580
11784
|
)
|
|
11581
11785
|
)
|
|
11582
11786
|
),
|
|
@@ -11592,24 +11796,24 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
11592
11796
|
var ProjectMapDefinitionModule = {
|
|
11593
11797
|
command: "definition <command>",
|
|
11594
11798
|
describe: "Commands for ProjectMap Definitions",
|
|
11595
|
-
builder: (
|
|
11799
|
+
builder: (yargs43) => yargs43.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
|
|
11596
11800
|
handler: () => {
|
|
11597
|
-
|
|
11801
|
+
yargs35.help();
|
|
11598
11802
|
}
|
|
11599
11803
|
};
|
|
11600
11804
|
|
|
11601
11805
|
// src/commands/project-map/commands/projectMapNode.ts
|
|
11602
|
-
import
|
|
11806
|
+
import yargs36 from "yargs";
|
|
11603
11807
|
|
|
11604
11808
|
// src/commands/project-map/commands/ProjectMapNode/get.ts
|
|
11605
11809
|
var ProjectMapNodeGetModule = {
|
|
11606
11810
|
command: "get <id> <projectMapId>",
|
|
11607
11811
|
describe: "Fetch a project map node",
|
|
11608
|
-
builder: (
|
|
11812
|
+
builder: (yargs43) => withConfiguration(
|
|
11609
11813
|
withFormatOptions(
|
|
11610
11814
|
withApiOptions(
|
|
11611
11815
|
withProjectOptions(
|
|
11612
|
-
|
|
11816
|
+
yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
|
|
11613
11817
|
)
|
|
11614
11818
|
)
|
|
11615
11819
|
)
|
|
@@ -11633,12 +11837,12 @@ var ProjectMapNodeListModule = {
|
|
|
11633
11837
|
command: "list <projectMapId>",
|
|
11634
11838
|
describe: "List project map nodes",
|
|
11635
11839
|
aliases: ["ls"],
|
|
11636
|
-
builder: (
|
|
11840
|
+
builder: (yargs43) => withConfiguration(
|
|
11637
11841
|
withFormatOptions(
|
|
11638
11842
|
withApiOptions(
|
|
11639
11843
|
withProjectOptions(
|
|
11640
11844
|
withStateOptions(
|
|
11641
|
-
|
|
11845
|
+
yargs43.positional("projectMapId", {
|
|
11642
11846
|
demandOption: true,
|
|
11643
11847
|
describe: "ProjectMap UUID to fetch from"
|
|
11644
11848
|
})
|
|
@@ -11716,12 +11920,12 @@ function createProjectMapNodeEngineDataSource({
|
|
|
11716
11920
|
var ProjectMapNodePullModule = {
|
|
11717
11921
|
command: "pull <directory>",
|
|
11718
11922
|
describe: "Pulls all project maps nodes to local files in a directory",
|
|
11719
|
-
builder: (
|
|
11923
|
+
builder: (yargs43) => withConfiguration(
|
|
11720
11924
|
withDebugOptions(
|
|
11721
11925
|
withApiOptions(
|
|
11722
11926
|
withProjectOptions(
|
|
11723
11927
|
withDiffOptions(
|
|
11724
|
-
|
|
11928
|
+
yargs43.positional("directory", {
|
|
11725
11929
|
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.",
|
|
11726
11930
|
type: "string"
|
|
11727
11931
|
}).option("format", {
|
|
@@ -11803,12 +12007,12 @@ import {
|
|
|
11803
12007
|
var ProjectMapNodePushModule = {
|
|
11804
12008
|
command: "push <directory>",
|
|
11805
12009
|
describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
|
|
11806
|
-
builder: (
|
|
12010
|
+
builder: (yargs43) => withConfiguration(
|
|
11807
12011
|
withDebugOptions(
|
|
11808
12012
|
withApiOptions(
|
|
11809
12013
|
withProjectOptions(
|
|
11810
12014
|
withDiffOptions(
|
|
11811
|
-
|
|
12015
|
+
yargs43.positional("directory", {
|
|
11812
12016
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
11813
12017
|
type: "string"
|
|
11814
12018
|
}).option("mode", {
|
|
@@ -11910,10 +12114,10 @@ var ProjectMapNodeRemoveModule = {
|
|
|
11910
12114
|
command: "remove <id> <projectMapId>",
|
|
11911
12115
|
aliases: ["delete", "rm"],
|
|
11912
12116
|
describe: "Delete a project map node",
|
|
11913
|
-
builder: (
|
|
12117
|
+
builder: (yargs43) => withConfiguration(
|
|
11914
12118
|
withApiOptions(
|
|
11915
12119
|
withProjectOptions(
|
|
11916
|
-
|
|
12120
|
+
yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
|
|
11917
12121
|
)
|
|
11918
12122
|
)
|
|
11919
12123
|
),
|
|
@@ -11929,10 +12133,10 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11929
12133
|
command: "update <filename> <projectMapId>",
|
|
11930
12134
|
aliases: ["put"],
|
|
11931
12135
|
describe: "Insert or update a project map node",
|
|
11932
|
-
builder: (
|
|
12136
|
+
builder: (yargs43) => withConfiguration(
|
|
11933
12137
|
withApiOptions(
|
|
11934
12138
|
withProjectOptions(
|
|
11935
|
-
|
|
12139
|
+
yargs43.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
|
|
11936
12140
|
)
|
|
11937
12141
|
)
|
|
11938
12142
|
),
|
|
@@ -11948,9 +12152,9 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11948
12152
|
var ProjectMapNodeModule = {
|
|
11949
12153
|
command: "node <command>",
|
|
11950
12154
|
describe: "Commands for ProjectMap Nodes",
|
|
11951
|
-
builder: (
|
|
12155
|
+
builder: (yargs43) => yargs43.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
|
|
11952
12156
|
handler: () => {
|
|
11953
|
-
|
|
12157
|
+
yargs36.help();
|
|
11954
12158
|
}
|
|
11955
12159
|
};
|
|
11956
12160
|
|
|
@@ -11959,17 +12163,17 @@ var ProjectMapCommand = {
|
|
|
11959
12163
|
command: "project-map <command>",
|
|
11960
12164
|
aliases: ["prm"],
|
|
11961
12165
|
describe: "Uniform ProjectMap commands",
|
|
11962
|
-
builder: (
|
|
12166
|
+
builder: (yargs43) => yargs43.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
|
|
11963
12167
|
handler: () => {
|
|
11964
|
-
|
|
12168
|
+
yargs37.showHelp();
|
|
11965
12169
|
}
|
|
11966
12170
|
};
|
|
11967
12171
|
|
|
11968
12172
|
// src/commands/redirect/index.ts
|
|
11969
|
-
import
|
|
12173
|
+
import yargs39 from "yargs";
|
|
11970
12174
|
|
|
11971
12175
|
// src/commands/redirect/commands/redirect.ts
|
|
11972
|
-
import
|
|
12176
|
+
import yargs38 from "yargs";
|
|
11973
12177
|
|
|
11974
12178
|
// src/commands/redirect/commands/RedirectDefinition/_util.ts
|
|
11975
12179
|
import { UncachedRedirectClient } from "@uniformdev/redirect";
|
|
@@ -11994,11 +12198,11 @@ function getRedirectClient(options) {
|
|
|
11994
12198
|
var RedirectDefinitionGetModule = {
|
|
11995
12199
|
command: "get <id>",
|
|
11996
12200
|
describe: "Fetch a redirect",
|
|
11997
|
-
builder: (
|
|
12201
|
+
builder: (yargs43) => withConfiguration(
|
|
11998
12202
|
withFormatOptions(
|
|
11999
12203
|
withApiOptions(
|
|
12000
12204
|
withProjectOptions(
|
|
12001
|
-
|
|
12205
|
+
yargs43.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
|
|
12002
12206
|
)
|
|
12003
12207
|
)
|
|
12004
12208
|
)
|
|
@@ -12021,7 +12225,7 @@ var RedirectDefinitionListModule = {
|
|
|
12021
12225
|
command: "list",
|
|
12022
12226
|
describe: "List of redirects",
|
|
12023
12227
|
aliases: ["ls"],
|
|
12024
|
-
builder: (
|
|
12228
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
12025
12229
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
12026
12230
|
const fetch2 = nodeFetchProxy(proxy);
|
|
12027
12231
|
const client = getRedirectClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -12073,12 +12277,12 @@ function createRedirectDefinitionEngineDataSource({
|
|
|
12073
12277
|
var RedirectDefinitionPullModule = {
|
|
12074
12278
|
command: "pull <directory>",
|
|
12075
12279
|
describe: "Pulls all redirects to local files in a directory",
|
|
12076
|
-
builder: (
|
|
12280
|
+
builder: (yargs43) => withConfiguration(
|
|
12077
12281
|
withDebugOptions(
|
|
12078
12282
|
withApiOptions(
|
|
12079
12283
|
withProjectOptions(
|
|
12080
12284
|
withDiffOptions(
|
|
12081
|
-
|
|
12285
|
+
yargs43.positional("directory", {
|
|
12082
12286
|
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.",
|
|
12083
12287
|
type: "string"
|
|
12084
12288
|
}).option("format", {
|
|
@@ -12154,12 +12358,12 @@ var RedirectDefinitionPullModule = {
|
|
|
12154
12358
|
var RedirectDefinitionPushModule = {
|
|
12155
12359
|
command: "push <directory>",
|
|
12156
12360
|
describe: "Pushes all redirects from files in a directory or package to Uniform",
|
|
12157
|
-
builder: (
|
|
12361
|
+
builder: (yargs43) => withConfiguration(
|
|
12158
12362
|
withDebugOptions(
|
|
12159
12363
|
withApiOptions(
|
|
12160
12364
|
withProjectOptions(
|
|
12161
12365
|
withDiffOptions(
|
|
12162
|
-
|
|
12366
|
+
yargs43.positional("directory", {
|
|
12163
12367
|
describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
|
|
12164
12368
|
type: "string"
|
|
12165
12369
|
}).option("mode", {
|
|
@@ -12223,9 +12427,9 @@ var RedirectDefinitionRemoveModule = {
|
|
|
12223
12427
|
command: "remove <id>",
|
|
12224
12428
|
aliases: ["delete", "rm"],
|
|
12225
12429
|
describe: "Delete a redirect",
|
|
12226
|
-
builder: (
|
|
12430
|
+
builder: (yargs43) => withConfiguration(
|
|
12227
12431
|
withApiOptions(
|
|
12228
|
-
withProjectOptions(
|
|
12432
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
12229
12433
|
)
|
|
12230
12434
|
),
|
|
12231
12435
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -12240,10 +12444,10 @@ var RedirectDefinitionUpdateModule = {
|
|
|
12240
12444
|
command: "update <filename>",
|
|
12241
12445
|
aliases: ["put"],
|
|
12242
12446
|
describe: "Insert or update a redirect",
|
|
12243
|
-
builder: (
|
|
12447
|
+
builder: (yargs43) => withConfiguration(
|
|
12244
12448
|
withApiOptions(
|
|
12245
12449
|
withProjectOptions(
|
|
12246
|
-
|
|
12450
|
+
yargs43.positional("filename", { demandOption: true, describe: "Redirect file to put" })
|
|
12247
12451
|
)
|
|
12248
12452
|
)
|
|
12249
12453
|
),
|
|
@@ -12259,9 +12463,9 @@ var RedirectDefinitionUpdateModule = {
|
|
|
12259
12463
|
var RedirectDefinitionModule = {
|
|
12260
12464
|
command: "definition <command>",
|
|
12261
12465
|
describe: "Commands for Redirect Definitions",
|
|
12262
|
-
builder: (
|
|
12466
|
+
builder: (yargs43) => yargs43.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
|
|
12263
12467
|
handler: () => {
|
|
12264
|
-
|
|
12468
|
+
yargs38.help();
|
|
12265
12469
|
}
|
|
12266
12470
|
};
|
|
12267
12471
|
|
|
@@ -12270,14 +12474,14 @@ var RedirectCommand = {
|
|
|
12270
12474
|
command: "redirect <command>",
|
|
12271
12475
|
aliases: ["red"],
|
|
12272
12476
|
describe: "Uniform Redirect commands",
|
|
12273
|
-
builder: (
|
|
12477
|
+
builder: (yargs43) => yargs43.command(RedirectDefinitionModule).demandCommand(),
|
|
12274
12478
|
handler: () => {
|
|
12275
|
-
|
|
12479
|
+
yargs39.showHelp();
|
|
12276
12480
|
}
|
|
12277
12481
|
};
|
|
12278
12482
|
|
|
12279
12483
|
// src/commands/sync/index.ts
|
|
12280
|
-
import
|
|
12484
|
+
import yargs40 from "yargs";
|
|
12281
12485
|
|
|
12282
12486
|
// src/webhooksClient.ts
|
|
12283
12487
|
import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
|
|
@@ -12471,12 +12675,12 @@ function createWebhookEngineDataSource({
|
|
|
12471
12675
|
var WebhookPullModule = {
|
|
12472
12676
|
command: "pull <directory>",
|
|
12473
12677
|
describe: "Pulls all webhooks to local files in a directory",
|
|
12474
|
-
builder: (
|
|
12678
|
+
builder: (yargs43) => withConfiguration(
|
|
12475
12679
|
withApiOptions(
|
|
12476
12680
|
withDebugOptions(
|
|
12477
12681
|
withProjectOptions(
|
|
12478
12682
|
withDiffOptions(
|
|
12479
|
-
|
|
12683
|
+
yargs43.positional("directory", {
|
|
12480
12684
|
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.",
|
|
12481
12685
|
type: "string"
|
|
12482
12686
|
}).option("format", {
|
|
@@ -12662,11 +12866,12 @@ function numPad(num, spaces = 6) {
|
|
|
12662
12866
|
var SyncPullModule = {
|
|
12663
12867
|
command: "pull",
|
|
12664
12868
|
describe: "Pulls whole project to local files in a directory",
|
|
12665
|
-
builder: (
|
|
12869
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs43))))),
|
|
12666
12870
|
handler: async ({ serialization, ...otherParams }) => {
|
|
12667
12871
|
const config2 = serialization;
|
|
12668
12872
|
const enabledEntities = Object.entries({
|
|
12669
12873
|
locale: LocalePullModule,
|
|
12874
|
+
label: LabelPullModule,
|
|
12670
12875
|
asset: AssetPullModule,
|
|
12671
12876
|
category: CategoryPullModule,
|
|
12672
12877
|
workflow: WorkflowPullModule,
|
|
@@ -12761,12 +12966,12 @@ var getFormat = (entityType, config2) => {
|
|
|
12761
12966
|
var WebhookPushModule = {
|
|
12762
12967
|
command: "push <directory>",
|
|
12763
12968
|
describe: "Pushes all webhooks from files in a directory to Uniform",
|
|
12764
|
-
builder: (
|
|
12969
|
+
builder: (yargs43) => withConfiguration(
|
|
12765
12970
|
withDebugOptions(
|
|
12766
12971
|
withApiOptions(
|
|
12767
12972
|
withProjectOptions(
|
|
12768
12973
|
withDiffOptions(
|
|
12769
|
-
|
|
12974
|
+
yargs43.positional("directory", {
|
|
12770
12975
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
12771
12976
|
type: "string"
|
|
12772
12977
|
}).option("mode", {
|
|
@@ -12830,11 +13035,12 @@ var WebhookPushModule = {
|
|
|
12830
13035
|
var SyncPushModule = {
|
|
12831
13036
|
command: "push",
|
|
12832
13037
|
describe: "Pushes whole project data from files in a directory or package to Uniform",
|
|
12833
|
-
builder: (
|
|
13038
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs43))))),
|
|
12834
13039
|
handler: async ({ serialization, ...otherParams }) => {
|
|
12835
13040
|
const config2 = serialization;
|
|
12836
13041
|
const enabledEntities = Object.entries({
|
|
12837
13042
|
locale: LocalePushModule,
|
|
13043
|
+
label: LabelPushModule,
|
|
12838
13044
|
asset: AssetPushModule,
|
|
12839
13045
|
category: CategoryPushModule,
|
|
12840
13046
|
workflow: WorkflowPushModule,
|
|
@@ -13040,21 +13246,21 @@ var getFormat2 = (entityType, config2) => {
|
|
|
13040
13246
|
var SyncCommand = {
|
|
13041
13247
|
command: "sync <command>",
|
|
13042
13248
|
describe: "Uniform Sync commands",
|
|
13043
|
-
builder: (
|
|
13249
|
+
builder: (yargs43) => yargs43.command(SyncPullModule).command(SyncPushModule).demandCommand(),
|
|
13044
13250
|
handler: () => {
|
|
13045
|
-
|
|
13251
|
+
yargs40.showHelp();
|
|
13046
13252
|
}
|
|
13047
13253
|
};
|
|
13048
13254
|
|
|
13049
13255
|
// src/commands/webhook/index.ts
|
|
13050
|
-
import
|
|
13256
|
+
import yargs41 from "yargs";
|
|
13051
13257
|
var WebhookCommand = {
|
|
13052
13258
|
command: "webhook <command>",
|
|
13053
13259
|
aliases: ["wh"],
|
|
13054
13260
|
describe: "Commands for webhooks",
|
|
13055
|
-
builder: (
|
|
13261
|
+
builder: (yargs43) => yargs43.command(WebhookPullModule).command(WebhookPushModule).demandCommand(),
|
|
13056
13262
|
handler: () => {
|
|
13057
|
-
|
|
13263
|
+
yargs41.help();
|
|
13058
13264
|
}
|
|
13059
13265
|
};
|
|
13060
13266
|
|
|
@@ -13289,7 +13495,7 @@ First found was: v${firstVersion}`;
|
|
|
13289
13495
|
|
|
13290
13496
|
// src/index.ts
|
|
13291
13497
|
dotenv.config();
|
|
13292
|
-
var yarggery =
|
|
13498
|
+
var yarggery = yargs42(hideBin(process.argv));
|
|
13293
13499
|
var useDefaultConfig = !process.argv.includes("--config");
|
|
13294
13500
|
var defaultConfig2 = useDefaultConfig ? loadConfig(null) : {};
|
|
13295
13501
|
yarggery.option("verbose", {
|