@medusajs/file-local-next 0.0.3-snapshot-20240718083016 → 0.0.3-snapshot-20240719133408
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -5
- package/dist/services/local-file.d.ts +3 -1
- package/dist/services/local-file.d.ts.map +1 -0
- package/dist/services/local-file.js +82 -169
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAKvD,QAAA,MAAM,cAAc,EAAE,qBAErB,CAAA;AAED,eAAe,cAAc,CAAA"}
|
package/dist/index.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
services
|
3
|
+
const local_file_1 = require("./services/local-file");
|
4
|
+
const services = [local_file_1.LocalFileService];
|
5
|
+
const providerExport = {
|
6
|
+
services,
|
7
7
|
};
|
8
8
|
exports.default = providerExport;
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxzREFBd0Q7QUFFeEQsTUFBTSxRQUFRLEdBQUcsQ0FBQyw2QkFBZ0IsQ0FBQyxDQUFBO0FBRW5DLE1BQU0sY0FBYyxHQUEwQjtJQUM1QyxRQUFRO0NBQ1QsQ0FBQTtBQUVELGtCQUFlLGNBQWMsQ0FBQSJ9
|
@@ -3,12 +3,14 @@ import { AbstractFileProviderService } from "@medusajs/utils";
|
|
3
3
|
export declare class LocalFileService extends AbstractFileProviderService {
|
4
4
|
static identifier: string;
|
5
5
|
protected uploadDir_: string;
|
6
|
+
protected privateUploadDir_: string;
|
6
7
|
protected backendUrl_: string;
|
7
8
|
constructor(_: any, options: LocalFileServiceOptions);
|
8
9
|
upload(file: FileTypes.ProviderUploadFileDTO): Promise<FileTypes.ProviderFileResultDTO>;
|
9
10
|
delete(file: FileTypes.ProviderDeleteFileDTO): Promise<void>;
|
10
|
-
getPresignedDownloadUrl(
|
11
|
+
getPresignedDownloadUrl(file: FileTypes.ProviderGetFileDTO): Promise<string>;
|
11
12
|
private getUploadFilePath;
|
12
13
|
private getUploadFileUrl;
|
13
14
|
private ensureDirExists;
|
14
15
|
}
|
16
|
+
//# sourceMappingURL=local-file.d.ts.map
|
@@ -0,0 +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,iBAAiB,CAAA;AACpE,OAAO,EAAE,2BAA2B,EAAe,MAAM,iBAAiB,CAAA;AAI1E,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;IAQzC,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;IAkB5D,uBAAuB,CAC3B,IAAI,EAAE,SAAS,CAAC,kBAAkB,GACjC,OAAO,CAAC,MAAM,CAAC;IAsBlB,OAAO,CAAC,iBAAiB,CAExB;IAED,OAAO,CAAC,gBAAgB,CAIvB;YAEa,eAAe;CAU9B"}
|
@@ -1,179 +1,92 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
if (typeof b !== "function" && b !== null)
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12
|
-
extendStatics(d, b);
|
13
|
-
function __() { this.constructor = d; }
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
|
-
};
|
16
|
-
})();
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
24
|
-
});
|
25
|
-
};
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
30
|
-
function step(op) {
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
32
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
33
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
35
|
-
switch (op[0]) {
|
36
|
-
case 0: case 1: t = op; break;
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
40
|
-
default:
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
45
|
-
if (t[2]) _.ops.pop();
|
46
|
-
_.trys.pop(); continue;
|
47
|
-
}
|
48
|
-
op = body.call(thisArg, _);
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
51
|
-
}
|
52
|
-
};
|
53
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
54
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
55
4
|
};
|
56
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
57
6
|
exports.LocalFileService = void 0;
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
7
|
+
const utils_1 = require("@medusajs/utils");
|
8
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
9
|
+
const path_1 = __importDefault(require("path"));
|
10
|
+
class LocalFileService extends utils_1.AbstractFileProviderService {
|
11
|
+
constructor(_, options) {
|
12
|
+
super();
|
13
|
+
this.getUploadFilePath = (baseDir, fileKey) => {
|
14
|
+
return path_1.default.join(baseDir, fileKey);
|
15
|
+
};
|
16
|
+
this.getUploadFileUrl = (fileKey) => {
|
17
|
+
const baseUrl = new URL(this.backendUrl_);
|
18
|
+
baseUrl.pathname = path_1.default.join(baseUrl.pathname, fileKey);
|
19
|
+
return baseUrl.href;
|
67
20
|
};
|
68
|
-
|
69
|
-
|
21
|
+
this.uploadDir_ = options?.upload_dir || path_1.default.join(process.cwd(), "static");
|
22
|
+
this.privateUploadDir_ =
|
23
|
+
options?.private_upload_dir || path_1.default.join(process.cwd(), "private");
|
24
|
+
this.backendUrl_ = options?.backend_url || "http://localhost:9000/static";
|
25
|
+
}
|
26
|
+
async upload(file) {
|
27
|
+
if (!file) {
|
28
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `No file provided`);
|
29
|
+
}
|
30
|
+
if (!file.filename) {
|
31
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `No filename provided`);
|
32
|
+
}
|
33
|
+
const parsedFilename = path_1.default.parse(file.filename);
|
34
|
+
const baseDir = file.access === "public" ? this.uploadDir_ : this.privateUploadDir_;
|
35
|
+
const dir = await this.ensureDirExists(baseDir, parsedFilename.dir);
|
36
|
+
const fileKey = path_1.default.join(parsedFilename.dir,
|
37
|
+
// We append "private" to the file key so deletions and presigned URLs can know which folder to look into
|
38
|
+
`${Date.now()}-${parsedFilename.base}${file.access === "public" ? "" : "-private"}`);
|
39
|
+
const filePath = this.getUploadFilePath(baseDir, fileKey);
|
40
|
+
const fileUrl = this.getUploadFileUrl(fileKey);
|
41
|
+
const content = Buffer.from(file.content, "binary");
|
42
|
+
await promises_1.default.writeFile(filePath, content);
|
43
|
+
return {
|
44
|
+
key: fileKey,
|
45
|
+
url: fileUrl,
|
70
46
|
};
|
71
|
-
_this.uploadDir_ = (options === null || options === void 0 ? void 0 : options.upload_dir) || "uploads";
|
72
|
-
_this.backendUrl_ = (options === null || options === void 0 ? void 0 : options.backend_url) || "http://localhost:9000";
|
73
|
-
return _this;
|
74
47
|
}
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
}
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
case 2:
|
118
|
-
_a.sent();
|
119
|
-
return [4 /*yield*/, promises_1.default.unlink(filePath)];
|
120
|
-
case 3:
|
121
|
-
_a.sent();
|
122
|
-
return [3 /*break*/, 5];
|
123
|
-
case 4:
|
124
|
-
e_1 = _a.sent();
|
125
|
-
return [3 /*break*/, 5];
|
126
|
-
case 5: return [2 /*return*/];
|
127
|
-
}
|
128
|
-
});
|
129
|
-
});
|
130
|
-
};
|
131
|
-
LocalFileService.prototype.getPresignedDownloadUrl = function (fileData) {
|
132
|
-
return __awaiter(this, void 0, void 0, function () {
|
133
|
-
var _a;
|
134
|
-
return __generator(this, function (_b) {
|
135
|
-
switch (_b.label) {
|
136
|
-
case 0:
|
137
|
-
_b.trys.push([0, 2, , 3]);
|
138
|
-
return [4 /*yield*/, promises_1.default.access(this.getUploadFilePath(fileData.fileKey), promises_1.default.constants.F_OK)];
|
139
|
-
case 1:
|
140
|
-
_b.sent();
|
141
|
-
return [3 /*break*/, 3];
|
142
|
-
case 2:
|
143
|
-
_a = _b.sent();
|
144
|
-
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, "File with key ".concat(fileData.fileKey, " not found"));
|
145
|
-
case 3: return [2 /*return*/, this.getUploadFileUrl(fileData.fileKey)];
|
146
|
-
}
|
147
|
-
});
|
148
|
-
});
|
149
|
-
};
|
150
|
-
LocalFileService.prototype.ensureDirExists = function (dirPath) {
|
151
|
-
return __awaiter(this, void 0, void 0, function () {
|
152
|
-
var relativePath, e_2;
|
153
|
-
return __generator(this, function (_a) {
|
154
|
-
switch (_a.label) {
|
155
|
-
case 0:
|
156
|
-
relativePath = path_1.default.join(this.uploadDir_, dirPath);
|
157
|
-
_a.label = 1;
|
158
|
-
case 1:
|
159
|
-
_a.trys.push([1, 3, , 5]);
|
160
|
-
return [4 /*yield*/, promises_1.default.access(relativePath, promises_1.default.constants.F_OK)];
|
161
|
-
case 2:
|
162
|
-
_a.sent();
|
163
|
-
return [3 /*break*/, 5];
|
164
|
-
case 3:
|
165
|
-
e_2 = _a.sent();
|
166
|
-
return [4 /*yield*/, promises_1.default.mkdir(relativePath, { recursive: true })];
|
167
|
-
case 4:
|
168
|
-
_a.sent();
|
169
|
-
return [3 /*break*/, 5];
|
170
|
-
case 5: return [2 /*return*/];
|
171
|
-
}
|
172
|
-
});
|
173
|
-
});
|
174
|
-
};
|
175
|
-
LocalFileService.identifier = "localfs";
|
176
|
-
return LocalFileService;
|
177
|
-
}(utils_1.AbstractFileProviderService));
|
48
|
+
async delete(file) {
|
49
|
+
const baseDir = file.fileKey.endsWith("-private")
|
50
|
+
? this.privateUploadDir_
|
51
|
+
: this.uploadDir_;
|
52
|
+
const filePath = this.getUploadFilePath(baseDir, file.fileKey);
|
53
|
+
try {
|
54
|
+
await promises_1.default.access(filePath, promises_1.default.constants.F_OK);
|
55
|
+
await promises_1.default.unlink(filePath);
|
56
|
+
}
|
57
|
+
catch (e) {
|
58
|
+
// The file does not exist, so it's a noop.
|
59
|
+
}
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
// For private files, we simply return the file path, which can then be loaded manually by the backend.
|
63
|
+
// The local file provider doesn't support presigned URLs for private files.
|
64
|
+
async getPresignedDownloadUrl(file) {
|
65
|
+
const isPrivate = file.fileKey.endsWith("-private");
|
66
|
+
const baseDir = isPrivate ? this.privateUploadDir_ : this.uploadDir_;
|
67
|
+
const filePath = this.getUploadFilePath(baseDir, file.fileKey);
|
68
|
+
try {
|
69
|
+
await promises_1.default.access(filePath, promises_1.default.constants.F_OK);
|
70
|
+
}
|
71
|
+
catch {
|
72
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `File with key ${file.fileKey} not found`);
|
73
|
+
}
|
74
|
+
if (isPrivate) {
|
75
|
+
return filePath;
|
76
|
+
}
|
77
|
+
return this.getUploadFileUrl(file.fileKey);
|
78
|
+
}
|
79
|
+
async ensureDirExists(baseDir, dirPath) {
|
80
|
+
const relativePath = path_1.default.join(baseDir, dirPath);
|
81
|
+
try {
|
82
|
+
await promises_1.default.access(relativePath, promises_1.default.constants.F_OK);
|
83
|
+
}
|
84
|
+
catch (e) {
|
85
|
+
await promises_1.default.mkdir(relativePath, { recursive: true });
|
86
|
+
}
|
87
|
+
return relativePath;
|
88
|
+
}
|
89
|
+
}
|
178
90
|
exports.LocalFileService = LocalFileService;
|
179
|
-
|
91
|
+
LocalFileService.identifier = "localfs";
|
92
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWwtZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZXJ2aWNlcy9sb2NhbC1maWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUNBLDJDQUEwRTtBQUMxRSwyREFBNEI7QUFDNUIsZ0RBQXVCO0FBRXZCLE1BQWEsZ0JBQWlCLFNBQVEsbUNBQTJCO0lBTS9ELFlBQVksQ0FBQyxFQU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MsRUFBRSxJQUFJLEVBQUUsQ0FBQyxDQUFBO1FBQ25ELENBQUM7UUFFRCxPQUFPLFlBQVksQ0FBQTtJQUNyQixDQUFDOztBQWxISCw0Q0FtSEM7QUFsSFEsMkJBQVUsR0FBRyxTQUFTLEFBQVosQ0FBWSJ9
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/file-local-next",
|
3
|
-
"version": "0.0.3-snapshot-
|
3
|
+
"version": "0.0.3-snapshot-20240719133408",
|
4
4
|
"description": "Local filesystem file storage for Medusa",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"repository": {
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"dist"
|
13
13
|
],
|
14
14
|
"engines": {
|
15
|
-
"node": ">=
|
15
|
+
"node": ">=20"
|
16
16
|
},
|
17
17
|
"author": "Medusa",
|
18
18
|
"license": "MIT",
|
@@ -24,12 +24,12 @@
|
|
24
24
|
},
|
25
25
|
"devDependencies": {
|
26
26
|
"cross-env": "^5.2.1",
|
27
|
-
"jest": "^
|
27
|
+
"jest": "^29.7.0",
|
28
28
|
"rimraf": "^5.0.1",
|
29
|
-
"typescript": "^
|
29
|
+
"typescript": "^5.3.3"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@medusajs/utils": "1.
|
32
|
+
"@medusajs/utils": "1.12.0-snapshot-20240719133408"
|
33
33
|
},
|
34
34
|
"keywords": [
|
35
35
|
"medusa-plugin",
|