@uniformdev/cli 19.187.0 → 19.190.1-alpha.10

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 +26 -7
  2. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -1971,7 +1971,11 @@ function parseCompositionSerializedId(providerId) {
1971
1971
  const [compositionId, editionId] = providerId.split(" (");
1972
1972
  return { compositionId, editionId: editionId?.slice(0, -1) };
1973
1973
  }
1974
- var selectDisplayName3 = (component) => `${component.composition._name ?? component.composition._slug ?? component.composition._id} (pid: ${component.composition._id})`;
1974
+ var selectDisplayName3 = (component) => {
1975
+ const name = component.composition._name ?? component.composition._slug ?? component.composition._id;
1976
+ const edition = component.editionId ? component.editionName ?? component.editionId : void 0;
1977
+ return `${name} (pid: ${component.composition._id}${edition ? `, edition: ${edition}` : ""})`;
1978
+ };
1975
1979
 
1976
1980
  // src/commands/canvas/componentInstanceEngineDataSource.ts
1977
1981
  function createComponentInstanceEngineDataSource({
@@ -3729,8 +3733,22 @@ import { ContentClient as ContentClient10 } from "@uniformdev/canvas";
3729
3733
  import { convertEntryToPutEntry } from "@uniformdev/canvas";
3730
3734
 
3731
3735
  // src/commands/canvas/commands/entry/_util.ts
3732
- var selectEntryIdentifier = (e) => e.entry._id;
3733
- var selectEntryDisplayName = (e) => `${e.entry._name ?? "Untitled"} (pid: ${e.entry._id})`;
3736
+ var selectEntryIdentifier = (e) => {
3737
+ let baseId = e.entry._id;
3738
+ if (e.editionId) {
3739
+ baseId += ` (${e.editionId})`;
3740
+ }
3741
+ return baseId;
3742
+ };
3743
+ function parseEntrySerializedId(providerId) {
3744
+ const [entryId, editionId] = providerId.split(" (");
3745
+ return { entryId, editionId: editionId?.slice(0, -1) };
3746
+ }
3747
+ var selectEntryDisplayName = (e) => {
3748
+ const name = e.entry._name ?? "Untitled";
3749
+ const edition = e.editionId ? e.editionName ?? e.editionId : void 0;
3750
+ return `${name} (pid: ${e.entry._id}${edition ? `, edition: ${edition}` : ""})`;
3751
+ };
3734
3752
 
3735
3753
  // src/commands/canvas/entryEngineDataSource.ts
3736
3754
  function createEntryEngineDataSource({
@@ -3752,7 +3770,8 @@ function createEntryEngineDataSource({
3752
3770
  skipOverridesResolution: true,
3753
3771
  skipPatternResolution: true,
3754
3772
  state: stateId,
3755
- withComponentIDs: true
3773
+ withComponentIDs: true,
3774
+ editions: "all"
3756
3775
  })).entries,
3757
3776
  { pageSize: 100 }
3758
3777
  );
@@ -3760,7 +3779,7 @@ function createEntryEngineDataSource({
3760
3779
  const result = {
3761
3780
  id: selectEntryIdentifier(e),
3762
3781
  displayName: selectEntryDisplayName(e),
3763
- providerId: e.entry._id,
3782
+ providerId: selectEntryIdentifier(e),
3764
3783
  object: prepCompositionForDisk(e)
3765
3784
  };
3766
3785
  yield result;
@@ -3770,7 +3789,7 @@ function createEntryEngineDataSource({
3770
3789
  name: "Uniform API",
3771
3790
  objects: getObjects(),
3772
3791
  deleteObject: async (providerId) => {
3773
- await client.deleteEntry({ entryId: providerId });
3792
+ await client.deleteEntry(parseEntrySerializedId(providerId));
3774
3793
  },
3775
3794
  writeObject: async ({ object }) => {
3776
3795
  await client.upsertEntry({ ...convertEntryToPutEntry(object), state: stateId });
@@ -7485,7 +7504,7 @@ import { PostHog } from "posthog-node";
7485
7504
  // package.json
7486
7505
  var package_default = {
7487
7506
  name: "@uniformdev/cli",
7488
- version: "19.187.0",
7507
+ version: "19.190.0",
7489
7508
  description: "Uniform command line interface tool",
7490
7509
  license: "SEE LICENSE IN LICENSE.txt",
7491
7510
  main: "./cli.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "19.187.0",
3
+ "version": "19.190.1-alpha.10+ec1c4180f7",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -27,12 +27,12 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@thi.ng/mime": "^2.2.23",
30
- "@uniformdev/assets": "19.187.0",
31
- "@uniformdev/canvas": "19.187.0",
32
- "@uniformdev/context": "19.187.0",
33
- "@uniformdev/files": "19.187.0",
34
- "@uniformdev/project-map": "19.187.0",
35
- "@uniformdev/redirect": "19.187.0",
30
+ "@uniformdev/assets": "19.190.1-alpha.10+ec1c4180f7",
31
+ "@uniformdev/canvas": "19.190.1-alpha.10+ec1c4180f7",
32
+ "@uniformdev/context": "19.190.1-alpha.10+ec1c4180f7",
33
+ "@uniformdev/files": "19.190.1-alpha.10+ec1c4180f7",
34
+ "@uniformdev/project-map": "19.190.1-alpha.10+ec1c4180f7",
35
+ "@uniformdev/redirect": "19.190.1-alpha.10+ec1c4180f7",
36
36
  "call-bind": "^1.0.2",
37
37
  "colorette": "2.0.20",
38
38
  "cosmiconfig": "9.0.0",
@@ -78,5 +78,5 @@
78
78
  "publishConfig": {
79
79
  "access": "public"
80
80
  },
81
- "gitHead": "9ccfdb652e2d67d66fe90e2df1845c3c2e3bee8b"
81
+ "gitHead": "ec1c4180f7c99bcfb5023bc0e1277d155acdca72"
82
82
  }