@etohq/file-tigris 1.5.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Etohq
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @etohq/file-tigris
2
+
3
+ Tigris object storage file provider for Eto.
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@etohq/types").ModuleProviderExports;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAKA,wBAEE"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@etohq/framework/utils");
4
+ const tigris_file_1 = require("./services/tigris-file");
5
+ const services = [tigris_file_1.TigrisFileService];
6
+ exports.default = (0, utils_1.ModuleProvider)(utils_1.Modules.FILE, {
7
+ services,
8
+ });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,kDAAgE;AAChE,wDAA0D;AAE1D,MAAM,QAAQ,GAAG,CAAC,+BAAiB,CAAC,CAAA;AAEpC,kBAAe,IAAA,sBAAc,EAAC,eAAO,CAAC,IAAI,EAAE;IAC1C,QAAQ;CACT,CAAC,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { S3Client } from "@aws-sdk/client-s3";
2
+ import { FileTypes, Logger, TigrisFileServiceOptions } from "@etohq/framework/types";
3
+ import { AbstractFileProviderService } from "@etohq/framework/utils";
4
+ import { Readable } from "stream";
5
+ type InjectedDependencies = {
6
+ logger: Logger;
7
+ };
8
+ interface TigrisFileServiceConfig {
9
+ fileUrl: string;
10
+ accessKeyId: string;
11
+ secretAccessKey: string;
12
+ region: string;
13
+ bucket: string;
14
+ prefix: string;
15
+ endpoint: string;
16
+ cacheControl: string;
17
+ downloadFileDuration: number;
18
+ additionalClientConfig?: Record<string, unknown>;
19
+ }
20
+ export declare class TigrisFileService extends AbstractFileProviderService {
21
+ static identifier: string;
22
+ protected config_: TigrisFileServiceConfig;
23
+ protected logger_: Logger;
24
+ protected client_: S3Client;
25
+ constructor({ logger }: InjectedDependencies, options: TigrisFileServiceOptions);
26
+ protected getClient(): S3Client;
27
+ upload(file: FileTypes.ProviderUploadFileDTO): Promise<FileTypes.ProviderFileResultDTO>;
28
+ delete(files: FileTypes.ProviderDeleteFileDTO | FileTypes.ProviderDeleteFileDTO[]): Promise<void>;
29
+ getPresignedDownloadUrl(fileData: FileTypes.ProviderGetFileDTO): Promise<string>;
30
+ getPresignedUploadUrl(fileData: FileTypes.ProviderGetPresignedUploadUrlDTO): Promise<FileTypes.ProviderFileResultDTO>;
31
+ getDownloadStream(file: FileTypes.ProviderGetFileDTO): Promise<Readable>;
32
+ getAsBuffer(file: FileTypes.ProviderGetFileDTO): Promise<Buffer>;
33
+ }
34
+ export {};
35
+ //# sourceMappingURL=tigris-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tigris-file.d.ts","sourceRoot":"","sources":["../../src/services/tigris-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,QAAQ,EAET,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACL,SAAS,EACT,MAAM,EACN,wBAAwB,EACzB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,2BAA2B,EAE5B,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAGjC,KAAK,oBAAoB,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjD;AAMD,qBAAa,iBAAkB,SAAQ,2BAA2B;IAChE,MAAM,CAAC,UAAU,SAAW;IAE5B,SAAS,CAAC,OAAO,EAAE,uBAAuB,CAAA;IAC1C,SAAS,CAAC,OAAO,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAA;gBAEf,EAAE,MAAM,EAAE,EAAE,oBAAoB,EAAE,OAAO,EAAE,wBAAwB;IAyC/E,SAAS,CAAC,SAAS;IAgBb,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,qBAAqB,GACpC,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;IAuCrC,MAAM,CACV,KAAK,EAAE,SAAS,CAAC,qBAAqB,GAAG,SAAS,CAAC,qBAAqB,EAAE,GACzE,OAAO,CAAC,IAAI,CAAC;IA2BV,uBAAuB,CAC3B,QAAQ,EAAE,SAAS,CAAC,kBAAkB,GACrC,OAAO,CAAC,MAAM,CAAC;IAWZ,qBAAqB,CACzB,QAAQ,EAAE,SAAS,CAAC,gCAAgC,GACnD,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;IA8BrC,iBAAiB,CACrB,IAAI,EAAE,SAAS,CAAC,kBAAkB,GACjC,OAAO,CAAC,QAAQ,CAAC;IAed,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;CAcvE"}
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TigrisFileService = void 0;
7
+ const client_s3_1 = require("@aws-sdk/client-s3");
8
+ const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
9
+ const utils_1 = require("@etohq/framework/utils");
10
+ const path_1 = __importDefault(require("path"));
11
+ const ulid_1 = require("ulid");
12
+ const DEFAULT_UPLOAD_EXPIRATION_DURATION_SECONDS = 60 * 60;
13
+ const DEFAULT_TIGRIS_ENDPOINT = "https://fly.storage.tigris.dev";
14
+ const DEFAULT_TIGRIS_REGION = "auto";
15
+ class TigrisFileService extends utils_1.AbstractFileProviderService {
16
+ constructor({ logger }, options) {
17
+ super();
18
+ if (!options?.access_key_id || !options?.secret_access_key) {
19
+ throw new utils_1.EtoError(utils_1.EtoError.Types.INVALID_DATA, "Tigris access_key_id and secret_access_key are required");
20
+ }
21
+ if (!options?.bucket) {
22
+ throw new utils_1.EtoError(utils_1.EtoError.Types.INVALID_DATA, "Tigris bucket is required");
23
+ }
24
+ if (!options?.file_url) {
25
+ throw new utils_1.EtoError(utils_1.EtoError.Types.INVALID_DATA, "Tigris file_url is required");
26
+ }
27
+ this.config_ = {
28
+ fileUrl: options.file_url,
29
+ accessKeyId: options.access_key_id,
30
+ secretAccessKey: options.secret_access_key,
31
+ region: options.region ?? DEFAULT_TIGRIS_REGION,
32
+ bucket: options.bucket,
33
+ prefix: options.prefix ?? "",
34
+ endpoint: options.endpoint ?? DEFAULT_TIGRIS_ENDPOINT,
35
+ cacheControl: options.cache_control ?? "public, max-age=31536000",
36
+ downloadFileDuration: options.download_file_duration ?? 60 * 60,
37
+ additionalClientConfig: options.additional_client_config,
38
+ };
39
+ this.logger_ = logger;
40
+ this.client_ = this.getClient();
41
+ }
42
+ getClient() {
43
+ const config = {
44
+ credentials: {
45
+ accessKeyId: this.config_.accessKeyId,
46
+ secretAccessKey: this.config_.secretAccessKey,
47
+ },
48
+ region: this.config_.region,
49
+ endpoint: this.config_.endpoint,
50
+ forcePathStyle: true,
51
+ };
52
+ Object.assign(config, this.config_.additionalClientConfig ?? {});
53
+ return new client_s3_1.S3Client(config);
54
+ }
55
+ async upload(file) {
56
+ if (!file) {
57
+ throw new utils_1.EtoError(utils_1.EtoError.Types.INVALID_DATA, "No file provided");
58
+ }
59
+ if (!file.filename) {
60
+ throw new utils_1.EtoError(utils_1.EtoError.Types.INVALID_DATA, "No filename provided");
61
+ }
62
+ const parsedFilename = path_1.default.parse(file.filename);
63
+ const fileKey = `${this.config_.prefix}${parsedFilename.name}-${(0, ulid_1.ulid)()}${parsedFilename.ext}`;
64
+ const content = Buffer.from(file.content, "binary");
65
+ const command = new client_s3_1.PutObjectCommand({
66
+ ACL: file.access === "public" ? "public-read" : "private",
67
+ Bucket: this.config_.bucket,
68
+ Body: content,
69
+ Key: fileKey,
70
+ ContentType: file.mimeType,
71
+ CacheControl: this.config_.cacheControl,
72
+ Metadata: {
73
+ "x-amz-meta-original-filename": file.filename,
74
+ },
75
+ });
76
+ try {
77
+ await this.client_.send(command);
78
+ }
79
+ catch (e) {
80
+ this.logger_.error(e);
81
+ throw e;
82
+ }
83
+ return {
84
+ url: `${this.config_.fileUrl}/${fileKey}`,
85
+ key: fileKey,
86
+ };
87
+ }
88
+ async delete(files) {
89
+ try {
90
+ if (Array.isArray(files)) {
91
+ await this.client_.send(new client_s3_1.DeleteObjectsCommand({
92
+ Bucket: this.config_.bucket,
93
+ Delete: {
94
+ Objects: files.map((file) => ({
95
+ Key: file.fileKey,
96
+ })),
97
+ Quiet: true,
98
+ },
99
+ }));
100
+ }
101
+ else {
102
+ await this.client_.send(new client_s3_1.DeleteObjectCommand({
103
+ Bucket: this.config_.bucket,
104
+ Key: files.fileKey,
105
+ }));
106
+ }
107
+ }
108
+ catch (e) {
109
+ this.logger_.error(e);
110
+ }
111
+ }
112
+ async getPresignedDownloadUrl(fileData) {
113
+ const command = new client_s3_1.GetObjectCommand({
114
+ Bucket: this.config_.bucket,
115
+ Key: fileData.fileKey,
116
+ });
117
+ return (0, s3_request_presigner_1.getSignedUrl)(this.client_, command, {
118
+ expiresIn: this.config_.downloadFileDuration,
119
+ });
120
+ }
121
+ async getPresignedUploadUrl(fileData) {
122
+ if (!fileData?.filename) {
123
+ throw new utils_1.EtoError(utils_1.EtoError.Types.INVALID_DATA, "No filename provided");
124
+ }
125
+ const fileKey = `${this.config_.prefix}${fileData.filename}`;
126
+ let acl;
127
+ if (fileData.access) {
128
+ acl = fileData.access === "public" ? "public-read" : "private";
129
+ }
130
+ const command = new client_s3_1.PutObjectCommand({
131
+ Bucket: this.config_.bucket,
132
+ ContentType: fileData.mimeType,
133
+ ACL: acl,
134
+ Key: fileKey,
135
+ });
136
+ const signedUrl = await (0, s3_request_presigner_1.getSignedUrl)(this.client_, command, {
137
+ expiresIn: fileData.expiresIn ?? DEFAULT_UPLOAD_EXPIRATION_DURATION_SECONDS,
138
+ });
139
+ return {
140
+ url: signedUrl,
141
+ key: fileKey,
142
+ };
143
+ }
144
+ async getDownloadStream(file) {
145
+ if (!file?.fileKey) {
146
+ throw new utils_1.EtoError(utils_1.EtoError.Types.INVALID_DATA, "No fileKey provided");
147
+ }
148
+ const response = await this.client_.send(new client_s3_1.GetObjectCommand({
149
+ Key: file.fileKey,
150
+ Bucket: this.config_.bucket,
151
+ }));
152
+ return response.Body;
153
+ }
154
+ async getAsBuffer(file) {
155
+ if (!file?.fileKey) {
156
+ throw new utils_1.EtoError(utils_1.EtoError.Types.INVALID_DATA, "No fileKey provided");
157
+ }
158
+ const response = await this.client_.send(new client_s3_1.GetObjectCommand({
159
+ Key: file.fileKey,
160
+ Bucket: this.config_.bucket,
161
+ }));
162
+ return Buffer.from(await response.Body.transformToByteArray());
163
+ }
164
+ }
165
+ exports.TigrisFileService = TigrisFileService;
166
+ TigrisFileService.identifier = "tigris";
167
+ //# sourceMappingURL=tigris-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tigris-file.js","sourceRoot":"","sources":["../../src/services/tigris-file.ts"],"names":[],"mappings":";;;;;;AAAA,kDAQ2B;AAC3B,wEAA4D;AAM5D,kDAG+B;AAC/B,gDAAuB;AAEvB,+BAA2B;AAmB3B,MAAM,0CAA0C,GAAG,EAAE,GAAG,EAAE,CAAA;AAC1D,MAAM,uBAAuB,GAAG,gCAAgC,CAAA;AAChE,MAAM,qBAAqB,GAAG,MAAM,CAAA;AAEpC,MAAa,iBAAkB,SAAQ,mCAA2B;IAOhE,YAAY,EAAE,MAAM,EAAwB,EAAE,OAAiC;QAC7E,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,OAAO,EAAE,aAAa,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,CAAC;YAC3D,MAAM,IAAI,gBAAQ,CAChB,gBAAQ,CAAC,KAAK,CAAC,YAAY,EAC3B,yDAAyD,CAC1D,CAAA;QACH,CAAC;QAED,IAAI,CAAC,OAAO,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EAAE,qBAAqB,CAAC,CAAA;QACxE,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CACtC,IAAI,4BAAgB,CAAC;YACnB,GAAG,EAAE,IAAI,CAAC,OAAO;YACjB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;SAC5B,CAAC,CACH,CAAA;QAED,OAAO,QAAQ,CAAC,IAAgB,CAAA;IAClC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAkC;QAClD,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC;YACnB,MAAM,IAAI,gBAAQ,CAAC,gBAAQ,CAAC,KAAK,CAAC,YAAY,EAAE,qBAAqB,CAAC,CAAA;QACxE,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CACtC,IAAI,4BAAgB,CAAC;YACnB,GAAG,EAAE,IAAI,CAAC,OAAO;YACjB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;SAC5B,CAAC,CACH,CAAA;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,QAAQ,CAAC,IAAK,CAAC,oBAAoB,EAAE,CAAC,CAAA;IACjE,CAAC;;AAjNH,8CAkNC;AAjNQ,4BAAU,GAAG,QAAQ,CAAA"}
@@ -0,0 +1 @@
1
+ {"root":["../src/index.ts","../src/services/tigris-file.ts"],"version":"5.8.3"}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@etohq/file-tigris",
3
+ "version": "1.5.2",
4
+ "description": "Tigris object storage file provider for Eto",
5
+ "main": "dist/index.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/etohq/eto",
9
+ "directory": "packages/core/modules/providers/file-tigris"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "!dist/**/__tests__",
14
+ "!dist/**/__mocks__",
15
+ "!dist/**/__fixtures__"
16
+ ],
17
+ "engines": {
18
+ "node": ">=20"
19
+ },
20
+ "author": "Eto",
21
+ "license": "MIT",
22
+ "devDependencies": {
23
+ "@swc/core": "1.7.28",
24
+ "@swc/jest": "0.2.36",
25
+ "axios": "1.7.7",
26
+ "jest": "29.7.0",
27
+ "rimraf": "5.0.2",
28
+ "tsc-alias": "1.8.6",
29
+ "typescript": "5.8.3",
30
+ "@etohq/framework": "1.5.2"
31
+ },
32
+ "dependencies": {
33
+ "@aws-sdk/client-s3": "3.556.0",
34
+ "@aws-sdk/s3-request-presigner": "3.556.0",
35
+ "awilix": "8.0.1",
36
+ "ulid": "2.3.0"
37
+ },
38
+ "peerDependencies": {
39
+ "@etohq/framework": "1.5.2"
40
+ },
41
+ "keywords": [
42
+ "eto-plugin",
43
+ "eto-plugin-tigris"
44
+ ],
45
+ "scripts": {
46
+ "test": "jest --passWithNoTests src",
47
+ "test:integration": "jest --forceExit -- integration-tests/__tests__/*.spec.ts",
48
+ "build": "rimraf dist && tsc --build && npm run resolve:aliases",
49
+ "resolve:aliases": "tsc --showConfig -p tsconfig.json > tsconfig.resolved.json && tsc-alias -p tsconfig.resolved.json && rimraf tsconfig.resolved.json",
50
+ "watch": "tsc --watch"
51
+ }
52
+ }