@uniformdev/cli 20.36.0 → 20.36.1-alpha.1
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 +603 -376
- 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 {
|
|
@@ -276,14 +276,14 @@ var createClient = (baseUrl, authToken) => {
|
|
|
276
276
|
|
|
277
277
|
// src/fs.ts
|
|
278
278
|
import { promises as fs } from "fs";
|
|
279
|
-
async function readJSON(
|
|
280
|
-
const fileContents = await fs.readFile(
|
|
279
|
+
async function readJSON(path8) {
|
|
280
|
+
const fileContents = await fs.readFile(path8, "utf-8");
|
|
281
281
|
return JSON.parse(fileContents);
|
|
282
282
|
}
|
|
283
|
-
async function tryReadJSON(
|
|
283
|
+
async function tryReadJSON(path8, missingValue = null) {
|
|
284
284
|
try {
|
|
285
|
-
const stat = await fs.stat(
|
|
286
|
-
return stat.isFile() ? await readJSON(
|
|
285
|
+
const stat = await fs.stat(path8);
|
|
286
|
+
return stat.isFile() ? await readJSON(path8) : missingValue;
|
|
287
287
|
} catch {
|
|
288
288
|
return missingValue;
|
|
289
289
|
}
|
|
@@ -1135,6 +1135,7 @@ var package_default = {
|
|
|
1135
1135
|
"cosmiconfig-typescript-loader": "5.0.0",
|
|
1136
1136
|
diff: "^5.0.0",
|
|
1137
1137
|
dotenv: "^16.4.7",
|
|
1138
|
+
esbuild: "0.25.0",
|
|
1138
1139
|
execa: "5.1.1",
|
|
1139
1140
|
"file-type": "^20.0.0",
|
|
1140
1141
|
"fs-jetpack": "5.1.0",
|
|
@@ -1352,8 +1353,8 @@ var aiApiHostDefault = process.env.UNIFORM_AI_API_HOST || "https://ai.uniform.gl
|
|
|
1352
1353
|
var InstallMcpCommand = {
|
|
1353
1354
|
command: "install",
|
|
1354
1355
|
describe: "Install Uniform MCP server configuration (use --team, --project, and --apiKey for non-interactive mode)",
|
|
1355
|
-
builder: (
|
|
1356
|
-
|
|
1356
|
+
builder: (yargs41) => withConfiguration(
|
|
1357
|
+
yargs41.option("agent", {
|
|
1357
1358
|
alias: "a",
|
|
1358
1359
|
describe: "Specify agent type (cursor, claude, other)",
|
|
1359
1360
|
type: "string",
|
|
@@ -1529,7 +1530,7 @@ Selected agent: ${agentType}`));
|
|
|
1529
1530
|
var McpCommand = {
|
|
1530
1531
|
command: "mcp <command>",
|
|
1531
1532
|
describe: "Uniform MCP server management commands",
|
|
1532
|
-
builder: (
|
|
1533
|
+
builder: (yargs41) => yargs41.command(InstallMcpCommand).demandCommand(),
|
|
1533
1534
|
handler: () => {
|
|
1534
1535
|
yargs.showHelp();
|
|
1535
1536
|
}
|
|
@@ -1957,8 +1958,8 @@ ${gray2("Rules source:")} https://github.com/uniformdev/ai-rules`);
|
|
|
1957
1958
|
var InstallRulesCommand = {
|
|
1958
1959
|
command: "install",
|
|
1959
1960
|
describe: "Install Uniform AI rules for your development assistant",
|
|
1960
|
-
builder: (
|
|
1961
|
-
|
|
1961
|
+
builder: (yargs41) => withConfiguration(
|
|
1962
|
+
yargs41.option("agent", {
|
|
1962
1963
|
alias: "a",
|
|
1963
1964
|
describe: "Specify agent type (cursor, claude, other)",
|
|
1964
1965
|
type: "string",
|
|
@@ -1996,7 +1997,7 @@ import { blue as blue4, bold as bold2, gray as gray3, green as green5, red as re
|
|
|
1996
1997
|
var ListRulesCommand = {
|
|
1997
1998
|
command: "list",
|
|
1998
1999
|
describe: "List available Uniform AI rules",
|
|
1999
|
-
builder: (
|
|
2000
|
+
builder: (yargs41) => withConfiguration(yargs41),
|
|
2000
2001
|
handler: async function() {
|
|
2001
2002
|
const { stopAllSpinners, spin } = makeSpinner();
|
|
2002
2003
|
try {
|
|
@@ -2025,7 +2026,7 @@ var ListRulesCommand = {
|
|
|
2025
2026
|
var RulesCommand = {
|
|
2026
2027
|
command: "rules <command>",
|
|
2027
2028
|
describe: "Uniform AI rules management commands",
|
|
2028
|
-
builder: (
|
|
2029
|
+
builder: (yargs41) => yargs41.command(InstallRulesCommand).command(ListRulesCommand).demandCommand(),
|
|
2029
2030
|
handler: () => {
|
|
2030
2031
|
yargs2.showHelp();
|
|
2031
2032
|
}
|
|
@@ -2035,7 +2036,7 @@ var RulesCommand = {
|
|
|
2035
2036
|
var AiCommand = {
|
|
2036
2037
|
command: "ai <command>",
|
|
2037
2038
|
describe: "Uniform AI development assistant commands",
|
|
2038
|
-
builder: (
|
|
2039
|
+
builder: (yargs41) => yargs41.command(RulesCommand).command(McpCommand).demandCommand(),
|
|
2039
2040
|
handler: () => {
|
|
2040
2041
|
yargs3.showHelp();
|
|
2041
2042
|
}
|
|
@@ -2074,12 +2075,12 @@ function getFileClient(options) {
|
|
|
2074
2075
|
var AssetGetModule = {
|
|
2075
2076
|
command: "get <id>",
|
|
2076
2077
|
describe: "Get an asset",
|
|
2077
|
-
builder: (
|
|
2078
|
+
builder: (yargs41) => withConfiguration(
|
|
2078
2079
|
withDebugOptions(
|
|
2079
2080
|
withFormatOptions(
|
|
2080
2081
|
withApiOptions(
|
|
2081
2082
|
withProjectOptions(
|
|
2082
|
-
|
|
2083
|
+
yargs41.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
|
|
2083
2084
|
)
|
|
2084
2085
|
)
|
|
2085
2086
|
)
|
|
@@ -2100,7 +2101,7 @@ var AssetGetModule = {
|
|
|
2100
2101
|
var AssetListModule = {
|
|
2101
2102
|
command: "list",
|
|
2102
2103
|
describe: "List assets",
|
|
2103
|
-
builder: (
|
|
2104
|
+
builder: (yargs41) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs41))))),
|
|
2104
2105
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
2105
2106
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
2106
2107
|
const client = getAssetClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -2653,8 +2654,8 @@ function prepCompositionForDisk(composition) {
|
|
|
2653
2654
|
delete prepped.state;
|
|
2654
2655
|
return prepped;
|
|
2655
2656
|
}
|
|
2656
|
-
function withStateOptions(
|
|
2657
|
-
return
|
|
2657
|
+
function withStateOptions(yargs41, defaultState = "preview") {
|
|
2658
|
+
return yargs41.option("state", {
|
|
2658
2659
|
type: "string",
|
|
2659
2660
|
describe: `State to fetch.`,
|
|
2660
2661
|
choices: ["preview", "published"],
|
|
@@ -2736,12 +2737,12 @@ function writeCanvasPackage(filename, packageContents) {
|
|
|
2736
2737
|
var AssetPullModule = {
|
|
2737
2738
|
command: "pull <directory>",
|
|
2738
2739
|
describe: "Pulls all assets to local files in a directory",
|
|
2739
|
-
builder: (
|
|
2740
|
+
builder: (yargs41) => withConfiguration(
|
|
2740
2741
|
withApiOptions(
|
|
2741
2742
|
withDebugOptions(
|
|
2742
2743
|
withProjectOptions(
|
|
2743
2744
|
withDiffOptions(
|
|
2744
|
-
|
|
2745
|
+
yargs41.positional("directory", {
|
|
2745
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.",
|
|
2746
2747
|
type: "string"
|
|
2747
2748
|
}).option("format", {
|
|
@@ -2853,12 +2854,12 @@ var AssetPullModule = {
|
|
|
2853
2854
|
var AssetPushModule = {
|
|
2854
2855
|
command: "push <directory>",
|
|
2855
2856
|
describe: "Pushes all assets from files in a directory to Uniform",
|
|
2856
|
-
builder: (
|
|
2857
|
+
builder: (yargs41) => withConfiguration(
|
|
2857
2858
|
withApiOptions(
|
|
2858
2859
|
withDebugOptions(
|
|
2859
2860
|
withProjectOptions(
|
|
2860
2861
|
withDiffOptions(
|
|
2861
|
-
|
|
2862
|
+
yargs41.positional("directory", {
|
|
2862
2863
|
describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
|
|
2863
2864
|
type: "string"
|
|
2864
2865
|
}).option("mode", {
|
|
@@ -2982,10 +2983,10 @@ var AssetRemoveModule = {
|
|
|
2982
2983
|
command: "remove <id>",
|
|
2983
2984
|
aliases: ["delete", "rm"],
|
|
2984
2985
|
describe: "Delete an asset",
|
|
2985
|
-
builder: (
|
|
2986
|
+
builder: (yargs41) => withConfiguration(
|
|
2986
2987
|
withDebugOptions(
|
|
2987
2988
|
withApiOptions(
|
|
2988
|
-
withProjectOptions(
|
|
2989
|
+
withProjectOptions(yargs41.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
|
|
2989
2990
|
)
|
|
2990
2991
|
)
|
|
2991
2992
|
),
|
|
@@ -3006,11 +3007,11 @@ var AssetUpdateModule = {
|
|
|
3006
3007
|
command: "update <filename>",
|
|
3007
3008
|
aliases: ["put"],
|
|
3008
3009
|
describe: "Insert or update an asset",
|
|
3009
|
-
builder: (
|
|
3010
|
+
builder: (yargs41) => withConfiguration(
|
|
3010
3011
|
withDebugOptions(
|
|
3011
3012
|
withApiOptions(
|
|
3012
3013
|
withProjectOptions(
|
|
3013
|
-
|
|
3014
|
+
yargs41.positional("filename", { demandOption: true, describe: "Asset file to put" })
|
|
3014
3015
|
)
|
|
3015
3016
|
)
|
|
3016
3017
|
)
|
|
@@ -3036,7 +3037,7 @@ var AssetUpdateModule = {
|
|
|
3036
3037
|
var AssetModule = {
|
|
3037
3038
|
command: "asset <command>",
|
|
3038
3039
|
describe: "Commands for Assets",
|
|
3039
|
-
builder: (
|
|
3040
|
+
builder: (yargs41) => yargs41.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
|
|
3040
3041
|
handler: () => {
|
|
3041
3042
|
yargs4.help();
|
|
3042
3043
|
}
|
|
@@ -3057,12 +3058,12 @@ function getCategoryClient(options) {
|
|
|
3057
3058
|
var CategoryGetModule = {
|
|
3058
3059
|
command: "get <id>",
|
|
3059
3060
|
describe: "Fetch a category",
|
|
3060
|
-
builder: (
|
|
3061
|
+
builder: (yargs41) => withConfiguration(
|
|
3061
3062
|
withFormatOptions(
|
|
3062
3063
|
withDebugOptions(
|
|
3063
3064
|
withApiOptions(
|
|
3064
3065
|
withProjectOptions(
|
|
3065
|
-
|
|
3066
|
+
yargs41.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
|
|
3066
3067
|
)
|
|
3067
3068
|
)
|
|
3068
3069
|
)
|
|
@@ -3087,8 +3088,8 @@ var CategoryListModule = {
|
|
|
3087
3088
|
command: "list",
|
|
3088
3089
|
describe: "List categories",
|
|
3089
3090
|
aliases: ["ls"],
|
|
3090
|
-
builder: (
|
|
3091
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
3091
|
+
builder: (yargs41) => withConfiguration(
|
|
3092
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs41.options({})))))
|
|
3092
3093
|
),
|
|
3093
3094
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
3094
3095
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -3132,12 +3133,12 @@ function createCategoriesEngineDataSource({
|
|
|
3132
3133
|
var CategoryPullModule = {
|
|
3133
3134
|
command: "pull <directory>",
|
|
3134
3135
|
describe: "Pulls all categories to local files in a directory",
|
|
3135
|
-
builder: (
|
|
3136
|
+
builder: (yargs41) => withConfiguration(
|
|
3136
3137
|
withApiOptions(
|
|
3137
3138
|
withProjectOptions(
|
|
3138
3139
|
withDiffOptions(
|
|
3139
3140
|
withDebugOptions(
|
|
3140
|
-
|
|
3141
|
+
yargs41.positional("directory", {
|
|
3141
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.",
|
|
3142
3143
|
type: "string"
|
|
3143
3144
|
}).option("format", {
|
|
@@ -3212,12 +3213,12 @@ var CategoryPullModule = {
|
|
|
3212
3213
|
var CategoryPushModule = {
|
|
3213
3214
|
command: "push <directory>",
|
|
3214
3215
|
describe: "Pushes all categories from files in a directory to Uniform Canvas",
|
|
3215
|
-
builder: (
|
|
3216
|
+
builder: (yargs41) => withConfiguration(
|
|
3216
3217
|
withApiOptions(
|
|
3217
3218
|
withDebugOptions(
|
|
3218
3219
|
withProjectOptions(
|
|
3219
3220
|
withDiffOptions(
|
|
3220
|
-
|
|
3221
|
+
yargs41.positional("directory", {
|
|
3221
3222
|
describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
|
|
3222
3223
|
type: "string"
|
|
3223
3224
|
}).option("mode", {
|
|
@@ -3281,11 +3282,11 @@ var CategoryRemoveModule = {
|
|
|
3281
3282
|
command: "remove <id>",
|
|
3282
3283
|
aliases: ["delete", "rm"],
|
|
3283
3284
|
describe: "Delete a category",
|
|
3284
|
-
builder: (
|
|
3285
|
+
builder: (yargs41) => withConfiguration(
|
|
3285
3286
|
withApiOptions(
|
|
3286
3287
|
withDebugOptions(
|
|
3287
3288
|
withProjectOptions(
|
|
3288
|
-
|
|
3289
|
+
yargs41.positional("id", { demandOption: true, describe: "Category UUID to delete" })
|
|
3289
3290
|
)
|
|
3290
3291
|
)
|
|
3291
3292
|
)
|
|
@@ -3306,11 +3307,11 @@ var CategoryUpdateModule = {
|
|
|
3306
3307
|
command: "update <filename>",
|
|
3307
3308
|
aliases: ["put"],
|
|
3308
3309
|
describe: "Insert or update a category",
|
|
3309
|
-
builder: (
|
|
3310
|
+
builder: (yargs41) => withConfiguration(
|
|
3310
3311
|
withApiOptions(
|
|
3311
3312
|
withDebugOptions(
|
|
3312
3313
|
withProjectOptions(
|
|
3313
|
-
|
|
3314
|
+
yargs41.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
3314
3315
|
)
|
|
3315
3316
|
)
|
|
3316
3317
|
)
|
|
@@ -3332,7 +3333,7 @@ var CategoryModule = {
|
|
|
3332
3333
|
command: "category <command>",
|
|
3333
3334
|
aliases: ["cat"],
|
|
3334
3335
|
describe: "Commands for Canvas categories",
|
|
3335
|
-
builder: (
|
|
3336
|
+
builder: (yargs41) => yargs41.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
|
|
3336
3337
|
handler: () => {
|
|
3337
3338
|
yargs5.help();
|
|
3338
3339
|
}
|
|
@@ -3354,12 +3355,12 @@ function getCanvasClient(options) {
|
|
|
3354
3355
|
var ComponentGetModule = {
|
|
3355
3356
|
command: "get <id>",
|
|
3356
3357
|
describe: "Fetch a component definition",
|
|
3357
|
-
builder: (
|
|
3358
|
+
builder: (yargs41) => withConfiguration(
|
|
3358
3359
|
withFormatOptions(
|
|
3359
3360
|
withDebugOptions(
|
|
3360
3361
|
withApiOptions(
|
|
3361
3362
|
withProjectOptions(
|
|
3362
|
-
|
|
3363
|
+
yargs41.positional("id", {
|
|
3363
3364
|
demandOption: true,
|
|
3364
3365
|
describe: "Component definition public ID to fetch"
|
|
3365
3366
|
})
|
|
@@ -3393,12 +3394,12 @@ var ComponentListModule = {
|
|
|
3393
3394
|
command: "list",
|
|
3394
3395
|
describe: "List component definitions",
|
|
3395
3396
|
aliases: ["ls"],
|
|
3396
|
-
builder: (
|
|
3397
|
+
builder: (yargs41) => withConfiguration(
|
|
3397
3398
|
withFormatOptions(
|
|
3398
3399
|
withDebugOptions(
|
|
3399
3400
|
withApiOptions(
|
|
3400
3401
|
withProjectOptions(
|
|
3401
|
-
|
|
3402
|
+
yargs41.options({
|
|
3402
3403
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3403
3404
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
|
|
3404
3405
|
})
|
|
@@ -3462,12 +3463,12 @@ function createComponentDefinitionEngineDataSource({
|
|
|
3462
3463
|
var ComponentPullModule = {
|
|
3463
3464
|
command: "pull <directory>",
|
|
3464
3465
|
describe: "Pulls all component definitions to local files in a directory",
|
|
3465
|
-
builder: (
|
|
3466
|
+
builder: (yargs41) => withConfiguration(
|
|
3466
3467
|
withApiOptions(
|
|
3467
3468
|
withDebugOptions(
|
|
3468
3469
|
withProjectOptions(
|
|
3469
3470
|
withDiffOptions(
|
|
3470
|
-
|
|
3471
|
+
yargs41.positional("directory", {
|
|
3471
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.",
|
|
3472
3473
|
type: "string"
|
|
3473
3474
|
}).option("format", {
|
|
@@ -3543,12 +3544,12 @@ var ComponentPullModule = {
|
|
|
3543
3544
|
var ComponentPushModule = {
|
|
3544
3545
|
command: "push <directory>",
|
|
3545
3546
|
describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
|
|
3546
|
-
builder: (
|
|
3547
|
+
builder: (yargs41) => withConfiguration(
|
|
3547
3548
|
withApiOptions(
|
|
3548
3549
|
withDebugOptions(
|
|
3549
3550
|
withProjectOptions(
|
|
3550
3551
|
withDiffOptions(
|
|
3551
|
-
|
|
3552
|
+
yargs41.positional("directory", {
|
|
3552
3553
|
describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
|
|
3553
3554
|
type: "string"
|
|
3554
3555
|
}).option("mode", {
|
|
@@ -3613,11 +3614,11 @@ var ComponentRemoveModule = {
|
|
|
3613
3614
|
command: "remove <id>",
|
|
3614
3615
|
aliases: ["delete", "rm"],
|
|
3615
3616
|
describe: "Delete a component definition",
|
|
3616
|
-
builder: (
|
|
3617
|
+
builder: (yargs41) => withConfiguration(
|
|
3617
3618
|
withDebugOptions(
|
|
3618
3619
|
withApiOptions(
|
|
3619
3620
|
withProjectOptions(
|
|
3620
|
-
|
|
3621
|
+
yargs41.positional("id", {
|
|
3621
3622
|
demandOption: true,
|
|
3622
3623
|
describe: "Component definition public ID to delete"
|
|
3623
3624
|
})
|
|
@@ -3641,11 +3642,11 @@ var ComponentUpdateModule = {
|
|
|
3641
3642
|
command: "update <filename>",
|
|
3642
3643
|
aliases: ["put"],
|
|
3643
3644
|
describe: "Insert or update a component definition",
|
|
3644
|
-
builder: (
|
|
3645
|
+
builder: (yargs41) => withConfiguration(
|
|
3645
3646
|
withApiOptions(
|
|
3646
3647
|
withDebugOptions(
|
|
3647
3648
|
withProjectOptions(
|
|
3648
|
-
|
|
3649
|
+
yargs41.positional("filename", { demandOption: true, describe: "Component definition file to put" })
|
|
3649
3650
|
)
|
|
3650
3651
|
)
|
|
3651
3652
|
)
|
|
@@ -3667,7 +3668,7 @@ var ComponentModule = {
|
|
|
3667
3668
|
command: "component <command>",
|
|
3668
3669
|
aliases: ["def"],
|
|
3669
3670
|
describe: "Commands for Canvas component definitions",
|
|
3670
|
-
builder: (
|
|
3671
|
+
builder: (yargs41) => yargs41.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
|
|
3671
3672
|
handler: () => {
|
|
3672
3673
|
yargs6.help();
|
|
3673
3674
|
}
|
|
@@ -3680,13 +3681,13 @@ import yargs7 from "yargs";
|
|
|
3680
3681
|
var CompositionGetModule = {
|
|
3681
3682
|
command: "get <id>",
|
|
3682
3683
|
describe: "Fetch a composition",
|
|
3683
|
-
builder: (
|
|
3684
|
+
builder: (yargs41) => withFormatOptions(
|
|
3684
3685
|
withConfiguration(
|
|
3685
3686
|
withApiOptions(
|
|
3686
3687
|
withProjectOptions(
|
|
3687
3688
|
withStateOptions(
|
|
3688
3689
|
withDebugOptions(
|
|
3689
|
-
|
|
3690
|
+
yargs41.positional("id", {
|
|
3690
3691
|
demandOption: true,
|
|
3691
3692
|
describe: "Composition/pattern public ID to fetch"
|
|
3692
3693
|
}).option({
|
|
@@ -3776,13 +3777,13 @@ var CompositionListModule = {
|
|
|
3776
3777
|
command: "list",
|
|
3777
3778
|
describe: "List compositions",
|
|
3778
3779
|
aliases: ["ls"],
|
|
3779
|
-
builder: (
|
|
3780
|
+
builder: (yargs41) => withFormatOptions(
|
|
3780
3781
|
withConfiguration(
|
|
3781
3782
|
withApiOptions(
|
|
3782
3783
|
withProjectOptions(
|
|
3783
3784
|
withDebugOptions(
|
|
3784
3785
|
withStateOptions(
|
|
3785
|
-
|
|
3786
|
+
yargs41.options({
|
|
3786
3787
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3787
3788
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
3788
3789
|
search: { describe: "Search query", type: "string", default: "" },
|
|
@@ -3863,13 +3864,13 @@ var CompositionListModule = {
|
|
|
3863
3864
|
var ComponentPatternListModule = {
|
|
3864
3865
|
...CompositionListModule,
|
|
3865
3866
|
describe: "List component patterns",
|
|
3866
|
-
builder: (
|
|
3867
|
+
builder: (yargs41) => withFormatOptions(
|
|
3867
3868
|
withConfiguration(
|
|
3868
3869
|
withApiOptions(
|
|
3869
3870
|
withDebugOptions(
|
|
3870
3871
|
withProjectOptions(
|
|
3871
3872
|
withStateOptions(
|
|
3872
|
-
|
|
3873
|
+
yargs41.options({
|
|
3873
3874
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3874
3875
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
3875
3876
|
resolvePatterns: {
|
|
@@ -3992,12 +3993,12 @@ function createComponentInstanceEngineDataSource({
|
|
|
3992
3993
|
var CompositionPublishModule = {
|
|
3993
3994
|
command: "publish [ids]",
|
|
3994
3995
|
describe: "Publishes composition(s)",
|
|
3995
|
-
builder: (
|
|
3996
|
+
builder: (yargs41) => withConfiguration(
|
|
3996
3997
|
withApiOptions(
|
|
3997
3998
|
withProjectOptions(
|
|
3998
3999
|
withDebugOptions(
|
|
3999
4000
|
withDiffOptions(
|
|
4000
|
-
|
|
4001
|
+
yargs41.positional("ids", {
|
|
4001
4002
|
describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4002
4003
|
type: "string"
|
|
4003
4004
|
}).option("all", {
|
|
@@ -4090,12 +4091,12 @@ var CompositionPublishModule = {
|
|
|
4090
4091
|
var ComponentPatternPublishModule = {
|
|
4091
4092
|
...CompositionPublishModule,
|
|
4092
4093
|
describe: "Publishes component pattern(s)",
|
|
4093
|
-
builder: (
|
|
4094
|
+
builder: (yargs41) => withConfiguration(
|
|
4094
4095
|
withApiOptions(
|
|
4095
4096
|
withDebugOptions(
|
|
4096
4097
|
withProjectOptions(
|
|
4097
4098
|
withDiffOptions(
|
|
4098
|
-
|
|
4099
|
+
yargs41.positional("ids", {
|
|
4099
4100
|
describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4100
4101
|
type: "string"
|
|
4101
4102
|
}).option("all", {
|
|
@@ -4135,13 +4136,13 @@ function componentInstancePullModuleFactory(type) {
|
|
|
4135
4136
|
return {
|
|
4136
4137
|
command: "pull <directory>",
|
|
4137
4138
|
describe: "Pulls all compositions to local files in a directory",
|
|
4138
|
-
builder: (
|
|
4139
|
+
builder: (yargs41) => withConfiguration(
|
|
4139
4140
|
withApiOptions(
|
|
4140
4141
|
withProjectOptions(
|
|
4141
4142
|
withStateOptions(
|
|
4142
4143
|
withDebugOptions(
|
|
4143
4144
|
withDiffOptions(
|
|
4144
|
-
|
|
4145
|
+
yargs41.positional("directory", {
|
|
4145
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.",
|
|
4146
4147
|
type: "string"
|
|
4147
4148
|
}).option("format", {
|
|
@@ -4256,13 +4257,13 @@ function componentInstancePullModuleFactory(type) {
|
|
|
4256
4257
|
var ComponentPatternPullModule = {
|
|
4257
4258
|
...componentInstancePullModuleFactory("componentPatterns"),
|
|
4258
4259
|
describe: "Pulls all component patterns to local files in a directory",
|
|
4259
|
-
builder: (
|
|
4260
|
+
builder: (yargs41) => withConfiguration(
|
|
4260
4261
|
withApiOptions(
|
|
4261
4262
|
withProjectOptions(
|
|
4262
4263
|
withDebugOptions(
|
|
4263
4264
|
withStateOptions(
|
|
4264
4265
|
withDiffOptions(
|
|
4265
|
-
|
|
4266
|
+
yargs41.positional("directory", {
|
|
4266
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.",
|
|
4267
4268
|
type: "string"
|
|
4268
4269
|
}).option("format", {
|
|
@@ -4336,13 +4337,13 @@ function componentInstancePushModuleFactory(type) {
|
|
|
4336
4337
|
return {
|
|
4337
4338
|
command: "push <directory>",
|
|
4338
4339
|
describe: "Pushes all compositions from files in a directory to Uniform Canvas",
|
|
4339
|
-
builder: (
|
|
4340
|
+
builder: (yargs41) => withConfiguration(
|
|
4340
4341
|
withApiOptions(
|
|
4341
4342
|
withProjectOptions(
|
|
4342
4343
|
withStateOptions(
|
|
4343
4344
|
withDebugOptions(
|
|
4344
4345
|
withDiffOptions(
|
|
4345
|
-
|
|
4346
|
+
yargs41.positional("directory", {
|
|
4346
4347
|
describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
|
|
4347
4348
|
type: "string"
|
|
4348
4349
|
}).option("mode", {
|
|
@@ -4456,13 +4457,13 @@ function componentInstancePushModuleFactory(type) {
|
|
|
4456
4457
|
var ComponentPatternPushModule = {
|
|
4457
4458
|
...componentInstancePushModuleFactory("componentPatterns"),
|
|
4458
4459
|
describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
|
|
4459
|
-
builder: (
|
|
4460
|
+
builder: (yargs41) => withConfiguration(
|
|
4460
4461
|
withApiOptions(
|
|
4461
4462
|
withProjectOptions(
|
|
4462
4463
|
withStateOptions(
|
|
4463
4464
|
withDiffOptions(
|
|
4464
4465
|
withDebugOptions(
|
|
4465
|
-
|
|
4466
|
+
yargs41.positional("directory", {
|
|
4466
4467
|
describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
|
|
4467
4468
|
type: "string"
|
|
4468
4469
|
}).option("mode", {
|
|
@@ -4496,11 +4497,11 @@ var CompositionRemoveModule = {
|
|
|
4496
4497
|
command: "remove <id>",
|
|
4497
4498
|
aliases: ["delete", "rm"],
|
|
4498
4499
|
describe: "Delete a composition",
|
|
4499
|
-
builder: (
|
|
4500
|
+
builder: (yargs41) => withConfiguration(
|
|
4500
4501
|
withApiOptions(
|
|
4501
4502
|
withDebugOptions(
|
|
4502
4503
|
withProjectOptions(
|
|
4503
|
-
|
|
4504
|
+
yargs41.positional("id", {
|
|
4504
4505
|
demandOption: true,
|
|
4505
4506
|
describe: "Composition/pattern public ID to delete"
|
|
4506
4507
|
})
|
|
@@ -4534,11 +4535,11 @@ import { diffJson as diffJson2 } from "diff";
|
|
|
4534
4535
|
var CompositionUnpublishModule = {
|
|
4535
4536
|
command: "unpublish [ids]",
|
|
4536
4537
|
describe: "Unpublish a composition(s)",
|
|
4537
|
-
builder: (
|
|
4538
|
+
builder: (yargs41) => withConfiguration(
|
|
4538
4539
|
withApiOptions(
|
|
4539
4540
|
withDebugOptions(
|
|
4540
4541
|
withProjectOptions(
|
|
4541
|
-
|
|
4542
|
+
yargs41.positional("ids", {
|
|
4542
4543
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4543
4544
|
type: "string"
|
|
4544
4545
|
}).option("all", {
|
|
@@ -4635,11 +4636,11 @@ var CompositionUnpublishModule = {
|
|
|
4635
4636
|
var ComponentPatternUnpublishModule = {
|
|
4636
4637
|
command: "unpublish [ids]",
|
|
4637
4638
|
describe: "Unpublish a component pattern(s)",
|
|
4638
|
-
builder: (
|
|
4639
|
+
builder: (yargs41) => withConfiguration(
|
|
4639
4640
|
withApiOptions(
|
|
4640
4641
|
withDebugOptions(
|
|
4641
4642
|
withProjectOptions(
|
|
4642
|
-
|
|
4643
|
+
yargs41.positional("ids", {
|
|
4643
4644
|
describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4644
4645
|
type: "string"
|
|
4645
4646
|
}).option("all", {
|
|
@@ -4673,12 +4674,12 @@ var CompositionUpdateModule = {
|
|
|
4673
4674
|
command: "update <filename>",
|
|
4674
4675
|
aliases: ["put"],
|
|
4675
4676
|
describe: "Insert or update a composition",
|
|
4676
|
-
builder: (
|
|
4677
|
+
builder: (yargs41) => withConfiguration(
|
|
4677
4678
|
withApiOptions(
|
|
4678
4679
|
withProjectOptions(
|
|
4679
4680
|
withDebugOptions(
|
|
4680
4681
|
withStateOptions(
|
|
4681
|
-
|
|
4682
|
+
yargs41.positional("filename", {
|
|
4682
4683
|
demandOption: true,
|
|
4683
4684
|
describe: "Composition/pattern file to put"
|
|
4684
4685
|
})
|
|
@@ -4716,7 +4717,7 @@ var ComponentPatternUpdateModule = {
|
|
|
4716
4717
|
var ComponentPatternModule = {
|
|
4717
4718
|
command: "component-pattern <command>",
|
|
4718
4719
|
describe: "Commands for Canvas component patterns",
|
|
4719
|
-
builder: (
|
|
4720
|
+
builder: (yargs41) => yargs41.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
|
|
4720
4721
|
handler: () => {
|
|
4721
4722
|
yargs7.help();
|
|
4722
4723
|
}
|
|
@@ -4728,7 +4729,7 @@ var CompositionModule = {
|
|
|
4728
4729
|
command: "composition <command>",
|
|
4729
4730
|
describe: "Commands for Canvas compositions",
|
|
4730
4731
|
aliases: ["comp"],
|
|
4731
|
-
builder: (
|
|
4732
|
+
builder: (yargs41) => yargs41.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
|
|
4732
4733
|
handler: () => {
|
|
4733
4734
|
yargs8.help();
|
|
4734
4735
|
}
|
|
@@ -4747,13 +4748,13 @@ var CompositionPatternGetModule = {
|
|
|
4747
4748
|
var CompositionPatternListModule = {
|
|
4748
4749
|
...CompositionListModule,
|
|
4749
4750
|
describe: "List composition patterns",
|
|
4750
|
-
builder: (
|
|
4751
|
+
builder: (yargs41) => withFormatOptions(
|
|
4751
4752
|
withConfiguration(
|
|
4752
4753
|
withApiOptions(
|
|
4753
4754
|
withDebugOptions(
|
|
4754
4755
|
withProjectOptions(
|
|
4755
4756
|
withStateOptions(
|
|
4756
|
-
|
|
4757
|
+
yargs41.options({
|
|
4757
4758
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
4758
4759
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
4759
4760
|
resolvePatterns: {
|
|
@@ -4797,12 +4798,12 @@ var CompositionPatternListModule = {
|
|
|
4797
4798
|
var CompositionPatternPublishModule = {
|
|
4798
4799
|
...CompositionPublishModule,
|
|
4799
4800
|
describe: "Publishes composition pattern(s)",
|
|
4800
|
-
builder: (
|
|
4801
|
+
builder: (yargs41) => withConfiguration(
|
|
4801
4802
|
withApiOptions(
|
|
4802
4803
|
withDebugOptions(
|
|
4803
4804
|
withProjectOptions(
|
|
4804
4805
|
withDiffOptions(
|
|
4805
|
-
|
|
4806
|
+
yargs41.positional("ids", {
|
|
4806
4807
|
describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
4807
4808
|
type: "string"
|
|
4808
4809
|
}).option("all", {
|
|
@@ -4841,13 +4842,13 @@ var CompositionPatternPublishModule = {
|
|
|
4841
4842
|
var CompositionPatternPullModule = {
|
|
4842
4843
|
...componentInstancePullModuleFactory("compositionPatterns"),
|
|
4843
4844
|
describe: "Pulls all composition patterns to local files in a directory",
|
|
4844
|
-
builder: (
|
|
4845
|
+
builder: (yargs41) => withConfiguration(
|
|
4845
4846
|
withApiOptions(
|
|
4846
4847
|
withDebugOptions(
|
|
4847
4848
|
withProjectOptions(
|
|
4848
4849
|
withStateOptions(
|
|
4849
4850
|
withDiffOptions(
|
|
4850
|
-
|
|
4851
|
+
yargs41.positional("directory", {
|
|
4851
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.",
|
|
4852
4853
|
type: "string"
|
|
4853
4854
|
}).option("format", {
|
|
@@ -4885,13 +4886,13 @@ var CompositionPatternPullModule = {
|
|
|
4885
4886
|
var CompositionPatternPushModule = {
|
|
4886
4887
|
...componentInstancePushModuleFactory("compositionPatterns"),
|
|
4887
4888
|
describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
|
|
4888
|
-
builder: (
|
|
4889
|
+
builder: (yargs41) => withConfiguration(
|
|
4889
4890
|
withApiOptions(
|
|
4890
4891
|
withDebugOptions(
|
|
4891
4892
|
withProjectOptions(
|
|
4892
4893
|
withStateOptions(
|
|
4893
4894
|
withDiffOptions(
|
|
4894
|
-
|
|
4895
|
+
yargs41.positional("directory", {
|
|
4895
4896
|
describe: "Directory to read the compositions patterns from. If a filename is used, a package will be read instead.",
|
|
4896
4897
|
type: "string"
|
|
4897
4898
|
}).option("mode", {
|
|
@@ -4930,11 +4931,11 @@ var CompositionPatternRemoveModule = {
|
|
|
4930
4931
|
var CompositionPatternUnpublishModule = {
|
|
4931
4932
|
command: "unpublish [ids]",
|
|
4932
4933
|
describe: "Unpublish a composition pattern(s)",
|
|
4933
|
-
builder: (
|
|
4934
|
+
builder: (yargs41) => withConfiguration(
|
|
4934
4935
|
withApiOptions(
|
|
4935
4936
|
withDebugOptions(
|
|
4936
4937
|
withProjectOptions(
|
|
4937
|
-
|
|
4938
|
+
yargs41.positional("ids", {
|
|
4938
4939
|
describe: "Un-publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
4939
4940
|
type: "string"
|
|
4940
4941
|
}).option("all", {
|
|
@@ -4970,7 +4971,7 @@ var CompositionPatternUpdateModule = {
|
|
|
4970
4971
|
var CompositionPatternModule = {
|
|
4971
4972
|
command: "composition-pattern <command>",
|
|
4972
4973
|
describe: "Commands for Canvas composition patterns",
|
|
4973
|
-
builder: (
|
|
4974
|
+
builder: (yargs41) => yargs41.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
|
|
4974
4975
|
handler: () => {
|
|
4975
4976
|
yargs9.help();
|
|
4976
4977
|
}
|
|
@@ -4991,12 +4992,12 @@ function getContentClient(options) {
|
|
|
4991
4992
|
var ContentTypeGetModule = {
|
|
4992
4993
|
command: "get <id>",
|
|
4993
4994
|
describe: "Get a content type",
|
|
4994
|
-
builder: (
|
|
4995
|
+
builder: (yargs41) => withConfiguration(
|
|
4995
4996
|
withDebugOptions(
|
|
4996
4997
|
withFormatOptions(
|
|
4997
4998
|
withApiOptions(
|
|
4998
4999
|
withProjectOptions(
|
|
4999
|
-
|
|
5000
|
+
yargs41.positional("id", {
|
|
5000
5001
|
demandOption: true,
|
|
5001
5002
|
describe: "Content type public ID to fetch"
|
|
5002
5003
|
})
|
|
@@ -5021,7 +5022,7 @@ var ContentTypeGetModule = {
|
|
|
5021
5022
|
var ContentTypeListModule = {
|
|
5022
5023
|
command: "list",
|
|
5023
5024
|
describe: "List content types",
|
|
5024
|
-
builder: (
|
|
5025
|
+
builder: (yargs41) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs41))))),
|
|
5025
5026
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5026
5027
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
5027
5028
|
const client = getContentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -5062,12 +5063,12 @@ function createContentTypeEngineDataSource({
|
|
|
5062
5063
|
var ContentTypePullModule = {
|
|
5063
5064
|
command: "pull <directory>",
|
|
5064
5065
|
describe: "Pulls all content types to local files in a directory",
|
|
5065
|
-
builder: (
|
|
5066
|
+
builder: (yargs41) => withConfiguration(
|
|
5066
5067
|
withApiOptions(
|
|
5067
5068
|
withDebugOptions(
|
|
5068
5069
|
withProjectOptions(
|
|
5069
5070
|
withDiffOptions(
|
|
5070
|
-
|
|
5071
|
+
yargs41.positional("directory", {
|
|
5071
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.",
|
|
5072
5073
|
type: "string"
|
|
5073
5074
|
}).option("format", {
|
|
@@ -5147,12 +5148,12 @@ var ContentTypePullModule = {
|
|
|
5147
5148
|
var ContentTypePushModule = {
|
|
5148
5149
|
command: "push <directory>",
|
|
5149
5150
|
describe: "Pushes all content types from files in a directory to Uniform",
|
|
5150
|
-
builder: (
|
|
5151
|
+
builder: (yargs41) => withConfiguration(
|
|
5151
5152
|
withApiOptions(
|
|
5152
5153
|
withDebugOptions(
|
|
5153
5154
|
withProjectOptions(
|
|
5154
5155
|
withDiffOptions(
|
|
5155
|
-
|
|
5156
|
+
yargs41.positional("directory", {
|
|
5156
5157
|
describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
|
|
5157
5158
|
type: "string"
|
|
5158
5159
|
}).option("what-if", {
|
|
@@ -5226,11 +5227,11 @@ var ContentTypeRemoveModule = {
|
|
|
5226
5227
|
command: "remove <id>",
|
|
5227
5228
|
aliases: ["delete", "rm"],
|
|
5228
5229
|
describe: "Delete a content type",
|
|
5229
|
-
builder: (
|
|
5230
|
+
builder: (yargs41) => withConfiguration(
|
|
5230
5231
|
withDebugOptions(
|
|
5231
5232
|
withApiOptions(
|
|
5232
5233
|
withProjectOptions(
|
|
5233
|
-
|
|
5234
|
+
yargs41.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
|
|
5234
5235
|
)
|
|
5235
5236
|
)
|
|
5236
5237
|
)
|
|
@@ -5251,11 +5252,11 @@ var ContentTypeUpdateModule = {
|
|
|
5251
5252
|
command: "update <filename>",
|
|
5252
5253
|
aliases: ["put"],
|
|
5253
5254
|
describe: "Insert or update a content type",
|
|
5254
|
-
builder: (
|
|
5255
|
+
builder: (yargs41) => withConfiguration(
|
|
5255
5256
|
withDebugOptions(
|
|
5256
5257
|
withApiOptions(
|
|
5257
5258
|
withProjectOptions(
|
|
5258
|
-
|
|
5259
|
+
yargs41.positional("filename", { demandOption: true, describe: "Content type file to put" })
|
|
5259
5260
|
)
|
|
5260
5261
|
)
|
|
5261
5262
|
)
|
|
@@ -5277,7 +5278,7 @@ var ContentTypeModule = {
|
|
|
5277
5278
|
command: "contenttype <command>",
|
|
5278
5279
|
aliases: ["ct"],
|
|
5279
5280
|
describe: "Commands for Content Types",
|
|
5280
|
-
builder: (
|
|
5281
|
+
builder: (yargs41) => yargs41.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
|
|
5281
5282
|
handler: () => {
|
|
5282
5283
|
yargs10.help();
|
|
5283
5284
|
}
|
|
@@ -5296,11 +5297,11 @@ function getDataSourceClient(options) {
|
|
|
5296
5297
|
var DataSourceGetModule = {
|
|
5297
5298
|
command: "get <id>",
|
|
5298
5299
|
describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
|
|
5299
|
-
builder: (
|
|
5300
|
+
builder: (yargs41) => withConfiguration(
|
|
5300
5301
|
withApiOptions(
|
|
5301
5302
|
withDebugOptions(
|
|
5302
5303
|
withProjectOptions(
|
|
5303
|
-
|
|
5304
|
+
yargs41.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
|
|
5304
5305
|
)
|
|
5305
5306
|
)
|
|
5306
5307
|
)
|
|
@@ -5318,11 +5319,11 @@ var DataSourceRemoveModule = {
|
|
|
5318
5319
|
command: "remove <id>",
|
|
5319
5320
|
aliases: ["delete", "rm"],
|
|
5320
5321
|
describe: "Delete a data source",
|
|
5321
|
-
builder: (
|
|
5322
|
+
builder: (yargs41) => withConfiguration(
|
|
5322
5323
|
withDebugOptions(
|
|
5323
5324
|
withApiOptions(
|
|
5324
5325
|
withProjectOptions(
|
|
5325
|
-
|
|
5326
|
+
yargs41.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
|
|
5326
5327
|
)
|
|
5327
5328
|
)
|
|
5328
5329
|
)
|
|
@@ -5343,11 +5344,11 @@ var DataSourceUpdateModule = {
|
|
|
5343
5344
|
command: "update <dataSource>",
|
|
5344
5345
|
aliases: ["put"],
|
|
5345
5346
|
describe: "Insert or update a data source",
|
|
5346
|
-
builder: (
|
|
5347
|
+
builder: (yargs41) => withConfiguration(
|
|
5347
5348
|
withApiOptions(
|
|
5348
5349
|
withDebugOptions(
|
|
5349
5350
|
withProjectOptions(
|
|
5350
|
-
|
|
5351
|
+
yargs41.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
|
|
5351
5352
|
describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
|
|
5352
5353
|
type: "string",
|
|
5353
5354
|
demandOption: true
|
|
@@ -5382,7 +5383,7 @@ var DataSourceModule = {
|
|
|
5382
5383
|
command: "datasource <command>",
|
|
5383
5384
|
aliases: ["ds"],
|
|
5384
5385
|
describe: "Commands for Data Source definitions",
|
|
5385
|
-
builder: (
|
|
5386
|
+
builder: (yargs41) => yargs41.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
|
|
5386
5387
|
handler: () => {
|
|
5387
5388
|
yargs11.help();
|
|
5388
5389
|
}
|
|
@@ -5404,12 +5405,12 @@ var DataTypeGetModule = {
|
|
|
5404
5405
|
command: "get <id>",
|
|
5405
5406
|
describe: "Get a data type",
|
|
5406
5407
|
aliases: ["ls"],
|
|
5407
|
-
builder: (
|
|
5408
|
+
builder: (yargs41) => withConfiguration(
|
|
5408
5409
|
withFormatOptions(
|
|
5409
5410
|
withDebugOptions(
|
|
5410
5411
|
withApiOptions(
|
|
5411
5412
|
withProjectOptions(
|
|
5412
|
-
|
|
5413
|
+
yargs41.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
|
|
5413
5414
|
)
|
|
5414
5415
|
)
|
|
5415
5416
|
)
|
|
@@ -5432,7 +5433,7 @@ var DataTypeListModule = {
|
|
|
5432
5433
|
command: "list",
|
|
5433
5434
|
describe: "List data types",
|
|
5434
5435
|
aliases: ["ls"],
|
|
5435
|
-
builder: (
|
|
5436
|
+
builder: (yargs41) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs41))))),
|
|
5436
5437
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
5437
5438
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
5438
5439
|
const client = getDataTypeClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -5475,12 +5476,12 @@ function createDataTypeEngineDataSource({
|
|
|
5475
5476
|
var DataTypePullModule = {
|
|
5476
5477
|
command: "pull <directory>",
|
|
5477
5478
|
describe: "Pulls all data types to local files in a directory",
|
|
5478
|
-
builder: (
|
|
5479
|
+
builder: (yargs41) => withConfiguration(
|
|
5479
5480
|
withApiOptions(
|
|
5480
5481
|
withDebugOptions(
|
|
5481
5482
|
withProjectOptions(
|
|
5482
5483
|
withDiffOptions(
|
|
5483
|
-
|
|
5484
|
+
yargs41.positional("directory", {
|
|
5484
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.",
|
|
5485
5486
|
type: "string"
|
|
5486
5487
|
}).option("format", {
|
|
@@ -5560,12 +5561,12 @@ var DataTypePullModule = {
|
|
|
5560
5561
|
var DataTypePushModule = {
|
|
5561
5562
|
command: "push <directory>",
|
|
5562
5563
|
describe: "Pushes all data types from files in a directory to Uniform",
|
|
5563
|
-
builder: (
|
|
5564
|
+
builder: (yargs41) => withConfiguration(
|
|
5564
5565
|
withApiOptions(
|
|
5565
5566
|
withDebugOptions(
|
|
5566
5567
|
withProjectOptions(
|
|
5567
5568
|
withDiffOptions(
|
|
5568
|
-
|
|
5569
|
+
yargs41.positional("directory", {
|
|
5569
5570
|
describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
|
|
5570
5571
|
type: "string"
|
|
5571
5572
|
}).option("mode", {
|
|
@@ -5634,11 +5635,11 @@ var DataTypeRemoveModule = {
|
|
|
5634
5635
|
command: "remove <id>",
|
|
5635
5636
|
aliases: ["delete", "rm"],
|
|
5636
5637
|
describe: "Delete a data type",
|
|
5637
|
-
builder: (
|
|
5638
|
+
builder: (yargs41) => withConfiguration(
|
|
5638
5639
|
withDebugOptions(
|
|
5639
5640
|
withApiOptions(
|
|
5640
5641
|
withProjectOptions(
|
|
5641
|
-
|
|
5642
|
+
yargs41.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
|
|
5642
5643
|
)
|
|
5643
5644
|
)
|
|
5644
5645
|
)
|
|
@@ -5659,11 +5660,11 @@ var DataTypeUpdateModule = {
|
|
|
5659
5660
|
command: "update <filename>",
|
|
5660
5661
|
aliases: ["put"],
|
|
5661
5662
|
describe: "Insert or update a data type",
|
|
5662
|
-
builder: (
|
|
5663
|
+
builder: (yargs41) => withConfiguration(
|
|
5663
5664
|
withDebugOptions(
|
|
5664
5665
|
withApiOptions(
|
|
5665
5666
|
withProjectOptions(
|
|
5666
|
-
|
|
5667
|
+
yargs41.positional("filename", { demandOption: true, describe: "Data type file to put" })
|
|
5667
5668
|
)
|
|
5668
5669
|
)
|
|
5669
5670
|
)
|
|
@@ -5685,7 +5686,7 @@ var DataTypeModule = {
|
|
|
5685
5686
|
command: "datatype <command>",
|
|
5686
5687
|
aliases: ["dt"],
|
|
5687
5688
|
describe: "Commands for Data Type definitions",
|
|
5688
|
-
builder: (
|
|
5689
|
+
builder: (yargs41) => yargs41.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
|
|
5689
5690
|
handler: () => {
|
|
5690
5691
|
yargs12.help();
|
|
5691
5692
|
}
|
|
@@ -5698,13 +5699,13 @@ import yargs13 from "yargs";
|
|
|
5698
5699
|
var EntryGetModule = {
|
|
5699
5700
|
command: "get <id>",
|
|
5700
5701
|
describe: "Get an entry",
|
|
5701
|
-
builder: (
|
|
5702
|
+
builder: (yargs41) => withConfiguration(
|
|
5702
5703
|
withDebugOptions(
|
|
5703
5704
|
withFormatOptions(
|
|
5704
5705
|
withApiOptions(
|
|
5705
5706
|
withProjectOptions(
|
|
5706
5707
|
withStateOptions(
|
|
5707
|
-
|
|
5708
|
+
yargs41.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
|
|
5708
5709
|
resolveData: {
|
|
5709
5710
|
type: "boolean",
|
|
5710
5711
|
default: false,
|
|
@@ -5776,13 +5777,13 @@ var LEGACY_DEFAULT_LIMIT = 1e3;
|
|
|
5776
5777
|
var EntryListModule = {
|
|
5777
5778
|
command: "list",
|
|
5778
5779
|
describe: "List entries",
|
|
5779
|
-
builder: (
|
|
5780
|
+
builder: (yargs41) => withConfiguration(
|
|
5780
5781
|
withDebugOptions(
|
|
5781
5782
|
withFormatOptions(
|
|
5782
5783
|
withApiOptions(
|
|
5783
5784
|
withProjectOptions(
|
|
5784
5785
|
withStateOptions(
|
|
5785
|
-
|
|
5786
|
+
yargs41.options({
|
|
5786
5787
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
5787
5788
|
limit: {
|
|
5788
5789
|
describe: "Number of rows to fetch",
|
|
@@ -5917,12 +5918,12 @@ function createEntryEngineDataSource({
|
|
|
5917
5918
|
var EntryPublishModule = {
|
|
5918
5919
|
command: "publish [ids]",
|
|
5919
5920
|
describe: "Publishes entry(ies)",
|
|
5920
|
-
builder: (
|
|
5921
|
+
builder: (yargs41) => withConfiguration(
|
|
5921
5922
|
withDiffOptions(
|
|
5922
5923
|
withApiOptions(
|
|
5923
5924
|
withProjectOptions(
|
|
5924
5925
|
withDiffOptions(
|
|
5925
|
-
|
|
5926
|
+
yargs41.positional("ids", {
|
|
5926
5927
|
describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
5927
5928
|
type: "string"
|
|
5928
5929
|
}).option("all", {
|
|
@@ -5997,13 +5998,13 @@ var EntryPublishModule = {
|
|
|
5997
5998
|
var EntryPullModule = {
|
|
5998
5999
|
command: "pull <directory>",
|
|
5999
6000
|
describe: "Pulls all entries to local files in a directory",
|
|
6000
|
-
builder: (
|
|
6001
|
+
builder: (yargs41) => withConfiguration(
|
|
6001
6002
|
withDebugOptions(
|
|
6002
6003
|
withApiOptions(
|
|
6003
6004
|
withProjectOptions(
|
|
6004
6005
|
withStateOptions(
|
|
6005
6006
|
withDiffOptions(
|
|
6006
|
-
|
|
6007
|
+
yargs41.positional("directory", {
|
|
6007
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.",
|
|
6008
6009
|
type: "string"
|
|
6009
6010
|
}).option("format", {
|
|
@@ -6103,13 +6104,13 @@ var EntryPullModule = {
|
|
|
6103
6104
|
var EntryPushModule = {
|
|
6104
6105
|
command: "push <directory>",
|
|
6105
6106
|
describe: "Pushes all entries from files in a directory to Uniform",
|
|
6106
|
-
builder: (
|
|
6107
|
+
builder: (yargs41) => withConfiguration(
|
|
6107
6108
|
withDebugOptions(
|
|
6108
6109
|
withApiOptions(
|
|
6109
6110
|
withProjectOptions(
|
|
6110
6111
|
withStateOptions(
|
|
6111
6112
|
withDiffOptions(
|
|
6112
|
-
|
|
6113
|
+
yargs41.positional("directory", {
|
|
6113
6114
|
describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
|
|
6114
6115
|
type: "string"
|
|
6115
6116
|
}).option("mode", {
|
|
@@ -6208,11 +6209,11 @@ var EntryRemoveModule = {
|
|
|
6208
6209
|
command: "remove <id>",
|
|
6209
6210
|
aliases: ["delete", "rm"],
|
|
6210
6211
|
describe: "Delete an entry",
|
|
6211
|
-
builder: (
|
|
6212
|
+
builder: (yargs41) => withConfiguration(
|
|
6212
6213
|
withDebugOptions(
|
|
6213
6214
|
withApiOptions(
|
|
6214
6215
|
withProjectOptions(
|
|
6215
|
-
|
|
6216
|
+
yargs41.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
|
|
6216
6217
|
)
|
|
6217
6218
|
)
|
|
6218
6219
|
)
|
|
@@ -6234,11 +6235,11 @@ import { diffJson as diffJson3 } from "diff";
|
|
|
6234
6235
|
var EntryUnpublishModule = {
|
|
6235
6236
|
command: "unpublish [ids]",
|
|
6236
6237
|
describe: "Unpublish an entry(ies)",
|
|
6237
|
-
builder: (
|
|
6238
|
+
builder: (yargs41) => withConfiguration(
|
|
6238
6239
|
withDebugOptions(
|
|
6239
6240
|
withApiOptions(
|
|
6240
6241
|
withProjectOptions(
|
|
6241
|
-
|
|
6242
|
+
yargs41.positional("ids", {
|
|
6242
6243
|
describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
6243
6244
|
type: "string"
|
|
6244
6245
|
}).option("all", {
|
|
@@ -6308,12 +6309,12 @@ var EntryUpdateModule = {
|
|
|
6308
6309
|
command: "update <filename>",
|
|
6309
6310
|
aliases: ["put"],
|
|
6310
6311
|
describe: "Insert or update an entry",
|
|
6311
|
-
builder: (
|
|
6312
|
+
builder: (yargs41) => withConfiguration(
|
|
6312
6313
|
withDebugOptions(
|
|
6313
6314
|
withApiOptions(
|
|
6314
6315
|
withProjectOptions(
|
|
6315
6316
|
withStateOptions(
|
|
6316
|
-
|
|
6317
|
+
yargs41.positional("filename", { demandOption: true, describe: "Entry file to put" })
|
|
6317
6318
|
)
|
|
6318
6319
|
)
|
|
6319
6320
|
)
|
|
@@ -6345,7 +6346,7 @@ var EntryUpdateModule = {
|
|
|
6345
6346
|
var EntryModule = {
|
|
6346
6347
|
command: "entry <command>",
|
|
6347
6348
|
describe: "Commands for Entries",
|
|
6348
|
-
builder: (
|
|
6349
|
+
builder: (yargs41) => yargs41.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
|
|
6349
6350
|
handler: () => {
|
|
6350
6351
|
yargs13.help();
|
|
6351
6352
|
}
|
|
@@ -6358,13 +6359,13 @@ import yargs14 from "yargs";
|
|
|
6358
6359
|
var EntryPatternGetModule = {
|
|
6359
6360
|
command: "get <id>",
|
|
6360
6361
|
describe: "Get an entry pattern",
|
|
6361
|
-
builder: (
|
|
6362
|
+
builder: (yargs41) => withConfiguration(
|
|
6362
6363
|
withDebugOptions(
|
|
6363
6364
|
withFormatOptions(
|
|
6364
6365
|
withApiOptions(
|
|
6365
6366
|
withProjectOptions(
|
|
6366
6367
|
withStateOptions(
|
|
6367
|
-
|
|
6368
|
+
yargs41.positional("id", {
|
|
6368
6369
|
demandOption: true,
|
|
6369
6370
|
describe: "Entry pattern public ID to fetch"
|
|
6370
6371
|
}).option({
|
|
@@ -6417,13 +6418,13 @@ var EntryPatternGetModule = {
|
|
|
6417
6418
|
var EntryPatternListModule = {
|
|
6418
6419
|
command: "list",
|
|
6419
6420
|
describe: "List entry patterns",
|
|
6420
|
-
builder: (
|
|
6421
|
+
builder: (yargs41) => withConfiguration(
|
|
6421
6422
|
withDebugOptions(
|
|
6422
6423
|
withFormatOptions(
|
|
6423
6424
|
withApiOptions(
|
|
6424
6425
|
withProjectOptions(
|
|
6425
6426
|
withStateOptions(
|
|
6426
|
-
|
|
6427
|
+
yargs41.option({
|
|
6427
6428
|
withComponentIDs: {
|
|
6428
6429
|
type: "boolean",
|
|
6429
6430
|
default: false,
|
|
@@ -6469,12 +6470,12 @@ var EntryPatternListModule = {
|
|
|
6469
6470
|
var EntryPatternPublishModule = {
|
|
6470
6471
|
command: "publish [ids]",
|
|
6471
6472
|
describe: "Publishes entry pattern(s)",
|
|
6472
|
-
builder: (
|
|
6473
|
+
builder: (yargs41) => withConfiguration(
|
|
6473
6474
|
withDebugOptions(
|
|
6474
6475
|
withApiOptions(
|
|
6475
6476
|
withProjectOptions(
|
|
6476
6477
|
withDiffOptions(
|
|
6477
|
-
|
|
6478
|
+
yargs41.positional("ids", {
|
|
6478
6479
|
describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
6479
6480
|
type: "string"
|
|
6480
6481
|
}).option("all", {
|
|
@@ -6549,13 +6550,13 @@ var EntryPatternPublishModule = {
|
|
|
6549
6550
|
var EntryPatternPullModule = {
|
|
6550
6551
|
command: "pull <directory>",
|
|
6551
6552
|
describe: "Pulls all entry patterns to local files in a directory",
|
|
6552
|
-
builder: (
|
|
6553
|
+
builder: (yargs41) => withConfiguration(
|
|
6553
6554
|
withApiOptions(
|
|
6554
6555
|
withDebugOptions(
|
|
6555
6556
|
withProjectOptions(
|
|
6556
6557
|
withStateOptions(
|
|
6557
6558
|
withDiffOptions(
|
|
6558
|
-
|
|
6559
|
+
yargs41.positional("directory", {
|
|
6559
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.",
|
|
6560
6561
|
type: "string"
|
|
6561
6562
|
}).option("format", {
|
|
@@ -6655,13 +6656,13 @@ var EntryPatternPullModule = {
|
|
|
6655
6656
|
var EntryPatternPushModule = {
|
|
6656
6657
|
command: "push <directory>",
|
|
6657
6658
|
describe: "Pushes all entry patterns from files in a directory to Uniform",
|
|
6658
|
-
builder: (
|
|
6659
|
+
builder: (yargs41) => withConfiguration(
|
|
6659
6660
|
withDebugOptions(
|
|
6660
6661
|
withApiOptions(
|
|
6661
6662
|
withProjectOptions(
|
|
6662
6663
|
withStateOptions(
|
|
6663
6664
|
withDiffOptions(
|
|
6664
|
-
|
|
6665
|
+
yargs41.positional("directory", {
|
|
6665
6666
|
describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
|
|
6666
6667
|
type: "string"
|
|
6667
6668
|
}).option("what-if", {
|
|
@@ -6765,11 +6766,11 @@ var EntryPatternRemoveModule = {
|
|
|
6765
6766
|
command: "remove <id>",
|
|
6766
6767
|
aliases: ["delete", "rm"],
|
|
6767
6768
|
describe: "Delete an entry pattern",
|
|
6768
|
-
builder: (
|
|
6769
|
+
builder: (yargs41) => withConfiguration(
|
|
6769
6770
|
withDebugOptions(
|
|
6770
6771
|
withApiOptions(
|
|
6771
6772
|
withProjectOptions(
|
|
6772
|
-
|
|
6773
|
+
yargs41.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
|
|
6773
6774
|
)
|
|
6774
6775
|
)
|
|
6775
6776
|
)
|
|
@@ -6791,11 +6792,11 @@ import { diffJson as diffJson4 } from "diff";
|
|
|
6791
6792
|
var EntryPatternUnpublishModule = {
|
|
6792
6793
|
command: "unpublish [ids]",
|
|
6793
6794
|
describe: "Unpublish an entry patterns",
|
|
6794
|
-
builder: (
|
|
6795
|
+
builder: (yargs41) => withConfiguration(
|
|
6795
6796
|
withDebugOptions(
|
|
6796
6797
|
withApiOptions(
|
|
6797
6798
|
withProjectOptions(
|
|
6798
|
-
|
|
6799
|
+
yargs41.positional("ids", {
|
|
6799
6800
|
describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
|
|
6800
6801
|
type: "string"
|
|
6801
6802
|
}).option("all", {
|
|
@@ -6865,12 +6866,12 @@ var EntryPatternUpdateModule = {
|
|
|
6865
6866
|
command: "update <filename>",
|
|
6866
6867
|
aliases: ["put"],
|
|
6867
6868
|
describe: "Insert or update an entry pattern",
|
|
6868
|
-
builder: (
|
|
6869
|
+
builder: (yargs41) => withConfiguration(
|
|
6869
6870
|
withDebugOptions(
|
|
6870
6871
|
withApiOptions(
|
|
6871
6872
|
withProjectOptions(
|
|
6872
6873
|
withStateOptions(
|
|
6873
|
-
|
|
6874
|
+
yargs41.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
|
|
6874
6875
|
)
|
|
6875
6876
|
)
|
|
6876
6877
|
)
|
|
@@ -6906,7 +6907,7 @@ var EntryPatternUpdateModule = {
|
|
|
6906
6907
|
var EntryPatternModule = {
|
|
6907
6908
|
command: "entry-pattern <command>",
|
|
6908
6909
|
describe: "Commands for Entry patterns",
|
|
6909
|
-
builder: (
|
|
6910
|
+
builder: (yargs41) => yargs41.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
|
|
6910
6911
|
handler: () => {
|
|
6911
6912
|
yargs14.help();
|
|
6912
6913
|
}
|
|
@@ -6955,12 +6956,12 @@ function getLocaleClient(options) {
|
|
|
6955
6956
|
var LocalePullModule = {
|
|
6956
6957
|
command: "pull <directory>",
|
|
6957
6958
|
describe: "Pulls all locales to local files in a directory",
|
|
6958
|
-
builder: (
|
|
6959
|
+
builder: (yargs41) => withConfiguration(
|
|
6959
6960
|
withDebugOptions(
|
|
6960
6961
|
withApiOptions(
|
|
6961
6962
|
withProjectOptions(
|
|
6962
6963
|
withDiffOptions(
|
|
6963
|
-
|
|
6964
|
+
yargs41.positional("directory", {
|
|
6964
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.",
|
|
6965
6966
|
type: "string"
|
|
6966
6967
|
}).option("format", {
|
|
@@ -7040,12 +7041,12 @@ var LocalePullModule = {
|
|
|
7040
7041
|
var LocalePushModule = {
|
|
7041
7042
|
command: "push <directory>",
|
|
7042
7043
|
describe: "Pushes all locales from files in a directory to Uniform",
|
|
7043
|
-
builder: (
|
|
7044
|
+
builder: (yargs41) => withConfiguration(
|
|
7044
7045
|
withDebugOptions(
|
|
7045
7046
|
withApiOptions(
|
|
7046
7047
|
withProjectOptions(
|
|
7047
7048
|
withDiffOptions(
|
|
7048
|
-
|
|
7049
|
+
yargs41.positional("directory", {
|
|
7049
7050
|
describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
|
|
7050
7051
|
type: "string"
|
|
7051
7052
|
}).option("mode", {
|
|
@@ -7113,7 +7114,7 @@ var LocalePushModule = {
|
|
|
7113
7114
|
var LocaleModule = {
|
|
7114
7115
|
command: "locale <command>",
|
|
7115
7116
|
describe: "Commands for locale definitions",
|
|
7116
|
-
builder: (
|
|
7117
|
+
builder: (yargs41) => yargs41.command(LocalePullModule).command(LocalePushModule),
|
|
7117
7118
|
handler: () => {
|
|
7118
7119
|
yargs15.help();
|
|
7119
7120
|
}
|
|
@@ -7134,12 +7135,12 @@ function getPreviewClient(options) {
|
|
|
7134
7135
|
var PreviewUrlGetModule = {
|
|
7135
7136
|
command: "get <id>",
|
|
7136
7137
|
describe: "Fetch a preview URL",
|
|
7137
|
-
builder: (
|
|
7138
|
+
builder: (yargs41) => withConfiguration(
|
|
7138
7139
|
withFormatOptions(
|
|
7139
7140
|
withDebugOptions(
|
|
7140
7141
|
withApiOptions(
|
|
7141
7142
|
withProjectOptions(
|
|
7142
|
-
|
|
7143
|
+
yargs41.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
|
|
7143
7144
|
)
|
|
7144
7145
|
)
|
|
7145
7146
|
)
|
|
@@ -7163,8 +7164,8 @@ var PreviewUrlListModule = {
|
|
|
7163
7164
|
command: "list",
|
|
7164
7165
|
describe: "List preview URLs",
|
|
7165
7166
|
aliases: ["ls"],
|
|
7166
|
-
builder: (
|
|
7167
|
-
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(
|
|
7167
|
+
builder: (yargs41) => withConfiguration(
|
|
7168
|
+
withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs41.options({})))))
|
|
7168
7169
|
),
|
|
7169
7170
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7170
7171
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7206,12 +7207,12 @@ function createPreviewUrlEngineDataSource({
|
|
|
7206
7207
|
var PreviewUrlPullModule = {
|
|
7207
7208
|
command: "pull <directory>",
|
|
7208
7209
|
describe: "Pulls all preview urls to local files in a directory",
|
|
7209
|
-
builder: (
|
|
7210
|
+
builder: (yargs41) => withConfiguration(
|
|
7210
7211
|
withApiOptions(
|
|
7211
7212
|
withProjectOptions(
|
|
7212
7213
|
withDebugOptions(
|
|
7213
7214
|
withDiffOptions(
|
|
7214
|
-
|
|
7215
|
+
yargs41.positional("directory", {
|
|
7215
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.",
|
|
7216
7217
|
type: "string"
|
|
7217
7218
|
}).option("format", {
|
|
@@ -7286,12 +7287,12 @@ var PreviewUrlPullModule = {
|
|
|
7286
7287
|
var PreviewUrlPushModule = {
|
|
7287
7288
|
command: "push <directory>",
|
|
7288
7289
|
describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
|
|
7289
|
-
builder: (
|
|
7290
|
+
builder: (yargs41) => withConfiguration(
|
|
7290
7291
|
withApiOptions(
|
|
7291
7292
|
withProjectOptions(
|
|
7292
7293
|
withDiffOptions(
|
|
7293
7294
|
withDebugOptions(
|
|
7294
|
-
|
|
7295
|
+
yargs41.positional("directory", {
|
|
7295
7296
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7296
7297
|
type: "string"
|
|
7297
7298
|
}).option("mode", {
|
|
@@ -7355,11 +7356,11 @@ var PreviewUrlRemoveModule = {
|
|
|
7355
7356
|
command: "remove <id>",
|
|
7356
7357
|
aliases: ["delete", "rm"],
|
|
7357
7358
|
describe: "Delete a preview URL",
|
|
7358
|
-
builder: (
|
|
7359
|
+
builder: (yargs41) => withConfiguration(
|
|
7359
7360
|
withApiOptions(
|
|
7360
7361
|
withDebugOptions(
|
|
7361
7362
|
withProjectOptions(
|
|
7362
|
-
|
|
7363
|
+
yargs41.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
|
|
7363
7364
|
)
|
|
7364
7365
|
)
|
|
7365
7366
|
)
|
|
@@ -7380,11 +7381,11 @@ var PreviewUrlUpdateModule = {
|
|
|
7380
7381
|
command: "update <filename>",
|
|
7381
7382
|
aliases: ["put"],
|
|
7382
7383
|
describe: "Insert or update a preview URL",
|
|
7383
|
-
builder: (
|
|
7384
|
+
builder: (yargs41) => withConfiguration(
|
|
7384
7385
|
withDebugOptions(
|
|
7385
7386
|
withApiOptions(
|
|
7386
7387
|
withProjectOptions(
|
|
7387
|
-
|
|
7388
|
+
yargs41.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
7388
7389
|
)
|
|
7389
7390
|
)
|
|
7390
7391
|
)
|
|
@@ -7406,7 +7407,7 @@ var PreviewUrlModule = {
|
|
|
7406
7407
|
command: "preview-url <command>",
|
|
7407
7408
|
aliases: ["pu"],
|
|
7408
7409
|
describe: "Commands for Canvas preview urls",
|
|
7409
|
-
builder: (
|
|
7410
|
+
builder: (yargs41) => yargs41.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
|
|
7410
7411
|
handler: () => {
|
|
7411
7412
|
yargs16.help();
|
|
7412
7413
|
}
|
|
@@ -7419,12 +7420,12 @@ import yargs17 from "yargs";
|
|
|
7419
7420
|
var PreviewViewportGetModule = {
|
|
7420
7421
|
command: "get <id>",
|
|
7421
7422
|
describe: "Fetch a preview viewport",
|
|
7422
|
-
builder: (
|
|
7423
|
+
builder: (yargs41) => withConfiguration(
|
|
7423
7424
|
withFormatOptions(
|
|
7424
7425
|
withDebugOptions(
|
|
7425
7426
|
withApiOptions(
|
|
7426
7427
|
withProjectOptions(
|
|
7427
|
-
|
|
7428
|
+
yargs41.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
|
|
7428
7429
|
)
|
|
7429
7430
|
)
|
|
7430
7431
|
)
|
|
@@ -7448,8 +7449,8 @@ var PreviewViewportListModule = {
|
|
|
7448
7449
|
command: "list",
|
|
7449
7450
|
describe: "List preview viewports",
|
|
7450
7451
|
aliases: ["ls"],
|
|
7451
|
-
builder: (
|
|
7452
|
-
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(
|
|
7452
|
+
builder: (yargs41) => withConfiguration(
|
|
7453
|
+
withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs41.options({})))))
|
|
7453
7454
|
),
|
|
7454
7455
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7455
7456
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
@@ -7495,12 +7496,12 @@ function createPreviewViewportEngineDataSource({
|
|
|
7495
7496
|
var PreviewViewportPullModule = {
|
|
7496
7497
|
command: "pull <directory>",
|
|
7497
7498
|
describe: "Pulls all preview viewports to local files in a directory",
|
|
7498
|
-
builder: (
|
|
7499
|
+
builder: (yargs41) => withConfiguration(
|
|
7499
7500
|
withApiOptions(
|
|
7500
7501
|
withProjectOptions(
|
|
7501
7502
|
withDebugOptions(
|
|
7502
7503
|
withDiffOptions(
|
|
7503
|
-
|
|
7504
|
+
yargs41.positional("directory", {
|
|
7504
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.",
|
|
7505
7506
|
type: "string"
|
|
7506
7507
|
}).option("format", {
|
|
@@ -7575,12 +7576,12 @@ var PreviewViewportPullModule = {
|
|
|
7575
7576
|
var PreviewViewportPushModule = {
|
|
7576
7577
|
command: "push <directory>",
|
|
7577
7578
|
describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
|
|
7578
|
-
builder: (
|
|
7579
|
+
builder: (yargs41) => withConfiguration(
|
|
7579
7580
|
withApiOptions(
|
|
7580
7581
|
withProjectOptions(
|
|
7581
7582
|
withDiffOptions(
|
|
7582
7583
|
withDebugOptions(
|
|
7583
|
-
|
|
7584
|
+
yargs41.positional("directory", {
|
|
7584
7585
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
7585
7586
|
type: "string"
|
|
7586
7587
|
}).option("mode", {
|
|
@@ -7644,11 +7645,11 @@ var PreviewViewportRemoveModule = {
|
|
|
7644
7645
|
command: "remove <id>",
|
|
7645
7646
|
aliases: ["delete", "rm"],
|
|
7646
7647
|
describe: "Delete a preview viewport",
|
|
7647
|
-
builder: (
|
|
7648
|
+
builder: (yargs41) => withConfiguration(
|
|
7648
7649
|
withApiOptions(
|
|
7649
7650
|
withDebugOptions(
|
|
7650
7651
|
withProjectOptions(
|
|
7651
|
-
|
|
7652
|
+
yargs41.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
|
|
7652
7653
|
)
|
|
7653
7654
|
)
|
|
7654
7655
|
)
|
|
@@ -7669,11 +7670,11 @@ var PreviewViewportUpdateModule = {
|
|
|
7669
7670
|
command: "update <filename>",
|
|
7670
7671
|
aliases: ["put"],
|
|
7671
7672
|
describe: "Insert or update a preview viewport",
|
|
7672
|
-
builder: (
|
|
7673
|
+
builder: (yargs41) => withConfiguration(
|
|
7673
7674
|
withDebugOptions(
|
|
7674
7675
|
withApiOptions(
|
|
7675
7676
|
withProjectOptions(
|
|
7676
|
-
|
|
7677
|
+
yargs41.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
|
|
7677
7678
|
)
|
|
7678
7679
|
)
|
|
7679
7680
|
)
|
|
@@ -7695,7 +7696,7 @@ var PreviewViewportModule = {
|
|
|
7695
7696
|
command: "preview-viewport <command>",
|
|
7696
7697
|
aliases: ["pv"],
|
|
7697
7698
|
describe: "Commands for Canvas preview viewports",
|
|
7698
|
-
builder: (
|
|
7699
|
+
builder: (yargs41) => yargs41.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
|
|
7699
7700
|
handler: () => {
|
|
7700
7701
|
yargs17.help();
|
|
7701
7702
|
}
|
|
@@ -7714,12 +7715,12 @@ var getPromptClient = (options) => new PromptClient({ ...options, bypassCache: t
|
|
|
7714
7715
|
var PromptGetModule = {
|
|
7715
7716
|
command: "get <id>",
|
|
7716
7717
|
describe: "Get a prompt",
|
|
7717
|
-
builder: (
|
|
7718
|
+
builder: (yargs41) => withConfiguration(
|
|
7718
7719
|
withDebugOptions(
|
|
7719
7720
|
withFormatOptions(
|
|
7720
7721
|
withApiOptions(
|
|
7721
7722
|
withProjectOptions(
|
|
7722
|
-
|
|
7723
|
+
yargs41.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
|
|
7723
7724
|
)
|
|
7724
7725
|
)
|
|
7725
7726
|
)
|
|
@@ -7740,7 +7741,7 @@ var PromptGetModule = {
|
|
|
7740
7741
|
var PromptListModule = {
|
|
7741
7742
|
command: "list",
|
|
7742
7743
|
describe: "List prompts",
|
|
7743
|
-
builder: (
|
|
7744
|
+
builder: (yargs41) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs41))))),
|
|
7744
7745
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
|
|
7745
7746
|
const fetch2 = nodeFetchProxy(proxy, verbose);
|
|
7746
7747
|
const client = getPromptClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -7781,13 +7782,13 @@ function createPromptEngineDataSource({
|
|
|
7781
7782
|
var PromptPullModule = {
|
|
7782
7783
|
command: "pull <directory>",
|
|
7783
7784
|
describe: "Pulls all prompts to local files in a directory",
|
|
7784
|
-
builder: (
|
|
7785
|
+
builder: (yargs41) => withConfiguration(
|
|
7785
7786
|
withDebugOptions(
|
|
7786
7787
|
withApiOptions(
|
|
7787
7788
|
withProjectOptions(
|
|
7788
7789
|
withStateOptions(
|
|
7789
7790
|
withDiffOptions(
|
|
7790
|
-
|
|
7791
|
+
yargs41.positional("directory", {
|
|
7791
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.",
|
|
7792
7793
|
type: "string"
|
|
7793
7794
|
}).option("format", {
|
|
@@ -7868,12 +7869,12 @@ var PromptPullModule = {
|
|
|
7868
7869
|
var PromptPushModule = {
|
|
7869
7870
|
command: "push <directory>",
|
|
7870
7871
|
describe: "Pushes all prompts from files in a directory to Uniform",
|
|
7871
|
-
builder: (
|
|
7872
|
+
builder: (yargs41) => withConfiguration(
|
|
7872
7873
|
withApiOptions(
|
|
7873
7874
|
withProjectOptions(
|
|
7874
7875
|
withStateOptions(
|
|
7875
7876
|
withDiffOptions(
|
|
7876
|
-
|
|
7877
|
+
yargs41.positional("directory", {
|
|
7877
7878
|
describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
|
|
7878
7879
|
type: "string"
|
|
7879
7880
|
}).option("mode", {
|
|
@@ -7942,10 +7943,10 @@ var PromptRemoveModule = {
|
|
|
7942
7943
|
command: "remove <id>",
|
|
7943
7944
|
aliases: ["delete", "rm"],
|
|
7944
7945
|
describe: "Delete a prompt",
|
|
7945
|
-
builder: (
|
|
7946
|
+
builder: (yargs41) => withConfiguration(
|
|
7946
7947
|
withDebugOptions(
|
|
7947
7948
|
withApiOptions(
|
|
7948
|
-
withProjectOptions(
|
|
7949
|
+
withProjectOptions(yargs41.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
|
|
7949
7950
|
)
|
|
7950
7951
|
)
|
|
7951
7952
|
),
|
|
@@ -7965,11 +7966,11 @@ var PromptUpdateModule = {
|
|
|
7965
7966
|
command: "update <filename>",
|
|
7966
7967
|
aliases: ["put"],
|
|
7967
7968
|
describe: "Insert or update a prompt",
|
|
7968
|
-
builder: (
|
|
7969
|
+
builder: (yargs41) => withConfiguration(
|
|
7969
7970
|
withDebugOptions(
|
|
7970
7971
|
withApiOptions(
|
|
7971
7972
|
withProjectOptions(
|
|
7972
|
-
|
|
7973
|
+
yargs41.positional("filename", { demandOption: true, describe: "Prompt file to put" })
|
|
7973
7974
|
)
|
|
7974
7975
|
)
|
|
7975
7976
|
)
|
|
@@ -7991,7 +7992,7 @@ var PromptModule = {
|
|
|
7991
7992
|
command: "prompt <command>",
|
|
7992
7993
|
aliases: ["dt"],
|
|
7993
7994
|
describe: "Commands for AI Prompt definitions",
|
|
7994
|
-
builder: (
|
|
7995
|
+
builder: (yargs41) => yargs41.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
|
|
7995
7996
|
handler: () => {
|
|
7996
7997
|
yargs18.help();
|
|
7997
7998
|
}
|
|
@@ -8041,12 +8042,12 @@ function createWorkflowEngineDataSource({
|
|
|
8041
8042
|
var WorkflowPullModule = {
|
|
8042
8043
|
command: "pull <directory>",
|
|
8043
8044
|
describe: "Pulls all workflows to local files in a directory",
|
|
8044
|
-
builder: (
|
|
8045
|
+
builder: (yargs41) => withConfiguration(
|
|
8045
8046
|
withApiOptions(
|
|
8046
8047
|
withDebugOptions(
|
|
8047
8048
|
withProjectOptions(
|
|
8048
8049
|
withDiffOptions(
|
|
8049
|
-
|
|
8050
|
+
yargs41.positional("directory", {
|
|
8050
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.",
|
|
8051
8052
|
type: "string"
|
|
8052
8053
|
}).option("format", {
|
|
@@ -8121,12 +8122,12 @@ var WorkflowPullModule = {
|
|
|
8121
8122
|
var WorkflowPushModule = {
|
|
8122
8123
|
command: "push <directory>",
|
|
8123
8124
|
describe: "Pushes all workflows from files in a directory to Uniform Canvas",
|
|
8124
|
-
builder: (
|
|
8125
|
+
builder: (yargs41) => withConfiguration(
|
|
8125
8126
|
withDebugOptions(
|
|
8126
8127
|
withApiOptions(
|
|
8127
8128
|
withProjectOptions(
|
|
8128
8129
|
withDiffOptions(
|
|
8129
|
-
|
|
8130
|
+
yargs41.positional("directory", {
|
|
8130
8131
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
8131
8132
|
type: "string"
|
|
8132
8133
|
}).option("mode", {
|
|
@@ -8190,7 +8191,7 @@ var WorkflowModule = {
|
|
|
8190
8191
|
command: "workflow <command>",
|
|
8191
8192
|
aliases: ["wf"],
|
|
8192
8193
|
describe: "Commands for Canvas workflows",
|
|
8193
|
-
builder: (
|
|
8194
|
+
builder: (yargs41) => yargs41.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
|
|
8194
8195
|
handler: () => {
|
|
8195
8196
|
yargs19.help();
|
|
8196
8197
|
}
|
|
@@ -8201,7 +8202,7 @@ var CanvasCommand = {
|
|
|
8201
8202
|
command: "canvas <command>",
|
|
8202
8203
|
aliases: ["cv", "pm", "presentation"],
|
|
8203
8204
|
describe: "Uniform Canvas commands",
|
|
8204
|
-
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(),
|
|
8205
8206
|
handler: () => {
|
|
8206
8207
|
yargs20.showHelp();
|
|
8207
8208
|
}
|
|
@@ -8223,11 +8224,11 @@ var getAggregateClient = (options) => new AggregateClient({ ...options, bypassCa
|
|
|
8223
8224
|
var AggregateGetModule = {
|
|
8224
8225
|
command: "get <id>",
|
|
8225
8226
|
describe: "Fetch an aggregate",
|
|
8226
|
-
builder: (
|
|
8227
|
+
builder: (yargs41) => withConfiguration(
|
|
8227
8228
|
withFormatOptions(
|
|
8228
8229
|
withApiOptions(
|
|
8229
8230
|
withProjectOptions(
|
|
8230
|
-
|
|
8231
|
+
yargs41.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
|
|
8231
8232
|
)
|
|
8232
8233
|
)
|
|
8233
8234
|
)
|
|
@@ -8250,7 +8251,7 @@ var AggregateListModule = {
|
|
|
8250
8251
|
command: "list",
|
|
8251
8252
|
describe: "List aggregates",
|
|
8252
8253
|
aliases: ["ls"],
|
|
8253
|
-
builder: (
|
|
8254
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
8254
8255
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8255
8256
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8256
8257
|
const client = getAggregateClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8313,12 +8314,12 @@ function writeContextPackage(filename, packageContents) {
|
|
|
8313
8314
|
var AggregatePullModule = {
|
|
8314
8315
|
command: "pull <directory>",
|
|
8315
8316
|
describe: "Pulls all aggregates to local files in a directory",
|
|
8316
|
-
builder: (
|
|
8317
|
+
builder: (yargs41) => withConfiguration(
|
|
8317
8318
|
withApiOptions(
|
|
8318
8319
|
withDebugOptions(
|
|
8319
8320
|
withProjectOptions(
|
|
8320
8321
|
withDiffOptions(
|
|
8321
|
-
|
|
8322
|
+
yargs41.positional("directory", {
|
|
8322
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.",
|
|
8323
8324
|
type: "string"
|
|
8324
8325
|
}).option("format", {
|
|
@@ -8393,12 +8394,12 @@ var AggregatePullModule = {
|
|
|
8393
8394
|
var AggregatePushModule = {
|
|
8394
8395
|
command: "push <directory>",
|
|
8395
8396
|
describe: "Pushes all aggregates from files in a directory or package to Uniform",
|
|
8396
|
-
builder: (
|
|
8397
|
+
builder: (yargs41) => withConfiguration(
|
|
8397
8398
|
withApiOptions(
|
|
8398
8399
|
withProjectOptions(
|
|
8399
8400
|
withDiffOptions(
|
|
8400
8401
|
withDebugOptions(
|
|
8401
|
-
|
|
8402
|
+
yargs41.positional("directory", {
|
|
8402
8403
|
describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
|
|
8403
8404
|
type: "string"
|
|
8404
8405
|
}).option("mode", {
|
|
@@ -8463,10 +8464,10 @@ var AggregateRemoveModule = {
|
|
|
8463
8464
|
command: "remove <id>",
|
|
8464
8465
|
aliases: ["delete", "rm"],
|
|
8465
8466
|
describe: "Delete an aggregate",
|
|
8466
|
-
builder: (
|
|
8467
|
+
builder: (yargs41) => withConfiguration(
|
|
8467
8468
|
withApiOptions(
|
|
8468
8469
|
withProjectOptions(
|
|
8469
|
-
|
|
8470
|
+
yargs41.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
|
|
8470
8471
|
)
|
|
8471
8472
|
)
|
|
8472
8473
|
),
|
|
@@ -8482,10 +8483,10 @@ var AggregateUpdateModule = {
|
|
|
8482
8483
|
command: "update <filename>",
|
|
8483
8484
|
aliases: ["put"],
|
|
8484
8485
|
describe: "Insert or update an aggregate",
|
|
8485
|
-
builder: (
|
|
8486
|
+
builder: (yargs41) => withConfiguration(
|
|
8486
8487
|
withApiOptions(
|
|
8487
8488
|
withProjectOptions(
|
|
8488
|
-
|
|
8489
|
+
yargs41.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
|
|
8489
8490
|
)
|
|
8490
8491
|
)
|
|
8491
8492
|
),
|
|
@@ -8502,7 +8503,7 @@ var AggregateModule = {
|
|
|
8502
8503
|
command: "aggregate <command>",
|
|
8503
8504
|
aliases: ["agg", "intent", "audience"],
|
|
8504
8505
|
describe: "Commands for Context aggregates (intents, audiences)",
|
|
8505
|
-
builder: (
|
|
8506
|
+
builder: (yargs41) => yargs41.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
|
|
8506
8507
|
handler: () => {
|
|
8507
8508
|
yargs21.help();
|
|
8508
8509
|
}
|
|
@@ -8523,11 +8524,11 @@ function getEnrichmentClient(options) {
|
|
|
8523
8524
|
var EnrichmentGetModule = {
|
|
8524
8525
|
command: "get <id>",
|
|
8525
8526
|
describe: "Fetch an enrichment category and its values",
|
|
8526
|
-
builder: (
|
|
8527
|
+
builder: (yargs41) => withFormatOptions(
|
|
8527
8528
|
withConfiguration(
|
|
8528
8529
|
withApiOptions(
|
|
8529
8530
|
withProjectOptions(
|
|
8530
|
-
|
|
8531
|
+
yargs41.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
|
|
8531
8532
|
)
|
|
8532
8533
|
)
|
|
8533
8534
|
)
|
|
@@ -8550,7 +8551,7 @@ var EnrichmentListModule = {
|
|
|
8550
8551
|
command: "list",
|
|
8551
8552
|
describe: "List enrichments",
|
|
8552
8553
|
aliases: ["ls"],
|
|
8553
|
-
builder: (
|
|
8554
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
8554
8555
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
8555
8556
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8556
8557
|
const client = getEnrichmentClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -8645,12 +8646,12 @@ var createEnrichmentValueEngineDataSource = ({
|
|
|
8645
8646
|
var EnrichmentPullModule = {
|
|
8646
8647
|
command: "pull <directory>",
|
|
8647
8648
|
describe: "Pulls all enrichments to local files in a directory",
|
|
8648
|
-
builder: (
|
|
8649
|
+
builder: (yargs41) => withConfiguration(
|
|
8649
8650
|
withDebugOptions(
|
|
8650
8651
|
withApiOptions(
|
|
8651
8652
|
withProjectOptions(
|
|
8652
8653
|
withDiffOptions(
|
|
8653
|
-
|
|
8654
|
+
yargs41.positional("directory", {
|
|
8654
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.",
|
|
8655
8656
|
type: "string"
|
|
8656
8657
|
}).option("format", {
|
|
@@ -8725,11 +8726,11 @@ var EnrichmentPullModule = {
|
|
|
8725
8726
|
var EnrichmentPushModule = {
|
|
8726
8727
|
command: "push <directory>",
|
|
8727
8728
|
describe: "Pushes all enrichments from files in a directory or package to Uniform",
|
|
8728
|
-
builder: (
|
|
8729
|
+
builder: (yargs41) => withConfiguration(
|
|
8729
8730
|
withApiOptions(
|
|
8730
8731
|
withProjectOptions(
|
|
8731
8732
|
withDiffOptions(
|
|
8732
|
-
|
|
8733
|
+
yargs41.positional("directory", {
|
|
8733
8734
|
describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
|
|
8734
8735
|
type: "string"
|
|
8735
8736
|
}).option("mode", {
|
|
@@ -8792,10 +8793,10 @@ var EnrichmentRemoveModule = {
|
|
|
8792
8793
|
command: "remove <id>",
|
|
8793
8794
|
aliases: ["delete", "rm"],
|
|
8794
8795
|
describe: "Delete an enrichment category and its values",
|
|
8795
|
-
builder: (
|
|
8796
|
+
builder: (yargs41) => withConfiguration(
|
|
8796
8797
|
withApiOptions(
|
|
8797
8798
|
withProjectOptions(
|
|
8798
|
-
|
|
8799
|
+
yargs41.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
|
|
8799
8800
|
)
|
|
8800
8801
|
)
|
|
8801
8802
|
),
|
|
@@ -8811,7 +8812,7 @@ var EnrichmentModule = {
|
|
|
8811
8812
|
command: "enrichment <command>",
|
|
8812
8813
|
aliases: ["enr"],
|
|
8813
8814
|
describe: "Commands for Context enrichments",
|
|
8814
|
-
builder: (
|
|
8815
|
+
builder: (yargs41) => yargs41.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
|
|
8815
8816
|
handler: () => {
|
|
8816
8817
|
yargs22.help();
|
|
8817
8818
|
}
|
|
@@ -8829,10 +8830,10 @@ var ManifestGetModule = {
|
|
|
8829
8830
|
command: "get [output]",
|
|
8830
8831
|
aliases: ["dl", "download"],
|
|
8831
8832
|
describe: "Download the Uniform Context manifest for a project",
|
|
8832
|
-
builder: (
|
|
8833
|
+
builder: (yargs41) => withConfiguration(
|
|
8833
8834
|
withApiOptions(
|
|
8834
8835
|
withProjectOptions(
|
|
8835
|
-
|
|
8836
|
+
yargs41.option("preview", {
|
|
8836
8837
|
describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
|
|
8837
8838
|
default: false,
|
|
8838
8839
|
type: "boolean",
|
|
@@ -8894,7 +8895,7 @@ import { exit as exit2 } from "process";
|
|
|
8894
8895
|
var ManifestPublishModule = {
|
|
8895
8896
|
command: "publish",
|
|
8896
8897
|
describe: "Publish the Uniform Context manifest for a project",
|
|
8897
|
-
builder: (
|
|
8898
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withProjectOptions(yargs41))),
|
|
8898
8899
|
handler: async ({ apiKey, apiHost, proxy, project }) => {
|
|
8899
8900
|
const fetch2 = nodeFetchProxy(proxy);
|
|
8900
8901
|
try {
|
|
@@ -8927,7 +8928,7 @@ var ManifestModule = {
|
|
|
8927
8928
|
command: "manifest <command>",
|
|
8928
8929
|
describe: "Commands for context manifests",
|
|
8929
8930
|
aliases: ["man"],
|
|
8930
|
-
builder: (
|
|
8931
|
+
builder: (yargs41) => yargs41.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
|
|
8931
8932
|
handler: () => {
|
|
8932
8933
|
yargs23.help();
|
|
8933
8934
|
}
|
|
@@ -8941,11 +8942,11 @@ import { UncachedQuirkClient } from "@uniformdev/context/api";
|
|
|
8941
8942
|
var QuirkGetModule = {
|
|
8942
8943
|
command: "get <id>",
|
|
8943
8944
|
describe: "Fetch a quirk",
|
|
8944
|
-
builder: (
|
|
8945
|
+
builder: (yargs41) => withConfiguration(
|
|
8945
8946
|
withFormatOptions(
|
|
8946
8947
|
withApiOptions(
|
|
8947
8948
|
withProjectOptions(
|
|
8948
|
-
|
|
8949
|
+
yargs41.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
|
|
8949
8950
|
)
|
|
8950
8951
|
)
|
|
8951
8952
|
)
|
|
@@ -8969,11 +8970,11 @@ var QuirkListModule = {
|
|
|
8969
8970
|
command: "list",
|
|
8970
8971
|
describe: "List quirks",
|
|
8971
8972
|
aliases: ["ls"],
|
|
8972
|
-
builder: (
|
|
8973
|
+
builder: (yargs41) => withConfiguration(
|
|
8973
8974
|
withFormatOptions(
|
|
8974
8975
|
withApiOptions(
|
|
8975
8976
|
withProjectOptions(
|
|
8976
|
-
|
|
8977
|
+
yargs41.option("withIntegrations", {
|
|
8977
8978
|
alias: ["i"],
|
|
8978
8979
|
describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
|
|
8979
8980
|
type: "boolean"
|
|
@@ -9031,12 +9032,12 @@ function createQuirkEngineDataSource({
|
|
|
9031
9032
|
var QuirkPullModule = {
|
|
9032
9033
|
command: "pull <directory>",
|
|
9033
9034
|
describe: "Pulls all quirks to local files in a directory",
|
|
9034
|
-
builder: (
|
|
9035
|
+
builder: (yargs41) => withConfiguration(
|
|
9035
9036
|
withDebugOptions(
|
|
9036
9037
|
withApiOptions(
|
|
9037
9038
|
withProjectOptions(
|
|
9038
9039
|
withDiffOptions(
|
|
9039
|
-
|
|
9040
|
+
yargs41.positional("directory", {
|
|
9040
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.",
|
|
9041
9042
|
type: "string"
|
|
9042
9043
|
}).option("format", {
|
|
@@ -9112,12 +9113,12 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
|
|
|
9112
9113
|
var QuirkPushModule = {
|
|
9113
9114
|
command: "push <directory>",
|
|
9114
9115
|
describe: "Pushes all quirks from files in a directory or package to Uniform",
|
|
9115
|
-
builder: (
|
|
9116
|
+
builder: (yargs41) => withConfiguration(
|
|
9116
9117
|
withDebugOptions(
|
|
9117
9118
|
withApiOptions(
|
|
9118
9119
|
withProjectOptions(
|
|
9119
9120
|
withDiffOptions(
|
|
9120
|
-
|
|
9121
|
+
yargs41.positional("directory", {
|
|
9121
9122
|
describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
|
|
9122
9123
|
type: "string"
|
|
9123
9124
|
}).option("mode", {
|
|
@@ -9182,10 +9183,10 @@ var QuirkRemoveModule = {
|
|
|
9182
9183
|
command: "remove <id>",
|
|
9183
9184
|
aliases: ["delete", "rm"],
|
|
9184
9185
|
describe: "Delete a quirk",
|
|
9185
|
-
builder: (
|
|
9186
|
+
builder: (yargs41) => withConfiguration(
|
|
9186
9187
|
withApiOptions(
|
|
9187
9188
|
withProjectOptions(
|
|
9188
|
-
|
|
9189
|
+
yargs41.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
|
|
9189
9190
|
)
|
|
9190
9191
|
)
|
|
9191
9192
|
),
|
|
@@ -9202,10 +9203,10 @@ var QuirkUpdateModule = {
|
|
|
9202
9203
|
command: "update <filename>",
|
|
9203
9204
|
aliases: ["put"],
|
|
9204
9205
|
describe: "Insert or update a quirk",
|
|
9205
|
-
builder: (
|
|
9206
|
+
builder: (yargs41) => withConfiguration(
|
|
9206
9207
|
withApiOptions(
|
|
9207
9208
|
withProjectOptions(
|
|
9208
|
-
|
|
9209
|
+
yargs41.positional("filename", { demandOption: true, describe: "Quirk file to put" })
|
|
9209
9210
|
)
|
|
9210
9211
|
)
|
|
9211
9212
|
),
|
|
@@ -9222,7 +9223,7 @@ var QuirkModule = {
|
|
|
9222
9223
|
command: "quirk <command>",
|
|
9223
9224
|
aliases: ["qk"],
|
|
9224
9225
|
describe: "Commands for Context quirks",
|
|
9225
|
-
builder: (
|
|
9226
|
+
builder: (yargs41) => yargs41.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
|
|
9226
9227
|
handler: () => {
|
|
9227
9228
|
yargs24.help();
|
|
9228
9229
|
}
|
|
@@ -9236,11 +9237,11 @@ import { UncachedSignalClient } from "@uniformdev/context/api";
|
|
|
9236
9237
|
var SignalGetModule = {
|
|
9237
9238
|
command: "get <id>",
|
|
9238
9239
|
describe: "Fetch a signal",
|
|
9239
|
-
builder: (
|
|
9240
|
+
builder: (yargs41) => withConfiguration(
|
|
9240
9241
|
withFormatOptions(
|
|
9241
9242
|
withApiOptions(
|
|
9242
9243
|
withProjectOptions(
|
|
9243
|
-
|
|
9244
|
+
yargs41.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
|
|
9244
9245
|
)
|
|
9245
9246
|
)
|
|
9246
9247
|
)
|
|
@@ -9264,7 +9265,7 @@ var SignalListModule = {
|
|
|
9264
9265
|
command: "list",
|
|
9265
9266
|
describe: "List signals",
|
|
9266
9267
|
aliases: ["ls"],
|
|
9267
|
-
builder: (
|
|
9268
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
9268
9269
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9269
9270
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9270
9271
|
const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9314,12 +9315,12 @@ function createSignalEngineDataSource({
|
|
|
9314
9315
|
var SignalPullModule = {
|
|
9315
9316
|
command: "pull <directory>",
|
|
9316
9317
|
describe: "Pulls all signals to local files in a directory",
|
|
9317
|
-
builder: (
|
|
9318
|
+
builder: (yargs41) => withConfiguration(
|
|
9318
9319
|
withDebugOptions(
|
|
9319
9320
|
withApiOptions(
|
|
9320
9321
|
withProjectOptions(
|
|
9321
9322
|
withDiffOptions(
|
|
9322
|
-
|
|
9323
|
+
yargs41.positional("directory", {
|
|
9323
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.",
|
|
9324
9325
|
type: "string"
|
|
9325
9326
|
}).option("format", {
|
|
@@ -9395,12 +9396,12 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
|
|
|
9395
9396
|
var SignalPushModule = {
|
|
9396
9397
|
command: "push <directory>",
|
|
9397
9398
|
describe: "Pushes all signals from files in a directory or package to Uniform",
|
|
9398
|
-
builder: (
|
|
9399
|
+
builder: (yargs41) => withConfiguration(
|
|
9399
9400
|
withDebugOptions(
|
|
9400
9401
|
withApiOptions(
|
|
9401
9402
|
withProjectOptions(
|
|
9402
9403
|
withDiffOptions(
|
|
9403
|
-
|
|
9404
|
+
yargs41.positional("directory", {
|
|
9404
9405
|
describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
|
|
9405
9406
|
type: "string"
|
|
9406
9407
|
}).option("mode", {
|
|
@@ -9465,10 +9466,10 @@ var SignalRemoveModule = {
|
|
|
9465
9466
|
command: "remove <id>",
|
|
9466
9467
|
aliases: ["delete", "rm"],
|
|
9467
9468
|
describe: "Delete a signal",
|
|
9468
|
-
builder: (
|
|
9469
|
+
builder: (yargs41) => withConfiguration(
|
|
9469
9470
|
withApiOptions(
|
|
9470
9471
|
withProjectOptions(
|
|
9471
|
-
|
|
9472
|
+
yargs41.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
|
|
9472
9473
|
)
|
|
9473
9474
|
)
|
|
9474
9475
|
),
|
|
@@ -9485,10 +9486,10 @@ var SignalUpdateModule = {
|
|
|
9485
9486
|
command: "update <filename>",
|
|
9486
9487
|
aliases: ["put"],
|
|
9487
9488
|
describe: "Insert or update a signal",
|
|
9488
|
-
builder: (
|
|
9489
|
+
builder: (yargs41) => withConfiguration(
|
|
9489
9490
|
withApiOptions(
|
|
9490
9491
|
withProjectOptions(
|
|
9491
|
-
|
|
9492
|
+
yargs41.positional("filename", { demandOption: true, describe: "Signal file to put" })
|
|
9492
9493
|
)
|
|
9493
9494
|
)
|
|
9494
9495
|
),
|
|
@@ -9505,7 +9506,7 @@ var SignalModule = {
|
|
|
9505
9506
|
command: "signal <command>",
|
|
9506
9507
|
aliases: ["sig"],
|
|
9507
9508
|
describe: "Commands for Context signals",
|
|
9508
|
-
builder: (
|
|
9509
|
+
builder: (yargs41) => yargs41.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
|
|
9509
9510
|
handler: () => {
|
|
9510
9511
|
yargs25.help();
|
|
9511
9512
|
}
|
|
@@ -9519,11 +9520,11 @@ import { UncachedTestClient } from "@uniformdev/context/api";
|
|
|
9519
9520
|
var TestGetModule = {
|
|
9520
9521
|
command: "get <id>",
|
|
9521
9522
|
describe: "Fetch a test",
|
|
9522
|
-
builder: (
|
|
9523
|
+
builder: (yargs41) => withConfiguration(
|
|
9523
9524
|
withFormatOptions(
|
|
9524
9525
|
withApiOptions(
|
|
9525
9526
|
withProjectOptions(
|
|
9526
|
-
|
|
9527
|
+
yargs41.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
|
|
9527
9528
|
)
|
|
9528
9529
|
)
|
|
9529
9530
|
)
|
|
@@ -9547,7 +9548,7 @@ var TestListModule = {
|
|
|
9547
9548
|
command: "list",
|
|
9548
9549
|
describe: "List tests",
|
|
9549
9550
|
aliases: ["ls"],
|
|
9550
|
-
builder: (
|
|
9551
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
9551
9552
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
9552
9553
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9553
9554
|
const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -9597,12 +9598,12 @@ function createTestEngineDataSource({
|
|
|
9597
9598
|
var TestPullModule = {
|
|
9598
9599
|
command: "pull <directory>",
|
|
9599
9600
|
describe: "Pulls all tests to local files in a directory",
|
|
9600
|
-
builder: (
|
|
9601
|
+
builder: (yargs41) => withConfiguration(
|
|
9601
9602
|
withDebugOptions(
|
|
9602
9603
|
withApiOptions(
|
|
9603
9604
|
withProjectOptions(
|
|
9604
9605
|
withDiffOptions(
|
|
9605
|
-
|
|
9606
|
+
yargs41.positional("directory", {
|
|
9606
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.",
|
|
9607
9608
|
type: "string"
|
|
9608
9609
|
}).option("format", {
|
|
@@ -9678,12 +9679,12 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
|
|
|
9678
9679
|
var TestPushModule = {
|
|
9679
9680
|
command: "push <directory>",
|
|
9680
9681
|
describe: "Pushes all tests from files in a directory or package to Uniform",
|
|
9681
|
-
builder: (
|
|
9682
|
+
builder: (yargs41) => withConfiguration(
|
|
9682
9683
|
withDebugOptions(
|
|
9683
9684
|
withApiOptions(
|
|
9684
9685
|
withProjectOptions(
|
|
9685
9686
|
withDiffOptions(
|
|
9686
|
-
|
|
9687
|
+
yargs41.positional("directory", {
|
|
9687
9688
|
describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
|
|
9688
9689
|
type: "string"
|
|
9689
9690
|
}).option("mode", {
|
|
@@ -9748,10 +9749,10 @@ var TestRemoveModule = {
|
|
|
9748
9749
|
command: "remove <id>",
|
|
9749
9750
|
aliases: ["delete", "rm"],
|
|
9750
9751
|
describe: "Delete a test",
|
|
9751
|
-
builder: (
|
|
9752
|
+
builder: (yargs41) => withConfiguration(
|
|
9752
9753
|
withApiOptions(
|
|
9753
9754
|
withProjectOptions(
|
|
9754
|
-
|
|
9755
|
+
yargs41.positional("id", { demandOption: true, describe: "Test public ID to delete" })
|
|
9755
9756
|
)
|
|
9756
9757
|
)
|
|
9757
9758
|
),
|
|
@@ -9768,9 +9769,9 @@ var TestUpdateModule = {
|
|
|
9768
9769
|
command: "update <filename>",
|
|
9769
9770
|
aliases: ["put"],
|
|
9770
9771
|
describe: "Insert or update a test",
|
|
9771
|
-
builder: (
|
|
9772
|
+
builder: (yargs41) => withConfiguration(
|
|
9772
9773
|
withApiOptions(
|
|
9773
|
-
withProjectOptions(
|
|
9774
|
+
withProjectOptions(yargs41.positional("filename", { demandOption: true, describe: "Test file to put" }))
|
|
9774
9775
|
)
|
|
9775
9776
|
),
|
|
9776
9777
|
handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
|
|
@@ -9785,7 +9786,7 @@ var TestUpdateModule = {
|
|
|
9785
9786
|
var TestModule = {
|
|
9786
9787
|
command: "test <command>",
|
|
9787
9788
|
describe: "Commands for Context A/B tests",
|
|
9788
|
-
builder: (
|
|
9789
|
+
builder: (yargs41) => yargs41.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
|
|
9789
9790
|
handler: () => {
|
|
9790
9791
|
yargs26.help();
|
|
9791
9792
|
}
|
|
@@ -9796,24 +9797,57 @@ var ContextCommand = {
|
|
|
9796
9797
|
command: "context <command>",
|
|
9797
9798
|
aliases: ["ctx"],
|
|
9798
9799
|
describe: "Uniform Context commands",
|
|
9799
|
-
builder: (
|
|
9800
|
+
builder: (yargs41) => yargs41.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
|
|
9800
9801
|
handler: () => {
|
|
9801
9802
|
yargs27.showHelp();
|
|
9802
9803
|
}
|
|
9803
9804
|
};
|
|
9804
9805
|
|
|
9805
9806
|
// src/commands/integration/index.ts
|
|
9806
|
-
import
|
|
9807
|
+
import yargs32 from "yargs";
|
|
9807
9808
|
|
|
9808
9809
|
// src/commands/integration/commands/definition.ts
|
|
9809
|
-
import
|
|
9810
|
+
import yargs31 from "yargs";
|
|
9810
9811
|
|
|
9811
|
-
// src/commands/integration/commands/definition/
|
|
9812
|
+
// src/commands/integration/commands/definition/dataResourceEditor/dataResourceEditor.ts
|
|
9812
9813
|
import yargs28 from "yargs";
|
|
9813
9814
|
|
|
9814
|
-
// src/commands/integration/commands/definition/
|
|
9815
|
+
// src/commands/integration/commands/definition/dataResourceEditor/deploy.ts
|
|
9815
9816
|
import { readFileSync as readFileSync2 } from "fs";
|
|
9816
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
|
+
|
|
9817
9851
|
// src/commands/integration/commands/definition/edgehancer/EdgehancerClient.ts
|
|
9818
9852
|
import { createLimitPolicy as createLimitPolicy2 } from "@uniformdev/canvas";
|
|
9819
9853
|
import { ApiClient } from "@uniformdev/context/api";
|
|
@@ -9846,9 +9880,102 @@ var EdgehancerClient = class extends ApiClient {
|
|
|
9846
9880
|
}
|
|
9847
9881
|
};
|
|
9848
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
|
+
|
|
9849
9976
|
// src/commands/integration/commands/definition/edgehancer/util.ts
|
|
9850
|
-
function withEdgehancerIdOptions(
|
|
9851
|
-
return
|
|
9977
|
+
function withEdgehancerIdOptions(yargs41) {
|
|
9978
|
+
return yargs41.option("connectorType", {
|
|
9852
9979
|
describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
|
|
9853
9980
|
demandOption: true,
|
|
9854
9981
|
type: "string"
|
|
@@ -9868,16 +9995,20 @@ function withEdgehancerIdOptions(yargs39) {
|
|
|
9868
9995
|
var IntegrationEdgehancerDeployModule = {
|
|
9869
9996
|
command: "deploy <filename>",
|
|
9870
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.",
|
|
9871
|
-
builder: (
|
|
9998
|
+
builder: (yargs41) => withConfiguration(
|
|
9872
9999
|
withApiOptions(
|
|
9873
10000
|
withTeamOptions(
|
|
9874
10001
|
withEdgehancerIdOptions(
|
|
9875
|
-
|
|
10002
|
+
yargs41.positional("filename", {
|
|
9876
10003
|
demandOption: true,
|
|
9877
10004
|
describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
|
|
9878
10005
|
}).option("compatibilityDate", {
|
|
9879
10006
|
type: "string",
|
|
9880
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"
|
|
9881
10012
|
})
|
|
9882
10013
|
)
|
|
9883
10014
|
)
|
|
@@ -9892,11 +10023,17 @@ var IntegrationEdgehancerDeployModule = {
|
|
|
9892
10023
|
archetype,
|
|
9893
10024
|
connectorType,
|
|
9894
10025
|
hook,
|
|
9895
|
-
compatibilityDate
|
|
10026
|
+
compatibilityDate,
|
|
10027
|
+
skipBundle = false
|
|
9896
10028
|
}) => {
|
|
9897
10029
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9898
10030
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
9899
|
-
|
|
10031
|
+
let code;
|
|
10032
|
+
if (skipBundle) {
|
|
10033
|
+
code = readFileSync3(filename, "utf8");
|
|
10034
|
+
} else {
|
|
10035
|
+
code = await bundleWorkerCode(filename);
|
|
10036
|
+
}
|
|
9900
10037
|
await client.deploy({ archetype, code, connectorType, hook, compatibilityDate });
|
|
9901
10038
|
}
|
|
9902
10039
|
};
|
|
@@ -9905,7 +10042,7 @@ var IntegrationEdgehancerDeployModule = {
|
|
|
9905
10042
|
var IntegrationEdgehancerRemoveModule = {
|
|
9906
10043
|
command: "remove",
|
|
9907
10044
|
describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
|
|
9908
|
-
builder: (
|
|
10045
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs41)))),
|
|
9909
10046
|
handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
|
|
9910
10047
|
const fetch2 = nodeFetchProxy(proxy);
|
|
9911
10048
|
const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
|
|
@@ -9917,9 +10054,99 @@ var IntegrationEdgehancerRemoveModule = {
|
|
|
9917
10054
|
var IntegrationEdgehancerModule = {
|
|
9918
10055
|
command: "edgehancer <command>",
|
|
9919
10056
|
describe: "Commands for managing custom integration edgehancers at the team level.",
|
|
9920
|
-
builder: (
|
|
10057
|
+
builder: (yargs41) => yargs41.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
|
|
9921
10058
|
handler: () => {
|
|
9922
|
-
|
|
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();
|
|
9923
10150
|
}
|
|
9924
10151
|
};
|
|
9925
10152
|
|
|
@@ -9959,10 +10186,10 @@ var DefinitionClient = class extends ApiClient2 {
|
|
|
9959
10186
|
var IntegrationDefinitionRegisterModule = {
|
|
9960
10187
|
command: "register <filename>",
|
|
9961
10188
|
describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
|
|
9962
|
-
builder: (
|
|
10189
|
+
builder: (yargs41) => withConfiguration(
|
|
9963
10190
|
withApiOptions(
|
|
9964
10191
|
withTeamOptions(
|
|
9965
|
-
|
|
10192
|
+
yargs41.positional("filename", {
|
|
9966
10193
|
demandOption: true,
|
|
9967
10194
|
describe: "Integration definition manifest to register"
|
|
9968
10195
|
})
|
|
@@ -9981,10 +10208,10 @@ var IntegrationDefinitionRegisterModule = {
|
|
|
9981
10208
|
var IntegrationDefinitionRemoveModule = {
|
|
9982
10209
|
command: "remove <type>",
|
|
9983
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.",
|
|
9984
|
-
builder: (
|
|
10211
|
+
builder: (yargs41) => withConfiguration(
|
|
9985
10212
|
withApiOptions(
|
|
9986
10213
|
withTeamOptions(
|
|
9987
|
-
|
|
10214
|
+
yargs41.positional("type", {
|
|
9988
10215
|
demandOption: true,
|
|
9989
10216
|
describe: "Integration type (from its manifest) to remove."
|
|
9990
10217
|
})
|
|
@@ -10002,9 +10229,9 @@ var IntegrationDefinitionRemoveModule = {
|
|
|
10002
10229
|
var IntegrationDefinitionModule = {
|
|
10003
10230
|
command: "definition <command>",
|
|
10004
10231
|
describe: "Commands for managing custom integration definitions at the team level.",
|
|
10005
|
-
builder: (
|
|
10232
|
+
builder: (yargs41) => yargs41.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).command(IntegrationDataResourceEditorModule).command(IntegrationPropertyEditorModule).demandCommand(),
|
|
10006
10233
|
handler: () => {
|
|
10007
|
-
|
|
10234
|
+
yargs31.help();
|
|
10008
10235
|
}
|
|
10009
10236
|
};
|
|
10010
10237
|
|
|
@@ -10044,10 +10271,10 @@ var InstallClient = class extends ApiClient3 {
|
|
|
10044
10271
|
var IntegrationInstallModule = {
|
|
10045
10272
|
command: "install <type>",
|
|
10046
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.",
|
|
10047
|
-
builder: (
|
|
10274
|
+
builder: (yargs41) => withConfiguration(
|
|
10048
10275
|
withApiOptions(
|
|
10049
10276
|
withProjectOptions(
|
|
10050
|
-
|
|
10277
|
+
yargs41.positional("type", {
|
|
10051
10278
|
demandOption: true,
|
|
10052
10279
|
describe: "Integration type to install (as defined in its manifest)"
|
|
10053
10280
|
}).option("configuration", {
|
|
@@ -10069,10 +10296,10 @@ var IntegrationInstallModule = {
|
|
|
10069
10296
|
var IntegrationUninstallModule = {
|
|
10070
10297
|
command: "uninstall <type>",
|
|
10071
10298
|
describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
|
|
10072
|
-
builder: (
|
|
10299
|
+
builder: (yargs41) => withConfiguration(
|
|
10073
10300
|
withApiOptions(
|
|
10074
10301
|
withProjectOptions(
|
|
10075
|
-
|
|
10302
|
+
yargs41.positional("type", {
|
|
10076
10303
|
demandOption: true,
|
|
10077
10304
|
describe: "Integration type to uninstall (as defined in its manifest)"
|
|
10078
10305
|
})
|
|
@@ -10090,9 +10317,9 @@ var IntegrationUninstallModule = {
|
|
|
10090
10317
|
var IntegrationCommand = {
|
|
10091
10318
|
command: "integration <command>",
|
|
10092
10319
|
describe: "Integration management commands",
|
|
10093
|
-
builder: (
|
|
10320
|
+
builder: (yargs41) => yargs41.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
|
|
10094
10321
|
handler: () => {
|
|
10095
|
-
|
|
10322
|
+
yargs32.showHelp();
|
|
10096
10323
|
}
|
|
10097
10324
|
};
|
|
10098
10325
|
|
|
@@ -10126,7 +10353,7 @@ import fsj5 from "fs-jetpack";
|
|
|
10126
10353
|
import * as git from "isomorphic-git";
|
|
10127
10354
|
import * as http from "isomorphic-git/http/node";
|
|
10128
10355
|
import os from "os";
|
|
10129
|
-
import
|
|
10356
|
+
import path6 from "path";
|
|
10130
10357
|
async function cloneStarter({
|
|
10131
10358
|
spin,
|
|
10132
10359
|
githubPath,
|
|
@@ -10135,7 +10362,7 @@ async function cloneStarter({
|
|
|
10135
10362
|
githubBranch
|
|
10136
10363
|
}) {
|
|
10137
10364
|
const done = await spin("Fetching starter code...");
|
|
10138
|
-
const cloneDir =
|
|
10365
|
+
const cloneDir = path6.join(os.tmpdir(), `uniform-new-${crypto2.randomBytes(20).toString("hex")}`);
|
|
10139
10366
|
const [user, repo, ...pathSegments] = githubPath.split("/");
|
|
10140
10367
|
try {
|
|
10141
10368
|
await git.clone({
|
|
@@ -10154,10 +10381,10 @@ async function cloneStarter({
|
|
|
10154
10381
|
if (fs7.existsSync(targetDir) && fs7.readdirSync(targetDir).length > 0) {
|
|
10155
10382
|
throw new Error(`"${targetDir}" is not empty`);
|
|
10156
10383
|
}
|
|
10157
|
-
const starterDir =
|
|
10384
|
+
const starterDir = path6.join(cloneDir, ...pathSegments);
|
|
10158
10385
|
fsj5.copy(starterDir, targetDir, { overwrite: true });
|
|
10159
10386
|
if (dotEnvFile) {
|
|
10160
|
-
fs7.writeFileSync(
|
|
10387
|
+
fs7.writeFileSync(path6.resolve(targetDir, ".env"), dotEnvFile, "utf-8");
|
|
10161
10388
|
}
|
|
10162
10389
|
console.log(`
|
|
10163
10390
|
Your project now lives in ${targetDir} \u2728`);
|
|
@@ -10331,9 +10558,9 @@ npm run dev
|
|
|
10331
10558
|
}
|
|
10332
10559
|
|
|
10333
10560
|
// src/commands/new/commands/new-mesh-integration.ts
|
|
10334
|
-
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";
|
|
10335
10562
|
import inquirer7 from "inquirer";
|
|
10336
|
-
import
|
|
10563
|
+
import path7 from "path";
|
|
10337
10564
|
import slugify2 from "slugify";
|
|
10338
10565
|
async function newMeshIntegrationHandler({
|
|
10339
10566
|
spin,
|
|
@@ -10379,17 +10606,17 @@ async function newMeshIntegrationHandler({
|
|
|
10379
10606
|
githubBranch
|
|
10380
10607
|
});
|
|
10381
10608
|
let done = await spin("Registering integration to team...");
|
|
10382
|
-
const pathToManifest =
|
|
10609
|
+
const pathToManifest = path7.resolve(targetDir, "mesh-manifest.json");
|
|
10383
10610
|
if (!existsSync4(pathToManifest)) {
|
|
10384
10611
|
throw new Error("Invalid integration starter cloned: missing `mesh-manifest.json`");
|
|
10385
10612
|
}
|
|
10386
|
-
const manifestContents =
|
|
10613
|
+
const manifestContents = readFileSync5(pathToManifest, "utf-8");
|
|
10387
10614
|
const manifestJson = JSON.parse(manifestContents);
|
|
10388
10615
|
manifestJson.type = typeSlug;
|
|
10389
10616
|
manifestJson.displayName = name;
|
|
10390
10617
|
writeFileSync2(pathToManifest, JSON.stringify(manifestJson, null, 2), "utf-8");
|
|
10391
|
-
const packageJsonPath =
|
|
10392
|
-
const packageJson = JSON.parse(
|
|
10618
|
+
const packageJsonPath = path7.resolve(targetDir, "package.json");
|
|
10619
|
+
const packageJson = JSON.parse(readFileSync5(packageJsonPath, "utf-8"));
|
|
10393
10620
|
packageJson.name = typeSlug;
|
|
10394
10621
|
writeFileSync2(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
|
|
10395
10622
|
const fullMeshAppKey = await uniformClient.registerMeshIntegration({ teamId, manifest: manifestJson });
|
|
@@ -10438,7 +10665,7 @@ function validateIntegrationName(integrationName, explicitOutputPath) {
|
|
|
10438
10665
|
mkdirSync3(targetDir, { recursive: true });
|
|
10439
10666
|
}
|
|
10440
10667
|
if (readdirSync(targetDir).length > 0) {
|
|
10441
|
-
targetDir =
|
|
10668
|
+
targetDir = path7.resolve(targetDir, typeSlug);
|
|
10442
10669
|
if (existsSync4(targetDir)) {
|
|
10443
10670
|
throw new Error(`${targetDir} directory already exists, choose a different name.`);
|
|
10444
10671
|
}
|
|
@@ -10531,10 +10758,10 @@ var NewMeshCmd = {
|
|
|
10531
10758
|
};
|
|
10532
10759
|
|
|
10533
10760
|
// src/commands/project-map/index.ts
|
|
10534
|
-
import
|
|
10761
|
+
import yargs35 from "yargs";
|
|
10535
10762
|
|
|
10536
10763
|
// src/commands/project-map/commands/projectMapDefinition.ts
|
|
10537
|
-
import
|
|
10764
|
+
import yargs33 from "yargs";
|
|
10538
10765
|
|
|
10539
10766
|
// src/commands/project-map/commands/ProjectMapDefinition/_util.ts
|
|
10540
10767
|
import { UncachedProjectMapClient } from "@uniformdev/project-map";
|
|
@@ -10548,11 +10775,11 @@ function getProjectMapClient(options) {
|
|
|
10548
10775
|
var ProjectMapDefinitionGetModule = {
|
|
10549
10776
|
command: "get <id>",
|
|
10550
10777
|
describe: "Fetch a project map",
|
|
10551
|
-
builder: (
|
|
10778
|
+
builder: (yargs41) => withFormatOptions(
|
|
10552
10779
|
withConfiguration(
|
|
10553
10780
|
withApiOptions(
|
|
10554
10781
|
withProjectOptions(
|
|
10555
|
-
|
|
10782
|
+
yargs41.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
|
|
10556
10783
|
)
|
|
10557
10784
|
)
|
|
10558
10785
|
)
|
|
@@ -10575,7 +10802,7 @@ var ProjectMapDefinitionListModule = {
|
|
|
10575
10802
|
command: "list",
|
|
10576
10803
|
describe: "List of project maps",
|
|
10577
10804
|
aliases: ["ls"],
|
|
10578
|
-
builder: (
|
|
10805
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
10579
10806
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
10580
10807
|
const fetch2 = nodeFetchProxy(proxy);
|
|
10581
10808
|
const client = getProjectMapClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -10629,12 +10856,12 @@ function createProjectMapDefinitionEngineDataSource({
|
|
|
10629
10856
|
var ProjectMapDefinitionPullModule = {
|
|
10630
10857
|
command: "pull <directory>",
|
|
10631
10858
|
describe: "Pulls all project maps to local files in a directory",
|
|
10632
|
-
builder: (
|
|
10859
|
+
builder: (yargs41) => withConfiguration(
|
|
10633
10860
|
withDebugOptions(
|
|
10634
10861
|
withApiOptions(
|
|
10635
10862
|
withProjectOptions(
|
|
10636
10863
|
withDiffOptions(
|
|
10637
|
-
|
|
10864
|
+
yargs41.positional("directory", {
|
|
10638
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.",
|
|
10639
10866
|
type: "string"
|
|
10640
10867
|
}).option("format", {
|
|
@@ -10709,12 +10936,12 @@ var ProjectMapDefinitionPullModule = {
|
|
|
10709
10936
|
var ProjectMapDefinitionPushModule = {
|
|
10710
10937
|
command: "push <directory>",
|
|
10711
10938
|
describe: "Pushes all project maps from files in a directory or package to Uniform",
|
|
10712
|
-
builder: (
|
|
10939
|
+
builder: (yargs41) => withConfiguration(
|
|
10713
10940
|
withDebugOptions(
|
|
10714
10941
|
withApiOptions(
|
|
10715
10942
|
withProjectOptions(
|
|
10716
10943
|
withDiffOptions(
|
|
10717
|
-
|
|
10944
|
+
yargs41.positional("directory", {
|
|
10718
10945
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
10719
10946
|
type: "string"
|
|
10720
10947
|
}).option("mode", {
|
|
@@ -10778,9 +11005,9 @@ var ProjectMapDefinitionRemoveModule = {
|
|
|
10778
11005
|
command: "remove <id>",
|
|
10779
11006
|
aliases: ["delete", "rm"],
|
|
10780
11007
|
describe: "Delete a project map",
|
|
10781
|
-
builder: (
|
|
11008
|
+
builder: (yargs41) => withConfiguration(
|
|
10782
11009
|
withApiOptions(
|
|
10783
|
-
withProjectOptions(
|
|
11010
|
+
withProjectOptions(yargs41.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
10784
11011
|
)
|
|
10785
11012
|
),
|
|
10786
11013
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -10795,10 +11022,10 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
10795
11022
|
command: "update <filename>",
|
|
10796
11023
|
aliases: ["put"],
|
|
10797
11024
|
describe: "Insert or update a project map",
|
|
10798
|
-
builder: (
|
|
11025
|
+
builder: (yargs41) => withConfiguration(
|
|
10799
11026
|
withApiOptions(
|
|
10800
11027
|
withProjectOptions(
|
|
10801
|
-
|
|
11028
|
+
yargs41.positional("filename", { demandOption: true, describe: "Project map file to put" })
|
|
10802
11029
|
)
|
|
10803
11030
|
)
|
|
10804
11031
|
),
|
|
@@ -10814,24 +11041,24 @@ var ProjectMapDefinitionUpdateModule = {
|
|
|
10814
11041
|
var ProjectMapDefinitionModule = {
|
|
10815
11042
|
command: "definition <command>",
|
|
10816
11043
|
describe: "Commands for ProjectMap Definitions",
|
|
10817
|
-
builder: (
|
|
11044
|
+
builder: (yargs41) => yargs41.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
|
|
10818
11045
|
handler: () => {
|
|
10819
|
-
|
|
11046
|
+
yargs33.help();
|
|
10820
11047
|
}
|
|
10821
11048
|
};
|
|
10822
11049
|
|
|
10823
11050
|
// src/commands/project-map/commands/projectMapNode.ts
|
|
10824
|
-
import
|
|
11051
|
+
import yargs34 from "yargs";
|
|
10825
11052
|
|
|
10826
11053
|
// src/commands/project-map/commands/ProjectMapNode/get.ts
|
|
10827
11054
|
var ProjectMapNodeGetModule = {
|
|
10828
11055
|
command: "get <id> <projectMapId>",
|
|
10829
11056
|
describe: "Fetch a project map node",
|
|
10830
|
-
builder: (
|
|
11057
|
+
builder: (yargs41) => withConfiguration(
|
|
10831
11058
|
withFormatOptions(
|
|
10832
11059
|
withApiOptions(
|
|
10833
11060
|
withProjectOptions(
|
|
10834
|
-
|
|
11061
|
+
yargs41.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
|
|
10835
11062
|
)
|
|
10836
11063
|
)
|
|
10837
11064
|
)
|
|
@@ -10855,12 +11082,12 @@ var ProjectMapNodeListModule = {
|
|
|
10855
11082
|
command: "list <projectMapId>",
|
|
10856
11083
|
describe: "List project map nodes",
|
|
10857
11084
|
aliases: ["ls"],
|
|
10858
|
-
builder: (
|
|
11085
|
+
builder: (yargs41) => withConfiguration(
|
|
10859
11086
|
withFormatOptions(
|
|
10860
11087
|
withApiOptions(
|
|
10861
11088
|
withProjectOptions(
|
|
10862
11089
|
withStateOptions(
|
|
10863
|
-
|
|
11090
|
+
yargs41.positional("projectMapId", {
|
|
10864
11091
|
demandOption: true,
|
|
10865
11092
|
describe: "ProjectMap UUID to fetch from"
|
|
10866
11093
|
})
|
|
@@ -10938,12 +11165,12 @@ function createProjectMapNodeEngineDataSource({
|
|
|
10938
11165
|
var ProjectMapNodePullModule = {
|
|
10939
11166
|
command: "pull <directory>",
|
|
10940
11167
|
describe: "Pulls all project maps nodes to local files in a directory",
|
|
10941
|
-
builder: (
|
|
11168
|
+
builder: (yargs41) => withConfiguration(
|
|
10942
11169
|
withDebugOptions(
|
|
10943
11170
|
withApiOptions(
|
|
10944
11171
|
withProjectOptions(
|
|
10945
11172
|
withDiffOptions(
|
|
10946
|
-
|
|
11173
|
+
yargs41.positional("directory", {
|
|
10947
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.",
|
|
10948
11175
|
type: "string"
|
|
10949
11176
|
}).option("format", {
|
|
@@ -11025,12 +11252,12 @@ import {
|
|
|
11025
11252
|
var ProjectMapNodePushModule = {
|
|
11026
11253
|
command: "push <directory>",
|
|
11027
11254
|
describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
|
|
11028
|
-
builder: (
|
|
11255
|
+
builder: (yargs41) => withConfiguration(
|
|
11029
11256
|
withDebugOptions(
|
|
11030
11257
|
withApiOptions(
|
|
11031
11258
|
withProjectOptions(
|
|
11032
11259
|
withDiffOptions(
|
|
11033
|
-
|
|
11260
|
+
yargs41.positional("directory", {
|
|
11034
11261
|
describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
|
|
11035
11262
|
type: "string"
|
|
11036
11263
|
}).option("mode", {
|
|
@@ -11132,10 +11359,10 @@ var ProjectMapNodeRemoveModule = {
|
|
|
11132
11359
|
command: "remove <id> <projectMapId>",
|
|
11133
11360
|
aliases: ["delete", "rm"],
|
|
11134
11361
|
describe: "Delete a project map node",
|
|
11135
|
-
builder: (
|
|
11362
|
+
builder: (yargs41) => withConfiguration(
|
|
11136
11363
|
withApiOptions(
|
|
11137
11364
|
withProjectOptions(
|
|
11138
|
-
|
|
11365
|
+
yargs41.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
|
|
11139
11366
|
)
|
|
11140
11367
|
)
|
|
11141
11368
|
),
|
|
@@ -11151,10 +11378,10 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11151
11378
|
command: "update <filename> <projectMapId>",
|
|
11152
11379
|
aliases: ["put"],
|
|
11153
11380
|
describe: "Insert or update a project map node",
|
|
11154
|
-
builder: (
|
|
11381
|
+
builder: (yargs41) => withConfiguration(
|
|
11155
11382
|
withApiOptions(
|
|
11156
11383
|
withProjectOptions(
|
|
11157
|
-
|
|
11384
|
+
yargs41.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
|
|
11158
11385
|
)
|
|
11159
11386
|
)
|
|
11160
11387
|
),
|
|
@@ -11170,9 +11397,9 @@ var ProjectMapNodeUpdateModule = {
|
|
|
11170
11397
|
var ProjectMapNodeModule = {
|
|
11171
11398
|
command: "node <command>",
|
|
11172
11399
|
describe: "Commands for ProjectMap Nodes",
|
|
11173
|
-
builder: (
|
|
11400
|
+
builder: (yargs41) => yargs41.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
|
|
11174
11401
|
handler: () => {
|
|
11175
|
-
|
|
11402
|
+
yargs34.help();
|
|
11176
11403
|
}
|
|
11177
11404
|
};
|
|
11178
11405
|
|
|
@@ -11181,17 +11408,17 @@ var ProjectMapCommand = {
|
|
|
11181
11408
|
command: "project-map <command>",
|
|
11182
11409
|
aliases: ["prm"],
|
|
11183
11410
|
describe: "Uniform ProjectMap commands",
|
|
11184
|
-
builder: (
|
|
11411
|
+
builder: (yargs41) => yargs41.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
|
|
11185
11412
|
handler: () => {
|
|
11186
|
-
|
|
11413
|
+
yargs35.showHelp();
|
|
11187
11414
|
}
|
|
11188
11415
|
};
|
|
11189
11416
|
|
|
11190
11417
|
// src/commands/redirect/index.ts
|
|
11191
|
-
import
|
|
11418
|
+
import yargs37 from "yargs";
|
|
11192
11419
|
|
|
11193
11420
|
// src/commands/redirect/commands/redirect.ts
|
|
11194
|
-
import
|
|
11421
|
+
import yargs36 from "yargs";
|
|
11195
11422
|
|
|
11196
11423
|
// src/commands/redirect/commands/RedirectDefinition/_util.ts
|
|
11197
11424
|
import { UncachedRedirectClient } from "@uniformdev/redirect";
|
|
@@ -11216,11 +11443,11 @@ function getRedirectClient(options) {
|
|
|
11216
11443
|
var RedirectDefinitionGetModule = {
|
|
11217
11444
|
command: "get <id>",
|
|
11218
11445
|
describe: "Fetch a redirect",
|
|
11219
|
-
builder: (
|
|
11446
|
+
builder: (yargs41) => withConfiguration(
|
|
11220
11447
|
withFormatOptions(
|
|
11221
11448
|
withApiOptions(
|
|
11222
11449
|
withProjectOptions(
|
|
11223
|
-
|
|
11450
|
+
yargs41.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
|
|
11224
11451
|
)
|
|
11225
11452
|
)
|
|
11226
11453
|
)
|
|
@@ -11243,7 +11470,7 @@ var RedirectDefinitionListModule = {
|
|
|
11243
11470
|
command: "list",
|
|
11244
11471
|
describe: "List of redirects",
|
|
11245
11472
|
aliases: ["ls"],
|
|
11246
|
-
builder: (
|
|
11473
|
+
builder: (yargs41) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs41)))),
|
|
11247
11474
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
11248
11475
|
const fetch2 = nodeFetchProxy(proxy);
|
|
11249
11476
|
const client = getRedirectClient({ apiKey, apiHost, fetch: fetch2, projectId });
|
|
@@ -11295,12 +11522,12 @@ function createRedirectDefinitionEngineDataSource({
|
|
|
11295
11522
|
var RedirectDefinitionPullModule = {
|
|
11296
11523
|
command: "pull <directory>",
|
|
11297
11524
|
describe: "Pulls all redirects to local files in a directory",
|
|
11298
|
-
builder: (
|
|
11525
|
+
builder: (yargs41) => withConfiguration(
|
|
11299
11526
|
withDebugOptions(
|
|
11300
11527
|
withApiOptions(
|
|
11301
11528
|
withProjectOptions(
|
|
11302
11529
|
withDiffOptions(
|
|
11303
|
-
|
|
11530
|
+
yargs41.positional("directory", {
|
|
11304
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.",
|
|
11305
11532
|
type: "string"
|
|
11306
11533
|
}).option("format", {
|
|
@@ -11376,12 +11603,12 @@ var RedirectDefinitionPullModule = {
|
|
|
11376
11603
|
var RedirectDefinitionPushModule = {
|
|
11377
11604
|
command: "push <directory>",
|
|
11378
11605
|
describe: "Pushes all redirects from files in a directory or package to Uniform",
|
|
11379
|
-
builder: (
|
|
11606
|
+
builder: (yargs41) => withConfiguration(
|
|
11380
11607
|
withDebugOptions(
|
|
11381
11608
|
withApiOptions(
|
|
11382
11609
|
withProjectOptions(
|
|
11383
11610
|
withDiffOptions(
|
|
11384
|
-
|
|
11611
|
+
yargs41.positional("directory", {
|
|
11385
11612
|
describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
|
|
11386
11613
|
type: "string"
|
|
11387
11614
|
}).option("mode", {
|
|
@@ -11445,9 +11672,9 @@ var RedirectDefinitionRemoveModule = {
|
|
|
11445
11672
|
command: "remove <id>",
|
|
11446
11673
|
aliases: ["delete", "rm"],
|
|
11447
11674
|
describe: "Delete a redirect",
|
|
11448
|
-
builder: (
|
|
11675
|
+
builder: (yargs41) => withConfiguration(
|
|
11449
11676
|
withApiOptions(
|
|
11450
|
-
withProjectOptions(
|
|
11677
|
+
withProjectOptions(yargs41.positional("id", { demandOption: true, describe: " UUID to delete" }))
|
|
11451
11678
|
)
|
|
11452
11679
|
),
|
|
11453
11680
|
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
@@ -11462,10 +11689,10 @@ var RedirectDefinitionUpdateModule = {
|
|
|
11462
11689
|
command: "update <filename>",
|
|
11463
11690
|
aliases: ["put"],
|
|
11464
11691
|
describe: "Insert or update a redirect",
|
|
11465
|
-
builder: (
|
|
11692
|
+
builder: (yargs41) => withConfiguration(
|
|
11466
11693
|
withApiOptions(
|
|
11467
11694
|
withProjectOptions(
|
|
11468
|
-
|
|
11695
|
+
yargs41.positional("filename", { demandOption: true, describe: "Redirect file to put" })
|
|
11469
11696
|
)
|
|
11470
11697
|
)
|
|
11471
11698
|
),
|
|
@@ -11481,9 +11708,9 @@ var RedirectDefinitionUpdateModule = {
|
|
|
11481
11708
|
var RedirectDefinitionModule = {
|
|
11482
11709
|
command: "definition <command>",
|
|
11483
11710
|
describe: "Commands for Redirect Definitions",
|
|
11484
|
-
builder: (
|
|
11711
|
+
builder: (yargs41) => yargs41.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
|
|
11485
11712
|
handler: () => {
|
|
11486
|
-
|
|
11713
|
+
yargs36.help();
|
|
11487
11714
|
}
|
|
11488
11715
|
};
|
|
11489
11716
|
|
|
@@ -11492,14 +11719,14 @@ var RedirectCommand = {
|
|
|
11492
11719
|
command: "redirect <command>",
|
|
11493
11720
|
aliases: ["red"],
|
|
11494
11721
|
describe: "Uniform Redirect commands",
|
|
11495
|
-
builder: (
|
|
11722
|
+
builder: (yargs41) => yargs41.command(RedirectDefinitionModule).demandCommand(),
|
|
11496
11723
|
handler: () => {
|
|
11497
|
-
|
|
11724
|
+
yargs37.showHelp();
|
|
11498
11725
|
}
|
|
11499
11726
|
};
|
|
11500
11727
|
|
|
11501
11728
|
// src/commands/sync/index.ts
|
|
11502
|
-
import
|
|
11729
|
+
import yargs38 from "yargs";
|
|
11503
11730
|
|
|
11504
11731
|
// src/webhooksClient.ts
|
|
11505
11732
|
import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
|
|
@@ -11693,12 +11920,12 @@ function createWebhookEngineDataSource({
|
|
|
11693
11920
|
var WebhookPullModule = {
|
|
11694
11921
|
command: "pull <directory>",
|
|
11695
11922
|
describe: "Pulls all webhooks to local files in a directory",
|
|
11696
|
-
builder: (
|
|
11923
|
+
builder: (yargs41) => withConfiguration(
|
|
11697
11924
|
withApiOptions(
|
|
11698
11925
|
withDebugOptions(
|
|
11699
11926
|
withProjectOptions(
|
|
11700
11927
|
withDiffOptions(
|
|
11701
|
-
|
|
11928
|
+
yargs41.positional("directory", {
|
|
11702
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.",
|
|
11703
11930
|
type: "string"
|
|
11704
11931
|
}).option("format", {
|
|
@@ -11884,7 +12111,7 @@ function numPad(num, spaces = 6) {
|
|
|
11884
12111
|
var SyncPullModule = {
|
|
11885
12112
|
command: "pull",
|
|
11886
12113
|
describe: "Pulls whole project to local files in a directory",
|
|
11887
|
-
builder: (
|
|
12114
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs41))))),
|
|
11888
12115
|
handler: async ({ serialization, ...otherParams }) => {
|
|
11889
12116
|
const config2 = serialization;
|
|
11890
12117
|
const enabledEntities = Object.entries({
|
|
@@ -11982,12 +12209,12 @@ var getFormat = (entityType, config2) => {
|
|
|
11982
12209
|
var WebhookPushModule = {
|
|
11983
12210
|
command: "push <directory>",
|
|
11984
12211
|
describe: "Pushes all webhooks from files in a directory to Uniform",
|
|
11985
|
-
builder: (
|
|
12212
|
+
builder: (yargs41) => withConfiguration(
|
|
11986
12213
|
withDebugOptions(
|
|
11987
12214
|
withApiOptions(
|
|
11988
12215
|
withProjectOptions(
|
|
11989
12216
|
withDiffOptions(
|
|
11990
|
-
|
|
12217
|
+
yargs41.positional("directory", {
|
|
11991
12218
|
describe: "Directory to read from. If a filename is used, a package will be read instead.",
|
|
11992
12219
|
type: "string"
|
|
11993
12220
|
}).option("mode", {
|
|
@@ -12051,7 +12278,7 @@ var WebhookPushModule = {
|
|
|
12051
12278
|
var SyncPushModule = {
|
|
12052
12279
|
command: "push",
|
|
12053
12280
|
describe: "Pushes whole project data from files in a directory or package to Uniform",
|
|
12054
|
-
builder: (
|
|
12281
|
+
builder: (yargs41) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs41))))),
|
|
12055
12282
|
handler: async ({ serialization, ...otherParams }) => {
|
|
12056
12283
|
const config2 = serialization;
|
|
12057
12284
|
const enabledEntities = Object.entries({
|
|
@@ -12260,21 +12487,21 @@ var getFormat2 = (entityType, config2) => {
|
|
|
12260
12487
|
var SyncCommand = {
|
|
12261
12488
|
command: "sync <command>",
|
|
12262
12489
|
describe: "Uniform Sync commands",
|
|
12263
|
-
builder: (
|
|
12490
|
+
builder: (yargs41) => yargs41.command(SyncPullModule).command(SyncPushModule).demandCommand(),
|
|
12264
12491
|
handler: () => {
|
|
12265
|
-
|
|
12492
|
+
yargs38.showHelp();
|
|
12266
12493
|
}
|
|
12267
12494
|
};
|
|
12268
12495
|
|
|
12269
12496
|
// src/commands/webhook/index.ts
|
|
12270
|
-
import
|
|
12497
|
+
import yargs39 from "yargs";
|
|
12271
12498
|
var WebhookCommand = {
|
|
12272
12499
|
command: "webhook <command>",
|
|
12273
12500
|
aliases: ["wh"],
|
|
12274
12501
|
describe: "Commands for webhooks",
|
|
12275
|
-
builder: (
|
|
12502
|
+
builder: (yargs41) => yargs41.command(WebhookPullModule).command(WebhookPushModule).demandCommand(),
|
|
12276
12503
|
handler: () => {
|
|
12277
|
-
|
|
12504
|
+
yargs39.help();
|
|
12278
12505
|
}
|
|
12279
12506
|
};
|
|
12280
12507
|
|
|
@@ -12509,7 +12736,7 @@ First found was: v${firstVersion}`;
|
|
|
12509
12736
|
|
|
12510
12737
|
// src/index.ts
|
|
12511
12738
|
dotenv.config();
|
|
12512
|
-
var yarggery =
|
|
12739
|
+
var yarggery = yargs40(hideBin(process.argv));
|
|
12513
12740
|
var useDefaultConfig = !process.argv.includes("--config");
|
|
12514
12741
|
var defaultConfig2 = useDefaultConfig ? loadConfig(null) : {};
|
|
12515
12742
|
yarggery.option("verbose", {
|