@uniformdev/cli 20.25.2-alpha.3 → 20.25.2-alpha.5
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 +9 -1
- 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 {
|
|
@@ -8625,6 +8632,7 @@ var package_default = {
|
|
|
8625
8632
|
"js-yaml": "^4.1.0",
|
|
8626
8633
|
jsonwebtoken: "9.0.2",
|
|
8627
8634
|
mitt: "^3.0.1",
|
|
8635
|
+
"normalize-newline": "^4.1.0",
|
|
8628
8636
|
open: "10.1.0",
|
|
8629
8637
|
ora: "8.0.1",
|
|
8630
8638
|
"p-queue": "7.3.4",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "20.25.2-alpha.
|
|
3
|
+
"version": "20.25.2-alpha.5+42c99fa29a",
|
|
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.25.2-alpha.
|
|
31
|
-
"@uniformdev/canvas": "20.25.2-alpha.
|
|
32
|
-
"@uniformdev/context": "20.25.2-alpha.
|
|
33
|
-
"@uniformdev/files": "20.25.2-alpha.
|
|
34
|
-
"@uniformdev/project-map": "20.25.2-alpha.
|
|
35
|
-
"@uniformdev/redirect": "20.25.2-alpha.
|
|
36
|
-
"@uniformdev/richtext": "20.25.2-alpha.
|
|
30
|
+
"@uniformdev/assets": "20.25.2-alpha.5+42c99fa29a",
|
|
31
|
+
"@uniformdev/canvas": "20.25.2-alpha.5+42c99fa29a",
|
|
32
|
+
"@uniformdev/context": "20.25.2-alpha.5+42c99fa29a",
|
|
33
|
+
"@uniformdev/files": "20.25.2-alpha.5+42c99fa29a",
|
|
34
|
+
"@uniformdev/project-map": "20.25.2-alpha.5+42c99fa29a",
|
|
35
|
+
"@uniformdev/redirect": "20.25.2-alpha.5+42c99fa29a",
|
|
36
|
+
"@uniformdev/richtext": "20.25.2-alpha.5+42c99fa29a",
|
|
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": "42c99fa29a788d699389b1eca81d5077093c41e9"
|
|
83
84
|
}
|