@wild-framework/storage 0.1.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 +26 -0
- package/dist/driver.d.ts +19 -0
- package/dist/driver.d.ts.map +1 -0
- package/dist/driver.js +2 -0
- package/dist/driver.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/local-driver.d.ts +17 -0
- package/dist/local-driver.d.ts.map +1 -0
- package/dist/local-driver.js +54 -0
- package/dist/local-driver.js.map +1 -0
- package/dist/provider.d.ts +12 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +18 -0
- package/dist/provider.js.map +1 -0
- package/dist/storage.d.ts +22 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +33 -0
- package/dist/storage.js.map +1 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Wild Framework 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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @wild-framework/storage
|
|
2
|
+
|
|
3
|
+
File storage abstraction for [Wild Framework](https://github.com/your-org/wild-framework).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @wild-framework/storage
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Storage } from "@wild-framework/storage";
|
|
15
|
+
|
|
16
|
+
await storage.put("avatars/photo.jpg", buffer);
|
|
17
|
+
const contents = await storage.get("avatars/photo.jpg");
|
|
18
|
+
await storage.exists("avatars/photo.jpg");
|
|
19
|
+
await storage.delete("avatars/photo.jpg");
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Ships with a local filesystem driver. Implement `StorageDriver` for S3/GCS.
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
MIT
|
package/dist/driver.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage driver contract.
|
|
3
|
+
*
|
|
4
|
+
* Implement this to add backends (Local, S3, GCS, etc.).
|
|
5
|
+
* App code depends on `Storage`, never on a driver directly.
|
|
6
|
+
*/
|
|
7
|
+
export interface StorageDriver {
|
|
8
|
+
/** Store a file at the given path. Returns the stored path. */
|
|
9
|
+
put(path: string, contents: Buffer | string): Promise<string>;
|
|
10
|
+
/** Read a file's contents. */
|
|
11
|
+
get(path: string): Promise<Buffer>;
|
|
12
|
+
/** Delete a file. */
|
|
13
|
+
delete(path: string): Promise<void>;
|
|
14
|
+
/** Check whether a file exists. */
|
|
15
|
+
exists(path: string): Promise<boolean>;
|
|
16
|
+
/** Get a public URL for a file. */
|
|
17
|
+
url(path: string): Promise<string>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../src/driver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC1B,+DAA+D;IAC/D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9D,8BAA8B;IAC9B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnC,qBAAqB;IACrB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,mCAAmC;IACnC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,mCAAmC;IACnC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACtC"}
|
package/dist/driver.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../src/driver.ts"],"names":[],"mappings":""}
|
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,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StorageDriver } from "./driver.js";
|
|
2
|
+
/**
|
|
3
|
+
* Filesystem-backed storage driver.
|
|
4
|
+
*
|
|
5
|
+
* Files are stored under a base directory on the local filesystem.
|
|
6
|
+
*/
|
|
7
|
+
export declare class LocalStorageDriver implements StorageDriver {
|
|
8
|
+
private basePath;
|
|
9
|
+
constructor(basePath: string);
|
|
10
|
+
put(filePath: string, contents: Buffer | string): Promise<string>;
|
|
11
|
+
get(filePath: string): Promise<Buffer>;
|
|
12
|
+
delete(filePath: string): Promise<void>;
|
|
13
|
+
exists(filePath: string): Promise<boolean>;
|
|
14
|
+
url(filePath: string): Promise<string>;
|
|
15
|
+
private resolve;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=local-driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-driver.d.ts","sourceRoot":"","sources":["../src/local-driver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,kBAAmB,YAAW,aAAa;IACxC,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,MAAM;IAM9B,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAOjE,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKtC,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKvC,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAU1C,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK5C,OAAO,CAAC,OAAO;CAWlB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { promises as fs } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* Filesystem-backed storage driver.
|
|
5
|
+
*
|
|
6
|
+
* Files are stored under a base directory on the local filesystem.
|
|
7
|
+
*/
|
|
8
|
+
export class LocalStorageDriver {
|
|
9
|
+
basePath;
|
|
10
|
+
constructor(basePath) {
|
|
11
|
+
this.basePath = basePath;
|
|
12
|
+
if (!basePath) {
|
|
13
|
+
throw new Error("LocalStorageDriver requires a base path.");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
async put(filePath, contents) {
|
|
17
|
+
const absolute = this.resolve(filePath);
|
|
18
|
+
await fs.mkdir(path.dirname(absolute), { recursive: true });
|
|
19
|
+
await fs.writeFile(absolute, contents);
|
|
20
|
+
return filePath;
|
|
21
|
+
}
|
|
22
|
+
async get(filePath) {
|
|
23
|
+
const absolute = this.resolve(filePath);
|
|
24
|
+
return fs.readFile(absolute);
|
|
25
|
+
}
|
|
26
|
+
async delete(filePath) {
|
|
27
|
+
const absolute = this.resolve(filePath);
|
|
28
|
+
await fs.unlink(absolute);
|
|
29
|
+
}
|
|
30
|
+
async exists(filePath) {
|
|
31
|
+
const absolute = this.resolve(filePath);
|
|
32
|
+
try {
|
|
33
|
+
await fs.access(absolute);
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async url(filePath) {
|
|
41
|
+
// Local files don't have a public URL — return the path.
|
|
42
|
+
return filePath;
|
|
43
|
+
}
|
|
44
|
+
resolve(filePath) {
|
|
45
|
+
const base = path.resolve(this.basePath);
|
|
46
|
+
const resolved = path.resolve(base, filePath);
|
|
47
|
+
// Prevent path traversal outside the base directory
|
|
48
|
+
if (resolved !== base && !resolved.startsWith(base + path.sep)) {
|
|
49
|
+
throw new Error(`Path "${filePath}" escapes the storage base directory.`);
|
|
50
|
+
}
|
|
51
|
+
return resolved;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=local-driver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-driver.js","sourceRoot":"","sources":["../src/local-driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B;;;;GAIG;AACH,MAAM,OAAO,kBAAkB;IACP;IAApB,YAAoB,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAChC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChE,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,QAAyB;QACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACxC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACvC,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB;QACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACxC,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACxC,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,CAAC;YACD,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1B,OAAO,IAAI,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACL,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB;QACtB,yDAAyD;QACzD,OAAO,QAAQ,CAAC;IACpB,CAAC;IAEO,OAAO,CAAC,QAAgB;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAE9C,oDAAoD;QACpD,IAAI,QAAQ,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,SAAS,QAAQ,uCAAuC,CAAC,CAAC;QAC9E,CAAC;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Provider, Application } from "@wild-framework/core";
|
|
2
|
+
/**
|
|
3
|
+
* Registers the file storage with the application.
|
|
4
|
+
*
|
|
5
|
+
* Binds a `Storage` backed by the local filesystem driver.
|
|
6
|
+
* Swap drivers by implementing `StorageDriver` and binding a new
|
|
7
|
+
* `Storage` — app code never changes.
|
|
8
|
+
*/
|
|
9
|
+
export declare class StorageProvider implements Provider {
|
|
10
|
+
register(app: Application): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKlE;;;;;;GAMG;AACH,qBAAa,eAAgB,YAAW,QAAQ;IAC5C,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI;CAKnC"}
|
package/dist/provider.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Container } from "@wild-framework/container";
|
|
2
|
+
import { Storage } from "./storage.js";
|
|
3
|
+
import { LocalStorageDriver } from "./local-driver.js";
|
|
4
|
+
/**
|
|
5
|
+
* Registers the file storage with the application.
|
|
6
|
+
*
|
|
7
|
+
* Binds a `Storage` backed by the local filesystem driver.
|
|
8
|
+
* Swap drivers by implementing `StorageDriver` and binding a new
|
|
9
|
+
* `Storage` — app code never changes.
|
|
10
|
+
*/
|
|
11
|
+
export class StorageProvider {
|
|
12
|
+
register(app) {
|
|
13
|
+
const container = app.resolve(Container);
|
|
14
|
+
const storage = new Storage(new LocalStorageDriver("./storage"));
|
|
15
|
+
container.singleton(Storage, () => storage);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,OAAO,eAAe;IACxB,QAAQ,CAAC,GAAgB;QACrB,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC;QACjE,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;CACJ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StorageDriver } from "./driver.js";
|
|
2
|
+
/**
|
|
3
|
+
* File storage facade.
|
|
4
|
+
*
|
|
5
|
+
* Wraps a `StorageDriver` and exposes a consistent API.
|
|
6
|
+
* Resolved from the container: `app.resolve(Storage)`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Storage {
|
|
9
|
+
private driver;
|
|
10
|
+
constructor(driver: StorageDriver);
|
|
11
|
+
/** Store a file at the given path. Returns the stored path. */
|
|
12
|
+
put(path: string, contents: Buffer | string): Promise<string>;
|
|
13
|
+
/** Read a file's contents. */
|
|
14
|
+
get(path: string): Promise<Buffer>;
|
|
15
|
+
/** Delete a file. */
|
|
16
|
+
delete(path: string): Promise<void>;
|
|
17
|
+
/** Check whether a file exists. */
|
|
18
|
+
exists(path: string): Promise<boolean>;
|
|
19
|
+
/** Get a public URL for a file. */
|
|
20
|
+
url(path: string): Promise<string>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;GAKG;AACH,qBAAa,OAAO;IACJ,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEzC,+DAA+D;IAC/D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI7D,8BAA8B;IAC9B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlC,qBAAqB;IACrB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInC,mCAAmC;IACnC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAItC,mCAAmC;IACnC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAGrC"}
|
package/dist/storage.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File storage facade.
|
|
3
|
+
*
|
|
4
|
+
* Wraps a `StorageDriver` and exposes a consistent API.
|
|
5
|
+
* Resolved from the container: `app.resolve(Storage)`.
|
|
6
|
+
*/
|
|
7
|
+
export class Storage {
|
|
8
|
+
driver;
|
|
9
|
+
constructor(driver) {
|
|
10
|
+
this.driver = driver;
|
|
11
|
+
}
|
|
12
|
+
/** Store a file at the given path. Returns the stored path. */
|
|
13
|
+
put(path, contents) {
|
|
14
|
+
return this.driver.put(path, contents);
|
|
15
|
+
}
|
|
16
|
+
/** Read a file's contents. */
|
|
17
|
+
get(path) {
|
|
18
|
+
return this.driver.get(path);
|
|
19
|
+
}
|
|
20
|
+
/** Delete a file. */
|
|
21
|
+
delete(path) {
|
|
22
|
+
return this.driver.delete(path);
|
|
23
|
+
}
|
|
24
|
+
/** Check whether a file exists. */
|
|
25
|
+
exists(path) {
|
|
26
|
+
return this.driver.exists(path);
|
|
27
|
+
}
|
|
28
|
+
/** Get a public URL for a file. */
|
|
29
|
+
url(path) {
|
|
30
|
+
return this.driver.url(path);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,OAAO,OAAO;IACI;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C,+DAA+D;IAC/D,GAAG,CAAC,IAAY,EAAE,QAAyB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,8BAA8B;IAC9B,GAAG,CAAC,IAAY;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,qBAAqB;IACrB,MAAM,CAAC,IAAY;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,mCAAmC;IACnC,MAAM,CAAC,IAAY;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,mCAAmC;IACnC,GAAG,CAAC,IAAY;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CACJ"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wild-framework/storage",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "Sphah",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/KhandaSoftware/wild-framework.git"
|
|
24
|
+
},
|
|
25
|
+
"description": "File storage abstraction for Wild Framework.",
|
|
26
|
+
"keywords": [
|
|
27
|
+
"wild",
|
|
28
|
+
"framework",
|
|
29
|
+
"storage",
|
|
30
|
+
"files",
|
|
31
|
+
"s3"
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@wild-framework/core": "0.1.0",
|
|
35
|
+
"@wild-framework/container": "0.1.0"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc",
|
|
39
|
+
"clean": "rm -rf dist",
|
|
40
|
+
"test": "vitest run"
|
|
41
|
+
}
|
|
42
|
+
}
|