Skip to content

Commit 8e92522

Browse files
committed
refactor
1 parent 79da457 commit 8e92522

3 files changed

Lines changed: 16 additions & 14 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@beekeeperstudio/plugin",
3-
"version": "1.7.1-beta.0",
3+
"version": "1.7.1-beta.1",
44
"description": "A simple TypeScript wrapper to send messages from your Beekeeper Studio plugin to the main app.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/index.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -371,17 +371,19 @@ export const appStorage = {
371371
};
372372

373373
export const workspaceConnectionStorage = {
374-
async getItem<T = unknown>(key: string): Promise<T | null> {
375-
return await request({
376-
name: "workspaceConnectionStorage.getItem",
377-
args: { key },
378-
});
379-
},
380-
async setItem<T = unknown>(key: string, value: T): Promise<void> {
381-
return await request({
382-
name: "workspaceConnectionStorage.setItem",
383-
args: { key, value },
384-
});
374+
connection: {
375+
async getItem<T = unknown>(key: string): Promise<T | null> {
376+
return await request({
377+
name: "cloudStorage.connection.getItem",
378+
args: { key },
379+
});
380+
},
381+
async setItem<T = unknown>(key: string, value: T): Promise<void> {
382+
return await request({
383+
name: "cloudStorage.connection.setItem",
384+
args: { key, value },
385+
});
386+
},
385387
},
386388
// TODO
387389
// async removeItem(key: string): Promise<void> {},

src/internal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,14 @@ export type RequestMap = {
196196
args: void;
197197
return: string;
198198
};
199-
"workspaceConnectionStorage.setItem": {
199+
"cloudStorage.connection.setItem": {
200200
args: {
201201
key: string;
202202
value: any;
203203
};
204204
return: void;
205205
};
206-
"workspaceConnectionStorage.getItem": {
206+
"cloudStorage.connection.getItem": {
207207
args: {
208208
key: string;
209209
};

0 commit comments

Comments
 (0)