@uniformdev/cli 19.38.2 → 19.39.0

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.
Files changed (2) hide show
  1. package/dist/index.mjs +40 -40
  2. package/package.json +9 -9
package/dist/index.mjs CHANGED
@@ -510,7 +510,7 @@ var CategoryListModule = {
510
510
  };
511
511
 
512
512
  // src/commands/canvas/commands/category/pull.ts
513
- import { UncachedCanvasClient } from "@uniformdev/canvas";
513
+ import { UncachedCategoryClient as UncachedCategoryClient3 } from "@uniformdev/canvas";
514
514
 
515
515
  // src/commands/canvas/commands/category/_util.ts
516
516
  var selectIdentifier = (category) => category.id;
@@ -596,7 +596,7 @@ var CategoryPullModule = {
596
596
  diff: diffMode
597
597
  }) => {
598
598
  const fetch3 = nodeFetchProxy(proxy);
599
- const client = new UncachedCanvasClient({ apiKey, apiHost, fetch: fetch3, projectId });
599
+ const client = new UncachedCategoryClient3({ apiKey, apiHost, fetch: fetch3, projectId });
600
600
  const source = createCategoriesEngineDataSource({ client });
601
601
  let target;
602
602
  const isPackage = isPathAPackageFile(directory);
@@ -630,7 +630,7 @@ var CategoryPullModule = {
630
630
  };
631
631
 
632
632
  // src/commands/canvas/commands/category/push.ts
633
- import { UncachedCanvasClient as UncachedCanvasClient2 } from "@uniformdev/canvas";
633
+ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/canvas";
634
634
  var CategoryPushModule = {
635
635
  command: "push <directory>",
636
636
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
@@ -666,7 +666,7 @@ var CategoryPushModule = {
666
666
  diff: diffMode
667
667
  }) => {
668
668
  const fetch3 = nodeFetchProxy(proxy);
669
- const client = new UncachedCanvasClient2({ apiKey, apiHost, fetch: fetch3, projectId });
669
+ const client = new UncachedCategoryClient4({ apiKey, apiHost, fetch: fetch3, projectId });
670
670
  let source;
671
671
  const isPackage = isPathAPackageFile(directory);
672
672
  if (isPackage) {
@@ -695,7 +695,7 @@ var CategoryPushModule = {
695
695
  };
696
696
 
697
697
  // src/commands/canvas/commands/category/remove.ts
698
- import { UncachedCanvasClient as UncachedCanvasClient3 } from "@uniformdev/canvas";
698
+ import { UncachedCategoryClient as UncachedCategoryClient5 } from "@uniformdev/canvas";
699
699
  var CategoryRemoveModule = {
700
700
  command: "remove <id>",
701
701
  aliases: ["delete", "rm"],
@@ -705,13 +705,13 @@ var CategoryRemoveModule = {
705
705
  ),
706
706
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
707
707
  const fetch3 = nodeFetchProxy(proxy);
708
- const client = new UncachedCanvasClient3({ apiKey, apiHost, fetch: fetch3, projectId });
708
+ const client = new UncachedCategoryClient5({ apiKey, apiHost, fetch: fetch3, projectId });
709
709
  await client.removeCategory({ categoryId: id });
710
710
  }
711
711
  };
712
712
 
713
713
  // src/commands/canvas/commands/category/update.ts
714
- import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canvas";
714
+ import { UncachedCategoryClient as UncachedCategoryClient6 } from "@uniformdev/canvas";
715
715
  var CategoryUpdateModule = {
716
716
  command: "update <filename>",
717
717
  aliases: ["put"],
@@ -723,7 +723,7 @@ var CategoryUpdateModule = {
723
723
  ),
724
724
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
725
725
  const fetch3 = nodeFetchProxy(proxy);
726
- const client = new UncachedCanvasClient4({ apiKey, apiHost, fetch: fetch3, projectId });
726
+ const client = new UncachedCategoryClient6({ apiKey, apiHost, fetch: fetch3, projectId });
727
727
  const file = readFileToObject(filename);
728
728
  await client.upsertCategories([file]);
729
729
  }
@@ -744,7 +744,7 @@ var CategoryModule = {
744
744
  import yargs2 from "yargs";
745
745
 
746
746
  // src/commands/canvas/commands/component/get.ts
747
- import { UncachedCanvasClient as UncachedCanvasClient5 } from "@uniformdev/canvas";
747
+ import { UncachedCanvasClient } from "@uniformdev/canvas";
748
748
 
749
749
  // src/commands/canvas/commands/component/_util.ts
750
750
  var selectIdentifier2 = (component) => component.id;
@@ -764,7 +764,7 @@ var ComponentGetModule = {
764
764
  ),
765
765
  handler: async ({ apiHost, apiKey, proxy, id, format, project: projectId, filename }) => {
766
766
  const fetch3 = nodeFetchProxy(proxy);
767
- const client = new UncachedCanvasClient5({ apiKey, apiHost, fetch: fetch3, projectId });
767
+ const client = new UncachedCanvasClient({ apiKey, apiHost, fetch: fetch3, projectId });
768
768
  const res = await client.getComponentDefinitions({ componentId: id, limit: 1 });
769
769
  if (res.componentDefinitions.length === 0) {
770
770
  console.error("Component did not exist");
@@ -783,7 +783,7 @@ var ComponentGetModule = {
783
783
  };
784
784
 
785
785
  // src/commands/canvas/commands/component/list.ts
786
- import { UncachedCanvasClient as UncachedCanvasClient6 } from "@uniformdev/canvas";
786
+ import { UncachedCanvasClient as UncachedCanvasClient2 } from "@uniformdev/canvas";
787
787
  var ComponentListModule = {
788
788
  command: "list",
789
789
  describe: "List component definitions",
@@ -800,14 +800,14 @@ var ComponentListModule = {
800
800
  ),
801
801
  handler: async ({ apiHost, apiKey, proxy, limit, offset, format, filename, project: projectId }) => {
802
802
  const fetch3 = nodeFetchProxy(proxy);
803
- const client = new UncachedCanvasClient6({ apiKey, apiHost, fetch: fetch3, projectId });
803
+ const client = new UncachedCanvasClient2({ apiKey, apiHost, fetch: fetch3, projectId });
804
804
  const res = await client.getComponentDefinitions({ limit, offset });
805
805
  emitWithFormat(res.componentDefinitions, format, filename);
806
806
  }
807
807
  };
808
808
 
809
809
  // src/commands/canvas/commands/component/pull.ts
810
- import { UncachedCanvasClient as UncachedCanvasClient7 } from "@uniformdev/canvas";
810
+ import { UncachedCanvasClient as UncachedCanvasClient3 } from "@uniformdev/canvas";
811
811
 
812
812
  // src/commands/canvas/componentDefinitionEngineDataSource.ts
813
813
  function createComponentDefinitionEngineDataSource({
@@ -884,7 +884,7 @@ var ComponentPullModule = {
884
884
  diff: diffMode
885
885
  }) => {
886
886
  const fetch3 = nodeFetchProxy(proxy);
887
- const client = new UncachedCanvasClient7({ apiKey, apiHost, fetch: fetch3, projectId });
887
+ const client = new UncachedCanvasClient3({ apiKey, apiHost, fetch: fetch3, projectId });
888
888
  const source = createComponentDefinitionEngineDataSource({ client });
889
889
  let target;
890
890
  const isPackage = isPathAPackageFile(directory);
@@ -919,7 +919,7 @@ var ComponentPullModule = {
919
919
  };
920
920
 
921
921
  // src/commands/canvas/commands/component/push.ts
922
- import { UncachedCanvasClient as UncachedCanvasClient8 } from "@uniformdev/canvas";
922
+ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canvas";
923
923
  var ComponentPushModule = {
924
924
  command: "push <directory>",
925
925
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
@@ -955,7 +955,7 @@ var ComponentPushModule = {
955
955
  diff: diffMode
956
956
  }) => {
957
957
  const fetch3 = nodeFetchProxy(proxy);
958
- const client = new UncachedCanvasClient8({ apiKey, apiHost, fetch: fetch3, projectId });
958
+ const client = new UncachedCanvasClient4({ apiKey, apiHost, fetch: fetch3, projectId });
959
959
  let source;
960
960
  const isPackage = isPathAPackageFile(directory);
961
961
  if (isPackage) {
@@ -985,7 +985,7 @@ var ComponentPushModule = {
985
985
  };
986
986
 
987
987
  // src/commands/canvas/commands/component/remove.ts
988
- import { UncachedCanvasClient as UncachedCanvasClient9 } from "@uniformdev/canvas";
988
+ import { UncachedCanvasClient as UncachedCanvasClient5 } from "@uniformdev/canvas";
989
989
  var ComponentRemoveModule = {
990
990
  command: "remove <id>",
991
991
  aliases: ["delete", "rm"],
@@ -997,13 +997,13 @@ var ComponentRemoveModule = {
997
997
  ),
998
998
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
999
999
  const fetch3 = nodeFetchProxy(proxy);
1000
- const client = new UncachedCanvasClient9({ apiKey, apiHost, fetch: fetch3, projectId });
1000
+ const client = new UncachedCanvasClient5({ apiKey, apiHost, fetch: fetch3, projectId });
1001
1001
  await client.removeComponentDefinition({ componentId: id });
1002
1002
  }
1003
1003
  };
1004
1004
 
1005
1005
  // src/commands/canvas/commands/component/update.ts
1006
- import { UncachedCanvasClient as UncachedCanvasClient10 } from "@uniformdev/canvas";
1006
+ import { UncachedCanvasClient as UncachedCanvasClient6 } from "@uniformdev/canvas";
1007
1007
  var ComponentUpdateModule = {
1008
1008
  command: "update <filename>",
1009
1009
  aliases: ["put"],
@@ -1015,7 +1015,7 @@ var ComponentUpdateModule = {
1015
1015
  ),
1016
1016
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
1017
1017
  const fetch3 = nodeFetchProxy(proxy);
1018
- const client = new UncachedCanvasClient10({ apiKey, apiHost, fetch: fetch3, projectId });
1018
+ const client = new UncachedCanvasClient6({ apiKey, apiHost, fetch: fetch3, projectId });
1019
1019
  const file = readFileToObject(filename);
1020
1020
  await client.updateComponentDefinition({ componentDefinition: file });
1021
1021
  }
@@ -1036,7 +1036,7 @@ var ComponentModule = {
1036
1036
  import yargs3 from "yargs";
1037
1037
 
1038
1038
  // src/commands/canvas/commands/composition/get.ts
1039
- import { UncachedCanvasClient as UncachedCanvasClient11 } from "@uniformdev/canvas";
1039
+ import { UncachedCanvasClient as UncachedCanvasClient7 } from "@uniformdev/canvas";
1040
1040
 
1041
1041
  // src/commands/canvas/util.ts
1042
1042
  import { CANVAS_DRAFT_STATE, CANVAS_PUBLISHED_STATE } from "@uniformdev/canvas";
@@ -1126,7 +1126,7 @@ var CompositionGetModule = {
1126
1126
  diagnostics
1127
1127
  }) => {
1128
1128
  const fetch3 = nodeFetchProxy(proxy);
1129
- const client = new UncachedCanvasClient11({ apiKey, edgeApiHost, apiHost, fetch: fetch3, projectId });
1129
+ const client = new UncachedCanvasClient7({ apiKey, edgeApiHost, apiHost, fetch: fetch3, projectId });
1130
1130
  const res = prepCompositionForDisk(
1131
1131
  await client.getCompositionById({
1132
1132
  compositionId: id,
@@ -1143,7 +1143,7 @@ var CompositionGetModule = {
1143
1143
  };
1144
1144
 
1145
1145
  // src/commands/canvas/commands/composition/list.ts
1146
- import { UncachedCanvasClient as UncachedCanvasClient12 } from "@uniformdev/canvas";
1146
+ import { UncachedCanvasClient as UncachedCanvasClient8 } from "@uniformdev/canvas";
1147
1147
  var CompositionListModule = {
1148
1148
  command: "list",
1149
1149
  describe: "List compositions",
@@ -1190,7 +1190,7 @@ var CompositionListModule = {
1190
1190
  componentIDs
1191
1191
  }) => {
1192
1192
  const fetch3 = nodeFetchProxy(proxy);
1193
- const client = new UncachedCanvasClient12({ apiKey, apiHost, fetch: fetch3, projectId });
1193
+ const client = new UncachedCanvasClient8({ apiKey, apiHost, fetch: fetch3, projectId });
1194
1194
  const res = await client.getCompositionList({
1195
1195
  limit,
1196
1196
  offset,
@@ -1204,7 +1204,7 @@ var CompositionListModule = {
1204
1204
  };
1205
1205
 
1206
1206
  // src/commands/canvas/commands/composition/publish.ts
1207
- import { UncachedCanvasClient as UncachedCanvasClient13 } from "@uniformdev/canvas";
1207
+ import { UncachedCanvasClient as UncachedCanvasClient9 } from "@uniformdev/canvas";
1208
1208
 
1209
1209
  // src/commands/canvas/commands/composition/_util.ts
1210
1210
  var selectIdentifier3 = (component) => component.composition._id;
@@ -1291,7 +1291,7 @@ var CompositionPublishModule = {
1291
1291
  }
1292
1292
  const compositionIDsArray = compositionIDs ? compositionIDs.split(",").map((id) => id.trim()) : void 0;
1293
1293
  const fetch3 = nodeFetchProxy(proxy);
1294
- const client = new UncachedCanvasClient13({ apiKey, apiHost, fetch: fetch3, projectId });
1294
+ const client = new UncachedCanvasClient9({ apiKey, apiHost, fetch: fetch3, projectId });
1295
1295
  const source = createComponentInstanceEngineDataSource({
1296
1296
  client,
1297
1297
  state: "preview",
@@ -1313,7 +1313,7 @@ var CompositionPublishModule = {
1313
1313
  };
1314
1314
 
1315
1315
  // src/commands/canvas/commands/composition/pull.ts
1316
- import { UncachedCanvasClient as UncachedCanvasClient14 } from "@uniformdev/canvas";
1316
+ import { UncachedCanvasClient as UncachedCanvasClient10 } from "@uniformdev/canvas";
1317
1317
  var CompositionPullModule = {
1318
1318
  command: "pull <directory>",
1319
1319
  describe: "Pulls all compositions to local files in a directory",
@@ -1359,7 +1359,7 @@ var CompositionPullModule = {
1359
1359
  diff: diffMode
1360
1360
  }) => {
1361
1361
  const fetch3 = nodeFetchProxy(proxy);
1362
- const client = new UncachedCanvasClient14({ apiKey, apiHost, fetch: fetch3, projectId });
1362
+ const client = new UncachedCanvasClient10({ apiKey, apiHost, fetch: fetch3, projectId });
1363
1363
  const source = createComponentInstanceEngineDataSource({ client, state });
1364
1364
  const isPackage = isPathAPackageFile(directory);
1365
1365
  let target;
@@ -1393,7 +1393,7 @@ var CompositionPullModule = {
1393
1393
  };
1394
1394
 
1395
1395
  // src/commands/canvas/commands/composition/push.ts
1396
- import { UncachedCanvasClient as UncachedCanvasClient15 } from "@uniformdev/canvas";
1396
+ import { UncachedCanvasClient as UncachedCanvasClient11 } from "@uniformdev/canvas";
1397
1397
  var CompositionPushModule = {
1398
1398
  command: "push <directory>",
1399
1399
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
@@ -1432,7 +1432,7 @@ var CompositionPushModule = {
1432
1432
  diff: diffMode
1433
1433
  }) => {
1434
1434
  const fetch3 = nodeFetchProxy(proxy);
1435
- const client = new UncachedCanvasClient15({ apiKey, apiHost, fetch: fetch3, projectId });
1435
+ const client = new UncachedCanvasClient11({ apiKey, apiHost, fetch: fetch3, projectId });
1436
1436
  let source;
1437
1437
  const isPackage = isPathAPackageFile(directory);
1438
1438
  if (isPackage) {
@@ -1461,7 +1461,7 @@ var CompositionPushModule = {
1461
1461
  };
1462
1462
 
1463
1463
  // src/commands/canvas/commands/composition/remove.ts
1464
- import { UncachedCanvasClient as UncachedCanvasClient16 } from "@uniformdev/canvas";
1464
+ import { UncachedCanvasClient as UncachedCanvasClient12 } from "@uniformdev/canvas";
1465
1465
  var CompositionRemoveModule = {
1466
1466
  command: "remove <id>",
1467
1467
  aliases: ["delete", "rm"],
@@ -1473,13 +1473,13 @@ var CompositionRemoveModule = {
1473
1473
  ),
1474
1474
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
1475
1475
  const fetch3 = nodeFetchProxy(proxy);
1476
- const client = new UncachedCanvasClient16({ apiKey, apiHost, fetch: fetch3, projectId });
1476
+ const client = new UncachedCanvasClient12({ apiKey, apiHost, fetch: fetch3, projectId });
1477
1477
  await client.removeComposition({ compositionId: id });
1478
1478
  }
1479
1479
  };
1480
1480
 
1481
1481
  // src/commands/canvas/commands/composition/unpublish.ts
1482
- import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE2, UncachedCanvasClient as UncachedCanvasClient17 } from "@uniformdev/canvas";
1482
+ import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE2, UncachedCanvasClient as UncachedCanvasClient13 } from "@uniformdev/canvas";
1483
1483
  var CompositionUnpublishModule = {
1484
1484
  command: "unpublish <id>",
1485
1485
  describe: "Unpublish a composition",
@@ -1490,13 +1490,13 @@ var CompositionUnpublishModule = {
1490
1490
  ),
1491
1491
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
1492
1492
  const fetch3 = nodeFetchProxy(proxy);
1493
- const client = new UncachedCanvasClient17({ apiKey, apiHost, fetch: fetch3, projectId });
1493
+ const client = new UncachedCanvasClient13({ apiKey, apiHost, fetch: fetch3, projectId });
1494
1494
  await client.removeComposition({ compositionId: id, state: CANVAS_PUBLISHED_STATE2 });
1495
1495
  }
1496
1496
  };
1497
1497
 
1498
1498
  // src/commands/canvas/commands/composition/update.ts
1499
- import { UncachedCanvasClient as UncachedCanvasClient18 } from "@uniformdev/canvas";
1499
+ import { UncachedCanvasClient as UncachedCanvasClient14 } from "@uniformdev/canvas";
1500
1500
  var CompositionUpdateModule = {
1501
1501
  command: "update <filename>",
1502
1502
  aliases: ["put"],
@@ -1510,7 +1510,7 @@ var CompositionUpdateModule = {
1510
1510
  ),
1511
1511
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId, state }) => {
1512
1512
  const fetch3 = nodeFetchProxy(proxy);
1513
- const client = new UncachedCanvasClient18({ apiKey, apiHost, fetch: fetch3, projectId });
1513
+ const client = new UncachedCanvasClient14({ apiKey, apiHost, fetch: fetch3, projectId });
1514
1514
  const file = readFileToObject(filename);
1515
1515
  await client.updateComposition({ ...file, state: convertCompositionState(state) });
1516
1516
  }
@@ -3364,7 +3364,7 @@ import { PostHog } from "posthog-node";
3364
3364
  // package.json
3365
3365
  var package_default = {
3366
3366
  name: "@uniformdev/cli",
3367
- version: "19.38.2",
3367
+ version: "19.39.0",
3368
3368
  description: "Uniform command line interface tool",
3369
3369
  license: "SEE LICENSE IN LICENSE.txt",
3370
3370
  main: "./cli.js",
@@ -3372,7 +3372,7 @@ var package_default = {
3372
3372
  sideEffects: false,
3373
3373
  scripts: {
3374
3374
  uniform: "node ./cli.js",
3375
- build: "tsup",
3375
+ build: "tsc --noEmit && tsup",
3376
3376
  dev: "tsup --watch",
3377
3377
  clean: "rimraf dist",
3378
3378
  test: "jest --maxWorkers=1 --passWithNoTests",
@@ -3390,10 +3390,10 @@ var package_default = {
3390
3390
  dotenv: "^16.0.3",
3391
3391
  execa: "5.1.1",
3392
3392
  "fs-jetpack": "5.1.0",
3393
- graphql: "16.6.0",
3393
+ graphql: "16.7.1",
3394
3394
  "graphql-request": "6.1.0",
3395
3395
  "https-proxy-agent": "^7.0.0",
3396
- inquirer: "9.2.8",
3396
+ inquirer: "9.2.9",
3397
3397
  "isomorphic-git": "1.24.5",
3398
3398
  "isomorphic-unfetch": "^3.1.0",
3399
3399
  "js-yaml": "^4.1.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "19.38.2",
3
+ "version": "19.39.0",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -8,7 +8,7 @@
8
8
  "sideEffects": false,
9
9
  "scripts": {
10
10
  "uniform": "node ./cli.js",
11
- "build": "tsup",
11
+ "build": "tsc --noEmit && tsup",
12
12
  "dev": "tsup --watch",
13
13
  "clean": "rimraf dist",
14
14
  "test": "jest --maxWorkers=1 --passWithNoTests",
@@ -16,20 +16,20 @@
16
16
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\""
17
17
  },
18
18
  "dependencies": {
19
- "@uniformdev/canvas": "19.38.2",
20
- "@uniformdev/context": "19.38.2",
21
- "@uniformdev/project-map": "19.38.2",
22
- "@uniformdev/redirect": "19.38.2",
19
+ "@uniformdev/canvas": "19.39.0",
20
+ "@uniformdev/context": "19.39.0",
21
+ "@uniformdev/project-map": "19.39.0",
22
+ "@uniformdev/redirect": "19.39.0",
23
23
  "colorette": "2.0.20",
24
24
  "cosmiconfig": "^8.2.0",
25
25
  "diff": "^5.0.0",
26
26
  "dotenv": "^16.0.3",
27
27
  "execa": "5.1.1",
28
28
  "fs-jetpack": "5.1.0",
29
- "graphql": "16.6.0",
29
+ "graphql": "16.7.1",
30
30
  "graphql-request": "6.1.0",
31
31
  "https-proxy-agent": "^7.0.0",
32
- "inquirer": "9.2.8",
32
+ "inquirer": "9.2.9",
33
33
  "isomorphic-git": "1.24.5",
34
34
  "isomorphic-unfetch": "^3.1.0",
35
35
  "js-yaml": "^4.1.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "b97fd17fd44e0f5bd3806e942b516cb2bd218096"
64
+ "gitHead": "63b0b9b3d9b8f155fad931e9e5ca56d4bda5223a"
65
65
  }