@nathapp/nestjs-storage 4.5.1 → 4.6.0
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/AGENTS.md +39 -0
- package/CLAUDE.md +37 -0
- package/GEMINI.md +37 -0
- package/codex.md +37 -0
- package/dist/providers/base-storage.d.ts +4 -0
- package/dist/providers/base-storage.js +19 -4
- package/dist/providers/base-storage.js.map +1 -1
- package/dist/providers/s3-base-storage.js +30 -3
- package/dist/providers/s3-base-storage.js.map +1 -1
- package/dist/types/clients.d.ts +1 -0
- package/package.json +2 -2
package/AGENTS.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Agent Instructions
|
|
2
|
+
|
|
3
|
+
This file is auto-generated from `.nax/context.md`.
|
|
4
|
+
DO NOT EDIT MANUALLY — run `nax generate` to regenerate.
|
|
5
|
+
|
|
6
|
+
These instructions apply to all AI coding agents in this project.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Project Metadata
|
|
11
|
+
|
|
12
|
+
> Auto-injected by `nax generate`
|
|
13
|
+
|
|
14
|
+
**Project:** `@nathapp/nestjs-storage`
|
|
15
|
+
|
|
16
|
+
**Language:** TypeScript
|
|
17
|
+
|
|
18
|
+
**Key dependencies:** zod, typescript
|
|
19
|
+
|
|
20
|
+
**Commands:** test: `npm run test` | lint: `npm run lint` | typecheck: `npm run type-check && npm run type-check:test`
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
# @nathapp/nestjs-storage
|
|
24
|
+
|
|
25
|
+
A storage abstraction with local and cloud providers.
|
|
26
|
+
|
|
27
|
+
## Commands
|
|
28
|
+
|
|
29
|
+
Run from `packages/nestjs-storage/`. Replace the example test path with a path relative to this package.
|
|
30
|
+
|
|
31
|
+
| Purpose | Command |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| Build this package | `npm run build` |
|
|
34
|
+
| Run specific test files | `npm test -- --runTestsByPath path/to/file.spec.ts` |
|
|
35
|
+
| Run the default suite | `npm test` |
|
|
36
|
+
| Run the default suite with coverage | `npm run test:cov` |
|
|
37
|
+
| Type-check library source | `npm run type-check` |
|
|
38
|
+
| Type-check test source | `npm run type-check:test` |
|
|
39
|
+
| Lint library and test source | `npm run lint` |
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Project Context
|
|
2
|
+
|
|
3
|
+
This file is auto-generated from `.nax/context.md`.
|
|
4
|
+
DO NOT EDIT MANUALLY — run `nax generate` to regenerate.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Project Metadata
|
|
9
|
+
|
|
10
|
+
> Auto-injected by `nax generate`
|
|
11
|
+
|
|
12
|
+
**Project:** `@nathapp/nestjs-storage`
|
|
13
|
+
|
|
14
|
+
**Language:** TypeScript
|
|
15
|
+
|
|
16
|
+
**Key dependencies:** zod, typescript
|
|
17
|
+
|
|
18
|
+
**Commands:** test: `npm run test` | lint: `npm run lint` | typecheck: `npm run type-check && npm run type-check:test`
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
# @nathapp/nestjs-storage
|
|
22
|
+
|
|
23
|
+
A storage abstraction with local and cloud providers.
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
Run from `packages/nestjs-storage/`. Replace the example test path with a path relative to this package.
|
|
28
|
+
|
|
29
|
+
| Purpose | Command |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Build this package | `npm run build` |
|
|
32
|
+
| Run specific test files | `npm test -- --runTestsByPath path/to/file.spec.ts` |
|
|
33
|
+
| Run the default suite | `npm test` |
|
|
34
|
+
| Run the default suite with coverage | `npm run test:cov` |
|
|
35
|
+
| Type-check library source | `npm run type-check` |
|
|
36
|
+
| Type-check test source | `npm run type-check:test` |
|
|
37
|
+
| Lint library and test source | `npm run lint` |
|
package/GEMINI.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Gemini CLI Context
|
|
2
|
+
|
|
3
|
+
This file is auto-generated from `.nax/context.md`.
|
|
4
|
+
DO NOT EDIT MANUALLY — run `nax generate` to regenerate.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Project Metadata
|
|
9
|
+
|
|
10
|
+
> Auto-injected by `nax generate`
|
|
11
|
+
|
|
12
|
+
**Project:** `@nathapp/nestjs-storage`
|
|
13
|
+
|
|
14
|
+
**Language:** TypeScript
|
|
15
|
+
|
|
16
|
+
**Key dependencies:** zod, typescript
|
|
17
|
+
|
|
18
|
+
**Commands:** test: `npm run test` | lint: `npm run lint` | typecheck: `npm run type-check && npm run type-check:test`
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
# @nathapp/nestjs-storage
|
|
22
|
+
|
|
23
|
+
A storage abstraction with local and cloud providers.
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
Run from `packages/nestjs-storage/`. Replace the example test path with a path relative to this package.
|
|
28
|
+
|
|
29
|
+
| Purpose | Command |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Build this package | `npm run build` |
|
|
32
|
+
| Run specific test files | `npm test -- --runTestsByPath path/to/file.spec.ts` |
|
|
33
|
+
| Run the default suite | `npm test` |
|
|
34
|
+
| Run the default suite with coverage | `npm run test:cov` |
|
|
35
|
+
| Type-check library source | `npm run type-check` |
|
|
36
|
+
| Type-check test source | `npm run type-check:test` |
|
|
37
|
+
| Lint library and test source | `npm run lint` |
|
package/codex.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Codex Instructions
|
|
2
|
+
|
|
3
|
+
This file is auto-generated from `.nax/context.md`.
|
|
4
|
+
DO NOT EDIT MANUALLY — run `nax generate` to regenerate.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Project Metadata
|
|
9
|
+
|
|
10
|
+
> Auto-injected by `nax generate`
|
|
11
|
+
|
|
12
|
+
**Project:** `@nathapp/nestjs-storage`
|
|
13
|
+
|
|
14
|
+
**Language:** TypeScript
|
|
15
|
+
|
|
16
|
+
**Key dependencies:** zod, typescript
|
|
17
|
+
|
|
18
|
+
**Commands:** test: `npm run test` | lint: `npm run lint` | typecheck: `npm run type-check && npm run type-check:test`
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
# @nathapp/nestjs-storage
|
|
22
|
+
|
|
23
|
+
A storage abstraction with local and cloud providers.
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
Run from `packages/nestjs-storage/`. Replace the example test path with a path relative to this package.
|
|
28
|
+
|
|
29
|
+
| Purpose | Command |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Build this package | `npm run build` |
|
|
32
|
+
| Run specific test files | `npm test -- --runTestsByPath path/to/file.spec.ts` |
|
|
33
|
+
| Run the default suite | `npm test` |
|
|
34
|
+
| Run the default suite with coverage | `npm run test:cov` |
|
|
35
|
+
| Type-check library source | `npm run type-check` |
|
|
36
|
+
| Type-check test source | `npm run type-check:test` |
|
|
37
|
+
| Lint library and test source | `npm run lint` |
|
|
@@ -17,6 +17,10 @@ export declare abstract class BaseStorage {
|
|
|
17
17
|
abstract getSignedUrl(fileId: string, expires?: number): Promise<string>;
|
|
18
18
|
static supportsSignedUrl(storage: BaseStorage): storage is BaseStorage & ISignedUrlCapable;
|
|
19
19
|
closeClient(): Promise<void>;
|
|
20
|
+
protected parseRangeSpec(range: string): {
|
|
21
|
+
spec: string;
|
|
22
|
+
match: RegExpMatchArray;
|
|
23
|
+
};
|
|
20
24
|
protected buildRange(range: string, file: IFile): {
|
|
21
25
|
start: number;
|
|
22
26
|
end: number;
|
|
@@ -15,13 +15,28 @@ class BaseStorage {
|
|
|
15
15
|
}
|
|
16
16
|
async closeClient() {
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
const
|
|
18
|
+
parseRangeSpec(range) {
|
|
19
|
+
const trimmed = range.trim();
|
|
20
|
+
const spec = trimmed.replace(/^bytes=/, '').trim();
|
|
20
21
|
if (spec.includes(','))
|
|
21
22
|
throw new invalid_range_error_1.InvalidRangeError(`Multi-range requests are not supported: "${range}"`);
|
|
22
|
-
const
|
|
23
|
-
if (!
|
|
23
|
+
const match = spec.match(/^(\d*)-(\d*)$/);
|
|
24
|
+
if (!match || (match[1] === '' && match[2] === ''))
|
|
24
25
|
throw new invalid_range_error_1.InvalidRangeError(`Malformed range: "${range}"`);
|
|
26
|
+
if (match[1] === '' && parseInt(match[2], 10) <= 0) {
|
|
27
|
+
throw new invalid_range_error_1.InvalidRangeError(`Invalid suffix range: "${range}"`);
|
|
28
|
+
}
|
|
29
|
+
if (match[1] !== '' && match[2] !== '') {
|
|
30
|
+
const start = match[1].replace(/^0+/, '') || '0';
|
|
31
|
+
const end = match[2].replace(/^0+/, '') || '0';
|
|
32
|
+
if (start.length > end.length || (start.length === end.length && start > end)) {
|
|
33
|
+
throw new invalid_range_error_1.InvalidRangeError(`Reversed range: "${range}"`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return { spec, match };
|
|
37
|
+
}
|
|
38
|
+
buildRange(range, file) {
|
|
39
|
+
const { match: m } = this.parseRangeSpec(range);
|
|
25
40
|
let start;
|
|
26
41
|
let end;
|
|
27
42
|
if (m[1] === '') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-storage.js","sourceRoot":"","sources":["../../lib/providers/base-storage.ts"],"names":[],"mappings":";;;AAGA,0DAAyF;AACzF,uEAAkE;AAMlE,MAAsB,WAAW;IAC/B,YAAyC,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAK/D,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IA2FD,MAAM,CAAC,iBAAiB,CAAC,OAAoB;QAC3C,OAAO,cAAc,IAAI,OAAO,IAAI,OAAQ,OAAe,CAAC,YAAY,KAAK,UAAU,CAAC;IAC1F,CAAC;IASD,KAAK,CA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C;IACjB,CAAC;CACF;AA1LD,kCA0LC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.S3BaseStorage = void 0;
|
|
4
4
|
const nestjs_common_1 = require("@nathapp/nestjs-common");
|
|
5
5
|
const base_storage_1 = require("./base-storage");
|
|
6
|
+
const invalid_range_error_1 = require("../errors/invalid-range.error");
|
|
6
7
|
const common_1 = require("@nestjs/common");
|
|
7
8
|
class S3BaseStorage extends base_storage_1.BaseStorage {
|
|
8
9
|
constructor({ provider, options, }) {
|
|
@@ -115,17 +116,43 @@ class S3BaseStorage extends base_storage_1.BaseStorage {
|
|
|
115
116
|
}), { expiresIn: this.resolveSignedUrlExpires(expires) });
|
|
116
117
|
}
|
|
117
118
|
async streamFile(fileId, range) {
|
|
119
|
+
const { spec } = this.parseRangeSpec(range);
|
|
120
|
+
const normalizedRange = `bytes=${spec}`;
|
|
118
121
|
const response = await this.storage.send(new this.s3.GetObjectCommand({
|
|
119
122
|
Bucket: this.bucket,
|
|
120
123
|
Key: fileId,
|
|
121
|
-
Range:
|
|
124
|
+
Range: normalizedRange,
|
|
122
125
|
}));
|
|
126
|
+
const contentRange = response.ContentRange;
|
|
127
|
+
const derivedLength = contentRange === null || contentRange === void 0 ? void 0 : contentRange.match(/^bytes (\d+)-(\d+)\/(?:\d+|\*)$/);
|
|
128
|
+
const derivedLengthText = derivedLength && BigInt(derivedLength[2]) >= BigInt(derivedLength[1])
|
|
129
|
+
? (BigInt(derivedLength[2]) - BigInt(derivedLength[1]) + BigInt(1)).toString()
|
|
130
|
+
: null;
|
|
131
|
+
const contentLength = response.ContentLength !== undefined
|
|
132
|
+
? String(response.ContentLength)
|
|
133
|
+
: derivedLengthText !== null && derivedLengthText !== void 0 ? derivedLengthText : '0';
|
|
134
|
+
const size = Number(contentLength);
|
|
135
|
+
if (!contentRange && response.ContentLength === 0) {
|
|
136
|
+
throw new invalid_range_error_1.InvalidRangeError(`Unsatisfiable range: "${range}" for "${fileId}" — the provider answered with an empty body (Content-Length 0)`);
|
|
137
|
+
}
|
|
123
138
|
const file = this.parseFile(fileId, {
|
|
124
|
-
ContentLength:
|
|
139
|
+
ContentLength: size,
|
|
125
140
|
ContentType: response.ContentType,
|
|
126
141
|
LastModified: response.LastModified,
|
|
127
142
|
});
|
|
128
|
-
const
|
|
143
|
+
const headers = contentRange
|
|
144
|
+
? {
|
|
145
|
+
contentType: file.mimeType || '',
|
|
146
|
+
contentLength,
|
|
147
|
+
contentRange,
|
|
148
|
+
contentDisposition: 'attachment',
|
|
149
|
+
}
|
|
150
|
+
: {
|
|
151
|
+
contentType: file.mimeType || '',
|
|
152
|
+
contentLength,
|
|
153
|
+
contentRange: `bytes 0-${Math.max(0, size - 1)}/${size}`,
|
|
154
|
+
contentDisposition: 'attachment',
|
|
155
|
+
};
|
|
129
156
|
return {
|
|
130
157
|
stream: response.Body,
|
|
131
158
|
headers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"s3-base-storage.js","sourceRoot":"","sources":["../../lib/providers/s3-base-storage.ts"],"names":[],"mappings":";;;AACA,0DAAqD;AAErD,iDAA6C;
|
|
1
|
+
{"version":3,"file":"s3-base-storage.js","sourceRoot":"","sources":["../../lib/providers/s3-base-storage.ts"],"names":[],"mappings":";;;AACA,0DAAqD;AAErD,iDAA6C;AAC7C,uEAAkE;AAKlE,2CAAwC;AAExC,MAAa,aAAc,SAAQ,0BAAW;IAQ5C,YAAY,EACV,QAAQ,EACR,OAAO,GAIR;;QACC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAdD,WAAM,GAAG,IAAI,eAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAgBvD,IAAI,CAAC,EAAE,GAAG,IAAA,2BAAW,EAAC,oBAAoB,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;QAErG,IAAI,CAAC,SAAS,GAAG,IAA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UAAU,EAAE,IAAI,CAAC,YAAY,IAAI,IAAI,IAAI,EAAE;SAC5C,CAAC;IACJ,CAAC;CACF;AA9PD,sCA8PC"}
|
package/dist/types/clients.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nathapp/nestjs-storage",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Nestjs Storage Implementation",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rimraf dist/ .turbo/",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@nathapp/common": "^0.1.14",
|
|
40
|
-
"@nathapp/nestjs-common": "^4.
|
|
40
|
+
"@nathapp/nestjs-common": "^4.6.0",
|
|
41
41
|
"sharp": "^0.35.5",
|
|
42
42
|
"zod": "^4.6.7"
|
|
43
43
|
},
|