@medusajs/file-local 2.0.5-snapshot-20241113173305 → 2.0.5-snapshot-20241120130614
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"local-file.d.ts","sourceRoot":"","sources":["../../src/services/local-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,EACL,2BAA2B,EAE5B,MAAM,2BAA2B,CAAA;AAIlC,qBAAa,gBAAiB,SAAQ,2BAA2B;IAC/D,MAAM,CAAC,UAAU,SAAY;IAC7B,SAAS,CAAC,UAAU,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAA;IACnC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAA;gBAEjB,CAAC,KAAA,EAAE,OAAO,EAAE,uBAAuB;IAazC,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,qBAAqB,GACpC,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;IAqCrC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"local-file.d.ts","sourceRoot":"","sources":["../../src/services/local-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,EACL,2BAA2B,EAE5B,MAAM,2BAA2B,CAAA;AAIlC,qBAAa,gBAAiB,SAAQ,2BAA2B;IAC/D,MAAM,CAAC,UAAU,SAAY;IAC7B,SAAS,CAAC,UAAU,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAA;IACnC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAA;gBAEjB,CAAC,KAAA,EAAE,OAAO,EAAE,uBAAuB;IAazC,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,qBAAqB,GACpC,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;IAqCrC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB5D,uBAAuB,CAC3B,IAAI,EAAE,SAAS,CAAC,kBAAkB,GACjC,OAAO,CAAC,MAAM,CAAC;IAkBlB,OAAO,CAAC,iBAAiB,CAExB;IAED,OAAO,CAAC,gBAAgB,CAIvB;YAEa,eAAe;CAU9B"}
|
@@ -55,11 +55,14 @@ class LocalFileService extends utils_1.AbstractFileProviderService {
|
|
55
55
|
: this.uploadDir_;
|
56
56
|
const filePath = this.getUploadFilePath(baseDir, file.fileKey);
|
57
57
|
try {
|
58
|
-
await promises_1.default.access(filePath, promises_1.default.constants.
|
58
|
+
await promises_1.default.access(filePath, promises_1.default.constants.W_OK);
|
59
59
|
await promises_1.default.unlink(filePath);
|
60
60
|
}
|
61
61
|
catch (e) {
|
62
|
-
// The file does not exist,
|
62
|
+
// The file does not exist, we don't do anything
|
63
|
+
if (e.code !== "ENOENT") {
|
64
|
+
throw e;
|
65
|
+
}
|
63
66
|
}
|
64
67
|
return;
|
65
68
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"local-file.js","sourceRoot":"","sources":["../../src/services/local-file.ts"],"names":[],"mappings":";;;;;;AACA,qDAGkC;AAClC,2DAA4B;AAC5B,gDAAuB;AAEvB,MAAa,gBAAiB,SAAQ,mCAA2B;IAM/D,YAAY,CAAC,EAAE,OAAgC;QAC7C,KAAK,EAAE,CAAA;
|
1
|
+
{"version":3,"file":"local-file.js","sourceRoot":"","sources":["../../src/services/local-file.ts"],"names":[],"mappings":";;;;;;AACA,qDAGkC;AAClC,2DAA4B;AAC5B,gDAAuB;AAEvB,MAAa,gBAAiB,SAAQ,mCAA2B;IAM/D,YAAY,CAAC,EAAE,OAAgC;QAC7C,KAAK,EAAE,CAAA;QA2FD,sBAAiB,GAAG,CAAC,OAAe,EAAE,OAAe,EAAE,EAAE;YAC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AAA;QACnD,CAAC;QAED,OAAO,YAAY,CAAA;IACrB,CAAC;;AArHH,4CAsHC;AArHQ,2BAAU,GAAG,SAAS,AAAZ,CAAY"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/file-local",
|
3
|
-
"version": "2.0.5-snapshot-
|
3
|
+
"version": "2.0.5-snapshot-20241120130614",
|
4
4
|
"description": "Local filesystem file storage for Medusa",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"repository": {
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"watch": "tsc --watch"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
|
-
"@medusajs/framework": "2.0.5-snapshot-
|
28
|
+
"@medusajs/framework": "2.0.5-snapshot-20241120130614",
|
29
29
|
"@swc/core": "^1.7.28",
|
30
30
|
"@swc/jest": "^0.2.36",
|
31
31
|
"jest": "^29.7.0",
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"typescript": "^5.6.2"
|
34
34
|
},
|
35
35
|
"peerDependencies": {
|
36
|
-
"@medusajs/framework": "2.0.5-snapshot-
|
36
|
+
"@medusajs/framework": "2.0.5-snapshot-20241120130614"
|
37
37
|
},
|
38
38
|
"keywords": [
|
39
39
|
"medusa-plugin",
|