@cloud-os/sandbox-app-standard-bridge 20251216.0.3 → 20251216.0.5

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.
@@ -2,14 +2,14 @@ import { ApplicationInfo, DiskInfo, File } from "../../../index";
2
2
  export interface IoBridgePayload {
3
3
  handleDisks: () => Promise<DiskInfo[]>;
4
4
  handleCreateDisk: (name: string, capacity: number, format: string) => Promise<string>;
5
- handleModifyDisk: (id: string, name: string, capacity: number) => Promise<void>;
6
- handleDeleteDisk: (id: string) => Promise<void>;
5
+ handleModifyDisk: (disk: DiskInfo, name: string, capacity: number) => Promise<void>;
6
+ handleDeleteDisk: (disk: DiskInfo) => Promise<void>;
7
7
  handleResolve: (extension: string) => Promise<ApplicationInfo | null>;
8
8
  handleProviders: () => Promise<ApplicationInfo[] | null>;
9
- handleInclude: (provider: ApplicationInfo, prefix: string, key: string) => Promise<boolean>;
10
- handleList: (provider: ApplicationInfo, prefix: string) => Promise<File[]>;
11
- handleRead: (provider: ApplicationInfo, prefix: string, key: string) => Promise<ArrayBuffer | null>;
12
- handleWrite: (provider: ApplicationInfo, prefix: string, key: string, value: ArrayBuffer | null) => Promise<void>;
13
- handleDelete: (provider: ApplicationInfo, refix: string, key: string) => Promise<void>;
14
- handleRename: (provider: ApplicationInfo, prefix: string, key: string, newKey: string) => Promise<void>;
9
+ handleInclude: (disk: DiskInfo, prefix: string, key: string) => Promise<boolean>;
10
+ handleList: (disk: DiskInfo, prefix: string) => Promise<File[]>;
11
+ handleRead: (disk: DiskInfo, prefix: string, key: string) => Promise<ArrayBuffer | null>;
12
+ handleWrite: (disk: DiskInfo, prefix: string, key: string, value: ArrayBuffer | null) => Promise<void>;
13
+ handleDelete: (disk: DiskInfo, prefix: string, key: string) => Promise<void>;
14
+ handleRename: (disk: DiskInfo, prefix: string, key: string, newKey: string) => Promise<void>;
15
15
  }
@@ -5,14 +5,14 @@ export default class IoBridge implements IOEvent {
5
5
  constructor(payload: IoBridgePayload);
6
6
  disks(): Promise<DiskInfo[]>;
7
7
  createDisk(name: string, capacity: number, format: string): Promise<string>;
8
- modifyDisk(id: string, name: string, capacity: number): Promise<void>;
9
- deleteDisk(id: string): Promise<void>;
8
+ modifyDisk(disk: DiskInfo, name: string, capacity: number): Promise<void>;
9
+ deleteDisk(disk: DiskInfo): Promise<void>;
10
10
  providers(): Promise<ApplicationInfo[] | null>;
11
- include(provider: ApplicationInfo, prefix: string, key: string): Promise<boolean>;
12
- list(provider: ApplicationInfo, prefix: string): Promise<File[]>;
13
- read(provider: ApplicationInfo, prefix: string, key: string): Promise<ArrayBuffer | null>;
14
- write(provider: ApplicationInfo, prefix: string, key: string, value: ArrayBuffer | null): Promise<void>;
15
- delete(provider: ApplicationInfo, prefix: string, key: string): Promise<void>;
16
- rename(provider: ApplicationInfo, prefix: string, key: string, newKey: string): Promise<void>;
11
+ include(disk: DiskInfo, prefix: string, key: string): Promise<boolean>;
12
+ list(disk: DiskInfo, prefix: string): Promise<File[]>;
13
+ read(disk: DiskInfo, prefix: string, key: string): Promise<ArrayBuffer | null>;
14
+ write(disk: DiskInfo, prefix: string, key: string, value: ArrayBuffer | null): Promise<void>;
15
+ delete(disk: DiskInfo, prefix: string, key: string): Promise<void>;
16
+ rename(disk: DiskInfo, prefix: string, key: string, newKey: string): Promise<void>;
17
17
  resolve(extension: string): Promise<ApplicationInfo | null>;
18
18
  }
