@medusajs/file-local-next 0.0.3-preview-20240918180312 → 0.0.3-preview-20240924210240
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.js
CHANGED
|
@@ -6,4 +6,4 @@ const providerExport = {
|
|
|
6
6
|
services,
|
|
7
7
|
};
|
|
8
8
|
exports.default = providerExport;
|
|
9
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA,sDAAwD;AAExD,MAAM,QAAQ,GAAG,CAAC,6BAAgB,CAAC,CAAA;AAEnC,MAAM,cAAc,GAA0B;IAC5C,QAAQ;CACT,CAAA;AAED,kBAAe,cAAc,CAAA"}
|
|
@@ -36,7 +36,7 @@ class LocalFileService extends utils_1.AbstractFileProviderService {
|
|
|
36
36
|
}
|
|
37
37
|
const parsedFilename = path_1.default.parse(file.filename);
|
|
38
38
|
const baseDir = file.access === "public" ? this.uploadDir_ : this.privateUploadDir_;
|
|
39
|
-
|
|
39
|
+
await this.ensureDirExists(baseDir, parsedFilename.dir);
|
|
40
40
|
const fileKey = path_1.default.join(parsedFilename.dir,
|
|
41
41
|
// We prepend "private" to the file key so deletions and presigned URLs can know which folder to look into
|
|
42
42
|
`${file.access === "public" ? "" : "private-"}${Date.now()}-${parsedFilename.base}`);
|
|
@@ -89,4 +89,4 @@ class LocalFileService extends utils_1.AbstractFileProviderService {
|
|
|
89
89
|
}
|
|
90
90
|
exports.LocalFileService = LocalFileService;
|
|
91
91
|
LocalFileService.identifier = "localfs";
|
|
92
|
-
//# sourceMappingURL=
|
|
92
|
+
//# sourceMappingURL=local-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-file.js","sourceRoot":"","sources":["../../src/services/local-file.ts"],"names":[],"mappings":";;;;;;AACA,2CA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CAAC,EAAE,CAAC;YACX,MAAM,kBAAE,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;QACnD,CAAC;QAED,OAAO,YAAY,CAAA;IACrB,CAAC;;AAlHH,4CAmHC;AAlHQ,2BAAU,GAAG,SAAS,AAAZ,CAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/index.ts","../src/services/local-file.ts"],"version":"5.6.2"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/file-local-next",
|
|
3
|
-
"version": "0.0.3-preview-
|
|
3
|
+
"version": "0.0.3-preview-20240924210240",
|
|
4
4
|
"description": "Local filesystem file storage for Medusa",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
"directory": "packages/file-local"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
-
"dist"
|
|
12
|
+
"dist",
|
|
13
|
+
"!dist/**/__tests__",
|
|
14
|
+
"!dist/**/__mocks__",
|
|
15
|
+
"!dist/**/__fixtures__"
|
|
13
16
|
],
|
|
14
17
|
"engines": {
|
|
15
18
|
"node": ">=20"
|
|
@@ -25,10 +28,10 @@
|
|
|
25
28
|
"cross-env": "^5.2.1",
|
|
26
29
|
"jest": "^29.7.0",
|
|
27
30
|
"rimraf": "^5.0.1",
|
|
28
|
-
"typescript": "^5.
|
|
31
|
+
"typescript": "^5.6.2"
|
|
29
32
|
},
|
|
30
33
|
"dependencies": {
|
|
31
|
-
"@medusajs/utils": "1.12.0-preview-
|
|
34
|
+
"@medusajs/utils": "1.12.0-preview-20240924210240"
|
|
32
35
|
},
|
|
33
36
|
"keywords": [
|
|
34
37
|
"medusa-plugin",
|