@uniformdev/cli 20.26.2 → 20.27.1
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 +40 -6
- package/package.json +10 -9
package/dist/index.mjs
CHANGED
|
@@ -737,6 +737,7 @@ import { FILE_READY_STATE, getFileNameFromUrl } from "@uniformdev/files";
|
|
|
737
737
|
import { fileTypeFromBuffer } from "file-type";
|
|
738
738
|
import fsj3 from "fs-jetpack";
|
|
739
739
|
import sizeOf from "image-size";
|
|
740
|
+
import normalizeNewline from "normalize-newline";
|
|
740
741
|
import PQueue from "p-queue";
|
|
741
742
|
import { join as join5 } from "path";
|
|
742
743
|
var uploadQueueByKey = /* @__PURE__ */ new Map();
|
|
@@ -773,7 +774,7 @@ var uploadFile = async ({
|
|
|
773
774
|
);
|
|
774
775
|
return null;
|
|
775
776
|
}
|
|
776
|
-
|
|
777
|
+
let fileBuffer = await fsj3.readAsync(expectedFilePath, "buffer");
|
|
777
778
|
if (!fileBuffer) {
|
|
778
779
|
console.warn(`Skipping file ${fileUrl} (${expectedFilePath}) as we couldn't read it`);
|
|
779
780
|
return null;
|
|
@@ -786,6 +787,12 @@ var uploadFile = async ({
|
|
|
786
787
|
if (mimeType === "audio/x-flac") {
|
|
787
788
|
mimeType = "audio/flac";
|
|
788
789
|
}
|
|
790
|
+
if (mimeType === "image/svg+xml") {
|
|
791
|
+
try {
|
|
792
|
+
fileBuffer = normalizeNewline(fileBuffer);
|
|
793
|
+
} catch {
|
|
794
|
+
}
|
|
795
|
+
}
|
|
789
796
|
const { width, height } = (() => {
|
|
790
797
|
if (!mimeType.startsWith("image/")) {
|
|
791
798
|
return {
|
|
@@ -869,7 +876,7 @@ var walkFileUrlsForCompositionOrEntry = ({
|
|
|
869
876
|
callback({ fileUrl: thumbnail });
|
|
870
877
|
}
|
|
871
878
|
}
|
|
872
|
-
|
|
879
|
+
const treeWalker = ({ node }) => {
|
|
873
880
|
const properties = getPropertiesValue(node);
|
|
874
881
|
if (!properties) {
|
|
875
882
|
return;
|
|
@@ -889,7 +896,20 @@ var walkFileUrlsForCompositionOrEntry = ({
|
|
|
889
896
|
callback({ fileUrl: value });
|
|
890
897
|
});
|
|
891
898
|
});
|
|
892
|
-
}
|
|
899
|
+
};
|
|
900
|
+
walkNodeTree("entry" in entity ? entity.entry : entity.composition, treeWalker);
|
|
901
|
+
const overrides = "entry" in entity ? entity.entry._overrides : entity.composition._overrides;
|
|
902
|
+
if (overrides) {
|
|
903
|
+
for (const [, override] of Object.entries(overrides)) {
|
|
904
|
+
walkNodeTree(
|
|
905
|
+
{
|
|
906
|
+
type: "entry" in entity ? entity.entry.type : entity.composition.type,
|
|
907
|
+
...override
|
|
908
|
+
},
|
|
909
|
+
treeWalker
|
|
910
|
+
);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
893
913
|
};
|
|
894
914
|
|
|
895
915
|
// src/files/files.ts
|
|
@@ -921,7 +941,7 @@ var uploadFileForAsset = async ({
|
|
|
921
941
|
return uploadFile({ fileUrl, directory, fileClient, fileId });
|
|
922
942
|
};
|
|
923
943
|
var removeUrlsFromAssetParameters = (entity) => {
|
|
924
|
-
|
|
944
|
+
const treeWalker = ({ node }) => {
|
|
925
945
|
const properties = getPropertiesValue2(node);
|
|
926
946
|
if (!properties) {
|
|
927
947
|
return;
|
|
@@ -958,7 +978,20 @@ var removeUrlsFromAssetParameters = (entity) => {
|
|
|
958
978
|
});
|
|
959
979
|
}
|
|
960
980
|
});
|
|
961
|
-
}
|
|
981
|
+
};
|
|
982
|
+
walkNodeTree2("entry" in entity ? entity.entry : entity.composition, treeWalker);
|
|
983
|
+
const overrides = "entry" in entity ? entity.entry._overrides : entity.composition._overrides;
|
|
984
|
+
if (overrides) {
|
|
985
|
+
for (const [, override] of Object.entries(overrides)) {
|
|
986
|
+
walkNodeTree2(
|
|
987
|
+
{
|
|
988
|
+
type: "entry" in entity ? entity.entry.type : entity.composition.type,
|
|
989
|
+
...override
|
|
990
|
+
},
|
|
991
|
+
treeWalker
|
|
992
|
+
);
|
|
993
|
+
}
|
|
994
|
+
}
|
|
962
995
|
return entity;
|
|
963
996
|
};
|
|
964
997
|
var compareCompositionsOrEntriesWithoutAssetUrls = (source, target) => {
|
|
@@ -8597,7 +8630,7 @@ import { PostHog } from "posthog-node";
|
|
|
8597
8630
|
// package.json
|
|
8598
8631
|
var package_default = {
|
|
8599
8632
|
name: "@uniformdev/cli",
|
|
8600
|
-
version: "20.
|
|
8633
|
+
version: "20.27.1",
|
|
8601
8634
|
description: "Uniform command line interface tool",
|
|
8602
8635
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
8603
8636
|
main: "./cli.js",
|
|
@@ -8648,6 +8681,7 @@ var package_default = {
|
|
|
8648
8681
|
"js-yaml": "^4.1.0",
|
|
8649
8682
|
jsonwebtoken: "9.0.2",
|
|
8650
8683
|
mitt: "^3.0.1",
|
|
8684
|
+
"normalize-newline": "^4.1.0",
|
|
8651
8685
|
open: "10.1.0",
|
|
8652
8686
|
ora: "8.0.1",
|
|
8653
8687
|
"p-queue": "7.3.4",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.27.1",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@thi.ng/mime": "^2.2.23",
|
|
30
|
-
"@uniformdev/assets": "20.
|
|
31
|
-
"@uniformdev/canvas": "20.
|
|
32
|
-
"@uniformdev/context": "20.
|
|
33
|
-
"@uniformdev/files": "20.
|
|
34
|
-
"@uniformdev/project-map": "20.
|
|
35
|
-
"@uniformdev/redirect": "20.
|
|
36
|
-
"@uniformdev/richtext": "20.
|
|
30
|
+
"@uniformdev/assets": "20.27.1",
|
|
31
|
+
"@uniformdev/canvas": "20.27.1",
|
|
32
|
+
"@uniformdev/context": "20.27.1",
|
|
33
|
+
"@uniformdev/files": "20.27.1",
|
|
34
|
+
"@uniformdev/project-map": "20.27.1",
|
|
35
|
+
"@uniformdev/redirect": "20.27.1",
|
|
36
|
+
"@uniformdev/richtext": "20.27.1",
|
|
37
37
|
"call-bind": "^1.0.2",
|
|
38
38
|
"colorette": "2.0.20",
|
|
39
39
|
"cosmiconfig": "9.0.0",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"js-yaml": "^4.1.0",
|
|
52
52
|
"jsonwebtoken": "9.0.2",
|
|
53
53
|
"mitt": "^3.0.1",
|
|
54
|
+
"normalize-newline": "^4.1.0",
|
|
54
55
|
"open": "10.1.0",
|
|
55
56
|
"ora": "8.0.1",
|
|
56
57
|
"p-queue": "7.3.4",
|
|
@@ -79,5 +80,5 @@
|
|
|
79
80
|
"publishConfig": {
|
|
80
81
|
"access": "public"
|
|
81
82
|
},
|
|
82
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "b9f3e377c61ae30c4bcd3db5636faf07631de2e1"
|
|
83
84
|
}
|