@@ -9,32 +9,32 @@ export default class IoBridge {
9
9
  createDisk(name, capacity, format) {
10
10
  return this.payload.handleCreateDisk(name, capacity, format);
11
11
  }
12
- modifyDisk(id, name, capacity) {
13
- return this.payload.handleModifyDisk(id, name, capacity);
12
+ modifyDisk(disk, name, capacity) {
13
+ return this.payload.handleModifyDisk(disk, name, capacity);
14
14
  }
15
- deleteDisk(id) {
16
- return this.payload.handleDeleteDisk(id);
15
+ deleteDisk(disk) {
16
+ return this.payload.handleDeleteDisk(disk);
17
17
  }
18
18
  providers() {
19
19
  return this.payload.handleProviders();
20
20
  }
21
- include(provider, prefix, key) {
22
- return this.payload.handleInclude(provider, prefix, key);
21
+ include(disk, prefix, key) {
22
+ return this.payload.handleInclude(disk, prefix, key);
23
23
  }
24
- list(provider, prefix) {
25
- return this.payload.handleList(provider, prefix);
24
+ list(disk, prefix) {
25
+ return this.payload.handleList(disk, prefix);
26
26
  }
27
- read(provider, prefix, key) {
28
- return this.payload.handleRead(provider, prefix, key);
27
+ read(disk, prefix, key) {
28
+ return this.payload.handleRead(disk, prefix, key);
29
29
  }
30
- write(provider, prefix, key, value) {
31
- return this.payload.handleWrite(provider, prefix, key, value);
30
+ write(disk, prefix, key, value) {
31
+ return this.payload.handleWrite(disk, prefix, key, value);
32
32
  }
33
- delete(provider, prefix, key) {
34
- return this.payload.handleDelete(provider, prefix, key);
33
+ delete(disk, prefix, key) {
34
+ return this.payload.handleDelete(disk, prefix, key);
35
35
  }
36
- rename(provider, prefix, key, newKey) {
37
- return this.payload.handleRename(provider, prefix, key, newKey);
36
+ rename(disk, prefix, key, newKey) {
37
+ return this.payload.handleRename(disk, prefix, key, newKey);
38
38
  }
39
39
  resolve(extension) {
40
40
  return this.payload.handleResolve(extension);
@@ -2,13 +2,13 @@ import { ApplicationInfo, DiskInfo, File } from "../../index";
2
2
  export interface IOEvent {
3
3
  disks(): Promise<DiskInfo[]>;
4
4
  createDisk(name: string, capacity: number, format: string): Promise<string>;
5
- modifyDisk(id: string, name: string, capacity: number): Promise<void>;
6
- deleteDisk(id: string): Promise<void>;
7
- include(provider: ApplicationInfo, prefix: string, key: string): Promise<boolean>;
8
- list(provider: ApplicationInfo, prefix: string): Promise<File[]>;
9
- read(provider: ApplicationInfo, prefix: string, key: string): Promise<ArrayBuffer | null>;
10
- write(provider: ApplicationInfo, prefix: string, key: string, value: ArrayBuffer | null): Promise<void>;
11
- delete(provider: ApplicationInfo, prefix: string, key: string): Promise<void>;
12
- rename(provider: ApplicationInfo, prefix: string, key: string, newKey: string): Promise<void>;
5
+ modifyDisk(disk: DiskInfo, name: string, capacity: number): Promise<void>;
6
+ deleteDisk(disk: DiskInfo): Promise<void>;
7
+ include(disk: DiskInfo, prefix: string, key: string): Promise<boolean>;
8
+ list(disk: DiskInfo, prefix: string): Promise<File[]>;
9
+ read(disk: DiskInfo, prefix: string, key: string): Promise<ArrayBuffer | null>;
10
+ write(disk: DiskInfo, prefix: string, key: string, value: ArrayBuffer | null): Promise<void>;
11
+ delete(disk: DiskInfo, prefix: string, key: string): Promise<void>;
12
+ rename(disk: DiskInfo, prefix: string, key: string, newKey: string): Promise<void>;
13
13
  resolve(extension: string): Promise<ApplicationInfo | null>;
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-os/sandbox-app-standard-bridge",
3
- "version": "20251216.0.3",
3
+ "version": "20251216.0.5",
4
4
  "description": "",
5
5
  "author": "jack8228@enerqi.tw <jack8228@enerqi.tw>",
6
6
  "main": "dist/index.js",