@uniformdev/files 20.75.1-alpha.15.sha-b6ff05804e → 20.75.1-alpha.6
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.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js +6 -1
- package/dist/index.js +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +4 -3
package/dist/index.d.mts
CHANGED
|
@@ -347,6 +347,12 @@ declare class UncachedFileClient extends FileClient {
|
|
|
347
347
|
}, 'bypassCache'>);
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Extracts and decodes the original filename from a Uniform file URL.
|
|
352
|
+
*
|
|
353
|
+
* The filename is decoded once. If it contains malformed percent encoding,
|
|
354
|
+
* the encoded filename is returned unchanged.
|
|
355
|
+
*/
|
|
350
356
|
declare const getFileNameFromUrl: (fileUrl: string) => string;
|
|
351
357
|
|
|
352
358
|
/** Constant for an in-progress file state. Subject to change. */
|
package/dist/index.d.ts
CHANGED
|
@@ -347,6 +347,12 @@ declare class UncachedFileClient extends FileClient {
|
|
|
347
347
|
}, 'bypassCache'>);
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Extracts and decodes the original filename from a Uniform file URL.
|
|
352
|
+
*
|
|
353
|
+
* The filename is decoded once. If it contains malformed percent encoding,
|
|
354
|
+
* the encoded filename is returned unchanged.
|
|
355
|
+
*/
|
|
350
356
|
declare const getFileNameFromUrl: (fileUrl: string) => string;
|
|
351
357
|
|
|
352
358
|
/** Constant for an in-progress file state. Subject to change. */
|
package/dist/index.esm.js
CHANGED
|
@@ -55,7 +55,12 @@ var UncachedFileClient = class extends FileClient {
|
|
|
55
55
|
var getFileNameFromUrl = (fileUrl) => {
|
|
56
56
|
var _a;
|
|
57
57
|
const url = new URL(fileUrl);
|
|
58
|
-
|
|
58
|
+
const fileName = ((_a = url.pathname.split("/").pop()) == null ? void 0 : _a.substring(23)) || "";
|
|
59
|
+
try {
|
|
60
|
+
return decodeURIComponent(fileName);
|
|
61
|
+
} catch (e) {
|
|
62
|
+
return fileName;
|
|
63
|
+
}
|
|
59
64
|
};
|
|
60
65
|
|
|
61
66
|
// src/utils/constants.ts
|
package/dist/index.js
CHANGED
|
@@ -96,7 +96,12 @@ var UncachedFileClient = class extends FileClient {
|
|
|
96
96
|
var getFileNameFromUrl = (fileUrl) => {
|
|
97
97
|
var _a;
|
|
98
98
|
const url = new URL(fileUrl);
|
|
99
|
-
|
|
99
|
+
const fileName = ((_a = url.pathname.split("/").pop()) == null ? void 0 : _a.substring(23)) || "";
|
|
100
|
+
try {
|
|
101
|
+
return decodeURIComponent(fileName);
|
|
102
|
+
} catch (e) {
|
|
103
|
+
return fileName;
|
|
104
|
+
}
|
|
100
105
|
};
|
|
101
106
|
|
|
102
107
|
// src/utils/constants.ts
|
package/dist/index.mjs
CHANGED
|
@@ -55,7 +55,12 @@ var UncachedFileClient = class extends FileClient {
|
|
|
55
55
|
var getFileNameFromUrl = (fileUrl) => {
|
|
56
56
|
var _a;
|
|
57
57
|
const url = new URL(fileUrl);
|
|
58
|
-
|
|
58
|
+
const fileName = ((_a = url.pathname.split("/").pop()) == null ? void 0 : _a.substring(23)) || "";
|
|
59
|
+
try {
|
|
60
|
+
return decodeURIComponent(fileName);
|
|
61
|
+
} catch (e) {
|
|
62
|
+
return fileName;
|
|
63
|
+
}
|
|
59
64
|
};
|
|
60
65
|
|
|
61
66
|
// src/utils/constants.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/files",
|
|
3
|
-
"version": "20.75.1-alpha.
|
|
3
|
+
"version": "20.75.1-alpha.6+28f494b01a",
|
|
4
4
|
"description": "Uniform Files helpers",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"dev:ts": "tsup --watch",
|
|
27
27
|
"clean": "rimraf dist",
|
|
28
28
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
29
|
+
"test": "vitest run",
|
|
29
30
|
"update-openapi": "tsx ./scripts/update-openapi.cts"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"access": "public"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@uniformdev/context": "20.75.1-alpha.
|
|
39
|
+
"@uniformdev/context": "20.75.1-alpha.6+28f494b01a"
|
|
39
40
|
},
|
|
40
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "28f494b01a1b988afdf9f7e3ecf6fad402bb3777"
|
|
41
42
|
}
|