@bridgekitux/files 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/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # @bridgekitux/files
2
+
3
+ File storage adapter for BridgeKit-enabled restricted runtimes.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @bridgekitux/client @bridgekitux/files
9
+ ```
10
+
11
+ ## Use
12
+
13
+ ```ts
14
+ import { bridgekit } from '@bridgekitux/client';
15
+ import { createBridgeFileStore } from '@bridgekitux/files';
16
+
17
+ await bridgekit.connect();
18
+ const files = createBridgeFileStore('patient-documents');
19
+ await files.write('uploads/report.txt', 'hello');
20
+ ```
21
+
22
+ File operations are scoped to the approved BridgeKit resource, not the entire host filesystem.
@@ -0,0 +1,3 @@
1
+ import { type BridgeKitClient } from '@bridgekitux/client';
2
+ export declare function createBridgeFileStore(resourceId: string, client?: BridgeKitClient): import("@bridgekitux/client").BridgeFileStore;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtE,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,GAAE,eAA2B,iDAE5F"}
@@ -0,0 +1,5 @@
1
+ import { bridgekit } from '@bridgekitux/client';
2
+ export function createBridgeFileStore(resourceId, client = bridgekit) {
3
+ return client.files(resourceId);
4
+ }
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwB,MAAM,qBAAqB,CAAC;AAEtE,MAAM,UAAU,qBAAqB,CAAC,UAAkB,EAAE,SAA0B,SAAS;IAC3F,OAAO,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAClC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@bridgekitux/files",
3
+ "version": "0.1.0",
4
+ "license": "Apache-2.0",
5
+ "description": "BridgeKit file storage adapter for restricted runtimes.",
6
+ "type": "module",
7
+ "main": "./dist/src/index.js",
8
+ "types": "./dist/src/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/src/index.d.ts",
12
+ "import": "./dist/src/index.js"
13
+ }
14
+ },
15
+ "scripts": {
16
+ "build": "tsc -b",
17
+ "test": "node --test dist/test/*.test.js"
18
+ },
19
+ "dependencies": {
20
+ "@bridgekitux/client": "0.1.0"
21
+ },
22
+ "files": [
23
+ "dist/src",
24
+ "README.md"
25
+ ],
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "keywords": [
30
+ "bridgekit",
31
+ "webcontainer",
32
+ "sandbox",
33
+ "capability",
34
+ "local-agent",
35
+ "browser-ide",
36
+ "files"
37
+ ]
38
+ }