Compare commits
1 commit
main
...
alex/stora
Author | SHA1 | Date | |
---|---|---|---|
|
027a4a053c |
3 changed files with 36 additions and 19 deletions
14
package.json
14
package.json
|
@ -164,6 +164,11 @@
|
||||||
"command": "vscode-appwrite.refreshStorage",
|
"command": "vscode-appwrite.refreshStorage",
|
||||||
"title": "Refresh storage",
|
"title": "Refresh storage",
|
||||||
"icon": "$(refresh)"
|
"icon": "$(refresh)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "vscode-appwrite.openStorageDocumentation",
|
||||||
|
"title": "Open storage documentation",
|
||||||
|
"icon": "$(book)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"views": {
|
"views": {
|
||||||
|
@ -180,10 +185,6 @@
|
||||||
"id": "Storage",
|
"id": "Storage",
|
||||||
"name": "Storage"
|
"name": "Storage"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "Functions",
|
|
||||||
"name": "Functions"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "Health",
|
"id": "Health",
|
||||||
"name": "Health"
|
"name": "Health"
|
||||||
|
@ -242,6 +243,11 @@
|
||||||
"command": "vscode-appwrite.refreshStorage",
|
"command": "vscode-appwrite.refreshStorage",
|
||||||
"when": "view == Storage",
|
"when": "view == Storage",
|
||||||
"group": "navigation"
|
"group": "navigation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "vscode-appwrite.openStorageDocumentation",
|
||||||
|
"when": "view == Storage",
|
||||||
|
"group": "navigation"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"view/item/context": [
|
"view/item/context": [
|
||||||
|
|
|
@ -4,7 +4,8 @@ const documentationLinks = {
|
||||||
home: 'https://appwrite.io/docs',
|
home: 'https://appwrite.io/docs',
|
||||||
users: 'https://appwrite.io/docs/server/users',
|
users: 'https://appwrite.io/docs/server/users',
|
||||||
database: 'https://appwrite.io/docs/client/database',
|
database: 'https://appwrite.io/docs/client/database',
|
||||||
health: 'https://appwrite.io/docs/server/health'
|
health: 'https://appwrite.io/docs/server/health',
|
||||||
|
storage: 'https://appwrite.io/docs/client/storage'
|
||||||
};
|
};
|
||||||
|
|
||||||
type DocsPage = keyof typeof documentationLinks;
|
type DocsPage = keyof typeof documentationLinks;
|
||||||
|
|
|
@ -3,11 +3,11 @@ import { AppwriteTree, ext } from "../extensionVariables";
|
||||||
import { refreshTree } from "../utils/refreshTree";
|
import { refreshTree } from "../utils/refreshTree";
|
||||||
import { connectAppwrite } from "./connectAppwrite";
|
import { connectAppwrite } from "./connectAppwrite";
|
||||||
import { createCollection } from "./database/createCollection";
|
import { createCollection } from "./database/createCollection";
|
||||||
import { createPermission } from './database/permissions/createPermission';
|
import { createPermission } from "./database/permissions/createPermission";
|
||||||
import { createRule } from "./database/createRule";
|
import { createRule } from "./database/createRule";
|
||||||
import { deleteCollection } from "./database/deleteCollection";
|
import { deleteCollection } from "./database/deleteCollection";
|
||||||
import { deleteDocument } from "./database/deleteDocument";
|
import { deleteDocument } from "./database/deleteDocument";
|
||||||
import { deletePermission } from './database/permissions/deletePermission';
|
import { deletePermission } from "./database/permissions/deletePermission";
|
||||||
import { viewDocumentAsJson } from "./database/openDocument";
|
import { viewDocumentAsJson } from "./database/openDocument";
|
||||||
import { refreshCollection } from "./database/refreshCollection";
|
import { refreshCollection } from "./database/refreshCollection";
|
||||||
import { refreshCollectionsList } from "./database/refreshCollectionsList";
|
import { refreshCollectionsList } from "./database/refreshCollectionsList";
|
||||||
|
@ -23,7 +23,7 @@ import { getUserLogs } from "./users/getUserLogs";
|
||||||
import { openUserInConsole } from "./users/openUserInConsole";
|
import { openUserInConsole } from "./users/openUserInConsole";
|
||||||
import { refreshUsersList } from "./users/refreshUsersList";
|
import { refreshUsersList } from "./users/refreshUsersList";
|
||||||
import { viewUserPrefs } from "./users/viewUserPrefs";
|
import { viewUserPrefs } from "./users/viewUserPrefs";
|
||||||
import { editPermission } from './database/permissions/editPermission';
|
import { editPermission } from "./database/permissions/editPermission";
|
||||||
|
|
||||||
class CommandRegistrar {
|
class CommandRegistrar {
|
||||||
constructor(private readonly context: ExtensionContext) {}
|
constructor(private readonly context: ExtensionContext) {}
|
||||||
|
@ -45,7 +45,10 @@ export function registerCommands(context: ExtensionContext): void {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** General **/
|
||||||
registerCommand("Connect", connectAppwrite);
|
registerCommand("Connect", connectAppwrite);
|
||||||
|
|
||||||
|
/** Users **/
|
||||||
registerCommand("openUserInConsole", openUserInConsole);
|
registerCommand("openUserInConsole", openUserInConsole);
|
||||||
registerCommand("viewUserPrefs", viewUserPrefs);
|
registerCommand("viewUserPrefs", viewUserPrefs);
|
||||||
registerCommand("copyUserId", copyUserId);
|
registerCommand("copyUserId", copyUserId);
|
||||||
|
@ -53,22 +56,29 @@ export function registerCommands(context: ExtensionContext): void {
|
||||||
registerCommand("CreateUser", createUser);
|
registerCommand("CreateUser", createUser);
|
||||||
registerCommand("refreshUsersList", refreshUsersList);
|
registerCommand("refreshUsersList", refreshUsersList);
|
||||||
registerCommand("DeleteUser", deleteUser);
|
registerCommand("DeleteUser", deleteUser);
|
||||||
registerCommand("OpenUsersDocumentation", () => openDocumentation('users'));
|
registerCommand("OpenUsersDocumentation", () => openDocumentation("users"));
|
||||||
registerCommand("OpenDatabaseDocumentation", () => openDocumentation('database'));
|
|
||||||
registerCommand("GetUserLogs", getUserLogs);
|
registerCommand("GetUserLogs", getUserLogs);
|
||||||
|
|
||||||
|
/** Database **/
|
||||||
|
registerCommand("OpenDatabaseDocumentation", () => openDocumentation("database"));
|
||||||
registerCommand("viewDocumentAsJson", viewDocumentAsJson);
|
registerCommand("viewDocumentAsJson", viewDocumentAsJson);
|
||||||
registerCommand("viewCollectionAsJson", viewCollectionAsJson);
|
registerCommand("viewCollectionAsJson", viewCollectionAsJson);
|
||||||
registerCommand("createRule", createRule);
|
registerCommand("createRule", createRule);
|
||||||
registerCommand("removeRule", removeRule);
|
registerCommand("removeRule", removeRule);
|
||||||
registerCommand("deleteDocument", deleteDocument, 'database');
|
registerCommand("deleteDocument", deleteDocument, "database");
|
||||||
registerCommand("deleteCollection", deleteCollection, 'database');
|
registerCommand("deleteCollection", deleteCollection, "database");
|
||||||
registerCommand("refreshCollection", refreshCollection);
|
registerCommand("refreshCollection", refreshCollection);
|
||||||
registerCommand("refreshCollectionsList", refreshCollectionsList);
|
registerCommand("refreshCollectionsList", refreshCollectionsList);
|
||||||
registerCommand("createCollection", createCollection, 'database');
|
registerCommand("createCollection", createCollection, "database");
|
||||||
registerCommand("createPermission", createPermission, 'database');
|
registerCommand("createPermission", createPermission, "database");
|
||||||
registerCommand("deletePermission", deletePermission, 'database');
|
registerCommand("deletePermission", deletePermission, "database");
|
||||||
registerCommand("refreshHealth", () => {}, 'health');
|
registerCommand("editPermission", editPermission, "database");
|
||||||
registerCommand("openHealthDocumentation", () => openDocumentation('health'));
|
|
||||||
registerCommand("editPermission", editPermission, 'database');
|
/** Health **/
|
||||||
registerCommand("refreshStorage", () => {}, 'storage');
|
registerCommand("refreshHealth", () => {}, "health");
|
||||||
|
registerCommand("openHealthDocumentation", () => openDocumentation("health"));
|
||||||
|
|
||||||
|
/** Storage **/
|
||||||
|
registerCommand("refreshStorage", () => {}, "storage");
|
||||||
|
registerCommand("openStorageDocumentation", () => openDocumentation("storage"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue