@uniformdev/cli 19.86.1-alpha.11 → 19.86.1-alpha.13
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 +15 -6
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -705,10 +705,18 @@ var findUrlMatchingPartialPathname = (source, pathname) => {
|
|
|
705
705
|
}
|
|
706
706
|
return null;
|
|
707
707
|
};
|
|
708
|
+
var urlToFileExtension = (url) => {
|
|
709
|
+
try {
|
|
710
|
+
const urlObject = new URL(url);
|
|
711
|
+
const fileNameChunks = urlObject.pathname.split(".");
|
|
712
|
+
return fileNameChunks.length > 1 ? fileNameChunks.at(-1) ?? null : null;
|
|
713
|
+
} catch {
|
|
714
|
+
return null;
|
|
715
|
+
}
|
|
716
|
+
};
|
|
708
717
|
var urlToFileName = (url, hash) => {
|
|
709
718
|
const fileName = hash ?? urlToHash(url);
|
|
710
|
-
const
|
|
711
|
-
const fileExtension = fileNameChunks.length > 1 ? fileNameChunks.at(-1) : "";
|
|
719
|
+
const fileExtension = urlToFileExtension(url);
|
|
712
720
|
return `${fileName}${fileExtension ? `.${fileExtension}` : ""}`;
|
|
713
721
|
};
|
|
714
722
|
var getFilesDirectory = (directory) => {
|
|
@@ -801,11 +809,12 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
|
|
|
801
809
|
return;
|
|
802
810
|
}
|
|
803
811
|
const localFileName = urlToFileName(url);
|
|
804
|
-
const
|
|
805
|
-
|
|
806
|
-
);
|
|
812
|
+
const expectedFilePath = join2(writeDirectory, FILES_DIRECTORY_NAME, localFileName);
|
|
813
|
+
const fileExistsLocally = await fsj.existsAsync(expectedFilePath);
|
|
807
814
|
if (!fileExistsLocally) {
|
|
808
|
-
console.warn(
|
|
815
|
+
console.warn(
|
|
816
|
+
`Skipping file ${url} as we couldn't find a local copy (looked at ${expectedFilePath})`
|
|
817
|
+
);
|
|
809
818
|
return;
|
|
810
819
|
}
|
|
811
820
|
const fileBuffer = await fsj.readAsync(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "19.86.1-alpha.
|
|
3
|
+
"version": "19.86.1-alpha.13+962dd4d05",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@thi.ng/mime": "^2.2.23",
|
|
20
|
-
"@uniformdev/assets": "19.86.1-alpha.
|
|
21
|
-
"@uniformdev/canvas": "19.86.1-alpha.
|
|
22
|
-
"@uniformdev/context": "19.86.1-alpha.
|
|
23
|
-
"@uniformdev/files": "19.86.1-alpha.
|
|
24
|
-
"@uniformdev/project-map": "19.86.1-alpha.
|
|
25
|
-
"@uniformdev/redirect": "19.86.1-alpha.
|
|
20
|
+
"@uniformdev/assets": "19.86.1-alpha.13+962dd4d05",
|
|
21
|
+
"@uniformdev/canvas": "19.86.1-alpha.13+962dd4d05",
|
|
22
|
+
"@uniformdev/context": "19.86.1-alpha.13+962dd4d05",
|
|
23
|
+
"@uniformdev/files": "19.86.1-alpha.13+962dd4d05",
|
|
24
|
+
"@uniformdev/project-map": "19.86.1-alpha.13+962dd4d05",
|
|
25
|
+
"@uniformdev/redirect": "19.86.1-alpha.13+962dd4d05",
|
|
26
26
|
"call-bind": "^1.0.2",
|
|
27
27
|
"colorette": "2.0.20",
|
|
28
28
|
"cosmiconfig": "8.3.6",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "962dd4d059ca4195e099d136fc469d8b97356c74"
|
|
73
73
|
}
|