@uniformdev/cli 19.186.4-alpha.4 → 19.190.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.
- package/dist/index.mjs +41 -11
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -1960,8 +1960,22 @@ var ComponentPatternListModule = {
|
|
|
1960
1960
|
import { UncachedCanvasClient as UncachedCanvasClient9 } from "@uniformdev/canvas";
|
|
1961
1961
|
|
|
1962
1962
|
// src/commands/canvas/commands/composition/_util.ts
|
|
1963
|
-
var selectIdentifier3 = (
|
|
1964
|
-
|
|
1963
|
+
var selectIdentifier3 = (response) => {
|
|
1964
|
+
let baseId = response.composition._id;
|
|
1965
|
+
if (response.editionId) {
|
|
1966
|
+
baseId += ` (${response.editionId})`;
|
|
1967
|
+
}
|
|
1968
|
+
return baseId;
|
|
1969
|
+
};
|
|
1970
|
+
function parseCompositionSerializedId(providerId) {
|
|
1971
|
+
const [compositionId, editionId] = providerId.split(" (");
|
|
1972
|
+
return { compositionId, editionId: editionId?.slice(0, -1) };
|
|
1973
|
+
}
|
|
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
|
+
};
|
|
1965
1979
|
|
|
1966
1980
|
// src/commands/canvas/componentInstanceEngineDataSource.ts
|
|
1967
1981
|
function createComponentInstanceEngineDataSource({
|
|
@@ -1984,7 +1998,8 @@ function createComponentInstanceEngineDataSource({
|
|
|
1984
1998
|
skipPatternResolution: true,
|
|
1985
1999
|
skipOverridesResolution: true,
|
|
1986
2000
|
withComponentIDs: true,
|
|
1987
|
-
patternType
|
|
2001
|
+
patternType,
|
|
2002
|
+
editions: "all"
|
|
1988
2003
|
})).compositions,
|
|
1989
2004
|
{ pageSize: 100 }
|
|
1990
2005
|
);
|
|
@@ -1992,7 +2007,7 @@ function createComponentInstanceEngineDataSource({
|
|
|
1992
2007
|
const result = {
|
|
1993
2008
|
id: selectIdentifier3(compositionListItem),
|
|
1994
2009
|
displayName: selectDisplayName3(compositionListItem),
|
|
1995
|
-
providerId: compositionListItem
|
|
2010
|
+
providerId: selectIdentifier3(compositionListItem),
|
|
1996
2011
|
object: prepCompositionForDisk(compositionListItem)
|
|
1997
2012
|
};
|
|
1998
2013
|
yield result;
|
|
@@ -2002,7 +2017,7 @@ function createComponentInstanceEngineDataSource({
|
|
|
2002
2017
|
name: "Uniform API",
|
|
2003
2018
|
objects: getObjects(),
|
|
2004
2019
|
deleteObject: async (providerId) => {
|
|
2005
|
-
await client.removeComposition(
|
|
2020
|
+
await client.removeComposition(parseCompositionSerializedId(providerId));
|
|
2006
2021
|
},
|
|
2007
2022
|
writeObject: async (object) => {
|
|
2008
2023
|
await client.updateComposition({ ...object.object, state: stateId });
|
|
@@ -3718,8 +3733,22 @@ import { ContentClient as ContentClient10 } from "@uniformdev/canvas";
|
|
|
3718
3733
|
import { convertEntryToPutEntry } from "@uniformdev/canvas";
|
|
3719
3734
|
|
|
3720
3735
|
// src/commands/canvas/commands/entry/_util.ts
|
|
3721
|
-
var selectEntryIdentifier = (e) =>
|
|
3722
|
-
|
|
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
|
+
};
|
|
3723
3752
|
|
|
3724
3753
|
// src/commands/canvas/entryEngineDataSource.ts
|
|
3725
3754
|
function createEntryEngineDataSource({
|
|
@@ -3741,7 +3770,8 @@ function createEntryEngineDataSource({
|
|
|
3741
3770
|
skipOverridesResolution: true,
|
|
3742
3771
|
skipPatternResolution: true,
|
|
3743
3772
|
state: stateId,
|
|
3744
|
-
withComponentIDs: true
|
|
3773
|
+
withComponentIDs: true,
|
|
3774
|
+
editions: "all"
|
|
3745
3775
|
})).entries,
|
|
3746
3776
|
{ pageSize: 100 }
|
|
3747
3777
|
);
|
|
@@ -3749,7 +3779,7 @@ function createEntryEngineDataSource({
|
|
|
3749
3779
|
const result = {
|
|
3750
3780
|
id: selectEntryIdentifier(e),
|
|
3751
3781
|
displayName: selectEntryDisplayName(e),
|
|
3752
|
-
providerId: e
|
|
3782
|
+
providerId: selectEntryIdentifier(e),
|
|
3753
3783
|
object: prepCompositionForDisk(e)
|
|
3754
3784
|
};
|
|
3755
3785
|
yield result;
|
|
@@ -3759,7 +3789,7 @@ function createEntryEngineDataSource({
|
|
|
3759
3789
|
name: "Uniform API",
|
|
3760
3790
|
objects: getObjects(),
|
|
3761
3791
|
deleteObject: async (providerId) => {
|
|
3762
|
-
await client.deleteEntry(
|
|
3792
|
+
await client.deleteEntry(parseEntrySerializedId(providerId));
|
|
3763
3793
|
},
|
|
3764
3794
|
writeObject: async ({ object }) => {
|
|
3765
3795
|
await client.upsertEntry({ ...convertEntryToPutEntry(object), state: stateId });
|
|
@@ -7474,7 +7504,7 @@ import { PostHog } from "posthog-node";
|
|
|
7474
7504
|
// package.json
|
|
7475
7505
|
var package_default = {
|
|
7476
7506
|
name: "@uniformdev/cli",
|
|
7477
|
-
version: "19.
|
|
7507
|
+
version: "19.190.0",
|
|
7478
7508
|
description: "Uniform command line interface tool",
|
|
7479
7509
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
7480
7510
|
main: "./cli.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.190.0",
|
|
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.
|
|
31
|
-
"@uniformdev/canvas": "19.
|
|
32
|
-
"@uniformdev/context": "19.
|
|
33
|
-
"@uniformdev/files": "19.
|
|
34
|
-
"@uniformdev/project-map": "19.
|
|
35
|
-
"@uniformdev/redirect": "19.
|
|
30
|
+
"@uniformdev/assets": "19.190.0",
|
|
31
|
+
"@uniformdev/canvas": "19.190.0",
|
|
32
|
+
"@uniformdev/context": "19.190.0",
|
|
33
|
+
"@uniformdev/files": "19.190.0",
|
|
34
|
+
"@uniformdev/project-map": "19.190.0",
|
|
35
|
+
"@uniformdev/redirect": "19.190.0",
|
|
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": "
|
|
81
|
+
"gitHead": "8bfb11f83f7e3333b531435363d81f43a7dca5a9"
|
|
82
82
|
}
|