@medusajs/file-local-next 0.0.3-preview-20240918150256 → 0.0.3-preview-20240924183656

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=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxzREFBd0Q7QUFFeEQsTUFBTSxRQUFRLEdBQUcsQ0FBQyw2QkFBZ0IsQ0FBQyxDQUFBO0FBRW5DLE1BQU0sY0FBYyxHQUEwQjtJQUM1QyxRQUFRO0NBQ1QsQ0FBQTtBQUVELGtCQUFlLGNBQWMsQ0FBQSJ9
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
- const dir = await this.ensureDirExists(baseDir, parsedFilename.dir);
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=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWwtZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZXJ2aWNlcy9sb2NhbC1maWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUNBLDJDQUEwRTtBQUMxRSwyREFBNEI7QUFDNUIsZ0RBQXVCO0FBRXZCLE1BQWEsZ0JBQWlCLFNBQVEsbUNBQTJCO0lBTS9ELFlBQVksQ0FBQyxFQUFFLE9BQWdDO1FBQzdDLEtBQUssRUFBRSxDQUFBO1FBd0ZELHNCQUFpQixHQUFHLENBQUMsT0FBZSxFQUFFLE9BQWUsRUFBRSxFQUFFO1lBQy9ELE9BQU8sY0FBSSxDQUFDLElBQUksQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUE7UUFDcEMsQ0FBQyxDQUFBO1FBRU8scUJBQWdCLEdBQUcsQ0FBQyxPQUFlLEVBQUUsRUFBRTtZQUM3QyxNQUFNLE9BQU8sR0FBRyxJQUFJLEdBQUcsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUE7WUFDekMsT0FBTyxDQUFDLFFBQVEsR0FBRyxjQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxRQUFRLEVBQUUsT0FBTyxDQUFDLENBQUE7WUFDdkQsT0FBTyxPQUFPLENBQUMsSUFBSSxDQUFBO1FBQ3JCLENBQUMsQ0FBQTtRQS9GQyxJQUFJLENBQUMsVUFBVSxHQUFHLE9BQU8sRUFBRSxVQUFVLElBQUksY0FBSSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLEVBQUUsUUFBUSxDQUFDLENBQUE7UUFFM0UsMEdBQTB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C,CAAC,CAAC,IAAI,CAAC,UAAU,CAAA;QAEpE,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QAE9D,IAAI,CAAC;YACH,MAAM,kBAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,kBAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;QAC9C,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,mBAAW,CACnB,mBAAW,CAAC,KAAK,CAAC,SAAS,EAC3B,iBAAiB,IAAI,CAAC,OAAO,YAAY,CAC1C,CAAA;QACH,CAAC;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC5C,CAAC;IAYO,KAAK,CAAC,eAAe,CAAC,OAAe,EAAE,OAAe;QAC5D,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAChD,IAAI,CAAC;YACH,MAAM,kBAAE,CAAC,MAAM,CAAC,YAAY,EAAE,kBAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;QAClD,CAAC;QAAC,OAAO,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-20240918150256",
3
+ "version": "0.0.3-preview-20240924183656",
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.3.3"
31
+ "typescript": "^5.6.2"
29
32
  },
30
33
  "dependencies": {
31
- "@medusajs/utils": "1.12.0-preview-20240918150256"
34
+ "@medusajs/utils": "1.12.0-preview-20240924183656"
32
35
  },
33
36
  "keywords": [
34
37
  "medusa-plugin",