@hot-updater/aws 0.1.5 → 0.2.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/dist/index.cjs +3480 -183
- package/dist/index.d.ts +2 -14
- package/dist/index.js +3434 -157
- package/dist/s3Database.d.ts +6 -0
- package/dist/s3Storage.d.ts +6 -0
- package/dist/utils/readDir.d.ts +1 -0
- package/dist/utils/streamToString.d.ts +1 -0
- package/package.json +7 -5
- package/dist/index.d.cts +0 -14
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type S3ClientConfig } from "@aws-sdk/client-s3";
|
|
2
|
+
import type { BasePluginArgs, DatabasePlugin, DatabasePluginHooks } from "@hot-updater/plugin-core";
|
|
3
|
+
export interface S3DatabaseConfig extends Pick<S3ClientConfig, "credentials" | "region"> {
|
|
4
|
+
bucketName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const s3Database: (config: S3DatabaseConfig, hooks?: DatabasePluginHooks) => (_: BasePluginArgs) => DatabasePlugin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type S3ClientConfig } from "@aws-sdk/client-s3";
|
|
2
|
+
import type { BasePluginArgs, StoragePlugin, StoragePluginHooks } from "@hot-updater/plugin-core";
|
|
3
|
+
export interface S3StorageConfig extends S3ClientConfig {
|
|
4
|
+
bucketName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const s3Storage: (config: S3StorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const readDir: (dir: string) => Promise<string[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const streamToString: (stream: any) => Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/aws",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -20,14 +20,16 @@
|
|
|
20
20
|
"dist",
|
|
21
21
|
"package.json"
|
|
22
22
|
],
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"mime": "^4.0.4"
|
|
25
|
+
},
|
|
23
26
|
"dependencies": {
|
|
24
|
-
"@hot-updater/plugin-core": "0.
|
|
27
|
+
"@hot-updater/plugin-core": "0.2.0",
|
|
25
28
|
"@aws-sdk/client-s3": "^3.685.0",
|
|
26
|
-
"@aws-sdk/lib-storage": "^3.685.0"
|
|
27
|
-
"mime": "^4.0.4"
|
|
29
|
+
"@aws-sdk/lib-storage": "^3.685.0"
|
|
28
30
|
},
|
|
29
31
|
"scripts": {
|
|
30
|
-
"build": "
|
|
32
|
+
"build": "rslib build",
|
|
31
33
|
"test:type": "tsc --noEmit"
|
|
32
34
|
}
|
|
33
35
|
}
|
package/dist/index.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { S3ClientConfig } from '@aws-sdk/client-s3';
|
|
2
|
-
import { DatabasePluginHooks, BasePluginArgs, DatabasePlugin, StoragePluginHooks, StoragePlugin } from '@hot-updater/plugin-core';
|
|
3
|
-
|
|
4
|
-
interface S3DatabaseConfig extends Pick<S3ClientConfig, "credentials" | "region"> {
|
|
5
|
-
bucketName: string;
|
|
6
|
-
}
|
|
7
|
-
declare const s3Database: (config: S3DatabaseConfig, hooks?: DatabasePluginHooks) => (_: BasePluginArgs) => DatabasePlugin;
|
|
8
|
-
|
|
9
|
-
interface S3StorageConfig extends Pick<S3ClientConfig, "credentials" | "region"> {
|
|
10
|
-
bucketName: string;
|
|
11
|
-
}
|
|
12
|
-
declare const s3Storage: (config: S3StorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
|
|
13
|
-
|
|
14
|
-
export { type S3DatabaseConfig, type S3StorageConfig, s3Database, s3Storage };
|