@uniformdev/cli 20.50.2-alpha.117 → 20.50.2-alpha.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4,11 +4,13 @@ import {
4
4
  __require,
5
5
  applyDefaultSyncConfiguration,
6
6
  emitWithFormat,
7
+ exitOnCliError,
7
8
  getDirectoryOrFilename,
8
9
  getEntityBatchSize,
9
10
  getEntityOption,
10
11
  isPaginatedSyncEntity,
11
12
  isPathAPackageFile,
13
+ maskApiKey,
12
14
  nodeFetchProxy,
13
15
  package_default,
14
16
  paginateAsync,
@@ -21,11 +23,11 @@ import {
21
23
  withFormatOptions,
22
24
  withProjectOptions,
23
25
  withTeamOptions
24
- } from "./chunk-KJOJNPDF.mjs";
26
+ } from "./chunk-7P2U2VCH.mjs";
25
27
 
26
28
  // src/index.ts
27
29
  import * as dotenv from "dotenv";
28
- import yargs42 from "yargs";
30
+ import yargs43 from "yargs";
29
31
  import { hideBin } from "yargs/helpers";
30
32
 
31
33
  // src/commands/ai/index.ts
@@ -142,7 +144,7 @@ var getLimitsSchema = z.object({
142
144
  })
143
145
  });
