@uniformdev/cli 20.51.0 → 20.51.1-alpha.14
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
|
|
@@ -722,7 +722,7 @@ import mitt from "mitt";
|
|
|
722
722
|
|
|
723
723
|
// src/sync/serializedDequal.ts
|
|
724
724
|
var has = Object.prototype.hasOwnProperty;
|
|
725
|
-
var ignoredProperties = /* @__PURE__ */ new Set(["created", "modified", "updated"]);
|
|
725
|
+
var ignoredProperties = /* @__PURE__ */ new Set(["created", "modified", "updated", "createdBy", "modifiedBy", "updatedBy"]);
|
|
726
726
|
function serializedDequal(foo, bar) {
|
|
727
727
|
let ctor, len;
|
|
728
728
|
if (foo === bar) {
|
|
@@ -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,251 @@ 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 normalizeLabelForSync(label) {
|
|
7094
|
+
const { projectId: _projectId, ...labelWithoutProjectId } = label;
|
|
7095
|
+
return labelWithoutProjectId;
|
|
7096
|
+
}
|
|
7097
|
+
function createLabelsEngineDataSource({
|
|
7098
|
+
client
|
|
7099
|
+
}) {
|
|
7100
|
+
async function* getObjects() {
|
|
7101
|
+
const labels = (await client.getLabels()).labels;
|
|
7102
|
+
for await (const label of labels) {
|
|
7103
|
+
const result = {
|
|
7104
|
+
id: label.label.publicId,
|
|
7105
|
+
displayName: `${label.label.displayName} (pid: ${label.label.publicId})`,
|
|
7106
|
+
providerId: label.label.publicId,
|
|
7107
|
+
object: normalizeLabelForSync(label)
|
|
7108
|
+
};
|
|
7109
|
+
yield result;
|
|
7110
|
+
}
|
|
7111
|
+
}
|
|
7112
|
+
return {
|
|
7113
|
+
name: "Uniform API",
|
|
7114
|
+
objects: getObjects(),
|
|
7115
|
+
deleteObject: async (providerId) => {
|
|
7116
|
+
await client.removeLabel({ labelId: providerId });
|
|
7117
|
+
},
|
|
7118
|
+
writeObject: async ({ object: object4 }) => {
|
|
7119
|
+
await client.upsertLabel({ label: object4.label });
|
|
7120
|
+
}
|
|
7121
|
+
};
|
|
7122
|
+
}
|
|
7123
|
+
|
|
7124
|
+
// src/commands/canvas/commands/label/pull.ts
|
|
7125
|
+
var LabelPullModule = {
|
|
7126
|
+
command: "pull <directory>",
|
|
7127
|
+
describe: "Pulls all labels to local files in a directory",
|
|
7128
|
+
builder: (yargs43) => withConfiguration(
|
|
7129
|
+
withDebugOptions(
|
|
7130
|
+
withApiOptions(
|
|
7131
|
+
withProjectOptions(
|
|
7132
|
+
withDiffOptions(
|
|
7133
|
+
yargs43.positional("directory", {
|
|
7134
|
+
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.",
|
|
7135
|
+
type: "string"
|
|
7136
|
+
}).option("format", {
|
|
7137
|
+
alias: ["f"],
|
|
7138
|
+
describe: "Output format",
|
|
7139
|
+
default: "yaml",
|
|
7140
|
+
choices: ["yaml", "json"],
|
|
7141
|
+
type: "string"
|
|
7142
|
+
}).option("mode", {
|
|
7143
|
+
alias: ["m"],
|
|
7144
|
+
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',
|
|
7145
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
7146
|
+
default: "mirror",
|
|
7147
|
+
type: "string"
|
|
7148
|
+
})
|
|
7149
|
+
)
|
|
7150
|
+
)
|
|
7151
|
+
)
|
|
7152
|
+
)
|
|
7153
|
+
),
|
|
7154
|
+
handler: async ({
|
|
7155
|
+
apiHost,
|
|
7156
|
+
apiKey,
|
|
7157
|
+
proxy,
|
|
7158
|
+
directory,
|
|
7159
|
+
format,
|
|
7160
|
+
mode,
|
|
7161
|
+
whatIf,
|
|
7162
|
+
project: projectId,
|
|
7163
|
+
diff: diffMode,
|
|
7164
|
+
allowEmptySource,
|
|
7165
|
+
verbose
|
|
7166
|
+
}) => {
|
|
7167
|
+
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7168
|
+
const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
7169
|
+
const source = createLabelsEngineDataSource({ client });
|
|
7170
|
+
let target;
|
|
7171
|
+
const isPackage = isPathAPackageFile(directory);
|
|
7172
|
+
if (isPackage) {
|
|
7173
|
+
const packageContents = readCanvasPackage(directory, false, verbose);
|
|
7174
|
+
const packageLabels = Array.isArray(packageContents.labels) ? packageContents.labels : [];
|
|
7175
|
+
target = await createArraySyncEngineDataSource({
|
|
7176
|
+
name: `Package file ${directory}`,
|
|
7177
|
+
objects: packageLabels,
|
|
7178
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7179
|
+
selectDisplayName: selectLabelDisplayName,
|
|
7180
|
+
onSyncComplete: async (_, synced) => {
|
|
7181
|
+
packageContents.labels = synced;
|
|
7182
|
+
writeCanvasPackage(directory, packageContents);
|
|
7183
|
+
}
|
|
7184
|
+
});
|
|
7185
|
+
} else {
|
|
7186
|
+
target = await createFileSyncEngineDataSource({
|
|
7187
|
+
directory,
|
|
7188
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7189
|
+
selectDisplayName: selectLabelDisplayName,
|
|
7190
|
+
format,
|
|
7191
|
+
verbose
|
|
7192
|
+
});
|
|
7193
|
+
}
|
|
7194
|
+
await syncEngine({
|
|
7195
|
+
source,
|
|
7196
|
+
target,
|
|
7197
|
+
mode,
|
|
7198
|
+
whatIf,
|
|
7199
|
+
allowEmptySource: allowEmptySource ?? true,
|
|
7200
|
+
log: createSyncEngineConsoleLogger({ diffMode }),
|
|
7201
|
+
onBeforeWriteObject: async (sourceObject) => {
|
|
7202
|
+
delete sourceObject.object.createdBy;
|
|
7203
|
+
delete sourceObject.object.modifiedBy;
|
|
7204
|
+
return sourceObject;
|
|
7205
|
+
}
|
|
7206
|
+
});
|
|
7207
|
+
}
|
|
7208
|
+
};
|
|
7209
|
+
|
|
7210
|
+
// src/commands/canvas/commands/label/push.ts
|
|
7211
|
+
var __INTERNAL_MISSING_PARENT_LABEL_ERROR = "Parent label with public ID";
|
|
7212
|
+
var LabelPushModule = {
|
|
7213
|
+
command: "push <directory>",
|
|
7214
|
+
describe: "Pushes all labels from files in a directory to Uniform",
|
|
7215
|
+
builder: (yargs43) => withConfiguration(
|
|
7216
|
+
withDebugOptions(
|
|
7217
|
+
withApiOptions(
|
|
7218
|
+
withProjectOptions(
|
|
7219
|
+
withDiffOptions(
|
|
7220
|
+
yargs43.positional("directory", {
|
|
7221
|
+
describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
|
|
7222
|
+
type: "string"
|
|
7223
|
+
}).option("mode", {
|
|
7224
|
+
alias: ["m"],
|
|
7225
|
+
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',
|
|
7226
|
+
choices: ["create", "createOrUpdate", "mirror"],
|
|
7227
|
+
default: "mirror",
|
|
7228
|
+
type: "string"
|
|
7229
|
+
})
|
|
7230
|
+
)
|
|
7231
|
+
)
|
|
7232
|
+
)
|
|
7233
|
+
)
|
|
7234
|
+
),
|
|
7235
|
+
handler: async ({
|
|
7236
|
+
apiHost,
|
|
7237
|
+
apiKey,
|
|
7238
|
+
proxy,
|
|
7239
|
+
directory,
|
|
7240
|
+
mode,
|
|
7241
|
+
whatIf,
|
|
7242
|
+
project: projectId,
|
|
7243
|
+
diff: diffMode,
|
|
7244
|
+
allowEmptySource,
|
|
7245
|
+
verbose
|
|
7246
|
+
}) => {
|
|
7247
|
+
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7248
|
+
const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
7249
|
+
let source;
|
|
7250
|
+
const isPackage = isPathAPackageFile(directory);
|
|
7251
|
+
if (isPackage) {
|
|
7252
|
+
const packageContents = readCanvasPackage(directory, true, verbose);
|
|
7253
|
+
const packageLabels = Array.isArray(packageContents.labels) ? packageContents.labels : [];
|
|
7254
|
+
source = await createArraySyncEngineDataSource({
|
|
7255
|
+
name: `Package file ${directory}`,
|
|
7256
|
+
objects: packageLabels,
|
|
7257
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7258
|
+
selectDisplayName: selectLabelDisplayName
|
|
7259
|
+
});
|
|
7260
|
+
} else {
|
|
7261
|
+
source = await createFileSyncEngineDataSource({
|
|
7262
|
+
directory,
|
|
7263
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7264
|
+
selectDisplayName: selectLabelDisplayName,
|
|
7265
|
+
verbose
|
|
7266
|
+
});
|
|
7267
|
+
}
|
|
7268
|
+
const target = createLabelsEngineDataSource({ client });
|
|
7269
|
+
const labelsFailedDueToMissingParent = /* @__PURE__ */ new Set();
|
|
7270
|
+
const attemptSync = async () => {
|
|
7271
|
+
const lastFailedLabelsCount = labelsFailedDueToMissingParent.size;
|
|
7272
|
+
labelsFailedDueToMissingParent.clear();
|
|
7273
|
+
await syncEngine({
|
|
7274
|
+
source,
|
|
7275
|
+
target,
|
|
7276
|
+
mode,
|
|
7277
|
+
whatIf,
|
|
7278
|
+
allowEmptySource,
|
|
7279
|
+
log: createSyncEngineConsoleLogger({ diffMode }),
|
|
7280
|
+
onError: (error, object4) => {
|
|
7281
|
+
if (error.message.includes(__INTERNAL_MISSING_PARENT_LABEL_ERROR)) {
|
|
7282
|
+
labelsFailedDueToMissingParent.add(object4.object);
|
|
7283
|
+
} else {
|
|
7284
|
+
throw error;
|
|
7285
|
+
}
|
|
7286
|
+
}
|
|
7287
|
+
});
|
|
7288
|
+
if (labelsFailedDueToMissingParent.size !== 0) {
|
|
7289
|
+
const newFailedLabelsCount = labelsFailedDueToMissingParent.size;
|
|
7290
|
+
if (newFailedLabelsCount !== lastFailedLabelsCount) {
|
|
7291
|
+
source = await createArraySyncEngineDataSource({
|
|
7292
|
+
name: `Labels re-push from ${directory}`,
|
|
7293
|
+
objects: Array.from(labelsFailedDueToMissingParent),
|
|
7294
|
+
selectIdentifier: selectLabelIdentifier,
|
|
7295
|
+
selectDisplayName: selectLabelDisplayName
|
|
7296
|
+
});
|
|
7297
|
+
await attemptSync();
|
|
7298
|
+
} else {
|
|
7299
|
+
throw new Error("Failed to push labels due to missing parent labels");
|
|
7300
|
+
}
|
|
7301
|
+
}
|
|
7302
|
+
};
|
|
7303
|
+
await attemptSync();
|
|
7304
|
+
}
|
|
7305
|
+
};
|
|
7306
|
+
|
|
7307
|
+
// src/commands/canvas/commands/label.ts
|
|
7308
|
+
var LabelModule = {
|
|
7309
|
+
command: "label <command>",
|
|
7310
|
+
describe: "Commands for label definitions",
|
|
7311
|
+
builder: (yargs43) => yargs43.command(LabelPullModule).command(LabelPushModule),
|
|
7312
|
+
handler: () => {
|
|
7313
|
+
yargs15.help();
|
|
7314
|
+
}
|
|
7315
|
+
};
|
|
7316
|
+
|
|
7317
|
+
// src/commands/canvas/commands/locale.ts
|
|
7318
|
+
import yargs16 from "yargs";
|
|
7319
|
+
|
|
7084
7320
|
// src/commands/canvas/localesEngineDataSource.ts
|
|
7085
7321
|
function createLocaleEngineDataSource({
|
|
7086
7322
|
client
|
|
@@ -7121,12 +7357,12 @@ function getLocaleClient(options) {
|
|
|
7121
7357
|
var LocalePullModule = {
|
|
7122
7358
|
command: "pull <directory>",
|
|
7123
7359
|
describe: "Pulls all locales to local files in a directory",
|
|
7124
|
-
builder: (
|
|
7360
|
+
builder: (yargs43) => withConfiguration(
|
|
7125
7361
|
withDebugOptions(
|
|
7126
7362
|
withApiOptions(
|
|
7127
7363
|
withProjectOptions(
|
|
7128
7364
|
withDiffOptions(
|
|
7129
|
-
|
|
7365
|
+
yargs43.positional("directory", {
|
|
7130
7366
|
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
7367
|
type: "string"
|
|
7132
7368
|
}).option("format", {
|
|
@@ -7206,12 +7442,12 @@ var LocalePullModule = {
|
|
|
7206
7442
|
var LocalePushModule = {
|
|
7207
7443
|
command: "push <directory>",
|
|
7208
7444
|
describe: "Pushes all locales from files in a directory to Uniform",
|
|
7209
|
-
builder: (
|
|
7445
|
+
builder: (yargs43) => withConfiguration(
|
|
7210
7446
|
withDebugOptions(
|
|
7211
7447
|
withApiOptions(
|
|
7212
7448
|
withProjectOptions(
|
|
7213
7449
|
withDiffOptions(
|
|
7214
|
-
|
|
7450
|
+
yargs43.positional("directory", {
|
|
7215
7451
|
describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
|
|
7216
7452
|
type: "string"
|
|
7217
7453
|
}).option("mode", {
|
|
@@ -7279,14 +7515,14 @@ var LocalePushModule = {
|
|
|
7279
7515
|
var LocaleModule = {
|
|
7280
7516
|
command: "locale <command>",
|
|
7281
7517
|
describe: "Commands for locale definitions",
|
|
7282
|
-
builder: (
|
|
7518
|
+
builder: (yargs43) => yargs43.command(LocalePullModule).command(LocalePushModule),
|
|
7283
7519
|
handler: () => {
|
|
7284
|
-
|
|
7520
|
+
yargs16.help();
|
|
7285
7521
|
}
|
|
7286
7522
|
};
|
|
7287
7523
|
|
|
7288
7524
|
// src/commands/canvas/commands/previewUrl.ts
|
|
7289
|
-
import
|
|
7525
|
+
import yargs17 from "yargs";
|
|
7290
7526
|
|
|
7291
7527
|
// src/commands/canvas/commands/previewUrl/_util.ts
|
|
7292
7528
|
import { PreviewClient } from "@uniformdev/canvas";
|
|
@@ -7300,12 +7536,12 @@ function getPreviewClient(options) {
|
|
|
7300
7536
|
var PreviewUrlGetModule = {
|
|
7301
7537
|
command: "get <id>",
|
|
7302
7538
|
describe: "Fetch a preview URL",
|
|
7303
|
-
builder: (
|
|
7539
|
+
builder: (yargs43) => withConfiguration(
|
|
7304
7540
|
withFormatOptions(
|
|
7305
7541
|
withDebugOptions(
|
|
7306
7542
|
withApiOptions(
|
|
7307
7543
|
withProjectOptions(
|
|
7308
|
-
|
|
7544
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
|
|
7309
7545
|
)
|
|
7310
7546
|
)
|
|
7311
7547
|
)
|
|
@@ -7329,8 +7565,8 @@ var PreviewUrlListModule = {
|
|
|
7329
7565
|
command: "list",
|
|
7330
7566
|
describe: "List preview URLs",
|
|
7331
7567
|
aliases: ["ls"],
|
|
7332
|
-
builder: (
|
|
7333
|
-
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(
|
|
7568
|
+
builder: (yargs43) => withConfiguration(
|
|
7569
|
+
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs43.options({})))))
|
|
7334
7570
|
),
|
|
7335
7571
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7336
7572
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7372,12 +7608,12 @@ function createPreviewUrlEngineDataSource({
|
|
|
7372
7608
|
var PreviewUrlPullModule = {
|
|
7373
7609
|
command: "pull <directory>",
|
|
7374
7610
|
describe: "Pulls all preview urls to local files in a directory",
|
|
7375
|
-
builder: (
|
|
7611
|
+
builder: (yargs43) => withConfiguration(
|
|
7376
7612
|
withApiOptions(
|
|
7377
7613
|
withProjectOptions(
|
|
7378
7614
|
withDebugOptions(
|
|
7379
7615
|
withDiffOptions(
|
|
7380
|
-
|
|
7616
|
+
yargs43.positional("directory", {
|
|
7381
7617
|
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
7618
|
type: "string"
|
|
7383
7619
|
}).option("format", {
|
|
@@ -7452,12 +7688,12 @@ var PreviewUrlPullModule = {
|
|
|
7452
7688
|
var PreviewUrlPushModule = {
|
|
7453
7689
|
command: "push <directory>",
|
|
7454
7690
|
describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
|
|
7455
|
-
builder: (
|
|
7691
|
+
builder: (yargs43) => withConfiguration(
|
|
7456
7692
|
withApiOptions(
|
|
7457
7693
|
withProjectOptions(
|
|
7458
7694
|
withDiffOptions(
|
|
7459
7695
|
withDebugOptions(
|
|
7460
|
-
|
|
7696
|
+
yargs43.positional("directory", {
|
|
7461
7697
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7462
7698
|
type: "string"
|
|
7463
7699
|
}).option("mode", {
|
|
@@ -7521,11 +7757,11 @@ var PreviewUrlRemoveModule = {
|
|
|
7521
7757
|
command: "remove <id>",
|
|
7522
7758
|
aliases: ["delete", "rm"],
|
|
7523
7759
|
describe: "Delete a preview URL",
|
|
7524
|
-
builder: (
|
|
7760
|
+
builder: (yargs43) => withConfiguration(
|
|
7525
7761
|
withApiOptions(
|
|
7526
7762
|
withDebugOptions(
|
|
7527
7763
|
withProjectOptions(
|
|
7528
|
-
|
|
7764
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
|
|
7529
7765
|
)
|
|
7530
7766
|
)
|
|
7531
7767
|
)
|
|
@@ -7546,11 +7782,11 @@ var PreviewUrlUpdateModule = {
|
|
|
7546
7782
|
command: "update <filename>",
|
|
7547
7783
|
aliases: ["put"],
|
|
7548
7784
|
describe: "Insert or update a preview URL",
|
|
7549
|
-
builder: (
|
|
7785
|
+
builder: (yargs43) => withConfiguration(
|
|
7550
7786
|
withDebugOptions(
|
|
7551
7787
|
withApiOptions(
|
|
7552
7788
|
withProjectOptions(
|
|
7553
|
-
|
|
7789
|
+
yargs43.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
7554
7790
|
)
|
|
7555
7791
|
)
|
|
7556
7792
|
)
|
|
@@ -7572,25 +7808,25 @@ var PreviewUrlModule = {
|
|
|
7572
7808
|
command: "preview-url <command>",
|
|
7573
7809
|
aliases: ["pu"],
|
|
7574
7810
|
describe: "Commands for Canvas preview urls",
|
|
7575
|
-
builder: (
|
|
7811
|
+
builder: (yargs43) => yargs43.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
|
|
7576
7812
|
handler: () => {
|
|
7577
|
-
|
|
7813
|
+
yargs17.help();
|
|
7578
7814
|
}
|
|
7579
7815
|
};
|
|
7580
7816
|
|
|
7581
7817
|
// src/commands/canvas/commands/previewViewport.ts
|
|
7582
|
-
import
|
|
7818
|
+
import yargs18 from "yargs";
|
|
7583
7819
|
|
|
7584
7820
|
// src/commands/canvas/commands/previewViewport/get.ts
|
|
7585
7821
|
var PreviewViewportGetModule = {
|
|
7586
7822
|
command: "get <id>",
|
|
7587
7823
|
describe: "Fetch a preview viewport",
|
|
7588
|
-
builder: (
|
|
7824
|
+
builder: (yargs43) => withConfiguration(
|
|
7589
7825
|
withFormatOptions(
|
|
7590
7826
|
withDebugOptions(
|
|
7591
7827
|
withApiOptions(
|
|
7592
7828
|
withProjectOptions(
|
|
7593
|
-
|
|
7829
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
|
|
7594
7830
|
)
|
|
7595
7831
|
)
|
|
7596
7832
|
)
|
|
@@ -7614,8 +7850,8 @@ var PreviewViewportListModule = {
|
|
|
7614
7850
|
command: "list",
|
|
7615
7851
|
describe: "List preview viewports",
|
|
7616
7852
|
aliases: ["ls"],
|
|
7617
|
-
builder: (
|
|
7618
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
7853
|
+
builder: (yargs43) => withConfiguration(
|
|
7854
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs43.options({})))))
|
|
7619
7855
|
),
|
|
7620
7856
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7621
7857
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7661,12 +7897,12 @@ function createPreviewViewportEngineDataSource({
|
|
|
7661
7897
|
var PreviewViewportPullModule = {
|
|
7662
7898
|
command: "pull <directory>",
|
|
7663
7899
|
describe: "Pulls all preview viewports to local files in a directory",
|
|
7664
|
-
builder: (
|
|
7900
|
+
builder: (yargs43) => withConfiguration(
|
|
7665
7901
|
withApiOptions(
|
|
7666
7902
|
withProjectOptions(
|
|
7667
7903
|
withDebugOptions(
|
|
7668
7904
|
withDiffOptions(
|
|
7669
|
-
|
|
7905
|
+
yargs43.positional("directory", {
|
|
7670
7906
|
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
7907
|
type: "string"
|
|
7672
7908
|
}).option("format", {
|
|
@@ -7741,12 +7977,12 @@ var PreviewViewportPullModule = {
|
|
|
7741
7977
|
var PreviewViewportPushModule = {
|
|
7742
7978
|
command: "push <directory>",
|
|
7743
7979
|
describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
|
|
7744
|
-
builder: (
|
|
7980
|
+
builder: (yargs43) => withConfiguration(
|
|
7745
7981
|
withApiOptions(
|
|
7746
7982
|
withProjectOptions(
|
|
7747
7983
|
withDiffOptions(
|
|
7748
7984
|
withDebugOptions(
|
|
7749
|
-
|
|
7985
|
+
yargs43.positional("directory", {
|
|
7750
7986
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7751
7987
|
type: "string"
|
|
7752
7988
|
}).option("mode", {
|
|
@@ -7810,11 +8046,11 @@ var PreviewViewportRemoveModule = {
|
|
|
7810
8046
|
command: "remove <id>",
|
|
7811
8047
|
aliases: ["delete", "rm"],
|
|
7812
8048
|
describe: "Delete a preview viewport",
|
|
7813
|
-
builder: (
|
|
8049
|
+
builder: (yargs43) => withConfiguration(
|
|
7814
8050
|
withApiOptions(
|
|
7815
8051
|
withDebugOptions(
|
|
7816
8052
|
withProjectOptions(
|
|
7817
|
-
|
|
8053
|
+
yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
|
|
7818
8054
|
)
|
|
7819
8055
|
)
|
|
7820
8056
|
)
|
|
@@ -7835,11 +8071,11 @@ var PreviewViewportUpdateModule = {
|
|
|
7835
8071
|
command: "update <filename>",
|
|
7836
8072
|
aliases: ["put"],
|
|
7837
8073
|
describe: "Insert or update a preview viewport",
|
|
7838
|
-
builder: (
|
|
8074
|
+
builder: (yargs43) => withConfiguration(
|
|
7839
8075
|
withDebugOptions(
|
|
7840
8076
|
withApiOptions(
|
|
7841
8077
|
withProjectOptions(
|
|
7842
|
-
|
|
8078
|
+
yargs43.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
|
|
7843
8079
|
)
|
|
7844
8080
|
)
|
|
7845
8081
|
)
|
|
@@ -7861,14 +8097,14 @@ var PreviewViewportModule = {
|
|
|
7861
8097
|
command: "preview-viewport <command>",
|
|
7862
8098
|
aliases: ["pv"],
|
|
7863
8099
|
describe: "Commands for Canvas preview viewports",
|
|
7864
|
-
builder: (
|
|
8100
|
+
builder: (yargs43) => yargs43.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
|
|
7865
8101
|
handler: () => {
|
|
7866
|
-
|
|
8102
|
+
yargs18.help();
|
|
7867
8103
|
}
|
|
7868
8104
|
};
|
|
7869
8105
|
|
|
7870
8106
|
// src/commands/canvas/commands/prompts.ts
|
|
7871
|
-
import
|
|
8107
|
+
import yargs19 from "yargs";
|
|
7872
8108
|
|
|
7873
8109
|
// src/commands/canvas/commands/prompts/_util.ts
|
|
7874
8110
|
import { PromptClient } from "@uniformdev/canvas";
|
|
@@ -7880,12 +8116,12 @@ var getPromptClient = (options) => new PromptClient({ ...options, bypassCache: t
|
|
|
7880
8116
|
var PromptGetModule = {
|
|
7881
8117
|
command: "get <id>",
|
|
7882
8118
|
describe: "Get a prompt",
|
|
7883
|
-
builder: (
|
|
8119
|
+
builder: (yargs43) => withConfiguration(
|
|
7884
8120
|
withDebugOptions(
|
|
7885
8121
|
withFormatOptions(
|
|
7886
8122
|
withApiOptions(
|
|
7887
8123
|
withProjectOptions(
|
|
7888
|
-
|
|
8124
|
+
yargs43.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
|
|
7889
8125
|
)
|
|
7890
8126
|
)
|
|
7891
8127
|
)
|
|
@@ -7906,7 +8142,7 @@ var PromptGetModule = {
|
|
|
7906
8142
|
var PromptListModule = {
|
|
7907
8143
|
command: "list",
|
|
7908
8144
|
describe: "List prompts",
|
|
7909
|
-
builder: (
|
|
8145
|
+
builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
|
|
7910
8146
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7911
8147
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7912
8148
|
const client = getPromptClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -7947,13 +8183,13 @@ function createPromptEngineDataSource({
|
|
|
7947
8183
|
var PromptPullModule = {
|
|
7948
8184
|
command: "pull <directory>",
|
|
7949
8185
|
describe: "Pulls all prompts to local files in a directory",
|
|
7950
|
-
builder: (
|
|
8186
|
+
builder: (yargs43) => withConfiguration(
|
|
7951
8187
|
withDebugOptions(
|
|
7952
8188
|
withApiOptions(
|
|
7953
8189
|
withProjectOptions(
|
|
7954
8190
|
withStateOptions(
|
|
7955
8191
|
withDiffOptions(
|
|
7956
|
-
|
|
8192
|
+
yargs43.positional("directory", {
|
|
7957
8193
|
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
8194
|
type: "string"
|
|
7959
8195
|
}).option("format", {
|
|
@@ -8034,12 +8270,12 @@ var PromptPullModule = {
|
|
|
8034
8270
|
var PromptPushModule = {
|
|
8035
8271
|
command: "push <directory>",
|
|
8036
8272
|
describe: "Pushes all prompts from files in a directory to Uniform",
|
|
8037
|
-
builder: (
|
|
8273
|
+
builder: (yargs43) => withConfiguration(
|
|
8038
8274
|
withApiOptions(
|
|
8039
8275
|
withProjectOptions(
|
|
8040
8276
|
withStateOptions(
|
|
8041
8277
|
withDiffOptions(
|
|
8042
|
-
|
|
8278
|
+
yargs43.positional("directory", {
|
|
8043
8279
|
describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
|
|
8044
8280
|
type: "string"
|
|
8045
8281
|
}).option("mode", {
|
|
@@ -8108,10 +8344,10 @@ var PromptRemoveModule = {
|
|
|
8108
8344
|
command: "remove <id>",
|
|
8109
8345
|
aliases: ["delete", "rm"],
|
|
8110
8346
|
describe: "Delete a prompt",
|
|
8111
|
-
builder: (
|
|
8347
|
+
builder: (yargs43) => withConfiguration(
|
|
8112
8348
|
withDebugOptions(
|
|
8113
8349
|
withApiOptions(
|
|
8114
|
-
withProjectOptions(
|
|
8350
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
|
|
8115
8351
|
)
|
|
8116
8352
|
)
|
|
8117
8353
|
),
|
|
@@ -8131,11 +8367,11 @@ var PromptUpdateModule = {
|
|
|
8131
8367
|
command: "update <filename>",
|
|
8132
8368
|
aliases: ["put"],
|
|
8133
8369
|
describe: "Insert or update a prompt",
|
|
8134
|
-
builder: (
|
|
8370
|
+
builder: (yargs43) => withConfiguration(
|
|
8135
8371
|
withDebugOptions(
|
|
8136
8372
|
withApiOptions(
|
|
8137
8373
|
withProjectOptions(
|
|
8138
|
-
|
|
8374
|
+
yargs43.positional("filename", { demandOption: true, describe: "Prompt file to put" })
|
|
8139
8375
|
)
|
|
8140
8376
|
)
|
|
8141
8377
|
)
|
|
@@ -8157,14 +8393,14 @@ var PromptModule = {
|
|
|
8157
8393
|
command: "prompt <command>",
|
|
8158
8394
|
aliases: ["dt"],
|
|
8159
8395
|
describe: "Commands for AI Prompt definitions",
|
|
8160
|
-
builder: (
|
|
8396
|
+
builder: (yargs43) => yargs43.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
|
|
8161
8397
|
handler: () => {
|
|
8162
|
-
|
|
8398
|
+
yargs19.help();
|
|
8163
8399
|
}
|
|
8164
8400
|
};
|
|
8165
8401
|
|
|
8166
8402
|
// src/commands/canvas/commands/workflow.ts
|
|
8167
|
-
import
|
|
8403
|
+
import yargs20 from "yargs";
|
|
8168
8404
|
|
|
8169
8405
|
// src/commands/canvas/commands/workflow/_util.ts
|
|
8170
8406
|
import { WorkflowClient } from "@uniformdev/canvas";
|
|
@@ -8207,12 +8443,12 @@ function createWorkflowEngineDataSource({
|
|
|
8207
8443
|
var WorkflowPullModule = {
|
|
8208
8444
|
command: "pull <directory>",
|
|
8209
8445
|
describe: "Pulls all workflows to local files in a directory",
|
|
8210
|
-
builder: (
|
|
8446
|
+
builder: (yargs43) => withConfiguration(
|
|
8211
8447
|
withApiOptions(
|
|
8212
8448
|
withDebugOptions(
|
|
8213
8449
|
withProjectOptions(
|
|
8214
8450
|
withDiffOptions(
|
|
8215
|
-
|
|
8451
|
+
yargs43.positional("directory", {
|
|
8216
8452
|
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
8453
|
type: "string"
|
|
8218
8454
|
}).option("format", {
|
|
@@ -8287,12 +8523,12 @@ var WorkflowPullModule = {
|
|
|
8287
8523
|
var WorkflowPushModule = {
|
|
8288
8524
|
command: "push <directory>",
|
|
8289
8525
|
describe: "Pushes all workflows from files in a directory to Uniform Canvas",
|
|
8290
|
-
builder: (
|
|
8526
|
+
builder: (yargs43) => withConfiguration(
|
|
8291
8527
|
withDebugOptions(
|
|
8292
8528
|
withApiOptions(
|
|
8293
8529
|
withProjectOptions(
|
|
8294
8530
|
withDiffOptions(
|
|
8295
|
-
|
|
8531
|
+
yargs43.positional("directory", {
|
|
8296
8532
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
8297
8533
|
type: "string"
|
|
8298
8534
|
}).option("mode", {
|
|
@@ -8356,9 +8592,9 @@ var WorkflowModule = {
|
|
|
8356
8592
|
command: "workflow <command>",
|
|
8357
8593
|
aliases: ["wf"],
|
|
8358
8594
|
describe: "Commands for Canvas workflows",
|
|
8359
|
-
builder: (
|
|
8595
|
+
builder: (yargs43) => yargs43.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
|
|
8360
8596
|
handler: () => {
|
|
8361
|
-
|
|
8597
|
+
yargs20.help();
|
|
8362
8598
|
}
|
|
8363
8599
|
};
|
|
8364
8600
|
|
|
@@ -8367,17 +8603,17 @@ var CanvasCommand = {
|
|
|
8367
8603
|
command: "canvas <command>",
|
|
8368
8604
|
aliases: ["cv", "pm", "presentation"],
|
|
8369
8605
|
describe: "Uniform Canvas commands",
|
|
8370
|
-
builder: (
|
|
8606
|
+
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
8607
|
handler: () => {
|
|
8372
|
-
|
|
8608
|
+
yargs21.showHelp();
|
|
8373
8609
|
}
|
|
8374
8610
|
};
|
|
8375
8611
|
|
|
8376
8612
|
// src/commands/context/index.ts
|
|
8377
|
-
import
|
|
8613
|
+
import yargs28 from "yargs";
|
|
8378
8614
|
|
|
8379
8615
|
// src/commands/context/commands/aggregate.ts
|
|
8380
|
-
import
|
|
8616
|
+
import yargs22 from "yargs";
|
|
8381
8617
|
|
|
8382
8618
|
// src/commands/context/commands/aggregate/_util.ts
|
|
8383
8619
|
import { AggregateClient } from "@uniformdev/context/api";
|
|
@@ -8389,11 +8625,11 @@ var getAggregateClient = (options) => new AggregateClient({ ...options, bypassCa
|
|
|
8389
8625
|
var AggregateGetModule = {
|
|
8390
8626
|
command: "get <id>",
|
|
8391
8627
|
describe: "Fetch an aggregate",
|
|
8392
|
-
builder: (
|
|
8628
|
+
builder: (yargs43) => withConfiguration(
|
|
8393
8629
|
withFormatOptions(
|
|
8394
8630
|
withApiOptions(
|
|
8395
8631
|
withProjectOptions(
|
|
8396
|
-
|
|
8632
|
+
yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
|
|
8397
8633
|
)
|
|
8398
8634
|
)
|
|
8399
8635
|
)
|
|
@@ -8416,7 +8652,7 @@ var AggregateListModule = {
|
|
|
8416
8652
|
command: "list",
|
|
8417
8653
|
describe: "List aggregates",
|
|
8418
8654
|
aliases: ["ls"],
|
|
8419
|
-
builder: (
|
|
8655
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
8420
8656
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8421
8657
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8422
8658
|
const client = getAggregateClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8479,12 +8715,12 @@ function writeContextPackage(filename, packageContents) {
|
|
|
8479
8715
|
var AggregatePullModule = {
|
|
8480
8716
|
command: "pull <directory>",
|
|
8481
8717
|
describe: "Pulls all aggregates to local files in a directory",
|
|
8482
|
-
builder: (
|
|
8718
|
+
builder: (yargs43) => withConfiguration(
|
|
8483
8719
|
withApiOptions(
|
|
8484
8720
|
withDebugOptions(
|
|
8485
8721
|
withProjectOptions(
|
|
8486
8722
|
withDiffOptions(
|
|
8487
|
-
|
|
8723
|
+
yargs43.positional("directory", {
|
|
8488
8724
|
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
8725
|
type: "string"
|
|
8490
8726
|
}).option("format", {
|
|
@@ -8559,12 +8795,12 @@ var AggregatePullModule = {
|
|
|
8559
8795
|
var AggregatePushModule = {
|
|
8560
8796
|
command: "push <directory>",
|
|
8561
8797
|
describe: "Pushes all aggregates from files in a directory or package to Uniform",
|
|
8562
|
-
builder: (
|
|
8798
|
+
builder: (yargs43) => withConfiguration(
|
|
8563
8799
|
withApiOptions(
|
|
8564
8800
|
withProjectOptions(
|
|
8565
8801
|
withDiffOptions(
|
|
8566
8802
|
withDebugOptions(
|
|
8567
|
-
|
|
8803
|
+
yargs43.positional("directory", {
|
|
8568
8804
|
describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
|
|
8569
8805
|
type: "string"
|
|
8570
8806
|
}).option("mode", {
|
|
@@ -8629,10 +8865,10 @@ var AggregateRemoveModule = {
|
|
|
8629
8865
|
command: "remove <id>",
|
|
8630
8866
|
aliases: ["delete", "rm"],
|
|
8631
8867
|
describe: "Delete an aggregate",
|
|
8632
|
-
builder: (
|
|
8868
|
+
builder: (yargs43) => withConfiguration(
|
|
8633
8869
|
withApiOptions(
|
|
8634
8870
|
withProjectOptions(
|
|
8635
|
-
|
|
8871
|
+
yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
|
|
8636
8872
|
)
|
|
8637
8873
|
)
|
|
8638
8874
|
),
|
|
@@ -8648,10 +8884,10 @@ var AggregateUpdateModule = {
|
|
|
8648
8884
|
command: "update <filename>",
|
|
8649
8885
|
aliases: ["put"],
|
|
8650
8886
|
describe: "Insert or update an aggregate",
|
|
8651
|
-
builder: (
|
|
8887
|
+
builder: (yargs43) => withConfiguration(
|
|
8652
8888
|
withApiOptions(
|
|
8653
8889
|
withProjectOptions(
|
|
8654
|
-
|
|
8890
|
+
yargs43.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
|
|
8655
8891
|
)
|
|
8656
8892
|
)
|
|
8657
8893
|
),
|
|
@@ -8668,14 +8904,14 @@ var AggregateModule = {
|
|
|
8668
8904
|
command: "aggregate <command>",
|
|
8669
8905
|
aliases: ["agg", "intent", "audience"],
|
|
8670
8906
|
describe: "Commands for Context aggregates (intents, audiences)",
|
|
8671
|
-
builder: (
|
|
8907
|
+
builder: (yargs43) => yargs43.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
|
|
8672
8908
|
handler: () => {
|
|
8673
|
-
|
|
8909
|
+
yargs22.help();
|
|
8674
8910
|
}
|
|
8675
8911
|
};
|
|
8676
8912
|
|
|
8677
8913
|
// src/commands/context/commands/enrichment.ts
|
|
8678
|
-
import
|
|
8914
|
+
import yargs23 from "yargs";
|
|
8679
8915
|
|
|
8680
8916
|
// src/commands/context/commands/enrichment/_util.ts
|
|
8681
8917
|
import { UncachedEnrichmentClient } from "@uniformdev/context/api";
|
|
@@ -8689,11 +8925,11 @@ function getEnrichmentClient(options) {
|
|
|
8689
8925
|
var EnrichmentGetModule = {
|
|
8690
8926
|
command: "get <id>",
|
|
8691
8927
|
describe: "Fetch an enrichment category and its values",
|
|
8692
|
-
builder: (
|
|
8928
|
+
builder: (yargs43) => withFormatOptions(
|
|
8693
8929
|
withConfiguration(
|
|
8694
8930
|
withApiOptions(
|
|
8695
8931
|
withProjectOptions(
|
|
8696
|
-
|
|
8932
|
+
yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
|
|
8697
8933
|
)
|
|
8698
8934
|
)
|
|
8699
8935
|
)
|
|
@@ -8716,7 +8952,7 @@ var EnrichmentListModule = {
|
|
|
8716
8952
|
command: "list",
|
|
8717
8953
|
describe: "List enrichments",
|
|
8718
8954
|
aliases: ["ls"],
|
|
8719
|
-
builder: (
|
|
8955
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
8720
8956
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8721
8957
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8722
8958
|
const client = getEnrichmentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8811,12 +9047,12 @@ var createEnrichmentValueEngineDataSource = ({
|
|
|
8811
9047
|
var EnrichmentPullModule = {
|
|
8812
9048
|
command: "pull <directory>",
|
|
8813
9049
|
describe: "Pulls all enrichments to local files in a directory",
|
|
8814
|
-
builder: (
|
|
9050
|
+
builder: (yargs43) => withConfiguration(
|
|
8815
9051
|
withDebugOptions(
|
|
8816
9052
|
withApiOptions(
|
|
8817
9053
|
withProjectOptions(
|
|
8818
9054
|
withDiffOptions(
|
|
8819
|
-
|
|
9055
|
+
yargs43.positional("directory", {
|
|
8820
9056
|
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
9057
|
type: "string"
|
|
8822
9058
|
}).option("format", {
|
|
@@ -8891,11 +9127,11 @@ var EnrichmentPullModule = {
|
|
|
8891
9127
|
var EnrichmentPushModule = {
|
|
8892
9128
|
command: "push <directory>",
|
|
8893
9129
|
describe: "Pushes all enrichments from files in a directory or package to Uniform",
|
|
8894
|
-
builder: (
|
|
9130
|
+
builder: (yargs43) => withConfiguration(
|
|
8895
9131
|
withApiOptions(
|
|
8896
9132
|
withProjectOptions(
|
|
8897
9133
|
withDiffOptions(
|
|
8898
|
-
|
|
9134
|
+
yargs43.positional("directory", {
|
|
8899
9135
|
describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
|
|
8900
9136
|
type: "string"
|
|
8901
9137
|
}).option("mode", {
|
|
@@ -8958,10 +9194,10 @@ var EnrichmentRemoveModule = {
|
|
|
8958
9194
|
command: "remove <id>",
|
|
8959
9195
|
aliases: ["delete", "rm"],
|
|
8960
9196
|
describe: "Delete an enrichment category and its values",
|
|
8961
|
-
builder: (
|
|
9197
|
+
builder: (yargs43) => withConfiguration(
|
|
8962
9198
|
withApiOptions(
|
|
8963
9199
|
withProjectOptions(
|
|
8964
|
-
|
|
9200
|
+
yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
|
|
8965
9201
|
)
|
|
8966
9202
|
)
|
|
8967
9203
|
),
|
|
@@ -8977,14 +9213,14 @@ var EnrichmentModule = {
|
|
|
8977
9213
|
command: "enrichment <command>",
|
|
8978
9214
|
aliases: ["enr"],
|
|
8979
9215
|
describe: "Commands for Context enrichments",
|
|
8980
|
-
builder: (
|
|
9216
|
+
builder: (yargs43) => yargs43.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
|
|
8981
9217
|
handler: () => {
|
|
8982
|
-
|
|
9218
|
+
yargs23.help();
|
|
8983
9219
|
}
|
|
8984
9220
|
};
|
|
8985
9221
|
|
|
8986
9222
|
// src/commands/context/commands/manifest.ts
|
|
8987
|
-
import
|
|
9223
|
+
import yargs24 from "yargs";
|
|
8988
9224
|
|
|
8989
9225
|
// src/commands/context/commands/manifest/get.ts
|
|
8990
9226
|
import { ApiClientError as ApiClientError5, UncachedManifestClient } from "@uniformdev/context/api";
|
|
@@ -8995,10 +9231,10 @@ var ManifestGetModule = {
|
|
|
8995
9231
|
command: "get [output]",
|
|
8996
9232
|
aliases: ["dl", "download"],
|
|
8997
9233
|
describe: "Download the Uniform Context manifest for a project",
|
|
8998
|
-
builder: (
|
|
9234
|
+
builder: (yargs43) => withConfiguration(
|
|
8999
9235
|
withApiOptions(
|
|
9000
9236
|
withProjectOptions(
|
|
9001
|
-
|
|
9237
|
+
yargs43.option("preview", {
|
|
9002
9238
|
describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
|
|
9003
9239
|
default: false,
|
|
9004
9240
|
type: "boolean",
|
|
@@ -9060,7 +9296,7 @@ import { exit as exit2 } from "process";
|
|
|
9060
9296
|
var ManifestPublishModule = {
|
|
9061
9297
|
command: "publish",
|
|
9062
9298
|
describe: "Publish the Uniform Context manifest for a project",
|
|
9063
|
-
builder: (
|
|
9299
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(yargs43))),
|
|
9064
9300
|
handler: async ({ apiKey, apiHost, proxy, project }) => {
|
|
9065
9301
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9066
9302
|
try {
|
|
@@ -9093,25 +9329,25 @@ var ManifestModule = {
|
|
|
9093
9329
|
command: "manifest <command>",
|
|
9094
9330
|
describe: "Commands for context manifests",
|
|
9095
9331
|
aliases: ["man"],
|
|
9096
|
-
builder: (
|
|
9332
|
+
builder: (yargs43) => yargs43.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
|
|
9097
9333
|
handler: () => {
|
|
9098
|
-
|
|
9334
|
+
yargs24.help();
|
|
9099
9335
|
}
|
|
9100
9336
|
};
|
|
9101
9337
|
|
|
9102
9338
|
// src/commands/context/commands/quirk.ts
|
|
9103
|
-
import
|
|
9339
|
+
import yargs25 from "yargs";
|
|
9104
9340
|
|
|
9105
9341
|
// src/commands/context/commands/quirk/get.ts
|
|
9106
9342
|
import { UncachedQuirkClient } from "@uniformdev/context/api";
|
|
9107
9343
|
var QuirkGetModule = {
|
|
9108
9344
|
command: "get <id>",
|
|
9109
9345
|
describe: "Fetch a quirk",
|
|
9110
|
-
builder: (
|
|
9346
|
+
builder: (yargs43) => withConfiguration(
|
|
9111
9347
|
withFormatOptions(
|
|
9112
9348
|
withApiOptions(
|
|
9113
9349
|
withProjectOptions(
|
|
9114
|
-
|
|
9350
|
+
yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
|
|
9115
9351
|
)
|
|
9116
9352
|
)
|
|
9117
9353
|
)
|
|
@@ -9135,11 +9371,11 @@ var QuirkListModule = {
|
|
|
9135
9371
|
command: "list",
|
|
9136
9372
|
describe: "List quirks",
|
|
9137
9373
|
aliases: ["ls"],
|
|
9138
|
-
builder: (
|
|
9374
|
+
builder: (yargs43) => withConfiguration(
|
|
9139
9375
|
withFormatOptions(
|
|
9140
9376
|
withApiOptions(
|
|
9141
9377
|
withProjectOptions(
|
|
9142
|
-
|
|
9378
|
+
yargs43.option("withIntegrations", {
|
|
9143
9379
|
alias: ["i"],
|
|
9144
9380
|
describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
|
|
9145
9381
|
type: "boolean"
|
|
@@ -9197,12 +9433,12 @@ function createQuirkEngineDataSource({
|
|
|
9197
9433
|
var QuirkPullModule = {
|
|
9198
9434
|
command: "pull <directory>",
|
|
9199
9435
|
describe: "Pulls all quirks to local files in a directory",
|
|
9200
|
-
builder: (
|
|
9436
|
+
builder: (yargs43) => withConfiguration(
|
|
9201
9437
|
withDebugOptions(
|
|
9202
9438
|
withApiOptions(
|
|
9203
9439
|
withProjectOptions(
|
|
9204
9440
|
withDiffOptions(
|
|
9205
|
-
|
|
9441
|
+
yargs43.positional("directory", {
|
|
9206
9442
|
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
9443
|
type: "string"
|
|
9208
9444
|
}).option("format", {
|
|
@@ -9278,12 +9514,12 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
|
|
|
9278
9514
|
var QuirkPushModule = {
|
|
9279
9515
|
command: "push <directory>",
|
|
9280
9516
|
describe: "Pushes all quirks from files in a directory or package to Uniform",
|
|
9281
|
-
builder: (
|
|
9517
|
+
builder: (yargs43) => withConfiguration(
|
|
9282
9518
|
withDebugOptions(
|
|
9283
9519
|
withApiOptions(
|
|
9284
9520
|
withProjectOptions(
|
|
9285
9521
|
withDiffOptions(
|
|
9286
|
-
|
|
9522
|
+
yargs43.positional("directory", {
|
|
9287
9523
|
describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
|
|
9288
9524
|
type: "string"
|
|
9289
9525
|
}).option("mode", {
|
|
@@ -9348,10 +9584,10 @@ var QuirkRemoveModule = {
|
|
|
9348
9584
|
command: "remove <id>",
|
|
9349
9585
|
aliases: ["delete", "rm"],
|
|
9350
9586
|
describe: "Delete a quirk",
|
|
9351
|
-
builder: (
|
|
9587
|
+
builder: (yargs43) => withConfiguration(
|
|
9352
9588
|
withApiOptions(
|
|
9353
9589
|
withProjectOptions(
|
|
9354
|
-
|
|
9590
|
+
yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
|
|
9355
9591
|
)
|
|
9356
9592
|
)
|
|
9357
9593
|
),
|
|
@@ -9368,10 +9604,10 @@ var QuirkUpdateModule = {
|
|
|
9368
9604
|
command: "update <filename>",
|
|
9369
9605
|
aliases: ["put"],
|
|
9370
9606
|
describe: "Insert or update a quirk",
|
|
9371
|
-
builder: (
|
|
9607
|
+
builder: (yargs43) => withConfiguration(
|
|
9372
9608
|
withApiOptions(
|
|
9373
9609
|
withProjectOptions(
|
|
9374
|
-
|
|
9610
|
+
yargs43.positional("filename", { demandOption: true, describe: "Quirk file to put" })
|
|
9375
9611
|
)
|
|
9376
9612
|
)
|
|
9377
9613
|
),
|
|
@@ -9388,25 +9624,25 @@ var QuirkModule = {
|
|
|
9388
9624
|
command: "quirk <command>",
|
|
9389
9625
|
aliases: ["qk"],
|
|
9390
9626
|
describe: "Commands for Context quirks",
|
|
9391
|
-
builder: (
|
|
9627
|
+
builder: (yargs43) => yargs43.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
|
|
9392
9628
|
handler: () => {
|
|
9393
|
-
|
|
9629
|
+
yargs25.help();
|
|
9394
9630
|
}
|
|
9395
9631
|
};
|
|
9396
9632
|
|
|
9397
9633
|
// src/commands/context/commands/signal.ts
|
|
9398
|
-
import
|
|
9634
|
+
import yargs26 from "yargs";
|
|
9399
9635
|
|
|
9400
9636
|
// src/commands/context/commands/signal/get.ts
|
|
9401
9637
|
import { UncachedSignalClient } from "@uniformdev/context/api";
|
|
9402
9638
|
var SignalGetModule = {
|
|
9403
9639
|
command: "get <id>",
|
|
9404
9640
|
describe: "Fetch a signal",
|
|
9405
|
-
builder: (
|
|
9641
|
+
builder: (yargs43) => withConfiguration(
|
|
9406
9642
|
withFormatOptions(
|
|
9407
9643
|
withApiOptions(
|
|
9408
9644
|
withProjectOptions(
|
|
9409
|
-
|
|
9645
|
+
yargs43.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
|
|
9410
9646
|
)
|
|
9411
9647
|
)
|
|
9412
9648
|
)
|
|
@@ -9430,7 +9666,7 @@ var SignalListModule = {
|
|
|
9430
9666
|
command: "list",
|
|
9431
9667
|
describe: "List signals",
|
|
9432
9668
|
aliases: ["ls"],
|
|
9433
|
-
builder: (
|
|
9669
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
9434
9670
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9435
9671
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9436
9672
|
const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9480,12 +9716,12 @@ function createSignalEngineDataSource({
|
|
|
9480
9716
|
var SignalPullModule = {
|
|
9481
9717
|
command: "pull <directory>",
|
|
9482
9718
|
describe: "Pulls all signals to local files in a directory",
|
|
9483
|
-
builder: (
|
|
9719
|
+
builder: (yargs43) => withConfiguration(
|
|
9484
9720
|
withDebugOptions(
|
|
9485
9721
|
withApiOptions(
|
|
9486
9722
|
withProjectOptions(
|
|
9487
9723
|
withDiffOptions(
|
|
9488
|
-
|
|
9724
|
+
yargs43.positional("directory", {
|
|
9489
9725
|
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
9726
|
type: "string"
|
|
9491
9727
|
}).option("format", {
|
|
@@ -9561,12 +9797,12 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
|
|
|
9561
9797
|
var SignalPushModule = {
|
|
9562
9798
|
command: "push <directory>",
|
|
9563
9799
|
describe: "Pushes all signals from files in a directory or package to Uniform",
|
|
9564
|
-
builder: (
|
|
9800
|
+
builder: (yargs43) => withConfiguration(
|
|
9565
9801
|
withDebugOptions(
|
|
9566
9802
|
withApiOptions(
|
|
9567
9803
|
withProjectOptions(
|
|
9568
9804
|
withDiffOptions(
|
|
9569
|
-
|
|
9805
|
+
yargs43.positional("directory", {
|
|
9570
9806
|
describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
|
|
9571
9807
|
type: "string"
|
|
9572
9808
|
}).option("mode", {
|
|
@@ -9631,10 +9867,10 @@ var SignalRemoveModule = {
|
|
|
9631
9867
|
command: "remove <id>",
|
|
9632
9868
|
aliases: ["delete", "rm"],
|
|
9633
9869
|
describe: "Delete a signal",
|
|
9634
|
-
builder: (
|
|
9870
|
+
builder: (yargs43) => withConfiguration(
|
|
9635
9871
|
withApiOptions(
|
|
9636
9872
|
withProjectOptions(
|
|
9637
|
-
|
|
9873
|
+
yargs43.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
|
|
9638
9874
|
)
|
|
9639
9875
|
)
|
|
9640
9876
|
),
|
|
@@ -9651,10 +9887,10 @@ var SignalUpdateModule = {
|
|
|
9651
9887
|
command: "update <filename>",
|
|
9652
9888
|
aliases: ["put"],
|
|
9653
9889
|
describe: "Insert or update a signal",
|
|
9654
|
-
builder: (
|
|
9890
|
+
builder: (yargs43) => withConfiguration(
|
|
9655
9891
|
withApiOptions(
|
|
9656
9892
|
withProjectOptions(
|
|
9657
|
-
|
|
9893
|
+
yargs43.positional("filename", { demandOption: true, describe: "Signal file to put" })
|
|
9658
9894
|
)
|
|
9659
9895
|
)
|
|
9660
9896
|
),
|
|
@@ -9671,25 +9907,25 @@ var SignalModule = {
|
|
|
9671
9907
|
command: "signal <command>",
|
|
9672
9908
|
aliases: ["sig"],
|
|
9673
9909
|
describe: "Commands for Context signals",
|
|
9674
|
-
builder: (
|
|
9910
|
+
builder: (yargs43) => yargs43.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
|
|
9675
9911
|
handler: () => {
|
|
9676
|
-
|
|
9912
|
+
yargs26.help();
|
|
9677
9913
|
}
|
|
9678
9914
|
};
|
|
9679
9915
|
|
|
9680
9916
|
// src/commands/context/commands/test.ts
|
|
9681
|
-
import
|
|
9917
|
+
import yargs27 from "yargs";
|
|
9682
9918
|
|
|
9683
9919
|
// src/commands/context/commands/test/get.ts
|
|
9684
9920
|
import { UncachedTestClient } from "@uniformdev/context/api";
|
|
9685
9921
|
var TestGetModule = {
|
|
9686
9922
|
command: "get <id>",
|
|
9687
9923
|
describe: "Fetch a test",
|
|
9688
|
-
builder: (
|
|
9924
|
+
builder: (yargs43) => withConfiguration(
|
|
9689
9925
|
withFormatOptions(
|
|
9690
9926
|
withApiOptions(
|
|
9691
9927
|
withProjectOptions(
|
|
9692
|
-
|
|
9928
|
+
yargs43.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
|
|
9693
9929
|
)
|
|
9694
9930
|
)
|
|
9695
9931
|
)
|
|
@@ -9713,7 +9949,7 @@ var TestListModule = {
|
|
|
9713
9949
|
command: "list",
|
|
9714
9950
|
describe: "List tests",
|
|
9715
9951
|
aliases: ["ls"],
|
|
9716
|
-
builder: (
|
|
9952
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
9717
9953
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9718
9954
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9719
9955
|
const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9763,12 +9999,12 @@ function createTestEngineDataSource({
|
|
|
9763
9999
|
var TestPullModule = {
|
|
9764
10000
|
command: "pull <directory>",
|
|
9765
10001
|
describe: "Pulls all tests to local files in a directory",
|
|
9766
|
-
builder: (
|
|
10002
|
+
builder: (yargs43) => withConfiguration(
|
|
9767
10003
|
withDebugOptions(
|
|
9768
10004
|
withApiOptions(
|
|
9769
10005
|
withProjectOptions(
|
|
9770
10006
|
withDiffOptions(
|
|
9771
|
-
|
|
10007
|
+
yargs43.positional("directory", {
|
|
9772
10008
|
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
10009
|
type: "string"
|
|
9774
10010
|
}).option("format", {
|
|
@@ -9844,12 +10080,12 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
|
|
|
9844
10080
|
var TestPushModule = {
|
|
9845
10081
|
command: "push <directory>",
|
|
9846
10082
|
describe: "Pushes all tests from files in a directory or package to Uniform",
|
|
9847
|
-
builder: (
|
|
10083
|
+
builder: (yargs43) => withConfiguration(
|
|
9848
10084
|
withDebugOptions(
|
|
9849
10085
|
withApiOptions(
|
|
9850
10086
|
withProjectOptions(
|
|
9851
10087
|
withDiffOptions(
|
|
9852
|
-
|
|
10088
|
+
yargs43.positional("directory", {
|
|
9853
10089
|
describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
|
|
9854
10090
|
type: "string"
|
|
9855
10091
|
}).option("mode", {
|
|
@@ -9914,10 +10150,10 @@ var TestRemoveModule = {
|
|
|
9914
10150
|
command: "remove <id>",
|
|
9915
10151
|
aliases: ["delete", "rm"],
|
|
9916
10152
|
describe: "Delete a test",
|
|
9917
|
-
builder: (
|
|
10153
|
+
builder: (yargs43) => withConfiguration(
|
|
9918
10154
|
withApiOptions(
|
|
9919
10155
|
withProjectOptions(
|
|
9920
|
-
|
|
10156
|
+
yargs43.positional("id", { demandOption: true, describe: "Test public ID to delete" })
|
|
9921
10157
|
)
|
|
9922
10158
|
)
|
|
9923
10159
|
),
|
|
@@ -9934,9 +10170,9 @@ var TestUpdateModule = {
|
|
|
9934
10170
|
command: "update <filename>",
|
|
9935
10171
|
aliases: ["put"],
|
|
9936
10172
|
describe: "Insert or update a test",
|
|
9937
|
-
builder: (
|
|
10173
|
+
builder: (yargs43) => withConfiguration(
|
|
9938
10174
|
withApiOptions(
|
|
9939
|
-
withProjectOptions(
|
|
10175
|
+
withProjectOptions(yargs43.positional("filename", { demandOption: true, describe: "Test file to put" }))
|
|
9940
10176
|
)
|
|
9941
10177
|
),
|
|
9942
10178
|
handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
|
|
@@ -9951,9 +10187,9 @@ var TestUpdateModule = {
|
|
|
9951
10187
|
var TestModule = {
|
|
9952
10188
|
command: "test <command>",
|
|
9953
10189
|
describe: "Commands for Context A/B tests",
|
|
9954
|
-
builder: (
|
|
10190
|
+
builder: (yargs43) => yargs43.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
|
|
9955
10191
|
handler: () => {
|
|
9956
|
-
|
|
10192
|
+
yargs27.help();
|
|
9957
10193
|
}
|
|
9958
10194
|
};
|
|
9959
10195
|
|
|
@@ -9962,20 +10198,20 @@ var ContextCommand = {
|
|
|
9962
10198
|
command: "context <command>",
|
|
9963
10199
|
aliases: ["ctx"],
|
|
9964
10200
|
describe: "Uniform Context commands",
|
|
9965
|
-
builder: (
|
|
10201
|
+
builder: (yargs43) => yargs43.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
|
|
9966
10202
|
handler: () => {
|
|
9967
|
-
|
|
10203
|
+
yargs28.showHelp();
|
|
9968
10204
|
}
|
|
9969
10205
|
};
|
|
9970
10206
|
|
|
9971
10207
|
// src/commands/integration/index.ts
|
|
9972
|
-
import
|
|
10208
|
+
import yargs33 from "yargs";
|
|
9973
10209
|
|
|
9974
10210
|
// src/commands/integration/commands/definition.ts
|
|
9975
|
-
import
|
|
10211
|
+
import yargs32 from "yargs";
|
|
9976
10212
|
|
|
9977
10213
|
// src/commands/integration/commands/definition/dataResourceEditor/dataResourceEditor.ts
|
|
9978
|
-
import
|
|
10214
|
+
import yargs29 from "yargs";
|
|
9979
10215
|
|
|
9980
10216
|
// src/commands/integration/commands/definition/dataResourceEditor/deploy.ts
|
|
9981
10217
|
import { readFileSync as readFileSync2 } from "fs";
|
|
@@ -10046,8 +10282,8 @@ var EdgehancerClient = class extends ApiClient {
|
|
|
10046
10282
|
};
|
|
10047
10283
|
|
|
10048
10284
|
// src/commands/integration/commands/definition/dataResourceEditor/util.ts
|
|
10049
|
-
function withDataResourceEditorIdOptions(
|
|
10050
|
-
return
|
|
10285
|
+
function withDataResourceEditorIdOptions(yargs43) {
|
|
10286
|
+
return yargs43.option("connectorType", {
|
|
10051
10287
|
describe: "Integration data connector type to attach the data resource editor to, as defined in the integration manifest file.",
|
|
10052
10288
|
demandOption: true,
|
|
10053
10289
|
type: "string"
|
|
@@ -10067,11 +10303,11 @@ function withDataResourceEditorIdOptions(yargs42) {
|
|
|
10067
10303
|
var IntegrationDataResourceEditorDeployModule = {
|
|
10068
10304
|
command: "deploy <filename>",
|
|
10069
10305
|
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: (
|
|
10306
|
+
builder: (yargs43) => withConfiguration(
|
|
10071
10307
|
withApiOptions(
|
|
10072
10308
|
withTeamOptions(
|
|
10073
10309
|
withDataResourceEditorIdOptions(
|
|
10074
|
-
|
|
10310
|
+
yargs43.positional("filename", {
|
|
10075
10311
|
demandOption: true,
|
|
10076
10312
|
describe: "ESM code file to run for the target data resource editor hook. Refer to the documentation for expected types."
|
|
10077
10313
|
}).option("compatibilityDate", {
|
|
@@ -10114,7 +10350,7 @@ var IntegrationDataResourceEditorDeployModule = {
|
|
|
10114
10350
|
var IntegrationDataResourceEditorRemoveModule = {
|
|
10115
10351
|
command: "remove",
|
|
10116
10352
|
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: (
|
|
10353
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withDataResourceEditorIdOptions(yargs43)))),
|
|
10118
10354
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, connectorType, archetype, hook }) => {
|
|
10119
10355
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10120
10356
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -10126,21 +10362,21 @@ var IntegrationDataResourceEditorRemoveModule = {
|
|
|
10126
10362
|
var IntegrationDataResourceEditorModule = {
|
|
10127
10363
|
command: "dataResourceEditor <command>",
|
|
10128
10364
|
describe: "Commands for managing custom AI data resource editors at the team level.",
|
|
10129
|
-
builder: (
|
|
10365
|
+
builder: (yargs43) => yargs43.command(IntegrationDataResourceEditorDeployModule).command(IntegrationDataResourceEditorRemoveModule).demandCommand(),
|
|
10130
10366
|
handler: () => {
|
|
10131
|
-
|
|
10367
|
+
yargs29.help();
|
|
10132
10368
|
}
|
|
10133
10369
|
};
|
|
10134
10370
|
|
|
10135
10371
|
// src/commands/integration/commands/definition/edgehancer/edgehancer.ts
|
|
10136
|
-
import
|
|
10372
|
+
import yargs30 from "yargs";
|
|
10137
10373
|
|
|
10138
10374
|
// src/commands/integration/commands/definition/edgehancer/deploy.ts
|
|
10139
10375
|
import { readFileSync as readFileSync3 } from "fs";
|
|
10140
10376
|
|
|
10141
10377
|
// src/commands/integration/commands/definition/edgehancer/util.ts
|
|
10142
|
-
function withEdgehancerIdOptions(
|
|
10143
|
-
return
|
|
10378
|
+
function withEdgehancerIdOptions(yargs43) {
|
|
10379
|
+
return yargs43.option("connectorType", {
|
|
10144
10380
|
describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
|
|
10145
10381
|
demandOption: true,
|
|
10146
10382
|
type: "string"
|
|
@@ -10160,11 +10396,11 @@ function withEdgehancerIdOptions(yargs42) {
|
|
|
10160
10396
|
var IntegrationEdgehancerDeployModule = {
|
|
10161
10397
|
command: "deploy <filename>",
|
|
10162
10398
|
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: (
|
|
10399
|
+
builder: (yargs43) => withConfiguration(
|
|
10164
10400
|
withApiOptions(
|
|
10165
10401
|
withTeamOptions(
|
|
10166
10402
|
withEdgehancerIdOptions(
|
|
10167
|
-
|
|
10403
|
+
yargs43.positional("filename", {
|
|
10168
10404
|
demandOption: true,
|
|
10169
10405
|
describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
|
|
10170
10406
|
}).option("compatibilityDate", {
|
|
@@ -10207,7 +10443,7 @@ var IntegrationEdgehancerDeployModule = {
|
|
|
10207
10443
|
var IntegrationEdgehancerRemoveModule = {
|
|
10208
10444
|
command: "remove",
|
|
10209
10445
|
describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
|
|
10210
|
-
builder: (
|
|
10446
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs43)))),
|
|
10211
10447
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
|
|
10212
10448
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10213
10449
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -10219,22 +10455,22 @@ var IntegrationEdgehancerRemoveModule = {
|
|
|
10219
10455
|
var IntegrationEdgehancerModule = {
|
|
10220
10456
|
command: "edgehancer <command>",
|
|
10221
10457
|
describe: "Commands for managing custom integration edgehancers at the team level.",
|
|
10222
|
-
builder: (
|
|
10458
|
+
builder: (yargs43) => yargs43.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
|
|
10223
10459
|
handler: () => {
|
|
10224
|
-
|
|
10460
|
+
yargs30.help();
|
|
10225
10461
|
}
|
|
10226
10462
|
};
|
|
10227
10463
|
|
|
10228
10464
|
// src/commands/integration/commands/definition/propertyEditor/propertyEditor.ts
|
|
10229
|
-
import
|
|
10465
|
+
import yargs31 from "yargs";
|
|
10230
10466
|
|
|
10231
10467
|
// src/commands/integration/commands/definition/propertyEditor/deploy.ts
|
|
10232
10468
|
import { IntegrationPropertyEditorsClient } from "@uniformdev/canvas";
|
|
10233
10469
|
import { readFileSync as readFileSync4 } from "fs";
|
|
10234
10470
|
|
|
10235
10471
|
// src/commands/integration/commands/definition/propertyEditor/util.ts
|
|
10236
|
-
function withPropertyEditorIdOptions(
|
|
10237
|
-
return
|
|
10472
|
+
function withPropertyEditorIdOptions(yargs43) {
|
|
10473
|
+
return yargs43.option("propertyType", {
|
|
10238
10474
|
describe: "Property type to attach the editor to.",
|
|
10239
10475
|
demandOption: true,
|
|
10240
10476
|
type: "string"
|
|
@@ -10250,11 +10486,11 @@ function withPropertyEditorIdOptions(yargs42) {
|
|
|
10250
10486
|
var IntegrationPropertyEditorDeployModule = {
|
|
10251
10487
|
command: "deploy <filename>",
|
|
10252
10488
|
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: (
|
|
10489
|
+
builder: (yargs43) => withConfiguration(
|
|
10254
10490
|
withApiOptions(
|
|
10255
10491
|
withTeamOptions(
|
|
10256
10492
|
withPropertyEditorIdOptions(
|
|
10257
|
-
|
|
10493
|
+
yargs43.positional("filename", {
|
|
10258
10494
|
demandOption: true,
|
|
10259
10495
|
describe: "ESM code file to run for the target property editor hook. Refer to the documentation for expected types."
|
|
10260
10496
|
}).option("compatibilityDate", {
|
|
@@ -10297,7 +10533,7 @@ import { IntegrationPropertyEditorsClient as IntegrationPropertyEditorsClient2 }
|
|
|
10297
10533
|
var IntegrationPropertyEditorRemoveModule = {
|
|
10298
10534
|
command: "remove",
|
|
10299
10535
|
describe: "Deletes a custom AI property editor hook from a property type. The API key used must have team admin permissions.",
|
|
10300
|
-
builder: (
|
|
10536
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withPropertyEditorIdOptions(yargs43)))),
|
|
10301
10537
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, propertyType, hook }) => {
|
|
10302
10538
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10303
10539
|
const client = new IntegrationPropertyEditorsClient2({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -10309,9 +10545,9 @@ var IntegrationPropertyEditorRemoveModule = {
|
|
|
10309
10545
|
var IntegrationPropertyEditorModule = {
|
|
10310
10546
|
command: "propertyEditor <command>",
|
|
10311
10547
|
describe: "Commands for managing custom AI property editors at the team level.",
|
|
10312
|
-
builder: (
|
|
10548
|
+
builder: (yargs43) => yargs43.command(IntegrationPropertyEditorDeployModule).command(IntegrationPropertyEditorRemoveModule).demandCommand(),
|
|
10313
10549
|
handler: () => {
|
|
10314
|
-
|
|
10550
|
+
yargs31.help();
|
|
10315
10551
|
}
|
|
10316
10552
|
};
|
|
10317
10553
|
|
|
@@ -10351,10 +10587,10 @@ var DefinitionClient = class extends ApiClient2 {
|
|
|
10351
10587
|
var IntegrationDefinitionRegisterModule = {
|
|
10352
10588
|
command: "register <filename>",
|
|
10353
10589
|
describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
|
|
10354
|
-
builder: (
|
|
10590
|
+
builder: (yargs43) => withConfiguration(
|
|
10355
10591
|
withApiOptions(
|
|
10356
10592
|
withTeamOptions(
|
|
10357
|
-
|
|
10593
|
+
yargs43.positional("filename", {
|
|
10358
10594
|
demandOption: true,
|
|
10359
10595
|
describe: "Integration definition manifest to register"
|
|
10360
10596
|
})
|
|
@@ -10373,10 +10609,10 @@ var IntegrationDefinitionRegisterModule = {
|
|
|
10373
10609
|
var IntegrationDefinitionRemoveModule = {
|
|
10374
10610
|
command: "remove <type>",
|
|
10375
10611
|
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: (
|
|
10612
|
+
builder: (yargs43) => withConfiguration(
|
|
10377
10613
|
withApiOptions(
|
|
10378
10614
|
withTeamOptions(
|
|
10379
|
-
|
|
10615
|
+
yargs43.positional("type", {
|
|
10380
10616
|
demandOption: true,
|
|
10381
10617
|
describe: "Integration type (from its manifest) to remove."
|
|
10382
10618
|
})
|
|
@@ -10394,9 +10630,9 @@ var IntegrationDefinitionRemoveModule = {
|
|
|
10394
10630
|
var IntegrationDefinitionModule = {
|
|
10395
10631
|
command: "definition <command>",
|
|
10396
10632
|
describe: "Commands for managing custom integration definitions at the team level.",
|
|
10397
|
-
builder: (
|
|
10633
|
+
builder: (yargs43) => yargs43.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).command(IntegrationDataResourceEditorModule).command(IntegrationPropertyEditorModule).demandCommand(),
|
|
10398
10634
|
handler: () => {
|
|
10399
|
-
|
|
10635
|
+
yargs32.help();
|
|
10400
10636
|
}
|
|
10401
10637
|
};
|
|
10402
10638
|
|
|
@@ -10436,10 +10672,10 @@ var InstallClient = class extends ApiClient3 {
|
|
|
10436
10672
|
var IntegrationInstallModule = {
|
|
10437
10673
|
command: "install <type>",
|
|
10438
10674
|
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: (
|
|
10675
|
+
builder: (yargs43) => withConfiguration(
|
|
10440
10676
|
withApiOptions(
|
|
10441
10677
|
withProjectOptions(
|
|
10442
|
-
|
|
10678
|
+
yargs43.positional("type", {
|
|
10443
10679
|
demandOption: true,
|
|
10444
10680
|
describe: "Integration type to install (as defined in its manifest)"
|
|
10445
10681
|
}).option("configuration", {
|
|
@@ -10461,10 +10697,10 @@ var IntegrationInstallModule = {
|
|
|
10461
10697
|
var IntegrationUninstallModule = {
|
|
10462
10698
|
command: "uninstall <type>",
|
|
10463
10699
|
describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
|
|
10464
|
-
builder: (
|
|
10700
|
+
builder: (yargs43) => withConfiguration(
|
|
10465
10701
|
withApiOptions(
|
|
10466
10702
|
withProjectOptions(
|
|
10467
|
-
|
|
10703
|
+
yargs43.positional("type", {
|
|
10468
10704
|
demandOption: true,
|
|
10469
10705
|
describe: "Integration type to uninstall (as defined in its manifest)"
|
|
10470
10706
|
})
|
|
@@ -10482,9 +10718,9 @@ var IntegrationUninstallModule = {
|
|
|
10482
10718
|
var IntegrationCommand = {
|
|
10483
10719
|
command: "integration <command>",
|
|
10484
10720
|
describe: "Integration management commands",
|
|
10485
|
-
builder: (
|
|
10721
|
+
builder: (yargs43) => yargs43.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
|
|
10486
10722
|
handler: () => {
|
|
10487
|
-
|
|
10723
|
+
yargs33.showHelp();
|
|
10488
10724
|
}
|
|
10489
10725
|
};
|
|
10490
10726
|
|
|
@@ -10949,14 +11185,14 @@ var NewMeshCmd = {
|
|
|
10949
11185
|
};
|
|
10950
11186
|
|
|
10951
11187
|
// src/commands/policy-documents/index.ts
|
|
10952
|
-
import
|
|
11188
|
+
import yargs34 from "yargs";
|
|
10953
11189
|
|
|
10954
11190
|
// src/commands/policy-documents/commands/list.ts
|
|
10955
11191
|
var PolicyDocumentsListModule = {
|
|
10956
11192
|
command: "list",
|
|
10957
11193
|
describe: "List policy documents for a project",
|
|
10958
11194
|
aliases: ["ls"],
|
|
10959
|
-
builder: (
|
|
11195
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
10960
11196
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
10961
11197
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
10962
11198
|
const url = new URL(`/api/v1/policy-documents`, apiHost);
|
|
@@ -11041,12 +11277,12 @@ var selectDisplayName13 = (policyDoc) => `Policy document for role ${policyDoc.r
|
|
|
11041
11277
|
var PolicyDocumentsPullModule = {
|
|
11042
11278
|
command: "pull <directory>",
|
|
11043
11279
|
describe: "Pulls all policy documents to local files in a directory",
|
|
11044
|
-
builder: (
|
|
11280
|
+
builder: (yargs43) => withConfiguration(
|
|
11045
11281
|
withApiOptions(
|
|
11046
11282
|
withDebugOptions(
|
|
11047
11283
|
withProjectOptions(
|
|
11048
11284
|
withDiffOptions(
|
|
11049
|
-
|
|
11285
|
+
yargs43.positional("directory", {
|
|
11050
11286
|
describe: "Directory to save to. Each policy document will be saved as a separate file named by role ID.",
|
|
11051
11287
|
type: "string"
|
|
11052
11288
|
}).option("format", {
|
|
@@ -11179,12 +11415,12 @@ function mergePolicyDocuments(localDocs, remoteDocs, mode) {
|
|
|
11179
11415
|
var PolicyDocumentsPushModule = {
|
|
11180
11416
|
command: "push <directory>",
|
|
11181
11417
|
describe: "Pushes policy documents from local files to Uniform",
|
|
11182
|
-
builder: (
|
|
11418
|
+
builder: (yargs43) => withConfiguration(
|
|
11183
11419
|
withApiOptions(
|
|
11184
11420
|
withDebugOptions(
|
|
11185
11421
|
withProjectOptions(
|
|
11186
11422
|
withDiffOptions(
|
|
11187
|
-
|
|
11423
|
+
yargs43.positional("directory", {
|
|
11188
11424
|
describe: "Directory containing policy document files (one file per role ID).",
|
|
11189
11425
|
type: "string"
|
|
11190
11426
|
}).option("format", {
|
|
@@ -11285,17 +11521,17 @@ var PolicyDocumentsCommand = {
|
|
|
11285
11521
|
command: "policy-documents <command>",
|
|
11286
11522
|
aliases: ["policy", "policies"],
|
|
11287
11523
|
describe: "Uniform Policy Documents commands",
|
|
11288
|
-
builder: (
|
|
11524
|
+
builder: (yargs43) => yargs43.command(PolicyDocumentsListModule).command(PolicyDocumentsPullModule).command(PolicyDocumentsPushModule).demandCommand(),
|
|
11289
11525
|
handler: () => {
|
|
11290
|
-
|
|
11526
|
+
yargs34.showHelp();
|
|
11291
11527
|
}
|
|
11292
11528
|
};
|
|
11293
11529
|
|
|
11294
11530
|
// src/commands/project-map/index.ts
|
|
11295
|
-
import
|
|
11531
|
+
import yargs37 from "yargs";
|
|
11296
11532
|
|
|
11297
11533
|
// src/commands/project-map/commands/projectMapDefinition.ts
|
|
11298
|
-
import
|
|
11534
|
+
import yargs35 from "yargs";
|
|
11299
11535
|
|
|
11300
11536
|
// src/commands/project-map/commands/ProjectMapDefinition/_util.ts
|
|
11301
11537
|
import { UncachedProjectMapClient } from "@uniformdev/project-map";
|
|
@@ -11309,11 +11545,11 @@ function getProjectMapClient(options) {
|
|
|
11309
11545
|
var ProjectMapDefinitionGetModule = {
|
|
11310
11546
|
command: "get <id>",
|
|
11311
11547
|
describe: "Fetch a project map",
|
|
11312
|
-
builder: (
|
|
11548
|
+
builder: (yargs43) => withFormatOptions(
|
|
11313
11549
|
withConfiguration(
|
|
11314
11550
|
withApiOptions(
|
|
11315
11551
|
withProjectOptions(
|
|
11316
|
-
|
|
11552
|
+
yargs43.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
|
|
11317
11553
|
)
|
|
11318
11554
|
)
|
|
11319
11555
|
)
|
|
@@ -11336,7 +11572,7 @@ var ProjectMapDefinitionListModule = {
|
|
|
11336
11572
|
command: "list",
|
|
11337
11573
|
describe: "List of project maps",
|
|
11338
11574
|
aliases: ["ls"],
|
|
11339
|
-
builder: (
|
|
11575
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
11340
11576
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
11341
11577
|
const fetch2 = nodeFetchProxy(proxy);
|
|
11342
11578
|
const client = getProjectMapClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -11390,12 +11626,12 @@ function createProjectMapDefinitionEngineDataSource({
|
|
|
11390
11626
|
var ProjectMapDefinitionPullModule = {
|
|
11391
11627
|
command: "pull <directory>",
|
|
11392
11628
|
describe: "Pulls all project maps to local files in a directory",
|
|
11393
|
-
builder: (
|
|
11629
|
+
builder: (yargs43) => withConfiguration(
|
|
11394
11630
|
withDebugOptions(
|
|
11395
11631
|
withApiOptions(
|
|
11396
11632
|
withProjectOptions(
|
|
11397
11633
|
withDiffOptions(
|
|
11398
|
-
|
|
11634
|
+
yargs43.positional("directory", {
|
|
11399
11635
|
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
11636
|
type: "string"
|
|
11401
11637
|
}).option("format", {
|
|
@@ -11470,12 +11706,12 @@ var ProjectMapDefinitionPullModule = {
|
|
|
11470
11706
|
var ProjectMapDefinitionPushModule = {
|
|
11471
11707
|
command: "push <directory>",
|
|
11472
11708
|
describe: "Pushes all project maps from files in a directory or package to Uniform",
|
|
11473
|
-
builder: (
|
|
11709
|
+
builder: (yargs43) => withConfiguration(
|
|
11474
11710
|
withDebugOptions(
|
|
11475
11711
|
withApiOptions(
|
|
11476
11712
|
withProjectOptions(
|
|
11477
11713
|
withDiffOptions(
|
|
11478
|
-
|
|
11714
|
+
yargs43.positional("directory", {
|
|
11479
11715
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
11480
11716
|
type: "string"
|
|
11481
11717
|
}).option("mode", {
|
|
@@ -11539,9 +11775,9 @@ var ProjectMapDefinitionRemoveModule = {
|
|
|
11539
11775
|
command: "remove <id>",
|
|
11540
11776
|
aliases: ["delete", "rm"],
|
|
11541
11777
|
describe: "Delete a project map",
|
|
11542
|
-
builder: (
|
|
11778
|
+
builder: (yargs43) => withConfiguration(
|
|
11543
11779
|
withApiOptions(
|
|
11544
|
-
withProjectOptions(
|
|
11780
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
11545
11781
|
)
|
|
11546
11782
|
),
|
|
11547
11783
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -11556,10 +11792,10 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
11556
11792
|
command: "update <filename>",
|
|
11557
11793
|
aliases: ["put"],
|
|
11558
11794
|
describe: "Insert or update a project map",
|
|
11559
|
-
builder: (
|
|
11795
|
+
builder: (yargs43) => withConfiguration(
|
|
11560
11796
|
withApiOptions(
|
|
11561
11797
|
withProjectOptions(
|
|
11562
|
-
|
|
11798
|
+
yargs43.positional("filename", { demandOption: true, describe: "Project map file to put" })
|
|
11563
11799
|
)
|
|
11564
11800
|
)
|
|
11565
11801
|
),
|
|
@@ -11575,24 +11811,24 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
11575
11811
|
var ProjectMapDefinitionModule = {
|
|
11576
11812
|
command: "definition <command>",
|
|
11577
11813
|
describe: "Commands for ProjectMap Definitions",
|
|
11578
|
-
builder: (
|
|
11814
|
+
builder: (yargs43) => yargs43.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
|
|
11579
11815
|
handler: () => {
|
|
11580
|
-
|
|
11816
|
+
yargs35.help();
|
|
11581
11817
|
}
|
|
11582
11818
|
};
|
|
11583
11819
|
|
|
11584
11820
|
// src/commands/project-map/commands/projectMapNode.ts
|
|
11585
|
-
import
|
|
11821
|
+
import yargs36 from "yargs";
|
|
11586
11822
|
|
|
11587
11823
|
// src/commands/project-map/commands/ProjectMapNode/get.ts
|
|
11588
11824
|
var ProjectMapNodeGetModule = {
|
|
11589
11825
|
command: "get <id> <projectMapId>",
|
|
11590
11826
|
describe: "Fetch a project map node",
|
|
11591
|
-
builder: (
|
|
11827
|
+
builder: (yargs43) => withConfiguration(
|
|
11592
11828
|
withFormatOptions(
|
|
11593
11829
|
withApiOptions(
|
|
11594
11830
|
withProjectOptions(
|
|
11595
|
-
|
|
11831
|
+
yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
|
|
11596
11832
|
)
|
|
11597
11833
|
)
|
|
11598
11834
|
)
|
|
@@ -11616,12 +11852,12 @@ var ProjectMapNodeListModule = {
|
|
|
11616
11852
|
command: "list <projectMapId>",
|
|
11617
11853
|
describe: "List project map nodes",
|
|
11618
11854
|
aliases: ["ls"],
|
|
11619
|
-
builder: (
|
|
11855
|
+
builder: (yargs43) => withConfiguration(
|
|
11620
11856
|
withFormatOptions(
|
|
11621
11857
|
withApiOptions(
|
|
11622
11858
|
withProjectOptions(
|
|
11623
11859
|
withStateOptions(
|
|
11624
|
-
|
|
11860
|
+
yargs43.positional("projectMapId", {
|
|
11625
11861
|
demandOption: true,
|
|
11626
11862
|
describe: "ProjectMap UUID to fetch from"
|
|
11627
11863
|
})
|
|
@@ -11699,12 +11935,12 @@ function createProjectMapNodeEngineDataSource({
|
|
|
11699
11935
|
var ProjectMapNodePullModule = {
|
|
11700
11936
|
command: "pull <directory>",
|
|
11701
11937
|
describe: "Pulls all project maps nodes to local files in a directory",
|
|
11702
|
-
builder: (
|
|
11938
|
+
builder: (yargs43) => withConfiguration(
|
|
11703
11939
|
withDebugOptions(
|
|
11704
11940
|
withApiOptions(
|
|
11705
11941
|
withProjectOptions(
|
|
11706
11942
|
withDiffOptions(
|
|
11707
|
-
|
|
11943
|
+
yargs43.positional("directory", {
|
|
11708
11944
|
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
11945
|
type: "string"
|
|
11710
11946
|
}).option("format", {
|
|
@@ -11786,12 +12022,12 @@ import {
|
|
|
11786
12022
|
var ProjectMapNodePushModule = {
|
|
11787
12023
|
command: "push <directory>",
|
|
11788
12024
|
describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
|
|
11789
|
-
builder: (
|
|
12025
|
+
builder: (yargs43) => withConfiguration(
|
|
11790
12026
|
withDebugOptions(
|
|
11791
12027
|
withApiOptions(
|
|
11792
12028
|
withProjectOptions(
|
|
11793
12029
|
withDiffOptions(
|
|
11794
|
-
|
|
12030
|
+
yargs43.positional("directory", {
|
|
11795
12031
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
11796
12032
|
type: "string"
|
|
11797
12033
|
}).option("mode", {
|
|
@@ -11893,10 +12129,10 @@ var ProjectMapNodeRemoveModule = {
|
|
|
11893
12129
|
command: "remove <id> <projectMapId>",
|
|
11894
12130
|
aliases: ["delete", "rm"],
|
|
11895
12131
|
describe: "Delete a project map node",
|
|
11896
|
-
builder: (
|
|
12132
|
+
builder: (yargs43) => withConfiguration(
|
|
11897
12133
|
withApiOptions(
|
|
11898
12134
|
withProjectOptions(
|
|
11899
|
-
|
|
12135
|
+
yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
|
|
11900
12136
|
)
|
|
11901
12137
|
)
|
|
11902
12138
|
),
|
|
@@ -11912,10 +12148,10 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11912
12148
|
command: "update <filename> <projectMapId>",
|
|
11913
12149
|
aliases: ["put"],
|
|
11914
12150
|
describe: "Insert or update a project map node",
|
|
11915
|
-
builder: (
|
|
12151
|
+
builder: (yargs43) => withConfiguration(
|
|
11916
12152
|
withApiOptions(
|
|
11917
12153
|
withProjectOptions(
|
|
11918
|
-
|
|
12154
|
+
yargs43.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
|
|
11919
12155
|
)
|
|
11920
12156
|
)
|
|
11921
12157
|
),
|
|
@@ -11931,9 +12167,9 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11931
12167
|
var ProjectMapNodeModule = {
|
|
11932
12168
|
command: "node <command>",
|
|
11933
12169
|
describe: "Commands for ProjectMap Nodes",
|
|
11934
|
-
builder: (
|
|
12170
|
+
builder: (yargs43) => yargs43.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
|
|
11935
12171
|
handler: () => {
|
|
11936
|
-
|
|
12172
|
+
yargs36.help();
|
|
11937
12173
|
}
|
|
11938
12174
|
};
|
|
11939
12175
|
|
|
@@ -11942,17 +12178,17 @@ var ProjectMapCommand = {
|
|
|
11942
12178
|
command: "project-map <command>",
|
|
11943
12179
|
aliases: ["prm"],
|
|
11944
12180
|
describe: "Uniform ProjectMap commands",
|
|
11945
|
-
builder: (
|
|
12181
|
+
builder: (yargs43) => yargs43.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
|
|
11946
12182
|
handler: () => {
|
|
11947
|
-
|
|
12183
|
+
yargs37.showHelp();
|
|
11948
12184
|
}
|
|
11949
12185
|
};
|
|
11950
12186
|
|
|
11951
12187
|
// src/commands/redirect/index.ts
|
|
11952
|
-
import
|
|
12188
|
+
import yargs39 from "yargs";
|
|
11953
12189
|
|
|
11954
12190
|
// src/commands/redirect/commands/redirect.ts
|
|
11955
|
-
import
|
|
12191
|
+
import yargs38 from "yargs";
|
|
11956
12192
|
|
|
11957
12193
|
// src/commands/redirect/commands/RedirectDefinition/_util.ts
|
|
11958
12194
|
import { UncachedRedirectClient } from "@uniformdev/redirect";
|
|
@@ -11977,11 +12213,11 @@ function getRedirectClient(options) {
|
|
|
11977
12213
|
var RedirectDefinitionGetModule = {
|
|
11978
12214
|
command: "get <id>",
|
|
11979
12215
|
describe: "Fetch a redirect",
|
|
11980
|
-
builder: (
|
|
12216
|
+
builder: (yargs43) => withConfiguration(
|
|
11981
12217
|
withFormatOptions(
|
|
11982
12218
|
withApiOptions(
|
|
11983
12219
|
withProjectOptions(
|
|
11984
|
-
|
|
12220
|
+
yargs43.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
|
|
11985
12221
|
)
|
|
11986
12222
|
)
|
|
11987
12223
|
)
|
|
@@ -12004,7 +12240,7 @@ var RedirectDefinitionListModule = {
|
|
|
12004
12240
|
command: "list",
|
|
12005
12241
|
describe: "List of redirects",
|
|
12006
12242
|
aliases: ["ls"],
|
|
12007
|
-
builder: (
|
|
12243
|
+
builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
|
|
12008
12244
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
12009
12245
|
const fetch2 = nodeFetchProxy(proxy);
|
|
12010
12246
|
const client = getRedirectClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -12056,12 +12292,12 @@ function createRedirectDefinitionEngineDataSource({
|
|
|
12056
12292
|
var RedirectDefinitionPullModule = {
|
|
12057
12293
|
command: "pull <directory>",
|
|
12058
12294
|
describe: "Pulls all redirects to local files in a directory",
|
|
12059
|
-
builder: (
|
|
12295
|
+
builder: (yargs43) => withConfiguration(
|
|
12060
12296
|
withDebugOptions(
|
|
12061
12297
|
withApiOptions(
|
|
12062
12298
|
withProjectOptions(
|
|
12063
12299
|
withDiffOptions(
|
|
12064
|
-
|
|
12300
|
+
yargs43.positional("directory", {
|
|
12065
12301
|
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
12302
|
type: "string"
|
|
12067
12303
|
}).option("format", {
|
|
@@ -12137,12 +12373,12 @@ var RedirectDefinitionPullModule = {
|
|
|
12137
12373
|
var RedirectDefinitionPushModule = {
|
|
12138
12374
|
command: "push <directory>",
|
|
12139
12375
|
describe: "Pushes all redirects from files in a directory or package to Uniform",
|
|
12140
|
-
builder: (
|
|
12376
|
+
builder: (yargs43) => withConfiguration(
|
|
12141
12377
|
withDebugOptions(
|
|
12142
12378
|
withApiOptions(
|
|
12143
12379
|
withProjectOptions(
|
|
12144
12380
|
withDiffOptions(
|
|
12145
|
-
|
|
12381
|
+
yargs43.positional("directory", {
|
|
12146
12382
|
describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
|
|
12147
12383
|
type: "string"
|
|
12148
12384
|
}).option("mode", {
|
|
@@ -12206,9 +12442,9 @@ var RedirectDefinitionRemoveModule = {
|
|
|
12206
12442
|
command: "remove <id>",
|
|
12207
12443
|
aliases: ["delete", "rm"],
|
|
12208
12444
|
describe: "Delete a redirect",
|
|
12209
|
-
builder: (
|
|
12445
|
+
builder: (yargs43) => withConfiguration(
|
|
12210
12446
|
withApiOptions(
|
|
12211
|
-
withProjectOptions(
|
|
12447
|
+
withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
12212
12448
|
)
|
|
12213
12449
|
),
|
|
12214
12450
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -12223,10 +12459,10 @@ var RedirectDefinitionUpdateModule = {
|
|
|
12223
12459
|
command: "update <filename>",
|
|
12224
12460
|
aliases: ["put"],
|
|
12225
12461
|
describe: "Insert or update a redirect",
|
|
12226
|
-
builder: (
|
|
12462
|
+
builder: (yargs43) => withConfiguration(
|
|
12227
12463
|
withApiOptions(
|
|
12228
12464
|
withProjectOptions(
|
|
12229
|
-
|
|
12465
|
+
yargs43.positional("filename", { demandOption: true, describe: "Redirect file to put" })
|
|
12230
12466
|
)
|
|
12231
12467
|
)
|
|
12232
12468
|
),
|
|
@@ -12242,9 +12478,9 @@ var RedirectDefinitionUpdateModule = {
|
|
|
12242
12478
|
var RedirectDefinitionModule = {
|
|
12243
12479
|
command: "definition <command>",
|
|
12244
12480
|
describe: "Commands for Redirect Definitions",
|
|
12245
|
-
builder: (
|
|
12481
|
+
builder: (yargs43) => yargs43.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
|
|
12246
12482
|
handler: () => {
|
|
12247
|
-
|
|
12483
|
+
yargs38.help();
|
|
12248
12484
|
}
|
|
12249
12485
|
};
|
|
12250
12486
|
|
|
@@ -12253,14 +12489,14 @@ var RedirectCommand = {
|
|
|
12253
12489
|
command: "redirect <command>",
|
|
12254
12490
|
aliases: ["red"],
|
|
12255
12491
|
describe: "Uniform Redirect commands",
|
|
12256
|
-
builder: (
|
|
12492
|
+
builder: (yargs43) => yargs43.command(RedirectDefinitionModule).demandCommand(),
|
|
12257
12493
|
handler: () => {
|
|
12258
|
-
|
|
12494
|
+
yargs39.showHelp();
|
|
12259
12495
|
}
|
|
12260
12496
|
};
|
|
12261
12497
|
|
|
12262
12498
|
// src/commands/sync/index.ts
|
|
12263
|
-
import
|
|
12499
|
+
import yargs40 from "yargs";
|
|
12264
12500
|
|
|
12265
12501
|
// src/webhooksClient.ts
|
|
12266
12502
|
import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
|
|
@@ -12454,12 +12690,12 @@ function createWebhookEngineDataSource({
|
|
|
12454
12690
|
var WebhookPullModule = {
|
|
12455
12691
|
command: "pull <directory>",
|
|
12456
12692
|
describe: "Pulls all webhooks to local files in a directory",
|
|
12457
|
-
builder: (
|
|
12693
|
+
builder: (yargs43) => withConfiguration(
|
|
12458
12694
|
withApiOptions(
|
|
12459
12695
|
withDebugOptions(
|
|
12460
12696
|
withProjectOptions(
|
|
12461
12697
|
withDiffOptions(
|
|
12462
|
-
|
|
12698
|
+
yargs43.positional("directory", {
|
|
12463
12699
|
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
12700
|
type: "string"
|
|
12465
12701
|
}).option("format", {
|
|
@@ -12645,11 +12881,12 @@ function numPad(num, spaces = 6) {
|
|
|
12645
12881
|
var SyncPullModule = {
|
|
12646
12882
|
command: "pull",
|
|
12647
12883
|
describe: "Pulls whole project to local files in a directory",
|
|
12648
|
-
builder: (
|
|
12884
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs43))))),
|
|
12649
12885
|
handler: async ({ serialization, ...otherParams }) => {
|
|
12650
12886
|
const config2 = serialization;
|
|
12651
12887
|
const enabledEntities = Object.entries({
|
|
12652
12888
|
locale: LocalePullModule,
|
|
12889
|
+
label: LabelPullModule,
|
|
12653
12890
|
asset: AssetPullModule,
|
|
12654
12891
|
category: CategoryPullModule,
|
|
12655
12892
|
workflow: WorkflowPullModule,
|
|
@@ -12744,12 +12981,12 @@ var getFormat = (entityType, config2) => {
|
|
|
12744
12981
|
var WebhookPushModule = {
|
|
12745
12982
|
command: "push <directory>",
|
|
12746
12983
|
describe: "Pushes all webhooks from files in a directory to Uniform",
|
|
12747
|
-
builder: (
|
|
12984
|
+
builder: (yargs43) => withConfiguration(
|
|
12748
12985
|
withDebugOptions(
|
|
12749
12986
|
withApiOptions(
|
|
12750
12987
|
withProjectOptions(
|
|
12751
12988
|
withDiffOptions(
|
|
12752
|
-
|
|
12989
|
+
yargs43.positional("directory", {
|
|
12753
12990
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
12754
12991
|
type: "string"
|
|
12755
12992
|
}).option("mode", {
|
|
@@ -12813,11 +13050,12 @@ var WebhookPushModule = {
|
|
|
12813
13050
|
var SyncPushModule = {
|
|
12814
13051
|
command: "push",
|
|
12815
13052
|
describe: "Pushes whole project data from files in a directory or package to Uniform",
|
|
12816
|
-
builder: (
|
|
13053
|
+
builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs43))))),
|
|
12817
13054
|
handler: async ({ serialization, ...otherParams }) => {
|
|
12818
13055
|
const config2 = serialization;
|
|
12819
13056
|
const enabledEntities = Object.entries({
|
|
12820
13057
|
locale: LocalePushModule,
|
|
13058
|
+
label: LabelPushModule,
|
|
12821
13059
|
asset: AssetPushModule,
|
|
12822
13060
|
category: CategoryPushModule,
|
|
12823
13061
|
workflow: WorkflowPushModule,
|
|
@@ -13023,21 +13261,21 @@ var getFormat2 = (entityType, config2) => {
|
|
|
13023
13261
|
var SyncCommand = {
|
|
13024
13262
|
command: "sync <command>",
|
|
13025
13263
|
describe: "Uniform Sync commands",
|
|
13026
|
-
builder: (
|
|
13264
|
+
builder: (yargs43) => yargs43.command(SyncPullModule).command(SyncPushModule).demandCommand(),
|
|
13027
13265
|
handler: () => {
|
|
13028
|
-
|
|
13266
|
+
yargs40.showHelp();
|
|
13029
13267
|
}
|
|
13030
13268
|
};
|
|
13031
13269
|
|
|
13032
13270
|
// src/commands/webhook/index.ts
|
|
13033
|
-
import
|
|
13271
|
+
import yargs41 from "yargs";
|
|
13034
13272
|
var WebhookCommand = {
|
|
13035
13273
|
command: "webhook <command>",
|
|
13036
13274
|
aliases: ["wh"],
|
|
13037
13275
|
describe: "Commands for webhooks",
|
|
13038
|
-
builder: (
|
|
13276
|
+
builder: (yargs43) => yargs43.command(WebhookPullModule).command(WebhookPushModule).demandCommand(),
|
|
13039
13277
|
handler: () => {
|
|
13040
|
-
|
|
13278
|
+
yargs41.help();
|
|
13041
13279
|
}
|
|
13042
13280
|
};
|
|
13043
13281
|
|
|
@@ -13272,7 +13510,7 @@ First found was: v${firstVersion}`;
|
|
|
13272
13510
|
|
|
13273
13511
|
// src/index.ts
|
|
13274
13512
|
dotenv.config();
|
|
13275
|
-
var yarggery =
|
|
13513
|
+
var yarggery = yargs42(hideBin(process.argv));
|
|
13276
13514
|
var useDefaultConfig = !process.argv.includes("--config");
|
|
13277
13515
|
var defaultConfig2 = useDefaultConfig ? loadConfig(null) : {};
|
|
13278
13516
|
yarggery.option("verbose", {
|