@orthacms/media-provider-s3 0.0.0-reserve.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/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/lib/s3-storage-provider.d.ts +15 -0
- package/dist/lib/s3-storage-provider.d.ts.map +1 -0
- package/dist/lib/s3-storage-provider.js +37 -0
- package/package.json +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ortha CMS contributors
|
|
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
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createS3StorageProvider = void 0;
|
|
4
|
+
var s3_storage_provider_1 = require("./lib/s3-storage-provider");
|
|
5
|
+
Object.defineProperty(exports, "createS3StorageProvider", { enumerable: true, get: function () { return s3_storage_provider_1.createS3StorageProvider; } });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StorageProvider } from '@orthacms/media-server';
|
|
2
|
+
/** AWS S3 provider settings. */
|
|
3
|
+
export interface S3StorageConfig {
|
|
4
|
+
bucket: string;
|
|
5
|
+
region: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Placeholder S3 {@link StorageProvider}. It proves the routing seam
|
|
9
|
+
* end-to-end — the composition root can register it under a name and a resolver
|
|
10
|
+
* can route to it — without an AWS dependency. Every method throws until the
|
|
11
|
+
* real adapter (put/get via the AWS SDK, signed `url`) lands. The signature
|
|
12
|
+
* matches `createLocalStorageProvider`, so switching is a config change.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createS3StorageProvider(config: S3StorageConfig): StorageProvider;
|
|
15
|
+
//# sourceMappingURL=s3-storage-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s3-storage-provider.d.ts","sourceRoot":"","sources":["../../src/lib/s3-storage-provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,wBAAwB,CAAC;AAE5E,gCAAgC;AAChC,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAClB;AAYD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAEnC,MAAM,EAAE,eAAe,GACxB,eAAe,CAiBjB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createS3StorageProvider = createS3StorageProvider;
|
|
4
|
+
/** Raised by every method until the AWS adapter is implemented. */
|
|
5
|
+
class S3NotImplementedError extends Error {
|
|
6
|
+
constructor() {
|
|
7
|
+
super('@orthacms/media-provider-s3 is a stub — the AWS S3 adapter is not implemented yet.');
|
|
8
|
+
this.name = 'S3NotImplementedError';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Placeholder S3 {@link StorageProvider}. It proves the routing seam
|
|
13
|
+
* end-to-end — the composition root can register it under a name and a resolver
|
|
14
|
+
* can route to it — without an AWS dependency. Every method throws until the
|
|
15
|
+
* real adapter (put/get via the AWS SDK, signed `url`) lands. The signature
|
|
16
|
+
* matches `createLocalStorageProvider`, so switching is a config change.
|
|
17
|
+
*/
|
|
18
|
+
function createS3StorageProvider(
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
|
+
config) {
|
|
21
|
+
// Implementations omit their params (the interface allows a narrower
|
|
22
|
+
// signature) — there is nothing to act on until the AWS adapter lands.
|
|
23
|
+
return {
|
|
24
|
+
put() {
|
|
25
|
+
throw new S3NotImplementedError();
|
|
26
|
+
},
|
|
27
|
+
get() {
|
|
28
|
+
throw new S3NotImplementedError();
|
|
29
|
+
},
|
|
30
|
+
remove() {
|
|
31
|
+
throw new S3NotImplementedError();
|
|
32
|
+
},
|
|
33
|
+
url() {
|
|
34
|
+
throw new S3NotImplementedError();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@orthacms/media-provider-s3",
|
|
3
|
+
"version": "0.0.0-reserve.0",
|
|
4
|
+
"description": "@orthacms/media-provider-s3 — part of Ortha CMS.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/ortha-source/ortha-cms/tree/main/packages/media/provider-s3",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/ortha-source/ortha-cms.git",
|
|
10
|
+
"directory": "packages/media/provider-s3"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/ortha-source/ortha-cms/issues"
|
|
14
|
+
},
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@orthacms/media-server": "^0.0.1",
|
|
29
|
+
"tslib": "^2.3.0"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
}
|
|
34
|
+
}
|