144
146
  var createClient = (baseUrl, authToken) => {
145
- const request2 = async (path8, opts, allowedNon2xxStatusCodes = []) => {
147
+ const request = async (path8, opts, allowedNon2xxStatusCodes = []) => {
146
148
  const res = await fetch(makeUrl(baseUrl, path8), {
147
149
  ...opts,
148
150
  headers: { Authorization: `Bearer ${authToken}`, "User-Agent": CLI_USER_AGENT }
@@ -156,7 +158,7 @@ var createClient = (baseUrl, authToken) => {
156
158
  }
157
159
  };
158
160
  const requestJson = async (path8, opts, schema, allowedNon2xxStatusCodes = []) => {
159
- const res = await request2(path8, opts, allowedNon2xxStatusCodes);
161
+ const res = await request(path8, opts, allowedNon2xxStatusCodes);
160
162
  const data = await res.json();
161
163
  const parseResult = schema.safeParse(data);
162
164
  if (parseResult.success) {
@@ -260,7 +262,7 @@ var createClient = (baseUrl, authToken) => {
260
262
  },
261
263
  installIntegration: async ({ projectId, type }) => {
262
264
  try {
263
- await request2("/api/v1/integration-installations", {
265
+ await request("/api/v1/integration-installations", {
264
266
  method: "PUT",
265
267
  body: JSON.stringify({ projectId, type })
266
268
  });
@@ -495,7 +497,7 @@ var makeSpinner = () => {
495
497
  const spin = async (text) => {
496
498
  const spinner = ora(text).start();
497
499
  spinners.push(spinner);
498
- const minWait = new Promise((resolve2) => setTimeout(resolve2, 500));
500
+ const minWait = new Promise((resolve4) => setTimeout(resolve4, 500));
499
501
  return async () => {
500
502
  await minWait;
501
503
  spinner.stop();
@@ -1048,36 +1050,69 @@ async function chooseTeam(user, prompt, telemetry) {
1048
1050
 
1049
1051
  // src/auth/user-info.ts
1050
1052
  import { ProjectClient } from "@uniformdev/canvas";
1051
- import { gql, request } from "graphql-request";
1052
1053
  import * as z2 from "zod";
1053
- var identityQuery = gql`
1054
- query GetUserIdentity($subject: String!) {
1055
- info: identities_by_pk(subject: $subject) {
1056
- name
1057
- email_address
1054
+ var memberProfileTeamSchema = z2.object({
1055
+ id: z2.string().min(1),
1056
+ name: z2.string()
1057
+ });
1058
+ var memberProfileSchema = z2.object({
1059
+ id: z2.string().min(1),
1060
+ name: z2.string(),
1061
+ email_address: z2.string().optional(),
1062
+ picture: z2.string().optional(),
1063
+ emailHash: z2.string().optional(),
1064
+ teams: z2.array(memberProfileTeamSchema).optional()
1065
+ });
1066
+ function buildAuthHeaders(auth) {
1067
+ if (auth.apiKey) {
1068
+ return { "x-api-key": auth.apiKey };
1069
+ }
1070
+ if (auth.bearerToken) {
1071
+ return { Authorization: `Bearer ${auth.bearerToken}` };
1072
+ }
1073
+ throw new Error("Either apiKey or bearerToken is required.");
1074
+ }
1075
+ async function fetchMemberProfile({
1076
+ baseUrl,
1077
+ apiKey,
1078
+ bearerToken,
1079
+ withTeams,
1080
+ fetch: customFetch = fetch
1081
+ }) {
1082
+ const url = new URL(makeUrl(baseUrl, "/api/v1/member-profile"));
1083
+ if (withTeams) {
1084
+ url.searchParams.set("withTeams", "true");
1085
+ }
1086
+ const res = await customFetch(url, {
1087
+ headers: {
1088
+ ...buildAuthHeaders({ apiKey, bearerToken }),
1089
+ "User-Agent": CLI_USER_AGENT
1058
1090
  }
1091
+ });
1092
+ if (!res.ok) {
1093
+ const body = await res.text();
1094
+ throw new Error(
1095
+ `Failed to fetch member profile: ${res.status} ${res.statusText}${body ? `
1096
+ ${body}` : ""}`
1097
+ );
1059
1098
  }
1060
- `;
1061
- var identitySchema = z2.object({
1062
- info: z2.object({
1063
- name: z2.string().min(1),
1064
- email_address: z2.string().min(1).nullable()
1065
- })
1066
- });
1067
- var getUserInfo = async (baseUrl, authToken, subject) => {
1099
+ const data = await res.json();
1100
+ const parsed = memberProfileSchema.safeParse(data);
1101
+ if (!parsed.success) {
1102
+ throw new Error(`Invalid member profile response: ${parsed.error.message}`);
1103
+ }
1104
+ return parsed.data;
1105
+ }
1106
+ var getUserInfo = async (baseUrl, authToken) => {
1068
1107
  try {
1069
- const headers = { Authorization: `Bearer ${authToken}`, "User-Agent": CLI_USER_AGENT };
1070
1108
  const projectClient = new ProjectClient({ apiHost: baseUrl, bearerToken: authToken });
1071
- const [identityRes, projectsRes] = await Promise.all([
1072
- request(makeUrl(baseUrl, "/v1/graphql"), identityQuery, { subject }, headers),
1109
+ const [profile, projectsRes] = await Promise.all([
1110
+ fetchMemberProfile({ baseUrl, bearerToken: authToken }),
1073
1111
  projectClient.getProjects()
1074
1112
  ]);
1075
- const identityParsed = identitySchema.safeParse(identityRes);
1076
- if (!identityParsed.success) {
1077
- throw new Error(`Invalid identity response: ${identityParsed.error.message}`);
1078
- }
1079
1113
  return {
1080
- ...identityParsed.data.info,
1114
+ name: profile.name,
1115
+ email_address: profile.email_address,
1081
1116
  teams: projectsRes.teams
1082
1117
  };
1083
1118
  } catch (err) {
@@ -1095,10 +1130,10 @@ async function fetchUserAndEnsureFirstTeamExists({
1095
1130
  }) {
1096
1131
  const uniformClient = createClient(baseUrl, authToken);
1097
1132
  const done = await spin("Fetching user information...");
1098
- let user = await getUserInfo(baseUrl, authToken, decoded.sub);
1133
+ let user = await getUserInfo(baseUrl, authToken);
1099
1134
  if (user.teams.length < 1) {
1100
1135
  await uniformClient.createTeam(`${user.name}'s team`);
1101
- user = await getUserInfo(baseUrl, authToken, decoded.sub);
1136
+ user = await getUserInfo(baseUrl, authToken);
1102
1137
  }
1103
1138
  await done();
1104
1139
  telemetry.login(decoded.sub, user);
@@ -1303,8 +1338,8 @@ function getExistingServers(config2) {
1303
1338
  var InstallMcpCommand = {
1304
1339
  command: "install",
1305
1340
  describe: "Install Uniform MCP server configuration (use --team, --project, and --apiKey for non-interactive mode)",
1306
- builder: (yargs43) => withConfiguration(
1307
- yargs43.option("agent", {
1341
+ builder: (yargs44) => withConfiguration(
1342
+ yargs44.option("agent", {
1308
1343
  alias: "a",
1309
1344
  describe: "Specify agent type (cursor, claude, copilot, other)",
1310
1345
  type: "string",
@@ -1504,7 +1539,7 @@ Selected agent: ${agentType}`));
1504
1539
  var McpCommand = {
1505
1540
  command: "mcp <command>",
1506
1541
  describe: "Uniform MCP server management commands",
1507
- builder: (yargs43) => yargs43.command(InstallMcpCommand).demandCommand(),
1542
+ builder: (yargs44) => yargs44.command(InstallMcpCommand).demandCommand(),
1508
1543
  handler: () => {
1509
1544
  yargs.showHelp();
1510
1545
  }
@@ -1979,8 +2014,8 @@ ${gray2("Rules source:")} https://github.com/uniformdev/ai-rules`);
1979
2014
  var InstallRulesCommand = {
1980
2015
  command: "install",
1981
2016
  describe: "Install Uniform AI rules for your development assistant",
1982
- builder: (yargs43) => withConfiguration(
1983
- yargs43.option("agent", {
2017
+ builder: (yargs44) => withConfiguration(
2018
+ yargs44.option("agent", {
1984
2019
  alias: "a",
1985
2020
  describe: "Specify agent type (cursor, claude, copilot, other)",
1986
2021
  type: "string",
@@ -2018,7 +2053,7 @@ import { blue as blue4, bold as bold2, gray as gray3, green as green5, red as re
2018
2053
  var ListRulesCommand = {
2019
2054
  command: "list",
2020
2055
  describe: "List available Uniform AI rules",
2021
- builder: (yargs43) => withConfiguration(yargs43),
2056
+ builder: (yargs44) => withConfiguration(yargs44),
2022
2057
  handler: async function() {
2023
2058
  const { stopAllSpinners, spin } = makeSpinner();
2024
2059
  try {
@@ -2047,7 +2082,7 @@ var ListRulesCommand = {
2047
2082
  var RulesCommand = {
2048
2083
  command: "rules <command>",
2049
2084
  describe: "Uniform AI rules management commands",
2050
- builder: (yargs43) => yargs43.command(InstallRulesCommand).command(ListRulesCommand).demandCommand(),
2085
+ builder: (yargs44) => yargs44.command(InstallRulesCommand).command(ListRulesCommand).demandCommand(),
2051
2086
  handler: () => {
2052
2087
  yargs2.showHelp();
2053
2088
  }
@@ -2057,17 +2092,282 @@ var RulesCommand = {
2057
2092
  var AiCommand = {
2058
2093
  command: "ai <command>",
2059
2094
  describe: "Uniform AI development assistant commands",
2060
- builder: (yargs43) => yargs43.command(RulesCommand).command(McpCommand).demandCommand(),
2095
+ builder: (yargs44) => yargs44.command(RulesCommand).command(McpCommand).demandCommand(),
2061
2096
  handler: () => {
2062
2097
  yargs3.showHelp();
2063
2098
  }
2064
2099
  };
2065
2100
 
2101
+ // src/commands/automation/index.ts
2102
+ import yargs4 from "yargs";
2103
+
2104
+ // src/commands/automation/delete.ts
2105
+ import { AutomationsClient } from "@uniformdev/automations-sdk/api";
2106
+
2107
+ // src/commands/automation/resolveAutomationPublicId.ts
2108
+ import { existsSync as existsSync4 } from "fs";
2109
+ import { basename, extname as extname2, resolve as resolve2 } from "path";
2110
+ function resolveAutomationPublicId(identifier) {
2111
+ const absPath = resolve2(identifier);
2112
+ if (existsSync4(absPath)) {
2113
+ return basename(absPath, extname2(absPath));
2114
+ }
2115
+ return identifier;
2116
+ }
2117
+
2118
+ // src/commands/automation/delete.ts
2119
+ var AutomationDeleteModule = {
2120
+ command: "delete <identifier>",
2121
+ describe: "Deletes an automation from a project.",
2122
+ builder: (yargs44) => withConfiguration(
2123
+ withApiOptions(
2124
+ withProjectOptions(
2125
+ yargs44.positional("identifier", {
2126
+ demandOption: true,
2127
+ type: "string",
2128
+ describe: "Automation public ID, or path to a local automation source file (same as deploy)."
2129
+ })
2130
+ )
2131
+ )
2132
+ ),
2133
+ handler: async ({ apiHost, apiKey, proxy, identifier, project: projectId }) => {
2134
+ const fetch2 = nodeFetchProxy(proxy);
2135
+ const client = new AutomationsClient({ apiKey, apiHost, fetch: fetch2, projectId });
2136
+ const publicId = resolveAutomationPublicId(identifier);
2137
+ try {
2138
+ await client.remove(publicId);
2139
+ console.log(`\u{1F5D1}\uFE0F Deleted automation "${publicId}".`);
2140
+ } catch (error) {
2141
+ exitOnCliError(error);
2142
+ }
2143
+ }
2144
+ };
2145
+
2146
+ // src/commands/automation/deploy.ts
2147
+ import { AutomationsClient as AutomationsClient2, formatAutomationWebhookUrl } from "@uniformdev/automations-sdk/api";
2148
+
2149
+ // src/commands/automation/bundleAutomationForDeploy.ts
2150
+ import { mkdtempSync, readFileSync as readFileSync2, rmSync } from "fs";
2151
+ import { tmpdir } from "os";
2152
+ import { basename as basename2, join as join6, resolve as resolve3 } from "path";
2153
+ import { pathToFileURL } from "url";
2154
+
2155
+ // src/commands/bundleWorkerCode.ts
2156
+ import esbuild from "esbuild";
2157
+ import path5 from "path";
2158
+ var INJECTED_ENV_PREFIX = "UNIFORM_ENV_";
2159
+ function buildInjectedEnvDefine() {
2160
+ const define = {
2161
+ // ensures that if no env vars are injected, that process.env is still defined so var access hits an object that exists
2162
+ "process.env": "{}"
2163
+ };
2164
+ for (const [key, value] of Object.entries(process.env)) {
2165
+ if (key.startsWith(INJECTED_ENV_PREFIX) && value !== void 0) {
2166
+ define[`process.env.${key}`] = JSON.stringify(value);
2167
+ }
2168
+ }
2169
+ return define;
2170
+ }
2171
+ function workerBundleBuildOptions(entryFile) {
2172
+ return {
2173
+ entryPoints: [entryFile],
2174
+ bundle: true,
2175
+ format: "esm",
2176
+ target: "es2021",
2177
+ platform: "browser",
2178
+ minify: true,
2179
+ external: [],
2180
+ splitting: false,
2181
+ sourcemap: false,
2182
+ define: buildInjectedEnvDefine()
2183
+ };
2184
+ }
2185
+ async function bundleWorkerCodeToFile(entryFile, outfile) {
2186
+ await esbuild.build({
2187
+ ...workerBundleBuildOptions(entryFile),
2188
+ outfile,
2189
+ logLevel: "silent"
2190
+ });
2191
+ }
2192
+ async function bundleWorkerCode(entryFile) {
2193
+ const result = await esbuild.build({
2194
+ ...workerBundleBuildOptions(entryFile),
2195
+ write: false
2196
+ });
2197
+ const outputFiles = result.outputFiles;
2198
+ if (!outputFiles || outputFiles.length === 0) {
2199
+ throw new Error(`No output generated for ${entryFile}`);
2200
+ }
2201
+ const outputFile = outputFiles[0];
2202
+ const builtCode = outputFile.text;
2203
+ console.log(
2204
+ `\u2139\uFE0F ${path5.basename(entryFile)} was prepared with esbuild. Size: ${Math.round(
2205
+ builtCode.length / 1024
2206
+ )}kb (use --skipBundle to disable)`
2207
+ );
2208
+ return builtCode;
2209
+ }
2210
+
2211
+ // src/commands/automation/toInputJsonSchema.ts
2212
+ import * as z3 from "zod";
2213
+ function isZodSchema(value) {
2214
+ return typeof value === "object" && value !== null && "_zod" in value;
2215
+ }
2216
+ function isStandardSchema(value) {
2217
+ return typeof value === "object" && value !== null && "~standard" in value;
2218
+ }
2219
+ function toInputJsonSchema(inputSchema) {
2220
+ if (inputSchema === void 0 || inputSchema === null) {
2221
+ throw new Error("An AI-tool automation must declare an `inputSchema` in its metadata.");
2222
+ }
2223
+ if (isZodSchema(inputSchema)) {
2224
+ return z3.toJSONSchema(inputSchema);
2225
+ }
2226
+ if (isStandardSchema(inputSchema)) {
2227
+ throw new Error(
2228
+ "`inputSchema` is a Standard Schema but not a zod schema. Deploy-time conversion to JSON Schema currently supports zod only \u2014 provide a zod schema or a JSON Schema object."
2229
+ );
2230
+ }
2231
+ if (typeof inputSchema === "object") {
2232
+ return inputSchema;
2233
+ }
2234
+ throw new Error("`inputSchema` must be a zod schema or a JSON Schema object.");
2235
+ }
2236
+
2237
+ // src/commands/automation/bundleAutomationForDeploy.ts
2238
+ async function readAutomationMetadataFromBundle(bundlePath, publicId) {
2239
+ const automationModule = await import(pathToFileURL(bundlePath).href);
2240
+ const automation = automationModule.default;
2241
+ if (!automation?.metadata) {
2242
+ throw new Error("Default export must be the return value of defineAutomation");
2243
+ }
2244
+ const metadata = automation.metadata;
2245
+ const trigger = metadata.trigger?.type === "aiTool" ? { type: "aiTool", inputSchema: toInputJsonSchema(metadata.inputSchema) } : metadata.trigger;
2246
+ return {
2247
+ publicId,
2248
+ name: metadata.name,
2249
+ description: metadata.description,
2250
+ trigger,
2251
+ compatibilityDate: metadata.compatibilityDate,
2252
+ permissions: metadata.permissions
2253
+ };
2254
+ }
2255
+ async function bundleAutomationForDeploy(entryFile) {
2256
+ const absEntry = resolve3(entryFile);
2257
+ const publicId = resolveAutomationPublicId(absEntry);
2258
+ const workDir = mkdtempSync(join6(tmpdir(), "uniform-automation-deploy-"));
2259
+ const bundlePath = join6(workDir, "automation.mjs");
2260
+ try {
2261
+ await bundleWorkerCodeToFile(absEntry, bundlePath);
2262
+ const metadata = await readAutomationMetadataFromBundle(bundlePath, publicId);
2263
+ const code = readFileSync2(bundlePath, "utf8");
2264
+ console.log(
2265
+ `\u2139\uFE0F ${basename2(absEntry)} was prepared with esbuild. Size: ${Math.round(code.length / 1024)}kb`
2266
+ );
2267
+ return {
2268
+ metadata,
2269
+ code,
2270
+ cleanup: () => rmSync(workDir, { recursive: true, force: true })
2271
+ };
2272
+ } catch (error) {
2273
+ rmSync(workDir, { recursive: true, force: true });
2274
+ throw error;
2275
+ }
2276
+ }
2277
+
2278
+ // src/commands/automation/deploy.ts
2279
+ var AutomationDeployModule = {
2280
+ command: "deploy <filename>",
2281
+ describe: "Deploys an automation to a project.",
2282
+ builder: (yargs44) => withConfiguration(
2283
+ withApiOptions(
2284
+ withProjectOptions(
2285
+ yargs44.positional("filename", {
2286
+ demandOption: true,
2287
+ describe: "Automation code file to deploy. The module must default-export the return value of defineAutomation."
2288
+ }).option("compatibilityDate", {
2289
+ type: "string",
2290
+ describe: "Overrides the compatibility date in metadata. Format: YYYY-MM-DD."
2291
+ })
2292
+ )
2293
+ )
2294
+ ),
2295
+ handler: async ({ apiHost, apiKey, proxy, filename, project: projectId, compatibilityDate }) => {
2296
+ const fetch2 = nodeFetchProxy(proxy);
2297
+ const client = new AutomationsClient2({ apiKey, apiHost, fetch: fetch2, projectId });
2298
+ let cleanup;
2299
+ try {
2300
+ const bundled = await bundleAutomationForDeploy(filename);
2301
+ cleanup = bundled.cleanup;
2302
+ await client.deploy({
2303
+ ...bundled.metadata,
2304
+ code: bundled.code,
2305
+ compatibilityDate: compatibilityDate ?? bundled.metadata.compatibilityDate
2306
+ });
2307
+ console.log(
2308
+ `\u2705 Deployed automation "${bundled.metadata.publicId}" (${bundled.metadata.trigger.type}).`
2309
+ );
2310
+ if (bundled.metadata.trigger.type === "incomingWebhook") {
2311
+ console.log(
2312
+ `Webhook URL: ${formatAutomationWebhookUrl(apiHost, projectId, bundled.metadata.publicId)}`
2313
+ );
2314
+ }
2315
+ } catch (error) {
2316
+ exitOnCliError(error);
2317
+ } finally {
2318
+ cleanup?.();
2319
+ }
2320
+ }
2321
+ };
2322
+
2323
+ // src/commands/automation/list.ts
2324
+ import { AutomationsClient as AutomationsClient3 } from "@uniformdev/automations-sdk/api";
2325
+ var AutomationListModule = {
2326
+ command: "list",
2327
+ aliases: ["ls"],
2328
+ describe: "Lists the automations in a project.",
2329
+ builder: (yargs44) => withConfiguration(withApiOptions(withProjectOptions(yargs44))),
2330
+ handler: async ({ apiHost, apiKey, proxy, project: projectId }) => {
2331
+ const fetch2 = nodeFetchProxy(proxy);
2332
+ const client = new AutomationsClient3({ apiKey, apiHost, fetch: fetch2, projectId });
2333
+ try {
2334
+ const { automations } = await client.list();
2335
+ if (!automations.length) {
2336
+ console.log("No automations found in this project.");
2337
+ return;
2338
+ }
2339
+ console.table(
2340
+ automations.map((automation) => ({
2341
+ publicId: automation.publicId,
2342
+ name: automation.name,
2343
+ trigger: automation.trigger.type,
2344
+ enabled: automation.enabled,
2345
+ lastDeployedAt: automation.lastDeployedAt,
2346
+ lastDeployedBy: automation.lastDeployedBy
2347
+ }))
2348
+ );
2349
+ } catch (error) {
2350
+ exitOnCliError(error);
2351
+ }
2352
+ }
2353
+ };
2354
+
2355
+ // src/commands/automation/index.ts
2356
+ var AutomationCommand = {
2357
+ command: "automation <command>",
2358
+ aliases: ["automations"],
2359
+ describe: "Commands for managing Uniform Automations",
2360
+ builder: (yargs44) => yargs44.command(AutomationDeployModule).command(AutomationDeleteModule).command(AutomationListModule).demandCommand(),
2361
+ handler: () => {
2362
+ yargs4.showHelp();
2363
+ }
2364
+ };
2365
+
2066
2366
  // src/commands/canvas/index.ts
2067
- import yargs21 from "yargs";
2367
+ import yargs22 from "yargs";
2068
2368
 
2069
2369
  // src/commands/canvas/commands/asset.ts
2070
- import yargs4 from "yargs";
2370
+ import yargs5 from "yargs";
2071
2371
 
2072
2372
  // src/commands/canvas/commands/asset/_util.ts
2073
2373
  import { UncachedAssetClient } from "@uniformdev/assets";
@@ -2096,12 +2396,12 @@ function getFileClient(options) {
2096
2396
  var AssetGetModule = {
2097
2397
  command: "get <id>",
2098
2398
  describe: "Get an asset",
2099
- builder: (yargs43) => withConfiguration(
2399
+ builder: (yargs44) => withConfiguration(
2100
2400
  withDebugOptions(
2101
2401
  withFormatOptions(
2102
2402
  withApiOptions(
2103
2403
  withProjectOptions(
2104
- yargs43.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
2404
+ yargs44.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
2105
2405
  )
2106
2406
  )
2107
2407
  )
@@ -2122,7 +2422,7 @@ var AssetGetModule = {
2122
2422
  var AssetListModule = {
2123
2423
  command: "list",
2124
2424
  describe: "List assets",
2125
- builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
2425
+ builder: (yargs44) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs44))))),
2126
2426
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
2127
2427
  const fetch2 = nodeFetchProxy(proxy, verbose);
2128
2428
  const client = getAssetClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -2133,10 +2433,10 @@ var AssetListModule = {
2133
2433
 
2134
2434
  // src/files/deleteDownloadedFileByUrl.ts
2135
2435
  import fsj from "fs-jetpack";
2136
- import { join as join7 } from "path";
2436
+ import { join as join8 } from "path";
2137
2437
 
2138
2438
  // src/files/urlToFileName.ts
2139
- import { join as join6 } from "path";
2439
+ import { join as join7 } from "path";
2140
2440
  import { dirname } from "path";
2141
2441
  var FILES_DIRECTORY_NAME = "files";
2142
2442
  var getFilesDirectory = (directory) => {
@@ -2145,7 +2445,7 @@ var getFilesDirectory = (directory) => {
2145
2445
  // If we are syncing to a directory, we want to write all files into a
2146
2446
  // top-lvl folder. That way any entities that contain files will sync to the
2147
2447
  // same directory, so there is no duplication
2148
- join6(directory, "..")
2448
+ join7(directory, "..")
2149
2449
  );
2150
2450
  };
2151
2451
  var urlToHash = (url) => {
@@ -2181,7 +2481,7 @@ var hashToPartialPathname = (hash) => {
2181
2481
  var deleteDownloadedFileByUrl = async (url, options) => {
2182
2482
  const writeDirectory = getFilesDirectory(options.directory);
2183
2483
  const fileName = urlToFileName(url);
2184
- const fileToDelete = join7(writeDirectory, FILES_DIRECTORY_NAME, fileName);
2484
+ const fileToDelete = join8(writeDirectory, FILES_DIRECTORY_NAME, fileName);
2185
2485
  try {
2186
2486
  await fsj.removeAsync(fileToDelete);
2187
2487
  } catch {
@@ -2201,11 +2501,11 @@ import {
2201
2501
  import { isRichTextNodeType, isRichTextValue, walkRichTextTree } from "@uniformdev/richtext";
2202
2502
  import fsj4 from "fs-jetpack";
2203
2503
  import PQueue2 from "p-queue";
2204
- import { join as join10 } from "path";
2504
+ import { join as join11 } from "path";
2205
2505
 
2206
2506
  // src/files/downloadFile.ts
2207
2507
  import fsj2 from "fs-jetpack";
2208
- import { join as join8 } from "path";
2508
+ import { join as join9 } from "path";
2209
2509
  var downloadFile = async ({
2210
2510
  fileClient,
2211
2511
  fileUrl,
@@ -2213,7 +2513,7 @@ var downloadFile = async ({
2213
2513
  }) => {
2214
2514
  const writeDirectory = getFilesDirectory(directory);
2215
2515
  const fileName = urlToFileName(fileUrl.toString());
2216
- const fileAlreadyExists = await fsj2.existsAsync(join8(writeDirectory, FILES_DIRECTORY_NAME, fileName));
2516
+ const fileAlreadyExists = await fsj2.existsAsync(join9(writeDirectory, FILES_DIRECTORY_NAME, fileName));
2217
2517
  if (fileAlreadyExists) {
2218
2518
  return { url: fileUrl };
2219
2519
  }
@@ -2224,7 +2524,7 @@ var downloadFile = async ({
2224
2524
  }
2225
2525
  if (file.sourceId) {
2226
2526
  try {
2227
- const hashAlreadyExists = await fsj2.findAsync(join8(writeDirectory, FILES_DIRECTORY_NAME), {
2527
+ const hashAlreadyExists = await fsj2.findAsync(join9(writeDirectory, FILES_DIRECTORY_NAME), {
2228
2528
  matching: [file.sourceId, `${file.sourceId}.*`]
2229
2529
  });
2230
2530
  if (hashAlreadyExists.length > 0) {
@@ -2239,7 +2539,7 @@ var downloadFile = async ({
2239
2539
  return null;
2240
2540
  }
2241
2541
  const fileBuffer = await response.arrayBuffer();
2242
- await fsj2.writeAsync(join8(writeDirectory, FILES_DIRECTORY_NAME, fileName), Buffer.from(fileBuffer));
2542
+ await fsj2.writeAsync(join9(writeDirectory, FILES_DIRECTORY_NAME, fileName), Buffer.from(fileBuffer));
2243
2543
  return { id: file.id, url: fileUrl };
2244
2544
  };
2245
2545
 
@@ -2252,7 +2552,7 @@ import fsj3 from "fs-jetpack";
2252
2552
  import { imageSizeFromFile } from "image-size/fromFile";
2253
2553
  import normalizeNewline from "normalize-newline";
2254
2554
  import PQueue from "p-queue";
2255
- import { join as join9 } from "path";
2555
+ import { join as join10 } from "path";
2256
2556
  var uploadQueueByKey = /* @__PURE__ */ new Map();
2257
2557
  var fileUploadQueue = new PQueue({ concurrency: 10 });
2258
2558
  var uploadFile = async ({
@@ -2279,7 +2579,7 @@ var uploadFile = async ({
2279
2579
  return { id: file.id, url: file.url };
2280
2580
  }
2281
2581
  const localFileName = urlToFileName(fileUrl);
2282
- const expectedFilePath = join9(writeDirectory, FILES_DIRECTORY_NAME, localFileName);
2582
+ const expectedFilePath = join10(writeDirectory, FILES_DIRECTORY_NAME, localFileName);
2283
2583
  const fileInspect = await fsj3.inspectAsync(expectedFilePath);
2284
2584
  if (fileInspect?.type !== "file") {
2285
2585
  console.warn(
@@ -2358,7 +2658,7 @@ var uploadFile = async ({
2358
2658
  }
2359
2659
  const file2 = await fileClient.get({ id });
2360
2660
  if (!file2 || file2.state !== FILE_READY_STATE || !file2.url) {
2361
- await new Promise((resolve2) => setTimeout(resolve2, 1e3));
2661
+ await new Promise((resolve4) => setTimeout(resolve4, 1e3));
2362
2662
  return checkForFile();
2363
2663
  }
2364
2664
  return file2.url;
@@ -2604,7 +2904,7 @@ var replaceRemoteUrlsWithLocalReferences = async ({
2604
2904
  try {
2605
2905
  const localFileName = urlToFileName(fileUrl);
2606
2906
  const fileExistsLocally = await fsj4.existsAsync(
2607
- join10(writeDirectory, FILES_DIRECTORY_NAME, localFileName)
2907
+ join11(writeDirectory, FILES_DIRECTORY_NAME, localFileName)
2608
2908
  );
2609
2909
  if (fileExistsLocally) {
2610
2910
  return;
@@ -2687,8 +2987,8 @@ function prepCompositionForDisk(composition) {
2687
2987
  delete prepped.state;
2688
2988
  return prepped;
2689
2989
  }
2690
- function withStateOptions(yargs43, defaultState = "preview") {
2691
- return yargs43.option("state", {
2990
+ function withStateOptions(yargs44, defaultState = "preview") {
2991
+ return yargs44.option("state", {
2692
2992
  type: "string",
2693
2993
  describe: `State to fetch.`,
2694
2994
  choices: ["preview", "published"],
@@ -2766,13 +3066,13 @@ function writeCanvasPackage(filename, packageContents) {
2766
3066
  var AssetPullModule = {
2767
3067
  command: "pull <directory>",
2768
3068
  describe: "Pulls all assets to local files in a directory",
2769
- builder: (yargs43) => withConfiguration(
3069
+ builder: (yargs44) => withConfiguration(
2770
3070
  withApiOptions(
2771
3071
  withDebugOptions(
2772
3072
  withProjectOptions(
2773
3073
  withDiffOptions(
2774
3074
  withBatchSizeOptions(
2775
- yargs43.positional("directory", {
3075
+ yargs44.positional("directory", {
2776
3076
  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.",
2777
3077
  type: "string"
2778
3078
  }).option("format", {
@@ -2891,13 +3191,13 @@ var AssetPullModule = {
2891
3191
  var AssetPushModule = {
2892
3192
  command: "push <directory>",
2893
3193
  describe: "Pushes all assets from files in a directory to Uniform",
2894
- builder: (yargs43) => withConfiguration(
3194
+ builder: (yargs44) => withConfiguration(
2895
3195
  withApiOptions(
2896
3196
  withDebugOptions(
2897
3197
  withProjectOptions(
2898
3198
  withDiffOptions(
2899
3199
  withBatchSizeOptions(
2900
- yargs43.positional("directory", {
3200
+ yargs44.positional("directory", {
2901
3201
  describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
2902
3202
  type: "string"
2903
3203
  }).option("mode", {
@@ -3028,10 +3328,10 @@ var AssetRemoveModule = {
3028
3328
  command: "remove <id>",
3029
3329
  aliases: ["delete", "rm"],
3030
3330
  describe: "Delete an asset",
3031
- builder: (yargs43) => withConfiguration(
3331
+ builder: (yargs44) => withConfiguration(
3032
3332
  withDebugOptions(
3033
3333
  withApiOptions(
3034
- withProjectOptions(yargs43.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
3334
+ withProjectOptions(yargs44.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
3035
3335
  )
3036
3336
  )
3037
3337
  ),
@@ -3052,11 +3352,11 @@ var AssetUpdateModule = {
3052
3352
  command: "update <filename>",
3053
3353
  aliases: ["put"],
3054
3354
  describe: "Insert or update an asset",
3055
- builder: (yargs43) => withConfiguration(
3355
+ builder: (yargs44) => withConfiguration(
3056
3356
  withDebugOptions(
3057
3357
  withApiOptions(
3058
3358
  withProjectOptions(
3059
- yargs43.positional("filename", { demandOption: true, describe: "Asset file to put" })
3359
+ yargs44.positional("filename", { demandOption: true, describe: "Asset file to put" })
3060
3360
  )
3061
3361
  )
3062
3362
  )
@@ -3082,14 +3382,14 @@ var AssetUpdateModule = {
3082
3382
  var AssetModule = {
3083
3383
  command: "asset <command>",
3084
3384
  describe: "Commands for Assets",
3085
- builder: (yargs43) => yargs43.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
3385
+ builder: (yargs44) => yargs44.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
3086
3386
  handler: () => {
3087
- yargs4.help();
3387
+ yargs5.help();
3088
3388
  }
3089
3389
  };
3090
3390
 
3091
3391
  // src/commands/canvas/commands/category.ts
3092
- import yargs5 from "yargs";
3392
+ import yargs6 from "yargs";
3093
3393
 
3094
3394
  // src/commands/canvas/commands/category/_util.ts
3095
3395
  import { UncachedCategoryClient } from "@uniformdev/canvas";
@@ -3103,12 +3403,12 @@ function getCategoryClient(options) {
3103
3403
  var CategoryGetModule = {
3104
3404
  command: "get <id>",
3105
3405
  describe: "Fetch a category",
3106
- builder: (yargs43) => withConfiguration(
3406
+ builder: (yargs44) => withConfiguration(
3107
3407
  withFormatOptions(
3108
3408
  withDebugOptions(
3109
3409
  withApiOptions(
3110
3410
  withProjectOptions(
3111
- yargs43.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
3411
+ yargs44.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
3112
3412
  )
3113
3413
  )
3114
3414
  )
@@ -3133,8 +3433,8 @@ var CategoryListModule = {
3133
3433
  command: "list",
3134
3434
  describe: "List categories",
3135
3435
  aliases: ["ls"],
3136
- builder: (yargs43) => withConfiguration(
3137
- withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs43.options({})))))
3436
+ builder: (yargs44) => withConfiguration(
3437
+ withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs44.options({})))))
3138
3438
  ),
3139
3439
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
3140
3440
  const fetch2 = nodeFetchProxy(proxy, verbose);
@@ -3176,12 +3476,12 @@ function createCategoriesEngineDataSource({
3176
3476
  var CategoryPullModule = {
3177
3477
  command: "pull <directory>",
3178
3478
  describe: "Pulls all categories to local files in a directory",
3179
- builder: (yargs43) => withConfiguration(
3479
+ builder: (yargs44) => withConfiguration(
3180
3480
  withApiOptions(
3181
3481
  withProjectOptions(
3182
3482
  withDiffOptions(
3183
3483
  withDebugOptions(
3184
- yargs43.positional("directory", {
3484
+ yargs44.positional("directory", {
3185
3485
  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.",
3186
3486
  type: "string"
3187
3487
  }).option("format", {
@@ -3256,12 +3556,12 @@ var CategoryPullModule = {
3256
3556
  var CategoryPushModule = {
3257
3557
  command: "push <directory>",
3258
3558
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
3259
- builder: (yargs43) => withConfiguration(
3559
+ builder: (yargs44) => withConfiguration(
3260
3560
  withApiOptions(
3261
3561
  withDebugOptions(
3262
3562
  withProjectOptions(
3263
3563
  withDiffOptions(
3264
- yargs43.positional("directory", {
3564
+ yargs44.positional("directory", {
3265
3565
  describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
3266
3566
  type: "string"
3267
3567
  }).option("mode", {
@@ -3325,11 +3625,11 @@ var CategoryRemoveModule = {
3325
3625
  command: "remove <id>",
3326
3626
  aliases: ["delete", "rm"],
3327
3627
  describe: "Delete a category",
3328
- builder: (yargs43) => withConfiguration(
3628
+ builder: (yargs44) => withConfiguration(
3329
3629
  withApiOptions(
3330
3630
  withDebugOptions(
3331
3631
  withProjectOptions(
3332
- yargs43.positional("id", { demandOption: true, describe: "Category UUID to delete" })
3632
+ yargs44.positional("id", { demandOption: true, describe: "Category UUID to delete" })
3333
3633
  )
3334
3634
  )
3335
3635
  )
@@ -3350,11 +3650,11 @@ var CategoryUpdateModule = {
3350
3650
  command: "update <filename>",
3351
3651
  aliases: ["put"],
3352
3652
  describe: "Insert or update a category",
3353
- builder: (yargs43) => withConfiguration(
3653
+ builder: (yargs44) => withConfiguration(
3354
3654
  withApiOptions(
3355
3655
  withDebugOptions(
3356
3656
  withProjectOptions(
3357
- yargs43.positional("filename", { demandOption: true, describe: "Category file to put" })
3657
+ yargs44.positional("filename", { demandOption: true, describe: "Category file to put" })
3358
3658
  )
3359
3659
  )
3360
3660
  )
@@ -3376,14 +3676,14 @@ var CategoryModule = {
3376
3676
  command: "category <command>",
3377
3677
  aliases: ["cat"],
3378
3678
  describe: "Commands for Canvas categories",
3379
- builder: (yargs43) => yargs43.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
3679
+ builder: (yargs44) => yargs44.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
3380
3680
  handler: () => {
3381
- yargs5.help();
3681
+ yargs6.help();
3382
3682
  }
3383
3683
  };
3384
3684
 
3385
3685
  // src/commands/canvas/commands/component.ts
3386
- import yargs6 from "yargs";
3686
+ import yargs7 from "yargs";
3387
3687
 
3388
3688
  // src/commands/canvas/commands/component/_util.ts
3389
3689
  import { UncachedCanvasClient } from "@uniformdev/canvas";
@@ -3398,12 +3698,12 @@ function getCanvasClient(options) {
3398
3698
  var ComponentGetModule = {
3399
3699
  command: "get <id>",
3400
3700
  describe: "Fetch a component definition",
3401
- builder: (yargs43) => withConfiguration(
3701
+ builder: (yargs44) => withConfiguration(
3402
3702
  withFormatOptions(
3403
3703
  withDebugOptions(
3404
3704
  withApiOptions(
3405
3705
  withProjectOptions(
3406
- yargs43.positional("id", {
3706
+ yargs44.positional("id", {
3407
3707
  demandOption: true,
3408
3708
  describe: "Component definition public ID to fetch"
3409
3709
  })
@@ -3437,12 +3737,12 @@ var ComponentListModule = {
3437
3737
  command: "list",
3438
3738
  describe: "List component definitions",
3439
3739
  aliases: ["ls"],
3440
- builder: (yargs43) => withConfiguration(
3740
+ builder: (yargs44) => withConfiguration(
3441
3741
  withFormatOptions(
3442
3742
  withDebugOptions(
3443
3743
  withApiOptions(
3444
3744
  withProjectOptions(
3445
- yargs43.options({
3745
+ yargs44.options({
3446
3746
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
3447
3747
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
3448
3748
  })
@@ -3513,13 +3813,13 @@ function createComponentDefinitionEngineDataSource({
3513
3813
  var ComponentPullModule = {
3514
3814
  command: "pull <directory>",
3515
3815
  describe: "Pulls all component definitions to local files in a directory",
3516
- builder: (yargs43) => withConfiguration(
3816
+ builder: (yargs44) => withConfiguration(
3517
3817
  withApiOptions(
3518
3818
  withDebugOptions(
3519
3819
  withProjectOptions(
3520
3820
  withDiffOptions(
3521
3821
  withBatchSizeOptions(
3522
- yargs43.positional("directory", {
3822
+ yargs44.positional("directory", {
3523
3823
  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.",
3524
3824
  type: "string"
3525
3825
  }).option("format", {
@@ -3602,13 +3902,13 @@ var ComponentPullModule = {
3602
3902
  var ComponentPushModule = {
3603
3903
  command: "push <directory>",
3604
3904
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
3605
- builder: (yargs43) => withConfiguration(
3905
+ builder: (yargs44) => withConfiguration(
3606
3906
  withApiOptions(
3607
3907
  withDebugOptions(
3608
3908
  withProjectOptions(
3609
3909
  withDiffOptions(
3610
3910
  withBatchSizeOptions(
3611
- yargs43.positional("directory", {
3911
+ yargs44.positional("directory", {
3612
3912
  describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
3613
3913
  type: "string"
3614
3914
  }).option("mode", {
@@ -3680,11 +3980,11 @@ var ComponentRemoveModule = {
3680
3980
  command: "remove <id>",
3681
3981
  aliases: ["delete", "rm"],
3682
3982
  describe: "Delete a component definition",
3683
- builder: (yargs43) => withConfiguration(
3983
+ builder: (yargs44) => withConfiguration(
3684
3984
  withDebugOptions(
3685
3985
  withApiOptions(
3686
3986
  withProjectOptions(
3687
- yargs43.positional("id", {
3987
+ yargs44.positional("id", {
3688
3988
  demandOption: true,
3689
3989
  describe: "Component definition public ID to delete"
3690
3990
  })
@@ -3708,11 +4008,11 @@ var ComponentUpdateModule = {
3708
4008
  command: "update <filename>",
3709
4009
  aliases: ["put"],
3710
4010
  describe: "Insert or update a component definition",
3711
- builder: (yargs43) => withConfiguration(
4011
+ builder: (yargs44) => withConfiguration(
3712
4012
  withApiOptions(
3713
4013
  withDebugOptions(
3714
4014
  withProjectOptions(
3715
- yargs43.positional("filename", { demandOption: true, describe: "Component definition file to put" })
4015
+ yargs44.positional("filename", { demandOption: true, describe: "Component definition file to put" })
3716
4016
  )
3717
4017
  )
3718
4018
  )
@@ -3734,14 +4034,14 @@ var ComponentModule = {
3734
4034
  command: "component <command>",
3735
4035
  aliases: ["def"],
3736
4036
  describe: "Commands for Canvas component definitions",
3737
- builder: (yargs43) => yargs43.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
4037
+ builder: (yargs44) => yargs44.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
3738
4038
  handler: () => {
3739
- yargs6.help();
4039
+ yargs7.help();
3740
4040
  }
3741
4041
  };
3742
4042
 
3743
4043
  // src/commands/canvas/commands/componentPattern.ts
3744
- import yargs7 from "yargs";
4044
+ import yargs8 from "yargs";
3745
4045
 
3746
4046
  // src/commands/canvas/util/entityTypeValidation.ts
3747
4047
  import { CANVAS_DRAFT_STATE as CANVAS_DRAFT_STATE2 } from "@uniformdev/canvas";
@@ -3896,13 +4196,13 @@ function createCompositionGetHandler(expectedType) {
3896
4196
  var CompositionGetModule = {
3897
4197
  command: "get <id>",
3898
4198
  describe: "Fetch a composition",
3899
- builder: (yargs43) => withFormatOptions(
4199
+ builder: (yargs44) => withFormatOptions(
3900
4200
  withConfiguration(
3901
4201
  withApiOptions(
3902
4202
  withProjectOptions(
3903
4203
  withStateOptions(
3904
4204
  withDebugOptions(
3905
- yargs43.positional("id", {
4205
+ yargs44.positional("id", {
3906
4206
  demandOption: true,
3907
4207
  describe: "Composition public ID to fetch"
3908
4208
  }).option({
@@ -3958,13 +4258,13 @@ var CompositionListModule = {
3958
4258
  command: "list",
3959
4259
  describe: "List compositions",
3960
4260
  aliases: ["ls"],
3961
- builder: (yargs43) => withFormatOptions(
4261
+ builder: (yargs44) => withFormatOptions(
3962
4262
  withConfiguration(
3963
4263
  withApiOptions(
3964
4264
  withProjectOptions(
3965
4265
  withDebugOptions(
3966
4266
  withStateOptions(
3967
- yargs43.options({
4267
+ yargs44.options({
3968
4268
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
3969
4269
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
3970
4270
  search: { describe: "Search query", type: "string", default: "" },
@@ -4045,13 +4345,13 @@ var CompositionListModule = {
4045
4345
  var ComponentPatternListModule = {
4046
4346
  ...CompositionListModule,
4047
4347
  describe: "List component patterns",
4048
- builder: (yargs43) => withFormatOptions(
4348
+ builder: (yargs44) => withFormatOptions(
4049
4349
  withConfiguration(
4050
4350
  withApiOptions(
4051
4351
  withDebugOptions(
4052
4352
  withProjectOptions(
4053
4353
  withStateOptions(
4054
- yargs43.options({
4354
+ yargs44.options({
4055
4355
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
4056
4356
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
4057
4357
  resolvePatterns: {
@@ -4175,13 +4475,13 @@ function createComponentInstanceEngineDataSource({
4175
4475
  var CompositionPublishModule = {
4176
4476
  command: "publish [ids]",
4177
4477
  describe: "Publishes composition(s)",
4178
- builder: (yargs43) => withConfiguration(
4478
+ builder: (yargs44) => withConfiguration(
4179
4479
  withApiOptions(
4180
4480
  withProjectOptions(
4181
4481
  withDebugOptions(
4182
4482
  withDiffOptions(
4183
4483
  withBatchSizeOptions(
4184
- yargs43.positional("ids", {
4484
+ yargs44.positional("ids", {
4185
4485
  describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4186
4486
  type: "string"
4187
4487
  }).option("all", {
@@ -4279,13 +4579,13 @@ var CompositionPublishModule = {
4279
4579
  var ComponentPatternPublishModule = {
4280
4580
  ...CompositionPublishModule,
4281
4581
  describe: "Publishes component pattern(s)",
4282
- builder: (yargs43) => withConfiguration(
4582
+ builder: (yargs44) => withConfiguration(
4283
4583
  withApiOptions(
4284
4584
  withDebugOptions(
4285
4585
  withProjectOptions(
4286
4586
  withDiffOptions(
4287
4587
  withBatchSizeOptions(
4288
- yargs43.positional("ids", {
4588
+ yargs44.positional("ids", {
4289
4589
  describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4290
4590
  type: "string"
4291
4591
  }).option("all", {
@@ -4327,14 +4627,14 @@ function componentInstancePullModuleFactory(type, entityType) {
4327
4627
  return {
4328
4628
  command: "pull <directory>",
4329
4629
  describe: "Pulls all compositions to local files in a directory",
4330
- builder: (yargs43) => withConfiguration(
4630
+ builder: (yargs44) => withConfiguration(
4331
4631
  withApiOptions(
4332
4632
  withProjectOptions(
4333
4633
  withStateOptions(
4334
4634
  withDebugOptions(
4335
4635
  withDiffOptions(
4336
4636
  withBatchSizeOptions(
4337
- yargs43.positional("directory", {
4637
+ yargs44.positional("directory", {
4338
4638
  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.",
4339
4639
  type: "string"
4340
4640
  }).option("format", {
@@ -4453,13 +4753,13 @@ function componentInstancePullModuleFactory(type, entityType) {
4453
4753
  var ComponentPatternPullModule = {
4454
4754
  ...componentInstancePullModuleFactory("componentPatterns", "componentPattern"),
4455
4755
  describe: "Pulls all component patterns to local files in a directory",
4456
- builder: (yargs43) => withConfiguration(
4756
+ builder: (yargs44) => withConfiguration(
4457
4757
  withApiOptions(
4458
4758
  withProjectOptions(
4459
4759
  withDebugOptions(
4460
4760
  withStateOptions(
4461
4761
  withDiffOptions(
4462
- yargs43.positional("directory", {
4762
+ yargs44.positional("directory", {
4463
4763
  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.",
4464
4764
  type: "string"
4465
4765
  }).option("format", {
@@ -4533,14 +4833,14 @@ function componentInstancePushModuleFactory(type, entityType) {
4533
4833
  return {
4534
4834
  command: "push <directory>",
4535
4835
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
4536
- builder: (yargs43) => withConfiguration(
4836
+ builder: (yargs44) => withConfiguration(
4537
4837
  withApiOptions(
4538
4838
  withProjectOptions(
4539
4839
  withStateOptions(
4540
4840
  withDebugOptions(
4541
4841
  withDiffOptions(
4542
4842
  withBatchSizeOptions(
4543
- yargs43.positional("directory", {
4843
+ yargs44.positional("directory", {
4544
4844
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4545
4845
  type: "string"
4546
4846
  }).option("mode", {
@@ -4658,13 +4958,13 @@ function componentInstancePushModuleFactory(type, entityType) {
4658
4958
  var ComponentPatternPushModule = {
4659
4959
  ...componentInstancePushModuleFactory("componentPatterns", "componentPattern"),
4660
4960
  describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
4661
- builder: (yargs43) => withConfiguration(
4961
+ builder: (yargs44) => withConfiguration(
4662
4962
  withApiOptions(
4663
4963
  withProjectOptions(
4664
4964
  withStateOptions(
4665
4965
  withDiffOptions(
4666
4966
  withDebugOptions(
4667
- yargs43.positional("directory", {
4967
+ yargs44.positional("directory", {
4668
4968
  describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
4669
4969
  type: "string"
4670
4970
  }).option("mode", {
@@ -4729,11 +5029,11 @@ var CompositionRemoveModule = {
4729
5029
  command: "remove <id>",
4730
5030
  aliases: ["delete", "rm"],
4731
5031
  describe: "Delete a composition",
4732
- builder: (yargs43) => withConfiguration(
5032
+ builder: (yargs44) => withConfiguration(
4733
5033
  withApiOptions(
4734
5034
  withDebugOptions(
4735
5035
  withProjectOptions(
4736
- yargs43.positional("id", {
5036
+ yargs44.positional("id", {
4737
5037
  demandOption: true,
4738
5038
  describe: "Composition public ID to delete"
4739
5039
  })
@@ -4760,12 +5060,12 @@ import { diffJson as diffJson2 } from "diff";
4760
5060
  var CompositionUnpublishModule = {
4761
5061
  command: "unpublish [ids]",
4762
5062
  describe: "Unpublish a composition(s)",
4763
- builder: (yargs43) => withConfiguration(
5063
+ builder: (yargs44) => withConfiguration(
4764
5064
  withApiOptions(
4765
5065
  withDebugOptions(
4766
5066
  withProjectOptions(
4767
5067
  withBatchSizeOptions(
4768
- yargs43.positional("ids", {
5068
+ yargs44.positional("ids", {
4769
5069
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4770
5070
  type: "string"
4771
5071
  }).option("all", {
@@ -4881,11 +5181,11 @@ var CompositionUnpublishModule = {
4881
5181
  var ComponentPatternUnpublishModule = {
4882
5182
  command: "unpublish [ids]",
4883
5183
  describe: "Unpublish a component pattern(s)",
4884
- builder: (yargs43) => withConfiguration(
5184
+ builder: (yargs44) => withConfiguration(
4885
5185
  withApiOptions(
4886
5186
  withDebugOptions(
4887
5187
  withProjectOptions(
4888
- yargs43.positional("ids", {
5188
+ yargs44.positional("ids", {
4889
5189
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4890
5190
  type: "string"
4891
5191
  }).option("all", {
@@ -4953,12 +5253,12 @@ var CompositionUpdateModule = {
4953
5253
  command: "update <filename>",
4954
5254
  aliases: ["put"],
4955
5255
  describe: "Insert or update a composition",
4956
- builder: (yargs43) => withConfiguration(
5256
+ builder: (yargs44) => withConfiguration(
4957
5257
  withApiOptions(
4958
5258
  withProjectOptions(
4959
5259
  withDebugOptions(
4960
5260
  withStateOptions(
4961
- yargs43.positional("filename", {
5261
+ yargs44.positional("filename", {
4962
5262
  demandOption: true,
4963
5263
  describe: "Composition/pattern file to put"
4964
5264
  })
@@ -4981,26 +5281,26 @@ var ComponentPatternUpdateModule = {
4981
5281
  var ComponentPatternModule = {
4982
5282
  command: "component-pattern <command>",
4983
5283
  describe: "Commands for Canvas component patterns",
4984
- builder: (yargs43) => yargs43.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
5284
+ builder: (yargs44) => yargs44.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
4985
5285
  handler: () => {
4986
- yargs7.help();
5286
+ yargs8.help();
4987
5287
  }
4988
5288
  };
4989
5289
 
4990
5290
  // src/commands/canvas/commands/composition.ts
4991
- import yargs8 from "yargs";
5291
+ import yargs9 from "yargs";
4992
5292
  var CompositionModule = {
4993
5293
  command: "composition <command>",
4994
5294
  describe: "Commands for Canvas compositions",
4995
5295
  aliases: ["comp"],
4996
- builder: (yargs43) => yargs43.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
5296
+ builder: (yargs44) => yargs44.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
4997
5297
  handler: () => {
4998
- yargs8.help();
5298
+ yargs9.help();
4999
5299
  }
5000
5300
  };
5001
5301
 
5002
5302
  // src/commands/canvas/commands/compositionPattern.ts
5003
- import yargs9 from "yargs";
5303
+ import yargs10 from "yargs";
5004
5304
 
5005
5305
  // src/commands/canvas/commands/compositionPattern/get.ts
5006
5306
  var CompositionPatternGetModule = {
@@ -5013,13 +5313,13 @@ var CompositionPatternGetModule = {
5013
5313
  var CompositionPatternListModule = {
5014
5314
  ...CompositionListModule,
5015
5315
  describe: "List composition patterns",
5016
- builder: (yargs43) => withFormatOptions(
5316
+ builder: (yargs44) => withFormatOptions(
5017
5317
  withConfiguration(
5018
5318
  withApiOptions(
5019
5319
  withDebugOptions(
5020
5320
  withProjectOptions(
5021
5321
  withStateOptions(
5022
- yargs43.options({
5322
+ yargs44.options({
5023
5323
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
5024
5324
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
5025
5325
  resolvePatterns: {
@@ -5063,13 +5363,13 @@ var CompositionPatternListModule = {
5063
5363
  var CompositionPatternPublishModule = {
5064
5364
  ...CompositionPublishModule,
5065
5365
  describe: "Publishes composition pattern(s)",
5066
- builder: (yargs43) => withConfiguration(
5366
+ builder: (yargs44) => withConfiguration(
5067
5367
  withApiOptions(
5068
5368
  withDebugOptions(
5069
5369
  withProjectOptions(
5070
5370
  withDiffOptions(
5071
5371
  withBatchSizeOptions(
5072
- yargs43.positional("ids", {
5372
+ yargs44.positional("ids", {
5073
5373
  describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
5074
5374
  type: "string"
5075
5375
  }).option("all", {
@@ -5110,13 +5410,13 @@ var CompositionPatternPublishModule = {
5110
5410
  var CompositionPatternPullModule = {
5111
5411
  ...componentInstancePullModuleFactory("compositionPatterns", "compositionPattern"),
5112
5412
  describe: "Pulls all composition patterns to local files in a directory",
5113
- builder: (yargs43) => withConfiguration(
5413
+ builder: (yargs44) => withConfiguration(
5114
5414
  withApiOptions(
5115
5415
  withDebugOptions(
5116
5416
  withProjectOptions(
5117
5417
  withStateOptions(
5118
5418
  withDiffOptions(
5119
- yargs43.positional("directory", {
5419
+ yargs44.positional("directory", {
5120
5420
  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.",
5121
5421
  type: "string"
5122
5422
  }).option("format", {
@@ -5154,13 +5454,13 @@ var CompositionPatternPullModule = {
5154
5454
  var CompositionPatternPushModule = {
5155
5455
  ...componentInstancePushModuleFactory("compositionPatterns", "compositionPattern"),
5156
5456
  describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
5157
- builder: (yargs43) => withConfiguration(
5457
+ builder: (yargs44) => withConfiguration(
5158
5458
  withApiOptions(
5159
5459
  withDebugOptions(
5160
5460
  withProjectOptions(
5161
5461
  withStateOptions(
5162
5462
  withDiffOptions(
5163
- yargs43.positional("directory", {
5463
+ yargs44.positional("directory", {
5164
5464
  describe: "Directory to read the compositions patterns from. If a filename is used, a package will be read instead.",
5165
5465
  type: "string"
5166
5466
  }).option("mode", {
@@ -5200,11 +5500,11 @@ var CompositionPatternRemoveModule = {
5200
5500
  var CompositionPatternUnpublishModule = {
5201
5501
  command: "unpublish [ids]",
5202
5502
  describe: "Unpublish a composition pattern(s)",
5203
- builder: (yargs43) => withConfiguration(
5503
+ builder: (yargs44) => withConfiguration(
5204
5504
  withApiOptions(
5205
5505
  withDebugOptions(
5206
5506
  withProjectOptions(
5207
- yargs43.positional("ids", {
5507
+ yargs44.positional("ids", {
5208
5508
  describe: "Un-publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
5209
5509
  type: "string"
5210
5510
  }).option("all", {
@@ -5241,14 +5541,14 @@ var CompositionPatternUpdateModule = {
5241
5541
  var CompositionPatternModule = {
5242
5542
  command: "composition-pattern <command>",
5243
5543
  describe: "Commands for Canvas composition patterns",
5244
- builder: (yargs43) => yargs43.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
5544
+ builder: (yargs44) => yargs44.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
5245
5545
  handler: () => {
5246
- yargs9.help();
5546
+ yargs10.help();
5247
5547
  }
5248
5548
  };
5249
5549
 
5250
5550
  // src/commands/canvas/commands/contentType.ts
5251
- import yargs10 from "yargs";
5551
+ import yargs11 from "yargs";
5252
5552
 
5253
5553
  // src/commands/canvas/commands/contentType/_util.ts
5254
5554
  import { ContentClient } from "@uniformdev/canvas";
@@ -5262,12 +5562,12 @@ function getContentClient(options) {
5262
5562
  var ContentTypeGetModule = {
5263
5563
  command: "get <id>",
5264
5564
  describe: "Get a content type",
5265
- builder: (yargs43) => withConfiguration(
5565
+ builder: (yargs44) => withConfiguration(
5266
5566
  withDebugOptions(
5267
5567
  withFormatOptions(
5268
5568
  withApiOptions(
5269
5569
  withProjectOptions(
5270
- yargs43.positional("id", {
5570
+ yargs44.positional("id", {
5271
5571
  demandOption: true,
5272
5572
  describe: "Content type public ID to fetch"
5273
5573
  })
@@ -5292,7 +5592,7 @@ var ContentTypeGetModule = {
5292
5592
  var ContentTypeListModule = {
5293
5593
  command: "list",
5294
5594
  describe: "List content types",
5295
- builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
5595
+ builder: (yargs44) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs44))))),
5296
5596
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
5297
5597
  const fetch2 = nodeFetchProxy(proxy, verbose);
5298
5598
  const client = getContentClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -5338,13 +5638,13 @@ function createContentTypeEngineDataSource({
5338
5638
  var ContentTypePullModule = {
5339
5639
  command: "pull <directory>",
5340
5640
  describe: "Pulls all content types to local files in a directory",
5341
- builder: (yargs43) => withConfiguration(
5641
+ builder: (yargs44) => withConfiguration(
5342
5642
  withApiOptions(
5343
5643
  withDebugOptions(
5344
5644
  withProjectOptions(
5345
5645
  withDiffOptions(
5346
5646
  withBatchSizeOptions(
5347
- yargs43.positional("directory", {
5647
+ yargs44.positional("directory", {
5348
5648
  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.",
5349
5649
  type: "string"
5350
5650
  }).option("format", {
@@ -5431,13 +5731,13 @@ var ContentTypePullModule = {
5431
5731
  var ContentTypePushModule = {
5432
5732
  command: "push <directory>",
5433
5733
  describe: "Pushes all content types from files in a directory to Uniform",
5434
- builder: (yargs43) => withConfiguration(
5734
+ builder: (yargs44) => withConfiguration(
5435
5735
  withApiOptions(
5436
5736
  withDebugOptions(
5437
5737
  withProjectOptions(
5438
5738
  withDiffOptions(
5439
5739
  withBatchSizeOptions(
5440
- yargs43.positional("directory", {
5740
+ yargs44.positional("directory", {
5441
5741
  describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
5442
5742
  type: "string"
5443
5743
  }).option("what-if", {
@@ -5518,11 +5818,11 @@ var ContentTypeRemoveModule = {
5518
5818
  command: "remove <id>",
5519
5819
  aliases: ["delete", "rm"],
5520
5820
  describe: "Delete a content type",
5521
- builder: (yargs43) => withConfiguration(
5821
+ builder: (yargs44) => withConfiguration(
5522
5822
  withDebugOptions(
5523
5823
  withApiOptions(
5524
5824
  withProjectOptions(
5525
- yargs43.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
5825
+ yargs44.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
5526
5826
  )
5527
5827
  )
5528
5828
  )
@@ -5543,11 +5843,11 @@ var ContentTypeUpdateModule = {
5543
5843
  command: "update <filename>",
5544
5844
  aliases: ["put"],
5545
5845
  describe: "Insert or update a content type",
5546
- builder: (yargs43) => withConfiguration(
5846
+ builder: (yargs44) => withConfiguration(
5547
5847
  withDebugOptions(
5548
5848
  withApiOptions(
5549
5849
  withProjectOptions(
5550
- yargs43.positional("filename", { demandOption: true, describe: "Content type file to put" })
5850
+ yargs44.positional("filename", { demandOption: true, describe: "Content type file to put" })
5551
5851
  )
5552
5852
  )
5553
5853
  )
@@ -5569,14 +5869,14 @@ var ContentTypeModule = {
5569
5869
  command: "contenttype <command>",
5570
5870
  aliases: ["ct"],
5571
5871
  describe: "Commands for Content Types",
5572
- builder: (yargs43) => yargs43.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
5872
+ builder: (yargs44) => yargs44.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
5573
5873
  handler: () => {
5574
- yargs10.help();
5874
+ yargs11.help();
5575
5875
  }
5576
5876
  };
5577
5877
 
5578
5878
  // src/commands/canvas/commands/dataSource.ts
5579
- import yargs11 from "yargs";
5879
+ import yargs12 from "yargs";
5580
5880
 
5581
5881
  // src/commands/canvas/commands/dataSource/_util.ts
5582
5882
  import { DataSourceClient } from "@uniformdev/canvas";
@@ -5588,11 +5888,11 @@ function getDataSourceClient(options) {
5588
5888
  var DataSourceGetModule = {
5589
5889
  command: "get <id>",
5590
5890
  describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
5591
- builder: (yargs43) => withConfiguration(
5891
+ builder: (yargs44) => withConfiguration(
5592
5892
  withApiOptions(
5593
5893
  withDebugOptions(
5594
5894
  withProjectOptions(
5595
- yargs43.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
5895
+ yargs44.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
5596
5896
  )
5597
5897
  )
5598
5898
  )
@@ -5610,11 +5910,11 @@ var DataSourceRemoveModule = {
5610
5910
  command: "remove <id>",
5611
5911
  aliases: ["delete", "rm"],
5612
5912
  describe: "Delete a data source",
5613
- builder: (yargs43) => withConfiguration(
5913
+ builder: (yargs44) => withConfiguration(
5614
5914
  withDebugOptions(
5615
5915
  withApiOptions(
5616
5916
  withProjectOptions(
5617
- yargs43.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
5917
+ yargs44.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
5618
5918
  )
5619
5919
  )
5620
5920
  )
@@ -5635,11 +5935,11 @@ var DataSourceUpdateModule = {
5635
5935
  command: "update <dataSource>",
5636
5936
  aliases: ["put"],
5637
5937
  describe: "Insert or update a data source",
5638
- builder: (yargs43) => withConfiguration(
5938
+ builder: (yargs44) => withConfiguration(
5639
5939
  withApiOptions(
5640
5940
  withDebugOptions(
5641
5941
  withProjectOptions(
5642
- yargs43.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
5942
+ yargs44.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
5643
5943
  describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
5644
5944
  type: "string",
5645
5945
  demandOption: true
@@ -5674,14 +5974,14 @@ var DataSourceModule = {
5674
5974
  command: "datasource <command>",
5675
5975
  aliases: ["ds"],
5676
5976
  describe: "Commands for Data Source definitions",
5677
- builder: (yargs43) => yargs43.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
5977
+ builder: (yargs44) => yargs44.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
5678
5978
  handler: () => {
5679
- yargs11.help();
5979
+ yargs12.help();
5680
5980
  }
5681
5981
  };
5682
5982
 
5683
5983
  // src/commands/canvas/commands/dataType.ts
5684
- import yargs12 from "yargs";
5984
+ import yargs13 from "yargs";
5685
5985
 
5686
5986
  // src/commands/canvas/commands/dataType/_util.ts
5687
5987
  import { DataTypeClient } from "@uniformdev/canvas";
@@ -5696,12 +5996,12 @@ var DataTypeGetModule = {
5696
5996
  command: "get <id>",
5697
5997
  describe: "Get a data type",
5698
5998
  aliases: ["ls"],
5699
- builder: (yargs43) => withConfiguration(
5999
+ builder: (yargs44) => withConfiguration(
5700
6000
  withFormatOptions(
5701
6001
  withDebugOptions(
5702
6002
  withApiOptions(
5703
6003
  withProjectOptions(
5704
- yargs43.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
6004
+ yargs44.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
5705
6005
  )
5706
6006
  )
5707
6007
  )
@@ -5724,7 +6024,7 @@ var DataTypeListModule = {
5724
6024
  command: "list",
5725
6025
  describe: "List data types",
5726
6026
  aliases: ["ls"],
5727
- builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
6027
+ builder: (yargs44) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs44))))),
5728
6028
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
5729
6029
  const fetch2 = nodeFetchProxy(proxy, verbose);
5730
6030
  const client = getDataTypeClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -5767,12 +6067,12 @@ function createDataTypeEngineDataSource({
5767
6067
  var DataTypePullModule = {
5768
6068
  command: "pull <directory>",
5769
6069
  describe: "Pulls all data types to local files in a directory",
5770
- builder: (yargs43) => withConfiguration(
6070
+ builder: (yargs44) => withConfiguration(
5771
6071
  withApiOptions(
5772
6072
  withDebugOptions(
5773
6073
  withProjectOptions(
5774
6074
  withDiffOptions(
5775
- yargs43.positional("directory", {
6075
+ yargs44.positional("directory", {
5776
6076
  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.",
5777
6077
  type: "string"
5778
6078
  }).option("format", {
@@ -5852,12 +6152,12 @@ var DataTypePullModule = {
5852
6152
  var DataTypePushModule = {
5853
6153
  command: "push <directory>",
5854
6154
  describe: "Pushes all data types from files in a directory to Uniform",
5855
- builder: (yargs43) => withConfiguration(
6155
+ builder: (yargs44) => withConfiguration(
5856
6156
  withApiOptions(
5857
6157
  withDebugOptions(
5858
6158
  withProjectOptions(
5859
6159
  withDiffOptions(
5860
- yargs43.positional("directory", {
6160
+ yargs44.positional("directory", {
5861
6161
  describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
5862
6162
  type: "string"
5863
6163
  }).option("mode", {
@@ -5926,11 +6226,11 @@ var DataTypeRemoveModule = {
5926
6226
  command: "remove <id>",
5927
6227
  aliases: ["delete", "rm"],
5928
6228
  describe: "Delete a data type",
5929
- builder: (yargs43) => withConfiguration(
6229
+ builder: (yargs44) => withConfiguration(
5930
6230
  withDebugOptions(
5931
6231
  withApiOptions(
5932
6232
  withProjectOptions(
5933
- yargs43.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
6233
+ yargs44.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
5934
6234
  )
5935
6235
  )
5936
6236
  )
@@ -5951,11 +6251,11 @@ var DataTypeUpdateModule = {
5951
6251
  command: "update <filename>",
5952
6252
  aliases: ["put"],
5953
6253
  describe: "Insert or update a data type",
5954
- builder: (yargs43) => withConfiguration(
6254
+ builder: (yargs44) => withConfiguration(
5955
6255
  withDebugOptions(
5956
6256
  withApiOptions(
5957
6257
  withProjectOptions(
5958
- yargs43.positional("filename", { demandOption: true, describe: "Data type file to put" })
6258
+ yargs44.positional("filename", { demandOption: true, describe: "Data type file to put" })
5959
6259
  )
5960
6260
  )
5961
6261
  )
@@ -5977,14 +6277,14 @@ var DataTypeModule = {
5977
6277
  command: "datatype <command>",
5978
6278
  aliases: ["dt"],
5979
6279
  describe: "Commands for Data Type definitions",
5980
- builder: (yargs43) => yargs43.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
6280
+ builder: (yargs44) => yargs44.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
5981
6281
  handler: () => {
5982
- yargs12.help();
6282
+ yargs13.help();
5983
6283
  }
5984
6284
  };
5985
6285
 
5986
6286
  // src/commands/canvas/commands/entry.ts
5987
- import yargs13 from "yargs";
6287
+ import yargs14 from "yargs";
5988
6288
 
5989
6289
  // src/commands/canvas/commands/entry/get.ts
5990
6290
  function createEntryGetHandler(expectedType) {
@@ -6038,13 +6338,13 @@ function createEntryGetHandler(expectedType) {
6038
6338
  var EntryGetModule = {
6039
6339
  command: "get <id>",
6040
6340
  describe: "Get an entry",
6041
- builder: (yargs43) => withConfiguration(
6341
+ builder: (yargs44) => withConfiguration(
6042
6342
  withDebugOptions(
6043
6343
  withFormatOptions(
6044
6344
  withApiOptions(
6045
6345
  withProjectOptions(
6046
6346
  withStateOptions(
6047
- yargs43.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
6347
+ yargs44.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
6048
6348
  resolveData: {
6049
6349
  type: "boolean",
6050
6350
  default: false,
@@ -6082,13 +6382,13 @@ var LEGACY_DEFAULT_LIMIT = 1e3;
6082
6382
  var EntryListModule = {
6083
6383
  command: "list",
6084
6384
  describe: "List entries",
6085
- builder: (yargs43) => withConfiguration(
6385
+ builder: (yargs44) => withConfiguration(
6086
6386
  withDebugOptions(
6087
6387
  withFormatOptions(
6088
6388
  withApiOptions(
6089
6389
  withProjectOptions(
6090
6390
  withStateOptions(
6091
- yargs43.options({
6391
+ yargs44.options({
6092
6392
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
6093
6393
  limit: {
6094
6394
  describe: "Number of rows to fetch",
@@ -6225,13 +6525,13 @@ function createEntryEngineDataSource({
6225
6525
  var EntryPublishModule = {
6226
6526
  command: "publish [ids]",
6227
6527
  describe: "Publishes entry(ies)",
6228
- builder: (yargs43) => withConfiguration(
6528
+ builder: (yargs44) => withConfiguration(
6229
6529
  withDebugOptions(
6230
6530
  withDiffOptions(
6231
6531
  withApiOptions(
6232
6532
  withProjectOptions(
6233
6533
  withBatchSizeOptions(
6234
- yargs43.positional("ids", {
6534
+ yargs44.positional("ids", {
6235
6535
  describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6236
6536
  type: "string"
6237
6537
  }).option("all", {
@@ -6311,14 +6611,14 @@ var EntryPublishModule = {
6311
6611
  var EntryPullModule = {
6312
6612
  command: "pull <directory>",
6313
6613
  describe: "Pulls all entries to local files in a directory",
6314
- builder: (yargs43) => withConfiguration(
6614
+ builder: (yargs44) => withConfiguration(
6315
6615
  withDebugOptions(
6316
6616
  withApiOptions(
6317
6617
  withProjectOptions(
6318
6618
  withStateOptions(
6319
6619
  withDiffOptions(
6320
6620
  withBatchSizeOptions(
6321
- yargs43.positional("directory", {
6621
+ yargs44.positional("directory", {
6322
6622
  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.",
6323
6623
  type: "string"
6324
6624
  }).option("format", {
@@ -6427,14 +6727,14 @@ var EntryPullModule = {
6427
6727
  var EntryPushModule = {
6428
6728
  command: "push <directory>",
6429
6729
  describe: "Pushes all entries from files in a directory to Uniform",
6430
- builder: (yargs43) => withConfiguration(
6730
+ builder: (yargs44) => withConfiguration(
6431
6731
  withDebugOptions(
6432
6732
  withApiOptions(
6433
6733
  withProjectOptions(
6434
6734
  withStateOptions(
6435
6735
  withDiffOptions(
6436
6736
  withBatchSizeOptions(
6437
- yargs43.positional("directory", {
6737
+ yargs44.positional("directory", {
6438
6738
  describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
6439
6739
  type: "string"
6440
6740
  }).option("mode", {
@@ -6573,11 +6873,11 @@ var EntryRemoveModule = {
6573
6873
  command: "remove <id>",
6574
6874
  aliases: ["delete", "rm"],
6575
6875
  describe: "Delete an entry",
6576
- builder: (yargs43) => withConfiguration(
6876
+ builder: (yargs44) => withConfiguration(
6577
6877
  withDebugOptions(
6578
6878
  withApiOptions(
6579
6879
  withProjectOptions(
6580
- yargs43.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
6880
+ yargs44.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
6581
6881
  )
6582
6882
  )
6583
6883
  )
@@ -6591,12 +6891,12 @@ import { diffJson as diffJson3 } from "diff";
6591
6891
  var EntryUnpublishModule = {
6592
6892
  command: "unpublish [ids]",
6593
6893
  describe: "Unpublish an entry(ies)",
6594
- builder: (yargs43) => withConfiguration(
6894
+ builder: (yargs44) => withConfiguration(
6595
6895
  withDebugOptions(
6596
6896
  withApiOptions(
6597
6897
  withProjectOptions(
6598
6898
  withBatchSizeOptions(
6599
- yargs43.positional("ids", {
6899
+ yargs44.positional("ids", {
6600
6900
  describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
6601
6901
  type: "string"
6602
6902
  }).option("all", {
@@ -6730,12 +7030,12 @@ var EntryUpdateModule = {
6730
7030
  command: "update <filename>",
6731
7031
  aliases: ["put"],
6732
7032
  describe: "Insert or update an entry",
6733
- builder: (yargs43) => withConfiguration(
7033
+ builder: (yargs44) => withConfiguration(
6734
7034
  withDebugOptions(
6735
7035
  withApiOptions(
6736
7036
  withProjectOptions(
6737
7037
  withStateOptions(
6738
- yargs43.positional("filename", { demandOption: true, describe: "Entry file to put" })
7038
+ yargs44.positional("filename", { demandOption: true, describe: "Entry file to put" })
6739
7039
  )
6740
7040
  )
6741
7041
  )
@@ -6748,26 +7048,26 @@ var EntryUpdateModule = {
6748
7048
  var EntryModule = {
6749
7049
  command: "entry <command>",
6750
7050
  describe: "Commands for Entries",
6751
- builder: (yargs43) => yargs43.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
7051
+ builder: (yargs44) => yargs44.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
6752
7052
  handler: () => {
6753
- yargs13.help();
7053
+ yargs14.help();
6754
7054
  }
6755
7055
  };
6756
7056
 
6757
7057
  // src/commands/canvas/commands/entryPattern.ts
6758
- import yargs14 from "yargs";
7058
+ import yargs15 from "yargs";
6759
7059
 
6760
7060
  // src/commands/canvas/commands/entryPattern/get.ts
6761
7061
  var EntryPatternGetModule = {
6762
7062
  command: "get <id>",
6763
7063
  describe: "Get an entry pattern",
6764
- builder: (yargs43) => withConfiguration(
7064
+ builder: (yargs44) => withConfiguration(
6765
7065
  withDebugOptions(
6766
7066
  withFormatOptions(
6767
7067
  withApiOptions(
6768
7068
  withProjectOptions(
6769
7069
  withStateOptions(
6770
- yargs43.positional("id", { demandOption: true, describe: "Entry pattern public ID to fetch" }).option({
7070
+ yargs44.positional("id", { demandOption: true, describe: "Entry pattern public ID to fetch" }).option({
6771
7071
  resolveData: {
6772
7072
  type: "boolean",
6773
7073
  default: false,
@@ -6803,13 +7103,13 @@ var EntryPatternGetModule = {
6803
7103
  var EntryPatternListModule = {
6804
7104
  command: "list",
6805
7105
  describe: "List entry patterns",
6806
- builder: (yargs43) => withConfiguration(
7106
+ builder: (yargs44) => withConfiguration(
6807
7107
  withDebugOptions(
6808
7108
  withFormatOptions(
6809
7109
  withApiOptions(
6810
7110
  withProjectOptions(
6811
7111
  withStateOptions(
6812
- yargs43.option({
7112
+ yargs44.option({
6813
7113
  withComponentIDs: {
6814
7114
  type: "boolean",
6815
7115
  default: false,
@@ -6855,13 +7155,13 @@ var EntryPatternListModule = {
6855
7155
  var EntryPatternPublishModule = {
6856
7156
  command: "publish [ids]",
6857
7157
  describe: "Publishes entry pattern(s)",
6858
- builder: (yargs43) => withConfiguration(
7158
+ builder: (yargs44) => withConfiguration(
6859
7159
  withDebugOptions(
6860
7160
  withApiOptions(
6861
7161
  withProjectOptions(
6862
7162
  withDiffOptions(
6863
7163
  withBatchSizeOptions(
6864
- yargs43.positional("ids", {
7164
+ yargs44.positional("ids", {
6865
7165
  describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6866
7166
  type: "string"
6867
7167
  }).option("all", {
@@ -6941,14 +7241,14 @@ var EntryPatternPublishModule = {
6941
7241
  var EntryPatternPullModule = {
6942
7242
  command: "pull <directory>",
6943
7243
  describe: "Pulls all entry patterns to local files in a directory",
6944
- builder: (yargs43) => withConfiguration(
7244
+ builder: (yargs44) => withConfiguration(
6945
7245
  withApiOptions(
6946
7246
  withDebugOptions(
6947
7247
  withProjectOptions(
6948
7248
  withStateOptions(
6949
7249
  withDiffOptions(
6950
7250
  withBatchSizeOptions(
6951
- yargs43.positional("directory", {
7251
+ yargs44.positional("directory", {
6952
7252
  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.",
6953
7253
  type: "string"
6954
7254
  }).option("format", {
@@ -7057,14 +7357,14 @@ var EntryPatternPullModule = {
7057
7357
  var EntryPatternPushModule = {
7058
7358
  command: "push <directory>",
7059
7359
  describe: "Pushes all entry patterns from files in a directory to Uniform",
7060
- builder: (yargs43) => withConfiguration(
7360
+ builder: (yargs44) => withConfiguration(
7061
7361
  withDebugOptions(
7062
7362
  withApiOptions(
7063
7363
  withProjectOptions(
7064
7364
  withStateOptions(
7065
7365
  withDiffOptions(
7066
7366
  withBatchSizeOptions(
7067
- yargs43.positional("directory", {
7367
+ yargs44.positional("directory", {
7068
7368
  describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
7069
7369
  type: "string"
7070
7370
  }).option("what-if", {
@@ -7177,11 +7477,11 @@ var EntryPatternRemoveModule = {
7177
7477
  command: "remove <id>",
7178
7478
  aliases: ["delete", "rm"],
7179
7479
  describe: "Delete an entry pattern",
7180
- builder: (yargs43) => withConfiguration(
7480
+ builder: (yargs44) => withConfiguration(
7181
7481
  withDebugOptions(
7182
7482
  withApiOptions(
7183
7483
  withProjectOptions(
7184
- yargs43.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
7484
+ yargs44.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
7185
7485
  )
7186
7486
  )
7187
7487
  )
@@ -7195,12 +7495,12 @@ import { diffJson as diffJson4 } from "diff";
7195
7495
  var EntryPatternUnpublishModule = {
7196
7496
  command: "unpublish [ids]",
7197
7497
  describe: "Unpublish entry pattern(s)",
7198
- builder: (yargs43) => withConfiguration(
7498
+ builder: (yargs44) => withConfiguration(
7199
7499
  withDebugOptions(
7200
7500
  withApiOptions(
7201
7501
  withProjectOptions(
7202
7502
  withBatchSizeOptions(
7203
- yargs43.positional("ids", {
7503
+ yargs44.positional("ids", {
7204
7504
  describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
7205
7505
  type: "string"
7206
7506
  }).option("all", {
@@ -7299,12 +7599,12 @@ var EntryPatternUpdateModule = {
7299
7599
  command: "update <filename>",
7300
7600
  aliases: ["put"],
7301
7601
  describe: "Insert or update an entry pattern",
7302
- builder: (yargs43) => withConfiguration(
7602
+ builder: (yargs44) => withConfiguration(
7303
7603
  withDebugOptions(
7304
7604
  withApiOptions(
7305
7605
  withProjectOptions(
7306
7606
  withStateOptions(
7307
- yargs43.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
7607
+ yargs44.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
7308
7608
  )
7309
7609
  )
7310
7610
  )
@@ -7317,14 +7617,14 @@ var EntryPatternUpdateModule = {
7317
7617
  var EntryPatternModule = {
7318
7618
  command: "entry-pattern <command>",
7319
7619
  describe: "Commands for Entry patterns",
7320
- builder: (yargs43) => yargs43.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
7620
+ builder: (yargs44) => yargs44.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
7321
7621
  handler: () => {
7322
- yargs14.help();
7622
+ yargs15.help();
7323
7623
  }
7324
7624
  };
7325
7625
 
7326
7626
  // src/commands/canvas/commands/label.ts
7327
- import yargs15 from "yargs";
7627
+ import yargs16 from "yargs";
7328
7628
 
7329
7629
  // src/commands/canvas/labelsEngineDataSource.ts
7330
7630
  function normalizeLabelForSync(label) {
@@ -7375,13 +7675,13 @@ function getLabelClient(options) {
7375
7675
  var LabelPullModule = {
7376
7676
  command: "pull <directory>",
7377
7677
  describe: "Pulls all labels to local files in a directory",
7378
- builder: (yargs43) => withConfiguration(
7678
+ builder: (yargs44) => withConfiguration(
7379
7679
  withDebugOptions(
7380
7680
  withApiOptions(
7381
7681
  withProjectOptions(
7382
7682
  withDiffOptions(
7383
7683
  withBatchSizeOptions(
7384
- yargs43.positional("directory", {
7684
+ yargs44.positional("directory", {
7385
7685
  describe: "Directory to save the labels to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
7386
7686
  type: "string"
7387
7687
  }).option("format", {
@@ -7470,13 +7770,13 @@ var __INTERNAL_MISSING_PARENT_LABEL_ERROR = "Parent label with public ID";
7470
7770
  var LabelPushModule = {
7471
7771
  command: "push <directory>",
7472
7772
  describe: "Pushes all labels from files in a directory to Uniform",
7473
- builder: (yargs43) => withConfiguration(
7773
+ builder: (yargs44) => withConfiguration(
7474
7774
  withDebugOptions(
7475
7775
  withApiOptions(
7476
7776
  withProjectOptions(
7477
7777
  withDiffOptions(
7478
7778
  withBatchSizeOptions(
7479
- yargs43.positional("directory", {
7779
+ yargs44.positional("directory", {
7480
7780
  describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
7481
7781
  type: "string"
7482
7782
  }).option("mode", {
@@ -7574,14 +7874,14 @@ var LabelPushModule = {
7574
7874
  var LabelModule = {
7575
7875
  command: "label <command>",
7576
7876
  describe: "Commands for label definitions",
7577
- builder: (yargs43) => yargs43.command(LabelPullModule).command(LabelPushModule),
7877
+ builder: (yargs44) => yargs44.command(LabelPullModule).command(LabelPushModule),
7578
7878
  handler: () => {
7579
- yargs15.help();
7879
+ yargs16.help();
7580
7880
  }
7581
7881
  };
7582
7882
 
7583
7883
  // src/commands/canvas/commands/locale.ts
7584
- import yargs16 from "yargs";
7884
+ import yargs17 from "yargs";
7585
7885
 
7586
7886
  // src/commands/canvas/localesEngineDataSource.ts
7587
7887
  function createLocaleEngineDataSource({
@@ -7623,12 +7923,12 @@ function getLocaleClient(options) {
7623
7923
  var LocalePullModule = {
7624
7924
  command: "pull <directory>",
7625
7925
  describe: "Pulls all locales to local files in a directory",
7626
- builder: (yargs43) => withConfiguration(
7926
+ builder: (yargs44) => withConfiguration(
7627
7927
  withDebugOptions(
7628
7928
  withApiOptions(
7629
7929
  withProjectOptions(
7630
7930
  withDiffOptions(
7631
- yargs43.positional("directory", {
7931
+ yargs44.positional("directory", {
7632
7932
  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.",
7633
7933
  type: "string"
7634
7934
  }).option("format", {
@@ -7708,12 +8008,12 @@ var LocalePullModule = {
7708
8008
  var LocalePushModule = {
7709
8009
  command: "push <directory>",
7710
8010
  describe: "Pushes all locales from files in a directory to Uniform",
7711
- builder: (yargs43) => withConfiguration(
8011
+ builder: (yargs44) => withConfiguration(
7712
8012
  withDebugOptions(
7713
8013
  withApiOptions(
7714
8014
  withProjectOptions(
7715
8015
  withDiffOptions(
7716
- yargs43.positional("directory", {
8016
+ yargs44.positional("directory", {
7717
8017
  describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
7718
8018
  type: "string"
7719
8019
  }).option("mode", {
@@ -7781,14 +8081,14 @@ var LocalePushModule = {
7781
8081
  var LocaleModule = {
7782
8082
  command: "locale <command>",
7783
8083
  describe: "Commands for locale definitions",
7784
- builder: (yargs43) => yargs43.command(LocalePullModule).command(LocalePushModule),
8084
+ builder: (yargs44) => yargs44.command(LocalePullModule).command(LocalePushModule),
7785
8085
  handler: () => {
7786
- yargs16.help();
8086
+ yargs17.help();
7787
8087
  }
7788
8088
  };
7789
8089
 
7790
8090
  // src/commands/canvas/commands/previewUrl.ts
7791
- import yargs17 from "yargs";
8091
+ import yargs18 from "yargs";
7792
8092
 
7793
8093
  // src/commands/canvas/commands/previewUrl/_util.ts
7794
8094
  import { PreviewClient } from "@uniformdev/canvas";
@@ -7802,12 +8102,12 @@ function getPreviewClient(options) {
7802
8102
  var PreviewUrlGetModule = {
7803
8103
  command: "get <id>",
7804
8104
  describe: "Fetch a preview URL",
7805
- builder: (yargs43) => withConfiguration(
8105
+ builder: (yargs44) => withConfiguration(
7806
8106
  withFormatOptions(
7807
8107
  withDebugOptions(
7808
8108
  withApiOptions(
7809
8109
  withProjectOptions(
7810
- yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
8110
+ yargs44.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
7811
8111
  )
7812
8112
  )
7813
8113
  )
@@ -7831,8 +8131,8 @@ var PreviewUrlListModule = {
7831
8131
  command: "list",
7832
8132
  describe: "List preview URLs",
7833
8133
  aliases: ["ls"],
7834
- builder: (yargs43) => withConfiguration(
7835
- withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs43.options({})))))
8134
+ builder: (yargs44) => withConfiguration(
8135
+ withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs44.options({})))))
7836
8136
  ),
7837
8137
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
7838
8138
  const fetch2 = nodeFetchProxy(proxy, verbose);
@@ -7874,12 +8174,12 @@ function createPreviewUrlEngineDataSource({
7874
8174
  var PreviewUrlPullModule = {
7875
8175
  command: "pull <directory>",
7876
8176
  describe: "Pulls all preview urls to local files in a directory",
7877
- builder: (yargs43) => withConfiguration(
8177
+ builder: (yargs44) => withConfiguration(
7878
8178
  withApiOptions(
7879
8179
  withProjectOptions(
7880
8180
  withDebugOptions(
7881
8181
  withDiffOptions(
7882
- yargs43.positional("directory", {
8182
+ yargs44.positional("directory", {
7883
8183
  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.",
7884
8184
  type: "string"
7885
8185
  }).option("format", {
@@ -7954,12 +8254,12 @@ var PreviewUrlPullModule = {
7954
8254
  var PreviewUrlPushModule = {
7955
8255
  command: "push <directory>",
7956
8256
  describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
7957
- builder: (yargs43) => withConfiguration(
8257
+ builder: (yargs44) => withConfiguration(
7958
8258
  withApiOptions(
7959
8259
  withProjectOptions(
7960
8260
  withDiffOptions(
7961
8261
  withDebugOptions(
7962
- yargs43.positional("directory", {
8262
+ yargs44.positional("directory", {
7963
8263
  describe: "Directory to read from. If a filename is used, a package will be read instead.",
7964
8264
  type: "string"
7965
8265
  }).option("mode", {
@@ -8023,11 +8323,11 @@ var PreviewUrlRemoveModule = {
8023
8323
  command: "remove <id>",
8024
8324
  aliases: ["delete", "rm"],
8025
8325
  describe: "Delete a preview URL",
8026
- builder: (yargs43) => withConfiguration(
8326
+ builder: (yargs44) => withConfiguration(
8027
8327
  withApiOptions(
8028
8328
  withDebugOptions(
8029
8329
  withProjectOptions(
8030
- yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
8330
+ yargs44.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
8031
8331
  )
8032
8332
  )
8033
8333
  )
@@ -8048,11 +8348,11 @@ var PreviewUrlUpdateModule = {
8048
8348
  command: "update <filename>",
8049
8349
  aliases: ["put"],
8050
8350
  describe: "Insert or update a preview URL",
8051
- builder: (yargs43) => withConfiguration(
8351
+ builder: (yargs44) => withConfiguration(
8052
8352
  withDebugOptions(
8053
8353
  withApiOptions(
8054
8354
  withProjectOptions(
8055
- yargs43.positional("filename", { demandOption: true, describe: "Category file to put" })
8355
+ yargs44.positional("filename", { demandOption: true, describe: "Category file to put" })
8056
8356
  )
8057
8357
  )
8058
8358
  )
@@ -8074,25 +8374,25 @@ var PreviewUrlModule = {
8074
8374
  command: "preview-url <command>",
8075
8375
  aliases: ["pu"],
8076
8376
  describe: "Commands for Canvas preview urls",
8077
- builder: (yargs43) => yargs43.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
8377
+ builder: (yargs44) => yargs44.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
8078
8378
  handler: () => {
8079
- yargs17.help();
8379
+ yargs18.help();
8080
8380
  }
8081
8381
  };
8082
8382
 
8083
8383
  // src/commands/canvas/commands/previewViewport.ts
8084
- import yargs18 from "yargs";
8384
+ import yargs19 from "yargs";
8085
8385
 
8086
8386
  // src/commands/canvas/commands/previewViewport/get.ts
8087
8387
  var PreviewViewportGetModule = {
8088
8388
  command: "get <id>",
8089
8389
  describe: "Fetch a preview viewport",
8090
- builder: (yargs43) => withConfiguration(
8390
+ builder: (yargs44) => withConfiguration(
8091
8391
  withFormatOptions(
8092
8392
  withDebugOptions(
8093
8393
  withApiOptions(
8094
8394
  withProjectOptions(
8095
- yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
8395
+ yargs44.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
8096
8396
  )
8097
8397
  )
8098
8398
  )
@@ -8116,8 +8416,8 @@ var PreviewViewportListModule = {
8116
8416
  command: "list",
8117
8417
  describe: "List preview viewports",
8118
8418
  aliases: ["ls"],
8119
- builder: (yargs43) => withConfiguration(
8120
- withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs43.options({})))))
8419
+ builder: (yargs44) => withConfiguration(
8420
+ withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs44.options({})))))
8121
8421
  ),
8122
8422
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
8123
8423
  const fetch2 = nodeFetchProxy(proxy, verbose);
@@ -8163,12 +8463,12 @@ function createPreviewViewportEngineDataSource({
8163
8463
  var PreviewViewportPullModule = {
8164
8464
  command: "pull <directory>",
8165
8465
  describe: "Pulls all preview viewports to local files in a directory",
8166
- builder: (yargs43) => withConfiguration(
8466
+ builder: (yargs44) => withConfiguration(
8167
8467
  withApiOptions(
8168
8468
  withProjectOptions(
8169
8469
  withDebugOptions(
8170
8470
  withDiffOptions(
8171
- yargs43.positional("directory", {
8471
+ yargs44.positional("directory", {
8172
8472
  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.",
8173
8473
  type: "string"
8174
8474
  }).option("format", {
@@ -8243,12 +8543,12 @@ var PreviewViewportPullModule = {
8243
8543
  var PreviewViewportPushModule = {
8244
8544
  command: "push <directory>",
8245
8545
  describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
8246
- builder: (yargs43) => withConfiguration(
8546
+ builder: (yargs44) => withConfiguration(
8247
8547
  withApiOptions(
8248
8548
  withProjectOptions(
8249
8549
  withDiffOptions(
8250
8550
  withDebugOptions(
8251
- yargs43.positional("directory", {
8551
+ yargs44.positional("directory", {
8252
8552
  describe: "Directory to read from. If a filename is used, a package will be read instead.",
8253
8553
  type: "string"
8254
8554
  }).option("mode", {
@@ -8312,11 +8612,11 @@ var PreviewViewportRemoveModule = {
8312
8612
  command: "remove <id>",
8313
8613
  aliases: ["delete", "rm"],
8314
8614
  describe: "Delete a preview viewport",
8315
- builder: (yargs43) => withConfiguration(
8615
+ builder: (yargs44) => withConfiguration(
8316
8616
  withApiOptions(
8317
8617
  withDebugOptions(
8318
8618
  withProjectOptions(
8319
- yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
8619
+ yargs44.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
8320
8620
  )
8321
8621
  )
8322
8622
  )
@@ -8337,11 +8637,11 @@ var PreviewViewportUpdateModule = {
8337
8637
  command: "update <filename>",
8338
8638
  aliases: ["put"],
8339
8639
  describe: "Insert or update a preview viewport",
8340
- builder: (yargs43) => withConfiguration(
8640
+ builder: (yargs44) => withConfiguration(
8341
8641
  withDebugOptions(
8342
8642
  withApiOptions(
8343
8643
  withProjectOptions(
8344
- yargs43.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
8644
+ yargs44.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
8345
8645
  )
8346
8646
  )
8347
8647
  )
@@ -8363,14 +8663,14 @@ var PreviewViewportModule = {
8363
8663
  command: "preview-viewport <command>",
8364
8664
  aliases: ["pv"],
8365
8665
  describe: "Commands for Canvas preview viewports",
8366
- builder: (yargs43) => yargs43.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
8666
+ builder: (yargs44) => yargs44.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
8367
8667
  handler: () => {
8368
- yargs18.help();
8668
+ yargs19.help();
8369
8669
  }
8370
8670
  };
8371
8671
 
8372
8672
  // src/commands/canvas/commands/prompts.ts
8373
- import yargs19 from "yargs";
8673
+ import yargs20 from "yargs";
8374
8674
 
8375
8675
  // src/commands/canvas/commands/prompts/_util.ts
8376
8676
  import { PromptClient } from "@uniformdev/canvas";
@@ -8382,12 +8682,12 @@ var getPromptClient = (options) => new PromptClient({ ...options, bypassCache: t
8382
8682
  var PromptGetModule = {
8383
8683
  command: "get <id>",
8384
8684
  describe: "Get a prompt",
8385
- builder: (yargs43) => withConfiguration(
8685
+ builder: (yargs44) => withConfiguration(
8386
8686
  withDebugOptions(
8387
8687
  withFormatOptions(
8388
8688
  withApiOptions(
8389
8689
  withProjectOptions(
8390
- yargs43.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
8690
+ yargs44.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
8391
8691
  )
8392
8692
  )
8393
8693
  )
@@ -8408,7 +8708,7 @@ var PromptGetModule = {
8408
8708
  var PromptListModule = {
8409
8709
  command: "list",
8410
8710
  describe: "List prompts",
8411
- builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
8711
+ builder: (yargs44) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs44))))),
8412
8712
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
8413
8713
  const fetch2 = nodeFetchProxy(proxy, verbose);
8414
8714
  const client = getPromptClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -8449,13 +8749,13 @@ function createPromptEngineDataSource({
8449
8749
  var PromptPullModule = {
8450
8750
  command: "pull <directory>",
8451
8751
  describe: "Pulls all prompts to local files in a directory",
8452
- builder: (yargs43) => withConfiguration(
8752
+ builder: (yargs44) => withConfiguration(
8453
8753
  withDebugOptions(
8454
8754
  withApiOptions(
8455
8755
  withProjectOptions(
8456
8756
  withStateOptions(
8457
8757
  withDiffOptions(
8458
- yargs43.positional("directory", {
8758
+ yargs44.positional("directory", {
8459
8759
  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.",
8460
8760
  type: "string"
8461
8761
  }).option("format", {
@@ -8536,12 +8836,12 @@ var PromptPullModule = {
8536
8836
  var PromptPushModule = {
8537
8837
  command: "push <directory>",
8538
8838
  describe: "Pushes all prompts from files in a directory to Uniform",
8539
- builder: (yargs43) => withConfiguration(
8839
+ builder: (yargs44) => withConfiguration(
8540
8840
  withApiOptions(
8541
8841
  withProjectOptions(
8542
8842
  withStateOptions(
8543
8843
  withDiffOptions(
8544
- yargs43.positional("directory", {
8844
+ yargs44.positional("directory", {
8545
8845
  describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
8546
8846
  type: "string"
8547
8847
  }).option("mode", {
@@ -8610,10 +8910,10 @@ var PromptRemoveModule = {
8610
8910
  command: "remove <id>",
8611
8911
  aliases: ["delete", "rm"],
8612
8912
  describe: "Delete a prompt",
8613
- builder: (yargs43) => withConfiguration(
8913
+ builder: (yargs44) => withConfiguration(
8614
8914
  withDebugOptions(
8615
8915
  withApiOptions(
8616
- withProjectOptions(yargs43.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
8916
+ withProjectOptions(yargs44.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
8617
8917
  )
8618
8918
  )
8619
8919
  ),
@@ -8633,11 +8933,11 @@ var PromptUpdateModule = {
8633
8933
  command: "update <filename>",
8634
8934
  aliases: ["put"],
8635
8935
  describe: "Insert or update a prompt",
8636
- builder: (yargs43) => withConfiguration(
8936
+ builder: (yargs44) => withConfiguration(
8637
8937
  withDebugOptions(
8638
8938
  withApiOptions(
8639
8939
  withProjectOptions(
8640
- yargs43.positional("filename", { demandOption: true, describe: "Prompt file to put" })
8940
+ yargs44.positional("filename", { demandOption: true, describe: "Prompt file to put" })
8641
8941
  )
8642
8942
  )
8643
8943
  )
@@ -8659,14 +8959,14 @@ var PromptModule = {
8659
8959
  command: "prompt <command>",
8660
8960
  aliases: ["dt"],
8661
8961
  describe: "Commands for AI Prompt definitions",
8662
- builder: (yargs43) => yargs43.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
8962
+ builder: (yargs44) => yargs44.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
8663
8963
  handler: () => {
8664
- yargs19.help();
8964
+ yargs20.help();
8665
8965
  }
8666
8966
  };
8667
8967
 
8668
8968
  // src/commands/canvas/commands/workflow.ts
8669
- import yargs20 from "yargs";
8969
+ import yargs21 from "yargs";
8670
8970
 
8671
8971
  // src/commands/canvas/commands/workflow/_util.ts
8672
8972
  import { WorkflowClient } from "@uniformdev/canvas";
@@ -8713,13 +9013,13 @@ function createWorkflowEngineDataSource({
8713
9013
  var WorkflowPullModule = {
8714
9014
  command: "pull <directory>",
8715
9015
  describe: "Pulls all workflows to local files in a directory",
8716
- builder: (yargs43) => withConfiguration(
9016
+ builder: (yargs44) => withConfiguration(
8717
9017
  withApiOptions(
8718
9018
  withDebugOptions(
8719
9019
  withProjectOptions(
8720
9020
  withDiffOptions(
8721
9021
  withBatchSizeOptions(
8722
- yargs43.positional("directory", {
9022
+ yargs44.positional("directory", {
8723
9023
  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.",
8724
9024
  type: "string"
8725
9025
  }).option("format", {
@@ -8801,13 +9101,13 @@ var WorkflowPullModule = {
8801
9101
  var WorkflowPushModule = {
8802
9102
  command: "push <directory>",
8803
9103
  describe: "Pushes all workflows from files in a directory to Uniform Canvas",
8804
- builder: (yargs43) => withConfiguration(
9104
+ builder: (yargs44) => withConfiguration(
8805
9105
  withDebugOptions(
8806
9106
  withApiOptions(
8807
9107
  withProjectOptions(
8808
9108
  withDiffOptions(
8809
9109
  withBatchSizeOptions(
8810
- yargs43.positional("directory", {
9110
+ yargs44.positional("directory", {
8811
9111
  describe: "Directory to read from. If a filename is used, a package will be read instead.",
8812
9112
  type: "string"
8813
9113
  }).option("mode", {
@@ -8878,9 +9178,9 @@ var WorkflowModule = {
8878
9178
  command: "workflow <command>",
8879
9179
  aliases: ["wf"],
8880
9180
  describe: "Commands for Canvas workflows",
8881
- builder: (yargs43) => yargs43.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
9181
+ builder: (yargs44) => yargs44.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
8882
9182
  handler: () => {
8883
- yargs20.help();
9183
+ yargs21.help();
8884
9184
  }
8885
9185
  };
8886
9186
 
@@ -8889,17 +9189,17 @@ var CanvasCommand = {
8889
9189
  command: "canvas <command>",
8890
9190
  aliases: ["cv", "pm", "presentation"],
8891
9191
  describe: "Uniform Canvas commands",
8892
- builder: (yargs43) => yargs43.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(ComponentPatternModule).command(CompositionPatternModule).command(ContentTypeModule).command(EntryModule).command(EntryPatternModule).command(PromptModule).command(AssetModule).command(LabelModule).command(LocaleModule).command(WorkflowModule).command(PreviewUrlModule).command(PreviewViewportModule).demandCommand(),
9192
+ builder: (yargs44) => yargs44.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(ComponentPatternModule).command(CompositionPatternModule).command(ContentTypeModule).command(EntryModule).command(EntryPatternModule).command(PromptModule).command(AssetModule).command(LabelModule).command(LocaleModule).command(WorkflowModule).command(PreviewUrlModule).command(PreviewViewportModule).demandCommand(),
8893
9193
  handler: () => {
8894
- yargs21.showHelp();
9194
+ yargs22.showHelp();
8895
9195
  }
8896
9196
  };
8897
9197
 
8898
9198
  // src/commands/context/index.ts
8899
- import yargs28 from "yargs";
9199
+ import yargs29 from "yargs";
8900
9200
 
8901
9201
  // src/commands/context/commands/aggregate.ts
8902
- import yargs22 from "yargs";
9202
+ import yargs23 from "yargs";
8903
9203
 
8904
9204
  // src/commands/context/commands/aggregate/_util.ts
8905
9205
  import { AggregateClient } from "@uniformdev/context/api";
@@ -8911,11 +9211,11 @@ var getAggregateClient = (options) => new AggregateClient({ ...options, bypassCa
8911
9211
  var AggregateGetModule = {
8912
9212
  command: "get <id>",
8913
9213
  describe: "Fetch an aggregate",
8914
- builder: (yargs43) => withConfiguration(
9214
+ builder: (yargs44) => withConfiguration(
8915
9215
  withFormatOptions(
8916
9216
  withApiOptions(
8917
9217
  withProjectOptions(
8918
- yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
9218
+ yargs44.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
8919
9219
  )
8920
9220
  )
8921
9221
  )
@@ -8938,7 +9238,7 @@ var AggregateListModule = {
8938
9238
  command: "list",
8939
9239
  describe: "List aggregates",
8940
9240
  aliases: ["ls"],
8941
- builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
9241
+ builder: (yargs44) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs44)))),
8942
9242
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
8943
9243
  const fetch2 = nodeFetchProxy(proxy);
8944
9244
  const client = getAggregateClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -9001,12 +9301,12 @@ function writeContextPackage(filename, packageContents) {
9001
9301
  var AggregatePullModule = {
9002
9302
  command: "pull <directory>",
9003
9303
  describe: "Pulls all aggregates to local files in a directory",
9004
- builder: (yargs43) => withConfiguration(
9304
+ builder: (yargs44) => withConfiguration(
9005
9305
  withApiOptions(
9006
9306
  withDebugOptions(
9007
9307
  withProjectOptions(
9008
9308
  withDiffOptions(
9009
- yargs43.positional("directory", {
9309
+ yargs44.positional("directory", {
9010
9310
  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.",
9011
9311
  type: "string"
9012
9312
  }).option("format", {
@@ -9081,12 +9381,12 @@ var AggregatePullModule = {
9081
9381
  var AggregatePushModule = {
9082
9382
  command: "push <directory>",
9083
9383
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
9084
- builder: (yargs43) => withConfiguration(
9384
+ builder: (yargs44) => withConfiguration(
9085
9385
  withApiOptions(
9086
9386
  withProjectOptions(
9087
9387
  withDiffOptions(
9088
9388
  withDebugOptions(
9089
- yargs43.positional("directory", {
9389
+ yargs44.positional("directory", {
9090
9390
  describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
9091
9391
  type: "string"
9092
9392
  }).option("mode", {
@@ -9151,10 +9451,10 @@ var AggregateRemoveModule = {
9151
9451
  command: "remove <id>",
9152
9452
  aliases: ["delete", "rm"],
9153
9453
  describe: "Delete an aggregate",
9154
- builder: (yargs43) => withConfiguration(
9454
+ builder: (yargs44) => withConfiguration(
9155
9455
  withApiOptions(
9156
9456
  withProjectOptions(
9157
- yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
9457
+ yargs44.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
9158
9458
  )
9159
9459
  )
9160
9460
  ),
@@ -9170,10 +9470,10 @@ var AggregateUpdateModule = {
9170
9470
  command: "update <filename>",
9171
9471
  aliases: ["put"],
9172
9472
  describe: "Insert or update an aggregate",
9173
- builder: (yargs43) => withConfiguration(
9473
+ builder: (yargs44) => withConfiguration(
9174
9474
  withApiOptions(
9175
9475
  withProjectOptions(
9176
- yargs43.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
9476
+ yargs44.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
9177
9477
  )
9178
9478
  )
9179
9479
  ),
@@ -9190,14 +9490,14 @@ var AggregateModule = {
9190
9490
  command: "aggregate <command>",
9191
9491
  aliases: ["agg", "intent", "audience"],
9192
9492
  describe: "Commands for Context aggregates (intents, audiences)",
9193
- builder: (yargs43) => yargs43.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
9493
+ builder: (yargs44) => yargs44.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
9194
9494
  handler: () => {
9195
- yargs22.help();
9495
+ yargs23.help();
9196
9496
  }
9197
9497
  };
9198
9498
 
9199
9499
  // src/commands/context/commands/enrichment.ts
9200
- import yargs23 from "yargs";
9500
+ import yargs24 from "yargs";
9201
9501
 
9202
9502
  // src/commands/context/commands/enrichment/_util.ts
9203
9503
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
@@ -9211,11 +9511,11 @@ function getEnrichmentClient(options) {
9211
9511
  var EnrichmentGetModule = {
9212
9512
  command: "get <id>",
9213
9513
  describe: "Fetch an enrichment category and its values",
9214
- builder: (yargs43) => withFormatOptions(
9514
+ builder: (yargs44) => withFormatOptions(
9215
9515
  withConfiguration(
9216
9516
  withApiOptions(
9217
9517
  withProjectOptions(
9218
- yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
9518
+ yargs44.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
9219
9519
  )
9220
9520
  )
9221
9521
  )
@@ -9238,7 +9538,7 @@ var EnrichmentListModule = {
9238
9538
  command: "list",
9239
9539
  describe: "List enrichments",
9240
9540
  aliases: ["ls"],
9241
- builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
9541
+ builder: (yargs44) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs44)))),
9242
9542
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
9243
9543
  const fetch2 = nodeFetchProxy(proxy);
9244
9544
  const client = getEnrichmentClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -9333,12 +9633,12 @@ var createEnrichmentValueEngineDataSource = ({
9333
9633
  var EnrichmentPullModule = {
9334
9634
  command: "pull <directory>",
9335
9635
  describe: "Pulls all enrichments to local files in a directory",
9336
- builder: (yargs43) => withConfiguration(
9636
+ builder: (yargs44) => withConfiguration(
9337
9637
  withDebugOptions(
9338
9638
  withApiOptions(
9339
9639
  withProjectOptions(
9340
9640
  withDiffOptions(
9341
- yargs43.positional("directory", {
9641
+ yargs44.positional("directory", {
9342
9642
  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.",
9343
9643
  type: "string"
9344
9644
  }).option("format", {
@@ -9413,11 +9713,11 @@ var EnrichmentPullModule = {
9413
9713
  var EnrichmentPushModule = {
9414
9714
  command: "push <directory>",
9415
9715
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
9416
- builder: (yargs43) => withConfiguration(
9716
+ builder: (yargs44) => withConfiguration(
9417
9717
  withApiOptions(
9418
9718
  withProjectOptions(
9419
9719
  withDiffOptions(
9420
- yargs43.positional("directory", {
9720
+ yargs44.positional("directory", {
9421
9721
  describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
9422
9722
  type: "string"
9423
9723
  }).option("mode", {
@@ -9480,10 +9780,10 @@ var EnrichmentRemoveModule = {
9480
9780
  command: "remove <id>",
9481
9781
  aliases: ["delete", "rm"],
9482
9782
  describe: "Delete an enrichment category and its values",
9483
- builder: (yargs43) => withConfiguration(
9783
+ builder: (yargs44) => withConfiguration(
9484
9784
  withApiOptions(
9485
9785
  withProjectOptions(
9486
- yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
9786
+ yargs44.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
9487
9787
  )
9488
9788
  )
9489
9789
  ),
@@ -9499,14 +9799,14 @@ var EnrichmentModule = {
9499
9799
  command: "enrichment <command>",
9500
9800
  aliases: ["enr"],
9501
9801
  describe: "Commands for Context enrichments",
9502
- builder: (yargs43) => yargs43.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
9802
+ builder: (yargs44) => yargs44.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
9503
9803
  handler: () => {
9504
- yargs23.help();
9804
+ yargs24.help();
9505
9805
  }
9506
9806
  };
9507
9807
 
9508
9808
  // src/commands/context/commands/manifest.ts
9509
- import yargs24 from "yargs";
9809
+ import yargs25 from "yargs";
9510
9810
 
9511
9811
  // src/commands/context/commands/manifest/get.ts
9512
9812
  import { ApiClientError as ApiClientError5, UncachedManifestClient } from "@uniformdev/context/api";
@@ -9517,10 +9817,10 @@ var ManifestGetModule = {
9517
9817
  command: "get [output]",
9518
9818
  aliases: ["dl", "download"],
9519
9819
  describe: "Download the Uniform Context manifest for a project",
9520
- builder: (yargs43) => withConfiguration(
9820
+ builder: (yargs44) => withConfiguration(
9521
9821
  withApiOptions(
9522
9822
  withProjectOptions(
9523
- yargs43.option("preview", {
9823
+ yargs44.option("preview", {
9524
9824
  describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
9525
9825
  default: false,
9526
9826
  type: "boolean",
@@ -9582,7 +9882,7 @@ import { exit as exit2 } from "process";
9582
9882
  var ManifestPublishModule = {
9583
9883
  command: "publish",
9584
9884
  describe: "Publish the Uniform Context manifest for a project",
9585
- builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(yargs43))),
9885
+ builder: (yargs44) => withConfiguration(withApiOptions(withProjectOptions(yargs44))),
9586
9886
  handler: async ({ apiKey, apiHost, proxy, project }) => {
9587
9887
  const fetch2 = nodeFetchProxy(proxy);
9588
9888
  try {
@@ -9615,25 +9915,25 @@ var ManifestModule = {
9615
9915
  command: "manifest <command>",
9616
9916
  describe: "Commands for context manifests",
9617
9917
  aliases: ["man"],
9618
- builder: (yargs43) => yargs43.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
9918
+ builder: (yargs44) => yargs44.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
9619
9919
  handler: () => {
9620
- yargs24.help();
9920
+ yargs25.help();
9621
9921
  }
9622
9922
  };
9623
9923
 
9624
9924
  // src/commands/context/commands/quirk.ts
9625
- import yargs25 from "yargs";
9925
+ import yargs26 from "yargs";
9626
9926
 
9627
9927
  // src/commands/context/commands/quirk/get.ts
9628
9928
  import { UncachedQuirkClient } from "@uniformdev/context/api";
9629
9929
  var QuirkGetModule = {
9630
9930
  command: "get <id>",
9631
9931
  describe: "Fetch a quirk",
9632
- builder: (yargs43) => withConfiguration(
9932
+ builder: (yargs44) => withConfiguration(
9633
9933
  withFormatOptions(
9634
9934
  withApiOptions(
9635
9935
  withProjectOptions(
9636
- yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
9936
+ yargs44.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
9637
9937
  )
9638
9938
  )
9639
9939
  )
@@ -9657,11 +9957,11 @@ var QuirkListModule = {
9657
9957
  command: "list",
9658
9958
  describe: "List quirks",
9659
9959
  aliases: ["ls"],
9660
- builder: (yargs43) => withConfiguration(
9960
+ builder: (yargs44) => withConfiguration(
9661
9961
  withFormatOptions(
9662
9962
  withApiOptions(
9663
9963
  withProjectOptions(
9664
- yargs43.option("withIntegrations", {
9964
+ yargs44.option("withIntegrations", {
9665
9965
  alias: ["i"],
9666
9966
  describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
9667
9967
  type: "boolean"
@@ -9719,12 +10019,12 @@ function createQuirkEngineDataSource({
9719
10019
  var QuirkPullModule = {
9720
10020
  command: "pull <directory>",
9721
10021
  describe: "Pulls all quirks to local files in a directory",
9722
- builder: (yargs43) => withConfiguration(
10022
+ builder: (yargs44) => withConfiguration(
9723
10023
  withDebugOptions(
9724
10024
  withApiOptions(
9725
10025
  withProjectOptions(
9726
10026
  withDiffOptions(
9727
- yargs43.positional("directory", {
10027
+ yargs44.positional("directory", {
9728
10028
  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.",
9729
10029
  type: "string"
9730
10030
  }).option("format", {
@@ -9800,12 +10100,12 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
9800
10100
  var QuirkPushModule = {
9801
10101
  command: "push <directory>",
9802
10102
  describe: "Pushes all quirks from files in a directory or package to Uniform",
9803
- builder: (yargs43) => withConfiguration(
10103
+ builder: (yargs44) => withConfiguration(
9804
10104
  withDebugOptions(
9805
10105
  withApiOptions(
9806
10106
  withProjectOptions(
9807
10107
  withDiffOptions(
9808
- yargs43.positional("directory", {
10108
+ yargs44.positional("directory", {
9809
10109
  describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
9810
10110
  type: "string"
9811
10111
  }).option("mode", {
@@ -9870,10 +10170,10 @@ var QuirkRemoveModule = {
9870
10170
  command: "remove <id>",
9871
10171
  aliases: ["delete", "rm"],
9872
10172
  describe: "Delete a quirk",
9873
- builder: (yargs43) => withConfiguration(
10173
+ builder: (yargs44) => withConfiguration(
9874
10174
  withApiOptions(
9875
10175
  withProjectOptions(
9876
- yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
10176
+ yargs44.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
9877
10177
  )
9878
10178
  )
9879
10179
  ),
@@ -9890,10 +10190,10 @@ var QuirkUpdateModule = {
9890
10190
  command: "update <filename>",
9891
10191
  aliases: ["put"],
9892
10192
  describe: "Insert or update a quirk",
9893
- builder: (yargs43) => withConfiguration(
10193
+ builder: (yargs44) => withConfiguration(
9894
10194
  withApiOptions(
9895
10195
  withProjectOptions(
9896
- yargs43.positional("filename", { demandOption: true, describe: "Quirk file to put" })
10196
+ yargs44.positional("filename", { demandOption: true, describe: "Quirk file to put" })
9897
10197
  )
9898
10198
  )
9899
10199
  ),
@@ -9910,25 +10210,25 @@ var QuirkModule = {
9910
10210
  command: "quirk <command>",
9911
10211
  aliases: ["qk"],
9912
10212
  describe: "Commands for Context quirks",
9913
- builder: (yargs43) => yargs43.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
10213
+ builder: (yargs44) => yargs44.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
9914
10214
  handler: () => {
9915
- yargs25.help();
10215
+ yargs26.help();
9916
10216
  }
9917
10217
  };
9918
10218
 
9919
10219
  // src/commands/context/commands/signal.ts
9920
- import yargs26 from "yargs";
10220
+ import yargs27 from "yargs";
9921
10221
 
9922
10222
  // src/commands/context/commands/signal/get.ts
9923
10223
  import { UncachedSignalClient } from "@uniformdev/context/api";
9924
10224
  var SignalGetModule = {
9925
10225
  command: "get <id>",
9926
10226
  describe: "Fetch a signal",
9927
- builder: (yargs43) => withConfiguration(
10227
+ builder: (yargs44) => withConfiguration(
9928
10228
  withFormatOptions(
9929
10229
  withApiOptions(
9930
10230
  withProjectOptions(
9931
- yargs43.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
10231
+ yargs44.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
9932
10232
  )
9933
10233
  )
9934
10234
  )
@@ -9952,7 +10252,7 @@ var SignalListModule = {
9952
10252
  command: "list",
9953
10253
  describe: "List signals",
9954
10254
  aliases: ["ls"],
9955
- builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
10255
+ builder: (yargs44) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs44)))),
9956
10256
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
9957
10257
  const fetch2 = nodeFetchProxy(proxy);
9958
10258
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -10002,12 +10302,12 @@ function createSignalEngineDataSource({
10002
10302
  var SignalPullModule = {
10003
10303
  command: "pull <directory>",
10004
10304
  describe: "Pulls all signals to local files in a directory",
10005
- builder: (yargs43) => withConfiguration(
10305
+ builder: (yargs44) => withConfiguration(
10006
10306
  withDebugOptions(
10007
10307
  withApiOptions(
10008
10308
  withProjectOptions(
10009
10309
  withDiffOptions(
10010
- yargs43.positional("directory", {
10310
+ yargs44.positional("directory", {
10011
10311
  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.",
10012
10312
  type: "string"
10013
10313
  }).option("format", {
@@ -10083,12 +10383,12 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
10083
10383
  var SignalPushModule = {
10084
10384
  command: "push <directory>",
10085
10385
  describe: "Pushes all signals from files in a directory or package to Uniform",
10086
- builder: (yargs43) => withConfiguration(
10386
+ builder: (yargs44) => withConfiguration(
10087
10387
  withDebugOptions(
10088
10388
  withApiOptions(
10089
10389
  withProjectOptions(
10090
10390
  withDiffOptions(
10091
- yargs43.positional("directory", {
10391
+ yargs44.positional("directory", {
10092
10392
  describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
10093
10393
  type: "string"
10094
10394
  }).option("mode", {
@@ -10153,10 +10453,10 @@ var SignalRemoveModule = {
10153
10453
  command: "remove <id>",
10154
10454
  aliases: ["delete", "rm"],
10155
10455
  describe: "Delete a signal",
10156
- builder: (yargs43) => withConfiguration(
10456
+ builder: (yargs44) => withConfiguration(
10157
10457
  withApiOptions(
10158
10458
  withProjectOptions(
10159
- yargs43.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
10459
+ yargs44.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
10160
10460
  )
10161
10461
  )
10162
10462
  ),
@@ -10173,10 +10473,10 @@ var SignalUpdateModule = {
10173
10473
  command: "update <filename>",
10174
10474
  aliases: ["put"],
10175
10475
  describe: "Insert or update a signal",
10176
- builder: (yargs43) => withConfiguration(
10476
+ builder: (yargs44) => withConfiguration(
10177
10477
  withApiOptions(
10178
10478
  withProjectOptions(
10179
- yargs43.positional("filename", { demandOption: true, describe: "Signal file to put" })
10479
+ yargs44.positional("filename", { demandOption: true, describe: "Signal file to put" })
10180
10480
  )
10181
10481
  )
10182
10482
  ),
@@ -10193,25 +10493,25 @@ var SignalModule = {
10193
10493
  command: "signal <command>",
10194
10494
  aliases: ["sig"],
10195
10495
  describe: "Commands for Context signals",
10196
- builder: (yargs43) => yargs43.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
10496
+ builder: (yargs44) => yargs44.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
10197
10497
  handler: () => {
10198
- yargs26.help();
10498
+ yargs27.help();
10199
10499
  }
10200
10500
  };
10201
10501
 
10202
10502
  // src/commands/context/commands/test.ts
10203
- import yargs27 from "yargs";
10503
+ import yargs28 from "yargs";
10204
10504
 
10205
10505
  // src/commands/context/commands/test/get.ts
10206
10506
  import { UncachedTestClient } from "@uniformdev/context/api";
10207
10507
  var TestGetModule = {
10208
10508
  command: "get <id>",
10209
10509
  describe: "Fetch a test",
10210
- builder: (yargs43) => withConfiguration(
10510
+ builder: (yargs44) => withConfiguration(
10211
10511
  withFormatOptions(
10212
10512
  withApiOptions(
10213
10513
  withProjectOptions(
10214
- yargs43.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
10514
+ yargs44.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
10215
10515
  )
10216
10516
  )
10217
10517
  )
@@ -10235,7 +10535,7 @@ var TestListModule = {
10235
10535
  command: "list",
10236
10536
  describe: "List tests",
10237
10537
  aliases: ["ls"],
10238
- builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
10538
+ builder: (yargs44) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs44)))),
10239
10539
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
10240
10540
  const fetch2 = nodeFetchProxy(proxy);
10241
10541
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -10285,12 +10585,12 @@ function createTestEngineDataSource({
10285
10585
  var TestPullModule = {
10286
10586
  command: "pull <directory>",
10287
10587
  describe: "Pulls all tests to local files in a directory",
10288
- builder: (yargs43) => withConfiguration(
10588
+ builder: (yargs44) => withConfiguration(
10289
10589
  withDebugOptions(
10290
10590
  withApiOptions(
10291
10591
  withProjectOptions(
10292
10592
  withDiffOptions(
10293
- yargs43.positional("directory", {
10593
+ yargs44.positional("directory", {
10294
10594
  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.",
10295
10595
  type: "string"
10296
10596
  }).option("format", {
@@ -10366,12 +10666,12 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
10366
10666
  var TestPushModule = {
10367
10667
  command: "push <directory>",
10368
10668
  describe: "Pushes all tests from files in a directory or package to Uniform",
10369
- builder: (yargs43) => withConfiguration(
10669
+ builder: (yargs44) => withConfiguration(
10370
10670
  withDebugOptions(
10371
10671
  withApiOptions(
10372
10672
  withProjectOptions(
10373
10673
  withDiffOptions(
10374
- yargs43.positional("directory", {
10674
+ yargs44.positional("directory", {
10375
10675
  describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
10376
10676
  type: "string"
10377
10677
  }).option("mode", {
@@ -10436,10 +10736,10 @@ var TestRemoveModule = {
10436
10736
  command: "remove <id>",
10437
10737
  aliases: ["delete", "rm"],
10438
10738
  describe: "Delete a test",
10439
- builder: (yargs43) => withConfiguration(
10739
+ builder: (yargs44) => withConfiguration(
10440
10740
  withApiOptions(
10441
10741
  withProjectOptions(
10442
- yargs43.positional("id", { demandOption: true, describe: "Test public ID to delete" })
10742
+ yargs44.positional("id", { demandOption: true, describe: "Test public ID to delete" })
10443
10743
  )
10444
10744
  )
10445
10745
  ),
@@ -10456,9 +10756,9 @@ var TestUpdateModule = {
10456
10756
  command: "update <filename>",
10457
10757
  aliases: ["put"],
10458
10758
  describe: "Insert or update a test",
10459
- builder: (yargs43) => withConfiguration(
10759
+ builder: (yargs44) => withConfiguration(
10460
10760
  withApiOptions(
10461
- withProjectOptions(yargs43.positional("filename", { demandOption: true, describe: "Test file to put" }))
10761
+ withProjectOptions(yargs44.positional("filename", { demandOption: true, describe: "Test file to put" }))
10462
10762
  )
10463
10763
  ),
10464
10764
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -10473,9 +10773,9 @@ var TestUpdateModule = {
10473
10773
  var TestModule = {
10474
10774
  command: "test <command>",
10475
10775
  describe: "Commands for Context A/B tests",
10476
- builder: (yargs43) => yargs43.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
10776
+ builder: (yargs44) => yargs44.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
10477
10777
  handler: () => {
10478
- yargs27.help();
10778
+ yargs28.help();
10479
10779
  }
10480
10780
  };
10481
10781
 
@@ -10484,56 +10784,23 @@ var ContextCommand = {
10484
10784
  command: "context <command>",
10485
10785
  aliases: ["ctx"],
10486
10786
  describe: "Uniform Context commands",
10487
- builder: (yargs43) => yargs43.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
10787
+ builder: (yargs44) => yargs44.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
10488
10788
  handler: () => {
10489
- yargs28.showHelp();
10789
+ yargs29.showHelp();
10490
10790
  }
10491
10791
  };
10492
10792
 
10493
10793
  // src/commands/integration/index.ts
10494
- import yargs33 from "yargs";
10794
+ import yargs34 from "yargs";
10495
10795
 
10496
10796
  // src/commands/integration/commands/definition.ts
10497
- import yargs32 from "yargs";
10797
+ import yargs33 from "yargs";
10498
10798
 
10499
10799
  // src/commands/integration/commands/definition/dataResourceEditor/dataResourceEditor.ts
10500
- import yargs29 from "yargs";
10800
+ import yargs30 from "yargs";
10501
10801
 
10502
10802
  // src/commands/integration/commands/definition/dataResourceEditor/deploy.ts
10503
- import { readFileSync as readFileSync2 } from "fs";
10504
-
10505
- // src/commands/integration/commands/definition/bundleWorkerCode.ts
10506
- import esbuild from "esbuild";
10507
- import path5 from "path";
10508
- async function bundleWorkerCode(entryFile) {
10509
- const result = await esbuild.build({
10510
- entryPoints: [entryFile],
10511
- bundle: true,
10512
- // Don't write to disk, build to memory
10513
- write: false,
10514
- format: "esm",
10515
- target: "es2021",
10516
- platform: "browser",
10517
- minify: true,
10518
- // Force inlining of all dependencies
10519
- external: [],
10520
- // Ensure single file output
10521
- splitting: false,
10522
- sourcemap: false
10523
- });
10524
- const outputFiles = result.outputFiles;
10525
- if (!outputFiles || outputFiles.length === 0) {
10526
- throw new Error(`No output generated for ${entryFile}`);
10527
- }
10528
- const outputFile = outputFiles[0];
10529
- const builtCode = outputFile.text;
10530
- console.log(
10531
- `\u2139\uFE0F ${path5.basename(entryFile)} was prepared with esbuild. Size: ${Math.round(
10532
- builtCode.length / 1024
10533
- )}kb (use --skipBundle to disable)`
10534
- );
10535
- return builtCode;
10536
- }
10803
+ import { readFileSync as readFileSync3 } from "fs";
10537
10804
 
10538
10805
  // src/commands/integration/commands/definition/edgehancer/EdgehancerClient.ts
10539
10806
  import { createLimitPolicy as createLimitPolicy2 } from "@uniformdev/canvas";
@@ -10568,8 +10835,8 @@ var EdgehancerClient = class extends ApiClient {
10568
10835
  };
10569
10836
 
10570
10837
  // src/commands/integration/commands/definition/dataResourceEditor/util.ts
10571
- function withDataResourceEditorIdOptions(yargs43) {
10572
- return yargs43.option("connectorType", {
10838
+ function withDataResourceEditorIdOptions(yargs44) {
10839
+ return yargs44.option("connectorType", {
10573
10840
  describe: "Integration data connector type to attach the data resource editor to, as defined in the integration manifest file.",
10574
10841
  demandOption: true,
10575
10842
  type: "string"
@@ -10589,11 +10856,11 @@ function withDataResourceEditorIdOptions(yargs43) {
10589
10856
  var IntegrationDataResourceEditorDeployModule = {
10590
10857
  command: "deploy <filename>",
10591
10858
  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.",
10592
- builder: (yargs43) => withConfiguration(
10859
+ builder: (yargs44) => withConfiguration(
10593
10860
  withApiOptions(
10594
10861
  withTeamOptions(
10595
10862
  withDataResourceEditorIdOptions(
10596
- yargs43.positional("filename", {
10863
+ yargs44.positional("filename", {
10597
10864
  demandOption: true,
10598
10865
  describe: "ESM code file to run for the target data resource editor hook. Refer to the documentation for expected types."
10599
10866
  }).option("compatibilityDate", {
@@ -10624,7 +10891,7 @@ var IntegrationDataResourceEditorDeployModule = {
10624
10891
  const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
10625
10892
  let code;
10626
10893
  if (skipBundle) {
10627
- code = readFileSync2(filename, "utf8");
10894
+ code = readFileSync3(filename, "utf8");
10628
10895
  } else {
10629
10896
  code = await bundleWorkerCode(filename);
10630
10897
  }
@@ -10636,7 +10903,7 @@ var IntegrationDataResourceEditorDeployModule = {
10636
10903
  var IntegrationDataResourceEditorRemoveModule = {
10637
10904
  command: "remove",
10638
10905
  describe: "Removes a custom AI data resource editor hook from a data resource archetype. The API key used must have team admin permissions.",
10639
- builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withDataResourceEditorIdOptions(yargs43)))),
10906
+ builder: (yargs44) => withConfiguration(withApiOptions(withTeamOptions(withDataResourceEditorIdOptions(yargs44)))),
10640
10907
  handler: async ({ apiHost, apiKey, proxy, team: teamId, connectorType, archetype, hook }) => {
10641
10908
  const fetch2 = nodeFetchProxy(proxy);
10642
10909
  const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
@@ -10648,21 +10915,21 @@ var IntegrationDataResourceEditorRemoveModule = {
10648
10915
  var IntegrationDataResourceEditorModule = {
10649
10916
  command: "dataResourceEditor <command>",
10650
10917
  describe: "Commands for managing custom AI data resource editors at the team level.",
10651
- builder: (yargs43) => yargs43.command(IntegrationDataResourceEditorDeployModule).command(IntegrationDataResourceEditorRemoveModule).demandCommand(),
10918
+ builder: (yargs44) => yargs44.command(IntegrationDataResourceEditorDeployModule).command(IntegrationDataResourceEditorRemoveModule).demandCommand(),
10652
10919
  handler: () => {
10653
- yargs29.help();
10920
+ yargs30.help();
10654
10921
  }
10655
10922
  };
10656
10923
 
10657
10924
  // src/commands/integration/commands/definition/edgehancer/edgehancer.ts
10658
- import yargs30 from "yargs";
10925
+ import yargs31 from "yargs";
10659
10926
 
10660
10927
  // src/commands/integration/commands/definition/edgehancer/deploy.ts
10661
- import { readFileSync as readFileSync3 } from "fs";
10928
+ import { readFileSync as readFileSync4 } from "fs";
10662
10929
 
10663
10930
  // src/commands/integration/commands/definition/edgehancer/util.ts
10664
- function withEdgehancerIdOptions(yargs43) {
10665
- return yargs43.option("connectorType", {
10931
+ function withEdgehancerIdOptions(yargs44) {
10932
+ return yargs44.option("connectorType", {
10666
10933
  describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
10667
10934
  demandOption: true,
10668
10935
  type: "string"
@@ -10682,11 +10949,11 @@ function withEdgehancerIdOptions(yargs43) {
10682
10949
  var IntegrationEdgehancerDeployModule = {
10683
10950
  command: "deploy <filename>",
10684
10951
  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.",
10685
- builder: (yargs43) => withConfiguration(
10952
+ builder: (yargs44) => withConfiguration(
10686
10953
  withApiOptions(
10687
10954
  withTeamOptions(
10688
10955
  withEdgehancerIdOptions(
10689
- yargs43.positional("filename", {
10956
+ yargs44.positional("filename", {
10690
10957
  demandOption: true,
10691
10958
  describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
10692
10959
  }).option("compatibilityDate", {
@@ -10717,7 +10984,7 @@ var IntegrationEdgehancerDeployModule = {
10717
10984
  const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
10718
10985
  let code;
10719
10986
  if (skipBundle) {
10720
- code = readFileSync3(filename, "utf8");
10987
+ code = readFileSync4(filename, "utf8");
10721
10988
  } else {
10722
10989
  code = await bundleWorkerCode(filename);
10723
10990
  }
@@ -10729,7 +10996,7 @@ var IntegrationEdgehancerDeployModule = {
10729
10996
  var IntegrationEdgehancerRemoveModule = {
10730
10997
  command: "remove",
10731
10998
  describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
10732
- builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs43)))),
10999
+ builder: (yargs44) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs44)))),
10733
11000
  handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
10734
11001
  const fetch2 = nodeFetchProxy(proxy);
10735
11002
  const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
@@ -10741,22 +11008,22 @@ var IntegrationEdgehancerRemoveModule = {
10741
11008
  var IntegrationEdgehancerModule = {
10742
11009
  command: "edgehancer <command>",
10743
11010
  describe: "Commands for managing custom integration edgehancers at the team level.",
10744
- builder: (yargs43) => yargs43.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
11011
+ builder: (yargs44) => yargs44.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
10745
11012
  handler: () => {
10746
- yargs30.help();
11013
+ yargs31.help();
10747
11014
  }
10748
11015
  };
10749
11016
 
10750
11017
  // src/commands/integration/commands/definition/propertyEditor/propertyEditor.ts
10751
- import yargs31 from "yargs";
11018
+ import yargs32 from "yargs";
10752
11019
 
10753
11020
  // src/commands/integration/commands/definition/propertyEditor/deploy.ts
10754
11021
  import { IntegrationPropertyEditorsClient } from "@uniformdev/canvas";
10755
- import { readFileSync as readFileSync4 } from "fs";
11022
+ import { readFileSync as readFileSync5 } from "fs";
10756
11023
 
10757
11024
  // src/commands/integration/commands/definition/propertyEditor/util.ts
10758
- function withPropertyEditorIdOptions(yargs43) {
10759
- return yargs43.option("propertyType", {
11025
+ function withPropertyEditorIdOptions(yargs44) {
11026
+ return yargs44.option("propertyType", {
10760
11027
  describe: "Property type to attach the editor to.",
10761
11028
  demandOption: true,
10762
11029
  type: "string"
@@ -10772,11 +11039,11 @@ function withPropertyEditorIdOptions(yargs43) {
10772
11039
  var IntegrationPropertyEditorDeployModule = {
10773
11040
  command: "deploy <filename>",
10774
11041
  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.",
10775
- builder: (yargs43) => withConfiguration(
11042
+ builder: (yargs44) => withConfiguration(
10776
11043
  withApiOptions(
10777
11044
  withTeamOptions(
10778
11045
  withPropertyEditorIdOptions(
10779
- yargs43.positional("filename", {
11046
+ yargs44.positional("filename", {
10780
11047
  demandOption: true,
10781
11048
  describe: "ESM code file to run for the target property editor hook. Refer to the documentation for expected types."
10782
11049
  }).option("compatibilityDate", {
@@ -10806,7 +11073,7 @@ var IntegrationPropertyEditorDeployModule = {
10806
11073
  const client = new IntegrationPropertyEditorsClient({ apiKey, apiHost, fetch: fetch2, teamId });
10807
11074
  let code;
10808
11075
  if (skipBundle) {
10809
- code = readFileSync4(filename, "utf8");
11076
+ code = readFileSync5(filename, "utf8");
10810
11077
  } else {
10811
11078
  code = await bundleWorkerCode(filename);
10812
11079
  }
@@ -10819,7 +11086,7 @@ import { IntegrationPropertyEditorsClient as IntegrationPropertyEditorsClient2 }
10819
11086
  var IntegrationPropertyEditorRemoveModule = {
10820
11087
  command: "remove",
10821
11088
  describe: "Deletes a custom AI property editor hook from a property type. The API key used must have team admin permissions.",
10822
- builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withPropertyEditorIdOptions(yargs43)))),
11089
+ builder: (yargs44) => withConfiguration(withApiOptions(withTeamOptions(withPropertyEditorIdOptions(yargs44)))),
10823
11090
  handler: async ({ apiHost, apiKey, proxy, team: teamId, propertyType, hook }) => {
10824
11091
  const fetch2 = nodeFetchProxy(proxy);
10825
11092
  const client = new IntegrationPropertyEditorsClient2({ apiKey, apiHost, fetch: fetch2, teamId });
@@ -10831,9 +11098,9 @@ var IntegrationPropertyEditorRemoveModule = {
10831
11098
  var IntegrationPropertyEditorModule = {
10832
11099
  command: "propertyEditor <command>",
10833
11100
  describe: "Commands for managing custom AI property editors at the team level.",
10834
- builder: (yargs43) => yargs43.command(IntegrationPropertyEditorDeployModule).command(IntegrationPropertyEditorRemoveModule).demandCommand(),
11101
+ builder: (yargs44) => yargs44.command(IntegrationPropertyEditorDeployModule).command(IntegrationPropertyEditorRemoveModule).demandCommand(),
10835
11102
  handler: () => {
10836
- yargs31.help();
11103
+ yargs32.help();
10837
11104
  }
10838
11105
  };
10839
11106
 
@@ -10873,10 +11140,10 @@ var DefinitionClient = class extends ApiClient2 {
10873
11140
  var IntegrationDefinitionRegisterModule = {
10874
11141
  command: "register <filename>",
10875
11142
  describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
10876
- builder: (yargs43) => withConfiguration(
11143
+ builder: (yargs44) => withConfiguration(
10877
11144
  withApiOptions(
10878
11145
  withTeamOptions(
10879
- yargs43.positional("filename", {
11146
+ yargs44.positional("filename", {
10880
11147
  demandOption: true,
10881
11148
  describe: "Integration definition manifest to register"
10882
11149
  })
@@ -10895,10 +11162,10 @@ var IntegrationDefinitionRegisterModule = {
10895
11162
  var IntegrationDefinitionRemoveModule = {
10896
11163
  command: "remove <type>",
10897
11164
  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.",
10898
- builder: (yargs43) => withConfiguration(
11165
+ builder: (yargs44) => withConfiguration(
10899
11166
  withApiOptions(
10900
11167
  withTeamOptions(
10901
- yargs43.positional("type", {
11168
+ yargs44.positional("type", {
10902
11169
  demandOption: true,
10903
11170
  describe: "Integration type (from its manifest) to remove."
10904
11171
  })
@@ -10916,9 +11183,9 @@ var IntegrationDefinitionRemoveModule = {
10916
11183
  var IntegrationDefinitionModule = {
10917
11184
  command: "definition <command>",
10918
11185
  describe: "Commands for managing custom integration definitions at the team level.",
10919
- builder: (yargs43) => yargs43.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).command(IntegrationDataResourceEditorModule).command(IntegrationPropertyEditorModule).demandCommand(),
11186
+ builder: (yargs44) => yargs44.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).command(IntegrationDataResourceEditorModule).command(IntegrationPropertyEditorModule).demandCommand(),
10920
11187
  handler: () => {
10921
- yargs32.help();
11188
+ yargs33.help();
10922
11189
  }
10923
11190
  };
10924
11191
 
@@ -10958,10 +11225,10 @@ var InstallClient = class extends ApiClient3 {
10958
11225
  var IntegrationInstallModule = {
10959
11226
  command: "install <type>",
10960
11227
  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.",
10961
- builder: (yargs43) => withConfiguration(
11228
+ builder: (yargs44) => withConfiguration(
10962
11229
  withApiOptions(
10963
11230
  withProjectOptions(
10964
- yargs43.positional("type", {
11231
+ yargs44.positional("type", {
10965
11232
  demandOption: true,
10966
11233
  describe: "Integration type to install (as defined in its manifest)"
10967
11234
  }).option("configuration", {
@@ -10983,10 +11250,10 @@ var IntegrationInstallModule = {
10983
11250
  var IntegrationUninstallModule = {
10984
11251
  command: "uninstall <type>",
10985
11252
  describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
10986
- builder: (yargs43) => withConfiguration(
11253
+ builder: (yargs44) => withConfiguration(
10987
11254
  withApiOptions(
10988
11255
  withProjectOptions(
10989
- yargs43.positional("type", {
11256
+ yargs44.positional("type", {
10990
11257
  demandOption: true,
10991
11258
  describe: "Integration type to uninstall (as defined in its manifest)"
10992
11259
  })
@@ -11004,9 +11271,9 @@ var IntegrationUninstallModule = {
11004
11271
  var IntegrationCommand = {
11005
11272
  command: "integration <command>",
11006
11273
  describe: "Integration management commands",
11007
- builder: (yargs43) => yargs43.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
11274
+ builder: (yargs44) => yargs44.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
11008
11275
  handler: () => {
11009
- yargs33.showHelp();
11276
+ yargs34.showHelp();
11010
11277
  }
11011
11278
  };
11012
11279
 
@@ -11254,7 +11521,7 @@ npm run dev
11254
11521
 
11255
11522
  // src/commands/new/commands/new-mesh-integration.ts
11256
11523
  import { input as input2 } from "@inquirer/prompts";
11257
- import { existsSync as existsSync4, mkdirSync as mkdirSync3, readdirSync, readFileSync as readFileSync5, writeFileSync as writeFileSync2 } from "fs";
11524
+ import { existsSync as existsSync5, mkdirSync as mkdirSync3, readdirSync, readFileSync as readFileSync6, writeFileSync as writeFileSync2 } from "fs";
11258
11525
  import path7 from "path";
11259
11526
  import slugify2 from "slugify";
11260
11527
  async function newMeshIntegrationHandler({
@@ -11303,16 +11570,16 @@ async function newMeshIntegrationHandler({
11303
11570
  });
11304
11571
  let done = await spin("Registering integration to team...");
11305
11572
  const pathToManifest = path7.resolve(targetDir, "mesh-manifest.json");
11306
- if (!existsSync4(pathToManifest)) {
11573
+ if (!existsSync5(pathToManifest)) {
11307
11574
  throw new Error("Invalid integration starter cloned: missing `mesh-manifest.json`");
11308
11575
  }
11309
- const manifestContents = readFileSync5(pathToManifest, "utf-8");
11576
+ const manifestContents = readFileSync6(pathToManifest, "utf-8");
11310
11577
  const manifestJson = JSON.parse(manifestContents);
11311
11578
  manifestJson.type = typeSlug;
11312
11579
  manifestJson.displayName = name;
11313
11580
  writeFileSync2(pathToManifest, JSON.stringify(manifestJson, null, 2), "utf-8");
11314
11581
  const packageJsonPath = path7.resolve(targetDir, "package.json");
11315
- const packageJson = JSON.parse(readFileSync5(packageJsonPath, "utf-8"));
11582
+ const packageJson = JSON.parse(readFileSync6(packageJsonPath, "utf-8"));
11316
11583
  packageJson.name = typeSlug;
11317
11584
  writeFileSync2(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
11318
11585
  const fullMeshAppKey = await uniformClient.registerMeshIntegration({ teamId, manifest: manifestJson });
@@ -11357,12 +11624,12 @@ function validateIntegrationName(integrationName, explicitOutputPath) {
11357
11624
  throw new Error("Integration name cannot be shorter than 6 characters.");
11358
11625
  }
11359
11626
  let targetDir = explicitOutputPath ?? process.cwd();
11360
- if (!existsSync4(targetDir)) {
11627
+ if (!existsSync5(targetDir)) {
11361
11628
  mkdirSync3(targetDir, { recursive: true });
11362
11629
  }
11363
11630
  if (readdirSync(targetDir).length > 0) {
11364
11631
  targetDir = path7.resolve(targetDir, typeSlug);
11365
- if (existsSync4(targetDir)) {
11632
+ if (existsSync5(targetDir)) {
11366
11633
  throw new Error(`${targetDir} directory already exists, choose a different name.`);
11367
11634
  }
11368
11635
  }
@@ -11471,14 +11738,14 @@ var NewMeshCmd = {
11471
11738
  };
11472
11739
 
11473
11740
  // src/commands/policy-documents/index.ts
11474
- import yargs34 from "yargs";
11741
+ import yargs35 from "yargs";
11475
11742
 
11476
11743
  // src/commands/policy-documents/commands/list.ts
11477
11744
  var PolicyDocumentsListModule = {
11478
11745
  command: "list",
11479
11746
  describe: "List policy documents for a project",
11480
11747
  aliases: ["ls"],
11481
- builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
11748
+ builder: (yargs44) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs44)))),
11482
11749
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
11483
11750
  const fetch2 = nodeFetchProxy(proxy, verbose);
11484
11751
  const url = new URL(`/api/v1/policy-documents`, apiHost);
@@ -11563,12 +11830,12 @@ var selectDisplayName13 = (policyDoc) => `Policy document for role ${policyDoc.r
11563
11830
  var PolicyDocumentsPullModule = {
11564
11831
  command: "pull <directory>",
11565
11832
  describe: "Pulls all policy documents to local files in a directory",
11566
- builder: (yargs43) => withConfiguration(
11833
+ builder: (yargs44) => withConfiguration(
11567
11834
  withApiOptions(
11568
11835
  withDebugOptions(
11569
11836
  withProjectOptions(
11570
11837
  withDiffOptions(
11571
- yargs43.positional("directory", {
11838
+ yargs44.positional("directory", {
11572
11839
  describe: "Directory to save to. Each policy document will be saved as a separate file named by role ID.",
11573
11840
  type: "string"
11574
11841
  }).option("format", {
@@ -11623,19 +11890,19 @@ var PolicyDocumentsPullModule = {
11623
11890
  };
11624
11891
 
11625
11892
  // src/commands/policy-documents/commands/push.ts
11626
- import { existsSync as existsSync5, mkdirSync as mkdirSync4 } from "fs";
11893
+ import { existsSync as existsSync6, mkdirSync as mkdirSync4 } from "fs";
11627
11894
  import { readdir as readdir2 } from "fs/promises";
11628
- import { extname as extname2, join as join11 } from "path";
11895
+ import { extname as extname3, join as join12 } from "path";
11629
11896
  async function readLocalPolicyDocuments(directory, format, verbose) {
11630
11897
  const files = await readdir2(directory);
11631
11898
  const policyDocuments = {};
11632
11899
  const errors = [];
11633
11900
  for (const filename of files) {
11634
- const ext = extname2(filename);
11901
+ const ext = extname3(filename);
11635
11902
  if (ext !== `.${format}` && ext !== ".yaml" && ext !== ".yml" && ext !== ".json") {
11636
11903
  continue;
11637
11904
  }
11638
- const filePath = join11(directory, filename);
11905
+ const filePath = join12(directory, filename);
11639
11906
  try {
11640
11907
  let roleId = filename.replace(ext, "");
11641
11908
  const fileContent = readFileToObject(filePath);
@@ -11702,12 +11969,12 @@ function mergePolicyDocuments(localDocs, remoteDocs, mode) {
11702
11969
  var PolicyDocumentsPushModule = {
11703
11970
  command: "push <directory>",
11704
11971
  describe: "Pushes policy documents from local files to Uniform",
11705
- builder: (yargs43) => withConfiguration(
11972
+ builder: (yargs44) => withConfiguration(
11706
11973
  withApiOptions(
11707
11974
  withDebugOptions(
11708
11975
  withProjectOptions(
11709
11976
  withDiffOptions(
11710
- yargs43.positional("directory", {
11977
+ yargs44.positional("directory", {
11711
11978
  describe: "Directory containing policy document files (one file per role ID).",
11712
11979
  type: "string"
11713
11980
  }).option("format", {
@@ -11741,7 +12008,7 @@ var PolicyDocumentsPushModule = {
11741
12008
  allowEmptySource,
11742
12009
  verbose
11743
12010
  }) => {
11744
- if (!existsSync5(directory)) {
12011
+ if (!existsSync6(directory)) {
11745
12012
  if (verbose) {
11746
12013
  console.log(`Creating directory ${directory}`);
11747
12014
  }
@@ -11803,17 +12070,17 @@ var PolicyDocumentsCommand = {
11803
12070
  command: "policy-documents <command>",
11804
12071
  aliases: ["policy", "policies"],
11805
12072
  describe: "Uniform Policy Documents commands",
11806
- builder: (yargs43) => yargs43.command(PolicyDocumentsListModule).command(PolicyDocumentsPullModule).command(PolicyDocumentsPushModule).demandCommand(),
12073
+ builder: (yargs44) => yargs44.command(PolicyDocumentsListModule).command(PolicyDocumentsPullModule).command(PolicyDocumentsPushModule).demandCommand(),
11807
12074
  handler: () => {
11808
- yargs34.showHelp();
12075
+ yargs35.showHelp();
11809
12076
  }
11810
12077
  };
11811
12078
 
11812
12079
  // src/commands/project-map/index.ts
11813
- import yargs37 from "yargs";
12080
+ import yargs38 from "yargs";
11814
12081
 
11815
12082
  // src/commands/project-map/commands/projectMapDefinition.ts
11816
- import yargs35 from "yargs";
12083
+ import yargs36 from "yargs";
11817
12084
 
11818
12085
  // src/commands/project-map/commands/ProjectMapDefinition/_util.ts
11819
12086
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
@@ -11827,11 +12094,11 @@ function getProjectMapClient(options) {
11827
12094
  var ProjectMapDefinitionGetModule = {
11828
12095
  command: "get <id>",
11829
12096
  describe: "Fetch a project map",
11830
- builder: (yargs43) => withFormatOptions(
12097
+ builder: (yargs44) => withFormatOptions(
11831
12098
  withConfiguration(
11832
12099
  withApiOptions(
11833
12100
  withProjectOptions(
11834
- yargs43.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
12101
+ yargs44.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
11835
12102
  )
11836
12103
  )
11837
12104
  )
@@ -11854,7 +12121,7 @@ var ProjectMapDefinitionListModule = {
11854
12121
  command: "list",
11855
12122
  describe: "List of project maps",
11856
12123
  aliases: ["ls"],
11857
- builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
12124
+ builder: (yargs44) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs44)))),
11858
12125
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
11859
12126
  const fetch2 = nodeFetchProxy(proxy);
11860
12127
  const client = getProjectMapClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -11908,12 +12175,12 @@ function createProjectMapDefinitionEngineDataSource({
11908
12175
  var ProjectMapDefinitionPullModule = {
11909
12176
  command: "pull <directory>",
11910
12177
  describe: "Pulls all project maps to local files in a directory",
11911
- builder: (yargs43) => withConfiguration(
12178
+ builder: (yargs44) => withConfiguration(
11912
12179
  withDebugOptions(
11913
12180
  withApiOptions(
11914
12181
  withProjectOptions(
11915
12182
  withDiffOptions(
11916
- yargs43.positional("directory", {
12183
+ yargs44.positional("directory", {
11917
12184
  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.",
11918
12185
  type: "string"
11919
12186
  }).option("format", {
@@ -11988,12 +12255,12 @@ var ProjectMapDefinitionPullModule = {
11988
12255
  var ProjectMapDefinitionPushModule = {
11989
12256
  command: "push <directory>",
11990
12257
  describe: "Pushes all project maps from files in a directory or package to Uniform",
11991
- builder: (yargs43) => withConfiguration(
12258
+ builder: (yargs44) => withConfiguration(
11992
12259
  withDebugOptions(
11993
12260
  withApiOptions(
11994
12261
  withProjectOptions(
11995
12262
  withDiffOptions(
11996
- yargs43.positional("directory", {
12263
+ yargs44.positional("directory", {
11997
12264
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
11998
12265
  type: "string"
11999
12266
  }).option("mode", {
@@ -12057,9 +12324,9 @@ var ProjectMapDefinitionRemoveModule = {
12057
12324
  command: "remove <id>",
12058
12325
  aliases: ["delete", "rm"],
12059
12326
  describe: "Delete a project map",
12060
- builder: (yargs43) => withConfiguration(
12327
+ builder: (yargs44) => withConfiguration(
12061
12328
  withApiOptions(
12062
- withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
12329
+ withProjectOptions(yargs44.positional("id", { demandOption: true, describe: " UUID to delete" }))
12063
12330
  )
12064
12331
  ),
12065
12332
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -12074,10 +12341,10 @@ var ProjectMapDefinitionUpdateModule = {
12074
12341
  command: "update <filename>",
12075
12342
  aliases: ["put"],
12076
12343
  describe: "Insert or update a project map",
12077
- builder: (yargs43) => withConfiguration(
12344
+ builder: (yargs44) => withConfiguration(
12078
12345
  withApiOptions(
12079
12346
  withProjectOptions(
12080
- yargs43.positional("filename", { demandOption: true, describe: "Project map file to put" })
12347
+ yargs44.positional("filename", { demandOption: true, describe: "Project map file to put" })
12081
12348
  )
12082
12349
  )
12083
12350
  ),
@@ -12093,24 +12360,24 @@ var ProjectMapDefinitionUpdateModule = {
12093
12360
  var ProjectMapDefinitionModule = {
12094
12361
  command: "definition <command>",
12095
12362
  describe: "Commands for ProjectMap Definitions",
12096
- builder: (yargs43) => yargs43.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
12363
+ builder: (yargs44) => yargs44.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
12097
12364
  handler: () => {
12098
- yargs35.help();
12365
+ yargs36.help();
12099
12366
  }
12100
12367
  };
12101
12368
 
12102
12369
  // src/commands/project-map/commands/projectMapNode.ts
12103
- import yargs36 from "yargs";
12370
+ import yargs37 from "yargs";
12104
12371
 
12105
12372
  // src/commands/project-map/commands/ProjectMapNode/get.ts
12106
12373
  var ProjectMapNodeGetModule = {
12107
12374
  command: "get <id> <projectMapId>",
12108
12375
  describe: "Fetch a project map node",
12109
- builder: (yargs43) => withConfiguration(
12376
+ builder: (yargs44) => withConfiguration(
12110
12377
  withFormatOptions(
12111
12378
  withApiOptions(
12112
12379
  withProjectOptions(
12113
- yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
12380
+ yargs44.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
12114
12381
  )
12115
12382
  )
12116
12383
  )
@@ -12134,12 +12401,12 @@ var ProjectMapNodeListModule = {
12134
12401
  command: "list <projectMapId>",
12135
12402
  describe: "List project map nodes",
12136
12403
  aliases: ["ls"],
12137
- builder: (yargs43) => withConfiguration(
12404
+ builder: (yargs44) => withConfiguration(
12138
12405
  withFormatOptions(
12139
12406
  withApiOptions(
12140
12407
  withProjectOptions(
12141
12408
  withStateOptions(
12142
- yargs43.positional("projectMapId", {
12409
+ yargs44.positional("projectMapId", {
12143
12410
  demandOption: true,
12144
12411
  describe: "ProjectMap UUID to fetch from"
12145
12412
  })
@@ -12217,12 +12484,12 @@ function createProjectMapNodeEngineDataSource({
12217
12484
  var ProjectMapNodePullModule = {
12218
12485
  command: "pull <directory>",
12219
12486
  describe: "Pulls all project maps nodes to local files in a directory",
12220
- builder: (yargs43) => withConfiguration(
12487
+ builder: (yargs44) => withConfiguration(
12221
12488
  withDebugOptions(
12222
12489
  withApiOptions(
12223
12490
  withProjectOptions(
12224
12491
  withDiffOptions(
12225
- yargs43.positional("directory", {
12492
+ yargs44.positional("directory", {
12226
12493
  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.",
12227
12494
  type: "string"
12228
12495
  }).option("format", {
@@ -12304,12 +12571,12 @@ import {
12304
12571
  var ProjectMapNodePushModule = {
12305
12572
  command: "push <directory>",
12306
12573
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
12307
- builder: (yargs43) => withConfiguration(
12574
+ builder: (yargs44) => withConfiguration(
12308
12575
  withDebugOptions(
12309
12576
  withApiOptions(
12310
12577
  withProjectOptions(
12311
12578
  withDiffOptions(
12312
- yargs43.positional("directory", {
12579
+ yargs44.positional("directory", {
12313
12580
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
12314
12581
  type: "string"
12315
12582
  }).option("mode", {
@@ -12411,10 +12678,10 @@ var ProjectMapNodeRemoveModule = {
12411
12678
  command: "remove <id> <projectMapId>",
12412
12679
  aliases: ["delete", "rm"],
12413
12680
  describe: "Delete a project map node",
12414
- builder: (yargs43) => withConfiguration(
12681
+ builder: (yargs44) => withConfiguration(
12415
12682
  withApiOptions(
12416
12683
  withProjectOptions(
12417
- yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
12684
+ yargs44.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
12418
12685
  )
12419
12686
  )
12420
12687
  ),
@@ -12430,10 +12697,10 @@ var ProjectMapNodeUpdateModule = {
12430
12697
  command: "update <filename> <projectMapId>",
12431
12698
  aliases: ["put"],
12432
12699
  describe: "Insert or update a project map node",
12433
- builder: (yargs43) => withConfiguration(
12700
+ builder: (yargs44) => withConfiguration(
12434
12701
  withApiOptions(
12435
12702
  withProjectOptions(
12436
- yargs43.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
12703
+ yargs44.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
12437
12704
  )
12438
12705
  )
12439
12706
  ),
@@ -12449,9 +12716,9 @@ var ProjectMapNodeUpdateModule = {
12449
12716
  var ProjectMapNodeModule = {
12450
12717
  command: "node <command>",
12451
12718
  describe: "Commands for ProjectMap Nodes",
12452
- builder: (yargs43) => yargs43.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
12719
+ builder: (yargs44) => yargs44.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
12453
12720
  handler: () => {
12454
- yargs36.help();
12721
+ yargs37.help();
12455
12722
  }
12456
12723
  };
12457
12724
 
@@ -12460,17 +12727,17 @@ var ProjectMapCommand = {
12460
12727
  command: "project-map <command>",
12461
12728
  aliases: ["prm"],
12462
12729
  describe: "Uniform ProjectMap commands",
12463
- builder: (yargs43) => yargs43.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
12730
+ builder: (yargs44) => yargs44.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
12464
12731
  handler: () => {
12465
- yargs37.showHelp();
12732
+ yargs38.showHelp();
12466
12733
  }
12467
12734
  };
12468
12735
 
12469
12736
  // src/commands/redirect/index.ts
12470
- import yargs39 from "yargs";
12737
+ import yargs40 from "yargs";
12471
12738
 
12472
12739
  // src/commands/redirect/commands/redirect.ts
12473
- import yargs38 from "yargs";
12740
+ import yargs39 from "yargs";
12474
12741
 
12475
12742
  // src/commands/redirect/commands/RedirectDefinition/_util.ts
12476
12743
  import { UncachedRedirectClient } from "@uniformdev/redirect";
@@ -12495,11 +12762,11 @@ function getRedirectClient(options) {
12495
12762
  var RedirectDefinitionGetModule = {
12496
12763
  command: "get <id>",
12497
12764
  describe: "Fetch a redirect",
12498
- builder: (yargs43) => withConfiguration(
12765
+ builder: (yargs44) => withConfiguration(
12499
12766
  withFormatOptions(
12500
12767
  withApiOptions(
12501
12768
  withProjectOptions(
12502
- yargs43.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
12769
+ yargs44.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
12503
12770
  )
12504
12771
  )
12505
12772
  )
@@ -12522,7 +12789,7 @@ var RedirectDefinitionListModule = {
12522
12789
  command: "list",
12523
12790
  describe: "List of redirects",
12524
12791
  aliases: ["ls"],
12525
- builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
12792
+ builder: (yargs44) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs44)))),
12526
12793
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
12527
12794
  const fetch2 = nodeFetchProxy(proxy);
12528
12795
  const client = getRedirectClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -12574,12 +12841,12 @@ function createRedirectDefinitionEngineDataSource({
12574
12841
  var RedirectDefinitionPullModule = {
12575
12842
  command: "pull <directory>",
12576
12843
  describe: "Pulls all redirects to local files in a directory",
12577
- builder: (yargs43) => withConfiguration(
12844
+ builder: (yargs44) => withConfiguration(
12578
12845
  withDebugOptions(
12579
12846
  withApiOptions(
12580
12847
  withProjectOptions(
12581
12848
  withDiffOptions(
12582
- yargs43.positional("directory", {
12849
+ yargs44.positional("directory", {
12583
12850
  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.",
12584
12851
  type: "string"
12585
12852
  }).option("format", {
@@ -12655,12 +12922,12 @@ var RedirectDefinitionPullModule = {
12655
12922
  var RedirectDefinitionPushModule = {
12656
12923
  command: "push <directory>",
12657
12924
  describe: "Pushes all redirects from files in a directory or package to Uniform",
12658
- builder: (yargs43) => withConfiguration(
12925
+ builder: (yargs44) => withConfiguration(
12659
12926
  withDebugOptions(
12660
12927
  withApiOptions(
12661
12928
  withProjectOptions(
12662
12929
  withDiffOptions(
12663
- yargs43.positional("directory", {
12930
+ yargs44.positional("directory", {
12664
12931
  describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
12665
12932
  type: "string"
12666
12933
  }).option("mode", {
@@ -12724,9 +12991,9 @@ var RedirectDefinitionRemoveModule = {
12724
12991
  command: "remove <id>",
12725
12992
  aliases: ["delete", "rm"],
12726
12993
  describe: "Delete a redirect",
12727
- builder: (yargs43) => withConfiguration(
12994
+ builder: (yargs44) => withConfiguration(
12728
12995
  withApiOptions(
12729
- withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
12996
+ withProjectOptions(yargs44.positional("id", { demandOption: true, describe: " UUID to delete" }))
12730
12997
  )
12731
12998
  ),
12732
12999
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -12741,10 +13008,10 @@ var RedirectDefinitionUpdateModule = {
12741
13008
  command: "update <filename>",
12742
13009
  aliases: ["put"],
12743
13010
  describe: "Insert or update a redirect",
12744
- builder: (yargs43) => withConfiguration(
13011
+ builder: (yargs44) => withConfiguration(
12745
13012
  withApiOptions(
12746
13013
  withProjectOptions(
12747
- yargs43.positional("filename", { demandOption: true, describe: "Redirect file to put" })
13014
+ yargs44.positional("filename", { demandOption: true, describe: "Redirect file to put" })
12748
13015
  )
12749
13016
  )
12750
13017
  ),
@@ -12760,9 +13027,9 @@ var RedirectDefinitionUpdateModule = {
12760
13027
  var RedirectDefinitionModule = {
12761
13028
  command: "definition <command>",
12762
13029
  describe: "Commands for Redirect Definitions",
12763
- builder: (yargs43) => yargs43.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
13030
+ builder: (yargs44) => yargs44.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
12764
13031
  handler: () => {
12765
- yargs38.help();
13032
+ yargs39.help();
12766
13033
  }
12767
13034
  };
12768
13035
 
@@ -12771,20 +13038,20 @@ var RedirectCommand = {
12771
13038
  command: "redirect <command>",
12772
13039
  aliases: ["red"],
12773
13040
  describe: "Uniform Redirect commands",
12774
- builder: (yargs43) => yargs43.command(RedirectDefinitionModule).demandCommand(),
13041
+ builder: (yargs44) => yargs44.command(RedirectDefinitionModule).demandCommand(),
12775
13042
  handler: () => {
12776
- yargs39.showHelp();
13043
+ yargs40.showHelp();
12777
13044
  }
12778
13045
  };
12779
13046
 
12780
13047
  // src/commands/sync/index.ts
12781
- import yargs40 from "yargs";
13048
+ import yargs41 from "yargs";
12782
13049
 
12783
13050
  // src/webhooksClient.ts
12784
13051
  import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
12785
13052
  import PQueue3 from "p-queue";
12786
13053
  import { Svix } from "svix";
12787
- import * as z3 from "zod";
13054
+ import * as z4 from "zod";
12788
13055
  var WEBHOOKS_DASHBOARD_BASE_PATH = "/api/v1/svix-dashboard";
12789
13056
  var WebhooksClient = class extends ApiClient4 {
12790
13057
  constructor(options) {
@@ -12804,14 +13071,14 @@ var WebhooksClient = class extends ApiClient4 {
12804
13071
  if (!key) {
12805
13072
  throw new Error("Failed to get webhooks token");
12806
13073
  }
12807
- const keySchema = z3.object({
12808
- appId: z3.string(),
12809
- oneTimeToken: z3.string(),
12810
- region: z3.enum(["us", "eu"])
13074
+ const keySchema = z4.object({
13075
+ appId: z4.string(),
13076
+ oneTimeToken: z4.string(),
13077
+ region: z4.enum(["us", "eu"])
12811
13078
  });
12812
13079
  const { appId, oneTimeToken, region } = keySchema.parse(JSON.parse(atob(key)));
12813
- const tokenSchema = z3.object({
12814
- token: z3.string()
13080
+ const tokenSchema = z4.object({
13081
+ token: z4.string()
12815
13082
  });
12816
13083
  const tokenResponse = await fetch(`https://api.${region}.svix.com/api/v1/auth/one-time-token`, {
12817
13084
  method: "POST",
@@ -12972,12 +13239,12 @@ function createWebhookEngineDataSource({
12972
13239
  var WebhookPullModule = {
12973
13240
  command: "pull <directory>",
12974
13241
  describe: "Pulls all webhooks to local files in a directory",
12975
- builder: (yargs43) => withConfiguration(
13242
+ builder: (yargs44) => withConfiguration(
12976
13243
  withApiOptions(
12977
13244
  withDebugOptions(
12978
13245
  withProjectOptions(
12979
13246
  withDiffOptions(
12980
- yargs43.positional("directory", {
13247
+ yargs44.positional("directory", {
12981
13248
  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.",
12982
13249
  type: "string"
12983
13250
  }).option("format", {
@@ -13163,7 +13430,7 @@ function numPad(num, spaces = 6) {
13163
13430
  var SyncPullModule = {
13164
13431
  command: "pull",
13165
13432
  describe: "Pulls whole project to local files in a directory",
13166
- builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs43))))),
13433
+ builder: (yargs44) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs44))))),
13167
13434
  handler: async ({ serialization, ...otherParams }) => {
13168
13435
  const config2 = serialization;
13169
13436
  const enabledEntities = Object.entries({
@@ -13264,12 +13531,12 @@ var getFormat = (entityType, config2) => {
13264
13531
  var WebhookPushModule = {
13265
13532
  command: "push <directory>",
13266
13533
  describe: "Pushes all webhooks from files in a directory to Uniform",
13267
- builder: (yargs43) => withConfiguration(
13534
+ builder: (yargs44) => withConfiguration(
13268
13535
  withDebugOptions(
13269
13536
  withApiOptions(
13270
13537
  withProjectOptions(
13271
13538
  withDiffOptions(
13272
- yargs43.positional("directory", {
13539
+ yargs44.positional("directory", {
13273
13540
  describe: "Directory to read from. If a filename is used, a package will be read instead.",
13274
13541
  type: "string"
13275
13542
  }).option("mode", {
@@ -13333,7 +13600,7 @@ var WebhookPushModule = {
13333
13600
  var SyncPushModule = {
13334
13601
  command: "push",
13335
13602
  describe: "Pushes whole project data from files in a directory or package to Uniform",
13336
- builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs43))))),
13603
+ builder: (yargs44) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs44))))),
13337
13604
  handler: async ({ serialization, ...otherParams }) => {
13338
13605
  const config2 = serialization;
13339
13606
  const enabledEntities = Object.entries({
@@ -13555,21 +13822,63 @@ var getFormat2 = (entityType, config2) => {
13555
13822
  var SyncCommand = {
13556
13823
  command: "sync <command>",
13557
13824
  describe: "Uniform Sync commands",
13558
- builder: (yargs43) => yargs43.command(SyncPullModule).command(SyncPushModule).demandCommand(),
13825
+ builder: (yargs44) => yargs44.command(SyncPullModule).command(SyncPushModule).demandCommand(),
13559
13826
  handler: () => {
13560
- yargs40.showHelp();
13827
+ yargs41.showHelp();
13561
13828
  }
13562
13829
  };
13563
13830
 
13564
13831
  // src/commands/webhook/index.ts
13565
- import yargs41 from "yargs";
13832
+ import yargs42 from "yargs";
13566
13833
  var WebhookCommand = {
13567
13834
  command: "webhook <command>",
13568
13835
  aliases: ["wh"],
13569
13836
  describe: "Commands for webhooks",
13570
- builder: (yargs43) => yargs43.command(WebhookPullModule).command(WebhookPushModule).demandCommand(),
13837
+ builder: (yargs44) => yargs44.command(WebhookPullModule).command(WebhookPushModule).demandCommand(),
13571
13838
  handler: () => {
13572
- yargs41.help();
13839
+ yargs42.help();
13840
+ }
13841
+ };
13842
+
13843
+ // src/commands/whoami/index.ts
13844
+ import { ProjectClient as ProjectClient2 } from "@uniformdev/canvas";
13845
+ var WhoamiCommand = {
13846
+ command: "whoami",
13847
+ describe: "Prints configured identity and connection context.",
13848
+ builder: (yargs44) => withConfiguration(
13849
+ withFormatOptions(withApiOptions(yargs44)).option("project", {
13850
+ describe: "Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",
13851
+ default: process.env.UNIFORM_CLI_PROJECT_ID ?? process.env.UNIFORM_PROJECT_ID,
13852
+ type: "string",
13853
+ alias: ["p"]
13854
+ })
13855
+ ),
13856
+ handler: async ({ apiHost, edgeApiHost, apiKey, project, proxy, format, filename }) => {
13857
+ const fetch2 = nodeFetchProxy(proxy);
13858
+ try {
13859
+ const [profile, projectInfo] = await Promise.all([
13860
+ fetchMemberProfile({ baseUrl: apiHost, apiKey, fetch: fetch2 }),
13861
+ project ? new ProjectClient2({ apiHost, apiKey, fetch: fetch2 }).get({ projectId: project }) : void 0
13862
+ ]);
13863
+ emitWithFormat(
13864
+ {
13865
+ apiHost,
13866
+ edgeApiHost,
13867
+ apiKey: apiKey ? maskApiKey(apiKey) : null,
13868
+ apiKeyName: profile.name,
13869
+ ...projectInfo ? {
13870
+ projectId: project,
13871
+ projectName: projectInfo.name,
13872
+ teamId: projectInfo.teamId,
13873
+ teamName: projectInfo.teamName
13874
+ } : {}
13875
+ },
13876
+ format,
13877
+ filename
13878
+ );
13879
+ } catch (error) {
13880
+ exitOnCliError(error);
13881
+ }
13573
13882
  }
13574
13883
  };
13575
13884
 
@@ -13577,29 +13886,29 @@ var WebhookCommand = {
13577
13886
  import { bold as bold3, gray as gray6, green as green7 } from "colorette";
13578
13887
 
13579
13888
  // src/updateCheck.ts
13580
- import { existsSync as existsSync6, promises as fs8 } from "fs";
13889
+ import { existsSync as existsSync7, promises as fs8 } from "fs";
13581
13890
  import { get as getHttp } from "http";
13582
13891
  import { get as getHttps } from "https";
13583
- import { tmpdir } from "os";
13584
- import { join as join12 } from "path";
13892
+ import { tmpdir as tmpdir2 } from "os";
13893
+ import { join as join13 } from "path";
13585
13894
  import registryUrl from "registry-url";
13586
13895
  import { URL as URL2 } from "url";
13587
13896
  var compareVersions = (a, b) => a.localeCompare(b, "en-US", { numeric: true });
13588
13897
  var encode = (value) => encodeURIComponent(value).replace(/^%40/, "@");
13589
13898
  var getFile = async (details, distTag) => {
13590
- const rootDir = tmpdir();
13591
- const subDir = join12(rootDir, "update-check");
13592
- if (!existsSync6(subDir)) {
13899
+ const rootDir = tmpdir2();
13900
+ const subDir = join13(rootDir, "update-check");
13901
+ if (!existsSync7(subDir)) {
13593
13902
  await fs8.mkdir(subDir);
13594
13903
  }
13595
13904
  let name = `${details.name}-${distTag}.json`;
13596
13905
  if (details.scope) {
13597
13906
  name = `${details.scope}-${name}`;
13598
13907
  }
13599
- return join12(subDir, name);
13908
+ return join13(subDir, name);
13600
13909
  };
13601
13910
  var evaluateCache = async (file, time, interval) => {
13602
- if (existsSync6(file)) {
13911
+ if (existsSync7(file)) {
13603
13912
  const content = await fs8.readFile(file, "utf8");
13604
13913
  const { lastUpdate, latest } = JSON.parse(content);
13605
13914
  const nextCheck = lastUpdate + interval;
@@ -13622,7 +13931,7 @@ var updateCache = async (file, latest, lastUpdate) => {
13622
13931
  });
13623
13932
  await fs8.writeFile(file, content, "utf8");
13624
13933
  };
13625
- var loadPackage = ({ url, timeout }, authInfo) => new Promise((resolve2, reject) => {
13934
+ var loadPackage = ({ url, timeout }, authInfo) => new Promise((resolve4, reject) => {
13626
13935
  const options = {
13627
13936
  host: url.hostname,
13628
13937
  path: url.pathname,
@@ -13653,7 +13962,7 @@ var loadPackage = ({ url, timeout }, authInfo) => new Promise((resolve2, reject)
13653
13962
  response.on("end", () => {
13654
13963
  try {
13655
13964
  const parsedData = JSON.parse(rawData);
13656
- resolve2(parsedData);
13965
+ resolve4(parsedData);
13657
13966
  } catch (e) {
13658
13967
  reject(e);
13659
13968
  }
@@ -13751,7 +14060,7 @@ var checkForUpdateMiddleware = async ({ verbose }) => {
13751
14060
 
13752
14061
  // src/middleware/checkLocalDepsVersionsMiddleware.ts
13753
14062
  import { magenta, red as red8 } from "colorette";
13754
- import { join as join13 } from "path";
14063
+ import { join as join14 } from "path";
13755
14064
  var uniformStrictVersions = [
13756
14065
  "@uniformdev/canvas",
13757
14066
  "@uniformdev/canvas-next",
@@ -13773,7 +14082,7 @@ var checkLocalDepsVersions = async (args) => {
13773
14082
  try {
13774
14083
  let isOutside = false;
13775
14084
  let warning = `${magenta("Warning:")} Installed Uniform packages should be the same version`;
13776
- const localPackages = await tryReadJSON(join13(process.cwd(), "package.json"));
14085
+ const localPackages = await tryReadJSON(join14(process.cwd(), "package.json"));
13777
14086
  if (!localPackages) return;
13778
14087
  let firstVersion;
13779
14088
  const allDependencies = {
@@ -13804,11 +14113,11 @@ First found was: v${firstVersion}`;
13804
14113
 
13805
14114
  // src/index.ts
13806
14115
  dotenv.config();
13807
- var yarggery = yargs42(hideBin(process.argv));
14116
+ var yarggery = yargs43(hideBin(process.argv));
13808
14117
  var useDefaultConfig = !process.argv.includes("--config");
13809
14118
  var defaultConfig2 = useDefaultConfig ? loadConfig(null) : {};
13810
14119
  yarggery.option("verbose", {
13811
14120
  describe: "Include verbose logging",
13812
14121
  default: false,
13813
14122
  type: "boolean"
13814
- }).scriptName("uniform").config(defaultConfig2).config("config", "Specify a custom Uniform CLI config file", (configPath) => loadConfig(configPath)).command(AiCommand).command(CanvasCommand).command(ContextCommand).command(ProjectMapCommand).command(PolicyDocumentsCommand).command(RedirectCommand).command(WebhookCommand).command(SyncCommand).command(NewCmd).command(NewMeshCmd).command(IntegrationCommand).recommendCommands().demandCommand(1, "").strict().help().middleware([checkForUpdateMiddleware, checkLocalDepsVersions]).parse();
14123
+ }).scriptName("uniform").config(defaultConfig2).config("config", "Specify a custom Uniform CLI config file", (configPath) => loadConfig(configPath)).command(AiCommand).command(AutomationCommand).command(CanvasCommand).command(ContextCommand).command(ProjectMapCommand).command(PolicyDocumentsCommand).command(RedirectCommand).command(WebhookCommand).command(SyncCommand).command(NewCmd).command(NewMeshCmd).command(IntegrationCommand).command(WhoamiCommand).recommendCommands().demandCommand(1, "").strict().help().middleware([checkForUpdateMiddleware, checkLocalDepsVersions]).parse();