@uniformdev/cli 20.51.0 → 20.53.0
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
|
|
@@ -1107,7 +1107,7 @@ import { PostHog } from "posthog-node";
|
|
|
1107
1107
|
// package.json
|
|
1108
1108
|
var package_default = {
|
|
1109
1109
|
name: "@uniformdev/cli",
|
|
1110
|
-
version: "20.
|
|
1110
|
+
version: "20.53.0",
|
|
1111
1111
|
description: "Uniform command line interface tool",
|
|
1112
1112
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
1113
1113
|
main: "./cli.js",
|
|
@@ -1386,8 +1386,8 @@ function getExistingServers(config2) {
|
|
|
1386
1386
|
var InstallMcpCommand = {
|
|
1387
1387
|
command: "install",
|
|
1388
1388
|
describe: "Install Uniform MCP server configuration (use --team, --project, and --apiKey for non-interactive mode)",
|
|
1389
|
-
builder: (
|
|
1390
|
-
|
|
1389
|
+
builder: (yargs43) => withConfiguration(
|
|
1390
|
+
yargs43.option("agent", {
|
|
1391
1391
|
alias: "a",
|
|
1392
1392
|
describe: "Specify agent type (cursor, claude, copilot, other)",
|
|
1393
1393
|
type: "string",
|
|
@@ -1587,7 +1587,7 @@ Selected agent: ${agentType}`));
|
|
|
1587
1587
|
var McpCommand = {
|
|
1588
1588
|
command: "mcp <command>",
|
|
1589
1589
|
describe: "Uniform MCP server management commands",
|
|
1590
|
-
builder: (
|
|
1590
|
+
builder: (yargs43) => yargs43.command(InstallMcpCommand).demandCommand(),
|
|
1591
1591
|
handler: () => {
|
|
1592
1592
|
yargs.showHelp();
|
|
1593
1593
|
}
|
|
@@ -2062,8 +2062,8 @@ ${gray2("Rules source:")} https://github.com/uniformdev/ai-rules`);
|
|
|
2062
2062
|
var InstallRulesCommand = {
|
|
2063
2063
|
command: "install",
|
|
2064
2064
|
describe: "Install Uniform AI rules for your development assistant",
|
|
2065
|
-
builder: (
|
|
2066
|
-
|
|
2065
|
+
builder: (yargs43) => withConfiguration(
|
|
2066
|
+
yargs43.option("agent", {
|
|
2067
2067
|
alias: "a",
|
|
2068
2068
|
describe: "Specify agent type (cursor, claude, copilot, other)",
|
|
2069
2069
|
type: "string",
|
|
@@ -2101,7 +2101,7 @@ import { blue as blue4, bold as bold2, gray as gray3, green as green5, red as re
|
|
|
2101
2101
|
var ListRulesCommand = {
|
|
2102
2102
|
command: "list",
|
|
2103
2103
|
describe: "List available Uniform AI rules",
|
|
2104
|
-
builder: (
|
|
2104
|
+
builder: (yargs43) => withConfiguration(yargs43),
|
|
2105
2105
|
handler: async function() {
|
|
2106
2106
|
const { stopAllSpinners, spin } = makeSpinner();
|
|
2107
2107
|
try {
|
|
@@ -2130,7 +2130,7 @@ var ListRulesCommand = {
|
|
|
2130
2130
|
var RulesCommand = {
|
|
2131
2131
|
command: "rules <command>",
|
|
2132
2132
|
describe: "Uniform AI rules management commands",
|
|
2133
|
-
builder: (
|
|
2133
|
+
builder: (yargs43) => yargs43.command(InstallRulesCommand).command(ListRulesCommand).demandCommand(),
|
|
2134
2134
|
handler: () => {
|
|
2135
2135
|
yargs2.showHelp();
|
|
2136
2136
|
}
|
|
@@ -2140,14 +2140,14 @@ var RulesCommand = {
|
|
|
2140
2140
|
var AiCommand = {
|
|
2141
2141
|
command: "ai <command>",
|
|
2142
2142
|
describe: "Uniform AI development assistant commands",
|
|
2143
|
-
builder: (
|
|
2143
|
+
builder: (yargs43) => yargs43.command(RulesCommand).command(McpCommand).demandCommand(),
|
|
2144
2144
|
handler: () => {
|
|
2145
2145
|
yargs3.showHelp();
|
|
2146
2146
|
}
|
|
2147
2147
|
};
|
|
2148
2148
|
|
|
2149
2149
|
// src/commands/canvas/index.ts
|
|
2150
|
-
import
|
|
2150
|
+
import yargs21 from "yargs";
|
|
2151
2151
|
|
|
2152
2152
|
// src/commands/canvas/commands/asset.ts
|
|
2153
2153
|
import yargs4 from "yargs";
|
|
@@ -2179,12 +2179,12 @@ function getFileClient(options) {
|
|
|
2179
2179
|
var AssetGetModule = {
|
|
2180
2180
|
command: "get <id>",
|
|
2181
2181
|
describe: "Get an asset",
|
|
2182
|
-
builder: (
|
|
2182
|
+
builder: (yargs43) => withConfiguration(
|
|
2183
2183
|
withDebugOptions(
|
|
2184
2184
|
withFormatOptions(
|
|
2185
2185
|
withApiOptions(
|
|
2186
2186
|
withProjectOptions(
|
|
2187
|
-
|
|
2187
|
+
yargs43.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
|
|
2188
2188
|
)
|
|
2189
2189
|
)
|
|
2190
2190
|
)
|
|
@@ -2205,7 +2205,7 @@ var AssetGetModule = {
|
|
|
2205
2205
|
var AssetListModule = {
|
|
2206
2206
|
command: "list",
|
|
2207
2207
|
describe: "List assets",
|
|
2208
|
-
builder: (
|
|
2208
|
+
builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
|
|
2209
2209
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
2210
2210
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
2211
2211
|
const client = getAssetClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -2767,8 +2767,8 @@ function prepCompositionForDisk(composition) {
|
|
|
2767
2767
|
delete prepped.state;
|
|
2768
2768
|
return prepped;
|
|
2769
2769
|
}
|
|
2770
|
-
function withStateOptions(
|
|
2771
|
-
return
|
|
2770
|
+
function withStateOptions(yargs43, defaultState = "preview") {
|
|
2771
|
+
return yargs43.option("state", {
|
|
2772
2772
|
type: "string",
|
|
2773
2773
|
describe: `State to fetch.`,
|
|
2774
2774
|
choices: ["preview", "published"],
|
|
@@ -2850,12 +2850,12 @@ function writeCanvasPackage(filename, packageContents) {
|
|
|
2850
2850
|
var AssetPullModule = {
|
|
2851
2851
|
command: "pull <directory>",
|
|
2852
2852
|
describe: "Pulls all assets to local files in a directory",
|
|
2853
|
-
builder: (
|
|
2853
|
+
builder: (yargs43) => withConfiguration(
|
|
2854
2854
|
withApiOptions(
|
|
2855
2855
|
withDebugOptions(
|
|
2856
2856
|
withProjectOptions(
|
|
2857
2857
|
withDiffOptions(
|
|
2858
|
-
|
|
2858
|
+
yargs43.positional("directory", {
|
|
2859
2859
|
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.",
|
|
2860
2860
|
type: "string"
|
|
2861
2861
|
}).option("format", {
|
|
@@ -2967,12 +2967,12 @@ var AssetPullModule = {
|
|
|
2967
2967
|
var AssetPushModule = {
|
|
2968
2968
|
command: "push <directory>",
|
|
2969
2969
|
describe: "Pushes all assets from files in a directory to Uniform",
|
|
2970
|
-
builder: (
|
|
2970
|
+
builder: (yargs43) => withConfiguration(
|
|
2971
2971
|
withApiOptions(
|
|
2972
2972
|
withDebugOptions(
|
|
2973
2973
|
withProjectOptions(
|
|
2974
2974
|
withDiffOptions(
|
|
2975
|
-
|
|
2975
|
+
yargs43.positional("directory", {
|
|
2976
2976
|
describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
|
|
2977
2977
|
type: "string"
|
|
2978
2978
|
}).option("mode", {
|
|
@@ -3096,10 +3096,10 @@ var AssetRemoveModule = {
|
|
|
3096
3096
|
command: "remove <id>",
|
|
3097
3097
|
aliases: ["delete", "rm"],
|
|
3098
3098
|
describe: "Delete an asset",
|
|
3099
|
-
builder: (
|
|
3099
|
+
builder: (yargs43) => withConfiguration(
|
|
3100
3100
|
withDebugOptions(
|
|
3101
3101
|
withApiOptions(
|
|
3102
|
-
withProjectOptions(
|
|
3102
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
|
|
3103
3103
|
)
|
|
3104
3104
|
)
|
|
3105
3105
|
),
|
|
@@ -3120,11 +3120,11 @@ var AssetUpdateModule = {
|
|
|
3120
3120
|
command: "update <filename>",
|
|
3121
3121
|
aliases: ["put"],
|
|
3122
3122
|
describe: "Insert or update an asset",
|
|
3123
|
-
builder: (
|
|
3123
|
+
builder: (yargs43) => withConfiguration(
|
|
3124
3124
|
withDebugOptions(
|
|
3125
3125
|
withApiOptions(
|
|
3126
3126
|
withProjectOptions(
|
|
3127
|
-
|
|
3127
|
+
yargs43.positional("filename", { demandOption: true, describe: "Asset file to put" })
|
|
3128
3128
|
)
|
|
3129
3129
|
)
|
|
3130
3130
|
)
|
|
@@ -3150,7 +3150,7 @@ var AssetUpdateModule = {
|
|
|
3150
3150
|
var AssetModule = {
|
|
3151
3151
|
command: "asset <command>",
|
|
3152
3152
|
describe: "Commands for Assets",
|
|
3153
|
-
builder: (
|
|
3153
|
+
builder: (yargs43) => yargs43.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
|
|
3154
3154
|
handler: () => {
|
|
3155
3155
|
yargs4.help();
|
|
3156
3156
|
}
|
|
@@ -3171,12 +3171,12 @@ function getCategoryClient(options) {
|
|
|
3171
3171
|
var CategoryGetModule = {
|
|
3172
3172
|
command: "get <id>",
|
|
3173
3173
|
describe: "Fetch a category",
|
|
3174
|
-
builder: (
|
|
3174
|
+
builder: (yargs43) => withConfiguration(
|
|
3175
3175
|
withFormatOptions(
|
|
3176
3176
|
withDebugOptions(
|
|
3177
3177
|
withApiOptions(
|
|
3178
3178
|
withProjectOptions(
|
|
3179
|
-
|
|
3179
|
+
yargs43.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
|
|
3180
3180
|
)
|
|
3181
3181
|
)
|
|
3182
3182
|
)
|
|
@@ -3201,8 +3201,8 @@ var CategoryListModule = {
|
|
|
3201
3201
|
command: "list",
|
|
3202
3202
|
describe: "List categories",
|
|
3203
3203
|
aliases: ["ls"],
|
|
3204
|
-
builder: (
|
|
3205
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
3204
|
+
builder: (yargs43) => withConfiguration(
|
|
3205
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs43.options({})))))
|
|
3206
3206
|
),
|
|
3207
3207
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
3208
3208
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -3246,12 +3246,12 @@ function createCategoriesEngineDataSource({
|
|
|
3246
3246
|
var CategoryPullModule = {
|
|
3247
3247
|
command: "pull <directory>",
|
|
3248
3248
|
describe: "Pulls all categories to local files in a directory",
|
|
3249
|
-
builder: (
|
|
3249
|
+
builder: (yargs43) => withConfiguration(
|
|
3250
3250
|
withApiOptions(
|
|
3251
3251
|
withProjectOptions(
|
|
3252
3252
|
withDiffOptions(
|
|
3253
3253
|
withDebugOptions(
|
|
3254
|
-
|
|
3254
|
+
yargs43.positional("directory", {
|
|
3255
3255
|
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.",
|
|
3256
3256
|
type: "string"
|
|
3257
3257
|
}).option("format", {
|
|
@@ -3326,12 +3326,12 @@ var CategoryPullModule = {
|
|
|
3326
3326
|
var CategoryPushModule = {
|
|
3327
3327
|
command: "push <directory>",
|
|
3328
3328
|
describe: "Pushes all categories from files in a directory to Uniform Canvas",
|
|
3329
|
-
builder: (
|
|
3329
|
+
builder: (yargs43) => withConfiguration(
|
|
3330
3330
|
withApiOptions(
|
|
3331
3331
|
withDebugOptions(
|
|
3332
3332
|
withProjectOptions(
|
|
3333
3333
|
withDiffOptions(
|
|
3334
|
-
|
|
3334
|
+
yargs43.positional("directory", {
|
|
3335
3335
|
describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
|
|
3336
3336
|
type: "string"
|
|
3337
3337
|
}).option("mode", {
|
|
@@ -3395,11 +3395,11 @@ var CategoryRemoveModule = {
|
|
|
3395
3395
|
command: "remove <id>",
|
|
3396
3396
|
aliases: ["delete", "rm"],
|
|
3397
3397
|
describe: "Delete a category",
|
|
3398
|
-
builder: (
|
|
3398
|
+
builder: (yargs43) => withConfiguration(
|
|
3399
3399
|
withApiOptions(
|
|
3400
3400
|
withDebugOptions(
|
|
3401
3401
|
withProjectOptions(
|
|
3402
|
-
|
|
3402
|
+
yargs43.positional("id", { demandOption: true, describe: "Category UUID to delete" })
|
|
3403
3403
|
)
|
|
3404
3404
|
)
|
|
3405
3405
|
)
|
|
@@ -3420,11 +3420,11 @@ var CategoryUpdateModule = {
|
|
|
3420
3420
|
command: "update <filename>",
|
|
3421
3421
|
aliases: ["put"],
|
|
3422
3422
|
describe: "Insert or update a category",
|
|
3423
|
-
builder: (
|
|
3423
|
+
builder: (yargs43) => withConfiguration(
|
|
3424
3424
|
withApiOptions(
|
|
3425
3425
|
withDebugOptions(
|
|
3426
3426
|
withProjectOptions(
|
|
3427
|
-
|
|
3427
|
+
yargs43.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
3428
3428
|
)
|
|
3429
3429
|
)
|
|
3430
3430
|
)
|
|
@@ -3446,7 +3446,7 @@ var CategoryModule = {
|
|
|
3446
3446
|
command: "category <command>",
|
|
3447
3447
|
aliases: ["cat"],
|
|
3448
3448
|
describe: "Commands for Canvas categories",
|
|
3449
|
-
builder: (
|
|
3449
|
+
builder: (yargs43) => yargs43.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
|
|
3450
3450
|
handler: () => {
|
|
3451
3451
|
yargs5.help();
|
|
3452
3452
|
}
|
|
@@ -3468,12 +3468,12 @@ function getCanvasClient(options) {
|
|
|
3468
3468
|
var ComponentGetModule = {
|
|
3469
3469
|
command: "get <id>",
|
|
3470
3470
|
describe: "Fetch a component definition",
|
|
3471
|
-
builder: (
|
|
3471
|
+
builder: (yargs43) => withConfiguration(
|
|
3472
3472
|
withFormatOptions(
|
|
3473
3473
|
withDebugOptions(
|
|
3474
3474
|
withApiOptions(
|
|
3475
3475
|
withProjectOptions(
|
|
3476
|
-
|
|
3476
|
+
yargs43.positional("id", {
|
|
3477
3477
|
demandOption: true,
|
|
3478
3478
|
describe: "Component definition public ID to fetch"
|
|
3479
3479
|
})
|
|
@@ -3507,12 +3507,12 @@ var ComponentListModule = {
|
|
|
3507
3507
|
command: "list",
|
|
3508
3508
|
describe: "List component definitions",
|
|
3509
3509
|
aliases: ["ls"],
|
|
3510
|
-
builder: (
|
|
3510
|
+
builder: (yargs43) => withConfiguration(
|
|
3511
3511
|
withFormatOptions(
|
|
3512
3512
|
withDebugOptions(
|
|
3513
3513
|
withApiOptions(
|
|
3514
3514
|
withProjectOptions(
|
|
3515
|
-
|
|
3515
|
+
yargs43.options({
|
|
3516
3516
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3517
3517
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
|
|
3518
3518
|
})
|
|
@@ -3581,12 +3581,12 @@ function createComponentDefinitionEngineDataSource({
|
|
|
3581
3581
|
var ComponentPullModule = {
|
|
3582
3582
|
command: "pull <directory>",
|
|
3583
3583
|
describe: "Pulls all component definitions to local files in a directory",
|
|
3584
|
-
builder: (
|
|
3584
|
+
builder: (yargs43) => withConfiguration(
|
|
3585
3585
|
withApiOptions(
|
|
3586
3586
|
withDebugOptions(
|
|
3587
3587
|
withProjectOptions(
|
|
3588
3588
|
withDiffOptions(
|
|
3589
|
-
|
|
3589
|
+
yargs43.positional("directory", {
|
|
3590
3590
|
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.",
|
|
3591
3591
|
type: "string"
|
|
3592
3592
|
}).option("format", {
|
|
@@ -3662,12 +3662,12 @@ var ComponentPullModule = {
|
|
|
3662
3662
|
var ComponentPushModule = {
|
|
3663
3663
|
command: "push <directory>",
|
|
3664
3664
|
describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
|
|
3665
|
-
builder: (
|
|
3665
|
+
builder: (yargs43) => withConfiguration(
|
|
3666
3666
|
withApiOptions(
|
|
3667
3667
|
withDebugOptions(
|
|
3668
3668
|
withProjectOptions(
|
|
3669
3669
|
withDiffOptions(
|
|
3670
|
-
|
|
3670
|
+
yargs43.positional("directory", {
|
|
3671
3671
|
describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
|
|
3672
3672
|
type: "string"
|
|
3673
3673
|
}).option("mode", {
|
|
@@ -3732,11 +3732,11 @@ var ComponentRemoveModule = {
|
|
|
3732
3732
|
command: "remove <id>",
|
|
3733
3733
|
aliases: ["delete", "rm"],
|
|
3734
3734
|
describe: "Delete a component definition",
|
|
3735
|
-
builder: (
|
|
3735
|
+
builder: (yargs43) => withConfiguration(
|
|
3736
3736
|
withDebugOptions(
|
|
3737
3737
|
withApiOptions(
|
|
3738
3738
|
withProjectOptions(
|
|
3739
|
-
|
|
3739
|
+
yargs43.positional("id", {
|
|
3740
3740
|
demandOption: true,
|
|
3741
3741
|
describe: "Component definition public ID to delete"
|
|
3742
3742
|
})
|
|
@@ -3760,11 +3760,11 @@ var ComponentUpdateModule = {
|
|
|
3760
3760
|
command: "update <filename>",
|
|
3761
3761
|
aliases: ["put"],
|
|
3762
3762
|
describe: "Insert or update a component definition",
|
|
3763
|
-
builder: (
|
|
3763
|
+
builder: (yargs43) => withConfiguration(
|
|
3764
3764
|
withApiOptions(
|
|
3765
3765
|
withDebugOptions(
|
|
3766
3766
|
withProjectOptions(
|
|
3767
|
-
|
|
3767
|
+
yargs43.positional("filename", { demandOption: true, describe: "Component definition file to put" })
|
|
3768
3768
|
)
|
|
3769
3769
|
)
|
|
3770
3770
|
)
|
|
@@ -3786,7 +3786,7 @@ var ComponentModule = {
|
|
|
3786
3786
|
command: "component <command>",
|
|
3787
3787
|
aliases: ["def"],
|
|
3788
3788
|
describe: "Commands for Canvas component definitions",
|
|
3789
|
-
builder: (
|
|
3789
|
+
builder: (yargs43) => yargs43.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
|
|
3790
3790
|
handler: () => {
|
|
3791
3791
|
yargs6.help();
|
|
3792
3792
|
}
|
|
@@ -3799,13 +3799,13 @@ import yargs7 from "yargs";
|
|
|
3799
3799
|
var CompositionGetModule = {
|
|
3800
3800
|
command: "get <id>",
|
|
3801
3801
|
describe: "Fetch a composition",
|
|
3802
|
-
builder: (
|
|
3802
|
+
builder: (yargs43) => withFormatOptions(
|
|
3803
3803
|
withConfiguration(
|
|
3804
3804
|
withApiOptions(
|
|
3805
3805
|
withProjectOptions(
|
|
3806
3806
|
withStateOptions(
|
|
3807
3807
|
withDebugOptions(
|
|
3808
|
-
|
|
3808
|
+
yargs43.positional("id", {
|
|
3809
3809
|
demandOption: true,
|
|
3810
3810
|
describe: "Composition/pattern public ID to fetch"
|
|
3811
3811
|
}).option({
|
|
@@ -3895,13 +3895,13 @@ var CompositionListModule = {
|
|
|
3895
3895
|
command: "list",
|
|
3896
3896
|
describe: "List compositions",
|
|
3897
3897
|
aliases: ["ls"],
|
|
3898
|
-
builder: (
|
|
3898
|
+
builder: (yargs43) => withFormatOptions(
|
|
3899
3899
|
withConfiguration(
|
|
3900
3900
|
withApiOptions(
|
|
3901
3901
|
withProjectOptions(
|
|
3902
3902
|
withDebugOptions(
|
|
3903
3903
|
withStateOptions(
|
|
3904
|
-
|
|
3904
|
+
yargs43.options({
|
|
3905
3905
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3906
3906
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
3907
3907
|
search: { describe: "Search query", type: "string", default: "" },
|
|
@@ -3982,13 +3982,13 @@ var CompositionListModule = {
|
|
|
3982
3982
|
var ComponentPatternListModule = {
|
|
3983
3983
|
...CompositionListModule,
|
|
3984
3984
|
describe: "List component patterns",
|
|
3985
|
-
builder: (
|
|
3985
|
+
builder: (yargs43) => withFormatOptions(
|
|
3986
3986
|
withConfiguration(
|
|
3987
3987
|
withApiOptions(
|
|
3988
3988
|
withDebugOptions(
|
|
3989
3989
|
withProjectOptions(
|
|
3990
3990
|
withStateOptions(
|
|
3991
|
-
|
|
3991
|
+
yargs43.options({
|
|
3992
3992
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3993
3993
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
3994
3994
|
resolvePatterns: {
|
|
@@ -4111,12 +4111,12 @@ function createComponentInstanceEngineDataSource({
|
|
|
4111
4111
|
var CompositionPublishModule = {
|
|
4112
4112
|
command: "publish [ids]",
|
|
4113
4113
|
describe: "Publishes composition(s)",
|
|
4114
|
-
builder: (
|
|
4114
|
+
builder: (yargs43) => withConfiguration(
|
|
4115
4115
|
withApiOptions(
|
|
4116
4116
|
withProjectOptions(
|
|
4117
4117
|
withDebugOptions(
|
|
4118
4118
|
withDiffOptions(
|
|
4119
|
-
|
|
4119
|
+
yargs43.positional("ids", {
|
|
4120
4120
|
describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4121
4121
|
type: "string"
|
|
4122
4122
|
}).option("all", {
|
|
@@ -4209,12 +4209,12 @@ var CompositionPublishModule = {
|
|
|
4209
4209
|
var ComponentPatternPublishModule = {
|
|
4210
4210
|
...CompositionPublishModule,
|
|
4211
4211
|
describe: "Publishes component pattern(s)",
|
|
4212
|
-
builder: (
|
|
4212
|
+
builder: (yargs43) => withConfiguration(
|
|
4213
4213
|
withApiOptions(
|
|
4214
4214
|
withDebugOptions(
|
|
4215
4215
|
withProjectOptions(
|
|
4216
4216
|
withDiffOptions(
|
|
4217
|
-
|
|
4217
|
+
yargs43.positional("ids", {
|
|
4218
4218
|
describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4219
4219
|
type: "string"
|
|
4220
4220
|
}).option("all", {
|
|
@@ -4254,13 +4254,13 @@ function componentInstancePullModuleFactory(type) {
|
|
|
4254
4254
|
return {
|
|
4255
4255
|
command: "pull <directory>",
|
|
4256
4256
|
describe: "Pulls all compositions to local files in a directory",
|
|
4257
|
-
builder: (
|
|
4257
|
+
builder: (yargs43) => withConfiguration(
|
|
4258
4258
|
withApiOptions(
|
|
4259
4259
|
withProjectOptions(
|
|
4260
4260
|
withStateOptions(
|
|
4261
4261
|
withDebugOptions(
|
|
4262
4262
|
withDiffOptions(
|
|
4263
|
-
|
|
4263
|
+
yargs43.positional("directory", {
|
|
4264
4264
|
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.",
|
|
4265
4265
|
type: "string"
|
|
4266
4266
|
}).option("format", {
|
|
@@ -4375,13 +4375,13 @@ function componentInstancePullModuleFactory(type) {
|
|
|
4375
4375
|
var ComponentPatternPullModule = {
|
|
4376
4376
|
...componentInstancePullModuleFactory("componentPatterns"),
|
|
4377
4377
|
describe: "Pulls all component patterns to local files in a directory",
|
|
4378
|
-
builder: (
|
|
4378
|
+
builder: (yargs43) => withConfiguration(
|
|
4379
4379
|
withApiOptions(
|
|
4380
4380
|
withProjectOptions(
|
|
4381
4381
|
withDebugOptions(
|
|
4382
4382
|
withStateOptions(
|
|
4383
4383
|
withDiffOptions(
|
|
4384
|
-
|
|
4384
|
+
yargs43.positional("directory", {
|
|
4385
4385
|
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.",
|
|
4386
4386
|
type: "string"
|
|
4387
4387
|
}).option("format", {
|
|
@@ -4455,13 +4455,13 @@ function componentInstancePushModuleFactory(type) {
|
|
|
4455
4455
|
return {
|
|
4456
4456
|
command: "push <directory>",
|
|
4457
4457
|
describe: "Pushes all compositions from files in a directory to Uniform Canvas",
|
|
4458
|
-
builder: (
|
|
4458
|
+
builder: (yargs43) => withConfiguration(
|
|
4459
4459
|
withApiOptions(
|
|
4460
4460
|
withProjectOptions(
|
|
4461
4461
|
withStateOptions(
|
|
4462
4462
|
withDebugOptions(
|
|
4463
4463
|
withDiffOptions(
|
|
4464
|
-
|
|
4464
|
+
yargs43.positional("directory", {
|
|
4465
4465
|
describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
|
|
4466
4466
|
type: "string"
|
|
4467
4467
|
}).option("mode", {
|
|
@@ -4575,13 +4575,13 @@ function componentInstancePushModuleFactory(type) {
|
|
|
4575
4575
|
var ComponentPatternPushModule = {
|
|
4576
4576
|
...componentInstancePushModuleFactory("componentPatterns"),
|
|
4577
4577
|
describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
|
|
4578
|
-
builder: (
|
|
4578
|
+
builder: (yargs43) => withConfiguration(
|
|
4579
4579
|
withApiOptions(
|
|
4580
4580
|
withProjectOptions(
|
|
4581
4581
|
withStateOptions(
|
|
4582
4582
|
withDiffOptions(
|
|
4583
4583
|
withDebugOptions(
|
|
4584
|
-
|
|
4584
|
+
yargs43.positional("directory", {
|
|
4585
4585
|
describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
|
|
4586
4586
|
type: "string"
|
|
4587
4587
|
}).option("mode", {
|
|
@@ -4615,11 +4615,11 @@ var CompositionRemoveModule = {
|
|
|
4615
4615
|
command: "remove <id>",
|
|
4616
4616
|
aliases: ["delete", "rm"],
|
|
4617
4617
|
describe: "Delete a composition",
|
|
4618
|
-
builder: (
|
|
4618
|
+
builder: (yargs43) => withConfiguration(
|
|
4619
4619
|
withApiOptions(
|
|
4620
4620
|
withDebugOptions(
|
|
4621
4621
|
withProjectOptions(
|
|
4622
|
-
|
|
4622
|
+
yargs43.positional("id", {
|
|
4623
4623
|
demandOption: true,
|
|
4624
4624
|
describe: "Composition/pattern public ID to delete"
|
|
4625
4625
|
})
|
|
@@ -4656,11 +4656,11 @@ import { diffJson as diffJson2 } from "diff";
|
|
|
4656
4656
|
var CompositionUnpublishModule = {
|
|
4657
4657
|
command: "unpublish [ids]",
|
|
4658
4658
|
describe: "Unpublish a composition(s)",
|
|
4659
|
-
builder: (
|
|
4659
|
+
builder: (yargs43) => withConfiguration(
|
|
4660
4660
|
withApiOptions(
|
|
4661
4661
|
withDebugOptions(
|
|
4662
4662
|
withProjectOptions(
|
|
4663
|
-
|
|
4663
|
+
yargs43.positional("ids", {
|
|
4664
4664
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4665
4665
|
type: "string"
|
|
4666
4666
|
}).option("all", {
|
|
@@ -4771,11 +4771,11 @@ var CompositionUnpublishModule = {
|
|
|
4771
4771
|
var ComponentPatternUnpublishModule = {
|
|
4772
4772
|
command: "unpublish [ids]",
|
|
4773
4773
|
describe: "Unpublish a component pattern(s)",
|
|
4774
|
-
builder: (
|
|
4774
|
+
builder: (yargs43) => withConfiguration(
|
|
4775
4775
|
withApiOptions(
|
|
4776
4776
|
withDebugOptions(
|
|
4777
4777
|
withProjectOptions(
|
|
4778
|
-
|
|
4778
|
+
yargs43.positional("ids", {
|
|
4779
4779
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4780
4780
|
type: "string"
|
|
4781
4781
|
}).option("all", {
|
|
@@ -4809,12 +4809,12 @@ var CompositionUpdateModule = {
|
|
|
4809
4809
|
command: "update <filename>",
|
|
4810
4810
|
aliases: ["put"],
|
|
4811
4811
|
describe: "Insert or update a composition",
|
|
4812
|
-
builder: (
|
|
4812
|
+
builder: (yargs43) => withConfiguration(
|
|
4813
4813
|
withApiOptions(
|
|
4814
4814
|
withProjectOptions(
|
|
4815
4815
|
withDebugOptions(
|
|
4816
4816
|
withStateOptions(
|
|
4817
|
-
|
|
4817
|
+
yargs43.positional("filename", {
|
|
4818
4818
|
demandOption: true,
|
|
4819
4819
|
describe: "Composition/pattern file to put"
|
|
4820
4820
|
})
|
|
@@ -4852,7 +4852,7 @@ var ComponentPatternUpdateModule = {
|
|
|
4852
4852
|
var ComponentPatternModule = {
|
|
4853
4853
|
command: "component-pattern <command>",
|
|
4854
4854
|
describe: "Commands for Canvas component patterns",
|
|
4855
|
-
builder: (
|
|
4855
|
+
builder: (yargs43) => yargs43.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
|
|
4856
4856
|
handler: () => {
|
|
4857
4857
|
yargs7.help();
|
|
4858
4858
|
}
|
|
@@ -4864,7 +4864,7 @@ var CompositionModule = {
|
|
|
4864
4864
|
command: "composition <command>",
|
|
4865
4865
|
describe: "Commands for Canvas compositions",
|
|
4866
4866
|
aliases: ["comp"],
|
|
4867
|
-
builder: (
|
|
4867
|
+
builder: (yargs43) => yargs43.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
|
|
4868
4868
|
handler: () => {
|
|
4869
4869
|
yargs8.help();
|
|
4870
4870
|
}
|
|
@@ -4883,13 +4883,13 @@ var CompositionPatternGetModule = {
|
|
|
4883
4883
|
var CompositionPatternListModule = {
|
|
4884
4884
|
...CompositionListModule,
|
|
4885
4885
|
describe: "List composition patterns",
|
|
4886
|
-
builder: (
|
|
4886
|
+
builder: (yargs43) => withFormatOptions(
|
|
4887
4887
|
withConfiguration(
|
|
4888
4888
|
withApiOptions(
|
|
4889
4889
|
withDebugOptions(
|
|
4890
4890
|
withProjectOptions(
|
|
4891
4891
|
withStateOptions(
|
|
4892
|
-
|
|
4892
|
+
yargs43.options({
|
|
4893
4893
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
4894
4894
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
4895
4895
|
resolvePatterns: {
|
|
@@ -4933,12 +4933,12 @@ var CompositionPatternListModule = {
|
|
|
4933
4933
|
var CompositionPatternPublishModule = {
|
|
4934
4934
|
...CompositionPublishModule,
|
|
4935
4935
|
describe: "Publishes composition pattern(s)",
|
|
4936
|
-
builder: (
|
|
4936
|
+
builder: (yargs43) => withConfiguration(
|
|
4937
4937
|
withApiOptions(
|
|
4938
4938
|
withDebugOptions(
|
|
4939
4939
|
withProjectOptions(
|
|
4940
4940
|
withDiffOptions(
|
|
4941
|
-
|
|
4941
|
+
yargs43.positional("ids", {
|
|
4942
4942
|
describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4943
4943
|
type: "string"
|
|
4944
4944
|
}).option("all", {
|
|
@@ -4977,13 +4977,13 @@ var CompositionPatternPublishModule = {
|
|
|
4977
4977
|
var CompositionPatternPullModule = {
|
|
4978
4978
|
...componentInstancePullModuleFactory("compositionPatterns"),
|
|
4979
4979
|
describe: "Pulls all composition patterns to local files in a directory",
|
|
4980
|
-
builder: (
|
|
4980
|
+
builder: (yargs43) => withConfiguration(
|
|
4981
4981
|
withApiOptions(
|
|
4982
4982
|
withDebugOptions(
|
|
4983
4983
|
withProjectOptions(
|
|
4984
4984
|
withStateOptions(
|
|
4985
4985
|
withDiffOptions(
|
|
4986
|
-
|
|
4986
|
+
yargs43.positional("directory", {
|
|
4987
4987
|
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.",
|
|
4988
4988
|
type: "string"
|
|
4989
4989
|
}).option("format", {
|
|
@@ -5021,13 +5021,13 @@ var CompositionPatternPullModule = {
|
|
|
5021
5021
|
var CompositionPatternPushModule = {
|
|
5022
5022
|
...componentInstancePushModuleFactory("compositionPatterns"),
|
|
5023
5023
|
describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
|
|
5024
|
-
builder: (
|
|
5024
|
+
builder: (yargs43) => withConfiguration(
|
|
5025
5025
|
withApiOptions(
|
|
5026
5026
|
withDebugOptions(
|
|
5027
5027
|
withProjectOptions(
|
|
5028
5028
|
withStateOptions(
|
|
5029
5029
|
withDiffOptions(
|
|
5030
|
-
|
|
5030
|
+
yargs43.positional("directory", {
|
|
5031
5031
|
describe: "Directory to read the compositions patterns from. If a filename is used, a package will be read instead.",
|
|
5032
5032
|
type: "string"
|
|
5033
5033
|
}).option("mode", {
|
|
@@ -5066,11 +5066,11 @@ var CompositionPatternRemoveModule = {
|
|
|
5066
5066
|
var CompositionPatternUnpublishModule = {
|
|
5067
5067
|
command: "unpublish [ids]",
|
|
5068
5068
|
describe: "Unpublish a composition pattern(s)",
|
|
5069
|
-
builder: (
|
|
5069
|
+
builder: (yargs43) => withConfiguration(
|
|
5070
5070
|
withApiOptions(
|
|
5071
5071
|
withDebugOptions(
|
|
5072
5072
|
withProjectOptions(
|
|
5073
|
-
|
|
5073
|
+
yargs43.positional("ids", {
|
|
5074
5074
|
describe: "Un-publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
5075
5075
|
type: "string"
|
|
5076
5076
|
}).option("all", {
|
|
@@ -5106,7 +5106,7 @@ var CompositionPatternUpdateModule = {
|
|
|
5106
5106
|
var CompositionPatternModule = {
|
|
5107
5107
|
command: "composition-pattern <command>",
|
|
5108
5108
|
describe: "Commands for Canvas composition patterns",
|
|
5109
|
-
builder: (
|
|
5109
|
+
builder: (yargs43) => yargs43.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
|
|
5110
5110
|
handler: () => {
|
|
5111
5111
|
yargs9.help();
|
|
5112
5112
|
}
|
|
@@ -5127,12 +5127,12 @@ function getContentClient(options) {
|
|
|
5127
5127
|
var ContentTypeGetModule = {
|
|
5128
5128
|
command: "get <id>",
|
|
5129
5129
|
describe: "Get a content type",
|
|
5130
|
-
builder: (
|
|
5130
|
+
builder: (yargs43) => withConfiguration(
|
|
5131
5131
|
withDebugOptions(
|
|
5132
5132
|
withFormatOptions(
|
|
5133
5133
|
withApiOptions(
|
|
5134
5134
|
withProjectOptions(
|
|
5135
|
-
|
|
5135
|
+
yargs43.positional("id", {
|
|
5136
5136
|
demandOption: true,
|
|
5137
5137
|
describe: "Content type public ID to fetch"
|
|
5138
5138
|
})
|
|
@@ -5157,7 +5157,7 @@ var ContentTypeGetModule = {
|
|
|
5157
5157
|
var ContentTypeListModule = {
|
|
5158
5158
|
command: "list",
|
|
5159
5159
|
describe: "List content types",
|
|
5160
|
-
builder: (
|
|
5160
|
+
builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
|
|
5161
5161
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5162
5162
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
5163
5163
|
const client = getContentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -5198,12 +5198,12 @@ function createContentTypeEngineDataSource({
|
|
|
5198
5198
|
var ContentTypePullModule = {
|
|
5199
5199
|
command: "pull <directory>",
|
|
5200
5200
|
describe: "Pulls all content types to local files in a directory",
|
|
5201
|
-
builder: (
|
|
5201
|
+
builder: (yargs43) => withConfiguration(
|
|
5202
5202
|
withApiOptions(
|
|
5203
5203
|
withDebugOptions(
|
|
5204
5204
|
withProjectOptions(
|
|
5205
5205
|
withDiffOptions(
|
|
5206
|
-
|
|
5206
|
+
yargs43.positional("directory", {
|
|
5207
5207
|
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.",
|
|
5208
5208
|
type: "string"
|
|
5209
5209
|
}).option("format", {
|
|
@@ -5283,12 +5283,12 @@ var ContentTypePullModule = {
|
|
|
5283
5283
|
var ContentTypePushModule = {
|
|
5284
5284
|
command: "push <directory>",
|
|
5285
5285
|
describe: "Pushes all content types from files in a directory to Uniform",
|
|
5286
|
-
builder: (
|
|
5286
|
+
builder: (yargs43) => withConfiguration(
|
|
5287
5287
|
withApiOptions(
|
|
5288
5288
|
withDebugOptions(
|
|
5289
5289
|
withProjectOptions(
|
|
5290
5290
|
withDiffOptions(
|
|
5291
|
-
|
|
5291
|
+
yargs43.positional("directory", {
|
|
5292
5292
|
describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
|
|
5293
5293
|
type: "string"
|
|
5294
5294
|
}).option("what-if", {
|
|
@@ -5362,11 +5362,11 @@ var ContentTypeRemoveModule = {
|
|
|
5362
5362
|
command: "remove <id>",
|
|
5363
5363
|
aliases: ["delete", "rm"],
|
|
5364
5364
|
describe: "Delete a content type",
|
|
5365
|
-
builder: (
|
|
5365
|
+
builder: (yargs43) => withConfiguration(
|
|
5366
5366
|
withDebugOptions(
|
|
5367
5367
|
withApiOptions(
|
|
5368
5368
|
withProjectOptions(
|
|
5369
|
-
|
|
5369
|
+
yargs43.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
|
|
5370
5370
|
)
|
|
5371
5371
|
)
|
|
5372
5372
|
)
|
|
@@ -5387,11 +5387,11 @@ var ContentTypeUpdateModule = {
|
|
|
5387
5387
|
command: "update <filename>",
|
|
5388
5388
|
aliases: ["put"],
|
|
5389
5389
|
describe: "Insert or update a content type",
|
|
5390
|
-
builder: (
|
|
5390
|
+
builder: (yargs43) => withConfiguration(
|
|
5391
5391
|
withDebugOptions(
|
|
5392
5392
|
withApiOptions(
|
|
5393
5393
|
withProjectOptions(
|
|
5394
|
-
|
|
5394
|
+
yargs43.positional("filename", { demandOption: true, describe: "Content type file to put" })
|
|
5395
5395
|
)
|
|
5396
5396
|
)
|
|
5397
5397
|
)
|
|
@@ -5413,7 +5413,7 @@ var ContentTypeModule = {
|
|
|
5413
5413
|
command: "contenttype <command>",
|
|
5414
5414
|
aliases: ["ct"],
|
|
5415
5415
|
describe: "Commands for Content Types",
|
|
5416
|
-
builder: (
|
|
5416
|
+
builder: (yargs43) => yargs43.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
|
|
5417
5417
|
handler: () => {
|
|
5418
5418
|
yargs10.help();
|
|
5419
5419
|
}
|
|
@@ -5432,11 +5432,11 @@ function getDataSourceClient(options) {
|
|
|
5432
5432
|
var DataSourceGetModule = {
|
|
5433
5433
|
command: "get <id>",
|
|
5434
5434
|
describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
|
|
5435
|
-
builder: (
|
|
5435
|
+
builder: (yargs43) => withConfiguration(
|
|
5436
5436
|
withApiOptions(
|
|
5437
5437
|
withDebugOptions(
|
|
5438
5438
|
withProjectOptions(
|
|
5439
|
-
|
|
5439
|
+
yargs43.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
|
|
5440
5440
|
)
|
|
5441
5441
|
)
|
|
5442
5442
|
)
|
|
@@ -5454,11 +5454,11 @@ var DataSourceRemoveModule = {
|
|
|
5454
5454
|
command: "remove <id>",
|
|
5455
5455
|
aliases: ["delete", "rm"],
|
|
5456
5456
|
describe: "Delete a data source",
|
|
5457
|
-
builder: (
|
|
5457
|
+
builder: (yargs43) => withConfiguration(
|
|
5458
5458
|
withDebugOptions(
|
|
5459
5459
|
withApiOptions(
|
|
5460
5460
|
withProjectOptions(
|
|
5461
|
-
|
|
5461
|
+
yargs43.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
|
|
5462
5462
|
)
|
|
5463
5463
|
)
|
|
5464
5464
|
)
|
|
@@ -5479,11 +5479,11 @@ var DataSourceUpdateModule = {
|
|
|
5479
5479
|
command: "update <dataSource>",
|
|
5480
5480
|
aliases: ["put"],
|
|
5481
5481
|
describe: "Insert or update a data source",
|
|
5482
|
-
builder: (
|
|
5482
|
+
builder: (yargs43) => withConfiguration(
|
|
5483
5483
|
withApiOptions(
|
|
5484
5484
|
withDebugOptions(
|
|
5485
5485
|
withProjectOptions(
|
|
5486
|
-
|
|
5486
|
+
yargs43.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
|
|
5487
5487
|
describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
|
|
5488
5488
|
type: "string",
|
|
5489
5489
|
demandOption: true
|
|
@@ -5518,7 +5518,7 @@ var DataSourceModule = {
|
|
|
5518
5518
|
command: "datasource <command>",
|
|
5519
5519
|
aliases: ["ds"],
|
|
5520
5520
|
describe: "Commands for Data Source definitions",
|
|
5521
|
-
builder: (
|
|
5521
|
+
builder: (yargs43) => yargs43.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
|
|
5522
5522
|
handler: () => {
|
|
5523
5523
|
yargs11.help();
|
|
5524
5524
|
}
|
|
@@ -5540,12 +5540,12 @@ var DataTypeGetModule = {
|
|
|
5540
5540
|
command: "get <id>",
|
|
5541
5541
|
describe: "Get a data type",
|
|
5542
5542
|
aliases: ["ls"],
|
|
5543
|
-
builder: (
|
|
5543
|
+
builder: (yargs43) => withConfiguration(
|
|
5544
5544
|
withFormatOptions(
|
|
5545
5545
|
withDebugOptions(
|
|
5546
5546
|
withApiOptions(
|
|
5547
5547
|
withProjectOptions(
|
|
5548
|
-
|
|
5548
|
+
yargs43.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
|
|
5549
5549
|
)
|
|
5550
5550
|
)
|
|
5551
5551
|
)
|
|
@@ -5568,7 +5568,7 @@ var DataTypeListModule = {
|
|
|
5568
5568
|
command: "list",
|
|
5569
5569
|
describe: "List data types",
|
|
5570
5570
|
aliases: ["ls"],
|
|
5571
|
-
builder: (
|
|
5571
|
+
builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
|
|
5572
5572
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5573
5573
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
5574
5574
|
const client = getDataTypeClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -5611,12 +5611,12 @@ function createDataTypeEngineDataSource({
|
|
|
5611
5611
|
var DataTypePullModule = {
|
|
5612
5612
|
command: "pull <directory>",
|
|
5613
5613
|
describe: "Pulls all data types to local files in a directory",
|
|
5614
|
-
builder: (
|
|
5614
|
+
builder: (yargs43) => withConfiguration(
|
|
5615
5615
|
withApiOptions(
|
|
5616
5616
|
withDebugOptions(
|
|
5617
5617
|
withProjectOptions(
|
|
5618
5618
|
withDiffOptions(
|
|
5619
|
-
|
|
5619
|
+
yargs43.positional("directory", {
|
|
5620
5620
|
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.",
|
|
5621
5621
|
type: "string"
|
|
5622
5622
|
}).option("format", {
|
|
@@ -5696,12 +5696,12 @@ var DataTypePullModule = {
|
|
|
5696
5696
|
var DataTypePushModule = {
|
|
5697
5697
|
command: "push <directory>",
|
|
5698
5698
|
describe: "Pushes all data types from files in a directory to Uniform",
|
|
5699
|
-
builder: (
|
|
5699
|
+
builder: (yargs43) => withConfiguration(
|
|
5700
5700
|
withApiOptions(
|
|
5701
5701
|
withDebugOptions(
|
|
5702
5702
|
withProjectOptions(
|
|
5703
5703
|
withDiffOptions(
|
|
5704
|
-
|
|
5704
|
+
yargs43.positional("directory", {
|
|
5705
5705
|
describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
|
|
5706
5706
|
type: "string"
|
|
5707
5707
|
}).option("mode", {
|
|
@@ -5770,11 +5770,11 @@ var DataTypeRemoveModule = {
|
|
|
5770
5770
|
command: "remove <id>",
|
|
5771
5771
|
aliases: ["delete", "rm"],
|
|
5772
5772
|
describe: "Delete a data type",
|
|
5773
|
-
builder: (
|
|
5773
|
+
builder: (yargs43) => withConfiguration(
|
|
5774
5774
|
withDebugOptions(
|
|
5775
5775
|
withApiOptions(
|
|
5776
5776
|
withProjectOptions(
|
|
5777
|
-
|
|
5777
|
+
yargs43.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
|
|
5778
5778
|
)
|
|
5779
5779
|
)
|
|
5780
5780
|
)
|
|
@@ -5795,11 +5795,11 @@ var DataTypeUpdateModule = {
|
|
|
5795
5795
|
command: "update <filename>",
|
|
5796
5796
|
aliases: ["put"],
|
|
5797
5797
|
describe: "Insert or update a data type",
|
|
5798
|
-
builder: (
|
|
5798
|
+
builder: (yargs43) => withConfiguration(
|
|
5799
5799
|
withDebugOptions(
|
|
5800
5800
|
withApiOptions(
|
|
5801
5801
|
withProjectOptions(
|
|
5802
|
-
|
|
5802
|
+
yargs43.positional("filename", { demandOption: true, describe: "Data type file to put" })
|
|
5803
5803
|
)
|
|
5804
5804
|
)
|
|
5805
5805
|
)
|
|
@@ -5821,7 +5821,7 @@ var DataTypeModule = {
|
|
|
5821
5821
|
command: "datatype <command>",
|
|
5822
5822
|
aliases: ["dt"],
|
|
5823
5823
|
describe: "Commands for Data Type definitions",
|
|
5824
|
-
builder: (
|
|
5824
|
+
builder: (yargs43) => yargs43.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
|
|
5825
5825
|
handler: () => {
|
|
5826
5826
|
yargs12.help();
|
|
5827
5827
|
}
|
|
@@ -5834,13 +5834,13 @@ import yargs13 from "yargs";
|
|
|
5834
5834
|
var EntryGetModule = {
|
|
5835
5835
|
command: "get <id>",
|
|
5836
5836
|
describe: "Get an entry",
|
|
5837
|
-
builder: (
|
|
5837
|
+
builder: (yargs43) => withConfiguration(
|
|
5838
5838
|
withDebugOptions(
|
|
5839
5839
|
withFormatOptions(
|
|
5840
5840
|
withApiOptions(
|
|
5841
5841
|
withProjectOptions(
|
|
5842
5842
|
withStateOptions(
|
|
5843
|
-
|
|
5843
|
+
yargs43.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
|
|
5844
5844
|
resolveData: {
|
|
5845
5845
|
type: "boolean",
|
|
5846
5846
|
default: false,
|
|
@@ -5912,13 +5912,13 @@ var LEGACY_DEFAULT_LIMIT = 1e3;
|
|
|
5912
5912
|
var EntryListModule = {
|
|
5913
5913
|
command: "list",
|
|
5914
5914
|
describe: "List entries",
|
|
5915
|
-
builder: (
|
|
5915
|
+
builder: (yargs43) => withConfiguration(
|
|
5916
5916
|
withDebugOptions(
|
|
5917
5917
|
withFormatOptions(
|
|
5918
5918
|
withApiOptions(
|
|
5919
5919
|
withProjectOptions(
|
|
5920
5920
|
withStateOptions(
|
|
5921
|
-
|
|
5921
|
+
yargs43.options({
|
|
5922
5922
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
5923
5923
|
limit: {
|
|
5924
5924
|
describe: "Number of rows to fetch",
|
|
@@ -6053,12 +6053,12 @@ function createEntryEngineDataSource({
|
|
|
6053
6053
|
var EntryPublishModule = {
|
|
6054
6054
|
command: "publish [ids]",
|
|
6055
6055
|
describe: "Publishes entry(ies)",
|
|
6056
|
-
builder: (
|
|
6056
|
+
builder: (yargs43) => withConfiguration(
|
|
6057
6057
|
withDebugOptions(
|
|
6058
6058
|
withDiffOptions(
|
|
6059
6059
|
withApiOptions(
|
|
6060
6060
|
withProjectOptions(
|
|
6061
|
-
|
|
6061
|
+
yargs43.positional("ids", {
|
|
6062
6062
|
describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
6063
6063
|
type: "string"
|
|
6064
6064
|
}).option("all", {
|
|
@@ -6133,13 +6133,13 @@ var EntryPublishModule = {
|
|
|
6133
6133
|
var EntryPullModule = {
|
|
6134
6134
|
command: "pull <directory>",
|
|
6135
6135
|
describe: "Pulls all entries to local files in a directory",
|
|
6136
|
-
builder: (
|
|
6136
|
+
builder: (yargs43) => withConfiguration(
|
|
6137
6137
|
withDebugOptions(
|
|
6138
6138
|
withApiOptions(
|
|
6139
6139
|
withProjectOptions(
|
|
6140
6140
|
withStateOptions(
|
|
6141
6141
|
withDiffOptions(
|
|
6142
|
-
|
|
6142
|
+
yargs43.positional("directory", {
|
|
6143
6143
|
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.",
|
|
6144
6144
|
type: "string"
|
|
6145
6145
|
}).option("format", {
|
|
@@ -6239,13 +6239,13 @@ var EntryPullModule = {
|
|
|
6239
6239
|
var EntryPushModule = {
|
|
6240
6240
|
command: "push <directory>",
|
|
6241
6241
|
describe: "Pushes all entries from files in a directory to Uniform",
|
|
6242
|
-
builder: (
|
|
6242
|
+
builder: (yargs43) => withConfiguration(
|
|
6243
6243
|
withDebugOptions(
|
|
6244
6244
|
withApiOptions(
|
|
6245
6245
|
withProjectOptions(
|
|
6246
6246
|
withStateOptions(
|
|
6247
6247
|
withDiffOptions(
|
|
6248
|
-
|
|
6248
|
+
yargs43.positional("directory", {
|
|
6249
6249
|
describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
|
|
6250
6250
|
type: "string"
|
|
6251
6251
|
}).option("mode", {
|
|
@@ -6344,11 +6344,11 @@ var EntryRemoveModule = {
|
|
|
6344
6344
|
command: "remove <id>",
|
|
6345
6345
|
aliases: ["delete", "rm"],
|
|
6346
6346
|
describe: "Delete an entry",
|
|
6347
|
-
builder: (
|
|
6347
|
+
builder: (yargs43) => withConfiguration(
|
|
6348
6348
|
withDebugOptions(
|
|
6349
6349
|
withApiOptions(
|
|
6350
6350
|
withProjectOptions(
|
|
6351
|
-
|
|
6351
|
+
yargs43.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
|
|
6352
6352
|
)
|
|
6353
6353
|
)
|
|
6354
6354
|
)
|
|
@@ -6370,11 +6370,11 @@ import { diffJson as diffJson3 } from "diff";
|
|
|
6370
6370
|
var EntryUnpublishModule = {
|
|
6371
6371
|
command: "unpublish [ids]",
|
|
6372
6372
|
describe: "Unpublish an entry(ies)",
|
|
6373
|
-
builder: (
|
|
6373
|
+
builder: (yargs43) => withConfiguration(
|
|
6374
6374
|
withDebugOptions(
|
|
6375
6375
|
withApiOptions(
|
|
6376
6376
|
withProjectOptions(
|
|
6377
|
-
|
|
6377
|
+
yargs43.positional("ids", {
|
|
6378
6378
|
describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
6379
6379
|
type: "string"
|
|
6380
6380
|
}).option("all", {
|
|
@@ -6459,12 +6459,12 @@ var EntryUpdateModule = {
|
|
|
6459
6459
|
command: "update <filename>",
|
|
6460
6460
|
aliases: ["put"],
|
|
6461
6461
|
describe: "Insert or update an entry",
|
|
6462
|
-
builder: (
|
|
6462
|
+
builder: (yargs43) => withConfiguration(
|
|
6463
6463
|
withDebugOptions(
|
|
6464
6464
|
withApiOptions(
|
|
6465
6465
|
withProjectOptions(
|
|
6466
6466
|
withStateOptions(
|
|
6467
|
-
|
|
6467
|
+
yargs43.positional("filename", { demandOption: true, describe: "Entry file to put" })
|
|
6468
6468
|
)
|
|
6469
6469
|
)
|
|
6470
6470
|
)
|
|
@@ -6496,7 +6496,7 @@ var EntryUpdateModule = {
|
|
|
6496
6496
|
var EntryModule = {
|
|
6497
6497
|
command: "entry <command>",
|
|
6498
6498
|
describe: "Commands for Entries",
|
|
6499
|
-
builder: (
|
|
6499
|
+
builder: (yargs43) => yargs43.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
|
|
6500
6500
|
handler: () => {
|
|
6501
6501
|
yargs13.help();
|
|
6502
6502
|
}
|
|
@@ -6509,13 +6509,13 @@ import yargs14 from "yargs";
|
|
|
6509
6509
|
var EntryPatternGetModule = {
|
|
6510
6510
|
command: "get <id>",
|
|
6511
6511
|
describe: "Get an entry pattern",
|
|
6512
|
-
builder: (
|
|
6512
|
+
builder: (yargs43) => withConfiguration(
|
|
6513
6513
|
withDebugOptions(
|
|
6514
6514
|
withFormatOptions(
|
|
6515
6515
|
withApiOptions(
|
|
6516
6516
|
withProjectOptions(
|
|
6517
6517
|
withStateOptions(
|
|
6518
|
-
|
|
6518
|
+
yargs43.positional("id", {
|
|
6519
6519
|
demandOption: true,
|
|
6520
6520
|
describe: "Entry pattern public ID to fetch"
|
|
6521
6521
|
}).option({
|
|
@@ -6568,13 +6568,13 @@ var EntryPatternGetModule = {
|
|
|
6568
6568
|
var EntryPatternListModule = {
|
|
6569
6569
|
command: "list",
|
|
6570
6570
|
describe: "List entry patterns",
|
|
6571
|
-
builder: (
|
|
6571
|
+
builder: (yargs43) => withConfiguration(
|
|
6572
6572
|
withDebugOptions(
|
|
6573
6573
|
withFormatOptions(
|
|
6574
6574
|
withApiOptions(
|
|
6575
6575
|
withProjectOptions(
|
|
6576
6576
|
withStateOptions(
|
|
6577
|
-
|
|
6577
|
+
yargs43.option({
|
|
6578
6578
|
withComponentIDs: {
|
|
6579
6579
|
type: "boolean",
|
|
6580
6580
|
default: false,
|
|
@@ -6620,12 +6620,12 @@ var EntryPatternListModule = {
|
|
|
6620
6620
|
var EntryPatternPublishModule = {
|
|
6621
6621
|
command: "publish [ids]",
|
|
6622
6622
|
describe: "Publishes entry pattern(s)",
|
|
6623
|
-
builder: (
|
|
6623
|
+
builder: (yargs43) => withConfiguration(
|
|
6624
6624
|
withDebugOptions(
|
|
6625
6625
|
withApiOptions(
|
|
6626
6626
|
withProjectOptions(
|
|
6627
6627
|
withDiffOptions(
|
|
6628
|
-
|
|
6628
|
+
yargs43.positional("ids", {
|
|
6629
6629
|
describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
6630
6630
|
type: "string"
|
|
6631
6631
|
}).option("all", {
|
|
@@ -6700,13 +6700,13 @@ var EntryPatternPublishModule = {
|
|
|
6700
6700
|
var EntryPatternPullModule = {
|
|
6701
6701
|
command: "pull <directory>",
|
|
6702
6702
|
describe: "Pulls all entry patterns to local files in a directory",
|
|
6703
|
-
builder: (
|
|
6703
|
+
builder: (yargs43) => withConfiguration(
|
|
6704
6704
|
withApiOptions(
|
|
6705
6705
|
withDebugOptions(
|
|
6706
6706
|
withProjectOptions(
|
|
6707
6707
|
withStateOptions(
|
|
6708
6708
|
withDiffOptions(
|
|
6709
|
-
|
|
6709
|
+
yargs43.positional("directory", {
|
|
6710
6710
|
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.",
|
|
6711
6711
|
type: "string"
|
|
6712
6712
|
}).option("format", {
|
|
@@ -6806,13 +6806,13 @@ var EntryPatternPullModule = {
|
|
|
6806
6806
|
var EntryPatternPushModule = {
|
|
6807
6807
|
command: "push <directory>",
|
|
6808
6808
|
describe: "Pushes all entry patterns from files in a directory to Uniform",
|
|
6809
|
-
builder: (
|
|
6809
|
+
builder: (yargs43) => withConfiguration(
|
|
6810
6810
|
withDebugOptions(
|
|
6811
6811
|
withApiOptions(
|
|
6812
6812
|
withProjectOptions(
|
|
6813
6813
|
withStateOptions(
|
|
6814
6814
|
withDiffOptions(
|
|
6815
|
-
|
|
6815
|
+
yargs43.positional("directory", {
|
|
6816
6816
|
describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
|
|
6817
6817
|
type: "string"
|
|
6818
6818
|
}).option("what-if", {
|
|
@@ -6916,11 +6916,11 @@ var EntryPatternRemoveModule = {
|
|
|
6916
6916
|
command: "remove <id>",
|
|
6917
6917
|
aliases: ["delete", "rm"],
|
|
6918
6918
|
describe: "Delete an entry pattern",
|
|
6919
|
-
builder: (
|
|
6919
|
+
builder: (yargs43) => withConfiguration(
|
|
6920
6920
|
withDebugOptions(
|
|
6921
6921
|
withApiOptions(
|
|
6922
6922
|
withProjectOptions(
|
|
6923
|
-
|
|
6923
|
+
yargs43.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
|
|
6924
6924
|
)
|
|
6925
6925
|
)
|
|
6926
6926
|
)
|
|
@@ -6942,11 +6942,11 @@ import { diffJson as diffJson4 } from "diff";
|
|
|
6942
6942
|
var EntryPatternUnpublishModule = {
|
|
6943
6943
|
command: "unpublish [ids]",
|
|
6944
6944
|
describe: "Unpublish entry pattern(s)",
|
|
6945
|
-
builder: (
|
|
6945
|
+
builder: (yargs43) => withConfiguration(
|
|
6946
6946
|
withDebugOptions(
|
|
6947
6947
|
withApiOptions(
|
|
6948
6948
|
withProjectOptions(
|
|
6949
|
-
|
|
6949
|
+
yargs43.positional("ids", {
|
|
6950
6950
|
describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
6951
6951
|
type: "string"
|
|
6952
6952
|
}).option("all", {
|
|
@@ -7031,12 +7031,12 @@ var EntryPatternUpdateModule = {
|
|
|
7031
7031
|
command: "update <filename>",
|
|
7032
7032
|
aliases: ["put"],
|
|
7033
7033
|
describe: "Insert or update an entry pattern",
|
|
7034
|
-
builder: (
|
|
7034
|
+
builder: (yargs43) => withConfiguration(
|
|
7035
7035
|
withDebugOptions(
|
|
7036
7036
|
withApiOptions(
|
|
7037
7037
|
withProjectOptions(
|
|
7038
7038
|
withStateOptions(
|
|
7039
|
-
|
|
7039
|
+
yargs43.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
|
|
7040
7040
|
)
|
|
7041
7041
|
)
|
|
7042
7042
|
)
|
|
@@ -7072,15 +7072,219 @@ var EntryPatternUpdateModule = {
|
|
|
7072
7072
|
var EntryPatternModule = {
|
|
7073
7073
|
command: "entry-pattern <command>",
|
|
7074
7074
|
describe: "Commands for Entry patterns",
|
|
7075
|
-
builder: (
|
|
7075
|
+
builder: (yargs43) => yargs43.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
|
|
7076
7076
|
handler: () => {
|
|
7077
7077
|
yargs14.help();
|
|
7078
7078
|
}
|
|
7079
7079
|
};
|
|
7080
7080
|
|
|
7081
|
-
// src/commands/canvas/commands/
|
|
7081
|
+
// src/commands/canvas/commands/label.ts
|
|
7082
7082
|
import yargs15 from "yargs";
|
|
7083
7083
|
|
|
7084
|
+
// src/commands/canvas/commands/label/_util.ts
|
|
7085
|
+
import { LabelClient } from "@uniformdev/canvas";
|
|
7086
|
+
var selectLabelIdentifier = (label) => label.label.publicId;
|
|
7087
|
+
var selectLabelDisplayName = (label) => `${label.label.displayName} (pid: ${label.label.publicId})`;
|
|
7088
|
+
function getLabelClient(options) {
|
|
7089
|
+
return new LabelClient({ ...options, bypassCache: true, limitPolicy: cliLimitPolicy });
|
|
7090
|
+
}
|
|
7091
|
+
|
|
7092
|
+
// src/commands/canvas/labelsEngineDataSource.ts
|
|
7093
|
+
function createLabelsEngineDataSource({
|
|
7094
|
+
client
|
|
7095
|
+
}) {
|
|
7096
|
+
async function* getObjects() {
|
|
7097
|
+
const labels = (await client.getLabels()).labels;
|
|
7098
|
+
for await (const label of labels) {
|
|
7099
|
+
const result = {
|
|
7100
|
+
id: label.label.publicId,
|
|
7101
|
+
displayName: `${label.label.displayName} (pid: ${label.label.publicId})`,
|
|
7102
|
+
providerId: label.label.publicId,
|
|
7103
|
+
object: label
|
|
7104
|
+
};
|
|
7105
|
+
yield result;
|
|
7106
|
+
}
|
|
7107
|
+
}
|
|
7108
|
+
return {
|
|
7109
|
+
name: "Uniform API",
|
|
7110
|
+
objects: getObjects(),
|
|
7111
|
+
deleteObject: async (providerId) => {
|
|
7112
|
+
await client.removeLabel({ labelId: providerId });
|
|
7113
|
+
},
|
|
7114
|
+
writeObject: async ({ object: object4 }) => {
|
|
7115
|
+
await client.upsertLabel({ label: object4.label });
|
|
7116
|
+
}
|
|
7117
|
+
};
|
|
7118
|
+
}
|
|
7119
|
+
|
|
7120
|
+
// src/commands/canvas/commands/label/pull.ts
|
|
7121
|
+
var LabelPullModule = {
|
|
7122
|
+
command: "pull <directory>",
|
|
7123
|
+
describe: "Pulls all labels to local files in a directory",
|
|
7124
|
+
builder: (yargs43) => withConfiguration(
|
|
7125
|
+
withDebugOptions(
|
|
7126
|
+
withApiOptions(
|
|
7127
|
+
withProjectOptions(
|
|
7128
|
+
withDiffOptions(
|
|
7129
|
+
yargs43.positional("directory", {
|
|
7130
|
+
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.",
|
|
7131
|
+
type: "string"
|
|
7132
|
+
}).option("format", {
|
|
7133
|
+
alias: ["f"],
|
|
7134
|
+
describe: "Output format",
|
|
7135
|
+
default: "yaml",
|
|
7136
|
+
choices: ["yaml", "json"],
|
|
7137
|
+
type: "string"
|
|
7138
|
+
}).option("mode", {
|
|
7139
|
+
alias: ["m"],
|
|
7140
|
+
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',
|
|
7141
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
7142
|
+
default: "mirror",
|
|
7143
|
+
type: "string"
|
|
7144
|
+
})
|
|
7145
|
+
)
|
|
7146
|
+
)
|
|
7147
|
+
)
|
|
7148
|
+
)
|
|
7149
|
+
),
|
|
7150
|
+
handler: async ({
|
|
7151
|
+
apiHost,
|
|
7152
|
+
apiKey,
|
|
7153
|
+
proxy,
|
|
7154
|
+
directory,
|
|
7155
|
+
format,
|
|
7156
|
+
mode,
|
|
7157
|
+
whatIf,
|
|
7158
|
+
project: projectId,
|
|
7159
|
+
diff: diffMode,
|
|
7160
|
+
allowEmptySource,
|
|
7161
|
+
verbose
|
|
7162
|
+
}) => {
|
|
7163
|
+
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7164
|
+
const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
7165
|
+
const source = createLabelsEngineDataSource({ client });
|
|
7166
|
+
let target;
|
|
7167
|
+
const isPackage = isPathAPackageFile(directory);
|
|
7168
|
+
if (isPackage) {
|
|
7169
|
+
const packageContents = readCanvasPackage(directory, false, verbose);
|
|
7170
|
+
const packageLabels = Array.isArray(packageContents.labels) ? packageContents.labels : [];
|
|
7171
|
+
target = await createArraySyncEngineDataSource({
|
|
7172
|
+
name: `Package file ${directory}`,
|
|
7173
|
+
objects: packageLabels,
|
|
7174
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7175
|
+
selectDisplayName: selectLabelDisplayName,
|
|
7176
|
+
onSyncComplete: async (_, synced) => {
|
|
7177
|
+
packageContents.labels = synced;
|
|
7178
|
+
writeCanvasPackage(directory, packageContents);
|
|
7179
|
+
}
|
|
7180
|
+
});
|
|
7181
|
+
} else {
|
|
7182
|
+
target = await createFileSyncEngineDataSource({
|
|
7183
|
+
directory,
|
|
7184
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7185
|
+
selectDisplayName: selectLabelDisplayName,
|
|
7186
|
+
format,
|
|
7187
|
+
verbose
|
|
7188
|
+
});
|
|
7189
|
+
}
|
|
7190
|
+
await syncEngine({
|
|
7191
|
+
source,
|
|
7192
|
+
target,
|
|
7193
|
+
mode,
|
|
7194
|
+
whatIf,
|
|
7195
|
+
allowEmptySource: allowEmptySource ?? true,
|
|
7196
|
+
log: createSyncEngineConsoleLogger({ diffMode }),
|
|
7197
|
+
onBeforeWriteObject: async (sourceObject) => {
|
|
7198
|
+
delete sourceObject.object.createdBy;
|
|
7199
|
+
delete sourceObject.object.modifiedBy;
|
|
7200
|
+
return sourceObject;
|
|
7201
|
+
}
|
|
7202
|
+
});
|
|
7203
|
+
}
|
|
7204
|
+
};
|
|
7205
|
+
|
|
7206
|
+
// src/commands/canvas/commands/label/push.ts
|
|
7207
|
+
var LabelPushModule = {
|
|
7208
|
+
command: "push <directory>",
|
|
7209
|
+
describe: "Pushes all labels from files in a directory to Uniform",
|
|
7210
|
+
builder: (yargs43) => withConfiguration(
|
|
7211
|
+
withDebugOptions(
|
|
7212
|
+
withApiOptions(
|
|
7213
|
+
withProjectOptions(
|
|
7214
|
+
withDiffOptions(
|
|
7215
|
+
yargs43.positional("directory", {
|
|
7216
|
+
describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
|
|
7217
|
+
type: "string"
|
|
7218
|
+
}).option("mode", {
|
|
7219
|
+
alias: ["m"],
|
|
7220
|
+
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',
|
|
7221
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
7222
|
+
default: "mirror",
|
|
7223
|
+
type: "string"
|
|
7224
|
+
})
|
|
7225
|
+
)
|
|
7226
|
+
)
|
|
7227
|
+
)
|
|
7228
|
+
)
|
|
7229
|
+
),
|
|
7230
|
+
handler: async ({
|
|
7231
|
+
apiHost,
|
|
7232
|
+
apiKey,
|
|
7233
|
+
proxy,
|
|
7234
|
+
directory,
|
|
7235
|
+
mode,
|
|
7236
|
+
whatIf,
|
|
7237
|
+
project: projectId,
|
|
7238
|
+
diff: diffMode,
|
|
7239
|
+
allowEmptySource,
|
|
7240
|
+
verbose
|
|
7241
|
+
}) => {
|
|
7242
|
+
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7243
|
+
const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
7244
|
+
let source;
|
|
7245
|
+
const isPackage = isPathAPackageFile(directory);
|
|
7246
|
+
if (isPackage) {
|
|
7247
|
+
const packageContents = readCanvasPackage(directory, true, verbose);
|
|
7248
|
+
const packageLabels = Array.isArray(packageContents.labels) ? packageContents.labels : [];
|
|
7249
|
+
source = await createArraySyncEngineDataSource({
|
|
7250
|
+
name: `Package file ${directory}`,
|
|
7251
|
+
objects: packageLabels,
|
|
7252
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7253
|
+
selectDisplayName: selectLabelDisplayName
|
|
7254
|
+
});
|
|
7255
|
+
} else {
|
|
7256
|
+
source = await createFileSyncEngineDataSource({
|
|
7257
|
+
directory,
|
|
7258
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7259
|
+
selectDisplayName: selectLabelDisplayName,
|
|
7260
|
+
verbose
|
|
7261
|
+
});
|
|
7262
|
+
}
|
|
7263
|
+
const target = createLabelsEngineDataSource({ client });
|
|
7264
|
+
await syncEngine({
|
|
7265
|
+
source,
|
|
7266
|
+
target,
|
|
7267
|
+
mode,
|
|
7268
|
+
whatIf,
|
|
7269
|
+
allowEmptySource,
|
|
7270
|
+
log: createSyncEngineConsoleLogger({ diffMode })
|
|
7271
|
+
});
|
|
7272
|
+
}
|
|
7273
|
+
};
|
|
7274
|
+
|
|
7275
|
+
// src/commands/canvas/commands/label.ts
|
|
7276
|
+
var LabelModule = {
|
|
7277
|
+
command: "label <command>",
|
|
7278
|
+
describe: "Commands for label definitions",
|
|
7279
|
+
builder: (yargs43) => yargs43.command(LabelPullModule).command(LabelPushModule),
|
|
7280
|
+
handler: () => {
|
|
7281
|
+
yargs15.help();
|
|
7282
|
+
}
|
|
7283
|
+
};
|
|
7284
|
+
|
|
7285
|
+
// src/commands/canvas/commands/locale.ts
|
|
7286
|
+
import yargs16 from "yargs";
|
|
7287
|
+
|
|
7084
7288
|
// src/commands/canvas/localesEngineDataSource.ts
|
|
7085
7289
|
function createLocaleEngineDataSource({
|
|
7086
7290
|
client
|
|
@@ -7121,12 +7325,12 @@ function getLocaleClient(options) {
|
|
|
7121
7325
|
var LocalePullModule = {
|
|
7122
7326
|
command: "pull <directory>",
|
|
7123
7327
|
describe: "Pulls all locales to local files in a directory",
|
|
7124
|
-
builder: (
|
|
7328
|
+
builder: (yargs43) => withConfiguration(
|
|
7125
7329
|
withDebugOptions(
|
|
7126
7330
|
withApiOptions(
|
|
7127
7331
|
withProjectOptions(
|
|
7128
7332
|
withDiffOptions(
|
|
7129
|
-
|
|
7333
|
+
yargs43.positional("directory", {
|
|
7130
7334
|
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.",
|
|
7131
7335
|
type: "string"
|
|
7132
7336
|
}).option("format", {
|
|
@@ -7206,12 +7410,12 @@ var LocalePullModule = {
|
|
|
7206
7410
|
var LocalePushModule = {
|
|
7207
7411
|
command: "push <directory>",
|
|
7208
7412
|
describe: "Pushes all locales from files in a directory to Uniform",
|
|
7209
|
-
builder: (
|
|
7413
|
+
builder: (yargs43) => withConfiguration(
|
|
7210
7414
|
withDebugOptions(
|
|
7211
7415
|
withApiOptions(
|
|
7212
7416
|
withProjectOptions(
|
|
7213
7417
|
withDiffOptions(
|
|
7214
|
-
|
|
7418
|
+
yargs43.positional("directory", {
|
|
7215
7419
|
describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
|
|
7216
7420
|
type: "string"
|
|
7217
7421
|
}).option("mode", {
|
|
@@ -7279,14 +7483,14 @@ var LocalePushModule = {
|
|
|
7279
7483
|
var LocaleModule = {
|
|
7280
7484
|
command: "locale <command>",
|
|
7281
7485
|
describe: "Commands for locale definitions",
|
|
7282
|
-
builder: (
|
|
7486
|
+
builder: (yargs43) => yargs43.command(LocalePullModule).command(LocalePushModule),
|
|
7283
7487
|
handler: () => {
|
|
7284
|
-
|
|
7488
|
+
yargs16.help();
|
|
7285
7489
|
}
|
|
7286
7490
|
};
|
|
7287
7491
|
|
|
7288
7492
|
// src/commands/canvas/commands/previewUrl.ts
|
|
7289
|
-
import
|
|
7493
|
+
import yargs17 from "yargs";
|
|
7290
7494
|
|
|
7291
7495
|
// src/commands/canvas/commands/previewUrl/_util.ts
|
|
7292
7496
|
import { PreviewClient } from "@uniformdev/canvas";
|
|
@@ -7300,12 +7504,12 @@ function getPreviewClient(options) {
|
|
|
7300
7504
|
var PreviewUrlGetModule = {
|
|
7301
7505
|
command: "get <id>",
|
|
7302
7506
|
describe: "Fetch a preview URL",
|
|
7303
|
-
builder: (
|
|
7507
|
+
builder: (yargs43) => withConfiguration(
|
|
7304
7508
|
withFormatOptions(
|
|
7305
7509
|
withDebugOptions(
|
|
7306
7510
|
withApiOptions(
|
|
7307
7511
|
withProjectOptions(
|
|
7308
|
-
|
|
7512
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
|
|
7309
7513
|
)
|
|
7310
7514
|
)
|
|
7311
7515
|
)
|
|
@@ -7329,8 +7533,8 @@ var PreviewUrlListModule = {
|
|
|
7329
7533
|
command: "list",
|
|
7330
7534
|
describe: "List preview URLs",
|
|
7331
7535
|
aliases: ["ls"],
|
|
7332
|
-
builder: (
|
|
7333
|
-
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(
|
|
7536
|
+
builder: (yargs43) => withConfiguration(
|
|
7537
|
+
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs43.options({})))))
|
|
7334
7538
|
),
|
|
7335
7539
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7336
7540
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7372,12 +7576,12 @@ function createPreviewUrlEngineDataSource({
|
|
|
7372
7576
|
var PreviewUrlPullModule = {
|
|
7373
7577
|
command: "pull <directory>",
|
|
7374
7578
|
describe: "Pulls all preview urls to local files in a directory",
|
|
7375
|
-
builder: (
|
|
7579
|
+
builder: (yargs43) => withConfiguration(
|
|
7376
7580
|
withApiOptions(
|
|
7377
7581
|
withProjectOptions(
|
|
7378
7582
|
withDebugOptions(
|
|
7379
7583
|
withDiffOptions(
|
|
7380
|
-
|
|
7584
|
+
yargs43.positional("directory", {
|
|
7381
7585
|
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.",
|
|
7382
7586
|
type: "string"
|
|
7383
7587
|
}).option("format", {
|
|
@@ -7452,12 +7656,12 @@ var PreviewUrlPullModule = {
|
|
|
7452
7656
|
var PreviewUrlPushModule = {
|
|
7453
7657
|
command: "push <directory>",
|
|
7454
7658
|
describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
|
|
7455
|
-
builder: (
|
|
7659
|
+
builder: (yargs43) => withConfiguration(
|
|
7456
7660
|
withApiOptions(
|
|
7457
7661
|
withProjectOptions(
|
|
7458
7662
|
withDiffOptions(
|
|
7459
7663
|
withDebugOptions(
|
|
7460
|
-
|
|
7664
|
+
yargs43.positional("directory", {
|
|
7461
7665
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7462
7666
|
type: "string"
|
|
7463
7667
|
}).option("mode", {
|
|
@@ -7521,11 +7725,11 @@ var PreviewUrlRemoveModule = {
|
|
|
7521
7725
|
command: "remove <id>",
|
|
7522
7726
|
aliases: ["delete", "rm"],
|
|
7523
7727
|
describe: "Delete a preview URL",
|
|
7524
|
-
builder: (
|
|
7728
|
+
builder: (yargs43) => withConfiguration(
|
|
7525
7729
|
withApiOptions(
|
|
7526
7730
|
withDebugOptions(
|
|
7527
7731
|
withProjectOptions(
|
|
7528
|
-
|
|
7732
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
|
|
7529
7733
|
)
|
|
7530
7734
|
)
|
|
7531
7735
|
)
|
|
@@ -7546,11 +7750,11 @@ var PreviewUrlUpdateModule = {
|
|
|
7546
7750
|
command: "update <filename>",
|
|
7547
7751
|
aliases: ["put"],
|
|
7548
7752
|
describe: "Insert or update a preview URL",
|
|
7549
|
-
builder: (
|
|
7753
|
+
builder: (yargs43) => withConfiguration(
|
|
7550
7754
|
withDebugOptions(
|
|
7551
7755
|
withApiOptions(
|
|
7552
7756
|
withProjectOptions(
|
|
7553
|
-
|
|
7757
|
+
yargs43.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
7554
7758
|
)
|
|
7555
7759
|
)
|
|
7556
7760
|
)
|
|
@@ -7572,25 +7776,25 @@ var PreviewUrlModule = {
|
|
|
7572
7776
|
command: "preview-url <command>",
|
|
7573
7777
|
aliases: ["pu"],
|
|
7574
7778
|
describe: "Commands for Canvas preview urls",
|
|
7575
|
-
builder: (
|
|
7779
|
+
builder: (yargs43) => yargs43.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
|
|
7576
7780
|
handler: () => {
|
|
7577
|
-
|
|
7781
|
+
yargs17.help();
|
|
7578
7782
|
}
|
|
7579
7783
|
};
|
|
7580
7784
|
|
|
7581
7785
|
// src/commands/canvas/commands/previewViewport.ts
|
|
7582
|
-
import
|
|
7786
|
+
import yargs18 from "yargs";
|
|
7583
7787
|
|
|
7584
7788
|
// src/commands/canvas/commands/previewViewport/get.ts
|
|
7585
7789
|
var PreviewViewportGetModule = {
|
|
7586
7790
|
command: "get <id>",
|
|
7587
7791
|
describe: "Fetch a preview viewport",
|
|
7588
|
-
builder: (
|
|
7792
|
+
builder: (yargs43) => withConfiguration(
|
|
7589
7793
|
withFormatOptions(
|
|
7590
7794
|
withDebugOptions(
|
|
7591
7795
|
withApiOptions(
|
|
7592
7796
|
withProjectOptions(
|
|
7593
|
-
|
|
7797
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
|
|
7594
7798
|
)
|
|
7595
7799
|
)
|
|
7596
7800
|
)
|
|
@@ -7614,8 +7818,8 @@ var PreviewViewportListModule = {
|
|
|
7614
7818
|
command: "list",
|
|
7615
7819
|
describe: "List preview viewports",
|
|
7616
7820
|
aliases: ["ls"],
|
|
7617
|
-
builder: (
|
|
7618
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
7821
|
+
builder: (yargs43) => withConfiguration(
|
|
7822
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs43.options({})))))
|
|
7619
7823
|
),
|
|
7620
7824
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7621
7825
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7661,12 +7865,12 @@ function createPreviewViewportEngineDataSource({
|
|
|
7661
7865
|
var PreviewViewportPullModule = {
|
|
7662
7866
|
command: "pull <directory>",
|
|
7663
7867
|
describe: "Pulls all preview viewports to local files in a directory",
|
|
7664
|
-
builder: (
|
|
7868
|
+
builder: (yargs43) => withConfiguration(
|
|
7665
7869
|
withApiOptions(
|
|
7666
7870
|
withProjectOptions(
|
|
7667
7871
|
withDebugOptions(
|
|
7668
7872
|
withDiffOptions(
|
|
7669
|
-
|
|
7873
|
+
yargs43.positional("directory", {
|
|
7670
7874
|
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.",
|
|
7671
7875
|
type: "string"
|
|
7672
7876
|
}).option("format", {
|
|
@@ -7741,12 +7945,12 @@ var PreviewViewportPullModule = {
|
|
|
7741
7945
|
var PreviewViewportPushModule = {
|
|
7742
7946
|
command: "push <directory>",
|
|
7743
7947
|
describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
|
|
7744
|
-
builder: (
|
|
7948
|
+
builder: (yargs43) => withConfiguration(
|
|
7745
7949
|
withApiOptions(
|
|
7746
7950
|
withProjectOptions(
|
|
7747
7951
|
withDiffOptions(
|
|
7748
7952
|
withDebugOptions(
|
|
7749
|
-
|
|
7953
|
+
yargs43.positional("directory", {
|
|
7750
7954
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7751
7955
|
type: "string"
|
|
7752
7956
|
}).option("mode", {
|
|
@@ -7810,11 +8014,11 @@ var PreviewViewportRemoveModule = {
|
|
|
7810
8014
|
command: "remove <id>",
|
|
7811
8015
|
aliases: ["delete", "rm"],
|
|
7812
8016
|
describe: "Delete a preview viewport",
|
|
7813
|
-
builder: (
|
|
8017
|
+
builder: (yargs43) => withConfiguration(
|
|
7814
8018
|
withApiOptions(
|
|
7815
8019
|
withDebugOptions(
|
|
7816
8020
|
withProjectOptions(
|
|
7817
|
-
|
|
8021
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
|
|
7818
8022
|
)
|
|
7819
8023
|
)
|
|
7820
8024
|
)
|
|
@@ -7835,11 +8039,11 @@ var PreviewViewportUpdateModule = {
|
|
|
7835
8039
|
command: "update <filename>",
|
|
7836
8040
|
aliases: ["put"],
|
|
7837
8041
|
describe: "Insert or update a preview viewport",
|
|
7838
|
-
builder: (
|
|
8042
|
+
builder: (yargs43) => withConfiguration(
|
|
7839
8043
|
withDebugOptions(
|
|
7840
8044
|
withApiOptions(
|
|
7841
8045
|
withProjectOptions(
|
|
7842
|
-
|
|
8046
|
+
yargs43.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
|
|
7843
8047
|
)
|
|
7844
8048
|
)
|
|
7845
8049
|
)
|
|
@@ -7861,14 +8065,14 @@ var PreviewViewportModule = {
|
|
|
7861
8065
|
command: "preview-viewport <command>",
|
|
7862
8066
|
aliases: ["pv"],
|
|
7863
8067
|
describe: "Commands for Canvas preview viewports",
|
|
7864
|
-
builder: (
|
|
8068
|
+
builder: (yargs43) => yargs43.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
|
|
7865
8069
|
handler: () => {
|
|
7866
|
-
|
|
8070
|
+
yargs18.help();
|
|
7867
8071
|
}
|
|
7868
8072
|
};
|
|
7869
8073
|
|
|
7870
8074
|
// src/commands/canvas/commands/prompts.ts
|
|
7871
|
-
import
|
|
8075
|
+
import yargs19 from "yargs";
|
|
7872
8076
|
|
|
7873
8077
|
// src/commands/canvas/commands/prompts/_util.ts
|
|
7874
8078
|
import { PromptClient } from "@uniformdev/canvas";
|
|
@@ -7880,12 +8084,12 @@ var getPromptClient = (options) => new PromptClient({ ...options, bypassCache: t
|
|
|
7880
8084
|
var PromptGetModule = {
|
|
7881
8085
|
command: "get <id>",
|
|
7882
8086
|
describe: "Get a prompt",
|
|
7883
|
-
builder: (
|
|
8087
|
+
builder: (yargs43) => withConfiguration(
|
|
7884
8088
|
withDebugOptions(
|
|
7885
8089
|
withFormatOptions(
|
|
7886
8090
|
withApiOptions(
|
|
7887
8091
|
withProjectOptions(
|
|
7888
|
-
|
|
8092
|
+
yargs43.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
|
|
7889
8093
|
)
|
|
7890
8094
|
)
|
|
7891
8095
|
)
|
|
@@ -7906,7 +8110,7 @@ var PromptGetModule = {
|
|
|
7906
8110
|
var PromptListModule = {
|
|
7907
8111
|
command: "list",
|
|
7908
8112
|
describe: "List prompts",
|
|
7909
|
-
builder: (
|
|
8113
|
+
builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
|
|
7910
8114
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7911
8115
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7912
8116
|
const client = getPromptClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -7947,13 +8151,13 @@ function createPromptEngineDataSource({
|
|
|
7947
8151
|
var PromptPullModule = {
|
|
7948
8152
|
command: "pull <directory>",
|
|
7949
8153
|
describe: "Pulls all prompts to local files in a directory",
|
|
7950
|
-
builder: (
|
|
8154
|
+
builder: (yargs43) => withConfiguration(
|
|
7951
8155
|
withDebugOptions(
|
|
7952
8156
|
withApiOptions(
|
|
7953
8157
|
withProjectOptions(
|
|
7954
8158
|
withStateOptions(
|
|
7955
8159
|
withDiffOptions(
|
|
7956
|
-
|
|
8160
|
+
yargs43.positional("directory", {
|
|
7957
8161
|
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.",
|
|
7958
8162
|
type: "string"
|
|
7959
8163
|
}).option("format", {
|
|
@@ -8034,12 +8238,12 @@ var PromptPullModule = {
|
|
|
8034
8238
|
var PromptPushModule = {
|
|
8035
8239
|
command: "push <directory>",
|
|
8036
8240
|
describe: "Pushes all prompts from files in a directory to Uniform",
|
|
8037
|
-
builder: (
|
|
8241
|
+
builder: (yargs43) => withConfiguration(
|
|
8038
8242
|
withApiOptions(
|
|
8039
8243
|
withProjectOptions(
|
|
8040
8244
|
withStateOptions(
|
|
8041
8245
|
withDiffOptions(
|
|
8042
|
-
|
|
8246
|
+
yargs43.positional("directory", {
|
|
8043
8247
|
describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
|
|
8044
8248
|
type: "string"
|
|
8045
8249
|
}).option("mode", {
|
|
@@ -8108,10 +8312,10 @@ var PromptRemoveModule = {
|
|
|
8108
8312
|
command: "remove <id>",
|
|
8109
8313
|
aliases: ["delete", "rm"],
|
|
8110
8314
|
describe: "Delete a prompt",
|
|
8111
|
-
builder: (
|
|
8315
|
+
builder: (yargs43) => withConfiguration(
|
|
8112
8316
|
withDebugOptions(
|
|
8113
8317
|
withApiOptions(
|
|
8114
|
-
withProjectOptions(
|
|
8318
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
|
|
8115
8319
|
)
|
|
8116
8320
|
)
|
|
8117
8321
|
),
|
|
@@ -8131,11 +8335,11 @@ var PromptUpdateModule = {
|
|
|
8131
8335
|
command: "update <filename>",
|
|
8132
8336
|
aliases: ["put"],
|
|
8133
8337
|
describe: "Insert or update a prompt",
|
|
8134
|
-
builder: (
|
|
8338
|
+
builder: (yargs43) => withConfiguration(
|
|
8135
8339
|
withDebugOptions(
|
|
8136
8340
|
withApiOptions(
|
|
8137
8341
|
withProjectOptions(
|
|
8138
|
-
|
|
8342
|
+
yargs43.positional("filename", { demandOption: true, describe: "Prompt file to put" })
|
|
8139
8343
|
)
|
|
8140
8344
|
)
|
|
8141
8345
|
)
|
|
@@ -8157,14 +8361,14 @@ var PromptModule = {
|
|
|
8157
8361
|
command: "prompt <command>",
|
|
8158
8362
|
aliases: ["dt"],
|
|
8159
8363
|
describe: "Commands for AI Prompt definitions",
|
|
8160
|
-
builder: (
|
|
8364
|
+
builder: (yargs43) => yargs43.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
|
|
8161
8365
|
handler: () => {
|
|
8162
|
-
|
|
8366
|
+
yargs19.help();
|
|
8163
8367
|
}
|
|
8164
8368
|
};
|
|
8165
8369
|
|
|
8166
8370
|
// src/commands/canvas/commands/workflow.ts
|
|
8167
|
-
import
|
|
8371
|
+
import yargs20 from "yargs";
|
|
8168
8372
|
|
|
8169
8373
|
// src/commands/canvas/commands/workflow/_util.ts
|
|
8170
8374
|
import { WorkflowClient } from "@uniformdev/canvas";
|
|
@@ -8207,12 +8411,12 @@ function createWorkflowEngineDataSource({
|
|
|
8207
8411
|
var WorkflowPullModule = {
|
|
8208
8412
|
command: "pull <directory>",
|
|
8209
8413
|
describe: "Pulls all workflows to local files in a directory",
|
|
8210
|
-
builder: (
|
|
8414
|
+
builder: (yargs43) => withConfiguration(
|
|
8211
8415
|
withApiOptions(
|
|
8212
8416
|
withDebugOptions(
|
|
8213
8417
|
withProjectOptions(
|
|
8214
8418
|
withDiffOptions(
|
|
8215
|
-
|
|
8419
|
+
yargs43.positional("directory", {
|
|
8216
8420
|
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.",
|
|
8217
8421
|
type: "string"
|
|
8218
8422
|
}).option("format", {
|
|
@@ -8287,12 +8491,12 @@ var WorkflowPullModule = {
|
|
|
8287
8491
|
var WorkflowPushModule = {
|
|
8288
8492
|
command: "push <directory>",
|
|
8289
8493
|
describe: "Pushes all workflows from files in a directory to Uniform Canvas",
|
|
8290
|
-
builder: (
|
|
8494
|
+
builder: (yargs43) => withConfiguration(
|
|
8291
8495
|
withDebugOptions(
|
|
8292
8496
|
withApiOptions(
|
|
8293
8497
|
withProjectOptions(
|
|
8294
8498
|
withDiffOptions(
|
|
8295
|
-
|
|
8499
|
+
yargs43.positional("directory", {
|
|
8296
8500
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
8297
8501
|
type: "string"
|
|
8298
8502
|
}).option("mode", {
|
|
@@ -8356,9 +8560,9 @@ var WorkflowModule = {
|
|
|
8356
8560
|
command: "workflow <command>",
|
|
8357
8561
|
aliases: ["wf"],
|
|
8358
8562
|
describe: "Commands for Canvas workflows",
|
|
8359
|
-
builder: (
|
|
8563
|
+
builder: (yargs43) => yargs43.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
|
|
8360
8564
|
handler: () => {
|
|
8361
|
-
|
|
8565
|
+
yargs20.help();
|
|
8362
8566
|
}
|
|
8363
8567
|
};
|
|
8364
8568
|
|
|
@@ -8367,17 +8571,17 @@ var CanvasCommand = {
|
|
|
8367
8571
|
command: "canvas <command>",
|
|
8368
8572
|
aliases: ["cv", "pm", "presentation"],
|
|
8369
8573
|
describe: "Uniform Canvas commands",
|
|
8370
|
-
builder: (
|
|
8574
|
+
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(),
|
|
8371
8575
|
handler: () => {
|
|
8372
|
-
|
|
8576
|
+
yargs21.showHelp();
|
|
8373
8577
|
}
|
|
8374
8578
|
};
|
|
8375
8579
|
|
|
8376
8580
|
// src/commands/context/index.ts
|
|
8377
|
-
import
|
|
8581
|
+
import yargs28 from "yargs";
|
|
8378
8582
|
|
|
8379
8583
|
// src/commands/context/commands/aggregate.ts
|
|
8380
|
-
import
|
|
8584
|
+
import yargs22 from "yargs";
|
|
8381
8585
|
|
|
8382
8586
|
// src/commands/context/commands/aggregate/_util.ts
|
|
8383
8587
|
import { AggregateClient } from "@uniformdev/context/api";
|
|
@@ -8389,11 +8593,11 @@ var getAggregateClient = (options) => new AggregateClient({ ...options, bypassCa
|
|
|
8389
8593
|
var AggregateGetModule = {
|
|
8390
8594
|
command: "get <id>",
|
|
8391
8595
|
describe: "Fetch an aggregate",
|
|
8392
|
-
builder: (
|
|
8596
|
+
builder: (yargs43) => withConfiguration(
|
|
8393
8597
|
withFormatOptions(
|
|
8394
8598
|
withApiOptions(
|
|
8395
8599
|
withProjectOptions(
|
|
8396
|
-
|
|
8600
|
+
yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
|
|
8397
8601
|
)
|
|
8398
8602
|
)
|
|
8399
8603
|
)
|
|
@@ -8416,7 +8620,7 @@ var AggregateListModule = {
|
|
|
8416
8620
|
command: "list",
|
|
8417
8621
|
describe: "List aggregates",
|
|
8418
8622
|
aliases: ["ls"],
|
|
8419
|
-
builder: (
|
|
8623
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
8420
8624
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8421
8625
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8422
8626
|
const client = getAggregateClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8479,12 +8683,12 @@ function writeContextPackage(filename, packageContents) {
|
|
|
8479
8683
|
var AggregatePullModule = {
|
|
8480
8684
|
command: "pull <directory>",
|
|
8481
8685
|
describe: "Pulls all aggregates to local files in a directory",
|
|
8482
|
-
builder: (
|
|
8686
|
+
builder: (yargs43) => withConfiguration(
|
|
8483
8687
|
withApiOptions(
|
|
8484
8688
|
withDebugOptions(
|
|
8485
8689
|
withProjectOptions(
|
|
8486
8690
|
withDiffOptions(
|
|
8487
|
-
|
|
8691
|
+
yargs43.positional("directory", {
|
|
8488
8692
|
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.",
|
|
8489
8693
|
type: "string"
|
|
8490
8694
|
}).option("format", {
|
|
@@ -8559,12 +8763,12 @@ var AggregatePullModule = {
|
|
|
8559
8763
|
var AggregatePushModule = {
|
|
8560
8764
|
command: "push <directory>",
|
|
8561
8765
|
describe: "Pushes all aggregates from files in a directory or package to Uniform",
|
|
8562
|
-
builder: (
|
|
8766
|
+
builder: (yargs43) => withConfiguration(
|
|
8563
8767
|
withApiOptions(
|
|
8564
8768
|
withProjectOptions(
|
|
8565
8769
|
withDiffOptions(
|
|
8566
8770
|
withDebugOptions(
|
|
8567
|
-
|
|
8771
|
+
yargs43.positional("directory", {
|
|
8568
8772
|
describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
|
|
8569
8773
|
type: "string"
|
|
8570
8774
|
}).option("mode", {
|
|
@@ -8629,10 +8833,10 @@ var AggregateRemoveModule = {
|
|
|
8629
8833
|
command: "remove <id>",
|
|
8630
8834
|
aliases: ["delete", "rm"],
|
|
8631
8835
|
describe: "Delete an aggregate",
|
|
8632
|
-
builder: (
|
|
8836
|
+
builder: (yargs43) => withConfiguration(
|
|
8633
8837
|
withApiOptions(
|
|
8634
8838
|
withProjectOptions(
|
|
8635
|
-
|
|
8839
|
+
yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
|
|
8636
8840
|
)
|
|
8637
8841
|
)
|
|
8638
8842
|
),
|
|
@@ -8648,10 +8852,10 @@ var AggregateUpdateModule = {
|
|
|
8648
8852
|
command: "update <filename>",
|
|
8649
8853
|
aliases: ["put"],
|
|
8650
8854
|
describe: "Insert or update an aggregate",
|
|
8651
|
-
builder: (
|
|
8855
|
+
builder: (yargs43) => withConfiguration(
|
|
8652
8856
|
withApiOptions(
|
|
8653
8857
|
withProjectOptions(
|
|
8654
|
-
|
|
8858
|
+
yargs43.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
|
|
8655
8859
|
)
|
|
8656
8860
|
)
|
|
8657
8861
|
),
|
|
@@ -8668,14 +8872,14 @@ var AggregateModule = {
|
|
|
8668
8872
|
command: "aggregate <command>",
|
|
8669
8873
|
aliases: ["agg", "intent", "audience"],
|
|
8670
8874
|
describe: "Commands for Context aggregates (intents, audiences)",
|
|
8671
|
-
builder: (
|
|
8875
|
+
builder: (yargs43) => yargs43.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
|
|
8672
8876
|
handler: () => {
|
|
8673
|
-
|
|
8877
|
+
yargs22.help();
|
|
8674
8878
|
}
|
|
8675
8879
|
};
|
|
8676
8880
|
|
|
8677
8881
|
// src/commands/context/commands/enrichment.ts
|
|
8678
|
-
import
|
|
8882
|
+
import yargs23 from "yargs";
|
|
8679
8883
|
|
|
8680
8884
|
// src/commands/context/commands/enrichment/_util.ts
|
|
8681
8885
|
import { UncachedEnrichmentClient } from "@uniformdev/context/api";
|
|
@@ -8689,11 +8893,11 @@ function getEnrichmentClient(options) {
|
|
|
8689
8893
|
var EnrichmentGetModule = {
|
|
8690
8894
|
command: "get <id>",
|
|
8691
8895
|
describe: "Fetch an enrichment category and its values",
|
|
8692
|
-
builder: (
|
|
8896
|
+
builder: (yargs43) => withFormatOptions(
|
|
8693
8897
|
withConfiguration(
|
|
8694
8898
|
withApiOptions(
|
|
8695
8899
|
withProjectOptions(
|
|
8696
|
-
|
|
8900
|
+
yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
|
|
8697
8901
|
)
|
|
8698
8902
|
)
|
|
8699
8903
|
)
|
|
@@ -8716,7 +8920,7 @@ var EnrichmentListModule = {
|
|
|
8716
8920
|
command: "list",
|
|
8717
8921
|
describe: "List enrichments",
|
|
8718
8922
|
aliases: ["ls"],
|
|
8719
|
-
builder: (
|
|
8923
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
8720
8924
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8721
8925
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8722
8926
|
const client = getEnrichmentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8811,12 +9015,12 @@ var createEnrichmentValueEngineDataSource = ({
|
|
|
8811
9015
|
var EnrichmentPullModule = {
|
|
8812
9016
|
command: "pull <directory>",
|
|
8813
9017
|
describe: "Pulls all enrichments to local files in a directory",
|
|
8814
|
-
builder: (
|
|
9018
|
+
builder: (yargs43) => withConfiguration(
|
|
8815
9019
|
withDebugOptions(
|
|
8816
9020
|
withApiOptions(
|
|
8817
9021
|
withProjectOptions(
|
|
8818
9022
|
withDiffOptions(
|
|
8819
|
-
|
|
9023
|
+
yargs43.positional("directory", {
|
|
8820
9024
|
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.",
|
|
8821
9025
|
type: "string"
|
|
8822
9026
|
}).option("format", {
|
|
@@ -8891,11 +9095,11 @@ var EnrichmentPullModule = {
|
|
|
8891
9095
|
var EnrichmentPushModule = {
|
|
8892
9096
|
command: "push <directory>",
|
|
8893
9097
|
describe: "Pushes all enrichments from files in a directory or package to Uniform",
|
|
8894
|
-
builder: (
|
|
9098
|
+
builder: (yargs43) => withConfiguration(
|
|
8895
9099
|
withApiOptions(
|
|
8896
9100
|
withProjectOptions(
|
|
8897
9101
|
withDiffOptions(
|
|
8898
|
-
|
|
9102
|
+
yargs43.positional("directory", {
|
|
8899
9103
|
describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
|
|
8900
9104
|
type: "string"
|
|
8901
9105
|
}).option("mode", {
|
|
@@ -8958,10 +9162,10 @@ var EnrichmentRemoveModule = {
|
|
|
8958
9162
|
command: "remove <id>",
|
|
8959
9163
|
aliases: ["delete", "rm"],
|
|
8960
9164
|
describe: "Delete an enrichment category and its values",
|
|
8961
|
-
builder: (
|
|
9165
|
+
builder: (yargs43) => withConfiguration(
|
|
8962
9166
|
withApiOptions(
|
|
8963
9167
|
withProjectOptions(
|
|
8964
|
-
|
|
9168
|
+
yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
|
|
8965
9169
|
)
|
|
8966
9170
|
)
|
|
8967
9171
|
),
|
|
@@ -8977,14 +9181,14 @@ var EnrichmentModule = {
|
|
|
8977
9181
|
command: "enrichment <command>",
|
|
8978
9182
|
aliases: ["enr"],
|
|
8979
9183
|
describe: "Commands for Context enrichments",
|
|
8980
|
-
builder: (
|
|
9184
|
+
builder: (yargs43) => yargs43.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
|
|
8981
9185
|
handler: () => {
|
|
8982
|
-
|
|
9186
|
+
yargs23.help();
|
|
8983
9187
|
}
|
|
8984
9188
|
};
|
|
8985
9189
|
|
|
8986
9190
|
// src/commands/context/commands/manifest.ts
|
|
8987
|
-
import
|
|
9191
|
+
import yargs24 from "yargs";
|
|
8988
9192
|
|
|
8989
9193
|
// src/commands/context/commands/manifest/get.ts
|
|
8990
9194
|
import { ApiClientError as ApiClientError5, UncachedManifestClient } from "@uniformdev/context/api";
|
|
@@ -8995,10 +9199,10 @@ var ManifestGetModule = {
|
|
|
8995
9199
|
command: "get [output]",
|
|
8996
9200
|
aliases: ["dl", "download"],
|
|
8997
9201
|
describe: "Download the Uniform Context manifest for a project",
|
|
8998
|
-
builder: (
|
|
9202
|
+
builder: (yargs43) => withConfiguration(
|
|
8999
9203
|
withApiOptions(
|
|
9000
9204
|
withProjectOptions(
|
|
9001
|
-
|
|
9205
|
+
yargs43.option("preview", {
|
|
9002
9206
|
describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
|
|
9003
9207
|
default: false,
|
|
9004
9208
|
type: "boolean",
|
|
@@ -9060,7 +9264,7 @@ import { exit as exit2 } from "process";
|
|
|
9060
9264
|
var ManifestPublishModule = {
|
|
9061
9265
|
command: "publish",
|
|
9062
9266
|
describe: "Publish the Uniform Context manifest for a project",
|
|
9063
|
-
builder: (
|
|
9267
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(yargs43))),
|
|
9064
9268
|
handler: async ({ apiKey, apiHost, proxy, project }) => {
|
|
9065
9269
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9066
9270
|
try {
|
|
@@ -9093,25 +9297,25 @@ var ManifestModule = {
|
|
|
9093
9297
|
command: "manifest <command>",
|
|
9094
9298
|
describe: "Commands for context manifests",
|
|
9095
9299
|
aliases: ["man"],
|
|
9096
|
-
builder: (
|
|
9300
|
+
builder: (yargs43) => yargs43.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
|
|
9097
9301
|
handler: () => {
|
|
9098
|
-
|
|
9302
|
+
yargs24.help();
|
|
9099
9303
|
}
|
|
9100
9304
|
};
|
|
9101
9305
|
|
|
9102
9306
|
// src/commands/context/commands/quirk.ts
|
|
9103
|
-
import
|
|
9307
|
+
import yargs25 from "yargs";
|
|
9104
9308
|
|
|
9105
9309
|
// src/commands/context/commands/quirk/get.ts
|
|
9106
9310
|
import { UncachedQuirkClient } from "@uniformdev/context/api";
|
|
9107
9311
|
var QuirkGetModule = {
|
|
9108
9312
|
command: "get <id>",
|
|
9109
9313
|
describe: "Fetch a quirk",
|
|
9110
|
-
builder: (
|
|
9314
|
+
builder: (yargs43) => withConfiguration(
|
|
9111
9315
|
withFormatOptions(
|
|
9112
9316
|
withApiOptions(
|
|
9113
9317
|
withProjectOptions(
|
|
9114
|
-
|
|
9318
|
+
yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
|
|
9115
9319
|
)
|
|
9116
9320
|
)
|
|
9117
9321
|
)
|
|
@@ -9135,11 +9339,11 @@ var QuirkListModule = {
|
|
|
9135
9339
|
command: "list",
|
|
9136
9340
|
describe: "List quirks",
|
|
9137
9341
|
aliases: ["ls"],
|
|
9138
|
-
builder: (
|
|
9342
|
+
builder: (yargs43) => withConfiguration(
|
|
9139
9343
|
withFormatOptions(
|
|
9140
9344
|
withApiOptions(
|
|
9141
9345
|
withProjectOptions(
|
|
9142
|
-
|
|
9346
|
+
yargs43.option("withIntegrations", {
|
|
9143
9347
|
alias: ["i"],
|
|
9144
9348
|
describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
|
|
9145
9349
|
type: "boolean"
|
|
@@ -9197,12 +9401,12 @@ function createQuirkEngineDataSource({
|
|
|
9197
9401
|
var QuirkPullModule = {
|
|
9198
9402
|
command: "pull <directory>",
|
|
9199
9403
|
describe: "Pulls all quirks to local files in a directory",
|
|
9200
|
-
builder: (
|
|
9404
|
+
builder: (yargs43) => withConfiguration(
|
|
9201
9405
|
withDebugOptions(
|
|
9202
9406
|
withApiOptions(
|
|
9203
9407
|
withProjectOptions(
|
|
9204
9408
|
withDiffOptions(
|
|
9205
|
-
|
|
9409
|
+
yargs43.positional("directory", {
|
|
9206
9410
|
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.",
|
|
9207
9411
|
type: "string"
|
|
9208
9412
|
}).option("format", {
|
|
@@ -9278,12 +9482,12 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
|
|
|
9278
9482
|
var QuirkPushModule = {
|
|
9279
9483
|
command: "push <directory>",
|
|
9280
9484
|
describe: "Pushes all quirks from files in a directory or package to Uniform",
|
|
9281
|
-
builder: (
|
|
9485
|
+
builder: (yargs43) => withConfiguration(
|
|
9282
9486
|
withDebugOptions(
|
|
9283
9487
|
withApiOptions(
|
|
9284
9488
|
withProjectOptions(
|
|
9285
9489
|
withDiffOptions(
|
|
9286
|
-
|
|
9490
|
+
yargs43.positional("directory", {
|
|
9287
9491
|
describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
|
|
9288
9492
|
type: "string"
|
|
9289
9493
|
}).option("mode", {
|
|
@@ -9348,10 +9552,10 @@ var QuirkRemoveModule = {
|
|
|
9348
9552
|
command: "remove <id>",
|
|
9349
9553
|
aliases: ["delete", "rm"],
|
|
9350
9554
|
describe: "Delete a quirk",
|
|
9351
|
-
builder: (
|
|
9555
|
+
builder: (yargs43) => withConfiguration(
|
|
9352
9556
|
withApiOptions(
|
|
9353
9557
|
withProjectOptions(
|
|
9354
|
-
|
|
9558
|
+
yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
|
|
9355
9559
|
)
|
|
9356
9560
|
)
|
|
9357
9561
|
),
|
|
@@ -9368,10 +9572,10 @@ var QuirkUpdateModule = {
|
|
|
9368
9572
|
command: "update <filename>",
|
|
9369
9573
|
aliases: ["put"],
|
|
9370
9574
|
describe: "Insert or update a quirk",
|
|
9371
|
-
builder: (
|
|
9575
|
+
builder: (yargs43) => withConfiguration(
|
|
9372
9576
|
withApiOptions(
|
|
9373
9577
|
withProjectOptions(
|
|
9374
|
-
|
|
9578
|
+
yargs43.positional("filename", { demandOption: true, describe: "Quirk file to put" })
|
|
9375
9579
|
)
|
|
9376
9580
|
)
|
|
9377
9581
|
),
|
|
@@ -9388,25 +9592,25 @@ var QuirkModule = {
|
|
|
9388
9592
|
command: "quirk <command>",
|
|
9389
9593
|
aliases: ["qk"],
|
|
9390
9594
|
describe: "Commands for Context quirks",
|
|
9391
|
-
builder: (
|
|
9595
|
+
builder: (yargs43) => yargs43.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
|
|
9392
9596
|
handler: () => {
|
|
9393
|
-
|
|
9597
|
+
yargs25.help();
|
|
9394
9598
|
}
|
|
9395
9599
|
};
|
|
9396
9600
|
|
|
9397
9601
|
// src/commands/context/commands/signal.ts
|
|
9398
|
-
import
|
|
9602
|
+
import yargs26 from "yargs";
|
|
9399
9603
|
|
|
9400
9604
|
// src/commands/context/commands/signal/get.ts
|
|
9401
9605
|
import { UncachedSignalClient } from "@uniformdev/context/api";
|
|
9402
9606
|
var SignalGetModule = {
|
|
9403
9607
|
command: "get <id>",
|
|
9404
9608
|
describe: "Fetch a signal",
|
|
9405
|
-
builder: (
|
|
9609
|
+
builder: (yargs43) => withConfiguration(
|
|
9406
9610
|
withFormatOptions(
|
|
9407
9611
|
withApiOptions(
|
|
9408
9612
|
withProjectOptions(
|
|
9409
|
-
|
|
9613
|
+
yargs43.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
|
|
9410
9614
|
)
|
|
9411
9615
|
)
|
|
9412
9616
|
)
|
|
@@ -9430,7 +9634,7 @@ var SignalListModule = {
|
|
|
9430
9634
|
command: "list",
|
|
9431
9635
|
describe: "List signals",
|
|
9432
9636
|
aliases: ["ls"],
|
|
9433
|
-
builder: (
|
|
9637
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
9434
9638
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9435
9639
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9436
9640
|
const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9480,12 +9684,12 @@ function createSignalEngineDataSource({
|
|
|
9480
9684
|
var SignalPullModule = {
|
|
9481
9685
|
command: "pull <directory>",
|
|
9482
9686
|
describe: "Pulls all signals to local files in a directory",
|
|
9483
|
-
builder: (
|
|
9687
|
+
builder: (yargs43) => withConfiguration(
|
|
9484
9688
|
withDebugOptions(
|
|
9485
9689
|
withApiOptions(
|
|
9486
9690
|
withProjectOptions(
|
|
9487
9691
|
withDiffOptions(
|
|
9488
|
-
|
|
9692
|
+
yargs43.positional("directory", {
|
|
9489
9693
|
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.",
|
|
9490
9694
|
type: "string"
|
|
9491
9695
|
}).option("format", {
|
|
@@ -9561,12 +9765,12 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
|
|
|
9561
9765
|
var SignalPushModule = {
|
|
9562
9766
|
command: "push <directory>",
|
|
9563
9767
|
describe: "Pushes all signals from files in a directory or package to Uniform",
|
|
9564
|
-
builder: (
|
|
9768
|
+
builder: (yargs43) => withConfiguration(
|
|
9565
9769
|
withDebugOptions(
|
|
9566
9770
|
withApiOptions(
|
|
9567
9771
|
withProjectOptions(
|
|
9568
9772
|
withDiffOptions(
|
|
9569
|
-
|
|
9773
|
+
yargs43.positional("directory", {
|
|
9570
9774
|
describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
|
|
9571
9775
|
type: "string"
|
|
9572
9776
|
}).option("mode", {
|
|
@@ -9631,10 +9835,10 @@ var SignalRemoveModule = {
|
|
|
9631
9835
|
command: "remove <id>",
|
|
9632
9836
|
aliases: ["delete", "rm"],
|
|
9633
9837
|
describe: "Delete a signal",
|
|
9634
|
-
builder: (
|
|
9838
|
+
builder: (yargs43) => withConfiguration(
|
|
9635
9839
|
withApiOptions(
|
|
9636
9840
|
withProjectOptions(
|
|
9637
|
-
|
|
9841
|
+
yargs43.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
|
|
9638
9842
|
)
|
|
9639
9843
|
)
|
|
9640
9844
|
),
|
|
@@ -9651,10 +9855,10 @@ var SignalUpdateModule = {
|
|
|
9651
9855
|
command: "update <filename>",
|
|
9652
9856
|
aliases: ["put"],
|
|
9653
9857
|
describe: "Insert or update a signal",
|
|
9654
|
-
builder: (
|
|
9858
|
+
builder: (yargs43) => withConfiguration(
|
|
9655
9859
|
withApiOptions(
|
|
9656
9860
|
withProjectOptions(
|
|
9657
|
-
|
|
9861
|
+
yargs43.positional("filename", { demandOption: true, describe: "Signal file to put" })
|
|
9658
9862
|
)
|
|
9659
9863
|
)
|
|
9660
9864
|
),
|
|
@@ -9671,25 +9875,25 @@ var SignalModule = {
|
|
|
9671
9875
|
command: "signal <command>",
|
|
9672
9876
|
aliases: ["sig"],
|
|
9673
9877
|
describe: "Commands for Context signals",
|
|
9674
|
-
builder: (
|
|
9878
|
+
builder: (yargs43) => yargs43.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
|
|
9675
9879
|
handler: () => {
|
|
9676
|
-
|
|
9880
|
+
yargs26.help();
|
|
9677
9881
|
}
|
|
9678
9882
|
};
|
|
9679
9883
|
|
|
9680
9884
|
// src/commands/context/commands/test.ts
|
|
9681
|
-
import
|
|
9885
|
+
import yargs27 from "yargs";
|
|
9682
9886
|
|
|
9683
9887
|
// src/commands/context/commands/test/get.ts
|
|
9684
9888
|
import { UncachedTestClient } from "@uniformdev/context/api";
|
|
9685
9889
|
var TestGetModule = {
|
|
9686
9890
|
command: "get <id>",
|
|
9687
9891
|
describe: "Fetch a test",
|
|
9688
|
-
builder: (
|
|
9892
|
+
builder: (yargs43) => withConfiguration(
|
|
9689
9893
|
withFormatOptions(
|
|
9690
9894
|
withApiOptions(
|
|
9691
9895
|
withProjectOptions(
|
|
9692
|
-
|
|
9896
|
+
yargs43.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
|
|
9693
9897
|
)
|
|
9694
9898
|
)
|
|
9695
9899
|
)
|
|
@@ -9713,7 +9917,7 @@ var TestListModule = {
|
|
|
9713
9917
|
command: "list",
|
|
9714
9918
|
describe: "List tests",
|
|
9715
9919
|
aliases: ["ls"],
|
|
9716
|
-
builder: (
|
|
9920
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
9717
9921
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9718
9922
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9719
9923
|
const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9763,12 +9967,12 @@ function createTestEngineDataSource({
|
|
|
9763
9967
|
var TestPullModule = {
|
|
9764
9968
|
command: "pull <directory>",
|
|
9765
9969
|
describe: "Pulls all tests to local files in a directory",
|
|
9766
|
-
builder: (
|
|
9970
|
+
builder: (yargs43) => withConfiguration(
|
|
9767
9971
|
withDebugOptions(
|
|
9768
9972
|
withApiOptions(
|
|
9769
9973
|
withProjectOptions(
|
|
9770
9974
|
withDiffOptions(
|
|
9771
|
-
|
|
9975
|
+
yargs43.positional("directory", {
|
|
9772
9976
|
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.",
|
|
9773
9977
|
type: "string"
|
|
9774
9978
|
}).option("format", {
|
|
@@ -9844,12 +10048,12 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
|
|
|
9844
10048
|
var TestPushModule = {
|
|
9845
10049
|
command: "push <directory>",
|
|
9846
10050
|
describe: "Pushes all tests from files in a directory or package to Uniform",
|
|
9847
|
-
builder: (
|
|
10051
|
+
builder: (yargs43) => withConfiguration(
|
|
9848
10052
|
withDebugOptions(
|
|
9849
10053
|
withApiOptions(
|
|
9850
10054
|
withProjectOptions(
|
|
9851
10055
|
withDiffOptions(
|
|
9852
|
-
|
|
10056
|
+
yargs43.positional("directory", {
|
|
9853
10057
|
describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
|
|
9854
10058
|
type: "string"
|
|
9855
10059
|
}).option("mode", {
|
|
@@ -9914,10 +10118,10 @@ var TestRemoveModule = {
|
|
|
9914
10118
|
command: "remove <id>",
|
|
9915
10119
|
aliases: ["delete", "rm"],
|
|
9916
10120
|
describe: "Delete a test",
|
|
9917
|
-
builder: (
|
|
10121
|
+
builder: (yargs43) => withConfiguration(
|
|
9918
10122
|
withApiOptions(
|
|
9919
10123
|
withProjectOptions(
|
|
9920
|
-
|
|
10124
|
+
yargs43.positional("id", { demandOption: true, describe: "Test public ID to delete" })
|
|
9921
10125
|
)
|
|
9922
10126
|
)
|
|
9923
10127
|
),
|
|
@@ -9934,9 +10138,9 @@ var TestUpdateModule = {
|
|
|
9934
10138
|
command: "update <filename>",
|
|
9935
10139
|
aliases: ["put"],
|
|
9936
10140
|
describe: "Insert or update a test",
|
|
9937
|
-
builder: (
|
|
10141
|
+
builder: (yargs43) => withConfiguration(
|
|
9938
10142
|
withApiOptions(
|
|
9939
|
-
withProjectOptions(
|
|
10143
|
+
withProjectOptions(yargs43.positional("filename", { demandOption: true, describe: "Test file to put" }))
|
|
9940
10144
|
)
|
|
9941
10145
|
),
|
|
9942
10146
|
handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
|
|
@@ -9951,9 +10155,9 @@ var TestUpdateModule = {
|
|
|
9951
10155
|
var TestModule = {
|
|
9952
10156
|
command: "test <command>",
|
|
9953
10157
|
describe: "Commands for Context A/B tests",
|
|
9954
|
-
builder: (
|
|
10158
|
+
builder: (yargs43) => yargs43.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
|
|
9955
10159
|
handler: () => {
|
|
9956
|
-
|
|
10160
|
+
yargs27.help();
|
|
9957
10161
|
}
|
|
9958
10162
|
};
|
|
9959
10163
|
|
|
@@ -9962,20 +10166,20 @@ var ContextCommand = {
|
|
|
9962
10166
|
command: "context <command>",
|
|
9963
10167
|
aliases: ["ctx"],
|
|
9964
10168
|
describe: "Uniform Context commands",
|
|
9965
|
-
builder: (
|
|
10169
|
+
builder: (yargs43) => yargs43.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
|
|
9966
10170
|
handler: () => {
|
|
9967
|
-
|
|
10171
|
+
yargs28.showHelp();
|
|
9968
10172
|
}
|
|
9969
10173
|
};
|
|
9970
10174
|
|
|
9971
10175
|
// src/commands/integration/index.ts
|
|
9972
|
-
import
|
|
10176
|
+
import yargs33 from "yargs";
|
|
9973
10177
|
|
|
9974
10178
|
// src/commands/integration/commands/definition.ts
|
|
9975
|
-
import
|
|
10179
|
+
import yargs32 from "yargs";
|
|
9976
10180
|
|
|
9977
10181
|
// src/commands/integration/commands/definition/dataResourceEditor/dataResourceEditor.ts
|
|
9978
|
-
import
|
|
10182
|
+
import yargs29 from "yargs";
|
|
9979
10183
|
|
|
9980
10184
|
// src/commands/integration/commands/definition/dataResourceEditor/deploy.ts
|
|
9981
10185
|
import { readFileSync as readFileSync2 } from "fs";
|
|
@@ -10046,8 +10250,8 @@ var EdgehancerClient = class extends ApiClient {
|
|
|
10046
10250
|
};
|
|
10047
10251
|
|
|
10048
10252
|
// src/commands/integration/commands/definition/dataResourceEditor/util.ts
|
|
10049
|
-
function withDataResourceEditorIdOptions(
|
|
10050
|
-
return
|
|
10253
|
+
function withDataResourceEditorIdOptions(yargs43) {
|
|
10254
|
+
return yargs43.option("connectorType", {
|
|
10051
10255
|
describe: "Integration data connector type to attach the data resource editor to, as defined in the integration manifest file.",
|
|
10052
10256
|
demandOption: true,
|
|
10053
10257
|
type: "string"
|
|
@@ -10067,11 +10271,11 @@ function withDataResourceEditorIdOptions(yargs42) {
|
|
|
10067
10271
|
var IntegrationDataResourceEditorDeployModule = {
|
|
10068
10272
|
command: "deploy <filename>",
|
|
10069
10273
|
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.",
|
|
10070
|
-
builder: (
|
|
10274
|
+
builder: (yargs43) => withConfiguration(
|
|
10071
10275
|
withApiOptions(
|
|
10072
10276
|
withTeamOptions(
|
|
10073
10277
|
withDataResourceEditorIdOptions(
|
|
10074
|
-
|
|
10278
|
+
yargs43.positional("filename", {
|
|
10075
10279
|
demandOption: true,
|
|
10076
10280
|
describe: "ESM code file to run for the target data resource editor hook. Refer to the documentation for expected types."
|
|
10077
10281
|
}).option("compatibilityDate", {
|
|
@@ -10114,7 +10318,7 @@ var IntegrationDataResourceEditorDeployModule = {
|
|
|
10114
10318
|
var IntegrationDataResourceEditorRemoveModule = {
|
|
10115
10319
|
command: "remove",
|
|
10116
10320
|
describe: "Removes a custom AI data resource editor hook from a data resource archetype. The API key used must have team admin permissions.",
|
|
10117
|
-
builder: (
|
|
10321
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withDataResourceEditorIdOptions(yargs43)))),
|
|
10118
10322
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, connectorType, archetype, hook }) => {
|
|
10119
10323
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10120
10324
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -10126,21 +10330,21 @@ var IntegrationDataResourceEditorRemoveModule = {
|
|
|
10126
10330
|
var IntegrationDataResourceEditorModule = {
|
|
10127
10331
|
command: "dataResourceEditor <command>",
|
|
10128
10332
|
describe: "Commands for managing custom AI data resource editors at the team level.",
|
|
10129
|
-
builder: (
|
|
10333
|
+
builder: (yargs43) => yargs43.command(IntegrationDataResourceEditorDeployModule).command(IntegrationDataResourceEditorRemoveModule).demandCommand(),
|
|
10130
10334
|
handler: () => {
|
|
10131
|
-
|
|
10335
|
+
yargs29.help();
|
|
10132
10336
|
}
|
|
10133
10337
|
};
|
|
10134
10338
|
|
|
10135
10339
|
// src/commands/integration/commands/definition/edgehancer/edgehancer.ts
|
|
10136
|
-
import
|
|
10340
|
+
import yargs30 from "yargs";
|
|
10137
10341
|
|
|
10138
10342
|
// src/commands/integration/commands/definition/edgehancer/deploy.ts
|
|
10139
10343
|
import { readFileSync as readFileSync3 } from "fs";
|
|
10140
10344
|
|
|
10141
10345
|
// src/commands/integration/commands/definition/edgehancer/util.ts
|
|
10142
|
-
function withEdgehancerIdOptions(
|
|
10143
|
-
return
|
|
10346
|
+
function withEdgehancerIdOptions(yargs43) {
|
|
10347
|
+
return yargs43.option("connectorType", {
|
|
10144
10348
|
describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
|
|
10145
10349
|
demandOption: true,
|
|
10146
10350
|
type: "string"
|
|
@@ -10160,11 +10364,11 @@ function withEdgehancerIdOptions(yargs42) {
|
|
|
10160
10364
|
var IntegrationEdgehancerDeployModule = {
|
|
10161
10365
|
command: "deploy <filename>",
|
|
10162
10366
|
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.",
|
|
10163
|
-
builder: (
|
|
10367
|
+
builder: (yargs43) => withConfiguration(
|
|
10164
10368
|
withApiOptions(
|
|
10165
10369
|
withTeamOptions(
|
|
10166
10370
|
withEdgehancerIdOptions(
|
|
10167
|
-
|
|
10371
|
+
yargs43.positional("filename", {
|
|
10168
10372
|
demandOption: true,
|
|
10169
10373
|
describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
|
|
10170
10374
|
}).option("compatibilityDate", {
|
|
@@ -10207,7 +10411,7 @@ var IntegrationEdgehancerDeployModule = {
|
|
|
10207
10411
|
var IntegrationEdgehancerRemoveModule = {
|
|
10208
10412
|
command: "remove",
|
|
10209
10413
|
describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
|
|
10210
|
-
builder: (
|
|
10414
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs43)))),
|
|
10211
10415
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
|
|
10212
10416
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10213
10417
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -10219,22 +10423,22 @@ var IntegrationEdgehancerRemoveModule = {
|
|
|
10219
10423
|
var IntegrationEdgehancerModule = {
|
|
10220
10424
|
command: "edgehancer <command>",
|
|
10221
10425
|
describe: "Commands for managing custom integration edgehancers at the team level.",
|
|
10222
|
-
builder: (
|
|
10426
|
+
builder: (yargs43) => yargs43.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
|
|
10223
10427
|
handler: () => {
|
|
10224
|
-
|
|
10428
|
+
yargs30.help();
|
|
10225
10429
|
}
|
|
10226
10430
|
};
|
|
10227
10431
|
|
|
10228
10432
|
// src/commands/integration/commands/definition/propertyEditor/propertyEditor.ts
|
|
10229
|
-
import
|
|
10433
|
+
import yargs31 from "yargs";
|
|
10230
10434
|
|
|
10231
10435
|
// src/commands/integration/commands/definition/propertyEditor/deploy.ts
|
|
10232
10436
|
import { IntegrationPropertyEditorsClient } from "@uniformdev/canvas";
|
|
10233
10437
|
import { readFileSync as readFileSync4 } from "fs";
|
|
10234
10438
|
|
|
10235
10439
|
// src/commands/integration/commands/definition/propertyEditor/util.ts
|
|
10236
|
-
function withPropertyEditorIdOptions(
|
|
10237
|
-
return
|
|
10440
|
+
function withPropertyEditorIdOptions(yargs43) {
|
|
10441
|
+
return yargs43.option("propertyType", {
|
|
10238
10442
|
describe: "Property type to attach the editor to.",
|
|
10239
10443
|
demandOption: true,
|
|
10240
10444
|
type: "string"
|
|
@@ -10250,11 +10454,11 @@ function withPropertyEditorIdOptions(yargs42) {
|
|
|
10250
10454
|
var IntegrationPropertyEditorDeployModule = {
|
|
10251
10455
|
command: "deploy <filename>",
|
|
10252
10456
|
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.",
|
|
10253
|
-
builder: (
|
|
10457
|
+
builder: (yargs43) => withConfiguration(
|
|
10254
10458
|
withApiOptions(
|
|
10255
10459
|
withTeamOptions(
|
|
10256
10460
|
withPropertyEditorIdOptions(
|
|
10257
|
-
|
|
10461
|
+
yargs43.positional("filename", {
|
|
10258
10462
|
demandOption: true,
|
|
10259
10463
|
describe: "ESM code file to run for the target property editor hook. Refer to the documentation for expected types."
|
|
10260
10464
|
}).option("compatibilityDate", {
|
|
@@ -10297,7 +10501,7 @@ import { IntegrationPropertyEditorsClient as IntegrationPropertyEditorsClient2 }
|
|
|
10297
10501
|
var IntegrationPropertyEditorRemoveModule = {
|
|
10298
10502
|
command: "remove",
|
|
10299
10503
|
describe: "Deletes a custom AI property editor hook from a property type. The API key used must have team admin permissions.",
|
|
10300
|
-
builder: (
|
|
10504
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withPropertyEditorIdOptions(yargs43)))),
|
|
10301
10505
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, propertyType, hook }) => {
|
|
10302
10506
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10303
10507
|
const client = new IntegrationPropertyEditorsClient2({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -10309,9 +10513,9 @@ var IntegrationPropertyEditorRemoveModule = {
|
|
|
10309
10513
|
var IntegrationPropertyEditorModule = {
|
|
10310
10514
|
command: "propertyEditor <command>",
|
|
10311
10515
|
describe: "Commands for managing custom AI property editors at the team level.",
|
|
10312
|
-
builder: (
|
|
10516
|
+
builder: (yargs43) => yargs43.command(IntegrationPropertyEditorDeployModule).command(IntegrationPropertyEditorRemoveModule).demandCommand(),
|
|
10313
10517
|
handler: () => {
|
|
10314
|
-
|
|
10518
|
+
yargs31.help();
|
|
10315
10519
|
}
|
|
10316
10520
|
};
|
|
10317
10521
|
|
|
@@ -10351,10 +10555,10 @@ var DefinitionClient = class extends ApiClient2 {
|
|
|
10351
10555
|
var IntegrationDefinitionRegisterModule = {
|
|
10352
10556
|
command: "register <filename>",
|
|
10353
10557
|
describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
|
|
10354
|
-
builder: (
|
|
10558
|
+
builder: (yargs43) => withConfiguration(
|
|
10355
10559
|
withApiOptions(
|
|
10356
10560
|
withTeamOptions(
|
|
10357
|
-
|
|
10561
|
+
yargs43.positional("filename", {
|
|
10358
10562
|
demandOption: true,
|
|
10359
10563
|
describe: "Integration definition manifest to register"
|
|
10360
10564
|
})
|
|
@@ -10373,10 +10577,10 @@ var IntegrationDefinitionRegisterModule = {
|
|
|
10373
10577
|
var IntegrationDefinitionRemoveModule = {
|
|
10374
10578
|
command: "remove <type>",
|
|
10375
10579
|
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.",
|
|
10376
|
-
builder: (
|
|
10580
|
+
builder: (yargs43) => withConfiguration(
|
|
10377
10581
|
withApiOptions(
|
|
10378
10582
|
withTeamOptions(
|
|
10379
|
-
|
|
10583
|
+
yargs43.positional("type", {
|
|
10380
10584
|
demandOption: true,
|
|
10381
10585
|
describe: "Integration type (from its manifest) to remove."
|
|
10382
10586
|
})
|
|
@@ -10394,9 +10598,9 @@ var IntegrationDefinitionRemoveModule = {
|
|
|
10394
10598
|
var IntegrationDefinitionModule = {
|
|
10395
10599
|
command: "definition <command>",
|
|
10396
10600
|
describe: "Commands for managing custom integration definitions at the team level.",
|
|
10397
|
-
builder: (
|
|
10601
|
+
builder: (yargs43) => yargs43.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).command(IntegrationDataResourceEditorModule).command(IntegrationPropertyEditorModule).demandCommand(),
|
|
10398
10602
|
handler: () => {
|
|
10399
|
-
|
|
10603
|
+
yargs32.help();
|
|
10400
10604
|
}
|
|
10401
10605
|
};
|
|
10402
10606
|
|
|
@@ -10436,10 +10640,10 @@ var InstallClient = class extends ApiClient3 {
|
|
|
10436
10640
|
var IntegrationInstallModule = {
|
|
10437
10641
|
command: "install <type>",
|
|
10438
10642
|
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.",
|
|
10439
|
-
builder: (
|
|
10643
|
+
builder: (yargs43) => withConfiguration(
|
|
10440
10644
|
withApiOptions(
|
|
10441
10645
|
withProjectOptions(
|
|
10442
|
-
|
|
10646
|
+
yargs43.positional("type", {
|
|
10443
10647
|
demandOption: true,
|
|
10444
10648
|
describe: "Integration type to install (as defined in its manifest)"
|
|
10445
10649
|
}).option("configuration", {
|
|
@@ -10461,10 +10665,10 @@ var IntegrationInstallModule = {
|
|
|
10461
10665
|
var IntegrationUninstallModule = {
|
|
10462
10666
|
command: "uninstall <type>",
|
|
10463
10667
|
describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
|
|
10464
|
-
builder: (
|
|
10668
|
+
builder: (yargs43) => withConfiguration(
|
|
10465
10669
|
withApiOptions(
|
|
10466
10670
|
withProjectOptions(
|
|
10467
|
-
|
|
10671
|
+
yargs43.positional("type", {
|
|
10468
10672
|
demandOption: true,
|
|
10469
10673
|
describe: "Integration type to uninstall (as defined in its manifest)"
|
|
10470
10674
|
})
|
|
@@ -10482,9 +10686,9 @@ var IntegrationUninstallModule = {
|
|
|
10482
10686
|
var IntegrationCommand = {
|
|
10483
10687
|
command: "integration <command>",
|
|
10484
10688
|
describe: "Integration management commands",
|
|
10485
|
-
builder: (
|
|
10689
|
+
builder: (yargs43) => yargs43.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
|
|
10486
10690
|
handler: () => {
|
|
10487
|
-
|
|
10691
|
+
yargs33.showHelp();
|
|
10488
10692
|
}
|
|
10489
10693
|
};
|
|
10490
10694
|
|
|
@@ -10949,14 +11153,14 @@ var NewMeshCmd = {
|
|
|
10949
11153
|
};
|
|
10950
11154
|
|
|
10951
11155
|
// src/commands/policy-documents/index.ts
|
|
10952
|
-
import
|
|
11156
|
+
import yargs34 from "yargs";
|
|
10953
11157
|
|
|
10954
11158
|
// src/commands/policy-documents/commands/list.ts
|
|
10955
11159
|
var PolicyDocumentsListModule = {
|
|
10956
11160
|
command: "list",
|
|
10957
11161
|
describe: "List policy documents for a project",
|
|
10958
11162
|
aliases: ["ls"],
|
|
10959
|
-
builder: (
|
|
11163
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
10960
11164
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
10961
11165
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
10962
11166
|
const url = new URL(`/api/v1/policy-documents`, apiHost);
|
|
@@ -11041,12 +11245,12 @@ var selectDisplayName13 = (policyDoc) => `Policy document for role ${policyDoc.r
|
|
|
11041
11245
|
var PolicyDocumentsPullModule = {
|
|
11042
11246
|
command: "pull <directory>",
|
|
11043
11247
|
describe: "Pulls all policy documents to local files in a directory",
|
|
11044
|
-
builder: (
|
|
11248
|
+
builder: (yargs43) => withConfiguration(
|
|
11045
11249
|
withApiOptions(
|
|
11046
11250
|
withDebugOptions(
|
|
11047
11251
|
withProjectOptions(
|
|
11048
11252
|
withDiffOptions(
|
|
11049
|
-
|
|
11253
|
+
yargs43.positional("directory", {
|
|
11050
11254
|
describe: "Directory to save to. Each policy document will be saved as a separate file named by role ID.",
|
|
11051
11255
|
type: "string"
|
|
11052
11256
|
}).option("format", {
|
|
@@ -11179,12 +11383,12 @@ function mergePolicyDocuments(localDocs, remoteDocs, mode) {
|
|
|
11179
11383
|
var PolicyDocumentsPushModule = {
|
|
11180
11384
|
command: "push <directory>",
|
|
11181
11385
|
describe: "Pushes policy documents from local files to Uniform",
|
|
11182
|
-
builder: (
|
|
11386
|
+
builder: (yargs43) => withConfiguration(
|
|
11183
11387
|
withApiOptions(
|
|
11184
11388
|
withDebugOptions(
|
|
11185
11389
|
withProjectOptions(
|
|
11186
11390
|
withDiffOptions(
|
|
11187
|
-
|
|
11391
|
+
yargs43.positional("directory", {
|
|
11188
11392
|
describe: "Directory containing policy document files (one file per role ID).",
|
|
11189
11393
|
type: "string"
|
|
11190
11394
|
}).option("format", {
|
|
@@ -11285,17 +11489,17 @@ var PolicyDocumentsCommand = {
|
|
|
11285
11489
|
command: "policy-documents <command>",
|
|
11286
11490
|
aliases: ["policy", "policies"],
|
|
11287
11491
|
describe: "Uniform Policy Documents commands",
|
|
11288
|
-
builder: (
|
|
11492
|
+
builder: (yargs43) => yargs43.command(PolicyDocumentsListModule).command(PolicyDocumentsPullModule).command(PolicyDocumentsPushModule).demandCommand(),
|
|
11289
11493
|
handler: () => {
|
|
11290
|
-
|
|
11494
|
+
yargs34.showHelp();
|
|
11291
11495
|
}
|
|
11292
11496
|
};
|
|
11293
11497
|
|
|
11294
11498
|
// src/commands/project-map/index.ts
|
|
11295
|
-
import
|
|
11499
|
+
import yargs37 from "yargs";
|
|
11296
11500
|
|
|
11297
11501
|
// src/commands/project-map/commands/projectMapDefinition.ts
|
|
11298
|
-
import
|
|
11502
|
+
import yargs35 from "yargs";
|
|
11299
11503
|
|
|
11300
11504
|
// src/commands/project-map/commands/ProjectMapDefinition/_util.ts
|
|
11301
11505
|
import { UncachedProjectMapClient } from "@uniformdev/project-map";
|
|
@@ -11309,11 +11513,11 @@ function getProjectMapClient(options) {
|
|
|
11309
11513
|
var ProjectMapDefinitionGetModule = {
|
|
11310
11514
|
command: "get <id>",
|
|
11311
11515
|
describe: "Fetch a project map",
|
|
11312
|
-
builder: (
|
|
11516
|
+
builder: (yargs43) => withFormatOptions(
|
|
11313
11517
|
withConfiguration(
|
|
11314
11518
|
withApiOptions(
|
|
11315
11519
|
withProjectOptions(
|
|
11316
|
-
|
|
11520
|
+
yargs43.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
|
|
11317
11521
|
)
|
|
11318
11522
|
)
|
|
11319
11523
|
)
|
|
@@ -11336,7 +11540,7 @@ var ProjectMapDefinitionListModule = {
|
|
|
11336
11540
|
command: "list",
|
|
11337
11541
|
describe: "List of project maps",
|
|
11338
11542
|
aliases: ["ls"],
|
|
11339
|
-
builder: (
|
|
11543
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
11340
11544
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
11341
11545
|
const fetch2 = nodeFetchProxy(proxy);
|
|
11342
11546
|
const client = getProjectMapClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -11390,12 +11594,12 @@ function createProjectMapDefinitionEngineDataSource({
|
|
|
11390
11594
|
var ProjectMapDefinitionPullModule = {
|
|
11391
11595
|
command: "pull <directory>",
|
|
11392
11596
|
describe: "Pulls all project maps to local files in a directory",
|
|
11393
|
-
builder: (
|
|
11597
|
+
builder: (yargs43) => withConfiguration(
|
|
11394
11598
|
withDebugOptions(
|
|
11395
11599
|
withApiOptions(
|
|
11396
11600
|
withProjectOptions(
|
|
11397
11601
|
withDiffOptions(
|
|
11398
|
-
|
|
11602
|
+
yargs43.positional("directory", {
|
|
11399
11603
|
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.",
|
|
11400
11604
|
type: "string"
|
|
11401
11605
|
}).option("format", {
|
|
@@ -11470,12 +11674,12 @@ var ProjectMapDefinitionPullModule = {
|
|
|
11470
11674
|
var ProjectMapDefinitionPushModule = {
|
|
11471
11675
|
command: "push <directory>",
|
|
11472
11676
|
describe: "Pushes all project maps from files in a directory or package to Uniform",
|
|
11473
|
-
builder: (
|
|
11677
|
+
builder: (yargs43) => withConfiguration(
|
|
11474
11678
|
withDebugOptions(
|
|
11475
11679
|
withApiOptions(
|
|
11476
11680
|
withProjectOptions(
|
|
11477
11681
|
withDiffOptions(
|
|
11478
|
-
|
|
11682
|
+
yargs43.positional("directory", {
|
|
11479
11683
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
11480
11684
|
type: "string"
|
|
11481
11685
|
}).option("mode", {
|
|
@@ -11539,9 +11743,9 @@ var ProjectMapDefinitionRemoveModule = {
|
|
|
11539
11743
|
command: "remove <id>",
|
|
11540
11744
|
aliases: ["delete", "rm"],
|
|
11541
11745
|
describe: "Delete a project map",
|
|
11542
|
-
builder: (
|
|
11746
|
+
builder: (yargs43) => withConfiguration(
|
|
11543
11747
|
withApiOptions(
|
|
11544
|
-
withProjectOptions(
|
|
11748
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
11545
11749
|
)
|
|
11546
11750
|
),
|
|
11547
11751
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -11556,10 +11760,10 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
11556
11760
|
command: "update <filename>",
|
|
11557
11761
|
aliases: ["put"],
|
|
11558
11762
|
describe: "Insert or update a project map",
|
|
11559
|
-
builder: (
|
|
11763
|
+
builder: (yargs43) => withConfiguration(
|
|
11560
11764
|
withApiOptions(
|
|
11561
11765
|
withProjectOptions(
|
|
11562
|
-
|
|
11766
|
+
yargs43.positional("filename", { demandOption: true, describe: "Project map file to put" })
|
|
11563
11767
|
)
|
|
11564
11768
|
)
|
|
11565
11769
|
),
|
|
@@ -11575,24 +11779,24 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
11575
11779
|
var ProjectMapDefinitionModule = {
|
|
11576
11780
|
command: "definition <command>",
|
|
11577
11781
|
describe: "Commands for ProjectMap Definitions",
|
|
11578
|
-
builder: (
|
|
11782
|
+
builder: (yargs43) => yargs43.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
|
|
11579
11783
|
handler: () => {
|
|
11580
|
-
|
|
11784
|
+
yargs35.help();
|
|
11581
11785
|
}
|
|
11582
11786
|
};
|
|
11583
11787
|
|
|
11584
11788
|
// src/commands/project-map/commands/projectMapNode.ts
|
|
11585
|
-
import
|
|
11789
|
+
import yargs36 from "yargs";
|
|
11586
11790
|
|
|
11587
11791
|
// src/commands/project-map/commands/ProjectMapNode/get.ts
|
|
11588
11792
|
var ProjectMapNodeGetModule = {
|
|
11589
11793
|
command: "get <id> <projectMapId>",
|
|
11590
11794
|
describe: "Fetch a project map node",
|
|
11591
|
-
builder: (
|
|
11795
|
+
builder: (yargs43) => withConfiguration(
|
|
11592
11796
|
withFormatOptions(
|
|
11593
11797
|
withApiOptions(
|
|
11594
11798
|
withProjectOptions(
|
|
11595
|
-
|
|
11799
|
+
yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
|
|
11596
11800
|
)
|
|
11597
11801
|
)
|
|
11598
11802
|
)
|
|
@@ -11616,12 +11820,12 @@ var ProjectMapNodeListModule = {
|
|
|
11616
11820
|
command: "list <projectMapId>",
|
|
11617
11821
|
describe: "List project map nodes",
|
|
11618
11822
|
aliases: ["ls"],
|
|
11619
|
-
builder: (
|
|
11823
|
+
builder: (yargs43) => withConfiguration(
|
|
11620
11824
|
withFormatOptions(
|
|
11621
11825
|
withApiOptions(
|
|
11622
11826
|
withProjectOptions(
|
|
11623
11827
|
withStateOptions(
|
|
11624
|
-
|
|
11828
|
+
yargs43.positional("projectMapId", {
|
|
11625
11829
|
demandOption: true,
|
|
11626
11830
|
describe: "ProjectMap UUID to fetch from"
|
|
11627
11831
|
})
|
|
@@ -11699,12 +11903,12 @@ function createProjectMapNodeEngineDataSource({
|
|
|
11699
11903
|
var ProjectMapNodePullModule = {
|
|
11700
11904
|
command: "pull <directory>",
|
|
11701
11905
|
describe: "Pulls all project maps nodes to local files in a directory",
|
|
11702
|
-
builder: (
|
|
11906
|
+
builder: (yargs43) => withConfiguration(
|
|
11703
11907
|
withDebugOptions(
|
|
11704
11908
|
withApiOptions(
|
|
11705
11909
|
withProjectOptions(
|
|
11706
11910
|
withDiffOptions(
|
|
11707
|
-
|
|
11911
|
+
yargs43.positional("directory", {
|
|
11708
11912
|
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.",
|
|
11709
11913
|
type: "string"
|
|
11710
11914
|
}).option("format", {
|
|
@@ -11786,12 +11990,12 @@ import {
|
|
|
11786
11990
|
var ProjectMapNodePushModule = {
|
|
11787
11991
|
command: "push <directory>",
|
|
11788
11992
|
describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
|
|
11789
|
-
builder: (
|
|
11993
|
+
builder: (yargs43) => withConfiguration(
|
|
11790
11994
|
withDebugOptions(
|
|
11791
11995
|
withApiOptions(
|
|
11792
11996
|
withProjectOptions(
|
|
11793
11997
|
withDiffOptions(
|
|
11794
|
-
|
|
11998
|
+
yargs43.positional("directory", {
|
|
11795
11999
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
11796
12000
|
type: "string"
|
|
11797
12001
|
}).option("mode", {
|
|
@@ -11893,10 +12097,10 @@ var ProjectMapNodeRemoveModule = {
|
|
|
11893
12097
|
command: "remove <id> <projectMapId>",
|
|
11894
12098
|
aliases: ["delete", "rm"],
|
|
11895
12099
|
describe: "Delete a project map node",
|
|
11896
|
-
builder: (
|
|
12100
|
+
builder: (yargs43) => withConfiguration(
|
|
11897
12101
|
withApiOptions(
|
|
11898
12102
|
withProjectOptions(
|
|
11899
|
-
|
|
12103
|
+
yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
|
|
11900
12104
|
)
|
|
11901
12105
|
)
|
|
11902
12106
|
),
|
|
@@ -11912,10 +12116,10 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11912
12116
|
command: "update <filename> <projectMapId>",
|
|
11913
12117
|
aliases: ["put"],
|
|
11914
12118
|
describe: "Insert or update a project map node",
|
|
11915
|
-
builder: (
|
|
12119
|
+
builder: (yargs43) => withConfiguration(
|
|
11916
12120
|
withApiOptions(
|
|
11917
12121
|
withProjectOptions(
|
|
11918
|
-
|
|
12122
|
+
yargs43.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
|
|
11919
12123
|
)
|
|
11920
12124
|
)
|
|
11921
12125
|
),
|
|
@@ -11931,9 +12135,9 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11931
12135
|
var ProjectMapNodeModule = {
|
|
11932
12136
|
command: "node <command>",
|
|
11933
12137
|
describe: "Commands for ProjectMap Nodes",
|
|
11934
|
-
builder: (
|
|
12138
|
+
builder: (yargs43) => yargs43.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
|
|
11935
12139
|
handler: () => {
|
|
11936
|
-
|
|
12140
|
+
yargs36.help();
|
|
11937
12141
|
}
|
|
11938
12142
|
};
|
|
11939
12143
|
|
|
@@ -11942,17 +12146,17 @@ var ProjectMapCommand = {
|
|
|
11942
12146
|
command: "project-map <command>",
|
|
11943
12147
|
aliases: ["prm"],
|
|
11944
12148
|
describe: "Uniform ProjectMap commands",
|
|
11945
|
-
builder: (
|
|
12149
|
+
builder: (yargs43) => yargs43.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
|
|
11946
12150
|
handler: () => {
|
|
11947
|
-
|
|
12151
|
+
yargs37.showHelp();
|
|
11948
12152
|
}
|
|
11949
12153
|
};
|
|
11950
12154
|
|
|
11951
12155
|
// src/commands/redirect/index.ts
|
|
11952
|
-
import
|
|
12156
|
+
import yargs39 from "yargs";
|
|
11953
12157
|
|
|
11954
12158
|
// src/commands/redirect/commands/redirect.ts
|
|
11955
|
-
import
|
|
12159
|
+
import yargs38 from "yargs";
|
|
11956
12160
|
|
|
11957
12161
|
// src/commands/redirect/commands/RedirectDefinition/_util.ts
|
|
11958
12162
|
import { UncachedRedirectClient } from "@uniformdev/redirect";
|
|
@@ -11977,11 +12181,11 @@ function getRedirectClient(options) {
|
|
|
11977
12181
|
var RedirectDefinitionGetModule = {
|
|
11978
12182
|
command: "get <id>",
|
|
11979
12183
|
describe: "Fetch a redirect",
|
|
11980
|
-
builder: (
|
|
12184
|
+
builder: (yargs43) => withConfiguration(
|
|
11981
12185
|
withFormatOptions(
|
|
11982
12186
|
withApiOptions(
|
|
11983
12187
|
withProjectOptions(
|
|
11984
|
-
|
|
12188
|
+
yargs43.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
|
|
11985
12189
|
)
|
|
11986
12190
|
)
|
|
11987
12191
|
)
|
|
@@ -12004,7 +12208,7 @@ var RedirectDefinitionListModule = {
|
|
|
12004
12208
|
command: "list",
|
|
12005
12209
|
describe: "List of redirects",
|
|
12006
12210
|
aliases: ["ls"],
|
|
12007
|
-
builder: (
|
|
12211
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
12008
12212
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
12009
12213
|
const fetch2 = nodeFetchProxy(proxy);
|
|
12010
12214
|
const client = getRedirectClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -12056,12 +12260,12 @@ function createRedirectDefinitionEngineDataSource({
|
|
|
12056
12260
|
var RedirectDefinitionPullModule = {
|
|
12057
12261
|
command: "pull <directory>",
|
|
12058
12262
|
describe: "Pulls all redirects to local files in a directory",
|
|
12059
|
-
builder: (
|
|
12263
|
+
builder: (yargs43) => withConfiguration(
|
|
12060
12264
|
withDebugOptions(
|
|
12061
12265
|
withApiOptions(
|
|
12062
12266
|
withProjectOptions(
|
|
12063
12267
|
withDiffOptions(
|
|
12064
|
-
|
|
12268
|
+
yargs43.positional("directory", {
|
|
12065
12269
|
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.",
|
|
12066
12270
|
type: "string"
|
|
12067
12271
|
}).option("format", {
|
|
@@ -12137,12 +12341,12 @@ var RedirectDefinitionPullModule = {
|
|
|
12137
12341
|
var RedirectDefinitionPushModule = {
|
|
12138
12342
|
command: "push <directory>",
|
|
12139
12343
|
describe: "Pushes all redirects from files in a directory or package to Uniform",
|
|
12140
|
-
builder: (
|
|
12344
|
+
builder: (yargs43) => withConfiguration(
|
|
12141
12345
|
withDebugOptions(
|
|
12142
12346
|
withApiOptions(
|
|
12143
12347
|
withProjectOptions(
|
|
12144
12348
|
withDiffOptions(
|
|
12145
|
-
|
|
12349
|
+
yargs43.positional("directory", {
|
|
12146
12350
|
describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
|
|
12147
12351
|
type: "string"
|
|
12148
12352
|
}).option("mode", {
|
|
@@ -12206,9 +12410,9 @@ var RedirectDefinitionRemoveModule = {
|
|
|
12206
12410
|
command: "remove <id>",
|
|
12207
12411
|
aliases: ["delete", "rm"],
|
|
12208
12412
|
describe: "Delete a redirect",
|
|
12209
|
-
builder: (
|
|
12413
|
+
builder: (yargs43) => withConfiguration(
|
|
12210
12414
|
withApiOptions(
|
|
12211
|
-
withProjectOptions(
|
|
12415
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
12212
12416
|
)
|
|
12213
12417
|
),
|
|
12214
12418
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -12223,10 +12427,10 @@ var RedirectDefinitionUpdateModule = {
|
|
|
12223
12427
|
command: "update <filename>",
|
|
12224
12428
|
aliases: ["put"],
|
|
12225
12429
|
describe: "Insert or update a redirect",
|
|
12226
|
-
builder: (
|
|
12430
|
+
builder: (yargs43) => withConfiguration(
|
|
12227
12431
|
withApiOptions(
|
|
12228
12432
|
withProjectOptions(
|
|
12229
|
-
|
|
12433
|
+
yargs43.positional("filename", { demandOption: true, describe: "Redirect file to put" })
|
|
12230
12434
|
)
|
|
12231
12435
|
)
|
|
12232
12436
|
),
|
|
@@ -12242,9 +12446,9 @@ var RedirectDefinitionUpdateModule = {
|
|
|
12242
12446
|
var RedirectDefinitionModule = {
|
|
12243
12447
|
command: "definition <command>",
|
|
12244
12448
|
describe: "Commands for Redirect Definitions",
|
|
12245
|
-
builder: (
|
|
12449
|
+
builder: (yargs43) => yargs43.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
|
|
12246
12450
|
handler: () => {
|
|
12247
|
-
|
|
12451
|
+
yargs38.help();
|
|
12248
12452
|
}
|
|
12249
12453
|
};
|
|
12250
12454
|
|
|
@@ -12253,14 +12457,14 @@ var RedirectCommand = {
|
|
|
12253
12457
|
command: "redirect <command>",
|
|
12254
12458
|
aliases: ["red"],
|
|
12255
12459
|
describe: "Uniform Redirect commands",
|
|
12256
|
-
builder: (
|
|
12460
|
+
builder: (yargs43) => yargs43.command(RedirectDefinitionModule).demandCommand(),
|
|
12257
12461
|
handler: () => {
|
|
12258
|
-
|
|
12462
|
+
yargs39.showHelp();
|
|
12259
12463
|
}
|
|
12260
12464
|
};
|
|
12261
12465
|
|
|
12262
12466
|
// src/commands/sync/index.ts
|
|
12263
|
-
import
|
|
12467
|
+
import yargs40 from "yargs";
|
|
12264
12468
|
|
|
12265
12469
|
// src/webhooksClient.ts
|
|
12266
12470
|
import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
|
|
@@ -12454,12 +12658,12 @@ function createWebhookEngineDataSource({
|
|
|
12454
12658
|
var WebhookPullModule = {
|
|
12455
12659
|
command: "pull <directory>",
|
|
12456
12660
|
describe: "Pulls all webhooks to local files in a directory",
|
|
12457
|
-
builder: (
|
|
12661
|
+
builder: (yargs43) => withConfiguration(
|
|
12458
12662
|
withApiOptions(
|
|
12459
12663
|
withDebugOptions(
|
|
12460
12664
|
withProjectOptions(
|
|
12461
12665
|
withDiffOptions(
|
|
12462
|
-
|
|
12666
|
+
yargs43.positional("directory", {
|
|
12463
12667
|
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.",
|
|
12464
12668
|
type: "string"
|
|
12465
12669
|
}).option("format", {
|
|
@@ -12645,11 +12849,12 @@ function numPad(num, spaces = 6) {
|
|
|
12645
12849
|
var SyncPullModule = {
|
|
12646
12850
|
command: "pull",
|
|
12647
12851
|
describe: "Pulls whole project to local files in a directory",
|
|
12648
|
-
builder: (
|
|
12852
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs43))))),
|
|
12649
12853
|
handler: async ({ serialization, ...otherParams }) => {
|
|
12650
12854
|
const config2 = serialization;
|
|
12651
12855
|
const enabledEntities = Object.entries({
|
|
12652
12856
|
locale: LocalePullModule,
|
|
12857
|
+
label: LabelPullModule,
|
|
12653
12858
|
asset: AssetPullModule,
|
|
12654
12859
|
category: CategoryPullModule,
|
|
12655
12860
|
workflow: WorkflowPullModule,
|
|
@@ -12744,12 +12949,12 @@ var getFormat = (entityType, config2) => {
|
|
|
12744
12949
|
var WebhookPushModule = {
|
|
12745
12950
|
command: "push <directory>",
|
|
12746
12951
|
describe: "Pushes all webhooks from files in a directory to Uniform",
|
|
12747
|
-
builder: (
|
|
12952
|
+
builder: (yargs43) => withConfiguration(
|
|
12748
12953
|
withDebugOptions(
|
|
12749
12954
|
withApiOptions(
|
|
12750
12955
|
withProjectOptions(
|
|
12751
12956
|
withDiffOptions(
|
|
12752
|
-
|
|
12957
|
+
yargs43.positional("directory", {
|
|
12753
12958
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
12754
12959
|
type: "string"
|
|
12755
12960
|
}).option("mode", {
|
|
@@ -12813,11 +13018,12 @@ var WebhookPushModule = {
|
|
|
12813
13018
|
var SyncPushModule = {
|
|
12814
13019
|
command: "push",
|
|
12815
13020
|
describe: "Pushes whole project data from files in a directory or package to Uniform",
|
|
12816
|
-
builder: (
|
|
13021
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs43))))),
|
|
12817
13022
|
handler: async ({ serialization, ...otherParams }) => {
|
|
12818
13023
|
const config2 = serialization;
|
|
12819
13024
|
const enabledEntities = Object.entries({
|
|
12820
13025
|
locale: LocalePushModule,
|
|
13026
|
+
label: LabelPushModule,
|
|
12821
13027
|
asset: AssetPushModule,
|
|
12822
13028
|
category: CategoryPushModule,
|
|
12823
13029
|
workflow: WorkflowPushModule,
|
|
@@ -13023,21 +13229,21 @@ var getFormat2 = (entityType, config2) => {
|
|
|
13023
13229
|
var SyncCommand = {
|
|
13024
13230
|
command: "sync <command>",
|
|
13025
13231
|
describe: "Uniform Sync commands",
|
|
13026
|
-
builder: (
|
|
13232
|
+
builder: (yargs43) => yargs43.command(SyncPullModule).command(SyncPushModule).demandCommand(),
|
|
13027
13233
|
handler: () => {
|
|
13028
|
-
|
|
13234
|
+
yargs40.showHelp();
|
|
13029
13235
|
}
|
|
13030
13236
|
};
|
|
13031
13237
|
|
|
13032
13238
|
// src/commands/webhook/index.ts
|
|
13033
|
-
import
|
|
13239
|
+
import yargs41 from "yargs";
|
|
13034
13240
|
var WebhookCommand = {
|
|
13035
13241
|
command: "webhook <command>",
|
|
13036
13242
|
aliases: ["wh"],
|
|
13037
13243
|
describe: "Commands for webhooks",
|
|
13038
|
-
builder: (
|
|
13244
|
+
builder: (yargs43) => yargs43.command(WebhookPullModule).command(WebhookPushModule).demandCommand(),
|
|
13039
13245
|
handler: () => {
|
|
13040
|
-
|
|
13246
|
+
yargs41.help();
|
|
13041
13247
|
}
|
|
13042
13248
|
};
|
|
13043
13249
|
|
|
@@ -13272,7 +13478,7 @@ First found was: v${firstVersion}`;
|
|
|
13272
13478
|
|
|
13273
13479
|
// src/index.ts
|
|
13274
13480
|
dotenv.config();
|
|
13275
|
-
var yarggery =
|
|
13481
|
+
var yarggery = yargs42(hideBin(process.argv));
|
|
13276
13482
|
var useDefaultConfig = !process.argv.includes("--config");
|
|
13277
13483
|
var defaultConfig2 = useDefaultConfig ? loadConfig(null) : {};
|
|
13278
13484
|
yarggery.option("verbose", {
|