@uniformdev/cli 20.47.2-alpha.4 → 20.48.1-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -20,7 +20,7 @@ import {
20
20
 
21
21
  // src/index.ts
22
22
  import * as dotenv from "dotenv";
23
- import yargs41 from "yargs";
23
+ import yargs42 from "yargs";
24
24
  import { hideBin } from "yargs/helpers";
25
25
 
26
26
  // src/commands/ai/index.ts
@@ -150,10 +150,10 @@ var createClient = (baseUrl, authToken) => {
150
150
  );
151
151
  }
152
152
  };
153
- const requestJson = async (path8, opts, schema2, allowedNon2xxStatusCodes = []) => {
153
+ const requestJson = async (path8, opts, schema, allowedNon2xxStatusCodes = []) => {
154
154
  const res = await request2(path8, opts, allowedNon2xxStatusCodes);
155
155
  const data = await res.json();
156
- const parseResult = schema2.safeParse(data);
156
+ const parseResult = schema.safeParse(data);
157
157
  if (parseResult.success) {
158
158
  return parseResult.data;
159
159
  } else {
@@ -324,8 +324,8 @@ async function readJSON(path8) {
324
324
  }
325
325
  async function tryReadJSON(path8, missingValue = null) {
326
326
  try {
327
- const stat2 = await fs.stat(path8);
328
- return stat2.isFile() ? await readJSON(path8) : missingValue;
327
+ const stat = await fs.stat(path8);
328
+ return stat.isFile() ? await readJSON(path8) : missingValue;
329
329
  } catch {
330
330
  return missingValue;
331
331
  }
@@ -447,7 +447,7 @@ async function chooseExistingProject({
447
447
  teamId,
448
448
  user
449
449
  }) {
450
- const projects = (user.teams.find((t) => t.team.id === teamId)?.team.sites ?? []).map((t) => ({
450
+ const projects = (user.teams.find((t) => t.id === teamId)?.projects ?? []).map((t) => ({
451
451
  name: t.name,
452
452
  value: t.id
453
453
  }));
@@ -722,7 +722,7 @@ import mitt from "mitt";
722
722
 
723
723
  // src/sync/serializedDequal.ts
724
724
  var has = Object.prototype.hasOwnProperty;
725
- var ignoredProperties = /* @__PURE__ */ new Set(["created", "modified", "updated"]);
725
+ var ignoredProperties = /* @__PURE__ */ new Set(["created", "modified", "updated", "createdBy", "modifiedBy", "updatedBy"]);
726
726
  function serializedDequal(foo, bar) {
727
727
  let ctor, len;
728
728
  if (foo === bar) {
@@ -1033,8 +1033,8 @@ async function chooseTeam(user, prompt, telemetry) {
1033
1033
  const teamId = await select3({
1034
1034
  message: prompt,
1035
1035
  choices: user.teams.map((team) => ({
1036
- name: team.team.name,
1037
- value: team.team.id
1036
+ name: team.name,
1037
+ value: team.id
1038
1038
  }))
1039
1039
  });
1040
1040
  telemetry.send("team picked", { teamId });
@@ -1042,56 +1042,39 @@ async function chooseTeam(user, prompt, telemetry) {
1042
1042
  }
1043
1043
 
1044
1044
  // src/auth/user-info.ts
1045
+ import { ProjectClient } from "@uniformdev/canvas";
1045
1046
  import { gql, request } from "graphql-request";
1046
1047
  import * as z2 from "zod/v3";
1047
- var query = gql`
1048
- query GetUserInfo($subject: String!) {
1048
+ var identityQuery = gql`
1049
+ query GetUserIdentity($subject: String!) {
1049
1050
  info: identities_by_pk(subject: $subject) {
1050
1051
  name
1051
1052
  email_address
1052
- teams: organizations_identities(order_by: { organization: { name: asc } }) {
1053
- team: organization {
1054
- name
1055
- id
1056
- sites {
1057
- name
1058
- id
1059
- }
1060
- }
1061
- }
1062
1053
  }
1063
1054
  }
1064
1055
  `;
1065
- var schema = z2.object({
1056
+ var identitySchema = z2.object({
1066
1057
  info: z2.object({
1067
1058
  name: z2.string().min(1),
1068
- email_address: z2.string().min(1).nullable(),
1069
- teams: z2.array(
1070
- z2.object({
1071
- team: z2.object({
1072
- name: z2.string().min(1),
1073
- id: z2.string().min(1),
1074
- sites: z2.array(
1075
- z2.object({
1076
- name: z2.string().min(1),
1077
- id: z2.string().min(1)
1078
- })
1079
- )
1080
- })
1081
- })
1082
- )
1059
+ email_address: z2.string().min(1).nullable()
1083
1060
  })
1084
1061
  });
1085
1062
  var getUserInfo = async (baseUrl, authToken, subject) => {
1086
1063
  try {
1087
- const endpoint = makeUrl(baseUrl, "/v1/graphql");
1088
- const res = await request(endpoint, query, { subject }, { Authorization: `Bearer ${authToken}` });
1089
- const parseResult = schema.safeParse(res);
1090
- if (parseResult.success) {
1091
- return parseResult.data.info;
1092
- } else {
1093
- throw new Error(`Invalid GraphQL response: ${parseResult.error.message}`);
1064
+ const headers = { Authorization: `Bearer ${authToken}` };
1065
+ const projectClient = new ProjectClient({ apiHost: baseUrl, bearerToken: authToken });
1066
+ const [identityRes, projectsRes] = await Promise.all([
1067
+ request(makeUrl(baseUrl, "/v1/graphql"), identityQuery, { subject }, headers),
1068
+ projectClient.getProjects()
1069
+ ]);
1070
+ const identityParsed = identitySchema.safeParse(identityRes);
1071
+ if (!identityParsed.success) {
1072
+ throw new Error(`Invalid identity response: ${identityParsed.error.message}`);
1094
1073
  }
1074
+ return {
1075
+ ...identityParsed.data.info,
1076
+ teams: projectsRes.teams
1077
+ };
1095
1078
  } catch (err) {
1096
1079
  throw new Error(`Failed to fetch user account:
1097
1080
  ${err.message}`);
@@ -1124,7 +1107,7 @@ import { PostHog } from "posthog-node";
1124
1107
  // package.json
1125
1108
  var package_default = {
1126
1109
  name: "@uniformdev/cli",
1127
- version: "20.47.1",
1110
+ version: "20.56.0",
1128
1111
  description: "Uniform command line interface tool",
1129
1112
  license: "SEE LICENSE IN LICENSE.txt",
1130
1113
  main: "./cli.js",
@@ -1180,7 +1163,7 @@ var package_default = {
1180
1163
  open: "10.2.0",
1181
1164
  ora: "8.0.1",
1182
1165
  "p-queue": "7.3.4",
1183
- "posthog-node": "5.10.3",
1166
+ "posthog-node": "5.28.5",
1184
1167
  "registry-auth-token": "^5.0.0",
1185
1168
  "registry-url": "^6.0.0",
1186
1169
  slugify: "1.6.6",
@@ -1343,16 +1326,12 @@ function getMcpDirectory(agentType, customDir) {
1343
1326
  // src/commands/ai/lib/mcp.ts
1344
1327
  import { yellow as yellow2 } from "colorette";
1345
1328
  import { existsSync as existsSync3, readFileSync } from "fs";
1346
- function createUniformMcpServerConfig(apiKey, projectId, aiApiHost, apiHost) {
1329
+ function createUniformMcpServerConfig(apiKey, projectId, aiApiHost, _apiHost) {
1347
1330
  return {
1348
- type: "stdio",
1349
- command: "npx",
1350
- args: ["-y", "@uniformdev/uniform-mcp"],
1351
- env: {
1352
- UNIFORM_API_KEY: apiKey,
1353
- UNIFORM_PROJECT_ID: projectId,
1354
- UNIFORM_AI_API_HOST: aiApiHost,
1355
- UNIFORM_API_HOST: apiHost
1331
+ type: "streamable-http",
1332
+ url: `${aiApiHost}/projects/${projectId}/mcp`,
1333
+ headers: {
1334
+ "x-api-key": apiKey
1356
1335
  }
1357
1336
  };
1358
1337
  }
@@ -1407,8 +1386,8 @@ function getExistingServers(config2) {
1407
1386
  var InstallMcpCommand = {
1408
1387
  command: "install",
1409
1388
  describe: "Install Uniform MCP server configuration (use --team, --project, and --apiKey for non-interactive mode)",
1410
- builder: (yargs42) => withConfiguration(
1411
- yargs42.option("agent", {
1389
+ builder: (yargs43) => withConfiguration(
1390
+ yargs43.option("agent", {
1412
1391
  alias: "a",
1413
1392
  describe: "Specify agent type (cursor, claude, copilot, other)",
1414
1393
  type: "string",
@@ -1560,7 +1539,7 @@ Selected agent: ${agentType}`));
1560
1539
  if (isNonInteractive) {
1561
1540
  console.log(`\u{1F3E2} Team ID: ${teamId}`);
1562
1541
  } else {
1563
- console.log(`\u{1F3E2} Team: ${user.teams.find((t) => t.team.id === teamId)?.team.name}`);
1542
+ console.log(`\u{1F3E2} Team: ${user.teams.find((t) => t.id === teamId)?.name}`);
1564
1543
  }
1565
1544
  console.log(`\u{1F4E6} Project: ${projectName} (${projectId})`);
1566
1545
  if (agentType === "cursor") {
@@ -1608,7 +1587,7 @@ Selected agent: ${agentType}`));
1608
1587
  var McpCommand = {
1609
1588
  command: "mcp <command>",
1610
1589
  describe: "Uniform MCP server management commands",
1611
- builder: (yargs42) => yargs42.command(InstallMcpCommand).demandCommand(),
1590
+ builder: (yargs43) => yargs43.command(InstallMcpCommand).demandCommand(),
1612
1591
  handler: () => {
1613
1592
  yargs.showHelp();
1614
1593
  }
@@ -2083,8 +2062,8 @@ ${gray2("Rules source:")} https://github.com/uniformdev/ai-rules`);
2083
2062
  var InstallRulesCommand = {
2084
2063
  command: "install",
2085
2064
  describe: "Install Uniform AI rules for your development assistant",
2086
- builder: (yargs42) => withConfiguration(
2087
- yargs42.option("agent", {
2065
+ builder: (yargs43) => withConfiguration(
2066
+ yargs43.option("agent", {
2088
2067
  alias: "a",
2089
2068
  describe: "Specify agent type (cursor, claude, copilot, other)",
2090
2069
  type: "string",
@@ -2122,7 +2101,7 @@ import { blue as blue4, bold as bold2, gray as gray3, green as green5, red as re
2122
2101
  var ListRulesCommand = {
2123
2102
  command: "list",
2124
2103
  describe: "List available Uniform AI rules",
2125
- builder: (yargs42) => withConfiguration(yargs42),
2104
+ builder: (yargs43) => withConfiguration(yargs43),
2126
2105
  handler: async function() {
2127
2106
  const { stopAllSpinners, spin } = makeSpinner();
2128
2107
  try {
@@ -2151,7 +2130,7 @@ var ListRulesCommand = {
2151
2130
  var RulesCommand = {
2152
2131
  command: "rules <command>",
2153
2132
  describe: "Uniform AI rules management commands",
2154
- builder: (yargs42) => yargs42.command(InstallRulesCommand).command(ListRulesCommand).demandCommand(),
2133
+ builder: (yargs43) => yargs43.command(InstallRulesCommand).command(ListRulesCommand).demandCommand(),
2155
2134
  handler: () => {
2156
2135
  yargs2.showHelp();
2157
2136
  }
@@ -2161,14 +2140,14 @@ var RulesCommand = {
2161
2140
  var AiCommand = {
2162
2141
  command: "ai <command>",
2163
2142
  describe: "Uniform AI development assistant commands",
2164
- builder: (yargs42) => yargs42.command(RulesCommand).command(McpCommand).demandCommand(),
2143
+ builder: (yargs43) => yargs43.command(RulesCommand).command(McpCommand).demandCommand(),
2165
2144
  handler: () => {
2166
2145
  yargs3.showHelp();
2167
2146
  }
2168
2147
  };
2169
2148
 
2170
2149
  // src/commands/canvas/index.ts
2171
- import yargs20 from "yargs";
2150
+ import yargs21 from "yargs";
2172
2151
 
2173
2152
  // src/commands/canvas/commands/asset.ts
2174
2153
  import yargs4 from "yargs";
@@ -2200,12 +2179,12 @@ function getFileClient(options) {
2200
2179
  var AssetGetModule = {
2201
2180
  command: "get <id>",
2202
2181
  describe: "Get an asset",
2203
- builder: (yargs42) => withConfiguration(
2182
+ builder: (yargs43) => withConfiguration(
2204
2183
  withDebugOptions(
2205
2184
  withFormatOptions(
2206
2185
  withApiOptions(
2207
2186
  withProjectOptions(
2208
- yargs42.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
2187
+ yargs43.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
2209
2188
  )
2210
2189
  )
2211
2190
  )
@@ -2226,7 +2205,7 @@ var AssetGetModule = {
2226
2205
  var AssetListModule = {
2227
2206
  command: "list",
2228
2207
  describe: "List assets",
2229
- builder: (yargs42) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs42))))),
2208
+ builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
2230
2209
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
2231
2210
  const fetch2 = nodeFetchProxy(proxy, verbose);
2232
2211
  const client = getAssetClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -2480,7 +2459,7 @@ import {
2480
2459
  walkNodeTree,
2481
2460
  walkPropertyValues
2482
2461
  } from "@uniformdev/canvas";
2483
- var UNIFORM_FILE_MATCH = /"(https:\/\/([^"]*?)?(img|files)\.(eu\.)?uniform\.(rocks|global)\/([^"]*?))"/g;
2462
+ var UNIFORM_FILE_MATCH = /"(https:\/\/([^"]*?)?(img|files)\.(eu([1-9]\d*)?\.)?uniform\.(rocks|global)\/([^"]*?))"/g;
2484
2463
  var walkFileUrlsForCompositionOrEntry = ({
2485
2464
  entity,
2486
2465
  callback
@@ -2616,6 +2595,15 @@ var compareCompositionsOrEntriesWithoutAssetUrls = (source, target) => {
2616
2595
  removeUrlsFromAssetParameters(structuredClone(target.object))
2617
2596
  );
2618
2597
  };
2598
+ var PUBLISH_TIMESTAMP_TOLERANCE_MS = 2e3;
2599
+ var compareCompositionsOrEntriesWithoutAssetUrlsForPublishing = (source, target) => {
2600
+ const sourceModified = new Date(source.object.modified).getTime();
2601
+ const targetModified = new Date(target.object.modified).getTime();
2602
+ if (sourceModified - targetModified > PUBLISH_TIMESTAMP_TOLERANCE_MS) {
2603
+ return false;
2604
+ }
2605
+ return compareCompositionsOrEntriesWithoutAssetUrls(source, target);
2606
+ };
2619
2607
  var removeUrlFromAsset = (asset) => {
2620
2608
  if (asset.asset.fields?.url?.value) {
2621
2609
  asset.asset.fields.url.value = "";
@@ -2754,7 +2742,7 @@ var escapeRegExp = (string4) => {
2754
2742
  var findUrlMatchingPartialPathname = (source, pathname) => {
2755
2743
  const escapedPathname = escapeRegExp(pathname);
2756
2744
  const regex = new RegExp(
2757
- `"(https://([^"]*?)?(img|files).uniform.(rocks|global)${escapedPathname}([^"]*?))"`
2745
+ `"(https://([^"]*?)?(img|files).(eu([1-9]\\d*)?\\.)?uniform.(rocks|global)${escapedPathname}([^"]*?))"`
2758
2746
  );
2759
2747
  const match = source.match(regex);
2760
2748
  if (match && match[1]) {
@@ -2779,8 +2767,8 @@ function prepCompositionForDisk(composition) {
2779
2767
  delete prepped.state;
2780
2768
  return prepped;
2781
2769
  }
2782
- function withStateOptions(yargs42, defaultState = "preview") {
2783
- return yargs42.option("state", {
2770
+ function withStateOptions(yargs43, defaultState = "preview") {
2771
+ return yargs43.option("state", {
2784
2772
  type: "string",
2785
2773
  describe: `State to fetch.`,
2786
2774
  choices: ["preview", "published"],
@@ -2862,12 +2850,12 @@ function writeCanvasPackage(filename, packageContents) {
2862
2850
  var AssetPullModule = {
2863
2851
  command: "pull <directory>",
2864
2852
  describe: "Pulls all assets to local files in a directory",
2865
- builder: (yargs42) => withConfiguration(
2853
+ builder: (yargs43) => withConfiguration(
2866
2854
  withApiOptions(
2867
2855
  withDebugOptions(
2868
2856
  withProjectOptions(
2869
2857
  withDiffOptions(
2870
- yargs42.positional("directory", {
2858
+ yargs43.positional("directory", {
2871
2859
  describe: "Directory to save the assets to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2872
2860
  type: "string"
2873
2861
  }).option("format", {
@@ -2979,12 +2967,12 @@ var AssetPullModule = {
2979
2967
  var AssetPushModule = {
2980
2968
  command: "push <directory>",
2981
2969
  describe: "Pushes all assets from files in a directory to Uniform",
2982
- builder: (yargs42) => withConfiguration(
2970
+ builder: (yargs43) => withConfiguration(
2983
2971
  withApiOptions(
2984
2972
  withDebugOptions(
2985
2973
  withProjectOptions(
2986
2974
  withDiffOptions(
2987
- yargs42.positional("directory", {
2975
+ yargs43.positional("directory", {
2988
2976
  describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
2989
2977
  type: "string"
2990
2978
  }).option("mode", {
@@ -3108,10 +3096,10 @@ var AssetRemoveModule = {
3108
3096
  command: "remove <id>",
3109
3097
  aliases: ["delete", "rm"],
3110
3098
  describe: "Delete an asset",
3111
- builder: (yargs42) => withConfiguration(
3099
+ builder: (yargs43) => withConfiguration(
3112
3100
  withDebugOptions(
3113
3101
  withApiOptions(
3114
- withProjectOptions(yargs42.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
3102
+ withProjectOptions(yargs43.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
3115
3103
  )
3116
3104
  )
3117
3105
  ),
@@ -3132,11 +3120,11 @@ var AssetUpdateModule = {
3132
3120
  command: "update <filename>",
3133
3121
  aliases: ["put"],
3134
3122
  describe: "Insert or update an asset",
3135
- builder: (yargs42) => withConfiguration(
3123
+ builder: (yargs43) => withConfiguration(
3136
3124
  withDebugOptions(
3137
3125
  withApiOptions(
3138
3126
  withProjectOptions(
3139
- yargs42.positional("filename", { demandOption: true, describe: "Asset file to put" })
3127
+ yargs43.positional("filename", { demandOption: true, describe: "Asset file to put" })
3140
3128
  )
3141
3129
  )
3142
3130
  )
@@ -3162,7 +3150,7 @@ var AssetUpdateModule = {
3162
3150
  var AssetModule = {
3163
3151
  command: "asset <command>",
3164
3152
  describe: "Commands for Assets",
3165
- builder: (yargs42) => yargs42.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
3153
+ builder: (yargs43) => yargs43.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
3166
3154
  handler: () => {
3167
3155
  yargs4.help();
3168
3156
  }
@@ -3183,12 +3171,12 @@ function getCategoryClient(options) {
3183
3171
  var CategoryGetModule = {
3184
3172
  command: "get <id>",
3185
3173
  describe: "Fetch a category",
3186
- builder: (yargs42) => withConfiguration(
3174
+ builder: (yargs43) => withConfiguration(
3187
3175
  withFormatOptions(
3188
3176
  withDebugOptions(
3189
3177
  withApiOptions(
3190
3178
  withProjectOptions(
3191
- yargs42.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
3179
+ yargs43.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
3192
3180
  )
3193
3181
  )
3194
3182
  )
@@ -3213,8 +3201,8 @@ var CategoryListModule = {
3213
3201
  command: "list",
3214
3202
  describe: "List categories",
3215
3203
  aliases: ["ls"],
3216
- builder: (yargs42) => withConfiguration(
3217
- withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs42.options({})))))
3204
+ builder: (yargs43) => withConfiguration(
3205
+ withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs43.options({})))))
3218
3206
  ),
3219
3207
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
3220
3208
  const fetch2 = nodeFetchProxy(proxy, verbose);
@@ -3258,12 +3246,12 @@ function createCategoriesEngineDataSource({
3258
3246
  var CategoryPullModule = {
3259
3247
  command: "pull <directory>",
3260
3248
  describe: "Pulls all categories to local files in a directory",
3261
- builder: (yargs42) => withConfiguration(
3249
+ builder: (yargs43) => withConfiguration(
3262
3250
  withApiOptions(
3263
3251
  withProjectOptions(
3264
3252
  withDiffOptions(
3265
3253
  withDebugOptions(
3266
- yargs42.positional("directory", {
3254
+ yargs43.positional("directory", {
3267
3255
  describe: "Directory to save the categories to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
3268
3256
  type: "string"
3269
3257
  }).option("format", {
@@ -3338,12 +3326,12 @@ var CategoryPullModule = {
3338
3326
  var CategoryPushModule = {
3339
3327
  command: "push <directory>",
3340
3328
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
3341
- builder: (yargs42) => withConfiguration(
3329
+ builder: (yargs43) => withConfiguration(
3342
3330
  withApiOptions(
3343
3331
  withDebugOptions(
3344
3332
  withProjectOptions(
3345
3333
  withDiffOptions(
3346
- yargs42.positional("directory", {
3334
+ yargs43.positional("directory", {
3347
3335
  describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
3348
3336
  type: "string"
3349
3337
  }).option("mode", {
@@ -3407,11 +3395,11 @@ var CategoryRemoveModule = {
3407
3395
  command: "remove <id>",
3408
3396
  aliases: ["delete", "rm"],
3409
3397
  describe: "Delete a category",
3410
- builder: (yargs42) => withConfiguration(
3398
+ builder: (yargs43) => withConfiguration(
3411
3399
  withApiOptions(
3412
3400
  withDebugOptions(
3413
3401
  withProjectOptions(
3414
- yargs42.positional("id", { demandOption: true, describe: "Category UUID to delete" })
3402
+ yargs43.positional("id", { demandOption: true, describe: "Category UUID to delete" })
3415
3403
  )
3416
3404
  )
3417
3405
  )
@@ -3432,11 +3420,11 @@ var CategoryUpdateModule = {
3432
3420
  command: "update <filename>",
3433
3421
  aliases: ["put"],
3434
3422
  describe: "Insert or update a category",
3435
- builder: (yargs42) => withConfiguration(
3423
+ builder: (yargs43) => withConfiguration(
3436
3424
  withApiOptions(
3437
3425
  withDebugOptions(
3438
3426
  withProjectOptions(
3439
- yargs42.positional("filename", { demandOption: true, describe: "Category file to put" })
3427
+ yargs43.positional("filename", { demandOption: true, describe: "Category file to put" })
3440
3428
  )
3441
3429
  )
3442
3430
  )
@@ -3458,7 +3446,7 @@ var CategoryModule = {
3458
3446
  command: "category <command>",
3459
3447
  aliases: ["cat"],
3460
3448
  describe: "Commands for Canvas categories",
3461
- builder: (yargs42) => yargs42.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
3449
+ builder: (yargs43) => yargs43.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
3462
3450
  handler: () => {
3463
3451
  yargs5.help();
3464
3452
  }
@@ -3480,12 +3468,12 @@ function getCanvasClient(options) {
3480
3468
  var ComponentGetModule = {
3481
3469
  command: "get <id>",
3482
3470
  describe: "Fetch a component definition",
3483
- builder: (yargs42) => withConfiguration(
3471
+ builder: (yargs43) => withConfiguration(
3484
3472
  withFormatOptions(
3485
3473
  withDebugOptions(
3486
3474
  withApiOptions(
3487
3475
  withProjectOptions(
3488
- yargs42.positional("id", {
3476
+ yargs43.positional("id", {
3489
3477
  demandOption: true,
3490
3478
  describe: "Component definition public ID to fetch"
3491
3479
  })
@@ -3519,12 +3507,12 @@ var ComponentListModule = {
3519
3507
  command: "list",
3520
3508
  describe: "List component definitions",
3521
3509
  aliases: ["ls"],
3522
- builder: (yargs42) => withConfiguration(
3510
+ builder: (yargs43) => withConfiguration(
3523
3511
  withFormatOptions(
3524
3512
  withDebugOptions(
3525
3513
  withApiOptions(
3526
3514
  withProjectOptions(
3527
- yargs42.options({
3515
+ yargs43.options({
3528
3516
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
3529
3517
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
3530
3518
  })
@@ -3593,12 +3581,12 @@ function createComponentDefinitionEngineDataSource({
3593
3581
  var ComponentPullModule = {
3594
3582
  command: "pull <directory>",
3595
3583
  describe: "Pulls all component definitions to local files in a directory",
3596
- builder: (yargs42) => withConfiguration(
3584
+ builder: (yargs43) => withConfiguration(
3597
3585
  withApiOptions(
3598
3586
  withDebugOptions(
3599
3587
  withProjectOptions(
3600
3588
  withDiffOptions(
3601
- yargs42.positional("directory", {
3589
+ yargs43.positional("directory", {
3602
3590
  describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
3603
3591
  type: "string"
3604
3592
  }).option("format", {
@@ -3674,12 +3662,12 @@ var ComponentPullModule = {
3674
3662
  var ComponentPushModule = {
3675
3663
  command: "push <directory>",
3676
3664
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
3677
- builder: (yargs42) => withConfiguration(
3665
+ builder: (yargs43) => withConfiguration(
3678
3666
  withApiOptions(
3679
3667
  withDebugOptions(
3680
3668
  withProjectOptions(
3681
3669
  withDiffOptions(
3682
- yargs42.positional("directory", {
3670
+ yargs43.positional("directory", {
3683
3671
  describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
3684
3672
  type: "string"
3685
3673
  }).option("mode", {
@@ -3744,11 +3732,11 @@ var ComponentRemoveModule = {
3744
3732
  command: "remove <id>",
3745
3733
  aliases: ["delete", "rm"],
3746
3734
  describe: "Delete a component definition",
3747
- builder: (yargs42) => withConfiguration(
3735
+ builder: (yargs43) => withConfiguration(
3748
3736
  withDebugOptions(
3749
3737
  withApiOptions(
3750
3738
  withProjectOptions(
3751
- yargs42.positional("id", {
3739
+ yargs43.positional("id", {
3752
3740
  demandOption: true,
3753
3741
  describe: "Component definition public ID to delete"
3754
3742
  })
@@ -3772,11 +3760,11 @@ var ComponentUpdateModule = {
3772
3760
  command: "update <filename>",
3773
3761
  aliases: ["put"],
3774
3762
  describe: "Insert or update a component definition",
3775
- builder: (yargs42) => withConfiguration(
3763
+ builder: (yargs43) => withConfiguration(
3776
3764
  withApiOptions(
3777
3765
  withDebugOptions(
3778
3766
  withProjectOptions(
3779
- yargs42.positional("filename", { demandOption: true, describe: "Component definition file to put" })
3767
+ yargs43.positional("filename", { demandOption: true, describe: "Component definition file to put" })
3780
3768
  )
3781
3769
  )
3782
3770
  )
@@ -3798,7 +3786,7 @@ var ComponentModule = {
3798
3786
  command: "component <command>",
3799
3787
  aliases: ["def"],
3800
3788
  describe: "Commands for Canvas component definitions",
3801
- builder: (yargs42) => yargs42.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
3789
+ builder: (yargs43) => yargs43.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
3802
3790
  handler: () => {
3803
3791
  yargs6.help();
3804
3792
  }
@@ -3811,13 +3799,13 @@ import yargs7 from "yargs";
3811
3799
  var CompositionGetModule = {
3812
3800
  command: "get <id>",
3813
3801
  describe: "Fetch a composition",
3814
- builder: (yargs42) => withFormatOptions(
3802
+ builder: (yargs43) => withFormatOptions(
3815
3803
  withConfiguration(
3816
3804
  withApiOptions(
3817
3805
  withProjectOptions(
3818
3806
  withStateOptions(
3819
3807
  withDebugOptions(
3820
- yargs42.positional("id", {
3808
+ yargs43.positional("id", {
3821
3809
  demandOption: true,
3822
3810
  describe: "Composition/pattern public ID to fetch"
3823
3811
  }).option({
@@ -3907,13 +3895,13 @@ var CompositionListModule = {
3907
3895
  command: "list",
3908
3896
  describe: "List compositions",
3909
3897
  aliases: ["ls"],
3910
- builder: (yargs42) => withFormatOptions(
3898
+ builder: (yargs43) => withFormatOptions(
3911
3899
  withConfiguration(
3912
3900
  withApiOptions(
3913
3901
  withProjectOptions(
3914
3902
  withDebugOptions(
3915
3903
  withStateOptions(
3916
- yargs42.options({
3904
+ yargs43.options({
3917
3905
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
3918
3906
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
3919
3907
  search: { describe: "Search query", type: "string", default: "" },
@@ -3994,13 +3982,13 @@ var CompositionListModule = {
3994
3982
  var ComponentPatternListModule = {
3995
3983
  ...CompositionListModule,
3996
3984
  describe: "List component patterns",
3997
- builder: (yargs42) => withFormatOptions(
3985
+ builder: (yargs43) => withFormatOptions(
3998
3986
  withConfiguration(
3999
3987
  withApiOptions(
4000
3988
  withDebugOptions(
4001
3989
  withProjectOptions(
4002
3990
  withStateOptions(
4003
- yargs42.options({
3991
+ yargs43.options({
4004
3992
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
4005
3993
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
4006
3994
  resolvePatterns: {
@@ -4123,12 +4111,12 @@ function createComponentInstanceEngineDataSource({
4123
4111
  var CompositionPublishModule = {
4124
4112
  command: "publish [ids]",
4125
4113
  describe: "Publishes composition(s)",
4126
- builder: (yargs42) => withConfiguration(
4114
+ builder: (yargs43) => withConfiguration(
4127
4115
  withApiOptions(
4128
4116
  withProjectOptions(
4129
4117
  withDebugOptions(
4130
4118
  withDiffOptions(
4131
- yargs42.positional("ids", {
4119
+ yargs43.positional("ids", {
4132
4120
  describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4133
4121
  type: "string"
4134
4122
  }).option("all", {
@@ -4205,7 +4193,7 @@ var CompositionPublishModule = {
4205
4193
  fileClient
4206
4194
  });
4207
4195
  },
4208
- compareContents: compareCompositionsOrEntriesWithoutAssetUrls,
4196
+ compareContents: compareCompositionsOrEntriesWithoutAssetUrlsForPublishing,
4209
4197
  onBeforeWriteObject: async (sourceObject) => {
4210
4198
  return uploadFilesForCompositionOrEntry({
4211
4199
  entity: sourceObject,
@@ -4221,12 +4209,12 @@ var CompositionPublishModule = {
4221
4209
  var ComponentPatternPublishModule = {
4222
4210
  ...CompositionPublishModule,
4223
4211
  describe: "Publishes component pattern(s)",
4224
- builder: (yargs42) => withConfiguration(
4212
+ builder: (yargs43) => withConfiguration(
4225
4213
  withApiOptions(
4226
4214
  withDebugOptions(
4227
4215
  withProjectOptions(
4228
4216
  withDiffOptions(
4229
- yargs42.positional("ids", {
4217
+ yargs43.positional("ids", {
4230
4218
  describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4231
4219
  type: "string"
4232
4220
  }).option("all", {
@@ -4266,13 +4254,13 @@ function componentInstancePullModuleFactory(type) {
4266
4254
  return {
4267
4255
  command: "pull <directory>",
4268
4256
  describe: "Pulls all compositions to local files in a directory",
4269
- builder: (yargs42) => withConfiguration(
4257
+ builder: (yargs43) => withConfiguration(
4270
4258
  withApiOptions(
4271
4259
  withProjectOptions(
4272
4260
  withStateOptions(
4273
4261
  withDebugOptions(
4274
4262
  withDiffOptions(
4275
- yargs42.positional("directory", {
4263
+ yargs43.positional("directory", {
4276
4264
  describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
4277
4265
  type: "string"
4278
4266
  }).option("format", {
@@ -4387,13 +4375,13 @@ function componentInstancePullModuleFactory(type) {
4387
4375
  var ComponentPatternPullModule = {
4388
4376
  ...componentInstancePullModuleFactory("componentPatterns"),
4389
4377
  describe: "Pulls all component patterns to local files in a directory",
4390
- builder: (yargs42) => withConfiguration(
4378
+ builder: (yargs43) => withConfiguration(
4391
4379
  withApiOptions(
4392
4380
  withProjectOptions(
4393
4381
  withDebugOptions(
4394
4382
  withStateOptions(
4395
4383
  withDiffOptions(
4396
- yargs42.positional("directory", {
4384
+ yargs43.positional("directory", {
4397
4385
  describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
4398
4386
  type: "string"
4399
4387
  }).option("format", {
@@ -4467,13 +4455,13 @@ function componentInstancePushModuleFactory(type) {
4467
4455
  return {
4468
4456
  command: "push <directory>",
4469
4457
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
4470
- builder: (yargs42) => withConfiguration(
4458
+ builder: (yargs43) => withConfiguration(
4471
4459
  withApiOptions(
4472
4460
  withProjectOptions(
4473
4461
  withStateOptions(
4474
4462
  withDebugOptions(
4475
4463
  withDiffOptions(
4476
- yargs42.positional("directory", {
4464
+ yargs43.positional("directory", {
4477
4465
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4478
4466
  type: "string"
4479
4467
  }).option("mode", {
@@ -4587,13 +4575,13 @@ function componentInstancePushModuleFactory(type) {
4587
4575
  var ComponentPatternPushModule = {
4588
4576
  ...componentInstancePushModuleFactory("componentPatterns"),
4589
4577
  describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
4590
- builder: (yargs42) => withConfiguration(
4578
+ builder: (yargs43) => withConfiguration(
4591
4579
  withApiOptions(
4592
4580
  withProjectOptions(
4593
4581
  withStateOptions(
4594
4582
  withDiffOptions(
4595
4583
  withDebugOptions(
4596
- yargs42.positional("directory", {
4584
+ yargs43.positional("directory", {
4597
4585
  describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
4598
4586
  type: "string"
4599
4587
  }).option("mode", {
@@ -4627,11 +4615,11 @@ var CompositionRemoveModule = {
4627
4615
  command: "remove <id>",
4628
4616
  aliases: ["delete", "rm"],
4629
4617
  describe: "Delete a composition",
4630
- builder: (yargs42) => withConfiguration(
4618
+ builder: (yargs43) => withConfiguration(
4631
4619
  withApiOptions(
4632
4620
  withDebugOptions(
4633
4621
  withProjectOptions(
4634
- yargs42.positional("id", {
4622
+ yargs43.positional("id", {
4635
4623
  demandOption: true,
4636
4624
  describe: "Composition/pattern public ID to delete"
4637
4625
  })
@@ -4660,29 +4648,32 @@ var ComponentPatternRemoveModule = {
4660
4648
  };
4661
4649
 
4662
4650
  // src/commands/canvas/commands/composition/unpublish.ts
4663
- import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE2 } from "@uniformdev/canvas";
4651
+ import {
4652
+ ApiClientError,
4653
+ CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE2
4654
+ } from "@uniformdev/canvas";
4664
4655
  import { diffJson as diffJson2 } from "diff";
4665
4656
  var CompositionUnpublishModule = {
4666
4657
  command: "unpublish [ids]",
4667
4658
  describe: "Unpublish a composition(s)",
4668
- builder: (yargs42) => withConfiguration(
4659
+ builder: (yargs43) => withConfiguration(
4669
4660
  withApiOptions(
4670
4661
  withDebugOptions(
4671
4662
  withProjectOptions(
4672
- yargs42.positional("ids", {
4663
+ yargs43.positional("ids", {
4673
4664
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4674
4665
  type: "string"
4675
4666
  }).option("all", {
4676
4667
  alias: ["a"],
4677
- describe: "Un-publishes all compositions. Use compositionId to publish one instead.",
4668
+ describe: "Un-publishes all compositions. Use composition ID(s) to unpublish specific one(s) instead.",
4678
4669
  default: false,
4679
4670
  type: "boolean"
4680
4671
  }).option("onlyCompositions", {
4681
- describe: "Only publishing compositions and not patterns",
4672
+ describe: "Only un-publishing compositions and not patterns",
4682
4673
  default: false,
4683
4674
  type: "boolean"
4684
4675
  }).option("onlyPatterns", {
4685
- describe: "Only pulling patterns and not compositions",
4676
+ describe: "Only un-publishing patterns and not compositions",
4686
4677
  default: false,
4687
4678
  type: "boolean",
4688
4679
  hidden: true
@@ -4705,7 +4696,7 @@ var CompositionUnpublishModule = {
4705
4696
  verbose
4706
4697
  }) => {
4707
4698
  if (!all && !ids || all && ids) {
4708
- console.error(`Specify --all or composition ID(s) to publish.`);
4699
+ console.error(`Specify --all or composition ID(s) to unpublish.`);
4709
4700
  process.exit(1);
4710
4701
  }
4711
4702
  const compositionIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
@@ -4730,7 +4721,6 @@ var CompositionUnpublishModule = {
4730
4721
  patternType,
4731
4722
  verbose
4732
4723
  });
4733
- const actions = [];
4734
4724
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
4735
4725
  for await (const obj of target.objects) {
4736
4726
  if (Array.isArray(obj.id)) {
@@ -4739,16 +4729,30 @@ var CompositionUnpublishModule = {
4739
4729
  targetItems.set(obj.id, obj);
4740
4730
  }
4741
4731
  }
4732
+ const toUnpublish = [];
4742
4733
  for await (const sourceObject of source.objects) {
4734
+ toUnpublish.push(sourceObject);
4735
+ }
4736
+ const actions = [];
4737
+ for (const sourceObject of toUnpublish) {
4743
4738
  const id = Array.isArray(sourceObject.id) ? sourceObject.id[0] : sourceObject.id;
4744
4739
  const targetObject = targetItems.get(id);
4745
4740
  if (!targetObject) {
4746
- console.log(`Composition ${id} was not found`);
4747
- return;
4741
+ console.log(`Composition ${id} did not have a draft (removing published)`);
4748
4742
  }
4749
- console.log(`\u{1F41B} unpublishing composition: (id: ${id})`);
4750
4743
  if (!whatIf) {
4751
- actions.push(client.removeComposition({ compositionId: id, state: CANVAS_PUBLISHED_STATE2 }));
4744
+ actions.push(
4745
+ client.removeComposition({ ...parseCompositionSerializedId(id), state: CANVAS_PUBLISHED_STATE2 }).catch((err) => {
4746
+ const isNotFound = err instanceof ApiClientError && err.statusCode === 404;
4747
+ if (isNotFound) {
4748
+ console.warn(
4749
+ `Composition ${id} was not found when unpublishing (may already be unpublished or orphaned); skipping.`
4750
+ );
4751
+ return;
4752
+ }
4753
+ throw err;
4754
+ })
4755
+ );
4752
4756
  }
4753
4757
  log2({
4754
4758
  action: "update",
@@ -4756,9 +4760,10 @@ var CompositionUnpublishModule = {
4756
4760
  providerId: sourceObject.providerId,
4757
4761
  displayName: sourceObject.displayName ?? sourceObject.providerId,
4758
4762
  whatIf,
4759
- diff: () => diffJson2(targetObject.object, sourceObject.object)
4763
+ diff: () => targetObject ? diffJson2(targetObject.object, sourceObject.object) : []
4760
4764
  });
4761
4765
  }
4766
+ await Promise.all(actions);
4762
4767
  }
4763
4768
  };
4764
4769
 
@@ -4766,16 +4771,16 @@ var CompositionUnpublishModule = {
4766
4771
  var ComponentPatternUnpublishModule = {
4767
4772
  command: "unpublish [ids]",
4768
4773
  describe: "Unpublish a component pattern(s)",
4769
- builder: (yargs42) => withConfiguration(
4774
+ builder: (yargs43) => withConfiguration(
4770
4775
  withApiOptions(
4771
4776
  withDebugOptions(
4772
4777
  withProjectOptions(
4773
- yargs42.positional("ids", {
4778
+ yargs43.positional("ids", {
4774
4779
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4775
4780
  type: "string"
4776
4781
  }).option("all", {
4777
4782
  alias: ["a"],
4778
- describe: "Un-publishes all compositions. Use compositionId to publish one instead.",
4783
+ describe: "Un-publishes all component patterns. Use composition ID(s) to unpublish specific one(s) instead.",
4779
4784
  default: false,
4780
4785
  type: "boolean"
4781
4786
  }).option("onlyCompositions", {
@@ -4804,12 +4809,12 @@ var CompositionUpdateModule = {
4804
4809
  command: "update <filename>",
4805
4810
  aliases: ["put"],
4806
4811
  describe: "Insert or update a composition",
4807
- builder: (yargs42) => withConfiguration(
4812
+ builder: (yargs43) => withConfiguration(
4808
4813
  withApiOptions(
4809
4814
  withProjectOptions(
4810
4815
  withDebugOptions(
4811
4816
  withStateOptions(
4812
- yargs42.positional("filename", {
4817
+ yargs43.positional("filename", {
4813
4818
  demandOption: true,
4814
4819
  describe: "Composition/pattern file to put"
4815
4820
  })
@@ -4847,7 +4852,7 @@ var ComponentPatternUpdateModule = {
4847
4852
  var ComponentPatternModule = {
4848
4853
  command: "component-pattern <command>",
4849
4854
  describe: "Commands for Canvas component patterns",
4850
- builder: (yargs42) => yargs42.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
4855
+ builder: (yargs43) => yargs43.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
4851
4856
  handler: () => {
4852
4857
  yargs7.help();
4853
4858
  }
@@ -4859,7 +4864,7 @@ var CompositionModule = {
4859
4864
  command: "composition <command>",
4860
4865
  describe: "Commands for Canvas compositions",
4861
4866
  aliases: ["comp"],
4862
- builder: (yargs42) => yargs42.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
4867
+ builder: (yargs43) => yargs43.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
4863
4868
  handler: () => {
4864
4869
  yargs8.help();
4865
4870
  }
@@ -4878,13 +4883,13 @@ var CompositionPatternGetModule = {
4878
4883
  var CompositionPatternListModule = {
4879
4884
  ...CompositionListModule,
4880
4885
  describe: "List composition patterns",
4881
- builder: (yargs42) => withFormatOptions(
4886
+ builder: (yargs43) => withFormatOptions(
4882
4887
  withConfiguration(
4883
4888
  withApiOptions(
4884
4889
  withDebugOptions(
4885
4890
  withProjectOptions(
4886
4891
  withStateOptions(
4887
- yargs42.options({
4892
+ yargs43.options({
4888
4893
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
4889
4894
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
4890
4895
  resolvePatterns: {
@@ -4928,12 +4933,12 @@ var CompositionPatternListModule = {
4928
4933
  var CompositionPatternPublishModule = {
4929
4934
  ...CompositionPublishModule,
4930
4935
  describe: "Publishes composition pattern(s)",
4931
- builder: (yargs42) => withConfiguration(
4936
+ builder: (yargs43) => withConfiguration(
4932
4937
  withApiOptions(
4933
4938
  withDebugOptions(
4934
4939
  withProjectOptions(
4935
4940
  withDiffOptions(
4936
- yargs42.positional("ids", {
4941
+ yargs43.positional("ids", {
4937
4942
  describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4938
4943
  type: "string"
4939
4944
  }).option("all", {
@@ -4972,13 +4977,13 @@ var CompositionPatternPublishModule = {
4972
4977
  var CompositionPatternPullModule = {
4973
4978
  ...componentInstancePullModuleFactory("compositionPatterns"),
4974
4979
  describe: "Pulls all composition patterns to local files in a directory",
4975
- builder: (yargs42) => withConfiguration(
4980
+ builder: (yargs43) => withConfiguration(
4976
4981
  withApiOptions(
4977
4982
  withDebugOptions(
4978
4983
  withProjectOptions(
4979
4984
  withStateOptions(
4980
4985
  withDiffOptions(
4981
- yargs42.positional("directory", {
4986
+ yargs43.positional("directory", {
4982
4987
  describe: "Directory to save the composition patterns to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
4983
4988
  type: "string"
4984
4989
  }).option("format", {
@@ -5016,13 +5021,13 @@ var CompositionPatternPullModule = {
5016
5021
  var CompositionPatternPushModule = {
5017
5022
  ...componentInstancePushModuleFactory("compositionPatterns"),
5018
5023
  describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
5019
- builder: (yargs42) => withConfiguration(
5024
+ builder: (yargs43) => withConfiguration(
5020
5025
  withApiOptions(
5021
5026
  withDebugOptions(
5022
5027
  withProjectOptions(
5023
5028
  withStateOptions(
5024
5029
  withDiffOptions(
5025
- yargs42.positional("directory", {
5030
+ yargs43.positional("directory", {
5026
5031
  describe: "Directory to read the compositions patterns from. If a filename is used, a package will be read instead.",
5027
5032
  type: "string"
5028
5033
  }).option("mode", {
@@ -5061,16 +5066,16 @@ var CompositionPatternRemoveModule = {
5061
5066
  var CompositionPatternUnpublishModule = {
5062
5067
  command: "unpublish [ids]",
5063
5068
  describe: "Unpublish a composition pattern(s)",
5064
- builder: (yargs42) => withConfiguration(
5069
+ builder: (yargs43) => withConfiguration(
5065
5070
  withApiOptions(
5066
5071
  withDebugOptions(
5067
5072
  withProjectOptions(
5068
- yargs42.positional("ids", {
5073
+ yargs43.positional("ids", {
5069
5074
  describe: "Un-publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
5070
5075
  type: "string"
5071
5076
  }).option("all", {
5072
5077
  alias: ["a"],
5073
- describe: "Un-publishes all compositions. Use compositionId to publish one instead.",
5078
+ describe: "Un-publishes all composition patterns. Use composition ID(s) to unpublish specific one(s) instead.",
5074
5079
  default: false,
5075
5080
  type: "boolean"
5076
5081
  }).option("onlyCompositions", {
@@ -5101,7 +5106,7 @@ var CompositionPatternUpdateModule = {
5101
5106
  var CompositionPatternModule = {
5102
5107
  command: "composition-pattern <command>",
5103
5108
  describe: "Commands for Canvas composition patterns",
5104
- builder: (yargs42) => yargs42.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
5109
+ builder: (yargs43) => yargs43.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
5105
5110
  handler: () => {
5106
5111
  yargs9.help();
5107
5112
  }
@@ -5122,12 +5127,12 @@ function getContentClient(options) {
5122
5127
  var ContentTypeGetModule = {
5123
5128
  command: "get <id>",
5124
5129
  describe: "Get a content type",
5125
- builder: (yargs42) => withConfiguration(
5130
+ builder: (yargs43) => withConfiguration(
5126
5131
  withDebugOptions(
5127
5132
  withFormatOptions(
5128
5133
  withApiOptions(
5129
5134
  withProjectOptions(
5130
- yargs42.positional("id", {
5135
+ yargs43.positional("id", {
5131
5136
  demandOption: true,
5132
5137
  describe: "Content type public ID to fetch"
5133
5138
  })
@@ -5152,7 +5157,7 @@ var ContentTypeGetModule = {
5152
5157
  var ContentTypeListModule = {
5153
5158
  command: "list",
5154
5159
  describe: "List content types",
5155
- builder: (yargs42) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs42))))),
5160
+ builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
5156
5161
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
5157
5162
  const fetch2 = nodeFetchProxy(proxy, verbose);
5158
5163
  const client = getContentClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -5193,12 +5198,12 @@ function createContentTypeEngineDataSource({
5193
5198
  var ContentTypePullModule = {
5194
5199
  command: "pull <directory>",
5195
5200
  describe: "Pulls all content types to local files in a directory",
5196
- builder: (yargs42) => withConfiguration(
5201
+ builder: (yargs43) => withConfiguration(
5197
5202
  withApiOptions(
5198
5203
  withDebugOptions(
5199
5204
  withProjectOptions(
5200
5205
  withDiffOptions(
5201
- yargs42.positional("directory", {
5206
+ yargs43.positional("directory", {
5202
5207
  describe: "Directory to save the content types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5203
5208
  type: "string"
5204
5209
  }).option("format", {
@@ -5278,12 +5283,12 @@ var ContentTypePullModule = {
5278
5283
  var ContentTypePushModule = {
5279
5284
  command: "push <directory>",
5280
5285
  describe: "Pushes all content types from files in a directory to Uniform",
5281
- builder: (yargs42) => withConfiguration(
5286
+ builder: (yargs43) => withConfiguration(
5282
5287
  withApiOptions(
5283
5288
  withDebugOptions(
5284
5289
  withProjectOptions(
5285
5290
  withDiffOptions(
5286
- yargs42.positional("directory", {
5291
+ yargs43.positional("directory", {
5287
5292
  describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
5288
5293
  type: "string"
5289
5294
  }).option("what-if", {
@@ -5357,11 +5362,11 @@ var ContentTypeRemoveModule = {
5357
5362
  command: "remove <id>",
5358
5363
  aliases: ["delete", "rm"],
5359
5364
  describe: "Delete a content type",
5360
- builder: (yargs42) => withConfiguration(
5365
+ builder: (yargs43) => withConfiguration(
5361
5366
  withDebugOptions(
5362
5367
  withApiOptions(
5363
5368
  withProjectOptions(
5364
- yargs42.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
5369
+ yargs43.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
5365
5370
  )
5366
5371
  )
5367
5372
  )
@@ -5382,11 +5387,11 @@ var ContentTypeUpdateModule = {
5382
5387
  command: "update <filename>",
5383
5388
  aliases: ["put"],
5384
5389
  describe: "Insert or update a content type",
5385
- builder: (yargs42) => withConfiguration(
5390
+ builder: (yargs43) => withConfiguration(
5386
5391
  withDebugOptions(
5387
5392
  withApiOptions(
5388
5393
  withProjectOptions(
5389
- yargs42.positional("filename", { demandOption: true, describe: "Content type file to put" })
5394
+ yargs43.positional("filename", { demandOption: true, describe: "Content type file to put" })
5390
5395
  )
5391
5396
  )
5392
5397
  )
@@ -5408,7 +5413,7 @@ var ContentTypeModule = {
5408
5413
  command: "contenttype <command>",
5409
5414
  aliases: ["ct"],
5410
5415
  describe: "Commands for Content Types",
5411
- builder: (yargs42) => yargs42.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
5416
+ builder: (yargs43) => yargs43.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
5412
5417
  handler: () => {
5413
5418
  yargs10.help();
5414
5419
  }
@@ -5427,11 +5432,11 @@ function getDataSourceClient(options) {
5427
5432
  var DataSourceGetModule = {
5428
5433
  command: "get <id>",
5429
5434
  describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
5430
- builder: (yargs42) => withConfiguration(
5435
+ builder: (yargs43) => withConfiguration(
5431
5436
  withApiOptions(
5432
5437
  withDebugOptions(
5433
5438
  withProjectOptions(
5434
- yargs42.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
5439
+ yargs43.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
5435
5440
  )
5436
5441
  )
5437
5442
  )
@@ -5449,11 +5454,11 @@ var DataSourceRemoveModule = {
5449
5454
  command: "remove <id>",
5450
5455
  aliases: ["delete", "rm"],
5451
5456
  describe: "Delete a data source",
5452
- builder: (yargs42) => withConfiguration(
5457
+ builder: (yargs43) => withConfiguration(
5453
5458
  withDebugOptions(
5454
5459
  withApiOptions(
5455
5460
  withProjectOptions(
5456
- yargs42.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
5461
+ yargs43.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
5457
5462
  )
5458
5463
  )
5459
5464
  )
@@ -5474,11 +5479,11 @@ var DataSourceUpdateModule = {
5474
5479
  command: "update <dataSource>",
5475
5480
  aliases: ["put"],
5476
5481
  describe: "Insert or update a data source",
5477
- builder: (yargs42) => withConfiguration(
5482
+ builder: (yargs43) => withConfiguration(
5478
5483
  withApiOptions(
5479
5484
  withDebugOptions(
5480
5485
  withProjectOptions(
5481
- yargs42.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
5486
+ yargs43.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
5482
5487
  describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
5483
5488
  type: "string",
5484
5489
  demandOption: true
@@ -5513,7 +5518,7 @@ var DataSourceModule = {
5513
5518
  command: "datasource <command>",
5514
5519
  aliases: ["ds"],
5515
5520
  describe: "Commands for Data Source definitions",
5516
- builder: (yargs42) => yargs42.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
5521
+ builder: (yargs43) => yargs43.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
5517
5522
  handler: () => {
5518
5523
  yargs11.help();
5519
5524
  }
@@ -5535,12 +5540,12 @@ var DataTypeGetModule = {
5535
5540
  command: "get <id>",
5536
5541
  describe: "Get a data type",
5537
5542
  aliases: ["ls"],
5538
- builder: (yargs42) => withConfiguration(
5543
+ builder: (yargs43) => withConfiguration(
5539
5544
  withFormatOptions(
5540
5545
  withDebugOptions(
5541
5546
  withApiOptions(
5542
5547
  withProjectOptions(
5543
- yargs42.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
5548
+ yargs43.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
5544
5549
  )
5545
5550
  )
5546
5551
  )
@@ -5563,7 +5568,7 @@ var DataTypeListModule = {
5563
5568
  command: "list",
5564
5569
  describe: "List data types",
5565
5570
  aliases: ["ls"],
5566
- builder: (yargs42) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs42))))),
5571
+ builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
5567
5572
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
5568
5573
  const fetch2 = nodeFetchProxy(proxy, verbose);
5569
5574
  const client = getDataTypeClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -5606,12 +5611,12 @@ function createDataTypeEngineDataSource({
5606
5611
  var DataTypePullModule = {
5607
5612
  command: "pull <directory>",
5608
5613
  describe: "Pulls all data types to local files in a directory",
5609
- builder: (yargs42) => withConfiguration(
5614
+ builder: (yargs43) => withConfiguration(
5610
5615
  withApiOptions(
5611
5616
  withDebugOptions(
5612
5617
  withProjectOptions(
5613
5618
  withDiffOptions(
5614
- yargs42.positional("directory", {
5619
+ yargs43.positional("directory", {
5615
5620
  describe: "Directory to save the data types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5616
5621
  type: "string"
5617
5622
  }).option("format", {
@@ -5691,12 +5696,12 @@ var DataTypePullModule = {
5691
5696
  var DataTypePushModule = {
5692
5697
  command: "push <directory>",
5693
5698
  describe: "Pushes all data types from files in a directory to Uniform",
5694
- builder: (yargs42) => withConfiguration(
5699
+ builder: (yargs43) => withConfiguration(
5695
5700
  withApiOptions(
5696
5701
  withDebugOptions(
5697
5702
  withProjectOptions(
5698
5703
  withDiffOptions(
5699
- yargs42.positional("directory", {
5704
+ yargs43.positional("directory", {
5700
5705
  describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
5701
5706
  type: "string"
5702
5707
  }).option("mode", {
@@ -5765,11 +5770,11 @@ var DataTypeRemoveModule = {
5765
5770
  command: "remove <id>",
5766
5771
  aliases: ["delete", "rm"],
5767
5772
  describe: "Delete a data type",
5768
- builder: (yargs42) => withConfiguration(
5773
+ builder: (yargs43) => withConfiguration(
5769
5774
  withDebugOptions(
5770
5775
  withApiOptions(
5771
5776
  withProjectOptions(
5772
- yargs42.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
5777
+ yargs43.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
5773
5778
  )
5774
5779
  )
5775
5780
  )
@@ -5790,11 +5795,11 @@ var DataTypeUpdateModule = {
5790
5795
  command: "update <filename>",
5791
5796
  aliases: ["put"],
5792
5797
  describe: "Insert or update a data type",
5793
- builder: (yargs42) => withConfiguration(
5798
+ builder: (yargs43) => withConfiguration(
5794
5799
  withDebugOptions(
5795
5800
  withApiOptions(
5796
5801
  withProjectOptions(
5797
- yargs42.positional("filename", { demandOption: true, describe: "Data type file to put" })
5802
+ yargs43.positional("filename", { demandOption: true, describe: "Data type file to put" })
5798
5803
  )
5799
5804
  )
5800
5805
  )
@@ -5816,7 +5821,7 @@ var DataTypeModule = {
5816
5821
  command: "datatype <command>",
5817
5822
  aliases: ["dt"],
5818
5823
  describe: "Commands for Data Type definitions",
5819
- builder: (yargs42) => yargs42.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
5824
+ builder: (yargs43) => yargs43.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
5820
5825
  handler: () => {
5821
5826
  yargs12.help();
5822
5827
  }
@@ -5829,13 +5834,13 @@ import yargs13 from "yargs";
5829
5834
  var EntryGetModule = {
5830
5835
  command: "get <id>",
5831
5836
  describe: "Get an entry",
5832
- builder: (yargs42) => withConfiguration(
5837
+ builder: (yargs43) => withConfiguration(
5833
5838
  withDebugOptions(
5834
5839
  withFormatOptions(
5835
5840
  withApiOptions(
5836
5841
  withProjectOptions(
5837
5842
  withStateOptions(
5838
- yargs42.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
5843
+ yargs43.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
5839
5844
  resolveData: {
5840
5845
  type: "boolean",
5841
5846
  default: false,
@@ -5907,13 +5912,13 @@ var LEGACY_DEFAULT_LIMIT = 1e3;
5907
5912
  var EntryListModule = {
5908
5913
  command: "list",
5909
5914
  describe: "List entries",
5910
- builder: (yargs42) => withConfiguration(
5915
+ builder: (yargs43) => withConfiguration(
5911
5916
  withDebugOptions(
5912
5917
  withFormatOptions(
5913
5918
  withApiOptions(
5914
5919
  withProjectOptions(
5915
5920
  withStateOptions(
5916
- yargs42.options({
5921
+ yargs43.options({
5917
5922
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
5918
5923
  limit: {
5919
5924
  describe: "Number of rows to fetch",
@@ -5968,7 +5973,7 @@ var EntryListModule = {
5968
5973
  };
5969
5974
 
5970
5975
  // src/commands/canvas/entryEngineDataSource.ts
5971
- import { ApiClientError, convertEntryToPutEntry } from "@uniformdev/canvas";
5976
+ import { ApiClientError as ApiClientError2, convertEntryToPutEntry } from "@uniformdev/canvas";
5972
5977
 
5973
5978
  // src/commands/canvas/commands/entry/_util.ts
5974
5979
  var selectEntryIdentifier = (e) => {
@@ -6014,7 +6019,7 @@ function createEntryEngineDataSource({
6014
6019
  editions: "all"
6015
6020
  })).entries;
6016
6021
  } catch (error) {
6017
- if (error instanceof ApiClientError && error.errorMessage === "Entry not found or not published") {
6022
+ if (error instanceof ApiClientError2 && error.errorMessage === "Entry not found or not published") {
6018
6023
  return [];
6019
6024
  }
6020
6025
  throw error;
@@ -6048,12 +6053,12 @@ function createEntryEngineDataSource({
6048
6053
  var EntryPublishModule = {
6049
6054
  command: "publish [ids]",
6050
6055
  describe: "Publishes entry(ies)",
6051
- builder: (yargs42) => withConfiguration(
6052
- withDiffOptions(
6053
- withApiOptions(
6054
- withProjectOptions(
6055
- withDiffOptions(
6056
- yargs42.positional("ids", {
6056
+ builder: (yargs43) => withConfiguration(
6057
+ withDebugOptions(
6058
+ withDiffOptions(
6059
+ withApiOptions(
6060
+ withProjectOptions(
6061
+ yargs43.positional("ids", {
6057
6062
  describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6058
6063
  type: "string"
6059
6064
  }).option("all", {
@@ -6112,7 +6117,7 @@ var EntryPublishModule = {
6112
6117
  fileClient
6113
6118
  });
6114
6119
  },
6115
- compareContents: compareCompositionsOrEntriesWithoutAssetUrls,
6120
+ compareContents: compareCompositionsOrEntriesWithoutAssetUrlsForPublishing,
6116
6121
  onBeforeWriteObject: async (sourceObject) => {
6117
6122
  return uploadFilesForCompositionOrEntry({
6118
6123
  entity: sourceObject,
@@ -6128,13 +6133,13 @@ var EntryPublishModule = {
6128
6133
  var EntryPullModule = {
6129
6134
  command: "pull <directory>",
6130
6135
  describe: "Pulls all entries to local files in a directory",
6131
- builder: (yargs42) => withConfiguration(
6136
+ builder: (yargs43) => withConfiguration(
6132
6137
  withDebugOptions(
6133
6138
  withApiOptions(
6134
6139
  withProjectOptions(
6135
6140
  withStateOptions(
6136
6141
  withDiffOptions(
6137
- yargs42.positional("directory", {
6142
+ yargs43.positional("directory", {
6138
6143
  describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6139
6144
  type: "string"
6140
6145
  }).option("format", {
@@ -6234,13 +6239,13 @@ var EntryPullModule = {
6234
6239
  var EntryPushModule = {
6235
6240
  command: "push <directory>",
6236
6241
  describe: "Pushes all entries from files in a directory to Uniform",
6237
- builder: (yargs42) => withConfiguration(
6242
+ builder: (yargs43) => withConfiguration(
6238
6243
  withDebugOptions(
6239
6244
  withApiOptions(
6240
6245
  withProjectOptions(
6241
6246
  withStateOptions(
6242
6247
  withDiffOptions(
6243
- yargs42.positional("directory", {
6248
+ yargs43.positional("directory", {
6244
6249
  describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
6245
6250
  type: "string"
6246
6251
  }).option("mode", {
@@ -6339,11 +6344,11 @@ var EntryRemoveModule = {
6339
6344
  command: "remove <id>",
6340
6345
  aliases: ["delete", "rm"],
6341
6346
  describe: "Delete an entry",
6342
- builder: (yargs42) => withConfiguration(
6347
+ builder: (yargs43) => withConfiguration(
6343
6348
  withDebugOptions(
6344
6349
  withApiOptions(
6345
6350
  withProjectOptions(
6346
- yargs42.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
6351
+ yargs43.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
6347
6352
  )
6348
6353
  )
6349
6354
  )
@@ -6360,16 +6365,16 @@ var EntryRemoveModule = {
6360
6365
  };
6361
6366
 
6362
6367
  // src/commands/canvas/commands/entry/unpublish.ts
6363
- import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE3 } from "@uniformdev/canvas";
6368
+ import { ApiClientError as ApiClientError3, CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE3 } from "@uniformdev/canvas";
6364
6369
  import { diffJson as diffJson3 } from "diff";
6365
6370
  var EntryUnpublishModule = {
6366
6371
  command: "unpublish [ids]",
6367
6372
  describe: "Unpublish an entry(ies)",
6368
- builder: (yargs42) => withConfiguration(
6373
+ builder: (yargs43) => withConfiguration(
6369
6374
  withDebugOptions(
6370
6375
  withApiOptions(
6371
6376
  withProjectOptions(
6372
- yargs42.positional("ids", {
6377
+ yargs43.positional("ids", {
6373
6378
  describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
6374
6379
  type: "string"
6375
6380
  }).option("all", {
@@ -6384,7 +6389,7 @@ var EntryUnpublishModule = {
6384
6389
  ),
6385
6390
  handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
6386
6391
  if (!all && !ids || all && ids) {
6387
- console.error(`Specify --all or entry ID(s) to publish.`);
6392
+ console.error(`Specify --all or entry ID(s) to unpublish.`);
6388
6393
  process.exit(1);
6389
6394
  }
6390
6395
  const entryIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
@@ -6403,7 +6408,6 @@ var EntryUnpublishModule = {
6403
6408
  entryIDs: entryIDsArray,
6404
6409
  onlyEntries: true
6405
6410
  });
6406
- const actions = [];
6407
6411
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
6408
6412
  for await (const obj of target.objects) {
6409
6413
  if (Array.isArray(obj.id)) {
@@ -6412,15 +6416,30 @@ var EntryUnpublishModule = {
6412
6416
  targetItems.set(obj.id, obj);
6413
6417
  }
6414
6418
  }
6419
+ const toUnpublish = [];
6415
6420
  for await (const sourceObject of source.objects) {
6421
+ toUnpublish.push(sourceObject);
6422
+ }
6423
+ const actions = [];
6424
+ for (const sourceObject of toUnpublish) {
6416
6425
  const id = Array.isArray(sourceObject.id) ? sourceObject.id[0] : sourceObject.id;
6417
6426
  const targetObject = targetItems.get(id);
6418
6427
  if (!targetObject) {
6419
- console.log(`Entry ${id} was not found`);
6420
- return;
6428
+ console.log(`Entry ${id} did not have a draft (removing published)`);
6421
6429
  }
6422
6430
  if (!whatIf) {
6423
- actions.push(client.deleteEntry({ entryId: id, state: CANVAS_PUBLISHED_STATE3 }));
6431
+ actions.push(
6432
+ client.deleteEntry({ ...parseEntrySerializedId(id), state: CANVAS_PUBLISHED_STATE3 }).catch((err) => {
6433
+ const isNotFound = err instanceof ApiClientError3 && err.statusCode === 404;
6434
+ if (isNotFound) {
6435
+ console.warn(
6436
+ `Entry ${id} was not found when unpublishing (may already be unpublished or orphaned); skipping.`
6437
+ );
6438
+ return;
6439
+ }
6440
+ throw err;
6441
+ })
6442
+ );
6424
6443
  }
6425
6444
  log2({
6426
6445
  action: "update",
@@ -6428,9 +6447,10 @@ var EntryUnpublishModule = {
6428
6447
  providerId: sourceObject.providerId,
6429
6448
  displayName: sourceObject.displayName ?? sourceObject.providerId,
6430
6449
  whatIf,
6431
- diff: () => diffJson3(targetObject.object, sourceObject.object)
6450
+ diff: () => targetObject ? diffJson3(targetObject.object, sourceObject.object) : []
6432
6451
  });
6433
6452
  }
6453
+ await Promise.all(actions);
6434
6454
  }
6435
6455
  };
6436
6456
 
@@ -6439,12 +6459,12 @@ var EntryUpdateModule = {
6439
6459
  command: "update <filename>",
6440
6460
  aliases: ["put"],
6441
6461
  describe: "Insert or update an entry",
6442
- builder: (yargs42) => withConfiguration(
6462
+ builder: (yargs43) => withConfiguration(
6443
6463
  withDebugOptions(
6444
6464
  withApiOptions(
6445
6465
  withProjectOptions(
6446
6466
  withStateOptions(
6447
- yargs42.positional("filename", { demandOption: true, describe: "Entry file to put" })
6467
+ yargs43.positional("filename", { demandOption: true, describe: "Entry file to put" })
6448
6468
  )
6449
6469
  )
6450
6470
  )
@@ -6476,7 +6496,7 @@ var EntryUpdateModule = {
6476
6496
  var EntryModule = {
6477
6497
  command: "entry <command>",
6478
6498
  describe: "Commands for Entries",
6479
- builder: (yargs42) => yargs42.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
6499
+ builder: (yargs43) => yargs43.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
6480
6500
  handler: () => {
6481
6501
  yargs13.help();
6482
6502
  }
@@ -6489,13 +6509,13 @@ import yargs14 from "yargs";
6489
6509
  var EntryPatternGetModule = {
6490
6510
  command: "get <id>",
6491
6511
  describe: "Get an entry pattern",
6492
- builder: (yargs42) => withConfiguration(
6512
+ builder: (yargs43) => withConfiguration(
6493
6513
  withDebugOptions(
6494
6514
  withFormatOptions(
6495
6515
  withApiOptions(
6496
6516
  withProjectOptions(
6497
6517
  withStateOptions(
6498
- yargs42.positional("id", {
6518
+ yargs43.positional("id", {
6499
6519
  demandOption: true,
6500
6520
  describe: "Entry pattern public ID to fetch"
6501
6521
  }).option({
@@ -6548,13 +6568,13 @@ var EntryPatternGetModule = {
6548
6568
  var EntryPatternListModule = {
6549
6569
  command: "list",
6550
6570
  describe: "List entry patterns",
6551
- builder: (yargs42) => withConfiguration(
6571
+ builder: (yargs43) => withConfiguration(
6552
6572
  withDebugOptions(
6553
6573
  withFormatOptions(
6554
6574
  withApiOptions(
6555
6575
  withProjectOptions(
6556
6576
  withStateOptions(
6557
- yargs42.option({
6577
+ yargs43.option({
6558
6578
  withComponentIDs: {
6559
6579
  type: "boolean",
6560
6580
  default: false,
@@ -6600,12 +6620,12 @@ var EntryPatternListModule = {
6600
6620
  var EntryPatternPublishModule = {
6601
6621
  command: "publish [ids]",
6602
6622
  describe: "Publishes entry pattern(s)",
6603
- builder: (yargs42) => withConfiguration(
6623
+ builder: (yargs43) => withConfiguration(
6604
6624
  withDebugOptions(
6605
6625
  withApiOptions(
6606
6626
  withProjectOptions(
6607
6627
  withDiffOptions(
6608
- yargs42.positional("ids", {
6628
+ yargs43.positional("ids", {
6609
6629
  describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6610
6630
  type: "string"
6611
6631
  }).option("all", {
@@ -6664,7 +6684,7 @@ var EntryPatternPublishModule = {
6664
6684
  fileClient
6665
6685
  });
6666
6686
  },
6667
- compareContents: compareCompositionsOrEntriesWithoutAssetUrls,
6687
+ compareContents: compareCompositionsOrEntriesWithoutAssetUrlsForPublishing,
6668
6688
  onBeforeWriteObject: async (sourceObject) => {
6669
6689
  return uploadFilesForCompositionOrEntry({
6670
6690
  entity: sourceObject,
@@ -6680,13 +6700,13 @@ var EntryPatternPublishModule = {
6680
6700
  var EntryPatternPullModule = {
6681
6701
  command: "pull <directory>",
6682
6702
  describe: "Pulls all entry patterns to local files in a directory",
6683
- builder: (yargs42) => withConfiguration(
6703
+ builder: (yargs43) => withConfiguration(
6684
6704
  withApiOptions(
6685
6705
  withDebugOptions(
6686
6706
  withProjectOptions(
6687
6707
  withStateOptions(
6688
6708
  withDiffOptions(
6689
- yargs42.positional("directory", {
6709
+ yargs43.positional("directory", {
6690
6710
  describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6691
6711
  type: "string"
6692
6712
  }).option("format", {
@@ -6786,13 +6806,13 @@ var EntryPatternPullModule = {
6786
6806
  var EntryPatternPushModule = {
6787
6807
  command: "push <directory>",
6788
6808
  describe: "Pushes all entry patterns from files in a directory to Uniform",
6789
- builder: (yargs42) => withConfiguration(
6809
+ builder: (yargs43) => withConfiguration(
6790
6810
  withDebugOptions(
6791
6811
  withApiOptions(
6792
6812
  withProjectOptions(
6793
6813
  withStateOptions(
6794
6814
  withDiffOptions(
6795
- yargs42.positional("directory", {
6815
+ yargs43.positional("directory", {
6796
6816
  describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
6797
6817
  type: "string"
6798
6818
  }).option("what-if", {
@@ -6896,11 +6916,11 @@ var EntryPatternRemoveModule = {
6896
6916
  command: "remove <id>",
6897
6917
  aliases: ["delete", "rm"],
6898
6918
  describe: "Delete an entry pattern",
6899
- builder: (yargs42) => withConfiguration(
6919
+ builder: (yargs43) => withConfiguration(
6900
6920
  withDebugOptions(
6901
6921
  withApiOptions(
6902
6922
  withProjectOptions(
6903
- yargs42.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
6923
+ yargs43.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
6904
6924
  )
6905
6925
  )
6906
6926
  )
@@ -6917,16 +6937,16 @@ var EntryPatternRemoveModule = {
6917
6937
  };
6918
6938
 
6919
6939
  // src/commands/canvas/commands/entryPattern/unpublish.ts
6920
- import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE4 } from "@uniformdev/canvas";
6940
+ import { ApiClientError as ApiClientError4, CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE4 } from "@uniformdev/canvas";
6921
6941
  import { diffJson as diffJson4 } from "diff";
6922
6942
  var EntryPatternUnpublishModule = {
6923
6943
  command: "unpublish [ids]",
6924
- describe: "Unpublish an entry patterns",
6925
- builder: (yargs42) => withConfiguration(
6944
+ describe: "Unpublish entry pattern(s)",
6945
+ builder: (yargs43) => withConfiguration(
6926
6946
  withDebugOptions(
6927
6947
  withApiOptions(
6928
6948
  withProjectOptions(
6929
- yargs42.positional("ids", {
6949
+ yargs43.positional("ids", {
6930
6950
  describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
6931
6951
  type: "string"
6932
6952
  }).option("all", {
@@ -6941,7 +6961,7 @@ var EntryPatternUnpublishModule = {
6941
6961
  ),
6942
6962
  handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
6943
6963
  if (!all && !ids || all && ids) {
6944
- console.error(`Specify --all or entry pattern ID(s) to publish.`);
6964
+ console.error(`Specify --all or entry pattern ID(s) to unpublish.`);
6945
6965
  process.exit(1);
6946
6966
  }
6947
6967
  const entryIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
@@ -6960,7 +6980,6 @@ var EntryPatternUnpublishModule = {
6960
6980
  entryIDs: entryIDsArray,
6961
6981
  onlyPatterns: true
6962
6982
  });
6963
- const actions = [];
6964
6983
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
6965
6984
  for await (const obj of target.objects) {
6966
6985
  if (Array.isArray(obj.id)) {
@@ -6969,15 +6988,30 @@ var EntryPatternUnpublishModule = {
6969
6988
  targetItems.set(obj.id, obj);
6970
6989
  }
6971
6990
  }
6991
+ const toUnpublish = [];
6972
6992
  for await (const sourceObject of source.objects) {
6993
+ toUnpublish.push(sourceObject);
6994
+ }
6995
+ const actions = [];
6996
+ for (const sourceObject of toUnpublish) {
6973
6997
  const id = Array.isArray(sourceObject.id) ? sourceObject.id[0] : sourceObject.id;
6974
6998
  const targetObject = targetItems.get(id);
6975
6999
  if (!targetObject) {
6976
- console.log(`Entry pattern ${id} was not found`);
6977
- return;
7000
+ console.log(`Entry pattern ${id} did not have a draft (removing published)`);
6978
7001
  }
6979
7002
  if (!whatIf) {
6980
- actions.push(client.deleteEntry({ entryId: id, state: CANVAS_PUBLISHED_STATE4 }));
7003
+ actions.push(
7004
+ client.deleteEntry({ ...parseEntrySerializedId(id), state: CANVAS_PUBLISHED_STATE4 }).catch((err) => {
7005
+ const isNotFound = err instanceof ApiClientError4 && err.statusCode === 404;
7006
+ if (isNotFound) {
7007
+ console.warn(
7008
+ `Entry pattern ${id} was not found when unpublishing (may already be unpublished or orphaned); skipping.`
7009
+ );
7010
+ return;
7011
+ }
7012
+ throw err;
7013
+ })
7014
+ );
6981
7015
  }
6982
7016
  log2({
6983
7017
  action: "update",
@@ -6985,9 +7019,10 @@ var EntryPatternUnpublishModule = {
6985
7019
  providerId: sourceObject.providerId,
6986
7020
  displayName: sourceObject.displayName ?? sourceObject.providerId,
6987
7021
  whatIf,
6988
- diff: () => diffJson4(targetObject.object, sourceObject.object)
7022
+ diff: () => targetObject ? diffJson4(targetObject.object, sourceObject.object) : []
6989
7023
  });
6990
7024
  }
7025
+ await Promise.all(actions);
6991
7026
  }
6992
7027
  };
6993
7028
 
@@ -6996,12 +7031,12 @@ var EntryPatternUpdateModule = {
6996
7031
  command: "update <filename>",
6997
7032
  aliases: ["put"],
6998
7033
  describe: "Insert or update an entry pattern",
6999
- builder: (yargs42) => withConfiguration(
7034
+ builder: (yargs43) => withConfiguration(
7000
7035
  withDebugOptions(
7001
7036
  withApiOptions(
7002
7037
  withProjectOptions(
7003
7038
  withStateOptions(
7004
- yargs42.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
7039
+ yargs43.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
7005
7040
  )
7006
7041
  )
7007
7042
  )
@@ -7037,15 +7072,254 @@ var EntryPatternUpdateModule = {
7037
7072
  var EntryPatternModule = {
7038
7073
  command: "entry-pattern <command>",
7039
7074
  describe: "Commands for Entry patterns",
7040
- builder: (yargs42) => yargs42.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
7075
+ builder: (yargs43) => yargs43.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
7041
7076
  handler: () => {
7042
7077
  yargs14.help();
7043
7078
  }
7044
7079
  };
7045
7080
 
7046
- // src/commands/canvas/commands/locale.ts
7081
+ // src/commands/canvas/commands/label.ts
7047
7082
  import yargs15 from "yargs";
7048
7083
 
7084
+ // src/commands/canvas/commands/label/_util.ts
7085
+ import { LabelClient } from "@uniformdev/canvas";
7086
+ var selectLabelIdentifier = (label) => label.label.publicId;
7087
+ var selectLabelDisplayName = (label) => `${label.label.displayName} (pid: ${label.label.publicId})`;
7088
+ function getLabelClient(options) {
7089
+ return new LabelClient({ ...options, bypassCache: true, limitPolicy: cliLimitPolicy });
7090
+ }
7091
+
7092
+ // src/commands/canvas/labelsEngineDataSource.ts
7093
+ function normalizeLabelForSync(label) {
7094
+ const { projectId: _projectId, ...labelWithoutProjectId } = label;
7095
+ return labelWithoutProjectId;
7096
+ }
7097
+ function createLabelsEngineDataSource({
7098
+ client
7099
+ }) {
7100
+ async function* getObjects() {
7101
+ const labels = paginateAsync(
7102
+ async (offset, limit2) => (await client.getLabels({ offset, limit: limit2 })).labels,
7103
+ { pageSize: 100 }
7104
+ );
7105
+ for await (const label of labels) {
7106
+ const result = {
7107
+ id: label.label.publicId,
7108
+ displayName: `${label.label.displayName} (pid: ${label.label.publicId})`,
7109
+ providerId: label.label.publicId,
7110
+ object: normalizeLabelForSync(label)
7111
+ };
7112
+ yield result;
7113
+ }
7114
+ }
7115
+ return {
7116
+ name: "Uniform API",
7117
+ objects: getObjects(),
7118
+ deleteObject: async (providerId) => {
7119
+ await client.removeLabel({ labelId: providerId });
7120
+ },
7121
+ writeObject: async ({ object: object4 }) => {
7122
+ await client.upsertLabel({ label: object4.label });
7123
+ }
7124
+ };
7125
+ }
7126
+
7127
+ // src/commands/canvas/commands/label/pull.ts
7128
+ var LabelPullModule = {
7129
+ command: "pull <directory>",
7130
+ describe: "Pulls all labels to local files in a directory",
7131
+ builder: (yargs43) => withConfiguration(
7132
+ withDebugOptions(
7133
+ withApiOptions(
7134
+ withProjectOptions(
7135
+ withDiffOptions(
7136
+ yargs43.positional("directory", {
7137
+ 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.",
7138
+ type: "string"
7139
+ }).option("format", {
7140
+ alias: ["f"],
7141
+ describe: "Output format",
7142
+ default: "yaml",
7143
+ choices: ["yaml", "json"],
7144
+ type: "string"
7145
+ }).option("mode", {
7146
+ alias: ["m"],
7147
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
7148
+ choices: ["create", "createOrUpdate", "mirror"],
7149
+ default: "mirror",
7150
+ type: "string"
7151
+ })
7152
+ )
7153
+ )
7154
+ )
7155
+ )
7156
+ ),
7157
+ handler: async ({
7158
+ apiHost,
7159
+ apiKey,
7160
+ proxy,
7161
+ directory,
7162
+ format,
7163
+ mode,
7164
+ whatIf,
7165
+ project: projectId,
7166
+ diff: diffMode,
7167
+ allowEmptySource,
7168
+ verbose
7169
+ }) => {
7170
+ const fetch2 = nodeFetchProxy(proxy, verbose);
7171
+ const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
7172
+ const source = createLabelsEngineDataSource({ client });
7173
+ let target;
7174
+ const isPackage = isPathAPackageFile(directory);
7175
+ if (isPackage) {
7176
+ const packageContents = readCanvasPackage(directory, false, verbose);
7177
+ const packageLabels = Array.isArray(packageContents.labels) ? packageContents.labels : [];
7178
+ target = await createArraySyncEngineDataSource({
7179
+ name: `Package file ${directory}`,
7180
+ objects: packageLabels,
7181
+ selectIdentifier: selectLabelIdentifier,
7182
+ selectDisplayName: selectLabelDisplayName,
7183
+ onSyncComplete: async (_, synced) => {
7184
+ packageContents.labels = synced;
7185
+ writeCanvasPackage(directory, packageContents);
7186
+ }
7187
+ });
7188
+ } else {
7189
+ target = await createFileSyncEngineDataSource({
7190
+ directory,
7191
+ selectIdentifier: selectLabelIdentifier,
7192
+ selectDisplayName: selectLabelDisplayName,
7193
+ format,
7194
+ verbose
7195
+ });
7196
+ }
7197
+ await syncEngine({
7198
+ source,
7199
+ target,
7200
+ mode,
7201
+ whatIf,
7202
+ allowEmptySource: allowEmptySource ?? true,
7203
+ log: createSyncEngineConsoleLogger({ diffMode }),
7204
+ onBeforeWriteObject: async (sourceObject) => {
7205
+ delete sourceObject.object.createdBy;
7206
+ delete sourceObject.object.modifiedBy;
7207
+ return sourceObject;
7208
+ }
7209
+ });
7210
+ }
7211
+ };
7212
+
7213
+ // src/commands/canvas/commands/label/push.ts
7214
+ var __INTERNAL_MISSING_PARENT_LABEL_ERROR = "Parent label with public ID";
7215
+ var LabelPushModule = {
7216
+ command: "push <directory>",
7217
+ describe: "Pushes all labels from files in a directory to Uniform",
7218
+ builder: (yargs43) => withConfiguration(
7219
+ withDebugOptions(
7220
+ withApiOptions(
7221
+ withProjectOptions(
7222
+ withDiffOptions(
7223
+ yargs43.positional("directory", {
7224
+ describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
7225
+ type: "string"
7226
+ }).option("mode", {
7227
+ alias: ["m"],
7228
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
7229
+ choices: ["create", "createOrUpdate", "mirror"],
7230
+ default: "mirror",
7231
+ type: "string"
7232
+ })
7233
+ )
7234
+ )
7235
+ )
7236
+ )
7237
+ ),
7238
+ handler: async ({
7239
+ apiHost,
7240
+ apiKey,
7241
+ proxy,
7242
+ directory,
7243
+ mode,
7244
+ whatIf,
7245
+ project: projectId,
7246
+ diff: diffMode,
7247
+ allowEmptySource,
7248
+ verbose
7249
+ }) => {
7250
+ const fetch2 = nodeFetchProxy(proxy, verbose);
7251
+ const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
7252
+ let source;
7253
+ const isPackage = isPathAPackageFile(directory);
7254
+ if (isPackage) {
7255
+ const packageContents = readCanvasPackage(directory, true, verbose);
7256
+ const packageLabels = Array.isArray(packageContents.labels) ? packageContents.labels : [];
7257
+ source = await createArraySyncEngineDataSource({
7258
+ name: `Package file ${directory}`,
7259
+ objects: packageLabels,
7260
+ selectIdentifier: selectLabelIdentifier,
7261
+ selectDisplayName: selectLabelDisplayName
7262
+ });
7263
+ } else {
7264
+ source = await createFileSyncEngineDataSource({
7265
+ directory,
7266
+ selectIdentifier: selectLabelIdentifier,
7267
+ selectDisplayName: selectLabelDisplayName,
7268
+ verbose
7269
+ });
7270
+ }
7271
+ const target = createLabelsEngineDataSource({ client });
7272
+ const labelsFailedDueToMissingParent = /* @__PURE__ */ new Set();
7273
+ const attemptSync = async () => {
7274
+ const lastFailedLabelsCount = labelsFailedDueToMissingParent.size;
7275
+ labelsFailedDueToMissingParent.clear();
7276
+ await syncEngine({
7277
+ source,
7278
+ target,
7279
+ mode,
7280
+ whatIf,
7281
+ allowEmptySource,
7282
+ log: createSyncEngineConsoleLogger({ diffMode }),
7283
+ onError: (error, object4) => {
7284
+ if (error.message.includes(__INTERNAL_MISSING_PARENT_LABEL_ERROR)) {
7285
+ labelsFailedDueToMissingParent.add(object4.object);
7286
+ } else {
7287
+ throw error;
7288
+ }
7289
+ }
7290
+ });
7291
+ if (labelsFailedDueToMissingParent.size !== 0) {
7292
+ const newFailedLabelsCount = labelsFailedDueToMissingParent.size;
7293
+ if (newFailedLabelsCount !== lastFailedLabelsCount) {
7294
+ source = await createArraySyncEngineDataSource({
7295
+ name: `Labels re-push from ${directory}`,
7296
+ objects: Array.from(labelsFailedDueToMissingParent),
7297
+ selectIdentifier: selectLabelIdentifier,
7298
+ selectDisplayName: selectLabelDisplayName
7299
+ });
7300
+ await attemptSync();
7301
+ } else {
7302
+ throw new Error("Failed to push labels due to missing parent labels");
7303
+ }
7304
+ }
7305
+ };
7306
+ await attemptSync();
7307
+ }
7308
+ };
7309
+
7310
+ // src/commands/canvas/commands/label.ts
7311
+ var LabelModule = {
7312
+ command: "label <command>",
7313
+ describe: "Commands for label definitions",
7314
+ builder: (yargs43) => yargs43.command(LabelPullModule).command(LabelPushModule),
7315
+ handler: () => {
7316
+ yargs15.help();
7317
+ }
7318
+ };
7319
+
7320
+ // src/commands/canvas/commands/locale.ts
7321
+ import yargs16 from "yargs";
7322
+
7049
7323
  // src/commands/canvas/localesEngineDataSource.ts
7050
7324
  function createLocaleEngineDataSource({
7051
7325
  client
@@ -7086,12 +7360,12 @@ function getLocaleClient(options) {
7086
7360
  var LocalePullModule = {
7087
7361
  command: "pull <directory>",
7088
7362
  describe: "Pulls all locales to local files in a directory",
7089
- builder: (yargs42) => withConfiguration(
7363
+ builder: (yargs43) => withConfiguration(
7090
7364
  withDebugOptions(
7091
7365
  withApiOptions(
7092
7366
  withProjectOptions(
7093
7367
  withDiffOptions(
7094
- yargs42.positional("directory", {
7368
+ yargs43.positional("directory", {
7095
7369
  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.",
7096
7370
  type: "string"
7097
7371
  }).option("format", {
@@ -7171,12 +7445,12 @@ var LocalePullModule = {
7171
7445
  var LocalePushModule = {
7172
7446
  command: "push <directory>",
7173
7447
  describe: "Pushes all locales from files in a directory to Uniform",
7174
- builder: (yargs42) => withConfiguration(
7448
+ builder: (yargs43) => withConfiguration(
7175
7449
  withDebugOptions(
7176
7450
  withApiOptions(
7177
7451
  withProjectOptions(
7178
7452
  withDiffOptions(
7179
- yargs42.positional("directory", {
7453
+ yargs43.positional("directory", {
7180
7454
  describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
7181
7455
  type: "string"
7182
7456
  }).option("mode", {
@@ -7244,14 +7518,14 @@ var LocalePushModule = {
7244
7518
  var LocaleModule = {
7245
7519
  command: "locale <command>",
7246
7520
  describe: "Commands for locale definitions",
7247
- builder: (yargs42) => yargs42.command(LocalePullModule).command(LocalePushModule),
7521
+ builder: (yargs43) => yargs43.command(LocalePullModule).command(LocalePushModule),
7248
7522
  handler: () => {
7249
- yargs15.help();
7523
+ yargs16.help();
7250
7524
  }
7251
7525
  };
7252
7526
 
7253
7527
  // src/commands/canvas/commands/previewUrl.ts
7254
- import yargs16 from "yargs";
7528
+ import yargs17 from "yargs";
7255
7529
 
7256
7530
  // src/commands/canvas/commands/previewUrl/_util.ts
7257
7531
  import { PreviewClient } from "@uniformdev/canvas";
@@ -7265,12 +7539,12 @@ function getPreviewClient(options) {
7265
7539
  var PreviewUrlGetModule = {
7266
7540
  command: "get <id>",
7267
7541
  describe: "Fetch a preview URL",
7268
- builder: (yargs42) => withConfiguration(
7542
+ builder: (yargs43) => withConfiguration(
7269
7543
  withFormatOptions(
7270
7544
  withDebugOptions(
7271
7545
  withApiOptions(
7272
7546
  withProjectOptions(
7273
- yargs42.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
7547
+ yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
7274
7548
  )
7275
7549
  )
7276
7550
  )
@@ -7294,8 +7568,8 @@ var PreviewUrlListModule = {
7294
7568
  command: "list",
7295
7569
  describe: "List preview URLs",
7296
7570
  aliases: ["ls"],
7297
- builder: (yargs42) => withConfiguration(
7298
- withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs42.options({})))))
7571
+ builder: (yargs43) => withConfiguration(
7572
+ withFormatOptions(withApiOptions(withDebugOptions(withProjectOptions(yargs43.options({})))))
7299
7573
  ),
7300
7574
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
7301
7575
  const fetch2 = nodeFetchProxy(proxy, verbose);
@@ -7337,12 +7611,12 @@ function createPreviewUrlEngineDataSource({
7337
7611
  var PreviewUrlPullModule = {
7338
7612
  command: "pull <directory>",
7339
7613
  describe: "Pulls all preview urls to local files in a directory",
7340
- builder: (yargs42) => withConfiguration(
7614
+ builder: (yargs43) => withConfiguration(
7341
7615
  withApiOptions(
7342
7616
  withProjectOptions(
7343
7617
  withDebugOptions(
7344
7618
  withDiffOptions(
7345
- yargs42.positional("directory", {
7619
+ yargs43.positional("directory", {
7346
7620
  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.",
7347
7621
  type: "string"
7348
7622
  }).option("format", {
@@ -7417,12 +7691,12 @@ var PreviewUrlPullModule = {
7417
7691
  var PreviewUrlPushModule = {
7418
7692
  command: "push <directory>",
7419
7693
  describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
7420
- builder: (yargs42) => withConfiguration(
7694
+ builder: (yargs43) => withConfiguration(
7421
7695
  withApiOptions(
7422
7696
  withProjectOptions(
7423
7697
  withDiffOptions(
7424
7698
  withDebugOptions(
7425
- yargs42.positional("directory", {
7699
+ yargs43.positional("directory", {
7426
7700
  describe: "Directory to read from. If a filename is used, a package will be read instead.",
7427
7701
  type: "string"
7428
7702
  }).option("mode", {
@@ -7486,11 +7760,11 @@ var PreviewUrlRemoveModule = {
7486
7760
  command: "remove <id>",
7487
7761
  aliases: ["delete", "rm"],
7488
7762
  describe: "Delete a preview URL",
7489
- builder: (yargs42) => withConfiguration(
7763
+ builder: (yargs43) => withConfiguration(
7490
7764
  withApiOptions(
7491
7765
  withDebugOptions(
7492
7766
  withProjectOptions(
7493
- yargs42.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
7767
+ yargs43.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
7494
7768
  )
7495
7769
  )
7496
7770
  )
@@ -7511,11 +7785,11 @@ var PreviewUrlUpdateModule = {
7511
7785
  command: "update <filename>",
7512
7786
  aliases: ["put"],
7513
7787
  describe: "Insert or update a preview URL",
7514
- builder: (yargs42) => withConfiguration(
7788
+ builder: (yargs43) => withConfiguration(
7515
7789
  withDebugOptions(
7516
7790
  withApiOptions(
7517
7791
  withProjectOptions(
7518
- yargs42.positional("filename", { demandOption: true, describe: "Category file to put" })
7792
+ yargs43.positional("filename", { demandOption: true, describe: "Category file to put" })
7519
7793
  )
7520
7794
  )
7521
7795
  )
@@ -7537,25 +7811,25 @@ var PreviewUrlModule = {
7537
7811
  command: "preview-url <command>",
7538
7812
  aliases: ["pu"],
7539
7813
  describe: "Commands for Canvas preview urls",
7540
- builder: (yargs42) => yargs42.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
7814
+ builder: (yargs43) => yargs43.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
7541
7815
  handler: () => {
7542
- yargs16.help();
7816
+ yargs17.help();
7543
7817
  }
7544
7818
  };
7545
7819
 
7546
7820
  // src/commands/canvas/commands/previewViewport.ts
7547
- import yargs17 from "yargs";
7821
+ import yargs18 from "yargs";
7548
7822
 
7549
7823
  // src/commands/canvas/commands/previewViewport/get.ts
7550
7824
  var PreviewViewportGetModule = {
7551
7825
  command: "get <id>",
7552
7826
  describe: "Fetch a preview viewport",
7553
- builder: (yargs42) => withConfiguration(
7827
+ builder: (yargs43) => withConfiguration(
7554
7828
  withFormatOptions(
7555
7829
  withDebugOptions(
7556
7830
  withApiOptions(
7557
7831
  withProjectOptions(
7558
- yargs42.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
7832
+ yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
7559
7833
  )
7560
7834
  )
7561
7835
  )
@@ -7579,8 +7853,8 @@ var PreviewViewportListModule = {
7579
7853
  command: "list",
7580
7854
  describe: "List preview viewports",
7581
7855
  aliases: ["ls"],
7582
- builder: (yargs42) => withConfiguration(
7583
- withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs42.options({})))))
7856
+ builder: (yargs43) => withConfiguration(
7857
+ withFormatOptions(withDebugOptions(withApiOptions(withProjectOptions(yargs43.options({})))))
7584
7858
  ),
7585
7859
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
7586
7860
  const fetch2 = nodeFetchProxy(proxy, verbose);
@@ -7626,12 +7900,12 @@ function createPreviewViewportEngineDataSource({
7626
7900
  var PreviewViewportPullModule = {
7627
7901
  command: "pull <directory>",
7628
7902
  describe: "Pulls all preview viewports to local files in a directory",
7629
- builder: (yargs42) => withConfiguration(
7903
+ builder: (yargs43) => withConfiguration(
7630
7904
  withApiOptions(
7631
7905
  withProjectOptions(
7632
7906
  withDebugOptions(
7633
7907
  withDiffOptions(
7634
- yargs42.positional("directory", {
7908
+ yargs43.positional("directory", {
7635
7909
  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.",
7636
7910
  type: "string"
7637
7911
  }).option("format", {
@@ -7706,12 +7980,12 @@ var PreviewViewportPullModule = {
7706
7980
  var PreviewViewportPushModule = {
7707
7981
  command: "push <directory>",
7708
7982
  describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
7709
- builder: (yargs42) => withConfiguration(
7983
+ builder: (yargs43) => withConfiguration(
7710
7984
  withApiOptions(
7711
7985
  withProjectOptions(
7712
7986
  withDiffOptions(
7713
7987
  withDebugOptions(
7714
- yargs42.positional("directory", {
7988
+ yargs43.positional("directory", {
7715
7989
  describe: "Directory to read from. If a filename is used, a package will be read instead.",
7716
7990
  type: "string"
7717
7991
  }).option("mode", {
@@ -7775,11 +8049,11 @@ var PreviewViewportRemoveModule = {
7775
8049
  command: "remove <id>",
7776
8050
  aliases: ["delete", "rm"],
7777
8051
  describe: "Delete a preview viewport",
7778
- builder: (yargs42) => withConfiguration(
8052
+ builder: (yargs43) => withConfiguration(
7779
8053
  withApiOptions(
7780
8054
  withDebugOptions(
7781
8055
  withProjectOptions(
7782
- yargs42.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
8056
+ yargs43.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
7783
8057
  )
7784
8058
  )
7785
8059
  )
@@ -7800,11 +8074,11 @@ var PreviewViewportUpdateModule = {
7800
8074
  command: "update <filename>",
7801
8075
  aliases: ["put"],
7802
8076
  describe: "Insert or update a preview viewport",
7803
- builder: (yargs42) => withConfiguration(
8077
+ builder: (yargs43) => withConfiguration(
7804
8078
  withDebugOptions(
7805
8079
  withApiOptions(
7806
8080
  withProjectOptions(
7807
- yargs42.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
8081
+ yargs43.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
7808
8082
  )
7809
8083
  )
7810
8084
  )
@@ -7826,14 +8100,14 @@ var PreviewViewportModule = {
7826
8100
  command: "preview-viewport <command>",
7827
8101
  aliases: ["pv"],
7828
8102
  describe: "Commands for Canvas preview viewports",
7829
- builder: (yargs42) => yargs42.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
8103
+ builder: (yargs43) => yargs43.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
7830
8104
  handler: () => {
7831
- yargs17.help();
8105
+ yargs18.help();
7832
8106
  }
7833
8107
  };
7834
8108
 
7835
8109
  // src/commands/canvas/commands/prompts.ts
7836
- import yargs18 from "yargs";
8110
+ import yargs19 from "yargs";
7837
8111
 
7838
8112
  // src/commands/canvas/commands/prompts/_util.ts
7839
8113
  import { PromptClient } from "@uniformdev/canvas";
@@ -7845,12 +8119,12 @@ var getPromptClient = (options) => new PromptClient({ ...options, bypassCache: t
7845
8119
  var PromptGetModule = {
7846
8120
  command: "get <id>",
7847
8121
  describe: "Get a prompt",
7848
- builder: (yargs42) => withConfiguration(
8122
+ builder: (yargs43) => withConfiguration(
7849
8123
  withDebugOptions(
7850
8124
  withFormatOptions(
7851
8125
  withApiOptions(
7852
8126
  withProjectOptions(
7853
- yargs42.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
8127
+ yargs43.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
7854
8128
  )
7855
8129
  )
7856
8130
  )
@@ -7871,7 +8145,7 @@ var PromptGetModule = {
7871
8145
  var PromptListModule = {
7872
8146
  command: "list",
7873
8147
  describe: "List prompts",
7874
- builder: (yargs42) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs42))))),
8148
+ builder: (yargs43) => withConfiguration(withDebugOptions(withFormatOptions(withApiOptions(withProjectOptions(yargs43))))),
7875
8149
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
7876
8150
  const fetch2 = nodeFetchProxy(proxy, verbose);
7877
8151
  const client = getPromptClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -7912,13 +8186,13 @@ function createPromptEngineDataSource({
7912
8186
  var PromptPullModule = {
7913
8187
  command: "pull <directory>",
7914
8188
  describe: "Pulls all prompts to local files in a directory",
7915
- builder: (yargs42) => withConfiguration(
8189
+ builder: (yargs43) => withConfiguration(
7916
8190
  withDebugOptions(
7917
8191
  withApiOptions(
7918
8192
  withProjectOptions(
7919
8193
  withStateOptions(
7920
8194
  withDiffOptions(
7921
- yargs42.positional("directory", {
8195
+ yargs43.positional("directory", {
7922
8196
  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.",
7923
8197
  type: "string"
7924
8198
  }).option("format", {
@@ -7999,12 +8273,12 @@ var PromptPullModule = {
7999
8273
  var PromptPushModule = {
8000
8274
  command: "push <directory>",
8001
8275
  describe: "Pushes all prompts from files in a directory to Uniform",
8002
- builder: (yargs42) => withConfiguration(
8276
+ builder: (yargs43) => withConfiguration(
8003
8277
  withApiOptions(
8004
8278
  withProjectOptions(
8005
8279
  withStateOptions(
8006
8280
  withDiffOptions(
8007
- yargs42.positional("directory", {
8281
+ yargs43.positional("directory", {
8008
8282
  describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
8009
8283
  type: "string"
8010
8284
  }).option("mode", {
@@ -8073,10 +8347,10 @@ var PromptRemoveModule = {
8073
8347
  command: "remove <id>",
8074
8348
  aliases: ["delete", "rm"],
8075
8349
  describe: "Delete a prompt",
8076
- builder: (yargs42) => withConfiguration(
8350
+ builder: (yargs43) => withConfiguration(
8077
8351
  withDebugOptions(
8078
8352
  withApiOptions(
8079
- withProjectOptions(yargs42.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
8353
+ withProjectOptions(yargs43.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
8080
8354
  )
8081
8355
  )
8082
8356
  ),
@@ -8096,11 +8370,11 @@ var PromptUpdateModule = {
8096
8370
  command: "update <filename>",
8097
8371
  aliases: ["put"],
8098
8372
  describe: "Insert or update a prompt",
8099
- builder: (yargs42) => withConfiguration(
8373
+ builder: (yargs43) => withConfiguration(
8100
8374
  withDebugOptions(
8101
8375
  withApiOptions(
8102
8376
  withProjectOptions(
8103
- yargs42.positional("filename", { demandOption: true, describe: "Prompt file to put" })
8377
+ yargs43.positional("filename", { demandOption: true, describe: "Prompt file to put" })
8104
8378
  )
8105
8379
  )
8106
8380
  )
@@ -8122,14 +8396,14 @@ var PromptModule = {
8122
8396
  command: "prompt <command>",
8123
8397
  aliases: ["dt"],
8124
8398
  describe: "Commands for AI Prompt definitions",
8125
- builder: (yargs42) => yargs42.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
8399
+ builder: (yargs43) => yargs43.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
8126
8400
  handler: () => {
8127
- yargs18.help();
8401
+ yargs19.help();
8128
8402
  }
8129
8403
  };
8130
8404
 
8131
8405
  // src/commands/canvas/commands/workflow.ts
8132
- import yargs19 from "yargs";
8406
+ import yargs20 from "yargs";
8133
8407
 
8134
8408
  // src/commands/canvas/commands/workflow/_util.ts
8135
8409
  import { WorkflowClient } from "@uniformdev/canvas";
@@ -8172,12 +8446,12 @@ function createWorkflowEngineDataSource({
8172
8446
  var WorkflowPullModule = {
8173
8447
  command: "pull <directory>",
8174
8448
  describe: "Pulls all workflows to local files in a directory",
8175
- builder: (yargs42) => withConfiguration(
8449
+ builder: (yargs43) => withConfiguration(
8176
8450
  withApiOptions(
8177
8451
  withDebugOptions(
8178
8452
  withProjectOptions(
8179
8453
  withDiffOptions(
8180
- yargs42.positional("directory", {
8454
+ yargs43.positional("directory", {
8181
8455
  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.",
8182
8456
  type: "string"
8183
8457
  }).option("format", {
@@ -8252,12 +8526,12 @@ var WorkflowPullModule = {
8252
8526
  var WorkflowPushModule = {
8253
8527
  command: "push <directory>",
8254
8528
  describe: "Pushes all workflows from files in a directory to Uniform Canvas",
8255
- builder: (yargs42) => withConfiguration(
8529
+ builder: (yargs43) => withConfiguration(
8256
8530
  withDebugOptions(
8257
8531
  withApiOptions(
8258
8532
  withProjectOptions(
8259
8533
  withDiffOptions(
8260
- yargs42.positional("directory", {
8534
+ yargs43.positional("directory", {
8261
8535
  describe: "Directory to read from. If a filename is used, a package will be read instead.",
8262
8536
  type: "string"
8263
8537
  }).option("mode", {
@@ -8321,9 +8595,9 @@ var WorkflowModule = {
8321
8595
  command: "workflow <command>",
8322
8596
  aliases: ["wf"],
8323
8597
  describe: "Commands for Canvas workflows",
8324
- builder: (yargs42) => yargs42.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
8598
+ builder: (yargs43) => yargs43.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
8325
8599
  handler: () => {
8326
- yargs19.help();
8600
+ yargs20.help();
8327
8601
  }
8328
8602
  };
8329
8603
 
@@ -8332,17 +8606,17 @@ var CanvasCommand = {
8332
8606
  command: "canvas <command>",
8333
8607
  aliases: ["cv", "pm", "presentation"],
8334
8608
  describe: "Uniform Canvas commands",
8335
- builder: (yargs42) => yargs42.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(ComponentPatternModule).command(CompositionPatternModule).command(ContentTypeModule).command(EntryModule).command(EntryPatternModule).command(PromptModule).command(AssetModule).command(LocaleModule).command(WorkflowModule).command(PreviewUrlModule).command(PreviewViewportModule).demandCommand(),
8609
+ 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(),
8336
8610
  handler: () => {
8337
- yargs20.showHelp();
8611
+ yargs21.showHelp();
8338
8612
  }
8339
8613
  };
8340
8614
 
8341
8615
  // src/commands/context/index.ts
8342
- import yargs27 from "yargs";
8616
+ import yargs28 from "yargs";
8343
8617
 
8344
8618
  // src/commands/context/commands/aggregate.ts
8345
- import yargs21 from "yargs";
8619
+ import yargs22 from "yargs";
8346
8620
 
8347
8621
  // src/commands/context/commands/aggregate/_util.ts
8348
8622
  import { AggregateClient } from "@uniformdev/context/api";
@@ -8354,11 +8628,11 @@ var getAggregateClient = (options) => new AggregateClient({ ...options, bypassCa
8354
8628
  var AggregateGetModule = {
8355
8629
  command: "get <id>",
8356
8630
  describe: "Fetch an aggregate",
8357
- builder: (yargs42) => withConfiguration(
8631
+ builder: (yargs43) => withConfiguration(
8358
8632
  withFormatOptions(
8359
8633
  withApiOptions(
8360
8634
  withProjectOptions(
8361
- yargs42.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
8635
+ yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
8362
8636
  )
8363
8637
  )
8364
8638
  )
@@ -8381,7 +8655,7 @@ var AggregateListModule = {
8381
8655
  command: "list",
8382
8656
  describe: "List aggregates",
8383
8657
  aliases: ["ls"],
8384
- builder: (yargs42) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs42)))),
8658
+ builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
8385
8659
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
8386
8660
  const fetch2 = nodeFetchProxy(proxy);
8387
8661
  const client = getAggregateClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -8444,12 +8718,12 @@ function writeContextPackage(filename, packageContents) {
8444
8718
  var AggregatePullModule = {
8445
8719
  command: "pull <directory>",
8446
8720
  describe: "Pulls all aggregates to local files in a directory",
8447
- builder: (yargs42) => withConfiguration(
8721
+ builder: (yargs43) => withConfiguration(
8448
8722
  withApiOptions(
8449
8723
  withDebugOptions(
8450
8724
  withProjectOptions(
8451
8725
  withDiffOptions(
8452
- yargs42.positional("directory", {
8726
+ yargs43.positional("directory", {
8453
8727
  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.",
8454
8728
  type: "string"
8455
8729
  }).option("format", {
@@ -8524,12 +8798,12 @@ var AggregatePullModule = {
8524
8798
  var AggregatePushModule = {
8525
8799
  command: "push <directory>",
8526
8800
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
8527
- builder: (yargs42) => withConfiguration(
8801
+ builder: (yargs43) => withConfiguration(
8528
8802
  withApiOptions(
8529
8803
  withProjectOptions(
8530
8804
  withDiffOptions(
8531
8805
  withDebugOptions(
8532
- yargs42.positional("directory", {
8806
+ yargs43.positional("directory", {
8533
8807
  describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
8534
8808
  type: "string"
8535
8809
  }).option("mode", {
@@ -8594,10 +8868,10 @@ var AggregateRemoveModule = {
8594
8868
  command: "remove <id>",
8595
8869
  aliases: ["delete", "rm"],
8596
8870
  describe: "Delete an aggregate",
8597
- builder: (yargs42) => withConfiguration(
8871
+ builder: (yargs43) => withConfiguration(
8598
8872
  withApiOptions(
8599
8873
  withProjectOptions(
8600
- yargs42.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
8874
+ yargs43.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
8601
8875
  )
8602
8876
  )
8603
8877
  ),
@@ -8613,10 +8887,10 @@ var AggregateUpdateModule = {
8613
8887
  command: "update <filename>",
8614
8888
  aliases: ["put"],
8615
8889
  describe: "Insert or update an aggregate",
8616
- builder: (yargs42) => withConfiguration(
8890
+ builder: (yargs43) => withConfiguration(
8617
8891
  withApiOptions(
8618
8892
  withProjectOptions(
8619
- yargs42.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
8893
+ yargs43.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
8620
8894
  )
8621
8895
  )
8622
8896
  ),
@@ -8633,14 +8907,14 @@ var AggregateModule = {
8633
8907
  command: "aggregate <command>",
8634
8908
  aliases: ["agg", "intent", "audience"],
8635
8909
  describe: "Commands for Context aggregates (intents, audiences)",
8636
- builder: (yargs42) => yargs42.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
8910
+ builder: (yargs43) => yargs43.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
8637
8911
  handler: () => {
8638
- yargs21.help();
8912
+ yargs22.help();
8639
8913
  }
8640
8914
  };
8641
8915
 
8642
8916
  // src/commands/context/commands/enrichment.ts
8643
- import yargs22 from "yargs";
8917
+ import yargs23 from "yargs";
8644
8918
 
8645
8919
  // src/commands/context/commands/enrichment/_util.ts
8646
8920
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
@@ -8654,11 +8928,11 @@ function getEnrichmentClient(options) {
8654
8928
  var EnrichmentGetModule = {
8655
8929
  command: "get <id>",
8656
8930
  describe: "Fetch an enrichment category and its values",
8657
- builder: (yargs42) => withFormatOptions(
8931
+ builder: (yargs43) => withFormatOptions(
8658
8932
  withConfiguration(
8659
8933
  withApiOptions(
8660
8934
  withProjectOptions(
8661
- yargs42.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
8935
+ yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
8662
8936
  )
8663
8937
  )
8664
8938
  )
@@ -8681,7 +8955,7 @@ var EnrichmentListModule = {
8681
8955
  command: "list",
8682
8956
  describe: "List enrichments",
8683
8957
  aliases: ["ls"],
8684
- builder: (yargs42) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs42)))),
8958
+ builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
8685
8959
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
8686
8960
  const fetch2 = nodeFetchProxy(proxy);
8687
8961
  const client = getEnrichmentClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -8776,12 +9050,12 @@ var createEnrichmentValueEngineDataSource = ({
8776
9050
  var EnrichmentPullModule = {
8777
9051
  command: "pull <directory>",
8778
9052
  describe: "Pulls all enrichments to local files in a directory",
8779
- builder: (yargs42) => withConfiguration(
9053
+ builder: (yargs43) => withConfiguration(
8780
9054
  withDebugOptions(
8781
9055
  withApiOptions(
8782
9056
  withProjectOptions(
8783
9057
  withDiffOptions(
8784
- yargs42.positional("directory", {
9058
+ yargs43.positional("directory", {
8785
9059
  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.",
8786
9060
  type: "string"
8787
9061
  }).option("format", {
@@ -8856,11 +9130,11 @@ var EnrichmentPullModule = {
8856
9130
  var EnrichmentPushModule = {
8857
9131
  command: "push <directory>",
8858
9132
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
8859
- builder: (yargs42) => withConfiguration(
9133
+ builder: (yargs43) => withConfiguration(
8860
9134
  withApiOptions(
8861
9135
  withProjectOptions(
8862
9136
  withDiffOptions(
8863
- yargs42.positional("directory", {
9137
+ yargs43.positional("directory", {
8864
9138
  describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
8865
9139
  type: "string"
8866
9140
  }).option("mode", {
@@ -8923,10 +9197,10 @@ var EnrichmentRemoveModule = {
8923
9197
  command: "remove <id>",
8924
9198
  aliases: ["delete", "rm"],
8925
9199
  describe: "Delete an enrichment category and its values",
8926
- builder: (yargs42) => withConfiguration(
9200
+ builder: (yargs43) => withConfiguration(
8927
9201
  withApiOptions(
8928
9202
  withProjectOptions(
8929
- yargs42.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
9203
+ yargs43.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
8930
9204
  )
8931
9205
  )
8932
9206
  ),
@@ -8942,17 +9216,17 @@ var EnrichmentModule = {
8942
9216
  command: "enrichment <command>",
8943
9217
  aliases: ["enr"],
8944
9218
  describe: "Commands for Context enrichments",
8945
- builder: (yargs42) => yargs42.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
9219
+ builder: (yargs43) => yargs43.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
8946
9220
  handler: () => {
8947
- yargs22.help();
9221
+ yargs23.help();
8948
9222
  }
8949
9223
  };
8950
9224
 
8951
9225
  // src/commands/context/commands/manifest.ts
8952
- import yargs23 from "yargs";
9226
+ import yargs24 from "yargs";
8953
9227
 
8954
9228
  // src/commands/context/commands/manifest/get.ts
8955
- import { ApiClientError as ApiClientError2, UncachedManifestClient } from "@uniformdev/context/api";
9229
+ import { ApiClientError as ApiClientError5, UncachedManifestClient } from "@uniformdev/context/api";
8956
9230
  import { gray as gray4, green as green6, red as red6 } from "colorette";
8957
9231
  import { writeFile } from "fs";
8958
9232
  import { exit } from "process";
@@ -8960,10 +9234,10 @@ var ManifestGetModule = {
8960
9234
  command: "get [output]",
8961
9235
  aliases: ["dl", "download"],
8962
9236
  describe: "Download the Uniform Context manifest for a project",
8963
- builder: (yargs42) => withConfiguration(
9237
+ builder: (yargs43) => withConfiguration(
8964
9238
  withApiOptions(
8965
9239
  withProjectOptions(
8966
- yargs42.option("preview", {
9240
+ yargs43.option("preview", {
8967
9241
  describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
8968
9242
  default: false,
8969
9243
  type: "boolean",
@@ -9003,7 +9277,7 @@ var ManifestGetModule = {
9003
9277
  }
9004
9278
  } catch (e) {
9005
9279
  let message;
9006
- if (e instanceof ApiClientError2) {
9280
+ if (e instanceof ApiClientError5) {
9007
9281
  if (e.statusCode === 403) {
9008
9282
  message = `The API key ${apiKey} did not have permissions to fetch the manifest. Ensure ${preview ? "Uniform Context > Read Drafts" : "Uniform Context > Manifest > Read"} permissions are granted.`;
9009
9283
  }
@@ -9019,13 +9293,13 @@ var ManifestGetModule = {
9019
9293
  };
9020
9294
 
9021
9295
  // src/commands/context/commands/manifest/publish.ts
9022
- import { ApiClientError as ApiClientError3, UncachedManifestClient as UncachedManifestClient2 } from "@uniformdev/context/api";
9296
+ import { ApiClientError as ApiClientError6, UncachedManifestClient as UncachedManifestClient2 } from "@uniformdev/context/api";
9023
9297
  import { gray as gray5, red as red7 } from "colorette";
9024
9298
  import { exit as exit2 } from "process";
9025
9299
  var ManifestPublishModule = {
9026
9300
  command: "publish",
9027
9301
  describe: "Publish the Uniform Context manifest for a project",
9028
- builder: (yargs42) => withConfiguration(withApiOptions(withProjectOptions(yargs42))),
9302
+ builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(yargs43))),
9029
9303
  handler: async ({ apiKey, apiHost, proxy, project }) => {
9030
9304
  const fetch2 = nodeFetchProxy(proxy);
9031
9305
  try {
@@ -9038,7 +9312,7 @@ var ManifestPublishModule = {
9038
9312
  await client.publish();
9039
9313
  } catch (e) {
9040
9314
  let message;
9041
- if (e instanceof ApiClientError3) {
9315
+ if (e instanceof ApiClientError6) {
9042
9316
  if (e.statusCode === 403) {
9043
9317
  message = `The API key ${apiKey} did not have permissions to publish the manifest. Ensure Uniform Context > Manifest > Publish permissions are granted.`;
9044
9318
  }
@@ -9058,25 +9332,25 @@ var ManifestModule = {
9058
9332
  command: "manifest <command>",
9059
9333
  describe: "Commands for context manifests",
9060
9334
  aliases: ["man"],
9061
- builder: (yargs42) => yargs42.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
9335
+ builder: (yargs43) => yargs43.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
9062
9336
  handler: () => {
9063
- yargs23.help();
9337
+ yargs24.help();
9064
9338
  }
9065
9339
  };
9066
9340
 
9067
9341
  // src/commands/context/commands/quirk.ts
9068
- import yargs24 from "yargs";
9342
+ import yargs25 from "yargs";
9069
9343
 
9070
9344
  // src/commands/context/commands/quirk/get.ts
9071
9345
  import { UncachedQuirkClient } from "@uniformdev/context/api";
9072
9346
  var QuirkGetModule = {
9073
9347
  command: "get <id>",
9074
9348
  describe: "Fetch a quirk",
9075
- builder: (yargs42) => withConfiguration(
9349
+ builder: (yargs43) => withConfiguration(
9076
9350
  withFormatOptions(
9077
9351
  withApiOptions(
9078
9352
  withProjectOptions(
9079
- yargs42.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
9353
+ yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
9080
9354
  )
9081
9355
  )
9082
9356
  )
@@ -9100,11 +9374,11 @@ var QuirkListModule = {
9100
9374
  command: "list",
9101
9375
  describe: "List quirks",
9102
9376
  aliases: ["ls"],
9103
- builder: (yargs42) => withConfiguration(
9377
+ builder: (yargs43) => withConfiguration(
9104
9378
  withFormatOptions(
9105
9379
  withApiOptions(
9106
9380
  withProjectOptions(
9107
- yargs42.option("withIntegrations", {
9381
+ yargs43.option("withIntegrations", {
9108
9382
  alias: ["i"],
9109
9383
  describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
9110
9384
  type: "boolean"
@@ -9162,12 +9436,12 @@ function createQuirkEngineDataSource({
9162
9436
  var QuirkPullModule = {
9163
9437
  command: "pull <directory>",
9164
9438
  describe: "Pulls all quirks to local files in a directory",
9165
- builder: (yargs42) => withConfiguration(
9439
+ builder: (yargs43) => withConfiguration(
9166
9440
  withDebugOptions(
9167
9441
  withApiOptions(
9168
9442
  withProjectOptions(
9169
9443
  withDiffOptions(
9170
- yargs42.positional("directory", {
9444
+ yargs43.positional("directory", {
9171
9445
  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.",
9172
9446
  type: "string"
9173
9447
  }).option("format", {
@@ -9243,12 +9517,12 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
9243
9517
  var QuirkPushModule = {
9244
9518
  command: "push <directory>",
9245
9519
  describe: "Pushes all quirks from files in a directory or package to Uniform",
9246
- builder: (yargs42) => withConfiguration(
9520
+ builder: (yargs43) => withConfiguration(
9247
9521
  withDebugOptions(
9248
9522
  withApiOptions(
9249
9523
  withProjectOptions(
9250
9524
  withDiffOptions(
9251
- yargs42.positional("directory", {
9525
+ yargs43.positional("directory", {
9252
9526
  describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
9253
9527
  type: "string"
9254
9528
  }).option("mode", {
@@ -9313,10 +9587,10 @@ var QuirkRemoveModule = {
9313
9587
  command: "remove <id>",
9314
9588
  aliases: ["delete", "rm"],
9315
9589
  describe: "Delete a quirk",
9316
- builder: (yargs42) => withConfiguration(
9590
+ builder: (yargs43) => withConfiguration(
9317
9591
  withApiOptions(
9318
9592
  withProjectOptions(
9319
- yargs42.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
9593
+ yargs43.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
9320
9594
  )
9321
9595
  )
9322
9596
  ),
@@ -9333,10 +9607,10 @@ var QuirkUpdateModule = {
9333
9607
  command: "update <filename>",
9334
9608
  aliases: ["put"],
9335
9609
  describe: "Insert or update a quirk",
9336
- builder: (yargs42) => withConfiguration(
9610
+ builder: (yargs43) => withConfiguration(
9337
9611
  withApiOptions(
9338
9612
  withProjectOptions(
9339
- yargs42.positional("filename", { demandOption: true, describe: "Quirk file to put" })
9613
+ yargs43.positional("filename", { demandOption: true, describe: "Quirk file to put" })
9340
9614
  )
9341
9615
  )
9342
9616
  ),
@@ -9353,25 +9627,25 @@ var QuirkModule = {
9353
9627
  command: "quirk <command>",
9354
9628
  aliases: ["qk"],
9355
9629
  describe: "Commands for Context quirks",
9356
- builder: (yargs42) => yargs42.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
9630
+ builder: (yargs43) => yargs43.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
9357
9631
  handler: () => {
9358
- yargs24.help();
9632
+ yargs25.help();
9359
9633
  }
9360
9634
  };
9361
9635
 
9362
9636
  // src/commands/context/commands/signal.ts
9363
- import yargs25 from "yargs";
9637
+ import yargs26 from "yargs";
9364
9638
 
9365
9639
  // src/commands/context/commands/signal/get.ts
9366
9640
  import { UncachedSignalClient } from "@uniformdev/context/api";
9367
9641
  var SignalGetModule = {
9368
9642
  command: "get <id>",
9369
9643
  describe: "Fetch a signal",
9370
- builder: (yargs42) => withConfiguration(
9644
+ builder: (yargs43) => withConfiguration(
9371
9645
  withFormatOptions(
9372
9646
  withApiOptions(
9373
9647
  withProjectOptions(
9374
- yargs42.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
9648
+ yargs43.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
9375
9649
  )
9376
9650
  )
9377
9651
  )
@@ -9395,7 +9669,7 @@ var SignalListModule = {
9395
9669
  command: "list",
9396
9670
  describe: "List signals",
9397
9671
  aliases: ["ls"],
9398
- builder: (yargs42) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs42)))),
9672
+ builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
9399
9673
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
9400
9674
  const fetch2 = nodeFetchProxy(proxy);
9401
9675
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -9445,12 +9719,12 @@ function createSignalEngineDataSource({
9445
9719
  var SignalPullModule = {
9446
9720
  command: "pull <directory>",
9447
9721
  describe: "Pulls all signals to local files in a directory",
9448
- builder: (yargs42) => withConfiguration(
9722
+ builder: (yargs43) => withConfiguration(
9449
9723
  withDebugOptions(
9450
9724
  withApiOptions(
9451
9725
  withProjectOptions(
9452
9726
  withDiffOptions(
9453
- yargs42.positional("directory", {
9727
+ yargs43.positional("directory", {
9454
9728
  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.",
9455
9729
  type: "string"
9456
9730
  }).option("format", {
@@ -9526,12 +9800,12 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
9526
9800
  var SignalPushModule = {
9527
9801
  command: "push <directory>",
9528
9802
  describe: "Pushes all signals from files in a directory or package to Uniform",
9529
- builder: (yargs42) => withConfiguration(
9803
+ builder: (yargs43) => withConfiguration(
9530
9804
  withDebugOptions(
9531
9805
  withApiOptions(
9532
9806
  withProjectOptions(
9533
9807
  withDiffOptions(
9534
- yargs42.positional("directory", {
9808
+ yargs43.positional("directory", {
9535
9809
  describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
9536
9810
  type: "string"
9537
9811
  }).option("mode", {
@@ -9596,10 +9870,10 @@ var SignalRemoveModule = {
9596
9870
  command: "remove <id>",
9597
9871
  aliases: ["delete", "rm"],
9598
9872
  describe: "Delete a signal",
9599
- builder: (yargs42) => withConfiguration(
9873
+ builder: (yargs43) => withConfiguration(
9600
9874
  withApiOptions(
9601
9875
  withProjectOptions(
9602
- yargs42.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
9876
+ yargs43.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
9603
9877
  )
9604
9878
  )
9605
9879
  ),
@@ -9616,10 +9890,10 @@ var SignalUpdateModule = {
9616
9890
  command: "update <filename>",
9617
9891
  aliases: ["put"],
9618
9892
  describe: "Insert or update a signal",
9619
- builder: (yargs42) => withConfiguration(
9893
+ builder: (yargs43) => withConfiguration(
9620
9894
  withApiOptions(
9621
9895
  withProjectOptions(
9622
- yargs42.positional("filename", { demandOption: true, describe: "Signal file to put" })
9896
+ yargs43.positional("filename", { demandOption: true, describe: "Signal file to put" })
9623
9897
  )
9624
9898
  )
9625
9899
  ),
@@ -9636,25 +9910,25 @@ var SignalModule = {
9636
9910
  command: "signal <command>",
9637
9911
  aliases: ["sig"],
9638
9912
  describe: "Commands for Context signals",
9639
- builder: (yargs42) => yargs42.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
9913
+ builder: (yargs43) => yargs43.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
9640
9914
  handler: () => {
9641
- yargs25.help();
9915
+ yargs26.help();
9642
9916
  }
9643
9917
  };
9644
9918
 
9645
9919
  // src/commands/context/commands/test.ts
9646
- import yargs26 from "yargs";
9920
+ import yargs27 from "yargs";
9647
9921
 
9648
9922
  // src/commands/context/commands/test/get.ts
9649
9923
  import { UncachedTestClient } from "@uniformdev/context/api";
9650
9924
  var TestGetModule = {
9651
9925
  command: "get <id>",
9652
9926
  describe: "Fetch a test",
9653
- builder: (yargs42) => withConfiguration(
9927
+ builder: (yargs43) => withConfiguration(
9654
9928
  withFormatOptions(
9655
9929
  withApiOptions(
9656
9930
  withProjectOptions(
9657
- yargs42.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
9931
+ yargs43.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
9658
9932
  )
9659
9933
  )
9660
9934
  )
@@ -9678,7 +9952,7 @@ var TestListModule = {
9678
9952
  command: "list",
9679
9953
  describe: "List tests",
9680
9954
  aliases: ["ls"],
9681
- builder: (yargs42) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs42)))),
9955
+ builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
9682
9956
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
9683
9957
  const fetch2 = nodeFetchProxy(proxy);
9684
9958
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -9728,12 +10002,12 @@ function createTestEngineDataSource({
9728
10002
  var TestPullModule = {
9729
10003
  command: "pull <directory>",
9730
10004
  describe: "Pulls all tests to local files in a directory",
9731
- builder: (yargs42) => withConfiguration(
10005
+ builder: (yargs43) => withConfiguration(
9732
10006
  withDebugOptions(
9733
10007
  withApiOptions(
9734
10008
  withProjectOptions(
9735
10009
  withDiffOptions(
9736
- yargs42.positional("directory", {
10010
+ yargs43.positional("directory", {
9737
10011
  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.",
9738
10012
  type: "string"
9739
10013
  }).option("format", {
@@ -9809,12 +10083,12 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
9809
10083
  var TestPushModule = {
9810
10084
  command: "push <directory>",
9811
10085
  describe: "Pushes all tests from files in a directory or package to Uniform",
9812
- builder: (yargs42) => withConfiguration(
10086
+ builder: (yargs43) => withConfiguration(
9813
10087
  withDebugOptions(
9814
10088
  withApiOptions(
9815
10089
  withProjectOptions(
9816
10090
  withDiffOptions(
9817
- yargs42.positional("directory", {
10091
+ yargs43.positional("directory", {
9818
10092
  describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
9819
10093
  type: "string"
9820
10094
  }).option("mode", {
@@ -9879,10 +10153,10 @@ var TestRemoveModule = {
9879
10153
  command: "remove <id>",
9880
10154
  aliases: ["delete", "rm"],
9881
10155
  describe: "Delete a test",
9882
- builder: (yargs42) => withConfiguration(
10156
+ builder: (yargs43) => withConfiguration(
9883
10157
  withApiOptions(
9884
10158
  withProjectOptions(
9885
- yargs42.positional("id", { demandOption: true, describe: "Test public ID to delete" })
10159
+ yargs43.positional("id", { demandOption: true, describe: "Test public ID to delete" })
9886
10160
  )
9887
10161
  )
9888
10162
  ),
@@ -9899,9 +10173,9 @@ var TestUpdateModule = {
9899
10173
  command: "update <filename>",
9900
10174
  aliases: ["put"],
9901
10175
  describe: "Insert or update a test",
9902
- builder: (yargs42) => withConfiguration(
10176
+ builder: (yargs43) => withConfiguration(
9903
10177
  withApiOptions(
9904
- withProjectOptions(yargs42.positional("filename", { demandOption: true, describe: "Test file to put" }))
10178
+ withProjectOptions(yargs43.positional("filename", { demandOption: true, describe: "Test file to put" }))
9905
10179
  )
9906
10180
  ),
9907
10181
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -9916,9 +10190,9 @@ var TestUpdateModule = {
9916
10190
  var TestModule = {
9917
10191
  command: "test <command>",
9918
10192
  describe: "Commands for Context A/B tests",
9919
- builder: (yargs42) => yargs42.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
10193
+ builder: (yargs43) => yargs43.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
9920
10194
  handler: () => {
9921
- yargs26.help();
10195
+ yargs27.help();
9922
10196
  }
9923
10197
  };
9924
10198
 
@@ -9927,20 +10201,20 @@ var ContextCommand = {
9927
10201
  command: "context <command>",
9928
10202
  aliases: ["ctx"],
9929
10203
  describe: "Uniform Context commands",
9930
- builder: (yargs42) => yargs42.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
10204
+ builder: (yargs43) => yargs43.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
9931
10205
  handler: () => {
9932
- yargs27.showHelp();
10206
+ yargs28.showHelp();
9933
10207
  }
9934
10208
  };
9935
10209
 
9936
10210
  // src/commands/integration/index.ts
9937
- import yargs32 from "yargs";
10211
+ import yargs33 from "yargs";
9938
10212
 
9939
10213
  // src/commands/integration/commands/definition.ts
9940
- import yargs31 from "yargs";
10214
+ import yargs32 from "yargs";
9941
10215
 
9942
10216
  // src/commands/integration/commands/definition/dataResourceEditor/dataResourceEditor.ts
9943
- import yargs28 from "yargs";
10217
+ import yargs29 from "yargs";
9944
10218
 
9945
10219
  // src/commands/integration/commands/definition/dataResourceEditor/deploy.ts
9946
10220
  import { readFileSync as readFileSync2 } from "fs";
@@ -10011,8 +10285,8 @@ var EdgehancerClient = class extends ApiClient {
10011
10285
  };
10012
10286
 
10013
10287
  // src/commands/integration/commands/definition/dataResourceEditor/util.ts
10014
- function withDataResourceEditorIdOptions(yargs42) {
10015
- return yargs42.option("connectorType", {
10288
+ function withDataResourceEditorIdOptions(yargs43) {
10289
+ return yargs43.option("connectorType", {
10016
10290
  describe: "Integration data connector type to attach the data resource editor to, as defined in the integration manifest file.",
10017
10291
  demandOption: true,
10018
10292
  type: "string"
@@ -10032,11 +10306,11 @@ function withDataResourceEditorIdOptions(yargs42) {
10032
10306
  var IntegrationDataResourceEditorDeployModule = {
10033
10307
  command: "deploy <filename>",
10034
10308
  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.",
10035
- builder: (yargs42) => withConfiguration(
10309
+ builder: (yargs43) => withConfiguration(
10036
10310
  withApiOptions(
10037
10311
  withTeamOptions(
10038
10312
  withDataResourceEditorIdOptions(
10039
- yargs42.positional("filename", {
10313
+ yargs43.positional("filename", {
10040
10314
  demandOption: true,
10041
10315
  describe: "ESM code file to run for the target data resource editor hook. Refer to the documentation for expected types."
10042
10316
  }).option("compatibilityDate", {
@@ -10079,7 +10353,7 @@ var IntegrationDataResourceEditorDeployModule = {
10079
10353
  var IntegrationDataResourceEditorRemoveModule = {
10080
10354
  command: "remove",
10081
10355
  describe: "Removes a custom AI data resource editor hook from a data resource archetype. The API key used must have team admin permissions.",
10082
- builder: (yargs42) => withConfiguration(withApiOptions(withTeamOptions(withDataResourceEditorIdOptions(yargs42)))),
10356
+ builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withDataResourceEditorIdOptions(yargs43)))),
10083
10357
  handler: async ({ apiHost, apiKey, proxy, team: teamId, connectorType, archetype, hook }) => {
10084
10358
  const fetch2 = nodeFetchProxy(proxy);
10085
10359
  const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
@@ -10091,21 +10365,21 @@ var IntegrationDataResourceEditorRemoveModule = {
10091
10365
  var IntegrationDataResourceEditorModule = {
10092
10366
  command: "dataResourceEditor <command>",
10093
10367
  describe: "Commands for managing custom AI data resource editors at the team level.",
10094
- builder: (yargs42) => yargs42.command(IntegrationDataResourceEditorDeployModule).command(IntegrationDataResourceEditorRemoveModule).demandCommand(),
10368
+ builder: (yargs43) => yargs43.command(IntegrationDataResourceEditorDeployModule).command(IntegrationDataResourceEditorRemoveModule).demandCommand(),
10095
10369
  handler: () => {
10096
- yargs28.help();
10370
+ yargs29.help();
10097
10371
  }
10098
10372
  };
10099
10373
 
10100
10374
  // src/commands/integration/commands/definition/edgehancer/edgehancer.ts
10101
- import yargs29 from "yargs";
10375
+ import yargs30 from "yargs";
10102
10376
 
10103
10377
  // src/commands/integration/commands/definition/edgehancer/deploy.ts
10104
10378
  import { readFileSync as readFileSync3 } from "fs";
10105
10379
 
10106
10380
  // src/commands/integration/commands/definition/edgehancer/util.ts
10107
- function withEdgehancerIdOptions(yargs42) {
10108
- return yargs42.option("connectorType", {
10381
+ function withEdgehancerIdOptions(yargs43) {
10382
+ return yargs43.option("connectorType", {
10109
10383
  describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
10110
10384
  demandOption: true,
10111
10385
  type: "string"
@@ -10125,11 +10399,11 @@ function withEdgehancerIdOptions(yargs42) {
10125
10399
  var IntegrationEdgehancerDeployModule = {
10126
10400
  command: "deploy <filename>",
10127
10401
  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.",
10128
- builder: (yargs42) => withConfiguration(
10402
+ builder: (yargs43) => withConfiguration(
10129
10403
  withApiOptions(
10130
10404
  withTeamOptions(
10131
10405
  withEdgehancerIdOptions(
10132
- yargs42.positional("filename", {
10406
+ yargs43.positional("filename", {
10133
10407
  demandOption: true,
10134
10408
  describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
10135
10409
  }).option("compatibilityDate", {
@@ -10172,7 +10446,7 @@ var IntegrationEdgehancerDeployModule = {
10172
10446
  var IntegrationEdgehancerRemoveModule = {
10173
10447
  command: "remove",
10174
10448
  describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
10175
- builder: (yargs42) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs42)))),
10449
+ builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs43)))),
10176
10450
  handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
10177
10451
  const fetch2 = nodeFetchProxy(proxy);
10178
10452
  const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch2, teamId });
@@ -10184,22 +10458,22 @@ var IntegrationEdgehancerRemoveModule = {
10184
10458
  var IntegrationEdgehancerModule = {
10185
10459
  command: "edgehancer <command>",
10186
10460
  describe: "Commands for managing custom integration edgehancers at the team level.",
10187
- builder: (yargs42) => yargs42.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
10461
+ builder: (yargs43) => yargs43.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
10188
10462
  handler: () => {
10189
- yargs29.help();
10463
+ yargs30.help();
10190
10464
  }
10191
10465
  };
10192
10466
 
10193
10467
  // src/commands/integration/commands/definition/propertyEditor/propertyEditor.ts
10194
- import yargs30 from "yargs";
10468
+ import yargs31 from "yargs";
10195
10469
 
10196
10470
  // src/commands/integration/commands/definition/propertyEditor/deploy.ts
10197
10471
  import { IntegrationPropertyEditorsClient } from "@uniformdev/canvas";
10198
10472
  import { readFileSync as readFileSync4 } from "fs";
10199
10473
 
10200
10474
  // src/commands/integration/commands/definition/propertyEditor/util.ts
10201
- function withPropertyEditorIdOptions(yargs42) {
10202
- return yargs42.option("propertyType", {
10475
+ function withPropertyEditorIdOptions(yargs43) {
10476
+ return yargs43.option("propertyType", {
10203
10477
  describe: "Property type to attach the editor to.",
10204
10478
  demandOption: true,
10205
10479
  type: "string"
@@ -10215,11 +10489,11 @@ function withPropertyEditorIdOptions(yargs42) {
10215
10489
  var IntegrationPropertyEditorDeployModule = {
10216
10490
  command: "deploy <filename>",
10217
10491
  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.",
10218
- builder: (yargs42) => withConfiguration(
10492
+ builder: (yargs43) => withConfiguration(
10219
10493
  withApiOptions(
10220
10494
  withTeamOptions(
10221
10495
  withPropertyEditorIdOptions(
10222
- yargs42.positional("filename", {
10496
+ yargs43.positional("filename", {
10223
10497
  demandOption: true,
10224
10498
  describe: "ESM code file to run for the target property editor hook. Refer to the documentation for expected types."
10225
10499
  }).option("compatibilityDate", {
@@ -10262,7 +10536,7 @@ import { IntegrationPropertyEditorsClient as IntegrationPropertyEditorsClient2 }
10262
10536
  var IntegrationPropertyEditorRemoveModule = {
10263
10537
  command: "remove",
10264
10538
  describe: "Deletes a custom AI property editor hook from a property type. The API key used must have team admin permissions.",
10265
- builder: (yargs42) => withConfiguration(withApiOptions(withTeamOptions(withPropertyEditorIdOptions(yargs42)))),
10539
+ builder: (yargs43) => withConfiguration(withApiOptions(withTeamOptions(withPropertyEditorIdOptions(yargs43)))),
10266
10540
  handler: async ({ apiHost, apiKey, proxy, team: teamId, propertyType, hook }) => {
10267
10541
  const fetch2 = nodeFetchProxy(proxy);
10268
10542
  const client = new IntegrationPropertyEditorsClient2({ apiKey, apiHost, fetch: fetch2, teamId });
@@ -10274,9 +10548,9 @@ var IntegrationPropertyEditorRemoveModule = {
10274
10548
  var IntegrationPropertyEditorModule = {
10275
10549
  command: "propertyEditor <command>",
10276
10550
  describe: "Commands for managing custom AI property editors at the team level.",
10277
- builder: (yargs42) => yargs42.command(IntegrationPropertyEditorDeployModule).command(IntegrationPropertyEditorRemoveModule).demandCommand(),
10551
+ builder: (yargs43) => yargs43.command(IntegrationPropertyEditorDeployModule).command(IntegrationPropertyEditorRemoveModule).demandCommand(),
10278
10552
  handler: () => {
10279
- yargs30.help();
10553
+ yargs31.help();
10280
10554
  }
10281
10555
  };
10282
10556
 
@@ -10316,10 +10590,10 @@ var DefinitionClient = class extends ApiClient2 {
10316
10590
  var IntegrationDefinitionRegisterModule = {
10317
10591
  command: "register <filename>",
10318
10592
  describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
10319
- builder: (yargs42) => withConfiguration(
10593
+ builder: (yargs43) => withConfiguration(
10320
10594
  withApiOptions(
10321
10595
  withTeamOptions(
10322
- yargs42.positional("filename", {
10596
+ yargs43.positional("filename", {
10323
10597
  demandOption: true,
10324
10598
  describe: "Integration definition manifest to register"
10325
10599
  })
@@ -10338,10 +10612,10 @@ var IntegrationDefinitionRegisterModule = {
10338
10612
  var IntegrationDefinitionRemoveModule = {
10339
10613
  command: "remove <type>",
10340
10614
  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.",
10341
- builder: (yargs42) => withConfiguration(
10615
+ builder: (yargs43) => withConfiguration(
10342
10616
  withApiOptions(
10343
10617
  withTeamOptions(
10344
- yargs42.positional("type", {
10618
+ yargs43.positional("type", {
10345
10619
  demandOption: true,
10346
10620
  describe: "Integration type (from its manifest) to remove."
10347
10621
  })
@@ -10359,9 +10633,9 @@ var IntegrationDefinitionRemoveModule = {
10359
10633
  var IntegrationDefinitionModule = {
10360
10634
  command: "definition <command>",
10361
10635
  describe: "Commands for managing custom integration definitions at the team level.",
10362
- builder: (yargs42) => yargs42.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).command(IntegrationDataResourceEditorModule).command(IntegrationPropertyEditorModule).demandCommand(),
10636
+ builder: (yargs43) => yargs43.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).command(IntegrationDataResourceEditorModule).command(IntegrationPropertyEditorModule).demandCommand(),
10363
10637
  handler: () => {
10364
- yargs31.help();
10638
+ yargs32.help();
10365
10639
  }
10366
10640
  };
10367
10641
 
@@ -10401,10 +10675,10 @@ var InstallClient = class extends ApiClient3 {
10401
10675
  var IntegrationInstallModule = {
10402
10676
  command: "install <type>",
10403
10677
  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.",
10404
- builder: (yargs42) => withConfiguration(
10678
+ builder: (yargs43) => withConfiguration(
10405
10679
  withApiOptions(
10406
10680
  withProjectOptions(
10407
- yargs42.positional("type", {
10681
+ yargs43.positional("type", {
10408
10682
  demandOption: true,
10409
10683
  describe: "Integration type to install (as defined in its manifest)"
10410
10684
  }).option("configuration", {
@@ -10426,10 +10700,10 @@ var IntegrationInstallModule = {
10426
10700
  var IntegrationUninstallModule = {
10427
10701
  command: "uninstall <type>",
10428
10702
  describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
10429
- builder: (yargs42) => withConfiguration(
10703
+ builder: (yargs43) => withConfiguration(
10430
10704
  withApiOptions(
10431
10705
  withProjectOptions(
10432
- yargs42.positional("type", {
10706
+ yargs43.positional("type", {
10433
10707
  demandOption: true,
10434
10708
  describe: "Integration type to uninstall (as defined in its manifest)"
10435
10709
  })
@@ -10447,9 +10721,9 @@ var IntegrationUninstallModule = {
10447
10721
  var IntegrationCommand = {
10448
10722
  command: "integration <command>",
10449
10723
  describe: "Integration management commands",
10450
- builder: (yargs42) => yargs42.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
10724
+ builder: (yargs43) => yargs43.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
10451
10725
  handler: () => {
10452
- yargs32.showHelp();
10726
+ yargs33.showHelp();
10453
10727
  }
10454
10728
  };
10455
10729
 
@@ -10914,14 +11188,14 @@ var NewMeshCmd = {
10914
11188
  };
10915
11189
 
10916
11190
  // src/commands/policy-documents/index.ts
10917
- import yargs33 from "yargs";
11191
+ import yargs34 from "yargs";
10918
11192
 
10919
11193
  // src/commands/policy-documents/commands/list.ts
10920
11194
  var PolicyDocumentsListModule = {
10921
11195
  command: "list",
10922
11196
  describe: "List policy documents for a project",
10923
11197
  aliases: ["ls"],
10924
- builder: (yargs42) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs42)))),
11198
+ builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
10925
11199
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId, verbose }) => {
10926
11200
  const fetch2 = nodeFetchProxy(proxy, verbose);
10927
11201
  const url = new URL(`/api/v1/policy-documents`, apiHost);
@@ -11006,12 +11280,12 @@ var selectDisplayName13 = (policyDoc) => `Policy document for role ${policyDoc.r
11006
11280
  var PolicyDocumentsPullModule = {
11007
11281
  command: "pull <directory>",
11008
11282
  describe: "Pulls all policy documents to local files in a directory",
11009
- builder: (yargs42) => withConfiguration(
11283
+ builder: (yargs43) => withConfiguration(
11010
11284
  withApiOptions(
11011
11285
  withDebugOptions(
11012
11286
  withProjectOptions(
11013
11287
  withDiffOptions(
11014
- yargs42.positional("directory", {
11288
+ yargs43.positional("directory", {
11015
11289
  describe: "Directory to save to. Each policy document will be saved as a separate file named by role ID.",
11016
11290
  type: "string"
11017
11291
  }).option("format", {
@@ -11066,7 +11340,8 @@ var PolicyDocumentsPullModule = {
11066
11340
  };
11067
11341
 
11068
11342
  // src/commands/policy-documents/commands/push.ts
11069
- import { readdir as readdir2, stat } from "fs/promises";
11343
+ import { existsSync as existsSync5, mkdirSync as mkdirSync4 } from "fs";
11344
+ import { readdir as readdir2 } from "fs/promises";
11070
11345
  import { extname as extname2, join as join11 } from "path";
11071
11346
  async function readLocalPolicyDocuments(directory, format, verbose) {
11072
11347
  const files = await readdir2(directory);
@@ -11144,12 +11419,12 @@ function mergePolicyDocuments(localDocs, remoteDocs, mode) {
11144
11419
  var PolicyDocumentsPushModule = {
11145
11420
  command: "push <directory>",
11146
11421
  describe: "Pushes policy documents from local files to Uniform",
11147
- builder: (yargs42) => withConfiguration(
11422
+ builder: (yargs43) => withConfiguration(
11148
11423
  withApiOptions(
11149
11424
  withDebugOptions(
11150
11425
  withProjectOptions(
11151
11426
  withDiffOptions(
11152
- yargs42.positional("directory", {
11427
+ yargs43.positional("directory", {
11153
11428
  describe: "Directory containing policy document files (one file per role ID).",
11154
11429
  type: "string"
11155
11430
  }).option("format", {
@@ -11183,16 +11458,11 @@ var PolicyDocumentsPushModule = {
11183
11458
  allowEmptySource,
11184
11459
  verbose
11185
11460
  }) => {
11186
- try {
11187
- const dirStat = await stat(directory);
11188
- if (!dirStat.isDirectory()) {
11189
- throw new Error(`Path "${directory}" is not a directory`);
11190
- }
11191
- } catch (e) {
11192
- if (e.code === "ENOENT") {
11193
- throw new Error(`Directory "${directory}" does not exist`);
11461
+ if (!existsSync5(directory)) {
11462
+ if (verbose) {
11463
+ console.log(`Creating directory ${directory}`);
11194
11464
  }
11195
- throw e;
11465
+ mkdirSync4(directory, { recursive: true });
11196
11466
  }
11197
11467
  const fetch2 = nodeFetchProxy(proxy, verbose);
11198
11468
  const localDocs = await readLocalPolicyDocuments(directory, format, verbose);
@@ -11250,17 +11520,17 @@ var PolicyDocumentsCommand = {
11250
11520
  command: "policy-documents <command>",
11251
11521
  aliases: ["policy", "policies"],
11252
11522
  describe: "Uniform Policy Documents commands",
11253
- builder: (yargs42) => yargs42.command(PolicyDocumentsListModule).command(PolicyDocumentsPullModule).command(PolicyDocumentsPushModule).demandCommand(),
11523
+ builder: (yargs43) => yargs43.command(PolicyDocumentsListModule).command(PolicyDocumentsPullModule).command(PolicyDocumentsPushModule).demandCommand(),
11254
11524
  handler: () => {
11255
- yargs33.showHelp();
11525
+ yargs34.showHelp();
11256
11526
  }
11257
11527
  };
11258
11528
 
11259
11529
  // src/commands/project-map/index.ts
11260
- import yargs36 from "yargs";
11530
+ import yargs37 from "yargs";
11261
11531
 
11262
11532
  // src/commands/project-map/commands/projectMapDefinition.ts
11263
- import yargs34 from "yargs";
11533
+ import yargs35 from "yargs";
11264
11534
 
11265
11535
  // src/commands/project-map/commands/ProjectMapDefinition/_util.ts
11266
11536
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
@@ -11274,11 +11544,11 @@ function getProjectMapClient(options) {
11274
11544
  var ProjectMapDefinitionGetModule = {
11275
11545
  command: "get <id>",
11276
11546
  describe: "Fetch a project map",
11277
- builder: (yargs42) => withFormatOptions(
11547
+ builder: (yargs43) => withFormatOptions(
11278
11548
  withConfiguration(
11279
11549
  withApiOptions(
11280
11550
  withProjectOptions(
11281
- yargs42.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
11551
+ yargs43.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
11282
11552
  )
11283
11553
  )
11284
11554
  )
@@ -11301,7 +11571,7 @@ var ProjectMapDefinitionListModule = {
11301
11571
  command: "list",
11302
11572
  describe: "List of project maps",
11303
11573
  aliases: ["ls"],
11304
- builder: (yargs42) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs42)))),
11574
+ builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
11305
11575
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
11306
11576
  const fetch2 = nodeFetchProxy(proxy);
11307
11577
  const client = getProjectMapClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -11355,12 +11625,12 @@ function createProjectMapDefinitionEngineDataSource({
11355
11625
  var ProjectMapDefinitionPullModule = {
11356
11626
  command: "pull <directory>",
11357
11627
  describe: "Pulls all project maps to local files in a directory",
11358
- builder: (yargs42) => withConfiguration(
11628
+ builder: (yargs43) => withConfiguration(
11359
11629
  withDebugOptions(
11360
11630
  withApiOptions(
11361
11631
  withProjectOptions(
11362
11632
  withDiffOptions(
11363
- yargs42.positional("directory", {
11633
+ yargs43.positional("directory", {
11364
11634
  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.",
11365
11635
  type: "string"
11366
11636
  }).option("format", {
@@ -11435,12 +11705,12 @@ var ProjectMapDefinitionPullModule = {
11435
11705
  var ProjectMapDefinitionPushModule = {
11436
11706
  command: "push <directory>",
11437
11707
  describe: "Pushes all project maps from files in a directory or package to Uniform",
11438
- builder: (yargs42) => withConfiguration(
11708
+ builder: (yargs43) => withConfiguration(
11439
11709
  withDebugOptions(
11440
11710
  withApiOptions(
11441
11711
  withProjectOptions(
11442
11712
  withDiffOptions(
11443
- yargs42.positional("directory", {
11713
+ yargs43.positional("directory", {
11444
11714
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
11445
11715
  type: "string"
11446
11716
  }).option("mode", {
@@ -11504,9 +11774,9 @@ var ProjectMapDefinitionRemoveModule = {
11504
11774
  command: "remove <id>",
11505
11775
  aliases: ["delete", "rm"],
11506
11776
  describe: "Delete a project map",
11507
- builder: (yargs42) => withConfiguration(
11777
+ builder: (yargs43) => withConfiguration(
11508
11778
  withApiOptions(
11509
- withProjectOptions(yargs42.positional("id", { demandOption: true, describe: " UUID to delete" }))
11779
+ withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
11510
11780
  )
11511
11781
  ),
11512
11782
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -11521,10 +11791,10 @@ var ProjectMapDefinitionUpdateModule = {
11521
11791
  command: "update <filename>",
11522
11792
  aliases: ["put"],
11523
11793
  describe: "Insert or update a project map",
11524
- builder: (yargs42) => withConfiguration(
11794
+ builder: (yargs43) => withConfiguration(
11525
11795
  withApiOptions(
11526
11796
  withProjectOptions(
11527
- yargs42.positional("filename", { demandOption: true, describe: "Project map file to put" })
11797
+ yargs43.positional("filename", { demandOption: true, describe: "Project map file to put" })
11528
11798
  )
11529
11799
  )
11530
11800
  ),
@@ -11540,24 +11810,24 @@ var ProjectMapDefinitionUpdateModule = {
11540
11810
  var ProjectMapDefinitionModule = {
11541
11811
  command: "definition <command>",
11542
11812
  describe: "Commands for ProjectMap Definitions",
11543
- builder: (yargs42) => yargs42.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
11813
+ builder: (yargs43) => yargs43.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
11544
11814
  handler: () => {
11545
- yargs34.help();
11815
+ yargs35.help();
11546
11816
  }
11547
11817
  };
11548
11818
 
11549
11819
  // src/commands/project-map/commands/projectMapNode.ts
11550
- import yargs35 from "yargs";
11820
+ import yargs36 from "yargs";
11551
11821
 
11552
11822
  // src/commands/project-map/commands/ProjectMapNode/get.ts
11553
11823
  var ProjectMapNodeGetModule = {
11554
11824
  command: "get <id> <projectMapId>",
11555
11825
  describe: "Fetch a project map node",
11556
- builder: (yargs42) => withConfiguration(
11826
+ builder: (yargs43) => withConfiguration(
11557
11827
  withFormatOptions(
11558
11828
  withApiOptions(
11559
11829
  withProjectOptions(
11560
- yargs42.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
11830
+ yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
11561
11831
  )
11562
11832
  )
11563
11833
  )
@@ -11581,12 +11851,12 @@ var ProjectMapNodeListModule = {
11581
11851
  command: "list <projectMapId>",
11582
11852
  describe: "List project map nodes",
11583
11853
  aliases: ["ls"],
11584
- builder: (yargs42) => withConfiguration(
11854
+ builder: (yargs43) => withConfiguration(
11585
11855
  withFormatOptions(
11586
11856
  withApiOptions(
11587
11857
  withProjectOptions(
11588
11858
  withStateOptions(
11589
- yargs42.positional("projectMapId", {
11859
+ yargs43.positional("projectMapId", {
11590
11860
  demandOption: true,
11591
11861
  describe: "ProjectMap UUID to fetch from"
11592
11862
  })
@@ -11664,12 +11934,12 @@ function createProjectMapNodeEngineDataSource({
11664
11934
  var ProjectMapNodePullModule = {
11665
11935
  command: "pull <directory>",
11666
11936
  describe: "Pulls all project maps nodes to local files in a directory",
11667
- builder: (yargs42) => withConfiguration(
11937
+ builder: (yargs43) => withConfiguration(
11668
11938
  withDebugOptions(
11669
11939
  withApiOptions(
11670
11940
  withProjectOptions(
11671
11941
  withDiffOptions(
11672
- yargs42.positional("directory", {
11942
+ yargs43.positional("directory", {
11673
11943
  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.",
11674
11944
  type: "string"
11675
11945
  }).option("format", {
@@ -11751,12 +12021,12 @@ import {
11751
12021
  var ProjectMapNodePushModule = {
11752
12022
  command: "push <directory>",
11753
12023
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
11754
- builder: (yargs42) => withConfiguration(
12024
+ builder: (yargs43) => withConfiguration(
11755
12025
  withDebugOptions(
11756
12026
  withApiOptions(
11757
12027
  withProjectOptions(
11758
12028
  withDiffOptions(
11759
- yargs42.positional("directory", {
12029
+ yargs43.positional("directory", {
11760
12030
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
11761
12031
  type: "string"
11762
12032
  }).option("mode", {
@@ -11858,10 +12128,10 @@ var ProjectMapNodeRemoveModule = {
11858
12128
  command: "remove <id> <projectMapId>",
11859
12129
  aliases: ["delete", "rm"],
11860
12130
  describe: "Delete a project map node",
11861
- builder: (yargs42) => withConfiguration(
12131
+ builder: (yargs43) => withConfiguration(
11862
12132
  withApiOptions(
11863
12133
  withProjectOptions(
11864
- yargs42.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
12134
+ yargs43.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
11865
12135
  )
11866
12136
  )
11867
12137
  ),
@@ -11877,10 +12147,10 @@ var ProjectMapNodeUpdateModule = {
11877
12147
  command: "update <filename> <projectMapId>",
11878
12148
  aliases: ["put"],
11879
12149
  describe: "Insert or update a project map node",
11880
- builder: (yargs42) => withConfiguration(
12150
+ builder: (yargs43) => withConfiguration(
11881
12151
  withApiOptions(
11882
12152
  withProjectOptions(
11883
- yargs42.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
12153
+ yargs43.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
11884
12154
  )
11885
12155
  )
11886
12156
  ),
@@ -11896,9 +12166,9 @@ var ProjectMapNodeUpdateModule = {
11896
12166
  var ProjectMapNodeModule = {
11897
12167
  command: "node <command>",
11898
12168
  describe: "Commands for ProjectMap Nodes",
11899
- builder: (yargs42) => yargs42.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
12169
+ builder: (yargs43) => yargs43.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
11900
12170
  handler: () => {
11901
- yargs35.help();
12171
+ yargs36.help();
11902
12172
  }
11903
12173
  };
11904
12174
 
@@ -11907,17 +12177,17 @@ var ProjectMapCommand = {
11907
12177
  command: "project-map <command>",
11908
12178
  aliases: ["prm"],
11909
12179
  describe: "Uniform ProjectMap commands",
11910
- builder: (yargs42) => yargs42.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
12180
+ builder: (yargs43) => yargs43.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
11911
12181
  handler: () => {
11912
- yargs36.showHelp();
12182
+ yargs37.showHelp();
11913
12183
  }
11914
12184
  };
11915
12185
 
11916
12186
  // src/commands/redirect/index.ts
11917
- import yargs38 from "yargs";
12187
+ import yargs39 from "yargs";
11918
12188
 
11919
12189
  // src/commands/redirect/commands/redirect.ts
11920
- import yargs37 from "yargs";
12190
+ import yargs38 from "yargs";
11921
12191
 
11922
12192
  // src/commands/redirect/commands/RedirectDefinition/_util.ts
11923
12193
  import { UncachedRedirectClient } from "@uniformdev/redirect";
@@ -11942,11 +12212,11 @@ function getRedirectClient(options) {
11942
12212
  var RedirectDefinitionGetModule = {
11943
12213
  command: "get <id>",
11944
12214
  describe: "Fetch a redirect",
11945
- builder: (yargs42) => withConfiguration(
12215
+ builder: (yargs43) => withConfiguration(
11946
12216
  withFormatOptions(
11947
12217
  withApiOptions(
11948
12218
  withProjectOptions(
11949
- yargs42.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
12219
+ yargs43.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
11950
12220
  )
11951
12221
  )
11952
12222
  )
@@ -11969,7 +12239,7 @@ var RedirectDefinitionListModule = {
11969
12239
  command: "list",
11970
12240
  describe: "List of redirects",
11971
12241
  aliases: ["ls"],
11972
- builder: (yargs42) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs42)))),
12242
+ builder: (yargs43) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs43)))),
11973
12243
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
11974
12244
  const fetch2 = nodeFetchProxy(proxy);
11975
12245
  const client = getRedirectClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -12021,12 +12291,12 @@ function createRedirectDefinitionEngineDataSource({
12021
12291
  var RedirectDefinitionPullModule = {
12022
12292
  command: "pull <directory>",
12023
12293
  describe: "Pulls all redirects to local files in a directory",
12024
- builder: (yargs42) => withConfiguration(
12294
+ builder: (yargs43) => withConfiguration(
12025
12295
  withDebugOptions(
12026
12296
  withApiOptions(
12027
12297
  withProjectOptions(
12028
12298
  withDiffOptions(
12029
- yargs42.positional("directory", {
12299
+ yargs43.positional("directory", {
12030
12300
  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.",
12031
12301
  type: "string"
12032
12302
  }).option("format", {
@@ -12102,12 +12372,12 @@ var RedirectDefinitionPullModule = {
12102
12372
  var RedirectDefinitionPushModule = {
12103
12373
  command: "push <directory>",
12104
12374
  describe: "Pushes all redirects from files in a directory or package to Uniform",
12105
- builder: (yargs42) => withConfiguration(
12375
+ builder: (yargs43) => withConfiguration(
12106
12376
  withDebugOptions(
12107
12377
  withApiOptions(
12108
12378
  withProjectOptions(
12109
12379
  withDiffOptions(
12110
- yargs42.positional("directory", {
12380
+ yargs43.positional("directory", {
12111
12381
  describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
12112
12382
  type: "string"
12113
12383
  }).option("mode", {
@@ -12171,9 +12441,9 @@ var RedirectDefinitionRemoveModule = {
12171
12441
  command: "remove <id>",
12172
12442
  aliases: ["delete", "rm"],
12173
12443
  describe: "Delete a redirect",
12174
- builder: (yargs42) => withConfiguration(
12444
+ builder: (yargs43) => withConfiguration(
12175
12445
  withApiOptions(
12176
- withProjectOptions(yargs42.positional("id", { demandOption: true, describe: " UUID to delete" }))
12446
+ withProjectOptions(yargs43.positional("id", { demandOption: true, describe: " UUID to delete" }))
12177
12447
  )
12178
12448
  ),
12179
12449
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -12188,10 +12458,10 @@ var RedirectDefinitionUpdateModule = {
12188
12458
  command: "update <filename>",
12189
12459
  aliases: ["put"],
12190
12460
  describe: "Insert or update a redirect",
12191
- builder: (yargs42) => withConfiguration(
12461
+ builder: (yargs43) => withConfiguration(
12192
12462
  withApiOptions(
12193
12463
  withProjectOptions(
12194
- yargs42.positional("filename", { demandOption: true, describe: "Redirect file to put" })
12464
+ yargs43.positional("filename", { demandOption: true, describe: "Redirect file to put" })
12195
12465
  )
12196
12466
  )
12197
12467
  ),
@@ -12207,9 +12477,9 @@ var RedirectDefinitionUpdateModule = {
12207
12477
  var RedirectDefinitionModule = {
12208
12478
  command: "definition <command>",
12209
12479
  describe: "Commands for Redirect Definitions",
12210
- builder: (yargs42) => yargs42.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
12480
+ builder: (yargs43) => yargs43.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
12211
12481
  handler: () => {
12212
- yargs37.help();
12482
+ yargs38.help();
12213
12483
  }
12214
12484
  };
12215
12485
 
@@ -12218,14 +12488,14 @@ var RedirectCommand = {
12218
12488
  command: "redirect <command>",
12219
12489
  aliases: ["red"],
12220
12490
  describe: "Uniform Redirect commands",
12221
- builder: (yargs42) => yargs42.command(RedirectDefinitionModule).demandCommand(),
12491
+ builder: (yargs43) => yargs43.command(RedirectDefinitionModule).demandCommand(),
12222
12492
  handler: () => {
12223
- yargs38.showHelp();
12493
+ yargs39.showHelp();
12224
12494
  }
12225
12495
  };
12226
12496
 
12227
12497
  // src/commands/sync/index.ts
12228
- import yargs39 from "yargs";
12498
+ import yargs40 from "yargs";
12229
12499
 
12230
12500
  // src/webhooksClient.ts
12231
12501
  import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
@@ -12419,12 +12689,12 @@ function createWebhookEngineDataSource({
12419
12689
  var WebhookPullModule = {
12420
12690
  command: "pull <directory>",
12421
12691
  describe: "Pulls all webhooks to local files in a directory",
12422
- builder: (yargs42) => withConfiguration(
12692
+ builder: (yargs43) => withConfiguration(
12423
12693
  withApiOptions(
12424
12694
  withDebugOptions(
12425
12695
  withProjectOptions(
12426
12696
  withDiffOptions(
12427
- yargs42.positional("directory", {
12697
+ yargs43.positional("directory", {
12428
12698
  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.",
12429
12699
  type: "string"
12430
12700
  }).option("format", {
@@ -12610,11 +12880,12 @@ function numPad(num, spaces = 6) {
12610
12880
  var SyncPullModule = {
12611
12881
  command: "pull",
12612
12882
  describe: "Pulls whole project to local files in a directory",
12613
- builder: (yargs42) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs42))))),
12883
+ builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDebugOptions(withDiffOptions(yargs43))))),
12614
12884
  handler: async ({ serialization, ...otherParams }) => {
12615
12885
  const config2 = serialization;
12616
12886
  const enabledEntities = Object.entries({
12617
12887
  locale: LocalePullModule,
12888
+ label: LabelPullModule,
12618
12889
  asset: AssetPullModule,
12619
12890
  category: CategoryPullModule,
12620
12891
  workflow: WorkflowPullModule,
@@ -12637,6 +12908,7 @@ var SyncPullModule = {
12637
12908
  contentType: ContentTypePullModule,
12638
12909
  previewUrl: PreviewUrlPullModule,
12639
12910
  previewViewport: PreviewViewportPullModule,
12911
+ policyDocument: PolicyDocumentsPullModule,
12640
12912
  webhook: WebhookPullModule
12641
12913
  }).filter(([entityType]) => {
12642
12914
  return Boolean(config2.entitiesConfig?.[entityType]) && config2.entitiesConfig?.[entityType]?.disabled !== true && config2.entitiesConfig?.[entityType]?.pull?.disabled !== true;
@@ -12708,12 +12980,12 @@ var getFormat = (entityType, config2) => {
12708
12980
  var WebhookPushModule = {
12709
12981
  command: "push <directory>",
12710
12982
  describe: "Pushes all webhooks from files in a directory to Uniform",
12711
- builder: (yargs42) => withConfiguration(
12983
+ builder: (yargs43) => withConfiguration(
12712
12984
  withDebugOptions(
12713
12985
  withApiOptions(
12714
12986
  withProjectOptions(
12715
12987
  withDiffOptions(
12716
- yargs42.positional("directory", {
12988
+ yargs43.positional("directory", {
12717
12989
  describe: "Directory to read from. If a filename is used, a package will be read instead.",
12718
12990
  type: "string"
12719
12991
  }).option("mode", {
@@ -12777,11 +13049,12 @@ var WebhookPushModule = {
12777
13049
  var SyncPushModule = {
12778
13050
  command: "push",
12779
13051
  describe: "Pushes whole project data from files in a directory or package to Uniform",
12780
- builder: (yargs42) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs42))))),
13052
+ builder: (yargs43) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs43))))),
12781
13053
  handler: async ({ serialization, ...otherParams }) => {
12782
13054
  const config2 = serialization;
12783
13055
  const enabledEntities = Object.entries({
12784
13056
  locale: LocalePushModule,
13057
+ label: LabelPushModule,
12785
13058
  asset: AssetPushModule,
12786
13059
  category: CategoryPushModule,
12787
13060
  workflow: WorkflowPushModule,
@@ -12804,6 +13077,7 @@ var SyncPushModule = {
12804
13077
  entryPattern: EntryPatternPushModule,
12805
13078
  previewUrl: PreviewUrlPushModule,
12806
13079
  previewViewport: PreviewViewportPushModule,
13080
+ policyDocument: PolicyDocumentsPushModule,
12807
13081
  webhook: WebhookPushModule
12808
13082
  }).filter(([entityType]) => {
12809
13083
  return Boolean(config2.entitiesConfig?.[entityType]) && config2.entitiesConfig?.[entityType]?.disabled !== true && config2.entitiesConfig?.[entityType]?.push?.disabled !== true;
@@ -12986,21 +13260,21 @@ var getFormat2 = (entityType, config2) => {
12986
13260
  var SyncCommand = {
12987
13261
  command: "sync <command>",
12988
13262
  describe: "Uniform Sync commands",
12989
- builder: (yargs42) => yargs42.command(SyncPullModule).command(SyncPushModule).demandCommand(),
13263
+ builder: (yargs43) => yargs43.command(SyncPullModule).command(SyncPushModule).demandCommand(),
12990
13264
  handler: () => {
12991
- yargs39.showHelp();
13265
+ yargs40.showHelp();
12992
13266
  }
12993
13267
  };
12994
13268
 
12995
13269
  // src/commands/webhook/index.ts
12996
- import yargs40 from "yargs";
13270
+ import yargs41 from "yargs";
12997
13271
  var WebhookCommand = {
12998
13272
  command: "webhook <command>",
12999
13273
  aliases: ["wh"],
13000
13274
  describe: "Commands for webhooks",
13001
- builder: (yargs42) => yargs42.command(WebhookPullModule).command(WebhookPushModule).demandCommand(),
13275
+ builder: (yargs43) => yargs43.command(WebhookPullModule).command(WebhookPushModule).demandCommand(),
13002
13276
  handler: () => {
13003
- yargs40.help();
13277
+ yargs41.help();
13004
13278
  }
13005
13279
  };
13006
13280
 
@@ -13008,7 +13282,7 @@ var WebhookCommand = {
13008
13282
  import { bold as bold3, gray as gray6, green as green7 } from "colorette";
13009
13283
 
13010
13284
  // src/updateCheck.ts
13011
- import { existsSync as existsSync5, promises as fs8 } from "fs";
13285
+ import { existsSync as existsSync6, promises as fs8 } from "fs";
13012
13286
  import { get as getHttp } from "http";
13013
13287
  import { get as getHttps } from "https";
13014
13288
  import { tmpdir } from "os";
@@ -13020,7 +13294,7 @@ var encode = (value) => encodeURIComponent(value).replace(/^%40/, "@");
13020
13294
  var getFile = async (details, distTag) => {
13021
13295
  const rootDir = tmpdir();
13022
13296
  const subDir = join12(rootDir, "update-check");
13023
- if (!existsSync5(subDir)) {
13297
+ if (!existsSync6(subDir)) {
13024
13298
  await fs8.mkdir(subDir);
13025
13299
  }
13026
13300
  let name = `${details.name}-${distTag}.json`;
@@ -13030,7 +13304,7 @@ var getFile = async (details, distTag) => {
13030
13304
  return join12(subDir, name);
13031
13305
  };
13032
13306
  var evaluateCache = async (file, time, interval) => {
13033
- if (existsSync5(file)) {
13307
+ if (existsSync6(file)) {
13034
13308
  const content = await fs8.readFile(file, "utf8");
13035
13309
  const { lastUpdate, latest } = JSON.parse(content);
13036
13310
  const nextCheck = lastUpdate + interval;
@@ -13235,7 +13509,7 @@ First found was: v${firstVersion}`;
13235
13509
 
13236
13510
  // src/index.ts
13237
13511
  dotenv.config();
13238
- var yarggery = yargs41(hideBin(process.argv));
13512
+ var yarggery = yargs42(hideBin(process.argv));
13239
13513
  var useDefaultConfig = !process.argv.includes("--config");
13240
13514
  var defaultConfig2 = useDefaultConfig ? loadConfig(null) : {};
13241
13515
  yarggery.option("verbose", {