Git plug tweaks
This commit is contained in:
@@ -41,6 +41,6 @@ functions:
|
||||
welcome:
|
||||
path: "./server.ts:welcome"
|
||||
events:
|
||||
- load
|
||||
- plug:load
|
||||
env: server
|
||||
|
||||
|
||||
@@ -11,7 +11,10 @@ export function endpointTest(req: EndpointRequest): EndpointResponse {
|
||||
};
|
||||
}
|
||||
|
||||
export function welcome() {
|
||||
console.log("Hello world!");
|
||||
export function welcome(plugName: string) {
|
||||
if (plugName !== "core") {
|
||||
return;
|
||||
}
|
||||
console.log("Hello world!!", plugName);
|
||||
return "hi";
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
export default function welcome() {
|
||||
console.log("Hello world!");
|
||||
}
|
||||
+2
-1
@@ -27,12 +27,13 @@ export async function snapshotCommand() {
|
||||
}
|
||||
|
||||
export async function syncCommand() {
|
||||
await syscall("editor.flashNotification", "Syncing with git");
|
||||
await syscall("system.invokeFunctionOnServer", "sync");
|
||||
await syscall("editor.flashNotification", "Git sync complete!");
|
||||
}
|
||||
|
||||
export async function sync() {
|
||||
console.log("Going to sync with git");
|
||||
console.log("First locally committing everything");
|
||||
await commit();
|
||||
console.log("Then pulling from remote");
|
||||
await syscall("shell.run", "git", ["pull"]);
|
||||
|
||||
Reference in New Issue
Block a user