@zola_do/seaweed 0.2.7 → 0.2.8

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.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './zola-object-storage';
2
1
  export * from './storage.module';
3
2
  export * from './types';
4
3
  export * from './services/storage.service';
package/dist/index.js CHANGED
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./zola-object-storage"), exports);
18
17
  __exportStar(require("./storage.module"), exports);
19
18
  __exportStar(require("./types"), exports);
20
19
  __exportStar(require("./services/storage.service"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,mDAAiC;AACjC,0CAAwB;AACxB,6DAA2C;AAC3C,yEAAuD;AACvD,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,0CAAwB;AACxB,6DAA2C;AAC3C,yEAAuD;AACvD,+CAA6B"}
@@ -1,16 +1,21 @@
1
- import { ZolaObjectStorage, ZolaStoredFileRef } from '../zola-object-storage';
2
1
  import { StorageService } from './storage.service';
3
- export declare class SeaweedZolaObjectStorage implements ZolaObjectStorage {
2
+ export type SeaweedStoredFileRef = {
3
+ filepath: string;
4
+ bucketName: string;
5
+ contentType: string;
6
+ originalname: string;
7
+ };
8
+ export declare class SeaweedZolaObjectStorage {
4
9
  private readonly storage;
5
10
  constructor(storage: StorageService);
6
- uploadFile(file: Express.Multer.File, bucketName: string, _metaData?: Record<string, string>): Promise<ZolaStoredFileRef>;
7
- uploadBuffer(buffer: Buffer, originalname: string, mimetype: string, bucketName: string): Promise<ZolaStoredFileRef>;
11
+ uploadFile(file: Express.Multer.File, bucketName: string, _metaData?: Record<string, string>): Promise<SeaweedStoredFileRef>;
12
+ uploadBuffer(buffer: Buffer, originalname: string, mimetype: string, bucketName: string): Promise<SeaweedStoredFileRef>;
8
13
  generatePresignedUploadUrl(fileInfo: {
9
14
  originalname: string;
10
15
  contentType?: string;
11
16
  }, bucketName: string): Promise<{
12
17
  presignedUrl: string;
13
- file: ZolaStoredFileRef;
18
+ file: SeaweedStoredFileRef;
14
19
  }>;
15
- generatePresignedDownloadUrl(fileInfo: Pick<ZolaStoredFileRef, 'bucketName' | 'filepath' | 'contentType' | 'originalname'>): Promise<string>;
20
+ generatePresignedDownloadUrl(fileInfo: Pick<SeaweedStoredFileRef, 'bucketName' | 'filepath' | 'contentType' | 'originalname'>): Promise<string>;
16
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"seaweed.zola-object-storage.js","sourceRoot":"","sources":["../../src/services/seaweed.zola-object-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,uDAAmD;AAG5C,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YAA6B,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;IAAG,CAAC;IAExD,UAAU,CACR,IAAyB,EACzB,UAAkB,EAClB,SAAkC;QAElC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAA+B,CAAC;IAC7E,CAAC;IAED,YAAY,CACV,MAAc,EACd,YAAoB,EACpB,QAAgB,EAChB,UAAkB;QAElB,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAC9B,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,UAAU,CACmB,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,0BAA0B,CAC9B,QAAwD,EACxD,UAAkB;;QAElB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,iCAAiC,CAAC;YAClE,YAAY,EAAE,QAAQ,CAAC,YAAY;YACnC,WAAW,EAAE,MAAA,QAAQ,CAAC,WAAW,mCAAI,0BAA0B;YAC/D,UAAU;YACV,QAAQ,EAAE,EAAE;SACb,CAAC,CAAC;QACH,OAAO;YACL,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,IAAI,EAAE,MAAM,CAAC,IAAyB;SACvC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,4BAA4B,CAChC,QAGC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC;IAC7D,CAAC;CACF,CAAA;AAjDY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAE2B,gCAAc;GADzC,wBAAwB,CAiDpC"}
1
+ {"version":3,"file":"seaweed.zola-object-storage.js","sourceRoot":"","sources":["../../src/services/seaweed.zola-object-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uDAAmD;AAc5C,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YAA6B,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;IAAG,CAAC;IAExD,UAAU,CACR,IAAyB,EACzB,UAAkB,EAClB,SAAkC;QAElC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CACxB,IAAI,EACJ,UAAU,CACsB,CAAC;IACrC,CAAC;IAED,YAAY,CACV,MAAc,EACd,YAAoB,EACpB,QAAgB,EAChB,UAAkB;QAElB,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAC9B,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,UAAU,CACsB,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,0BAA0B,CAC9B,QAAwD,EACxD,UAAkB;;QAElB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,iCAAiC,CAAC;YAClE,YAAY,EAAE,QAAQ,CAAC,YAAY;YACnC,WAAW,EAAE,MAAA,QAAQ,CAAC,WAAW,mCAAI,0BAA0B;YAC/D,UAAU;YACV,QAAQ,EAAE,EAAE;SACb,CAAC,CAAC;QACH,OAAO;YACL,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,IAAI,EAAE,MAAM,CAAC,IAA4B;SAC1C,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,4BAA4B,CAChC,QAGC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC;IAC7D,CAAC;CACF,CAAA;AApDY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAE2B,gCAAc;GADzC,wBAAwB,CAoDpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zola_do/seaweed",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "AWS S3-compatible storage for NestJS",
5
5
  "author": "zolaDO",
6
6
  "license": "ISC",
@@ -1,19 +0,0 @@
1
- export type ZolaStoredFileRef = {
2
- filepath: string;
3
- bucketName: string;
4
- contentType: string;
5
- originalname: string;
6
- };
7
- export interface ZolaObjectStorage {
8
- uploadFile(file: Express.Multer.File, bucketName: string, metaData?: Record<string, string>): Promise<ZolaStoredFileRef>;
9
- uploadBuffer(buffer: Buffer, originalname: string, mimetype: string, bucketName: string, metaData?: Record<string, string>): Promise<ZolaStoredFileRef>;
10
- generatePresignedUploadUrl(fileInfo: {
11
- originalname: string;
12
- contentType?: string;
13
- }, bucketName: string): Promise<{
14
- presignedUrl: string;
15
- file: ZolaStoredFileRef;
16
- }>;
17
- generatePresignedDownloadUrl(fileInfo: Pick<ZolaStoredFileRef, 'bucketName' | 'filepath' | 'contentType' | 'originalname'>): Promise<string>;
18
- }
19
- export declare const ZOLA_STORAGE_CONTRACT_VERSION: 1;
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ZOLA_STORAGE_CONTRACT_VERSION = void 0;
4
- exports.ZOLA_STORAGE_CONTRACT_VERSION = 1;
5
- //# sourceMappingURL=zola-object-storage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zola-object-storage.js","sourceRoot":"","sources":["../src/zola-object-storage.ts"],"names":[],"mappings":";;;AA4Ca,QAAA,6BAA6B,GAAG,CAAU,CAAC"}