@uniformdev/cli 20.34.3-alpha.70 → 20.35.1-alpha.58
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 +607 -377
- package/package.json +10 -9
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 yargs40 from "yargs";
|
|
24
24
|
import { hideBin } from "yargs/helpers";
|
|
25
25
|
|
|
26
26
|
// src/commands/ai/index.ts
|
|
@@ -40,7 +40,7 @@ import jwt from "jsonwebtoken";
|
|
|
40
40
|
import open from "open";
|
|
41
41
|
|
|
42
42
|
// src/url.ts
|
|
43
|
-
var makeUrl = (baseUrl,
|
|
43
|
+
var makeUrl = (baseUrl, path8) => [baseUrl.trim().replace(/\/+$/, ""), path8.trim().replace(/^\/+/, "")].join("/");
|
|
44
44
|
|
|
45
45
|
// src/auth/getBearerToken.ts
|
|
46
46
|
async function getBearerToken(baseUrl) {
|
|
@@ -144,8 +144,8 @@ var getLimitsSchema = z.object({
|
|
|
144
144
|
})
|
|
145
145
|
});
|
|
146
146
|
var createClient = (baseUrl, authToken) => {
|
|
147
|
-
const request2 = async (
|
|
148
|
-
const res = await fetch(makeUrl(baseUrl,
|
|
147
|
+
const request2 = async (path8, opts, allowedNon2xxStatusCodes = []) => {
|
|
148
|
+
const res = await fetch(makeUrl(baseUrl, path8), {
|
|
149
149
|
...opts,
|
|
150
150
|
headers: { Authorization: `Bearer ${authToken}` }
|
|
151
151
|
});
|
|
@@ -153,18 +153,18 @@ var createClient = (baseUrl, authToken) => {
|
|
|
153
153
|
return res;
|
|
154
154
|
} else {
|
|
155
155
|
throw new Error(
|
|
156
|
-
`Non-2xx API response: ${opts.method} ${
|
|
156
|
+
`Non-2xx API response: ${opts.method} ${path8} responded with ${res.status} ${res.statusText}`
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
-
const requestJson = async (
|
|
161
|
-
const res = await request2(
|
|
160
|
+
const requestJson = async (path8, opts, schema2, allowedNon2xxStatusCodes = []) => {
|
|
161
|
+
const res = await request2(path8, opts, allowedNon2xxStatusCodes);
|
|
162
162
|
const data = await res.json();
|
|
163
163
|
const parseResult = schema2.safeParse(data);
|
|
164
164
|
if (parseResult.success) {
|
|
165
165
|
return parseResult.data;
|
|
166
166
|
} else {
|
|
167
|
-
throw new Error(`Invalid ${opts.method} ${
|
|
167
|
+
throw new Error(`Invalid ${opts.method} ${path8} response: ${parseResult.error.message}`);
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
return {
|
|
@@ -213,6 +213,9 @@ var createClient = (baseUrl, authToken) => {
|
|
|
213
213
|
);
|
|
214
214
|
return result.id;
|
|
215
215
|
} catch (err) {
|
|
216
|
+
if (err.message && /responded with (400|401|403)/.test(err.message)) {
|
|
217
|
+
throw new Error("Unable to create project. You need team admin permissions to use uniform new.");
|
|
218
|
+
}
|
|
216
219
|
throw new Error(`Failed to create project:
|
|
217
220
|
${err.message}`);
|
|
218
221
|
}
|
|
@@ -273,14 +276,14 @@ var createClient = (baseUrl, authToken) => {
|
|
|
273
276
|
|
|
274
277
|
// src/fs.ts
|
|
275
278
|
import { promises as fs } from "fs";
|
|
276
|
-
async function readJSON(
|
|
277
|
-
const fileContents = await fs.readFile(
|
|
279
|
+
async function readJSON(path8) {
|
|
280
|
+
const fileContents = await fs.readFile(path8, "utf-8");
|
|
278
281
|
return JSON.parse(fileContents);
|
|
279
282
|
}
|
|
280
|
-
async function tryReadJSON(
|
|
283
|
+
async function tryReadJSON(path8, missingValue = null) {
|
|
281
284
|
try {
|
|
282
|
-
const stat = await fs.stat(
|
|
283
|
-
return stat.isFile() ? await readJSON(
|
|
285
|
+
const stat = await fs.stat(path8);
|
|
286
|
+
return stat.isFile() ? await readJSON(path8) : missingValue;
|
|
284
287
|
} catch {
|
|
285
288
|
return missingValue;
|
|
286
289
|
}
|
|
@@ -1092,7 +1095,7 @@ import { PostHog } from "posthog-node";
|
|
|
1092
1095
|
// package.json
|
|
1093
1096
|
var package_default = {
|
|
1094
1097
|
name: "@uniformdev/cli",
|
|
1095
|
-
version: "20.
|
|
1098
|
+
version: "20.38.1",
|
|
1096
1099
|
description: "Uniform command line interface tool",
|
|
1097
1100
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
1098
1101
|
main: "./cli.js",
|
|
@@ -1132,6 +1135,7 @@ var package_default = {
|
|
|
1132
1135
|
"cosmiconfig-typescript-loader": "5.0.0",
|
|
1133
1136
|
diff: "^5.0.0",
|
|
1134
1137
|
dotenv: "^16.4.7",
|
|
1138
|
+
esbuild: "0.25.0",
|
|
1135
1139
|
execa: "5.1.1",
|
|
1136
1140
|
"file-type": "^20.0.0",
|
|
1137
1141
|
"fs-jetpack": "5.1.0",
|
|
@@ -1349,8 +1353,8 @@ var aiApiHostDefault = process.env.UNIFORM_AI_API_HOST || "https://ai.uniform.gl
|
|
|
1349
1353
|
var InstallMcpCommand = {
|
|
1350
1354
|
command: "install",
|
|
1351
1355
|
describe: "Install Uniform MCP server configuration (use --team, --project, and --apiKey for non-interactive mode)",
|
|
1352
|
-
builder: (
|
|
1353
|
-
|
|
1356
|
+
builder: (yargs41) => withConfiguration(
|
|
1357
|
+
yargs41.option("agent", {
|
|
1354
1358
|
alias: "a",
|
|
1355
1359
|
describe: "Specify agent type (cursor, claude, other)",
|
|
1356
1360
|
type: "string",
|
|
@@ -1526,7 +1530,7 @@ Selected agent: ${agentType}`));
|
|
|
1526
1530
|
var McpCommand = {
|
|
1527
1531
|
command: "mcp <command>",
|
|
1528
1532
|
describe: "Uniform MCP server management commands",
|
|
1529
|
-
builder: (
|
|
1533
|
+
builder: (yargs41) => yargs41.command(InstallMcpCommand).demandCommand(),
|
|
1530
1534
|
handler: () => {
|
|
1531
1535
|
yargs.showHelp();
|
|
1532
1536
|
}
|
|
@@ -1954,8 +1958,8 @@ ${gray2("Rules source:")} https://github.com/uniformdev/ai-rules`);
|
|
|
1954
1958
|
var InstallRulesCommand = {
|
|
1955
1959
|
command: "install",
|
|
1956
1960
|
describe: "Install Uniform AI rules for your development assistant",
|
|
1957
|
-
builder: (
|
|
1958
|
-
|
|
1961
|
+
builder: (yargs41) => withConfiguration(
|
|
1962
|
+
yargs41.option("agent", {
|
|
1959
1963
|
alias: "a",
|
|
1960
1964
|
describe: "Specify agent type (cursor, claude, other)",
|
|
1961
1965
|
type: "string",
|
|
@@ -1993,7 +1997,7 @@ import { blue as blue4, bold as bold2, gray as gray3, green as green5, red as re
|
|
|
1993
1997
|
var ListRulesCommand = {
|
|
1994
1998
|
command: "list",
|
|
1995
1999
|
describe: "List available Uniform AI rules",
|
|
1996
|
-
builder: (
|
|
2000
|
+
builder: (yargs41) => withConfiguration(yargs41),
|
|
1997
2001
|
handler: async function() {
|
|
1998
2002
|
const { stopAllSpinners, spin } = makeSpinner();
|
|
1999
2003
|
try {
|
|
@@ -2022,7 +2026,7 @@ var ListRulesCommand = {
|
|
|
2022
2026
|
var RulesCommand = {
|
|
2023
2027
|
command: "rules <command>",
|
|
2024
2028
|
describe: "Uniform AI rules management commands",
|
|
2025
|
-
builder: (
|
|
2029
|
+
builder: (yargs41) => yargs41.command(InstallRulesCommand).command(ListRulesCommand).demandCommand(),
|
|
2026
2030
|
handler: () => {
|
|
2027
2031
|
yargs2.showHelp();
|
|
2028
2032
|
}
|
|
@@ -2032,7 +2036,7 @@ var RulesCommand = {
|
|
|
2032
2036
|
var AiCommand = {
|
|
2033
2037
|
command: "ai <command>",
|
|
2034
2038
|
describe: "Uniform AI development assistant commands",
|
|
2035
|
-
builder: (
|
|
2039
|
+
builder: (yargs41) => yargs41.command(RulesCommand).command(McpCommand).demandCommand(),
|
|
2036
2040
|
handler: () => {
|
|
2037
2041
|
yargs3.showHelp();
|
|
2038
2042
|
}
|
|
@@ -2071,12 +2075,12 @@ function getFileClient(options) {
|
|
|
2071
2075
|
var AssetGetModule = {
|
|
2072
2076
|
command: "get <id>",
|
|
2073
2077
|
describe: "Get an asset",
|
|
2074
|
-
builder: (
|
|
2078
|
+
builder: (yargs41) => withConfiguration(
|
|
2075
2079
|
withDebugOptions(
|
|
2076
2080
|
withFormatOptions(
|
|
2077
2081
|
withApiOptions(
|
|
2078
2082
|
withProjectOptions(
|
|
2079
|
-
|
|
2083
|
+
yargs41.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
|
|
2080
2084
|
)
|
|
2081
2085
|
)
|
|
2082
2086
|
)
|
|
@@ -2097,7 +2101,7 @@ var AssetGetModule = {
|
|
|
2097
2101
|
var AssetListModule = {
|
|
2098
2102
|
command: "list",
|
|
2099
2103
|
describe: "List assets",
|
|
2100
|
-
builder: (
|
|
2104
|
+
builder: (yargs41) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs41))))),
|
|
2101
2105
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
2102
2106
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
2103
2107
|
const client = getAssetClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -2650,8 +2654,8 @@ function prepCompositionForDisk(composition) {
|
|
|
2650
2654
|
delete prepped.state;
|
|
2651
2655
|
return prepped;
|
|
2652
2656
|
}
|
|
2653
|
-
function withStateOptions(
|
|
2654
|
-
return
|
|
2657
|
+
function withStateOptions(yargs41, defaultState = "preview") {
|
|
2658
|
+
return yargs41.option("state", {
|
|
2655
2659
|
type: "string",
|
|
2656
2660
|
describe: `State to fetch.`,
|
|
2657
2661
|
choices: ["preview", "published"],
|
|
@@ -2733,12 +2737,12 @@ function writeCanvasPackage(filename, packageContents) {
|
|
|
2733
2737
|
var AssetPullModule = {
|
|
2734
2738
|
command: "pull <directory>",
|
|
2735
2739
|
describe: "Pulls all assets to local files in a directory",
|
|
2736
|
-
builder: (
|
|
2740
|
+
builder: (yargs41) => withConfiguration(
|
|
2737
2741
|
withApiOptions(
|
|
2738
2742
|
withDebugOptions(
|
|
2739
2743
|
withProjectOptions(
|
|
2740
2744
|
withDiffOptions(
|
|
2741
|
-
|
|
2745
|
+
yargs41.positional("directory", {
|
|
2742
2746
|
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.",
|
|
2743
2747
|
type: "string"
|
|
2744
2748
|
}).option("format", {
|
|
@@ -2850,12 +2854,12 @@ var AssetPullModule = {
|
|
|
2850
2854
|
var AssetPushModule = {
|
|
2851
2855
|
command: "push <directory>",
|
|
2852
2856
|
describe: "Pushes all assets from files in a directory to Uniform",
|
|
2853
|
-
builder: (
|
|
2857
|
+
builder: (yargs41) => withConfiguration(
|
|
2854
2858
|
withApiOptions(
|
|
2855
2859
|
withDebugOptions(
|
|
2856
2860
|
withProjectOptions(
|
|
2857
2861
|
withDiffOptions(
|
|
2858
|
-
|
|
2862
|
+
yargs41.positional("directory", {
|
|
2859
2863
|
describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
|
|
2860
2864
|
type: "string"
|
|
2861
2865
|
}).option("mode", {
|
|
@@ -2979,10 +2983,10 @@ var AssetRemoveModule = {
|
|
|
2979
2983
|
command: "remove <id>",
|
|
2980
2984
|
aliases: ["delete", "rm"],
|
|
2981
2985
|
describe: "Delete an asset",
|
|
2982
|
-
builder: (
|
|
2986
|
+
builder: (yargs41) => withConfiguration(
|
|
2983
2987
|
withDebugOptions(
|
|
2984
2988
|
withApiOptions(
|
|
2985
|
-
withProjectOptions(
|
|
2989
|
+
withProjectOptions(yargs41.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
|
|
2986
2990
|
)
|
|
2987
2991
|
)
|
|
2988
2992
|
),
|
|
@@ -3003,11 +3007,11 @@ var AssetUpdateModule = {
|
|
|
3003
3007
|
command: "update <filename>",
|
|
3004
3008
|
aliases: ["put"],
|
|
3005
3009
|
describe: "Insert or update an asset",
|
|
3006
|
-
builder: (
|
|
3010
|
+
builder: (yargs41) => withConfiguration(
|
|
3007
3011
|
withDebugOptions(
|
|
3008
3012
|
withApiOptions(
|
|
3009
3013
|
withProjectOptions(
|
|
3010
|
-
|
|
3014
|
+
yargs41.positional("filename", { demandOption: true, describe: "Asset file to put" })
|
|
3011
3015
|
)
|
|
3012
3016
|
)
|
|
3013
3017
|
)
|
|
@@ -3033,7 +3037,7 @@ var AssetUpdateModule = {
|
|
|
3033
3037
|
var AssetModule = {
|
|
3034
3038
|
command: "asset <command>",
|
|
3035
3039
|
describe: "Commands for Assets",
|
|
3036
|
-
builder: (
|
|
3040
|
+
builder: (yargs41) => yargs41.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
|
|
3037
3041
|
handler: () => {
|
|
3038
3042
|
yargs4.help();
|
|
3039
3043
|
}
|
|
@@ -3054,12 +3058,12 @@ function getCategoryClient(options) {
|
|
|
3054
3058
|
var CategoryGetModule = {
|
|
3055
3059
|
command: "get <id>",
|
|
3056
3060
|
describe: "Fetch a category",
|
|
3057
|
-
builder: (
|
|
3061
|
+
builder: (yargs41) => withConfiguration(
|
|
3058
3062
|
withFormatOptions(
|
|
3059
3063
|
withDebugOptions(
|
|
3060
3064
|
withApiOptions(
|
|
3061
3065
|
withProjectOptions(
|
|
3062
|
-
|
|
3066
|
+
yargs41.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
|
|
3063
3067
|
)
|
|
3064
3068
|
)
|
|
3065
3069
|
)
|
|
@@ -3084,8 +3088,8 @@ var CategoryListModule = {
|
|
|
3084
3088
|
command: "list",
|
|
3085
3089
|
describe: "List categories",
|
|
3086
3090
|
aliases: ["ls"],
|
|
3087
|
-
builder: (
|
|
3088
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
3091
|
+
builder: (yargs41) => withConfiguration(
|
|
3092
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs41.options({})))))
|
|
3089
3093
|
),
|
|
3090
3094
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
3091
3095
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -3129,12 +3133,12 @@ function createCategoriesEngineDataSource({
|
|
|
3129
3133
|
var CategoryPullModule = {
|
|
3130
3134
|
command: "pull <directory>",
|
|
3131
3135
|
describe: "Pulls all categories to local files in a directory",
|
|
3132
|
-
builder: (
|
|
3136
|
+
builder: (yargs41) => withConfiguration(
|
|
3133
3137
|
withApiOptions(
|
|
3134
3138
|
withProjectOptions(
|
|
3135
3139
|
withDiffOptions(
|
|
3136
3140
|
withDebugOptions(
|
|
3137
|
-
|
|
3141
|
+
yargs41.positional("directory", {
|
|
3138
3142
|
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.",
|
|
3139
3143
|
type: "string"
|
|
3140
3144
|
}).option("format", {
|
|
@@ -3209,12 +3213,12 @@ var CategoryPullModule = {
|
|
|
3209
3213
|
var CategoryPushModule = {
|
|
3210
3214
|
command: "push <directory>",
|
|
3211
3215
|
describe: "Pushes all categories from files in a directory to Uniform Canvas",
|
|
3212
|
-
builder: (
|
|
3216
|
+
builder: (yargs41) => withConfiguration(
|
|
3213
3217
|
withApiOptions(
|
|
3214
3218
|
withDebugOptions(
|
|
3215
3219
|
withProjectOptions(
|
|
3216
3220
|
withDiffOptions(
|
|
3217
|
-
|
|
3221
|
+
yargs41.positional("directory", {
|
|
3218
3222
|
describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
|
|
3219
3223
|
type: "string"
|
|
3220
3224
|
}).option("mode", {
|
|
@@ -3278,11 +3282,11 @@ var CategoryRemoveModule = {
|
|
|
3278
3282
|
command: "remove <id>",
|
|
3279
3283
|
aliases: ["delete", "rm"],
|
|
3280
3284
|
describe: "Delete a category",
|
|
3281
|
-
builder: (
|
|
3285
|
+
builder: (yargs41) => withConfiguration(
|
|
3282
3286
|
withApiOptions(
|
|
3283
3287
|
withDebugOptions(
|
|
3284
3288
|
withProjectOptions(
|
|
3285
|
-
|
|
3289
|
+
yargs41.positional("id", { demandOption: true, describe: "Category UUID to delete" })
|
|
3286
3290
|
)
|
|
3287
3291
|
)
|
|
3288
3292
|
)
|
|
@@ -3303,11 +3307,11 @@ var CategoryUpdateModule = {
|
|
|
3303
3307
|
command: "update <filename>",
|
|
3304
3308
|
aliases: ["put"],
|
|
3305
3309
|
describe: "Insert or update a category",
|
|
3306
|
-
builder: (
|
|
3310
|
+
builder: (yargs41) => withConfiguration(
|
|
3307
3311
|
withApiOptions(
|
|
3308
3312
|
withDebugOptions(
|
|
3309
3313
|
withProjectOptions(
|
|
3310
|
-
|
|
3314
|
+
yargs41.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
3311
3315
|
)
|
|
3312
3316
|
)
|
|
3313
3317
|
)
|
|
@@ -3329,7 +3333,7 @@ var CategoryModule = {
|
|
|
3329
3333
|
command: "category <command>",
|
|
3330
3334
|
aliases: ["cat"],
|
|
3331
3335
|
describe: "Commands for Canvas categories",
|
|
3332
|
-
builder: (
|
|
3336
|
+
builder: (yargs41) => yargs41.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
|
|
3333
3337
|
handler: () => {
|
|
3334
3338
|
yargs5.help();
|
|
3335
3339
|
}
|
|
@@ -3351,12 +3355,12 @@ function getCanvasClient(options) {
|
|
|
3351
3355
|
var ComponentGetModule = {
|
|
3352
3356
|
command: "get <id>",
|
|
3353
3357
|
describe: "Fetch a component definition",
|
|
3354
|
-
builder: (
|
|
3358
|
+
builder: (yargs41) => withConfiguration(
|
|
3355
3359
|
withFormatOptions(
|
|
3356
3360
|
withDebugOptions(
|
|
3357
3361
|
withApiOptions(
|
|
3358
3362
|
withProjectOptions(
|
|
3359
|
-
|
|
3363
|
+
yargs41.positional("id", {
|
|
3360
3364
|
demandOption: true,
|
|
3361
3365
|
describe: "Component definition public ID to fetch"
|
|
3362
3366
|
})
|
|
@@ -3390,12 +3394,12 @@ var ComponentListModule = {
|
|
|
3390
3394
|
command: "list",
|
|
3391
3395
|
describe: "List component definitions",
|
|
3392
3396
|
aliases: ["ls"],
|
|
3393
|
-
builder: (
|
|
3397
|
+
builder: (yargs41) => withConfiguration(
|
|
3394
3398
|
withFormatOptions(
|
|
3395
3399
|
withDebugOptions(
|
|
3396
3400
|
withApiOptions(
|
|
3397
3401
|
withProjectOptions(
|
|
3398
|
-
|
|
3402
|
+
yargs41.options({
|
|
3399
3403
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3400
3404
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
|
|
3401
3405
|
})
|
|
@@ -3459,12 +3463,12 @@ function createComponentDefinitionEngineDataSource({
|
|
|
3459
3463
|
var ComponentPullModule = {
|
|
3460
3464
|
command: "pull <directory>",
|
|
3461
3465
|
describe: "Pulls all component definitions to local files in a directory",
|
|
3462
|
-
builder: (
|
|
3466
|
+
builder: (yargs41) => withConfiguration(
|
|
3463
3467
|
withApiOptions(
|
|
3464
3468
|
withDebugOptions(
|
|
3465
3469
|
withProjectOptions(
|
|
3466
3470
|
withDiffOptions(
|
|
3467
|
-
|
|
3471
|
+
yargs41.positional("directory", {
|
|
3468
3472
|
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.",
|
|
3469
3473
|
type: "string"
|
|
3470
3474
|
}).option("format", {
|
|
@@ -3540,12 +3544,12 @@ var ComponentPullModule = {
|
|
|
3540
3544
|
var ComponentPushModule = {
|
|
3541
3545
|
command: "push <directory>",
|
|
3542
3546
|
describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
|
|
3543
|
-
builder: (
|
|
3547
|
+
builder: (yargs41) => withConfiguration(
|
|
3544
3548
|
withApiOptions(
|
|
3545
3549
|
withDebugOptions(
|
|
3546
3550
|
withProjectOptions(
|
|
3547
3551
|
withDiffOptions(
|
|
3548
|
-
|
|
3552
|
+
yargs41.positional("directory", {
|
|
3549
3553
|
describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
|
|
3550
3554
|
type: "string"
|
|
3551
3555
|
}).option("mode", {
|
|
@@ -3610,11 +3614,11 @@ var ComponentRemoveModule = {
|
|
|
3610
3614
|
command: "remove <id>",
|
|
3611
3615
|
aliases: ["delete", "rm"],
|
|
3612
3616
|
describe: "Delete a component definition",
|
|
3613
|
-
builder: (
|
|
3617
|
+
builder: (yargs41) => withConfiguration(
|
|
3614
3618
|
withDebugOptions(
|
|
3615
3619
|
withApiOptions(
|
|
3616
3620
|
withProjectOptions(
|
|
3617
|
-
|
|
3621
|
+
yargs41.positional("id", {
|
|
3618
3622
|
demandOption: true,
|
|
3619
3623
|
describe: "Component definition public ID to delete"
|
|
3620
3624
|
})
|
|
@@ -3638,11 +3642,11 @@ var ComponentUpdateModule = {
|
|
|
3638
3642
|
command: "update <filename>",
|
|
3639
3643
|
aliases: ["put"],
|
|
3640
3644
|
describe: "Insert or update a component definition",
|
|
3641
|
-
builder: (
|
|
3645
|
+
builder: (yargs41) => withConfiguration(
|
|
3642
3646
|
withApiOptions(
|
|
3643
3647
|
withDebugOptions(
|
|
3644
3648
|
withProjectOptions(
|
|
3645
|
-
|
|
3649
|
+
yargs41.positional("filename", { demandOption: true, describe: "Component definition file to put" })
|
|
3646
3650
|
)
|
|
3647
3651
|
)
|
|
3648
3652
|
)
|
|
@@ -3664,7 +3668,7 @@ var ComponentModule = {
|
|
|
3664
3668
|
command: "component <command>",
|
|
3665
3669
|
aliases: ["def"],
|
|
3666
3670
|
describe: "Commands for Canvas component definitions",
|
|
3667
|
-
builder: (
|
|
3671
|
+
builder: (yargs41) => yargs41.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
|
|
3668
3672
|
handler: () => {
|
|
3669
3673
|
yargs6.help();
|
|
3670
3674
|
}
|
|
@@ -3677,13 +3681,13 @@ import yargs7 from "yargs";
|
|
|
3677
3681
|
var CompositionGetModule = {
|
|
3678
3682
|
command: "get <id>",
|
|
3679
3683
|
describe: "Fetch a composition",
|
|
3680
|
-
builder: (
|
|
3684
|
+
builder: (yargs41) => withFormatOptions(
|
|
3681
3685
|
withConfiguration(
|
|
3682
3686
|
withApiOptions(
|
|
3683
3687
|
withProjectOptions(
|
|
3684
3688
|
withStateOptions(
|
|
3685
3689
|
withDebugOptions(
|
|
3686
|
-
|
|
3690
|
+
yargs41.positional("id", {
|
|
3687
3691
|
demandOption: true,
|
|
3688
3692
|
describe: "Composition/pattern public ID to fetch"
|
|
3689
3693
|
}).option({
|
|
@@ -3773,13 +3777,13 @@ var CompositionListModule = {
|
|
|
3773
3777
|
command: "list",
|
|
3774
3778
|
describe: "List compositions",
|
|
3775
3779
|
aliases: ["ls"],
|
|
3776
|
-
builder: (
|
|
3780
|
+
builder: (yargs41) => withFormatOptions(
|
|
3777
3781
|
withConfiguration(
|
|
3778
3782
|
withApiOptions(
|
|
3779
3783
|
withProjectOptions(
|
|
3780
3784
|
withDebugOptions(
|
|
3781
3785
|
withStateOptions(
|
|
3782
|
-
|
|
3786
|
+
yargs41.options({
|
|
3783
3787
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3784
3788
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
3785
3789
|
search: { describe: "Search query", type: "string", default: "" },
|
|
@@ -3860,13 +3864,13 @@ var CompositionListModule = {
|
|
|
3860
3864
|
var ComponentPatternListModule = {
|
|
3861
3865
|
...CompositionListModule,
|
|
3862
3866
|
describe: "List component patterns",
|
|
3863
|
-
builder: (
|
|
3867
|
+
builder: (yargs41) => withFormatOptions(
|
|
3864
3868
|
withConfiguration(
|
|
3865
3869
|
withApiOptions(
|
|
3866
3870
|
withDebugOptions(
|
|
3867
3871
|
withProjectOptions(
|
|
3868
3872
|
withStateOptions(
|
|
3869
|
-
|
|
3873
|
+
yargs41.options({
|
|
3870
3874
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3871
3875
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
3872
3876
|
resolvePatterns: {
|
|
@@ -3989,12 +3993,12 @@ function createComponentInstanceEngineDataSource({
|
|
|
3989
3993
|
var CompositionPublishModule = {
|
|
3990
3994
|
command: "publish [ids]",
|
|
3991
3995
|
describe: "Publishes composition(s)",
|
|
3992
|
-
builder: (
|
|
3996
|
+
builder: (yargs41) => withConfiguration(
|
|
3993
3997
|
withApiOptions(
|
|
3994
3998
|
withProjectOptions(
|
|
3995
3999
|
withDebugOptions(
|
|
3996
4000
|
withDiffOptions(
|
|
3997
|
-
|
|
4001
|
+
yargs41.positional("ids", {
|
|
3998
4002
|
describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
3999
4003
|
type: "string"
|
|
4000
4004
|
}).option("all", {
|
|
@@ -4087,12 +4091,12 @@ var CompositionPublishModule = {
|
|
|
4087
4091
|
var ComponentPatternPublishModule = {
|
|
4088
4092
|
...CompositionPublishModule,
|
|
4089
4093
|
describe: "Publishes component pattern(s)",
|
|
4090
|
-
builder: (
|
|
4094
|
+
builder: (yargs41) => withConfiguration(
|
|
4091
4095
|
withApiOptions(
|
|
4092
4096
|
withDebugOptions(
|
|
4093
4097
|
withProjectOptions(
|
|
4094
4098
|
withDiffOptions(
|
|
4095
|
-
|
|
4099
|
+
yargs41.positional("ids", {
|
|
4096
4100
|
describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4097
4101
|
type: "string"
|
|
4098
4102
|
}).option("all", {
|
|
@@ -4132,13 +4136,13 @@ function componentInstancePullModuleFactory(type) {
|
|
|
4132
4136
|
return {
|
|
4133
4137
|
command: "pull <directory>",
|
|
4134
4138
|
describe: "Pulls all compositions to local files in a directory",
|
|
4135
|
-
builder: (
|
|
4139
|
+
builder: (yargs41) => withConfiguration(
|
|
4136
4140
|
withApiOptions(
|
|
4137
4141
|
withProjectOptions(
|
|
4138
4142
|
withStateOptions(
|
|
4139
4143
|
withDebugOptions(
|
|
4140
4144
|
withDiffOptions(
|
|
4141
|
-
|
|
4145
|
+
yargs41.positional("directory", {
|
|
4142
4146
|
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.",
|
|
4143
4147
|
type: "string"
|
|
4144
4148
|
}).option("format", {
|
|
@@ -4253,13 +4257,13 @@ function componentInstancePullModuleFactory(type) {
|
|
|
4253
4257
|
var ComponentPatternPullModule = {
|
|
4254
4258
|
...componentInstancePullModuleFactory("componentPatterns"),
|
|
4255
4259
|
describe: "Pulls all component patterns to local files in a directory",
|
|
4256
|
-
builder: (
|
|
4260
|
+
builder: (yargs41) => withConfiguration(
|
|
4257
4261
|
withApiOptions(
|
|
4258
4262
|
withProjectOptions(
|
|
4259
4263
|
withDebugOptions(
|
|
4260
4264
|
withStateOptions(
|
|
4261
4265
|
withDiffOptions(
|
|
4262
|
-
|
|
4266
|
+
yargs41.positional("directory", {
|
|
4263
4267
|
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.",
|
|
4264
4268
|
type: "string"
|
|
4265
4269
|
}).option("format", {
|
|
@@ -4333,13 +4337,13 @@ function componentInstancePushModuleFactory(type) {
|
|
|
4333
4337
|
return {
|
|
4334
4338
|
command: "push <directory>",
|
|
4335
4339
|
describe: "Pushes all compositions from files in a directory to Uniform Canvas",
|
|
4336
|
-
builder: (
|
|
4340
|
+
builder: (yargs41) => withConfiguration(
|
|
4337
4341
|
withApiOptions(
|
|
4338
4342
|
withProjectOptions(
|
|
4339
4343
|
withStateOptions(
|
|
4340
4344
|
withDebugOptions(
|
|
4341
4345
|
withDiffOptions(
|
|
4342
|
-
|
|
4346
|
+
yargs41.positional("directory", {
|
|
4343
4347
|
describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
|
|
4344
4348
|
type: "string"
|
|
4345
4349
|
}).option("mode", {
|
|
@@ -4453,13 +4457,13 @@ function componentInstancePushModuleFactory(type) {
|
|
|
4453
4457
|
var ComponentPatternPushModule = {
|
|
4454
4458
|
...componentInstancePushModuleFactory("componentPatterns"),
|
|
4455
4459
|
describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
|
|
4456
|
-
builder: (
|
|
4460
|
+
builder: (yargs41) => withConfiguration(
|
|
4457
4461
|
withApiOptions(
|
|
4458
4462
|
withProjectOptions(
|
|
4459
4463
|
withStateOptions(
|
|
4460
4464
|
withDiffOptions(
|
|
4461
4465
|
withDebugOptions(
|
|
4462
|
-
|
|
4466
|
+
yargs41.positional("directory", {
|
|
4463
4467
|
describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
|
|
4464
4468
|
type: "string"
|
|
4465
4469
|
}).option("mode", {
|
|
@@ -4493,11 +4497,11 @@ var CompositionRemoveModule = {
|
|
|
4493
4497
|
command: "remove <id>",
|
|
4494
4498
|
aliases: ["delete", "rm"],
|
|
4495
4499
|
describe: "Delete a composition",
|
|
4496
|
-
builder: (
|
|
4500
|
+
builder: (yargs41) => withConfiguration(
|
|
4497
4501
|
withApiOptions(
|
|
4498
4502
|
withDebugOptions(
|
|
4499
4503
|
withProjectOptions(
|
|
4500
|
-
|
|
4504
|
+
yargs41.positional("id", {
|
|
4501
4505
|
demandOption: true,
|
|
4502
4506
|
describe: "Composition/pattern public ID to delete"
|
|
4503
4507
|
})
|
|
@@ -4531,11 +4535,11 @@ import { diffJson as diffJson2 } from "diff";
|
|
|
4531
4535
|
var CompositionUnpublishModule = {
|
|
4532
4536
|
command: "unpublish [ids]",
|
|
4533
4537
|
describe: "Unpublish a composition(s)",
|
|
4534
|
-
builder: (
|
|
4538
|
+
builder: (yargs41) => withConfiguration(
|
|
4535
4539
|
withApiOptions(
|
|
4536
4540
|
withDebugOptions(
|
|
4537
4541
|
withProjectOptions(
|
|
4538
|
-
|
|
4542
|
+
yargs41.positional("ids", {
|
|
4539
4543
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4540
4544
|
type: "string"
|
|
4541
4545
|
}).option("all", {
|
|
@@ -4632,11 +4636,11 @@ var CompositionUnpublishModule = {
|
|
|
4632
4636
|
var ComponentPatternUnpublishModule = {
|
|
4633
4637
|
command: "unpublish [ids]",
|
|
4634
4638
|
describe: "Unpublish a component pattern(s)",
|
|
4635
|
-
builder: (
|
|
4639
|
+
builder: (yargs41) => withConfiguration(
|
|
4636
4640
|
withApiOptions(
|
|
4637
4641
|
withDebugOptions(
|
|
4638
4642
|
withProjectOptions(
|
|
4639
|
-
|
|
4643
|
+
yargs41.positional("ids", {
|
|
4640
4644
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4641
4645
|
type: "string"
|
|
4642
4646
|
}).option("all", {
|
|
@@ -4670,12 +4674,12 @@ var CompositionUpdateModule = {
|
|
|
4670
4674
|
command: "update <filename>",
|
|
4671
4675
|
aliases: ["put"],
|
|
4672
4676
|
describe: "Insert or update a composition",
|
|
4673
|
-
builder: (
|
|
4677
|
+
builder: (yargs41) => withConfiguration(
|
|
4674
4678
|
withApiOptions(
|
|
4675
4679
|
withProjectOptions(
|
|
4676
4680
|
withDebugOptions(
|
|
4677
4681
|
withStateOptions(
|
|
4678
|
-
|
|
4682
|
+
yargs41.positional("filename", {
|
|
4679
4683
|
demandOption: true,
|
|
4680
4684
|
describe: "Composition/pattern file to put"
|
|
4681
4685
|
})
|
|
@@ -4713,7 +4717,7 @@ var ComponentPatternUpdateModule = {
|
|
|
4713
4717
|
var ComponentPatternModule = {
|
|
4714
4718
|
command: "component-pattern <command>",
|
|
4715
4719
|
describe: "Commands for Canvas component patterns",
|
|
4716
|
-
builder: (
|
|
4720
|
+
builder: (yargs41) => yargs41.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
|
|
4717
4721
|
handler: () => {
|
|
4718
4722
|
yargs7.help();
|
|
4719
4723
|
}
|
|
@@ -4725,7 +4729,7 @@ var CompositionModule = {
|
|
|
4725
4729
|
command: "composition <command>",
|
|
4726
4730
|
describe: "Commands for Canvas compositions",
|
|
4727
4731
|
aliases: ["comp"],
|
|
4728
|
-
builder: (
|
|
4732
|
+
builder: (yargs41) => yargs41.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
|
|
4729
4733
|
handler: () => {
|
|
4730
4734
|
yargs8.help();
|
|
4731
4735
|
}
|
|
@@ -4744,13 +4748,13 @@ var CompositionPatternGetModule = {
|
|
|
4744
4748
|
var CompositionPatternListModule = {
|
|
4745
4749
|
...CompositionListModule,
|
|
4746
4750
|
describe: "List composition patterns",
|
|
4747
|
-
builder: (
|
|
4751
|
+
builder: (yargs41) => withFormatOptions(
|
|
4748
4752
|
withConfiguration(
|
|
4749
4753
|
withApiOptions(
|
|
4750
4754
|
withDebugOptions(
|
|
4751
4755
|
withProjectOptions(
|
|
4752
4756
|
withStateOptions(
|
|
4753
|
-
|
|
4757
|
+
yargs41.options({
|
|
4754
4758
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
4755
4759
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
4756
4760
|
resolvePatterns: {
|
|
@@ -4794,12 +4798,12 @@ var CompositionPatternListModule = {
|
|
|
4794
4798
|
var CompositionPatternPublishModule = {
|
|
4795
4799
|
...CompositionPublishModule,
|
|
4796
4800
|
describe: "Publishes composition pattern(s)",
|
|
4797
|
-
builder: (
|
|
4801
|
+
builder: (yargs41) => withConfiguration(
|
|
4798
4802
|
withApiOptions(
|
|
4799
4803
|
withDebugOptions(
|
|
4800
4804
|
withProjectOptions(
|
|
4801
4805
|
withDiffOptions(
|
|
4802
|
-
|
|
4806
|
+
yargs41.positional("ids", {
|
|
4803
4807
|
describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4804
4808
|
type: "string"
|
|
4805
4809
|
}).option("all", {
|
|
@@ -4838,13 +4842,13 @@ var CompositionPatternPublishModule = {
|
|
|
4838
4842
|
var CompositionPatternPullModule = {
|
|
4839
4843
|
...componentInstancePullModuleFactory("compositionPatterns"),
|
|
4840
4844
|
describe: "Pulls all composition patterns to local files in a directory",
|
|
4841
|
-
builder: (
|
|
4845
|
+
builder: (yargs41) => withConfiguration(
|
|
4842
4846
|
withApiOptions(
|
|
4843
4847
|
withDebugOptions(
|
|
4844
4848
|
withProjectOptions(
|
|
4845
4849
|
withStateOptions(
|
|
4846
4850
|
withDiffOptions(
|
|
4847
|
-
|
|
4851
|
+
yargs41.positional("directory", {
|
|
4848
4852
|
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.",
|
|
4849
4853
|
type: "string"
|
|
4850
4854
|
}).option("format", {
|
|
@@ -4882,13 +4886,13 @@ var CompositionPatternPullModule = {
|
|
|
4882
4886
|
var CompositionPatternPushModule = {
|
|
4883
4887
|
...componentInstancePushModuleFactory("compositionPatterns"),
|
|
4884
4888
|
describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
|
|
4885
|
-
builder: (
|
|
4889
|
+
builder: (yargs41) => withConfiguration(
|
|
4886
4890
|
withApiOptions(
|
|
4887
4891
|
withDebugOptions(
|
|
4888
4892
|
withProjectOptions(
|
|
4889
4893
|
withStateOptions(
|
|
4890
4894
|
withDiffOptions(
|
|
4891
|
-
|
|
4895
|
+
yargs41.positional("directory", {
|
|
4892
4896
|
describe: "Directory to read the compositions patterns from. If a filename is used, a package will be read instead.",
|
|
4893
4897
|
type: "string"
|
|
4894
4898
|
}).option("mode", {
|
|
@@ -4927,11 +4931,11 @@ var CompositionPatternRemoveModule = {
|
|
|
4927
4931
|
var CompositionPatternUnpublishModule = {
|
|
4928
4932
|
command: "unpublish [ids]",
|
|
4929
4933
|
describe: "Unpublish a composition pattern(s)",
|
|
4930
|
-
builder: (
|
|
4934
|
+
builder: (yargs41) => withConfiguration(
|
|
4931
4935
|
withApiOptions(
|
|
4932
4936
|
withDebugOptions(
|
|
4933
4937
|
withProjectOptions(
|
|
4934
|
-
|
|
4938
|
+
yargs41.positional("ids", {
|
|
4935
4939
|
describe: "Un-publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4936
4940
|
type: "string"
|
|
4937
4941
|
}).option("all", {
|
|
@@ -4967,7 +4971,7 @@ var CompositionPatternUpdateModule = {
|
|
|
4967
4971
|
var CompositionPatternModule = {
|
|
4968
4972
|
command: "composition-pattern <command>",
|
|
4969
4973
|
describe: "Commands for Canvas composition patterns",
|
|
4970
|
-
builder: (
|
|
4974
|
+
builder: (yargs41) => yargs41.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
|
|
4971
4975
|
handler: () => {
|
|
4972
4976
|
yargs9.help();
|
|
4973
4977
|
}
|
|
@@ -4988,12 +4992,12 @@ function getContentClient(options) {
|
|
|
4988
4992
|
var ContentTypeGetModule = {
|
|
4989
4993
|
command: "get <id>",
|
|
4990
4994
|
describe: "Get a content type",
|
|
4991
|
-
builder: (
|
|
4995
|
+
builder: (yargs41) => withConfiguration(
|
|
4992
4996
|
withDebugOptions(
|
|
4993
4997
|
withFormatOptions(
|
|
4994
4998
|
withApiOptions(
|
|
4995
4999
|
withProjectOptions(
|
|
4996
|
-
|
|
5000
|
+
yargs41.positional("id", {
|
|
4997
5001
|
demandOption: true,
|
|
4998
5002
|
describe: "Content type public ID to fetch"
|
|
4999
5003
|
})
|
|
@@ -5018,7 +5022,7 @@ var ContentTypeGetModule = {
|
|
|
5018
5022
|
var ContentTypeListModule = {
|
|
5019
5023
|
command: "list",
|
|
5020
5024
|
describe: "List content types",
|
|
5021
|
-
builder: (
|
|
5025
|
+
builder: (yargs41) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs41))))),
|
|
5022
5026
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5023
5027
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
5024
5028
|
const client = getContentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -5059,12 +5063,12 @@ function createContentTypeEngineDataSource({
|
|
|
5059
5063
|
var ContentTypePullModule = {
|
|
5060
5064
|
command: "pull <directory>",
|
|
5061
5065
|
describe: "Pulls all content types to local files in a directory",
|
|
5062
|
-
builder: (
|
|
5066
|
+
builder: (yargs41) => withConfiguration(
|
|
5063
5067
|
withApiOptions(
|
|
5064
5068
|
withDebugOptions(
|
|
5065
5069
|
withProjectOptions(
|
|
5066
5070
|
withDiffOptions(
|
|
5067
|
-
|
|
5071
|
+
yargs41.positional("directory", {
|
|
5068
5072
|
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.",
|
|
5069
5073
|
type: "string"
|
|
5070
5074
|
}).option("format", {
|
|
@@ -5144,12 +5148,12 @@ var ContentTypePullModule = {
|
|
|
5144
5148
|
var ContentTypePushModule = {
|
|
5145
5149
|
command: "push <directory>",
|
|
5146
5150
|
describe: "Pushes all content types from files in a directory to Uniform",
|
|
5147
|
-
builder: (
|
|
5151
|
+
builder: (yargs41) => withConfiguration(
|
|
5148
5152
|
withApiOptions(
|
|
5149
5153
|
withDebugOptions(
|
|
5150
5154
|
withProjectOptions(
|
|
5151
5155
|
withDiffOptions(
|
|
5152
|
-
|
|
5156
|
+
yargs41.positional("directory", {
|
|
5153
5157
|
describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
|
|
5154
5158
|
type: "string"
|
|
5155
5159
|
}).option("what-if", {
|
|
@@ -5223,11 +5227,11 @@ var ContentTypeRemoveModule = {
|
|
|
5223
5227
|
command: "remove <id>",
|
|
5224
5228
|
aliases: ["delete", "rm"],
|
|
5225
5229
|
describe: "Delete a content type",
|
|
5226
|
-
builder: (
|
|
5230
|
+
builder: (yargs41) => withConfiguration(
|
|
5227
5231
|
withDebugOptions(
|
|
5228
5232
|
withApiOptions(
|
|
5229
5233
|
withProjectOptions(
|
|
5230
|
-
|
|
5234
|
+
yargs41.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
|
|
5231
5235
|
)
|
|
5232
5236
|
)
|
|
5233
5237
|
)
|
|
@@ -5248,11 +5252,11 @@ var ContentTypeUpdateModule = {
|
|
|
5248
5252
|
command: "update <filename>",
|
|
5249
5253
|
aliases: ["put"],
|
|
5250
5254
|
describe: "Insert or update a content type",
|
|
5251
|
-
builder: (
|
|
5255
|
+
builder: (yargs41) => withConfiguration(
|
|
5252
5256
|
withDebugOptions(
|
|
5253
5257
|
withApiOptions(
|
|
5254
5258
|
withProjectOptions(
|
|
5255
|
-
|
|
5259
|
+
yargs41.positional("filename", { demandOption: true, describe: "Content type file to put" })
|
|
5256
5260
|
)
|
|
5257
5261
|
)
|
|
5258
5262
|
)
|
|
@@ -5274,7 +5278,7 @@ var ContentTypeModule = {
|
|
|
5274
5278
|
command: "contenttype <command>",
|
|
5275
5279
|
aliases: ["ct"],
|
|
5276
5280
|
describe: "Commands for Content Types",
|
|
5277
|
-
builder: (
|
|
5281
|
+
builder: (yargs41) => yargs41.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
|
|
5278
5282
|
handler: () => {
|
|
5279
5283
|
yargs10.help();
|
|
5280
5284
|
}
|
|
@@ -5293,11 +5297,11 @@ function getDataSourceClient(options) {
|
|
|
5293
5297
|
var DataSourceGetModule = {
|
|
5294
5298
|
command: "get <id>",
|
|
5295
5299
|
describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
|
|
5296
|
-
builder: (
|
|
5300
|
+
builder: (yargs41) => withConfiguration(
|
|
5297
5301
|
withApiOptions(
|
|
5298
5302
|
withDebugOptions(
|
|
5299
5303
|
withProjectOptions(
|
|
5300
|
-
|
|
5304
|
+
yargs41.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
|
|
5301
5305
|
)
|
|
5302
5306
|
)
|
|
5303
5307
|
)
|
|
@@ -5315,11 +5319,11 @@ var DataSourceRemoveModule = {
|
|
|
5315
5319
|
command: "remove <id>",
|
|
5316
5320
|
aliases: ["delete", "rm"],
|
|
5317
5321
|
describe: "Delete a data source",
|
|
5318
|
-
builder: (
|
|
5322
|
+
builder: (yargs41) => withConfiguration(
|
|
5319
5323
|
withDebugOptions(
|
|
5320
5324
|
withApiOptions(
|
|
5321
5325
|
withProjectOptions(
|
|
5322
|
-
|
|
5326
|
+
yargs41.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
|
|
5323
5327
|
)
|
|
5324
5328
|
)
|
|
5325
5329
|
)
|
|
@@ -5340,11 +5344,11 @@ var DataSourceUpdateModule = {
|
|
|
5340
5344
|
command: "update <dataSource>",
|
|
5341
5345
|
aliases: ["put"],
|
|
5342
5346
|
describe: "Insert or update a data source",
|
|
5343
|
-
builder: (
|
|
5347
|
+
builder: (yargs41) => withConfiguration(
|
|
5344
5348
|
withApiOptions(
|
|
5345
5349
|
withDebugOptions(
|
|
5346
5350
|
withProjectOptions(
|
|
5347
|
-
|
|
5351
|
+
yargs41.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
|
|
5348
5352
|
describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
|
|
5349
5353
|
type: "string",
|
|
5350
5354
|
demandOption: true
|
|
@@ -5379,7 +5383,7 @@ var DataSourceModule = {
|
|
|
5379
5383
|
command: "datasource <command>",
|
|
5380
5384
|
aliases: ["ds"],
|
|
5381
5385
|
describe: "Commands for Data Source definitions",
|
|
5382
|
-
builder: (
|
|
5386
|
+
builder: (yargs41) => yargs41.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
|
|
5383
5387
|
handler: () => {
|
|
5384
5388
|
yargs11.help();
|
|
5385
5389
|
}
|
|
@@ -5401,12 +5405,12 @@ var DataTypeGetModule = {
|
|
|
5401
5405
|
command: "get <id>",
|
|
5402
5406
|
describe: "Get a data type",
|
|
5403
5407
|
aliases: ["ls"],
|
|
5404
|
-
builder: (
|
|
5408
|
+
builder: (yargs41) => withConfiguration(
|
|
5405
5409
|
withFormatOptions(
|
|
5406
5410
|
withDebugOptions(
|
|
5407
5411
|
withApiOptions(
|
|
5408
5412
|
withProjectOptions(
|
|
5409
|
-
|
|
5413
|
+
yargs41.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
|
|
5410
5414
|
)
|
|
5411
5415
|
)
|
|
5412
5416
|
)
|
|
@@ -5429,7 +5433,7 @@ var DataTypeListModule = {
|
|
|
5429
5433
|
command: "list",
|
|
5430
5434
|
describe: "List data types",
|
|
5431
5435
|
aliases: ["ls"],
|
|
5432
|
-
builder: (
|
|
5436
|
+
builder: (yargs41) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs41))))),
|
|
5433
5437
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5434
5438
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
5435
5439
|
const client = getDataTypeClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -5472,12 +5476,12 @@ function createDataTypeEngineDataSource({
|
|
|
5472
5476
|
var DataTypePullModule = {
|
|
5473
5477
|
command: "pull <directory>",
|
|
5474
5478
|
describe: "Pulls all data types to local files in a directory",
|
|
5475
|
-
builder: (
|
|
5479
|
+
builder: (yargs41) => withConfiguration(
|
|
5476
5480
|
withApiOptions(
|
|
5477
5481
|
withDebugOptions(
|
|
5478
5482
|
withProjectOptions(
|
|
5479
5483
|
withDiffOptions(
|
|
5480
|
-
|
|
5484
|
+
yargs41.positional("directory", {
|
|
5481
5485
|
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.",
|
|
5482
5486
|
type: "string"
|
|
5483
5487
|
}).option("format", {
|
|
@@ -5557,12 +5561,12 @@ var DataTypePullModule = {
|
|
|
5557
5561
|
var DataTypePushModule = {
|
|
5558
5562
|
command: "push <directory>",
|
|
5559
5563
|
describe: "Pushes all data types from files in a directory to Uniform",
|
|
5560
|
-
builder: (
|
|
5564
|
+
builder: (yargs41) => withConfiguration(
|
|
5561
5565
|
withApiOptions(
|
|
5562
5566
|
withDebugOptions(
|
|
5563
5567
|
withProjectOptions(
|
|
5564
5568
|
withDiffOptions(
|
|
5565
|
-
|
|
5569
|
+
yargs41.positional("directory", {
|
|
5566
5570
|
describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
|
|
5567
5571
|
type: "string"
|
|
5568
5572
|
}).option("mode", {
|
|
@@ -5631,11 +5635,11 @@ var DataTypeRemoveModule = {
|
|
|
5631
5635
|
command: "remove <id>",
|
|
5632
5636
|
aliases: ["delete", "rm"],
|
|
5633
5637
|
describe: "Delete a data type",
|
|
5634
|
-
builder: (
|
|
5638
|
+
builder: (yargs41) => withConfiguration(
|
|
5635
5639
|
withDebugOptions(
|
|
5636
5640
|
withApiOptions(
|
|
5637
5641
|
withProjectOptions(
|
|
5638
|
-
|
|
5642
|
+
yargs41.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
|
|
5639
5643
|
)
|
|
5640
5644
|
)
|
|
5641
5645
|
)
|
|
@@ -5656,11 +5660,11 @@ var DataTypeUpdateModule = {
|
|
|
5656
5660
|
command: "update <filename>",
|
|
5657
5661
|
aliases: ["put"],
|
|
5658
5662
|
describe: "Insert or update a data type",
|
|
5659
|
-
builder: (
|
|
5663
|
+
builder: (yargs41) => withConfiguration(
|
|
5660
5664
|
withDebugOptions(
|
|
5661
5665
|
withApiOptions(
|
|
5662
5666
|
withProjectOptions(
|
|
5663
|
-
|
|
5667
|
+
yargs41.positional("filename", { demandOption: true, describe: "Data type file to put" })
|
|
5664
5668
|
)
|
|
5665
5669
|
)
|
|
5666
5670
|
)
|
|
@@ -5682,7 +5686,7 @@ var DataTypeModule = {
|
|
|
5682
5686
|
command: "datatype <command>",
|
|
5683
5687
|
aliases: ["dt"],
|
|
5684
5688
|
describe: "Commands for Data Type definitions",
|
|
5685
|
-
builder: (
|
|
5689
|
+
builder: (yargs41) => yargs41.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
|
|
5686
5690
|
handler: () => {
|
|
5687
5691
|
yargs12.help();
|
|
5688
5692
|
}
|
|
@@ -5695,13 +5699,13 @@ import yargs13 from "yargs";
|
|
|
5695
5699
|
var EntryGetModule = {
|
|
5696
5700
|
command: "get <id>",
|
|
5697
5701
|
describe: "Get an entry",
|
|
5698
|
-
builder: (
|
|
5702
|
+
builder: (yargs41) => withConfiguration(
|
|
5699
5703
|
withDebugOptions(
|
|
5700
5704
|
withFormatOptions(
|
|
5701
5705
|
withApiOptions(
|
|
5702
5706
|
withProjectOptions(
|
|
5703
5707
|
withStateOptions(
|
|
5704
|
-
|
|
5708
|
+
yargs41.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
|
|
5705
5709
|
resolveData: {
|
|
5706
5710
|
type: "boolean",
|
|
5707
5711
|
default: false,
|
|
@@ -5773,13 +5777,13 @@ var LEGACY_DEFAULT_LIMIT = 1e3;
|
|
|
5773
5777
|
var EntryListModule = {
|
|
5774
5778
|
command: "list",
|
|
5775
5779
|
describe: "List entries",
|
|
5776
|
-
builder: (
|
|
5780
|
+
builder: (yargs41) => withConfiguration(
|
|
5777
5781
|
withDebugOptions(
|
|
5778
5782
|
withFormatOptions(
|
|
5779
5783
|
withApiOptions(
|
|
5780
5784
|
withProjectOptions(
|
|
5781
5785
|
withStateOptions(
|
|
5782
|
-
|
|
5786
|
+
yargs41.options({
|
|
5783
5787
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
5784
5788
|
limit: {
|
|
5785
5789
|
describe: "Number of rows to fetch",
|
|
@@ -5914,12 +5918,12 @@ function createEntryEngineDataSource({
|
|
|
5914
5918
|
var EntryPublishModule = {
|
|
5915
5919
|
command: "publish [ids]",
|
|
5916
5920
|
describe: "Publishes entry(ies)",
|
|
5917
|
-
builder: (
|
|
5921
|
+
builder: (yargs41) => withConfiguration(
|
|
5918
5922
|
withDiffOptions(
|
|
5919
5923
|
withApiOptions(
|
|
5920
5924
|
withProjectOptions(
|
|
5921
5925
|
withDiffOptions(
|
|
5922
|
-
|
|
5926
|
+
yargs41.positional("ids", {
|
|
5923
5927
|
describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
5924
5928
|
type: "string"
|
|
5925
5929
|
}).option("all", {
|
|
@@ -5994,13 +5998,13 @@ var EntryPublishModule = {
|
|
|
5994
5998
|
var EntryPullModule = {
|
|
5995
5999
|
command: "pull <directory>",
|
|
5996
6000
|
describe: "Pulls all entries to local files in a directory",
|
|
5997
|
-
builder: (
|
|
6001
|
+
builder: (yargs41) => withConfiguration(
|
|
5998
6002
|
withDebugOptions(
|
|
5999
6003
|
withApiOptions(
|
|
6000
6004
|
withProjectOptions(
|
|
6001
6005
|
withStateOptions(
|
|
6002
6006
|
withDiffOptions(
|
|
6003
|
-
|
|
6007
|
+
yargs41.positional("directory", {
|
|
6004
6008
|
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.",
|
|
6005
6009
|
type: "string"
|
|
6006
6010
|
}).option("format", {
|
|
@@ -6100,13 +6104,13 @@ var EntryPullModule = {
|
|
|
6100
6104
|
var EntryPushModule = {
|
|
6101
6105
|
command: "push <directory>",
|
|
6102
6106
|
describe: "Pushes all entries from files in a directory to Uniform",
|
|
6103
|
-
builder: (
|
|
6107
|
+
builder: (yargs41) => withConfiguration(
|
|
6104
6108
|
withDebugOptions(
|
|
6105
6109
|
withApiOptions(
|
|
6106
6110
|
withProjectOptions(
|
|
6107
6111
|
withStateOptions(
|
|
6108
6112
|
withDiffOptions(
|
|
6109
|
-
|
|
6113
|
+
yargs41.positional("directory", {
|
|
6110
6114
|
describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
|
|
6111
6115
|
type: "string"
|
|
6112
6116
|
}).option("mode", {
|
|
@@ -6205,11 +6209,11 @@ var EntryRemoveModule = {
|
|
|
6205
6209
|
command: "remove <id>",
|
|
6206
6210
|
aliases: ["delete", "rm"],
|
|
6207
6211
|
describe: "Delete an entry",
|
|
6208
|
-
builder: (
|
|
6212
|
+
builder: (yargs41) => withConfiguration(
|
|
6209
6213
|
withDebugOptions(
|
|
6210
6214
|
withApiOptions(
|
|
6211
6215
|
withProjectOptions(
|
|
6212
|
-
|
|
6216
|
+
yargs41.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
|
|
6213
6217
|
)
|
|
6214
6218
|
)
|
|
6215
6219
|
)
|
|
@@ -6231,11 +6235,11 @@ import { diffJson as diffJson3 } from "diff";
|
|
|
6231
6235
|
var EntryUnpublishModule = {
|
|
6232
6236
|
command: "unpublish [ids]",
|
|
6233
6237
|
describe: "Unpublish an entry(ies)",
|
|
6234
|
-
builder: (
|
|
6238
|
+
builder: (yargs41) => withConfiguration(
|
|
6235
6239
|
withDebugOptions(
|
|
6236
6240
|
withApiOptions(
|
|
6237
6241
|
withProjectOptions(
|
|
6238
|
-
|
|
6242
|
+
yargs41.positional("ids", {
|
|
6239
6243
|
describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
6240
6244
|
type: "string"
|
|
6241
6245
|
}).option("all", {
|
|
@@ -6305,12 +6309,12 @@ var EntryUpdateModule = {
|
|
|
6305
6309
|
command: "update <filename>",
|
|
6306
6310
|
aliases: ["put"],
|
|
6307
6311
|
describe: "Insert or update an entry",
|
|
6308
|
-
builder: (
|
|
6312
|
+
builder: (yargs41) => withConfiguration(
|
|
6309
6313
|
withDebugOptions(
|
|
6310
6314
|
withApiOptions(
|
|
6311
6315
|
withProjectOptions(
|
|
6312
6316
|
withStateOptions(
|
|
6313
|
-
|
|
6317
|
+
yargs41.positional("filename", { demandOption: true, describe: "Entry file to put" })
|
|
6314
6318
|
)
|
|
6315
6319
|
)
|
|
6316
6320
|
)
|
|
@@ -6342,7 +6346,7 @@ var EntryUpdateModule = {
|
|
|
6342
6346
|
var EntryModule = {
|
|
6343
6347
|
command: "entry <command>",
|
|
6344
6348
|
describe: "Commands for Entries",
|
|
6345
|
-
builder: (
|
|
6349
|
+
builder: (yargs41) => yargs41.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
|
|
6346
6350
|
handler: () => {
|
|
6347
6351
|
yargs13.help();
|
|
6348
6352
|
}
|
|
@@ -6355,13 +6359,13 @@ import yargs14 from "yargs";
|
|
|
6355
6359
|
var EntryPatternGetModule = {
|
|
6356
6360
|
command: "get <id>",
|
|
6357
6361
|
describe: "Get an entry pattern",
|
|
6358
|
-
builder: (
|
|
6362
|
+
builder: (yargs41) => withConfiguration(
|
|
6359
6363
|
withDebugOptions(
|
|
6360
6364
|
withFormatOptions(
|
|
6361
6365
|
withApiOptions(
|
|
6362
6366
|
withProjectOptions(
|
|
6363
6367
|
withStateOptions(
|
|
6364
|
-
|
|
6368
|
+
yargs41.positional("id", {
|
|
6365
6369
|
demandOption: true,
|
|
6366
6370
|
describe: "Entry pattern public ID to fetch"
|
|
6367
6371
|
}).option({
|
|
@@ -6414,13 +6418,13 @@ var EntryPatternGetModule = {
|
|
|
6414
6418
|
var EntryPatternListModule = {
|
|
6415
6419
|
command: "list",
|
|
6416
6420
|
describe: "List entry patterns",
|
|
6417
|
-
builder: (
|
|
6421
|
+
builder: (yargs41) => withConfiguration(
|
|
6418
6422
|
withDebugOptions(
|
|
6419
6423
|
withFormatOptions(
|
|
6420
6424
|
withApiOptions(
|
|
6421
6425
|
withProjectOptions(
|
|
6422
6426
|
withStateOptions(
|
|
6423
|
-
|
|
6427
|
+
yargs41.option({
|
|
6424
6428
|
withComponentIDs: {
|
|
6425
6429
|
type: "boolean",
|
|
6426
6430
|
default: false,
|
|
@@ -6466,12 +6470,12 @@ var EntryPatternListModule = {
|
|
|
6466
6470
|
var EntryPatternPublishModule = {
|
|
6467
6471
|
command: "publish [ids]",
|
|
6468
6472
|
describe: "Publishes entry pattern(s)",
|
|
6469
|
-
builder: (
|
|
6473
|
+
builder: (yargs41) => withConfiguration(
|
|
6470
6474
|
withDebugOptions(
|
|
6471
6475
|
withApiOptions(
|
|
6472
6476
|
withProjectOptions(
|
|
6473
6477
|
withDiffOptions(
|
|
6474
|
-
|
|
6478
|
+
yargs41.positional("ids", {
|
|
6475
6479
|
describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
6476
6480
|
type: "string"
|
|
6477
6481
|
}).option("all", {
|
|
@@ -6546,13 +6550,13 @@ var EntryPatternPublishModule = {
|
|
|
6546
6550
|
var EntryPatternPullModule = {
|
|
6547
6551
|
command: "pull <directory>",
|
|
6548
6552
|
describe: "Pulls all entry patterns to local files in a directory",
|
|
6549
|
-
builder: (
|
|
6553
|
+
builder: (yargs41) => withConfiguration(
|
|
6550
6554
|
withApiOptions(
|
|
6551
6555
|
withDebugOptions(
|
|
6552
6556
|
withProjectOptions(
|
|
6553
6557
|
withStateOptions(
|
|
6554
6558
|
withDiffOptions(
|
|
6555
|
-
|
|
6559
|
+
yargs41.positional("directory", {
|
|
6556
6560
|
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.",
|
|
6557
6561
|
type: "string"
|
|
6558
6562
|
}).option("format", {
|
|
@@ -6652,13 +6656,13 @@ var EntryPatternPullModule = {
|
|
|
6652
6656
|
var EntryPatternPushModule = {
|
|
6653
6657
|
command: "push <directory>",
|
|
6654
6658
|
describe: "Pushes all entry patterns from files in a directory to Uniform",
|
|
6655
|
-
builder: (
|
|
6659
|
+
builder: (yargs41) => withConfiguration(
|
|
6656
6660
|
withDebugOptions(
|
|
6657
6661
|
withApiOptions(
|
|
6658
6662
|
withProjectOptions(
|
|
6659
6663
|
withStateOptions(
|
|
6660
6664
|
withDiffOptions(
|
|
6661
|
-
|
|
6665
|
+
yargs41.positional("directory", {
|
|
6662
6666
|
describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
|
|
6663
6667
|
type: "string"
|
|
6664
6668
|
}).option("what-if", {
|
|
@@ -6762,11 +6766,11 @@ var EntryPatternRemoveModule = {
|
|
|
6762
6766
|
command: "remove <id>",
|
|
6763
6767
|
aliases: ["delete", "rm"],
|
|
6764
6768
|
describe: "Delete an entry pattern",
|
|
6765
|
-
builder: (
|
|
6769
|
+
builder: (yargs41) => withConfiguration(
|
|
6766
6770
|
withDebugOptions(
|
|
6767
6771
|
withApiOptions(
|
|
6768
6772
|
withProjectOptions(
|
|
6769
|
-
|
|
6773
|
+
yargs41.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
|
|
6770
6774
|
)
|
|
6771
6775
|
)
|
|
6772
6776
|
)
|
|
@@ -6788,11 +6792,11 @@ import { diffJson as diffJson4 } from "diff";
|
|
|
6788
6792
|
var EntryPatternUnpublishModule = {
|
|
6789
6793
|
command: "unpublish [ids]",
|
|
6790
6794
|
describe: "Unpublish an entry patterns",
|
|
6791
|
-
builder: (
|
|
6795
|
+
builder: (yargs41) => withConfiguration(
|
|
6792
6796
|
withDebugOptions(
|
|
6793
6797
|
withApiOptions(
|
|
6794
6798
|
withProjectOptions(
|
|
6795
|
-
|
|
6799
|
+
yargs41.positional("ids", {
|
|
6796
6800
|
describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
6797
6801
|
type: "string"
|
|
6798
6802
|
}).option("all", {
|
|
@@ -6862,12 +6866,12 @@ var EntryPatternUpdateModule = {
|
|
|
6862
6866
|
command: "update <filename>",
|
|
6863
6867
|
aliases: ["put"],
|
|
6864
6868
|
describe: "Insert or update an entry pattern",
|
|
6865
|
-
builder: (
|
|
6869
|
+
builder: (yargs41) => withConfiguration(
|
|
6866
6870
|
withDebugOptions(
|
|
6867
6871
|
withApiOptions(
|
|
6868
6872
|
withProjectOptions(
|
|
6869
6873
|
withStateOptions(
|
|
6870
|
-
|
|
6874
|
+
yargs41.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
|
|
6871
6875
|
)
|
|
6872
6876
|
)
|
|
6873
6877
|
)
|
|
@@ -6903,7 +6907,7 @@ var EntryPatternUpdateModule = {
|
|
|
6903
6907
|
var EntryPatternModule = {
|
|
6904
6908
|
command: "entry-pattern <command>",
|
|
6905
6909
|
describe: "Commands for Entry patterns",
|
|
6906
|
-
builder: (
|
|
6910
|
+
builder: (yargs41) => yargs41.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
|
|
6907
6911
|
handler: () => {
|
|
6908
6912
|
yargs14.help();
|
|
6909
6913
|
}
|
|
@@ -6952,12 +6956,12 @@ function getLocaleClient(options) {
|
|
|
6952
6956
|
var LocalePullModule = {
|
|
6953
6957
|
command: "pull <directory>",
|
|
6954
6958
|
describe: "Pulls all locales to local files in a directory",
|
|
6955
|
-
builder: (
|
|
6959
|
+
builder: (yargs41) => withConfiguration(
|
|
6956
6960
|
withDebugOptions(
|
|
6957
6961
|
withApiOptions(
|
|
6958
6962
|
withProjectOptions(
|
|
6959
6963
|
withDiffOptions(
|
|
6960
|
-
|
|
6964
|
+
yargs41.positional("directory", {
|
|
6961
6965
|
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.",
|
|
6962
6966
|
type: "string"
|
|
6963
6967
|
}).option("format", {
|
|
@@ -7037,12 +7041,12 @@ var LocalePullModule = {
|
|
|
7037
7041
|
var LocalePushModule = {
|
|
7038
7042
|
command: "push <directory>",
|
|
7039
7043
|
describe: "Pushes all locales from files in a directory to Uniform",
|
|
7040
|
-
builder: (
|
|
7044
|
+
builder: (yargs41) => withConfiguration(
|
|
7041
7045
|
withDebugOptions(
|
|
7042
7046
|
withApiOptions(
|
|
7043
7047
|
withProjectOptions(
|
|
7044
7048
|
withDiffOptions(
|
|
7045
|
-
|
|
7049
|
+
yargs41.positional("directory", {
|
|
7046
7050
|
describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
|
|
7047
7051
|
type: "string"
|
|
7048
7052
|
}).option("mode", {
|
|
@@ -7110,7 +7114,7 @@ var LocalePushModule = {
|
|
|
7110
7114
|
var LocaleModule = {
|
|
7111
7115
|
command: "locale <command>",
|
|
7112
7116
|
describe: "Commands for locale definitions",
|
|
7113
|
-
builder: (
|
|
7117
|
+
builder: (yargs41) => yargs41.command(LocalePullModule).command(LocalePushModule),
|
|
7114
7118
|
handler: () => {
|
|
7115
7119
|
yargs15.help();
|
|
7116
7120
|
}
|
|
@@ -7131,12 +7135,12 @@ function getPreviewClient(options) {
|
|
|
7131
7135
|
var PreviewUrlGetModule = {
|
|
7132
7136
|
command: "get <id>",
|
|
7133
7137
|
describe: "Fetch a preview URL",
|
|
7134
|
-
builder: (
|
|
7138
|
+
builder: (yargs41) => withConfiguration(
|
|
7135
7139
|
withFormatOptions(
|
|
7136
7140
|
withDebugOptions(
|
|
7137
7141
|
withApiOptions(
|
|
7138
7142
|
withProjectOptions(
|
|
7139
|
-
|
|
7143
|
+
yargs41.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
|
|
7140
7144
|
)
|
|
7141
7145
|
)
|
|
7142
7146
|
)
|
|
@@ -7160,8 +7164,8 @@ var PreviewUrlListModule = {
|
|
|
7160
7164
|
command: "list",
|
|
7161
7165
|
describe: "List preview URLs",
|
|
7162
7166
|
aliases: ["ls"],
|
|
7163
|
-
builder: (
|
|
7164
|
-
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(
|
|
7167
|
+
builder: (yargs41) => withConfiguration(
|
|
7168
|
+
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs41.options({})))))
|
|
7165
7169
|
),
|
|
7166
7170
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7167
7171
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7203,12 +7207,12 @@ function createPreviewUrlEngineDataSource({
|
|
|
7203
7207
|
var PreviewUrlPullModule = {
|
|
7204
7208
|
command: "pull <directory>",
|
|
7205
7209
|
describe: "Pulls all preview urls to local files in a directory",
|
|
7206
|
-
builder: (
|
|
7210
|
+
builder: (yargs41) => withConfiguration(
|
|
7207
7211
|
withApiOptions(
|
|
7208
7212
|
withProjectOptions(
|
|
7209
7213
|
withDebugOptions(
|
|
7210
7214
|
withDiffOptions(
|
|
7211
|
-
|
|
7215
|
+
yargs41.positional("directory", {
|
|
7212
7216
|
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.",
|
|
7213
7217
|
type: "string"
|
|
7214
7218
|
}).option("format", {
|
|
@@ -7283,12 +7287,12 @@ var PreviewUrlPullModule = {
|
|
|
7283
7287
|
var PreviewUrlPushModule = {
|
|
7284
7288
|
command: "push <directory>",
|
|
7285
7289
|
describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
|
|
7286
|
-
builder: (
|
|
7290
|
+
builder: (yargs41) => withConfiguration(
|
|
7287
7291
|
withApiOptions(
|
|
7288
7292
|
withProjectOptions(
|
|
7289
7293
|
withDiffOptions(
|
|
7290
7294
|
withDebugOptions(
|
|
7291
|
-
|
|
7295
|
+
yargs41.positional("directory", {
|
|
7292
7296
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7293
7297
|
type: "string"
|
|
7294
7298
|
}).option("mode", {
|
|
@@ -7352,11 +7356,11 @@ var PreviewUrlRemoveModule = {
|
|
|
7352
7356
|
command: "remove <id>",
|
|
7353
7357
|
aliases: ["delete", "rm"],
|
|
7354
7358
|
describe: "Delete a preview URL",
|
|
7355
|
-
builder: (
|
|
7359
|
+
builder: (yargs41) => withConfiguration(
|
|
7356
7360
|
withApiOptions(
|
|
7357
7361
|
withDebugOptions(
|
|
7358
7362
|
withProjectOptions(
|
|
7359
|
-
|
|
7363
|
+
yargs41.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
|
|
7360
7364
|
)
|
|
7361
7365
|
)
|
|
7362
7366
|
)
|
|
@@ -7377,11 +7381,11 @@ var PreviewUrlUpdateModule = {
|
|
|
7377
7381
|
command: "update <filename>",
|
|
7378
7382
|
aliases: ["put"],
|
|
7379
7383
|
describe: "Insert or update a preview URL",
|
|
7380
|
-
builder: (
|
|
7384
|
+
builder: (yargs41) => withConfiguration(
|
|
7381
7385
|
withDebugOptions(
|
|
7382
7386
|
withApiOptions(
|
|
7383
7387
|
withProjectOptions(
|
|
7384
|
-
|
|
7388
|
+
yargs41.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
7385
7389
|
)
|
|
7386
7390
|
)
|
|
7387
7391
|
)
|
|
@@ -7403,7 +7407,7 @@ var PreviewUrlModule = {
|
|
|
7403
7407
|
command: "preview-url <command>",
|
|
7404
7408
|
aliases: ["pu"],
|
|
7405
7409
|
describe: "Commands for Canvas preview urls",
|
|
7406
|
-
builder: (
|
|
7410
|
+
builder: (yargs41) => yargs41.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
|
|
7407
7411
|
handler: () => {
|
|
7408
7412
|
yargs16.help();
|
|
7409
7413
|
}
|
|
@@ -7416,12 +7420,12 @@ import yargs17 from "yargs";
|
|
|
7416
7420
|
var PreviewViewportGetModule = {
|
|
7417
7421
|
command: "get <id>",
|
|
7418
7422
|
describe: "Fetch a preview viewport",
|
|
7419
|
-
builder: (
|
|
7423
|
+
builder: (yargs41) => withConfiguration(
|
|
7420
7424
|
withFormatOptions(
|
|
7421
7425
|
withDebugOptions(
|
|
7422
7426
|
withApiOptions(
|
|
7423
7427
|
withProjectOptions(
|
|
7424
|
-
|
|
7428
|
+
yargs41.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
|
|
7425
7429
|
)
|
|
7426
7430
|
)
|
|
7427
7431
|
)
|
|
@@ -7445,8 +7449,8 @@ var PreviewViewportListModule = {
|
|
|
7445
7449
|
command: "list",
|
|
7446
7450
|
describe: "List preview viewports",
|
|
7447
7451
|
aliases: ["ls"],
|
|
7448
|
-
builder: (
|
|
7449
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
7452
|
+
builder: (yargs41) => withConfiguration(
|
|
7453
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs41.options({})))))
|
|
7450
7454
|
),
|
|
7451
7455
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7452
7456
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7492,12 +7496,12 @@ function createPreviewViewportEngineDataSource({
|
|
|
7492
7496
|
var PreviewViewportPullModule = {
|
|
7493
7497
|
command: "pull <directory>",
|
|
7494
7498
|
describe: "Pulls all preview viewports to local files in a directory",
|
|
7495
|
-
builder: (
|
|
7499
|
+
builder: (yargs41) => withConfiguration(
|
|
7496
7500
|
withApiOptions(
|
|
7497
7501
|
withProjectOptions(
|
|
7498
7502
|
withDebugOptions(
|
|
7499
7503
|
withDiffOptions(
|
|
7500
|
-
|
|
7504
|
+
yargs41.positional("directory", {
|
|
7501
7505
|
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.",
|
|
7502
7506
|
type: "string"
|
|
7503
7507
|
}).option("format", {
|
|
@@ -7572,12 +7576,12 @@ var PreviewViewportPullModule = {
|
|
|
7572
7576
|
var PreviewViewportPushModule = {
|
|
7573
7577
|
command: "push <directory>",
|
|
7574
7578
|
describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
|
|
7575
|
-
builder: (
|
|
7579
|
+
builder: (yargs41) => withConfiguration(
|
|
7576
7580
|
withApiOptions(
|
|
7577
7581
|
withProjectOptions(
|
|
7578
7582
|
withDiffOptions(
|
|
7579
7583
|
withDebugOptions(
|
|
7580
|
-
|
|
7584
|
+
yargs41.positional("directory", {
|
|
7581
7585
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7582
7586
|
type: "string"
|
|
7583
7587
|
}).option("mode", {
|
|
@@ -7641,11 +7645,11 @@ var PreviewViewportRemoveModule = {
|
|
|
7641
7645
|
command: "remove <id>",
|
|
7642
7646
|
aliases: ["delete", "rm"],
|
|
7643
7647
|
describe: "Delete a preview viewport",
|
|
7644
|
-
builder: (
|
|
7648
|
+
builder: (yargs41) => withConfiguration(
|
|
7645
7649
|
withApiOptions(
|
|
7646
7650
|
withDebugOptions(
|
|
7647
7651
|
withProjectOptions(
|
|
7648
|
-
|
|
7652
|
+
yargs41.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
|
|
7649
7653
|
)
|
|
7650
7654
|
)
|
|
7651
7655
|
)
|
|
@@ -7666,11 +7670,11 @@ var PreviewViewportUpdateModule = {
|
|
|
7666
7670
|
command: "update <filename>",
|
|
7667
7671
|
aliases: ["put"],
|
|
7668
7672
|
describe: "Insert or update a preview viewport",
|
|
7669
|
-
builder: (
|
|
7673
|
+
builder: (yargs41) => withConfiguration(
|
|
7670
7674
|
withDebugOptions(
|
|
7671
7675
|
withApiOptions(
|
|
7672
7676
|
withProjectOptions(
|
|
7673
|
-
|
|
7677
|
+
yargs41.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
|
|
7674
7678
|
)
|
|
7675
7679
|
)
|
|
7676
7680
|
)
|
|
@@ -7692,7 +7696,7 @@ var PreviewViewportModule = {
|
|
|
7692
7696
|
command: "preview-viewport <command>",
|
|
7693
7697
|
aliases: ["pv"],
|
|
7694
7698
|
describe: "Commands for Canvas preview viewports",
|
|
7695
|
-
builder: (
|
|
7699
|
+
builder: (yargs41) => yargs41.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
|
|
7696
7700
|
handler: () => {
|
|
7697
7701
|
yargs17.help();
|
|
7698
7702
|
}
|
|
@@ -7711,12 +7715,12 @@ var getPromptClient = (options) => new PromptClient({ ...options, bypassCache: t
|
|
|
7711
7715
|
var PromptGetModule = {
|
|
7712
7716
|
command: "get <id>",
|
|
7713
7717
|
describe: "Get a prompt",
|
|
7714
|
-
builder: (
|
|
7718
|
+
builder: (yargs41) => withConfiguration(
|
|
7715
7719
|
withDebugOptions(
|
|
7716
7720
|
withFormatOptions(
|
|
7717
7721
|
withApiOptions(
|
|
7718
7722
|
withProjectOptions(
|
|
7719
|
-
|
|
7723
|
+
yargs41.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
|
|
7720
7724
|
)
|
|
7721
7725
|
)
|
|
7722
7726
|
)
|
|
@@ -7737,7 +7741,7 @@ var PromptGetModule = {
|
|
|
7737
7741
|
var PromptListModule = {
|
|
7738
7742
|
command: "list",
|
|
7739
7743
|
describe: "List prompts",
|
|
7740
|
-
builder: (
|
|
7744
|
+
builder: (yargs41) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs41))))),
|
|
7741
7745
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7742
7746
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7743
7747
|
const client = getPromptClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -7778,13 +7782,13 @@ function createPromptEngineDataSource({
|
|
|
7778
7782
|
var PromptPullModule = {
|
|
7779
7783
|
command: "pull <directory>",
|
|
7780
7784
|
describe: "Pulls all prompts to local files in a directory",
|
|
7781
|
-
builder: (
|
|
7785
|
+
builder: (yargs41) => withConfiguration(
|
|
7782
7786
|
withDebugOptions(
|
|
7783
7787
|
withApiOptions(
|
|
7784
7788
|
withProjectOptions(
|
|
7785
7789
|
withStateOptions(
|
|
7786
7790
|
withDiffOptions(
|
|
7787
|
-
|
|
7791
|
+
yargs41.positional("directory", {
|
|
7788
7792
|
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.",
|
|
7789
7793
|
type: "string"
|
|
7790
7794
|
}).option("format", {
|
|
@@ -7865,12 +7869,12 @@ var PromptPullModule = {
|
|
|
7865
7869
|
var PromptPushModule = {
|
|
7866
7870
|
command: "push <directory>",
|
|
7867
7871
|
describe: "Pushes all prompts from files in a directory to Uniform",
|
|
7868
|
-
builder: (
|
|
7872
|
+
builder: (yargs41) => withConfiguration(
|
|
7869
7873
|
withApiOptions(
|
|
7870
7874
|
withProjectOptions(
|
|
7871
7875
|
withStateOptions(
|
|
7872
7876
|
withDiffOptions(
|
|
7873
|
-
|
|
7877
|
+
yargs41.positional("directory", {
|
|
7874
7878
|
describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
|
|
7875
7879
|
type: "string"
|
|
7876
7880
|
}).option("mode", {
|
|
@@ -7939,10 +7943,10 @@ var PromptRemoveModule = {
|
|
|
7939
7943
|
command: "remove <id>",
|
|
7940
7944
|
aliases: ["delete", "rm"],
|
|
7941
7945
|
describe: "Delete a prompt",
|
|
7942
|
-
builder: (
|
|
7946
|
+
builder: (yargs41) => withConfiguration(
|
|
7943
7947
|
withDebugOptions(
|
|
7944
7948
|
withApiOptions(
|
|
7945
|
-
withProjectOptions(
|
|
7949
|
+
withProjectOptions(yargs41.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
|
|
7946
7950
|
)
|
|
7947
7951
|
)
|
|
7948
7952
|
),
|
|
@@ -7962,11 +7966,11 @@ var PromptUpdateModule = {
|
|
|
7962
7966
|
command: "update <filename>",
|
|
7963
7967
|
aliases: ["put"],
|
|
7964
7968
|
describe: "Insert or update a prompt",
|
|
7965
|
-
builder: (
|
|
7969
|
+
builder: (yargs41) => withConfiguration(
|
|
7966
7970
|
withDebugOptions(
|
|
7967
7971
|
withApiOptions(
|
|
7968
7972
|
withProjectOptions(
|
|
7969
|
-
|
|
7973
|
+
yargs41.positional("filename", { demandOption: true, describe: "Prompt file to put" })
|
|
7970
7974
|
)
|
|
7971
7975
|
)
|
|
7972
7976
|
)
|
|
@@ -7988,7 +7992,7 @@ var PromptModule = {
|
|
|
7988
7992
|
command: "prompt <command>",
|
|
7989
7993
|
aliases: ["dt"],
|
|
7990
7994
|
describe: "Commands for AI Prompt definitions",
|
|
7991
|
-
builder: (
|
|
7995
|
+
builder: (yargs41) => yargs41.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
|
|
7992
7996
|
handler: () => {
|
|
7993
7997
|
yargs18.help();
|
|
7994
7998
|
}
|
|
@@ -8038,12 +8042,12 @@ function createWorkflowEngineDataSource({
|
|
|
8038
8042
|
var WorkflowPullModule = {
|
|
8039
8043
|
command: "pull <directory>",
|
|
8040
8044
|
describe: "Pulls all workflows to local files in a directory",
|
|
8041
|
-
builder: (
|
|
8045
|
+
builder: (yargs41) => withConfiguration(
|
|
8042
8046
|
withApiOptions(
|
|
8043
8047
|
withDebugOptions(
|
|
8044
8048
|
withProjectOptions(
|
|
8045
8049
|
withDiffOptions(
|
|
8046
|
-
|
|
8050
|
+
yargs41.positional("directory", {
|
|
8047
8051
|
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.",
|
|
8048
8052
|
type: "string"
|
|
8049
8053
|
}).option("format", {
|
|
@@ -8118,12 +8122,12 @@ var WorkflowPullModule = {
|
|
|
8118
8122
|
var WorkflowPushModule = {
|
|
8119
8123
|
command: "push <directory>",
|
|
8120
8124
|
describe: "Pushes all workflows from files in a directory to Uniform Canvas",
|
|
8121
|
-
builder: (
|
|
8125
|
+
builder: (yargs41) => withConfiguration(
|
|
8122
8126
|
withDebugOptions(
|
|
8123
8127
|
withApiOptions(
|
|
8124
8128
|
withProjectOptions(
|
|
8125
8129
|
withDiffOptions(
|
|
8126
|
-
|
|
8130
|
+
yargs41.positional("directory", {
|
|
8127
8131
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
8128
8132
|
type: "string"
|
|
8129
8133
|
}).option("mode", {
|
|
@@ -8187,7 +8191,7 @@ var WorkflowModule = {
|
|
|
8187
8191
|
command: "workflow <command>",
|
|
8188
8192
|
aliases: ["wf"],
|
|
8189
8193
|
describe: "Commands for Canvas workflows",
|
|
8190
|
-
builder: (
|
|
8194
|
+
builder: (yargs41) => yargs41.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
|
|
8191
8195
|
handler: () => {
|
|
8192
8196
|
yargs19.help();
|
|
8193
8197
|
}
|
|
@@ -8198,7 +8202,7 @@ var CanvasCommand = {
|
|
|
8198
8202
|
command: "canvas <command>",
|
|
8199
8203
|
aliases: ["cv", "pm", "presentation"],
|
|
8200
8204
|
describe: "Uniform Canvas commands",
|
|
8201
|
-
builder: (
|
|
8205
|
+
builder: (yargs41) => yargs41.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(ComponentPatternModule).command(CompositionPatternModule).command(ContentTypeModule).command(EntryModule).command(EntryPatternModule).command(PromptModule).command(AssetModule).command(LocaleModule).command(WorkflowModule).command(PreviewUrlModule).command(PreviewViewportModule).demandCommand(),
|
|
8202
8206
|
handler: () => {
|
|
8203
8207
|
yargs20.showHelp();
|
|
8204
8208
|
}
|
|
@@ -8220,11 +8224,11 @@ var getAggregateClient = (options) => new AggregateClient({ ...options, bypassCa
|
|
|
8220
8224
|
var AggregateGetModule = {
|
|
8221
8225
|
command: "get <id>",
|
|
8222
8226
|
describe: "Fetch an aggregate",
|
|
8223
|
-
builder: (
|
|
8227
|
+
builder: (yargs41) => withConfiguration(
|
|
8224
8228
|
withFormatOptions(
|
|
8225
8229
|
withApiOptions(
|
|
8226
8230
|
withProjectOptions(
|
|
8227
|
-
|
|
8231
|
+
yargs41.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
|
|
8228
8232
|
)
|
|
8229
8233
|
)
|
|
8230
8234
|
)
|
|
@@ -8247,7 +8251,7 @@ var AggregateListModule = {
|
|
|
8247
8251
|
command: "list",
|
|
8248
8252
|
describe: "List aggregates",
|
|
8249
8253
|
aliases: ["ls"],
|
|
8250
|
-
builder: (
|
|
8254
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
8251
8255
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8252
8256
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8253
8257
|
const client = getAggregateClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8310,12 +8314,12 @@ function writeContextPackage(filename, packageContents) {
|
|
|
8310
8314
|
var AggregatePullModule = {
|
|
8311
8315
|
command: "pull <directory>",
|
|
8312
8316
|
describe: "Pulls all aggregates to local files in a directory",
|
|
8313
|
-
builder: (
|
|
8317
|
+
builder: (yargs41) => withConfiguration(
|
|
8314
8318
|
withApiOptions(
|
|
8315
8319
|
withDebugOptions(
|
|
8316
8320
|
withProjectOptions(
|
|
8317
8321
|
withDiffOptions(
|
|
8318
|
-
|
|
8322
|
+
yargs41.positional("directory", {
|
|
8319
8323
|
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.",
|
|
8320
8324
|
type: "string"
|
|
8321
8325
|
}).option("format", {
|
|
@@ -8390,12 +8394,12 @@ var AggregatePullModule = {
|
|
|
8390
8394
|
var AggregatePushModule = {
|
|
8391
8395
|
command: "push <directory>",
|
|
8392
8396
|
describe: "Pushes all aggregates from files in a directory or package to Uniform",
|
|
8393
|
-
builder: (
|
|
8397
|
+
builder: (yargs41) => withConfiguration(
|
|
8394
8398
|
withApiOptions(
|
|
8395
8399
|
withProjectOptions(
|
|
8396
8400
|
withDiffOptions(
|
|
8397
8401
|
withDebugOptions(
|
|
8398
|
-
|
|
8402
|
+
yargs41.positional("directory", {
|
|
8399
8403
|
describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
|
|
8400
8404
|
type: "string"
|
|
8401
8405
|
}).option("mode", {
|
|
@@ -8460,10 +8464,10 @@ var AggregateRemoveModule = {
|
|
|
8460
8464
|
command: "remove <id>",
|
|
8461
8465
|
aliases: ["delete", "rm"],
|
|
8462
8466
|
describe: "Delete an aggregate",
|
|
8463
|
-
builder: (
|
|
8467
|
+
builder: (yargs41) => withConfiguration(
|
|
8464
8468
|
withApiOptions(
|
|
8465
8469
|
withProjectOptions(
|
|
8466
|
-
|
|
8470
|
+
yargs41.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
|
|
8467
8471
|
)
|
|
8468
8472
|
)
|
|
8469
8473
|
),
|
|
@@ -8479,10 +8483,10 @@ var AggregateUpdateModule = {
|
|
|
8479
8483
|
command: "update <filename>",
|
|
8480
8484
|
aliases: ["put"],
|
|
8481
8485
|
describe: "Insert or update an aggregate",
|
|
8482
|
-
builder: (
|
|
8486
|
+
builder: (yargs41) => withConfiguration(
|
|
8483
8487
|
withApiOptions(
|
|
8484
8488
|
withProjectOptions(
|
|
8485
|
-
|
|
8489
|
+
yargs41.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
|
|
8486
8490
|
)
|
|
8487
8491
|
)
|
|
8488
8492
|
),
|
|
@@ -8499,7 +8503,7 @@ var AggregateModule = {
|
|
|
8499
8503
|
command: "aggregate <command>",
|
|
8500
8504
|
aliases: ["agg", "intent", "audience"],
|
|
8501
8505
|
describe: "Commands for Context aggregates (intents, audiences)",
|
|
8502
|
-
builder: (
|
|
8506
|
+
builder: (yargs41) => yargs41.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
|
|
8503
8507
|
handler: () => {
|
|
8504
8508
|
yargs21.help();
|
|
8505
8509
|
}
|
|
@@ -8520,11 +8524,11 @@ function getEnrichmentClient(options) {
|
|
|
8520
8524
|
var EnrichmentGetModule = {
|
|
8521
8525
|
command: "get <id>",
|
|
8522
8526
|
describe: "Fetch an enrichment category and its values",
|
|
8523
|
-
builder: (
|
|
8527
|
+
builder: (yargs41) => withFormatOptions(
|
|
8524
8528
|
withConfiguration(
|
|
8525
8529
|
withApiOptions(
|
|
8526
8530
|
withProjectOptions(
|
|
8527
|
-
|
|
8531
|
+
yargs41.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
|
|
8528
8532
|
)
|
|
8529
8533
|
)
|
|
8530
8534
|
)
|
|
@@ -8547,7 +8551,7 @@ var EnrichmentListModule = {
|
|
|
8547
8551
|
command: "list",
|
|
8548
8552
|
describe: "List enrichments",
|
|
8549
8553
|
aliases: ["ls"],
|
|
8550
|
-
builder: (
|
|
8554
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
8551
8555
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8552
8556
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8553
8557
|
const client = getEnrichmentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8642,12 +8646,12 @@ var createEnrichmentValueEngineDataSource = ({
|
|
|
8642
8646
|
var EnrichmentPullModule = {
|
|
8643
8647
|
command: "pull <directory>",
|
|
8644
8648
|
describe: "Pulls all enrichments to local files in a directory",
|
|
8645
|
-
builder: (
|
|
8649
|
+
builder: (yargs41) => withConfiguration(
|
|
8646
8650
|
withDebugOptions(
|
|
8647
8651
|
withApiOptions(
|
|
8648
8652
|
withProjectOptions(
|
|
8649
8653
|
withDiffOptions(
|
|
8650
|
-
|
|
8654
|
+
yargs41.positional("directory", {
|
|
8651
8655
|
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.",
|
|
8652
8656
|
type: "string"
|
|
8653
8657
|
}).option("format", {
|
|
@@ -8722,11 +8726,11 @@ var EnrichmentPullModule = {
|
|
|
8722
8726
|
var EnrichmentPushModule = {
|
|
8723
8727
|
command: "push <directory>",
|
|
8724
8728
|
describe: "Pushes all enrichments from files in a directory or package to Uniform",
|
|
8725
|
-
builder: (
|
|
8729
|
+
builder: (yargs41) => withConfiguration(
|
|
8726
8730
|
withApiOptions(
|
|
8727
8731
|
withProjectOptions(
|
|
8728
8732
|
withDiffOptions(
|
|
8729
|
-
|
|
8733
|
+
yargs41.positional("directory", {
|
|
8730
8734
|
describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
|
|
8731
8735
|
type: "string"
|
|
8732
8736
|
}).option("mode", {
|
|
@@ -8789,10 +8793,10 @@ var EnrichmentRemoveModule = {
|
|
|
8789
8793
|
command: "remove <id>",
|
|
8790
8794
|
aliases: ["delete", "rm"],
|
|
8791
8795
|
describe: "Delete an enrichment category and its values",
|
|
8792
|
-
builder: (
|
|
8796
|
+
builder: (yargs41) => withConfiguration(
|
|
8793
8797
|
withApiOptions(
|
|
8794
8798
|
withProjectOptions(
|
|
8795
|
-
|
|
8799
|
+
yargs41.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
|
|
8796
8800
|
)
|
|
8797
8801
|
)
|
|
8798
8802
|
),
|
|
@@ -8808,7 +8812,7 @@ var EnrichmentModule = {
|
|
|
8808
8812
|
command: "enrichment <command>",
|
|
8809
8813
|
aliases: ["enr"],
|
|
8810
8814
|
describe: "Commands for Context enrichments",
|
|
8811
|
-
builder: (
|
|
8815
|
+
builder: (yargs41) => yargs41.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
|
|
8812
8816
|
handler: () => {
|
|
8813
8817
|
yargs22.help();
|
|
8814
8818
|
}
|
|
@@ -8826,10 +8830,10 @@ var ManifestGetModule = {
|
|
|
8826
8830
|
command: "get [output]",
|
|
8827
8831
|
aliases: ["dl", "download"],
|
|
8828
8832
|
describe: "Download the Uniform Context manifest for a project",
|
|
8829
|
-
builder: (
|
|
8833
|
+
builder: (yargs41) => withConfiguration(
|
|
8830
8834
|
withApiOptions(
|
|
8831
8835
|
withProjectOptions(
|
|
8832
|
-
|
|
8836
|
+
yargs41.option("preview", {
|
|
8833
8837
|
describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
|
|
8834
8838
|
default: false,
|
|
8835
8839
|
type: "boolean",
|
|
@@ -8891,7 +8895,7 @@ import { exit as exit2 } from "process";
|
|
|
8891
8895
|
var ManifestPublishModule = {
|
|
8892
8896
|
command: "publish",
|
|
8893
8897
|
describe: "Publish the Uniform Context manifest for a project",
|
|
8894
|
-
builder: (
|
|
8898
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withProjectOptions(yargs41))),
|
|
8895
8899
|
handler: async ({ apiKey, apiHost, proxy, project }) => {
|
|
8896
8900
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8897
8901
|
try {
|
|
@@ -8924,7 +8928,7 @@ var ManifestModule = {
|
|
|
8924
8928
|
command: "manifest <command>",
|
|
8925
8929
|
describe: "Commands for context manifests",
|
|
8926
8930
|
aliases: ["man"],
|
|
8927
|
-
builder: (
|
|
8931
|
+
builder: (yargs41) => yargs41.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
|
|
8928
8932
|
handler: () => {
|
|
8929
8933
|
yargs23.help();
|
|
8930
8934
|
}
|
|
@@ -8938,11 +8942,11 @@ import { UncachedQuirkClient } from "@uniformdev/context/api";
|
|
|
8938
8942
|
var QuirkGetModule = {
|
|
8939
8943
|
command: "get <id>",
|
|
8940
8944
|
describe: "Fetch a quirk",
|
|
8941
|
-
builder: (
|
|
8945
|
+
builder: (yargs41) => withConfiguration(
|
|
8942
8946
|
withFormatOptions(
|
|
8943
8947
|
withApiOptions(
|
|
8944
8948
|
withProjectOptions(
|
|
8945
|
-
|
|
8949
|
+
yargs41.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
|
|
8946
8950
|
)
|
|
8947
8951
|
)
|
|
8948
8952
|
)
|
|
@@ -8966,11 +8970,11 @@ var QuirkListModule = {
|
|
|
8966
8970
|
command: "list",
|
|
8967
8971
|
describe: "List quirks",
|
|
8968
8972
|
aliases: ["ls"],
|
|
8969
|
-
builder: (
|
|
8973
|
+
builder: (yargs41) => withConfiguration(
|
|
8970
8974
|
withFormatOptions(
|
|
8971
8975
|
withApiOptions(
|
|
8972
8976
|
withProjectOptions(
|
|
8973
|
-
|
|
8977
|
+
yargs41.option("withIntegrations", {
|
|
8974
8978
|
alias: ["i"],
|
|
8975
8979
|
describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
|
|
8976
8980
|
type: "boolean"
|
|
@@ -9028,12 +9032,12 @@ function createQuirkEngineDataSource({
|
|
|
9028
9032
|
var QuirkPullModule = {
|
|
9029
9033
|
command: "pull <directory>",
|
|
9030
9034
|
describe: "Pulls all quirks to local files in a directory",
|
|
9031
|
-
builder: (
|
|
9035
|
+
builder: (yargs41) => withConfiguration(
|
|
9032
9036
|
withDebugOptions(
|
|
9033
9037
|
withApiOptions(
|
|
9034
9038
|
withProjectOptions(
|
|
9035
9039
|
withDiffOptions(
|
|
9036
|
-
|
|
9040
|
+
yargs41.positional("directory", {
|
|
9037
9041
|
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.",
|
|
9038
9042
|
type: "string"
|
|
9039
9043
|
}).option("format", {
|
|
@@ -9109,12 +9113,12 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
|
|
|
9109
9113
|
var QuirkPushModule = {
|
|
9110
9114
|
command: "push <directory>",
|
|
9111
9115
|
describe: "Pushes all quirks from files in a directory or package to Uniform",
|
|
9112
|
-
builder: (
|
|
9116
|
+
builder: (yargs41) => withConfiguration(
|
|
9113
9117
|
withDebugOptions(
|
|
9114
9118
|
withApiOptions(
|
|
9115
9119
|
withProjectOptions(
|
|
9116
9120
|
withDiffOptions(
|
|
9117
|
-
|
|
9121
|
+
yargs41.positional("directory", {
|
|
9118
9122
|
describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
|
|
9119
9123
|
type: "string"
|
|
9120
9124
|
}).option("mode", {
|
|
@@ -9179,10 +9183,10 @@ var QuirkRemoveModule = {
|
|
|
9179
9183
|
command: "remove <id>",
|
|
9180
9184
|
aliases: ["delete", "rm"],
|
|
9181
9185
|
describe: "Delete a quirk",
|
|
9182
|
-
builder: (
|
|
9186
|
+
builder: (yargs41) => withConfiguration(
|
|
9183
9187
|
withApiOptions(
|
|
9184
9188
|
withProjectOptions(
|
|
9185
|
-
|
|
9189
|
+
yargs41.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
|
|
9186
9190
|
)
|
|
9187
9191
|
)
|
|
9188
9192
|
),
|
|
@@ -9199,10 +9203,10 @@ var QuirkUpdateModule = {
|
|
|
9199
9203
|
command: "update <filename>",
|
|
9200
9204
|
aliases: ["put"],
|
|
9201
9205
|
describe: "Insert or update a quirk",
|
|
9202
|
-
builder: (
|
|
9206
|
+
builder: (yargs41) => withConfiguration(
|
|
9203
9207
|
withApiOptions(
|
|
9204
9208
|
withProjectOptions(
|
|
9205
|
-
|
|
9209
|
+
yargs41.positional("filename", { demandOption: true, describe: "Quirk file to put" })
|
|
9206
9210
|
)
|
|
9207
9211
|
)
|
|
9208
9212
|
),
|
|
@@ -9219,7 +9223,7 @@ var QuirkModule = {
|
|
|
9219
9223
|
command: "quirk <command>",
|
|
9220
9224
|
aliases: ["qk"],
|
|
9221
9225
|
describe: "Commands for Context quirks",
|
|
9222
|
-
builder: (
|
|
9226
|
+
builder: (yargs41) => yargs41.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
|
|
9223
9227
|
handler: () => {
|
|
9224
9228
|
yargs24.help();
|
|
9225
9229
|
}
|
|
@@ -9233,11 +9237,11 @@ import { UncachedSignalClient } from "@uniformdev/context/api";
|
|
|
9233
9237
|
var SignalGetModule = {
|
|
9234
9238
|
command: "get <id>",
|
|
9235
9239
|
describe: "Fetch a signal",
|
|
9236
|
-
builder: (
|
|
9240
|
+
builder: (yargs41) => withConfiguration(
|
|
9237
9241
|
withFormatOptions(
|
|
9238
9242
|
withApiOptions(
|
|
9239
9243
|
withProjectOptions(
|
|
9240
|
-
|
|
9244
|
+
yargs41.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
|
|
9241
9245
|
)
|
|
9242
9246
|
)
|
|
9243
9247
|
)
|
|
@@ -9261,7 +9265,7 @@ var SignalListModule = {
|
|
|
9261
9265
|
command: "list",
|
|
9262
9266
|
describe: "List signals",
|
|
9263
9267
|
aliases: ["ls"],
|
|
9264
|
-
builder: (
|
|
9268
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
9265
9269
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9266
9270
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9267
9271
|
const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9311,12 +9315,12 @@ function createSignalEngineDataSource({
|
|
|
9311
9315
|
var SignalPullModule = {
|
|
9312
9316
|
command: "pull <directory>",
|
|
9313
9317
|
describe: "Pulls all signals to local files in a directory",
|
|
9314
|
-
builder: (
|
|
9318
|
+
builder: (yargs41) => withConfiguration(
|
|
9315
9319
|
withDebugOptions(
|
|
9316
9320
|
withApiOptions(
|
|
9317
9321
|
withProjectOptions(
|
|
9318
9322
|
withDiffOptions(
|
|
9319
|
-
|
|
9323
|
+
yargs41.positional("directory", {
|
|
9320
9324
|
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.",
|
|
9321
9325
|
type: "string"
|
|
9322
9326
|
}).option("format", {
|
|
@@ -9392,12 +9396,12 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
|
|
|
9392
9396
|
var SignalPushModule = {
|
|
9393
9397
|
command: "push <directory>",
|
|
9394
9398
|
describe: "Pushes all signals from files in a directory or package to Uniform",
|
|
9395
|
-
builder: (
|
|
9399
|
+
builder: (yargs41) => withConfiguration(
|
|
9396
9400
|
withDebugOptions(
|
|
9397
9401
|
withApiOptions(
|
|
9398
9402
|
withProjectOptions(
|
|
9399
9403
|
withDiffOptions(
|
|
9400
|
-
|
|
9404
|
+
yargs41.positional("directory", {
|
|
9401
9405
|
describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
|
|
9402
9406
|
type: "string"
|
|
9403
9407
|
}).option("mode", {
|
|
@@ -9462,10 +9466,10 @@ var SignalRemoveModule = {
|
|
|
9462
9466
|
command: "remove <id>",
|
|
9463
9467
|
aliases: ["delete", "rm"],
|
|
9464
9468
|
describe: "Delete a signal",
|
|
9465
|
-
builder: (
|
|
9469
|
+
builder: (yargs41) => withConfiguration(
|
|
9466
9470
|
withApiOptions(
|
|
9467
9471
|
withProjectOptions(
|
|
9468
|
-
|
|
9472
|
+
yargs41.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
|
|
9469
9473
|
)
|
|
9470
9474
|
)
|
|
9471
9475
|
),
|
|
@@ -9482,10 +9486,10 @@ var SignalUpdateModule = {
|
|
|
9482
9486
|
command: "update <filename>",
|
|
9483
9487
|
aliases: ["put"],
|
|
9484
9488
|
describe: "Insert or update a signal",
|
|
9485
|
-
builder: (
|
|
9489
|
+
builder: (yargs41) => withConfiguration(
|
|
9486
9490
|
withApiOptions(
|
|
9487
9491
|
withProjectOptions(
|
|
9488
|
-
|
|
9492
|
+
yargs41.positional("filename", { demandOption: true, describe: "Signal file to put" })
|
|
9489
9493
|
)
|
|
9490
9494
|
)
|
|
9491
9495
|
),
|
|
@@ -9502,7 +9506,7 @@ var SignalModule = {
|
|
|
9502
9506
|
command: "signal <command>",
|
|
9503
9507
|
aliases: ["sig"],
|
|
9504
9508
|
describe: "Commands for Context signals",
|
|
9505
|
-
builder: (
|
|
9509
|
+
builder: (yargs41) => yargs41.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
|
|
9506
9510
|
handler: () => {
|
|
9507
9511
|
yargs25.help();
|
|
9508
9512
|
}
|
|
@@ -9516,11 +9520,11 @@ import { UncachedTestClient } from "@uniformdev/context/api";
|
|
|
9516
9520
|
var TestGetModule = {
|
|
9517
9521
|
command: "get <id>",
|
|
9518
9522
|
describe: "Fetch a test",
|
|
9519
|
-
builder: (
|
|
9523
|
+
builder: (yargs41) => withConfiguration(
|
|
9520
9524
|
withFormatOptions(
|
|
9521
9525
|
withApiOptions(
|
|
9522
9526
|
withProjectOptions(
|
|
9523
|
-
|
|
9527
|
+
yargs41.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
|
|
9524
9528
|
)
|
|
9525
9529
|
)
|
|
9526
9530
|
)
|
|
@@ -9544,7 +9548,7 @@ var TestListModule = {
|
|
|
9544
9548
|
command: "list",
|
|
9545
9549
|
describe: "List tests",
|
|
9546
9550
|
aliases: ["ls"],
|
|
9547
|
-
builder: (
|
|
9551
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
9548
9552
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9549
9553
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9550
9554
|
const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9594,12 +9598,12 @@ function createTestEngineDataSource({
|
|
|
9594
9598
|
var TestPullModule = {
|
|
9595
9599
|
command: "pull <directory>",
|
|
9596
9600
|
describe: "Pulls all tests to local files in a directory",
|
|
9597
|
-
builder: (
|
|
9601
|
+
builder: (yargs41) => withConfiguration(
|
|
9598
9602
|
withDebugOptions(
|
|
9599
9603
|
withApiOptions(
|
|
9600
9604
|
withProjectOptions(
|
|
9601
9605
|
withDiffOptions(
|
|
9602
|
-
|
|
9606
|
+
yargs41.positional("directory", {
|
|
9603
9607
|
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.",
|
|
9604
9608
|
type: "string"
|
|
9605
9609
|
}).option("format", {
|
|
@@ -9675,12 +9679,12 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
|
|
|
9675
9679
|
var TestPushModule = {
|
|
9676
9680
|
command: "push <directory>",
|
|
9677
9681
|
describe: "Pushes all tests from files in a directory or package to Uniform",
|
|
9678
|
-
builder: (
|
|
9682
|
+
builder: (yargs41) => withConfiguration(
|
|
9679
9683
|
withDebugOptions(
|
|
9680
9684
|
withApiOptions(
|
|
9681
9685
|
withProjectOptions(
|
|
9682
9686
|
withDiffOptions(
|
|
9683
|
-
|
|
9687
|
+
yargs41.positional("directory", {
|
|
9684
9688
|
describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
|
|
9685
9689
|
type: "string"
|
|
9686
9690
|
}).option("mode", {
|
|
@@ -9745,10 +9749,10 @@ var TestRemoveModule = {
|
|
|
9745
9749
|
command: "remove <id>",
|
|
9746
9750
|
aliases: ["delete", "rm"],
|
|
9747
9751
|
describe: "Delete a test",
|
|
9748
|
-
builder: (
|
|
9752
|
+
builder: (yargs41) => withConfiguration(
|
|
9749
9753
|
withApiOptions(
|
|
9750
9754
|
withProjectOptions(
|
|
9751
|
-
|
|
9755
|
+
yargs41.positional("id", { demandOption: true, describe: "Test public ID to delete" })
|
|
9752
9756
|
)
|
|
9753
9757
|
)
|
|
9754
9758
|
),
|
|
@@ -9765,9 +9769,9 @@ var TestUpdateModule = {
|
|
|
9765
9769
|
command: "update <filename>",
|
|
9766
9770
|
aliases: ["put"],
|
|
9767
9771
|
describe: "Insert or update a test",
|
|
9768
|
-
builder: (
|
|
9772
|
+
builder: (yargs41) => withConfiguration(
|
|
9769
9773
|
withApiOptions(
|
|
9770
|
-
withProjectOptions(
|
|
9774
|
+
withProjectOptions(yargs41.positional("filename", { demandOption: true, describe: "Test file to put" }))
|
|
9771
9775
|
)
|
|
9772
9776
|
),
|
|
9773
9777
|
handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
|
|
@@ -9782,7 +9786,7 @@ var TestUpdateModule = {
|
|
|
9782
9786
|
var TestModule = {
|
|
9783
9787
|
command: "test <command>",
|
|
9784
9788
|
describe: "Commands for Context A/B tests",
|
|
9785
|
-
builder: (
|
|
9789
|
+
builder: (yargs41) => yargs41.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
|
|
9786
9790
|
handler: () => {
|
|
9787
9791
|
yargs26.help();
|
|
9788
9792
|
}
|
|
@@ -9793,24 +9797,57 @@ var ContextCommand = {
|
|
|
9793
9797
|
command: "context <command>",
|
|
9794
9798
|
aliases: ["ctx"],
|
|
9795
9799
|
describe: "Uniform Context commands",
|
|
9796
|
-
builder: (
|
|
9800
|
+
builder: (yargs41) => yargs41.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
|
|
9797
9801
|
handler: () => {
|
|
9798
9802
|
yargs27.showHelp();
|
|
9799
9803
|
}
|
|
9800
9804
|
};
|
|
9801
9805
|
|
|
9802
9806
|
// src/commands/integration/index.ts
|
|
9803
|
-
import
|
|
9807
|
+
import yargs32 from "yargs";
|
|
9804
9808
|
|
|
9805
9809
|
// src/commands/integration/commands/definition.ts
|
|
9806
|
-
import
|
|
9810
|
+
import yargs31 from "yargs";
|
|
9807
9811
|
|
|
9808
|
-
// src/commands/integration/commands/definition/
|
|
9812
|
+
// src/commands/integration/commands/definition/dataResourceEditor/dataResourceEditor.ts
|
|
9809
9813
|
import yargs28 from "yargs";
|
|
9810
9814
|
|
|
9811
|
-
// src/commands/integration/commands/definition/
|
|
9815
|
+
// src/commands/integration/commands/definition/dataResourceEditor/deploy.ts
|
|
9812
9816
|
import { readFileSync as readFileSync2 } from "fs";
|
|
9813
9817
|
|
|
9818
|
+
// src/commands/integration/commands/definition/bundleWorkerCode.ts
|
|
9819
|
+
import esbuild from "esbuild";
|
|
9820
|
+
import path5 from "path";
|
|
9821
|
+
async function bundleWorkerCode(entryFile) {
|
|
9822
|
+
const result = await esbuild.build({
|
|
9823
|
+
entryPoints: [entryFile],
|
|
9824
|
+
bundle: true,
|
|
9825
|
+
// Don't write to disk, build to memory
|
|
9826
|
+
write: false,
|
|
9827
|
+
format: "esm",
|
|
9828
|
+
target: "es2021",
|
|
9829
|
+
platform: "browser",
|
|
9830
|
+
minify: true,
|
|
9831
|
+
// Force inlining of all dependencies
|
|
9832
|
+
external: [],
|
|
9833
|
+
// Ensure single file output
|
|
9834
|
+
splitting: false,
|
|
9835
|
+
sourcemap: false
|
|
9836
|
+
});
|
|
9837
|
+
const outputFiles = result.outputFiles;
|
|
9838
|
+
if (!outputFiles || outputFiles.length === 0) {
|
|
9839
|
+
throw new Error(`No output generated for ${entryFile}`);
|
|
9840
|
+
}
|
|
9841
|
+
const outputFile = outputFiles[0];
|
|
9842
|
+
const builtCode = outputFile.text;
|
|
9843
|
+
console.log(
|
|
9844
|
+
`\u2139\uFE0F ${path5.basename(entryFile)} was prepared with esbuild. Size: ${Math.round(
|
|
9845
|
+
builtCode.length / 1024
|
|
9846
|
+
)}kb (use --skipBundle to disable)`
|
|
9847
|
+
);
|
|
9848
|
+
return builtCode;
|
|
9849
|
+
}
|
|
9850
|
+
|
|
9814
9851
|
// src/commands/integration/commands/definition/edgehancer/EdgehancerClient.ts
|
|
9815
9852
|
import { createLimitPolicy as createLimitPolicy2 } from "@uniformdev/canvas";
|
|
9816
9853
|
import { ApiClient } from "@uniformdev/context/api";
|
|
@@ -9843,9 +9880,102 @@ var EdgehancerClient = class extends ApiClient {
|
|
|
9843
9880
|
}
|
|
9844
9881
|
};
|
|
9845
9882
|
|
|
9883
|
+
// src/commands/integration/commands/definition/dataResourceEditor/util.ts
|
|
9884
|
+
function withDataResourceEditorIdOptions(yargs41) {
|
|
9885
|
+
return yargs41.option("connectorType", {
|
|
9886
|
+
describe: "Integration data connector type to attach the data resource editor to, as defined in the integration manifest file.",
|
|
9887
|
+
demandOption: true,
|
|
9888
|
+
type: "string"
|
|
9889
|
+
}).option("archetype", {
|
|
9890
|
+
describe: "Data connector archetype to attach the data resource editor to. Must be defined within the connectorType.",
|
|
9891
|
+
demandOption: true,
|
|
9892
|
+
type: "string"
|
|
9893
|
+
}).option("hook", {
|
|
9894
|
+
describe: "Data resource editor hook to deploy to.",
|
|
9895
|
+
demandOption: true,
|
|
9896
|
+
choices: ["createAIDataResourceEdit", "afterAIDataResourceEdit"],
|
|
9897
|
+
type: "string"
|
|
9898
|
+
});
|
|
9899
|
+
}
|
|
9900
|
+
|
|
9901
|
+
// src/commands/integration/commands/definition/dataResourceEditor/deploy.ts
|
|
9902
|
+
var IntegrationDataResourceEditorDeployModule = {
|
|
9903
|
+
command: "deploy <filename>",
|
|
9904
|
+
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.",
|
|
9905
|
+
builder: (yargs41) => withConfiguration(
|
|
9906
|
+
withApiOptions(
|
|
9907
|
+
withTeamOptions(
|
|
9908
|
+
withDataResourceEditorIdOptions(
|
|
9909
|
+
yargs41.positional("filename", {
|
|
9910
|
+
demandOption: true,
|
|
9911
|
+
describe: "ESM code file to run for the target data resource editor hook. Refer to the documentation for expected types."
|
|
9912
|
+
}).option("compatibilityDate", {
|
|
9913
|
+
type: "string",
|
|
9914
|
+
describe: "Date indicating targeted support in the custom data resource editor runtime. Backwards incompatible fixes to the runtime following this date will not affect this custom data resource editor. Format: YYYY-MM-DD. You can check here for more information: https://developers.cloudflare.com/workers/configuration/compatibility-dates/#setting-compatibility-date"
|
|
9915
|
+
}).option("skipBundle", {
|
|
9916
|
+
type: "boolean",
|
|
9917
|
+
default: false,
|
|
9918
|
+
describe: "Skip bundling and transpilation of the input file"
|
|
9919
|
+
})
|
|
9920
|
+
)
|
|
9921
|
+
)
|
|
9922
|
+
)
|
|
9923
|
+
),
|
|
9924
|
+
handler: async ({
|
|
9925
|
+
apiHost,
|
|
9926
|
+
apiKey,
|
|
9927
|
+
proxy,
|
|
9928
|
+
filename,
|
|
9929
|
+
team: teamId,
|
|
9930
|
+
archetype,
|
|
9931
|
+
connectorType,
|
|
9932
|
+
hook,
|
|
9933
|
+
compatibilityDate,
|
|
9934
|
+
skipBundle = false
|
|
9935
|
+
}) => {
|
|
9936
|
+
const fetch2 = nodeFetchProxy(proxy);
|
|
9937
|
+
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
9938
|
+
let code;
|
|
9939
|
+
if (skipBundle) {
|
|
9940
|
+
code = readFileSync2(filename, "utf8");
|
|
9941
|
+
} else {
|
|
9942
|
+
code = await bundleWorkerCode(filename);
|
|
9943
|
+
}
|
|
9944
|
+
await client.deploy({ archetype, code, connectorType, hook, compatibilityDate });
|
|
9945
|
+
}
|
|
9946
|
+
};
|
|
9947
|
+
|
|
9948
|
+
// src/commands/integration/commands/definition/dataResourceEditor/remove.ts
|
|
9949
|
+
var IntegrationDataResourceEditorRemoveModule = {
|
|
9950
|
+
command: "remove",
|
|
9951
|
+
describe: "Removes a custom AI data resource editor hook from a data resource archetype. The API key used must have team admin permissions.",
|
|
9952
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withTeamOptions(withDataResourceEditorIdOptions(yargs41)))),
|
|
9953
|
+
handler: async ({ apiHost, apiKey, proxy, team: teamId, connectorType, archetype, hook }) => {
|
|
9954
|
+
const fetch2 = nodeFetchProxy(proxy);
|
|
9955
|
+
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
9956
|
+
await client.remove({ connectorType, archetype, hook });
|
|
9957
|
+
}
|
|
9958
|
+
};
|
|
9959
|
+
|
|
9960
|
+
// src/commands/integration/commands/definition/dataResourceEditor/dataResourceEditor.ts
|
|
9961
|
+
var IntegrationDataResourceEditorModule = {
|
|
9962
|
+
command: "dataResourceEditor <command>",
|
|
9963
|
+
describe: "Commands for managing custom AI data resource editors at the team level.",
|
|
9964
|
+
builder: (yargs41) => yargs41.command(IntegrationDataResourceEditorDeployModule).command(IntegrationDataResourceEditorRemoveModule).demandCommand(),
|
|
9965
|
+
handler: () => {
|
|
9966
|
+
yargs28.help();
|
|
9967
|
+
}
|
|
9968
|
+
};
|
|
9969
|
+
|
|
9970
|
+
// src/commands/integration/commands/definition/edgehancer/edgehancer.ts
|
|
9971
|
+
import yargs29 from "yargs";
|
|
9972
|
+
|
|
9973
|
+
// src/commands/integration/commands/definition/edgehancer/deploy.ts
|
|
9974
|
+
import { readFileSync as readFileSync3 } from "fs";
|
|
9975
|
+
|
|
9846
9976
|
// src/commands/integration/commands/definition/edgehancer/util.ts
|
|
9847
|
-
function withEdgehancerIdOptions(
|
|
9848
|
-
return
|
|
9977
|
+
function withEdgehancerIdOptions(yargs41) {
|
|
9978
|
+
return yargs41.option("connectorType", {
|
|
9849
9979
|
describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
|
|
9850
9980
|
demandOption: true,
|
|
9851
9981
|
type: "string"
|
|
@@ -9865,16 +9995,20 @@ function withEdgehancerIdOptions(yargs39) {
|
|
|
9865
9995
|
var IntegrationEdgehancerDeployModule = {
|
|
9866
9996
|
command: "deploy <filename>",
|
|
9867
9997
|
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.",
|
|
9868
|
-
builder: (
|
|
9998
|
+
builder: (yargs41) => withConfiguration(
|
|
9869
9999
|
withApiOptions(
|
|
9870
10000
|
withTeamOptions(
|
|
9871
10001
|
withEdgehancerIdOptions(
|
|
9872
|
-
|
|
10002
|
+
yargs41.positional("filename", {
|
|
9873
10003
|
demandOption: true,
|
|
9874
10004
|
describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
|
|
9875
10005
|
}).option("compatibilityDate", {
|
|
9876
10006
|
type: "string",
|
|
9877
10007
|
describe: "Date indicating targeted support in the custom edgehancer runtime. Backwards incompatible fixes to the runtime following this date will not affect this custom edgehancer. Format: YYYY-MM-DD. You can check here for more information: https://developers.cloudflare.com/workers/configuration/compatibility-dates/#setting-compatibility-date"
|
|
10008
|
+
}).option("skipBundle", {
|
|
10009
|
+
type: "boolean",
|
|
10010
|
+
default: false,
|
|
10011
|
+
describe: "Skip bundling and transpilation of the input file"
|
|
9878
10012
|
})
|
|
9879
10013
|
)
|
|
9880
10014
|
)
|
|
@@ -9889,11 +10023,17 @@ var IntegrationEdgehancerDeployModule = {
|
|
|
9889
10023
|
archetype,
|
|
9890
10024
|
connectorType,
|
|
9891
10025
|
hook,
|
|
9892
|
-
compatibilityDate
|
|
10026
|
+
compatibilityDate,
|
|
10027
|
+
skipBundle = false
|
|
9893
10028
|
}) => {
|
|
9894
10029
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9895
10030
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
9896
|
-
|
|
10031
|
+
let code;
|
|
10032
|
+
if (skipBundle) {
|
|
10033
|
+
code = readFileSync3(filename, "utf8");
|
|
10034
|
+
} else {
|
|
10035
|
+
code = await bundleWorkerCode(filename);
|
|
10036
|
+
}
|
|
9897
10037
|
await client.deploy({ archetype, code, connectorType, hook, compatibilityDate });
|
|
9898
10038
|
}
|
|
9899
10039
|
};
|
|
@@ -9902,7 +10042,7 @@ var IntegrationEdgehancerDeployModule = {
|
|
|
9902
10042
|
var IntegrationEdgehancerRemoveModule = {
|
|
9903
10043
|
command: "remove",
|
|
9904
10044
|
describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
|
|
9905
|
-
builder: (
|
|
10045
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs41)))),
|
|
9906
10046
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
|
|
9907
10047
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9908
10048
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -9914,9 +10054,99 @@ var IntegrationEdgehancerRemoveModule = {
|
|
|
9914
10054
|
var IntegrationEdgehancerModule = {
|
|
9915
10055
|
command: "edgehancer <command>",
|
|
9916
10056
|
describe: "Commands for managing custom integration edgehancers at the team level.",
|
|
9917
|
-
builder: (
|
|
10057
|
+
builder: (yargs41) => yargs41.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
|
|
9918
10058
|
handler: () => {
|
|
9919
|
-
|
|
10059
|
+
yargs29.help();
|
|
10060
|
+
}
|
|
10061
|
+
};
|
|
10062
|
+
|
|
10063
|
+
// src/commands/integration/commands/definition/propertyEditor/propertyEditor.ts
|
|
10064
|
+
import yargs30 from "yargs";
|
|
10065
|
+
|
|
10066
|
+
// src/commands/integration/commands/definition/propertyEditor/deploy.ts
|
|
10067
|
+
import { IntegrationPropertyEditorsClient } from "@uniformdev/canvas";
|
|
10068
|
+
import { readFileSync as readFileSync4 } from "fs";
|
|
10069
|
+
|
|
10070
|
+
// src/commands/integration/commands/definition/propertyEditor/util.ts
|
|
10071
|
+
function withPropertyEditorIdOptions(yargs41) {
|
|
10072
|
+
return yargs41.option("propertyType", {
|
|
10073
|
+
describe: "Property type to attach the editor to.",
|
|
10074
|
+
demandOption: true,
|
|
10075
|
+
type: "string"
|
|
10076
|
+
}).option("hook", {
|
|
10077
|
+
describe: "Property editor hook to deploy to.",
|
|
10078
|
+
demandOption: true,
|
|
10079
|
+
choices: ["createAIEdit", "afterAIEdit"],
|
|
10080
|
+
type: "string"
|
|
10081
|
+
});
|
|
10082
|
+
}
|
|
10083
|
+
|
|
10084
|
+
// src/commands/integration/commands/definition/propertyEditor/deploy.ts
|
|
10085
|
+
var IntegrationPropertyEditorDeployModule = {
|
|
10086
|
+
command: "deploy <filename>",
|
|
10087
|
+
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.",
|
|
10088
|
+
builder: (yargs41) => withConfiguration(
|
|
10089
|
+
withApiOptions(
|
|
10090
|
+
withTeamOptions(
|
|
10091
|
+
withPropertyEditorIdOptions(
|
|
10092
|
+
yargs41.positional("filename", {
|
|
10093
|
+
demandOption: true,
|
|
10094
|
+
describe: "ESM code file to run for the target property editor hook. Refer to the documentation for expected types."
|
|
10095
|
+
}).option("compatibilityDate", {
|
|
10096
|
+
type: "string",
|
|
10097
|
+
describe: "Date indicating targeted support in the custom property editor runtime. Backwards incompatible fixes to the runtime following this date will not affect this custom property editor. Format: YYYY-MM-DD. You can check here for more information: https://developers.cloudflare.com/workers/configuration/compatibility-dates/#setting-compatibility-date"
|
|
10098
|
+
}).option("skipBundle", {
|
|
10099
|
+
type: "boolean",
|
|
10100
|
+
default: false,
|
|
10101
|
+
describe: "Skip bundling and transpilation of the input file"
|
|
10102
|
+
})
|
|
10103
|
+
)
|
|
10104
|
+
)
|
|
10105
|
+
)
|
|
10106
|
+
),
|
|
10107
|
+
handler: async ({
|
|
10108
|
+
apiHost,
|
|
10109
|
+
apiKey,
|
|
10110
|
+
proxy,
|
|
10111
|
+
filename,
|
|
10112
|
+
team: teamId,
|
|
10113
|
+
propertyType,
|
|
10114
|
+
hook,
|
|
10115
|
+
compatibilityDate,
|
|
10116
|
+
skipBundle = false
|
|
10117
|
+
}) => {
|
|
10118
|
+
const fetch2 = nodeFetchProxy(proxy);
|
|
10119
|
+
const client = new IntegrationPropertyEditorsClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
10120
|
+
let code;
|
|
10121
|
+
if (skipBundle) {
|
|
10122
|
+
code = readFileSync4(filename, "utf8");
|
|
10123
|
+
} else {
|
|
10124
|
+
code = await bundleWorkerCode(filename);
|
|
10125
|
+
}
|
|
10126
|
+
await client.deploy({ propertyType, code, hook, compatibilityDate });
|
|
10127
|
+
}
|
|
10128
|
+
};
|
|
10129
|
+
|
|
10130
|
+
// src/commands/integration/commands/definition/propertyEditor/remove.ts
|
|
10131
|
+
import { IntegrationPropertyEditorsClient as IntegrationPropertyEditorsClient2 } from "@uniformdev/canvas";
|
|
10132
|
+
var IntegrationPropertyEditorRemoveModule = {
|
|
10133
|
+
command: "remove",
|
|
10134
|
+
describe: "Deletes a custom AI property editor hook from a property type. The API key used must have team admin permissions.",
|
|
10135
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withTeamOptions(withPropertyEditorIdOptions(yargs41)))),
|
|
10136
|
+
handler: async ({ apiHost, apiKey, proxy, team: teamId, propertyType, hook }) => {
|
|
10137
|
+
const fetch2 = nodeFetchProxy(proxy);
|
|
10138
|
+
const client = new IntegrationPropertyEditorsClient2({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
10139
|
+
await client.delete({ propertyType, hook });
|
|
10140
|
+
}
|
|
10141
|
+
};
|
|
10142
|
+
|
|
10143
|
+
// src/commands/integration/commands/definition/propertyEditor/propertyEditor.ts
|
|
10144
|
+
var IntegrationPropertyEditorModule = {
|
|
10145
|
+
command: "propertyEditor <command>",
|
|
10146
|
+
describe: "Commands for managing custom AI property editors at the team level.",
|
|
10147
|
+
builder: (yargs41) => yargs41.command(IntegrationPropertyEditorDeployModule).command(IntegrationPropertyEditorRemoveModule).demandCommand(),
|
|
10148
|
+
handler: () => {
|
|
10149
|
+
yargs30.help();
|
|
9920
10150
|
}
|
|
9921
10151
|
};
|
|
9922
10152
|
|
|
@@ -9956,10 +10186,10 @@ var DefinitionClient = class extends ApiClient2 {
|
|
|
9956
10186
|
var IntegrationDefinitionRegisterModule = {
|
|
9957
10187
|
command: "register <filename>",
|
|
9958
10188
|
describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
|
|
9959
|
-
builder: (
|
|
10189
|
+
builder: (yargs41) => withConfiguration(
|
|
9960
10190
|
withApiOptions(
|
|
9961
10191
|
withTeamOptions(
|
|
9962
|
-
|
|
10192
|
+
yargs41.positional("filename", {
|
|
9963
10193
|
demandOption: true,
|
|
9964
10194
|
describe: "Integration definition manifest to register"
|
|
9965
10195
|
})
|
|
@@ -9978,10 +10208,10 @@ var IntegrationDefinitionRegisterModule = {
|
|
|
9978
10208
|
var IntegrationDefinitionRemoveModule = {
|
|
9979
10209
|
command: "remove <type>",
|
|
9980
10210
|
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.",
|
|
9981
|
-
builder: (
|
|
10211
|
+
builder: (yargs41) => withConfiguration(
|
|
9982
10212
|
withApiOptions(
|
|
9983
10213
|
withTeamOptions(
|
|
9984
|
-
|
|
10214
|
+
yargs41.positional("type", {
|
|
9985
10215
|
demandOption: true,
|
|
9986
10216
|
describe: "Integration type (from its manifest) to remove."
|
|
9987
10217
|
})
|
|
@@ -9999,9 +10229,9 @@ var IntegrationDefinitionRemoveModule = {
|
|
|
9999
10229
|
var IntegrationDefinitionModule = {
|
|
10000
10230
|
command: "definition <command>",
|
|
10001
10231
|
describe: "Commands for managing custom integration definitions at the team level.",
|
|
10002
|
-
builder: (
|
|
10232
|
+
builder: (yargs41) => yargs41.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).command(IntegrationDataResourceEditorModule).command(IntegrationPropertyEditorModule).demandCommand(),
|
|
10003
10233
|
handler: () => {
|
|
10004
|
-
|
|
10234
|
+
yargs31.help();
|
|
10005
10235
|
}
|
|
10006
10236
|
};
|
|
10007
10237
|
|
|
@@ -10041,10 +10271,10 @@ var InstallClient = class extends ApiClient3 {
|
|
|
10041
10271
|
var IntegrationInstallModule = {
|
|
10042
10272
|
command: "install <type>",
|
|
10043
10273
|
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.",
|
|
10044
|
-
builder: (
|
|
10274
|
+
builder: (yargs41) => withConfiguration(
|
|
10045
10275
|
withApiOptions(
|
|
10046
10276
|
withProjectOptions(
|
|
10047
|
-
|
|
10277
|
+
yargs41.positional("type", {
|
|
10048
10278
|
demandOption: true,
|
|
10049
10279
|
describe: "Integration type to install (as defined in its manifest)"
|
|
10050
10280
|
}).option("configuration", {
|
|
@@ -10066,10 +10296,10 @@ var IntegrationInstallModule = {
|
|
|
10066
10296
|
var IntegrationUninstallModule = {
|
|
10067
10297
|
command: "uninstall <type>",
|
|
10068
10298
|
describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
|
|
10069
|
-
builder: (
|
|
10299
|
+
builder: (yargs41) => withConfiguration(
|
|
10070
10300
|
withApiOptions(
|
|
10071
10301
|
withProjectOptions(
|
|
10072
|
-
|
|
10302
|
+
yargs41.positional("type", {
|
|
10073
10303
|
demandOption: true,
|
|
10074
10304
|
describe: "Integration type to uninstall (as defined in its manifest)"
|
|
10075
10305
|
})
|
|
@@ -10087,9 +10317,9 @@ var IntegrationUninstallModule = {
|
|
|
10087
10317
|
var IntegrationCommand = {
|
|
10088
10318
|
command: "integration <command>",
|
|
10089
10319
|
describe: "Integration management commands",
|
|
10090
|
-
builder: (
|
|
10320
|
+
builder: (yargs41) => yargs41.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
|
|
10091
10321
|
handler: () => {
|
|
10092
|
-
|
|
10322
|
+
yargs32.showHelp();
|
|
10093
10323
|
}
|
|
10094
10324
|
};
|
|
10095
10325
|
|
|
@@ -10123,7 +10353,7 @@ import fsj5 from "fs-jetpack";
|
|
|
10123
10353
|
import * as git from "isomorphic-git";
|
|
10124
10354
|
import * as http from "isomorphic-git/http/node";
|
|
10125
10355
|
import os from "os";
|
|
10126
|
-
import
|
|
10356
|
+
import path6 from "path";
|
|
10127
10357
|
async function cloneStarter({
|
|
10128
10358
|
spin,
|
|
10129
10359
|
githubPath,
|
|
@@ -10132,7 +10362,7 @@ async function cloneStarter({
|
|
|
10132
10362
|
githubBranch
|
|
10133
10363
|
}) {
|
|
10134
10364
|
const done = await spin("Fetching starter code...");
|
|
10135
|
-
const cloneDir =
|
|
10365
|
+
const cloneDir = path6.join(os.tmpdir(), `uniform-new-${crypto2.randomBytes(20).toString("hex")}`);
|
|
10136
10366
|
const [user, repo, ...pathSegments] = githubPath.split("/");
|
|
10137
10367
|
try {
|
|
10138
10368
|
await git.clone({
|
|
@@ -10151,10 +10381,10 @@ async function cloneStarter({
|
|
|
10151
10381
|
if (fs7.existsSync(targetDir) && fs7.readdirSync(targetDir).length > 0) {
|
|
10152
10382
|
throw new Error(`"${targetDir}" is not empty`);
|
|
10153
10383
|
}
|
|
10154
|
-
const starterDir =
|
|
10384
|
+
const starterDir = path6.join(cloneDir, ...pathSegments);
|
|
10155
10385
|
fsj5.copy(starterDir, targetDir, { overwrite: true });
|
|
10156
10386
|
if (dotEnvFile) {
|
|
10157
|
-
fs7.writeFileSync(
|
|
10387
|
+
fs7.writeFileSync(path6.resolve(targetDir, ".env"), dotEnvFile, "utf-8");
|
|
10158
10388
|
}
|
|
10159
10389
|
console.log(`
|
|
10160
10390
|
Your project now lives in ${targetDir} \u2728`);
|
|
@@ -10328,9 +10558,9 @@ npm run dev
|
|
|
10328
10558
|
}
|
|
10329
10559
|
|
|
10330
10560
|
// src/commands/new/commands/new-mesh-integration.ts
|
|
10331
|
-
import { existsSync as existsSync4, mkdirSync as mkdirSync3, readdirSync, readFileSync as
|
|
10561
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync3, readdirSync, readFileSync as readFileSync5, writeFileSync as writeFileSync2 } from "fs";
|
|
10332
10562
|
import inquirer7 from "inquirer";
|
|
10333
|
-
import
|
|
10563
|
+
import path7 from "path";
|
|
10334
10564
|
import slugify2 from "slugify";
|
|
10335
10565
|
async function newMeshIntegrationHandler({
|
|
10336
10566
|
spin,
|
|
@@ -10376,17 +10606,17 @@ async function newMeshIntegrationHandler({
|
|
|
10376
10606
|
githubBranch
|
|
10377
10607
|
});
|
|
10378
10608
|
let done = await spin("Registering integration to team...");
|
|
10379
|
-
const pathToManifest =
|
|
10609
|
+
const pathToManifest = path7.resolve(targetDir, "mesh-manifest.json");
|
|
10380
10610
|
if (!existsSync4(pathToManifest)) {
|
|
10381
10611
|
throw new Error("Invalid integration starter cloned: missing `mesh-manifest.json`");
|
|
10382
10612
|
}
|
|
10383
|
-
const manifestContents =
|
|
10613
|
+
const manifestContents = readFileSync5(pathToManifest, "utf-8");
|
|
10384
10614
|
const manifestJson = JSON.parse(manifestContents);
|
|
10385
10615
|
manifestJson.type = typeSlug;
|
|
10386
10616
|
manifestJson.displayName = name;
|
|
10387
10617
|
writeFileSync2(pathToManifest, JSON.stringify(manifestJson, null, 2), "utf-8");
|
|
10388
|
-
const packageJsonPath =
|
|
10389
|
-
const packageJson = JSON.parse(
|
|
10618
|
+
const packageJsonPath = path7.resolve(targetDir, "package.json");
|
|
10619
|
+
const packageJson = JSON.parse(readFileSync5(packageJsonPath, "utf-8"));
|
|
10390
10620
|
packageJson.name = typeSlug;
|
|
10391
10621
|
writeFileSync2(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
|
|
10392
10622
|
const fullMeshAppKey = await uniformClient.registerMeshIntegration({ teamId, manifest: manifestJson });
|
|
@@ -10435,7 +10665,7 @@ function validateIntegrationName(integrationName, explicitOutputPath) {
|
|
|
10435
10665
|
mkdirSync3(targetDir, { recursive: true });
|
|
10436
10666
|
}
|
|
10437
10667
|
if (readdirSync(targetDir).length > 0) {
|
|
10438
|
-
targetDir =
|
|
10668
|
+
targetDir = path7.resolve(targetDir, typeSlug);
|
|
10439
10669
|
if (existsSync4(targetDir)) {
|
|
10440
10670
|
throw new Error(`${targetDir} directory already exists, choose a different name.`);
|
|
10441
10671
|
}
|
|
@@ -10528,10 +10758,10 @@ var NewMeshCmd = {
|
|
|
10528
10758
|
};
|
|
10529
10759
|
|
|
10530
10760
|
// src/commands/project-map/index.ts
|
|
10531
|
-
import
|
|
10761
|
+
import yargs35 from "yargs";
|
|
10532
10762
|
|
|
10533
10763
|
// src/commands/project-map/commands/projectMapDefinition.ts
|
|
10534
|
-
import
|
|
10764
|
+
import yargs33 from "yargs";
|
|
10535
10765
|
|
|
10536
10766
|
// src/commands/project-map/commands/ProjectMapDefinition/_util.ts
|
|
10537
10767
|
import { UncachedProjectMapClient } from "@uniformdev/project-map";
|
|
@@ -10545,11 +10775,11 @@ function getProjectMapClient(options) {
|
|
|
10545
10775
|
var ProjectMapDefinitionGetModule = {
|
|
10546
10776
|
command: "get <id>",
|
|
10547
10777
|
describe: "Fetch a project map",
|
|
10548
|
-
builder: (
|
|
10778
|
+
builder: (yargs41) => withFormatOptions(
|
|
10549
10779
|
withConfiguration(
|
|
10550
10780
|
withApiOptions(
|
|
10551
10781
|
withProjectOptions(
|
|
10552
|
-
|
|
10782
|
+
yargs41.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
|
|
10553
10783
|
)
|
|
10554
10784
|
)
|
|
10555
10785
|
)
|
|
@@ -10572,7 +10802,7 @@ var ProjectMapDefinitionListModule = {
|
|
|
10572
10802
|
command: "list",
|
|
10573
10803
|
describe: "List of project maps",
|
|
10574
10804
|
aliases: ["ls"],
|
|
10575
|
-
builder: (
|
|
10805
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
10576
10806
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
10577
10807
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10578
10808
|
const client = getProjectMapClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -10626,12 +10856,12 @@ function createProjectMapDefinitionEngineDataSource({
|
|
|
10626
10856
|
var ProjectMapDefinitionPullModule = {
|
|
10627
10857
|
command: "pull <directory>",
|
|
10628
10858
|
describe: "Pulls all project maps to local files in a directory",
|
|
10629
|
-
builder: (
|
|
10859
|
+
builder: (yargs41) => withConfiguration(
|
|
10630
10860
|
withDebugOptions(
|
|
10631
10861
|
withApiOptions(
|
|
10632
10862
|
withProjectOptions(
|
|
10633
10863
|
withDiffOptions(
|
|
10634
|
-
|
|
10864
|
+
yargs41.positional("directory", {
|
|
10635
10865
|
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.",
|
|
10636
10866
|
type: "string"
|
|
10637
10867
|
}).option("format", {
|
|
@@ -10706,12 +10936,12 @@ var ProjectMapDefinitionPullModule = {
|
|
|
10706
10936
|
var ProjectMapDefinitionPushModule = {
|
|
10707
10937
|
command: "push <directory>",
|
|
10708
10938
|
describe: "Pushes all project maps from files in a directory or package to Uniform",
|
|
10709
|
-
builder: (
|
|
10939
|
+
builder: (yargs41) => withConfiguration(
|
|
10710
10940
|
withDebugOptions(
|
|
10711
10941
|
withApiOptions(
|
|
10712
10942
|
withProjectOptions(
|
|
10713
10943
|
withDiffOptions(
|
|
10714
|
-
|
|
10944
|
+
yargs41.positional("directory", {
|
|
10715
10945
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
10716
10946
|
type: "string"
|
|
10717
10947
|
}).option("mode", {
|
|
@@ -10775,9 +11005,9 @@ var ProjectMapDefinitionRemoveModule = {
|
|
|
10775
11005
|
command: "remove <id>",
|
|
10776
11006
|
aliases: ["delete", "rm"],
|
|
10777
11007
|
describe: "Delete a project map",
|
|
10778
|
-
builder: (
|
|
11008
|
+
builder: (yargs41) => withConfiguration(
|
|
10779
11009
|
withApiOptions(
|
|
10780
|
-
withProjectOptions(
|
|
11010
|
+
withProjectOptions(yargs41.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
10781
11011
|
)
|
|
10782
11012
|
),
|
|
10783
11013
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -10792,10 +11022,10 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
10792
11022
|
command: "update <filename>",
|
|
10793
11023
|
aliases: ["put"],
|
|
10794
11024
|
describe: "Insert or update a project map",
|
|
10795
|
-
builder: (
|
|
11025
|
+
builder: (yargs41) => withConfiguration(
|
|
10796
11026
|
withApiOptions(
|
|
10797
11027
|
withProjectOptions(
|
|
10798
|
-
|
|
11028
|
+
yargs41.positional("filename", { demandOption: true, describe: "Project map file to put" })
|
|
10799
11029
|
)
|
|
10800
11030
|
)
|
|
10801
11031
|
),
|
|
@@ -10811,24 +11041,24 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
10811
11041
|
var ProjectMapDefinitionModule = {
|
|
10812
11042
|
command: "definition <command>",
|
|
10813
11043
|
describe: "Commands for ProjectMap Definitions",
|
|
10814
|
-
builder: (
|
|
11044
|
+
builder: (yargs41) => yargs41.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
|
|
10815
11045
|
handler: () => {
|
|
10816
|
-
|
|
11046
|
+
yargs33.help();
|
|
10817
11047
|
}
|
|
10818
11048
|
};
|
|
10819
11049
|
|
|
10820
11050
|
// src/commands/project-map/commands/projectMapNode.ts
|
|
10821
|
-
import
|
|
11051
|
+
import yargs34 from "yargs";
|
|
10822
11052
|
|
|
10823
11053
|
// src/commands/project-map/commands/ProjectMapNode/get.ts
|
|
10824
11054
|
var ProjectMapNodeGetModule = {
|
|
10825
11055
|
command: "get <id> <projectMapId>",
|
|
10826
11056
|
describe: "Fetch a project map node",
|
|
10827
|
-
builder: (
|
|
11057
|
+
builder: (yargs41) => withConfiguration(
|
|
10828
11058
|
withFormatOptions(
|
|
10829
11059
|
withApiOptions(
|
|
10830
11060
|
withProjectOptions(
|
|
10831
|
-
|
|
11061
|
+
yargs41.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
|
|
10832
11062
|
)
|
|
10833
11063
|
)
|
|
10834
11064
|
)
|
|
@@ -10852,12 +11082,12 @@ var ProjectMapNodeListModule = {
|
|
|
10852
11082
|
command: "list <projectMapId>",
|
|
10853
11083
|
describe: "List project map nodes",
|
|
10854
11084
|
aliases: ["ls"],
|
|
10855
|
-
builder: (
|
|
11085
|
+
builder: (yargs41) => withConfiguration(
|
|
10856
11086
|
withFormatOptions(
|
|
10857
11087
|
withApiOptions(
|
|
10858
11088
|
withProjectOptions(
|
|
10859
11089
|
withStateOptions(
|
|
10860
|
-
|
|
11090
|
+
yargs41.positional("projectMapId", {
|
|
10861
11091
|
demandOption: true,
|
|
10862
11092
|
describe: "ProjectMap UUID to fetch from"
|
|
10863
11093
|
})
|
|
@@ -10935,12 +11165,12 @@ function createProjectMapNodeEngineDataSource({
|
|
|
10935
11165
|
var ProjectMapNodePullModule = {
|
|
10936
11166
|
command: "pull <directory>",
|
|
10937
11167
|
describe: "Pulls all project maps nodes to local files in a directory",
|
|
10938
|
-
builder: (
|
|
11168
|
+
builder: (yargs41) => withConfiguration(
|
|
10939
11169
|
withDebugOptions(
|
|
10940
11170
|
withApiOptions(
|
|
10941
11171
|
withProjectOptions(
|
|
10942
11172
|
withDiffOptions(
|
|
10943
|
-
|
|
11173
|
+
yargs41.positional("directory", {
|
|
10944
11174
|
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.",
|
|
10945
11175
|
type: "string"
|
|
10946
11176
|
}).option("format", {
|
|
@@ -11022,12 +11252,12 @@ import {
|
|
|
11022
11252
|
var ProjectMapNodePushModule = {
|
|
11023
11253
|
command: "push <directory>",
|
|
11024
11254
|
describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
|
|
11025
|
-
builder: (
|
|
11255
|
+
builder: (yargs41) => withConfiguration(
|
|
11026
11256
|
withDebugOptions(
|
|
11027
11257
|
withApiOptions(
|
|
11028
11258
|
withProjectOptions(
|
|
11029
11259
|
withDiffOptions(
|
|
11030
|
-
|
|
11260
|
+
yargs41.positional("directory", {
|
|
11031
11261
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
11032
11262
|
type: "string"
|
|
11033
11263
|
}).option("mode", {
|
|
@@ -11129,10 +11359,10 @@ var ProjectMapNodeRemoveModule = {
|
|
|
11129
11359
|
command: "remove <id> <projectMapId>",
|
|
11130
11360
|
aliases: ["delete", "rm"],
|
|
11131
11361
|
describe: "Delete a project map node",
|
|
11132
|
-
builder: (
|
|
11362
|
+
builder: (yargs41) => withConfiguration(
|
|
11133
11363
|
withApiOptions(
|
|
11134
11364
|
withProjectOptions(
|
|
11135
|
-
|
|
11365
|
+
yargs41.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
|
|
11136
11366
|
)
|
|
11137
11367
|
)
|
|
11138
11368
|
),
|
|
@@ -11148,10 +11378,10 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11148
11378
|
command: "update <filename> <projectMapId>",
|
|
11149
11379
|
aliases: ["put"],
|
|
11150
11380
|
describe: "Insert or update a project map node",
|
|
11151
|
-
builder: (
|
|
11381
|
+
builder: (yargs41) => withConfiguration(
|
|
11152
11382
|
withApiOptions(
|
|
11153
11383
|
withProjectOptions(
|
|
11154
|
-
|
|
11384
|
+
yargs41.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
|
|
11155
11385
|
)
|
|
11156
11386
|
)
|
|
11157
11387
|
),
|
|
@@ -11167,9 +11397,9 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11167
11397
|
var ProjectMapNodeModule = {
|
|
11168
11398
|
command: "node <command>",
|
|
11169
11399
|
describe: "Commands for ProjectMap Nodes",
|
|
11170
|
-
builder: (
|
|
11400
|
+
builder: (yargs41) => yargs41.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
|
|
11171
11401
|
handler: () => {
|
|
11172
|
-
|
|
11402
|
+
yargs34.help();
|
|
11173
11403
|
}
|
|
11174
11404
|
};
|
|
11175
11405
|
|
|
@@ -11178,17 +11408,17 @@ var ProjectMapCommand = {
|
|
|
11178
11408
|
command: "project-map <command>",
|
|
11179
11409
|
aliases: ["prm"],
|
|
11180
11410
|
describe: "Uniform ProjectMap commands",
|
|
11181
|
-
builder: (
|
|
11411
|
+
builder: (yargs41) => yargs41.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
|
|
11182
11412
|
handler: () => {
|
|
11183
|
-
|
|
11413
|
+
yargs35.showHelp();
|
|
11184
11414
|
}
|
|
11185
11415
|
};
|
|
11186
11416
|
|
|
11187
11417
|
// src/commands/redirect/index.ts
|
|
11188
|
-
import
|
|
11418
|
+
import yargs37 from "yargs";
|
|
11189
11419
|
|
|
11190
11420
|
// src/commands/redirect/commands/redirect.ts
|
|
11191
|
-
import
|
|
11421
|
+
import yargs36 from "yargs";
|
|
11192
11422
|
|
|
11193
11423
|
// src/commands/redirect/commands/RedirectDefinition/_util.ts
|
|
11194
11424
|
import { UncachedRedirectClient } from "@uniformdev/redirect";
|
|
@@ -11213,11 +11443,11 @@ function getRedirectClient(options) {
|
|
|
11213
11443
|
var RedirectDefinitionGetModule = {
|
|
11214
11444
|
command: "get <id>",
|
|
11215
11445
|
describe: "Fetch a redirect",
|
|
11216
|
-
builder: (
|
|
11446
|
+
builder: (yargs41) => withConfiguration(
|
|
11217
11447
|
withFormatOptions(
|
|
11218
11448
|
withApiOptions(
|
|
11219
11449
|
withProjectOptions(
|
|
11220
|
-
|
|
11450
|
+
yargs41.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
|
|
11221
11451
|
)
|
|
11222
11452
|
)
|
|
11223
11453
|
)
|
|
@@ -11240,7 +11470,7 @@ var RedirectDefinitionListModule = {
|
|
|
11240
11470
|
command: "list",
|
|
11241
11471
|
describe: "List of redirects",
|
|
11242
11472
|
aliases: ["ls"],
|
|
11243
|
-
builder: (
|
|
11473
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
11244
11474
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
11245
11475
|
const fetch2 = nodeFetchProxy(proxy);
|
|
11246
11476
|
const client = getRedirectClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -11292,12 +11522,12 @@ function createRedirectDefinitionEngineDataSource({
|
|
|
11292
11522
|
var RedirectDefinitionPullModule = {
|
|
11293
11523
|
command: "pull <directory>",
|
|
11294
11524
|
describe: "Pulls all redirects to local files in a directory",
|
|
11295
|
-
builder: (
|
|
11525
|
+
builder: (yargs41) => withConfiguration(
|
|
11296
11526
|
withDebugOptions(
|
|
11297
11527
|
withApiOptions(
|
|
11298
11528
|
withProjectOptions(
|
|
11299
11529
|
withDiffOptions(
|
|
11300
|
-
|
|
11530
|
+
yargs41.positional("directory", {
|
|
11301
11531
|
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.",
|
|
11302
11532
|
type: "string"
|
|
11303
11533
|
}).option("format", {
|
|
@@ -11373,12 +11603,12 @@ var RedirectDefinitionPullModule = {
|
|
|
11373
11603
|
var RedirectDefinitionPushModule = {
|
|
11374
11604
|
command: "push <directory>",
|
|
11375
11605
|
describe: "Pushes all redirects from files in a directory or package to Uniform",
|
|
11376
|
-
builder: (
|
|
11606
|
+
builder: (yargs41) => withConfiguration(
|
|
11377
11607
|
withDebugOptions(
|
|
11378
11608
|
withApiOptions(
|
|
11379
11609
|
withProjectOptions(
|
|
11380
11610
|
withDiffOptions(
|
|
11381
|
-
|
|
11611
|
+
yargs41.positional("directory", {
|
|
11382
11612
|
describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
|
|
11383
11613
|
type: "string"
|
|
11384
11614
|
}).option("mode", {
|
|
@@ -11442,9 +11672,9 @@ var RedirectDefinitionRemoveModule = {
|
|
|
11442
11672
|
command: "remove <id>",
|
|
11443
11673
|
aliases: ["delete", "rm"],
|
|
11444
11674
|
describe: "Delete a redirect",
|
|
11445
|
-
builder: (
|
|
11675
|
+
builder: (yargs41) => withConfiguration(
|
|
11446
11676
|
withApiOptions(
|
|
11447
|
-
withProjectOptions(
|
|
11677
|
+
withProjectOptions(yargs41.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
11448
11678
|
)
|
|
11449
11679
|
),
|
|
11450
11680
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -11459,10 +11689,10 @@ var RedirectDefinitionUpdateModule = {
|
|
|
11459
11689
|
command: "update <filename>",
|
|
11460
11690
|
aliases: ["put"],
|
|
11461
11691
|
describe: "Insert or update a redirect",
|
|
11462
|
-
builder: (
|
|
11692
|
+
builder: (yargs41) => withConfiguration(
|
|
11463
11693
|
withApiOptions(
|
|
11464
11694
|
withProjectOptions(
|
|
11465
|
-
|
|
11695
|
+
yargs41.positional("filename", { demandOption: true, describe: "Redirect file to put" })
|
|
11466
11696
|
)
|
|
11467
11697
|
)
|
|
11468
11698
|
),
|
|
@@ -11478,9 +11708,9 @@ var RedirectDefinitionUpdateModule = {
|
|
|
11478
11708
|
var RedirectDefinitionModule = {
|
|
11479
11709
|
command: "definition <command>",
|
|
11480
11710
|
describe: "Commands for Redirect Definitions",
|
|
11481
|
-
builder: (
|
|
11711
|
+
builder: (yargs41) => yargs41.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
|
|
11482
11712
|
handler: () => {
|
|
11483
|
-
|
|
11713
|
+
yargs36.help();
|
|
11484
11714
|
}
|
|
11485
11715
|
};
|
|
11486
11716
|
|
|
@@ -11489,14 +11719,14 @@ var RedirectCommand = {
|
|
|
11489
11719
|
command: "redirect <command>",
|
|
11490
11720
|
aliases: ["red"],
|
|
11491
11721
|
describe: "Uniform Redirect commands",
|
|
11492
|
-
builder: (
|
|
11722
|
+
builder: (yargs41) => yargs41.command(RedirectDefinitionModule).demandCommand(),
|
|
11493
11723
|
handler: () => {
|
|
11494
|
-
|
|
11724
|
+
yargs37.showHelp();
|
|
11495
11725
|
}
|
|
11496
11726
|
};
|
|
11497
11727
|
|
|
11498
11728
|
// src/commands/sync/index.ts
|
|
11499
|
-
import
|
|
11729
|
+
import yargs38 from "yargs";
|
|
11500
11730
|
|
|
11501
11731
|
// src/webhooksClient.ts
|
|
11502
11732
|
import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
|
|
@@ -11690,12 +11920,12 @@ function createWebhookEngineDataSource({
|
|
|
11690
11920
|
var WebhookPullModule = {
|
|
11691
11921
|
command: "pull <directory>",
|
|
11692
11922
|
describe: "Pulls all webhooks to local files in a directory",
|
|
11693
|
-
builder: (
|
|
11923
|
+
builder: (yargs41) => withConfiguration(
|
|
11694
11924
|
withApiOptions(
|
|
11695
11925
|
withDebugOptions(
|
|
11696
11926
|
withProjectOptions(
|
|
11697
11927
|
withDiffOptions(
|
|
11698
|
-
|
|
11928
|
+
yargs41.positional("directory", {
|
|
11699
11929
|
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.",
|
|
11700
11930
|
type: "string"
|
|
11701
11931
|
}).option("format", {
|
|
@@ -11881,7 +12111,7 @@ function numPad(num, spaces = 6) {
|
|
|
11881
12111
|
var SyncPullModule = {
|
|
11882
12112
|
command: "pull",
|
|
11883
12113
|
describe: "Pulls whole project to local files in a directory",
|
|
11884
|
-
builder: (
|
|
12114
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs41))))),
|
|
11885
12115
|
handler: async ({ serialization, ...otherParams }) => {
|
|
11886
12116
|
const config2 = serialization;
|
|
11887
12117
|
const enabledEntities = Object.entries({
|
|
@@ -11979,12 +12209,12 @@ var getFormat = (entityType, config2) => {
|
|
|
11979
12209
|
var WebhookPushModule = {
|
|
11980
12210
|
command: "push <directory>",
|
|
11981
12211
|
describe: "Pushes all webhooks from files in a directory to Uniform",
|
|
11982
|
-
builder: (
|
|
12212
|
+
builder: (yargs41) => withConfiguration(
|
|
11983
12213
|
withDebugOptions(
|
|
11984
12214
|
withApiOptions(
|
|
11985
12215
|
withProjectOptions(
|
|
11986
12216
|
withDiffOptions(
|
|
11987
|
-
|
|
12217
|
+
yargs41.positional("directory", {
|
|
11988
12218
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
11989
12219
|
type: "string"
|
|
11990
12220
|
}).option("mode", {
|
|
@@ -12048,7 +12278,7 @@ var WebhookPushModule = {
|
|
|
12048
12278
|
var SyncPushModule = {
|
|
12049
12279
|
command: "push",
|
|
12050
12280
|
describe: "Pushes whole project data from files in a directory or package to Uniform",
|
|
12051
|
-
builder: (
|
|
12281
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs41))))),
|
|
12052
12282
|
handler: async ({ serialization, ...otherParams }) => {
|
|
12053
12283
|
const config2 = serialization;
|
|
12054
12284
|
const enabledEntities = Object.entries({
|
|
@@ -12257,21 +12487,21 @@ var getFormat2 = (entityType, config2) => {
|
|
|
12257
12487
|
var SyncCommand = {
|
|
12258
12488
|
command: "sync <command>",
|
|
12259
12489
|
describe: "Uniform Sync commands",
|
|
12260
|
-
builder: (
|
|
12490
|
+
builder: (yargs41) => yargs41.command(SyncPullModule).command(SyncPushModule).demandCommand(),
|
|
12261
12491
|
handler: () => {
|
|
12262
|
-
|
|
12492
|
+
yargs38.showHelp();
|
|
12263
12493
|
}
|
|
12264
12494
|
};
|
|
12265
12495
|
|
|
12266
12496
|
// src/commands/webhook/index.ts
|
|
12267
|
-
import
|
|
12497
|
+
import yargs39 from "yargs";
|
|
12268
12498
|
var WebhookCommand = {
|
|
12269
12499
|
command: "webhook <command>",
|
|
12270
12500
|
aliases: ["wh"],
|
|
12271
12501
|
describe: "Commands for webhooks",
|
|
12272
|
-
builder: (
|
|
12502
|
+
builder: (yargs41) => yargs41.command(WebhookPullModule).command(WebhookPushModule).demandCommand(),
|
|
12273
12503
|
handler: () => {
|
|
12274
|
-
|
|
12504
|
+
yargs39.help();
|
|
12275
12505
|
}
|
|
12276
12506
|
};
|
|
12277
12507
|
|
|
@@ -12506,7 +12736,7 @@ First found was: v${firstVersion}`;
|
|
|
12506
12736
|
|
|
12507
12737
|
// src/index.ts
|
|
12508
12738
|
dotenv.config();
|
|
12509
|
-
var yarggery =
|
|
12739
|
+
var yarggery = yargs40(hideBin(process.argv));
|
|
12510
12740
|
var useDefaultConfig = !process.argv.includes("--config");
|
|
12511
12741
|
var defaultConfig2 = useDefaultConfig ? loadConfig(null) : {};
|
|
12512
12742
|
yarggery.option("verbose", {
|