@medusajs/utils 3.0.0-snapshot-20251211173847 → 3.0.0-snapshot-20251211180009
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Readable } from "stream";
|
|
1
2
|
import { FileTypes, IFileProvider } from "@medusajs/types";
|
|
2
|
-
import type { Readable, Writable } from "stream";
|
|
3
3
|
/**
|
|
4
4
|
* ### constructor
|
|
5
5
|
*
|
|
@@ -208,32 +208,5 @@ export declare class AbstractFileProviderService implements IFileProvider {
|
|
|
208
208
|
* }
|
|
209
209
|
*/
|
|
210
210
|
getAsBuffer(fileData: FileTypes.ProviderGetFileDTO): Promise<Buffer>;
|
|
211
|
-
/**
|
|
212
|
-
* This method returns a writeable stream to upload a file.
|
|
213
|
-
*
|
|
214
|
-
* @param {FileTypes.ProviderUploadStreamDTO} fileData - The details of the file to upload.
|
|
215
|
-
* @returns {Promise<{ writeStream: Writable, promise: Promise<FileTypes.ProviderFileResultDTO>, url: string, fileKey: string }>} The writeable stream and upload promise.
|
|
216
|
-
*
|
|
217
|
-
* @since 2.8.0
|
|
218
|
-
*
|
|
219
|
-
* @example
|
|
220
|
-
* class MyFileProviderService extends AbstractFileProviderService {
|
|
221
|
-
* // ...
|
|
222
|
-
* async getUploadStream(fileData: FileTypes.ProviderUploadStreamDTO): Promise<{
|
|
223
|
-
* writeStream: Writable
|
|
224
|
-
* promise: Promise<FileTypes.ProviderFileResultDTO>
|
|
225
|
-
* url: string
|
|
226
|
-
* fileKey: string
|
|
227
|
-
* }> {
|
|
228
|
-
* // TODO logic to get the writeable stream
|
|
229
|
-
* }
|
|
230
|
-
* }
|
|
231
|
-
*/
|
|
232
|
-
getUploadStream(fileData: FileTypes.ProviderUploadStreamDTO): Promise<{
|
|
233
|
-
writeStream: Writable;
|
|
234
|
-
promise: Promise<FileTypes.ProviderFileResultDTO>;
|
|
235
|
-
url: string;
|
|
236
|
-
fileKey: string;
|
|
237
|
-
}>;
|
|
238
211
|
}
|
|
239
212
|
//# sourceMappingURL=abstract-file-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-file-provider.d.ts","sourceRoot":"","sources":["../../src/file/abstract-file-provider.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"abstract-file-provider.d.ts","sourceRoot":"","sources":["../../src/file/abstract-file-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,qBAAa,2BAA4B,YAAW,aAAa;IAC/D;;;;;;;;;;OAUG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,CAAA;IAEzB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK;IAE/D;;OAEG;IACH,aAAa;IAIb;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,qBAAqB,GACpC,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;IAI3C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,MAAM,CACV,KAAK,EAAE,SAAS,CAAC,qBAAqB,GAAG,SAAS,CAAC,qBAAqB,EAAE,GACzE,OAAO,CAAC,IAAI,CAAC;IAIhB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,uBAAuB,CAC3B,QAAQ,EAAE,SAAS,CAAC,kBAAkB,GACrC,OAAO,CAAC,MAAM,CAAC;IAIlB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,iBAAiB,CAAC,QAAQ,EAAE,SAAS,CAAC,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI5E;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;CAGrE"}
|
|
@@ -209,30 +209,6 @@ class AbstractFileProviderService {
|
|
|
209
209
|
getAsBuffer(fileData) {
|
|
210
210
|
throw Error("getAsBuffer must be overridden by the child class");
|
|
211
211
|
}
|
|
212
|
-
/**
|
|
213
|
-
* This method returns a writeable stream to upload a file.
|
|
214
|
-
*
|
|
215
|
-
* @param {FileTypes.ProviderUploadStreamDTO} fileData - The details of the file to upload.
|
|
216
|
-
* @returns {Promise<{ writeStream: Writable, promise: Promise<FileTypes.ProviderFileResultDTO>, url: string, fileKey: string }>} The writeable stream and upload promise.
|
|
217
|
-
*
|
|
218
|
-
* @since 2.8.0
|
|
219
|
-
*
|
|
220
|
-
* @example
|
|
221
|
-
* class MyFileProviderService extends AbstractFileProviderService {
|
|
222
|
-
* // ...
|
|
223
|
-
* async getUploadStream(fileData: FileTypes.ProviderUploadStreamDTO): Promise<{
|
|
224
|
-
* writeStream: Writable
|
|
225
|
-
* promise: Promise<FileTypes.ProviderFileResultDTO>
|
|
226
|
-
* url: string
|
|
227
|
-
* fileKey: string
|
|
228
|
-
* }> {
|
|
229
|
-
* // TODO logic to get the writeable stream
|
|
230
|
-
* }
|
|
231
|
-
* }
|
|
232
|
-
*/
|
|
233
|
-
getUploadStream(fileData) {
|
|
234
|
-
throw Error("getUploadStream must be overridden by the child class");
|
|
235
|
-
}
|
|
236
212
|
}
|
|
237
213
|
exports.AbstractFileProviderService = AbstractFileProviderService;
|
|
238
214
|
//# sourceMappingURL=abstract-file-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-file-provider.js","sourceRoot":"","sources":["../../src/file/abstract-file-provider.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAa,2BAA2B;IActC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,eAAe,CAAC,OAAyB,IAAiB,CAAC;IAElE;;OAEG;IACH,aAAa;QACX,OAAQ,IAAI,CAAC,WAAmB,CAAC,UAAU,CAAA;IAC7C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,KAAK,CAAC,MAAM,CACV,IAAqC;QAErC,MAAM,KAAK,CAAC,8CAA8C,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,CAAC,MAAM,CACV,KAA0E;QAE1E,MAAM,KAAK,CAAC,8CAA8C,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,uBAAuB,CAC3B,QAAsC;QAEtC,MAAM,KAAK,CAAC,+DAA+D,CAAC,CAAA;IAC9E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,iBAAiB,CAAC,QAAsC;QACtD,MAAM,KAAK,CAAC,yDAAyD,CAAC,CAAA;IACxE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CAAC,QAAsC;QAChD,MAAM,KAAK,CAAC,mDAAmD,CAAC,CAAA;IAClE,CAAC;
|
|
1
|
+
{"version":3,"file":"abstract-file-provider.js","sourceRoot":"","sources":["../../src/file/abstract-file-provider.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAa,2BAA2B;IActC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,eAAe,CAAC,OAAyB,IAAiB,CAAC;IAElE;;OAEG;IACH,aAAa;QACX,OAAQ,IAAI,CAAC,WAAmB,CAAC,UAAU,CAAA;IAC7C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,KAAK,CAAC,MAAM,CACV,IAAqC;QAErC,MAAM,KAAK,CAAC,8CAA8C,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,CAAC,MAAM,CACV,KAA0E;QAE1E,MAAM,KAAK,CAAC,8CAA8C,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,uBAAuB,CAC3B,QAAsC;QAEtC,MAAM,KAAK,CAAC,+DAA+D,CAAC,CAAA;IAC9E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,iBAAiB,CAAC,QAAsC;QACtD,MAAM,KAAK,CAAC,yDAAyD,CAAC,CAAA;IACxE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CAAC,QAAsC;QAChD,MAAM,KAAK,CAAC,mDAAmD,CAAC,CAAA;IAClE,CAAC;CACF;AA3LD,kEA2LC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/utils",
|
|
3
|
-
"version": "3.0.0-snapshot-
|
|
3
|
+
"version": "3.0.0-snapshot-20251211180009",
|
|
4
4
|
"description": "Medusa utilities functions shared by Medusa core and Modules",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"author": "Medusa",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@medusajs/types": "3.0.0-snapshot-
|
|
29
|
+
"@medusajs/types": "3.0.0-snapshot-20251211180009",
|
|
30
30
|
"express": "^4.21.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@graphql-codegen/typescript": "^4.0.9",
|
|
35
35
|
"@graphql-tools/merge": "^9.0.7",
|
|
36
36
|
"@graphql-tools/schema": "^10.0.6",
|
|
37
|
-
"@medusajs/deps": "3.0.0-snapshot-
|
|
37
|
+
"@medusajs/deps": "3.0.0-snapshot-20251211180009",
|
|
38
38
|
"@types/pluralize": "^0.0.33",
|
|
39
39
|
"bignumber.js": "^9.1.2",
|
|
40
40
|
"dotenv": "^16.4.5",
|