Plug format now changed to YAML

This commit is contained in:
Zef Hemel
2022-03-27 11:26:13 +02:00
parent a382ab3baa
commit 621e55dbcf
20 changed files with 225 additions and 254 deletions
+23 -23
View File
@@ -9,16 +9,16 @@ import {hideBin} from "yargs/helpers";
import {SilverBulletHooks} from "../common/manifest";
import {ExpressServer} from "./express_server";
import {DiskPlugLoader} from "../plugbox/plug_loader";
import { NodeCronFeature } from "../plugbox/feature/node_cron";
import {NodeCronFeature} from "../plugbox/feature/node_cron";
import shellSyscalls from "../plugbox/syscall/shell.node";
import { System } from "../plugbox/system";
import {System} from "../plugbox/system";
let args = yargs(hideBin(process.argv))
.option("port", {
type: "number",
default: 3000,
})
.parse();
.option("port", {
type: "number",
default: 3000,
})
.parse();
if (!args._.length) {
console.error("Usage: silverbullet <path-to-pages>");
@@ -50,20 +50,20 @@ socketServer.init().catch((e) => {
const expressServer = new ExpressServer(app, pagesPath, distDir, system);
expressServer
.init()
.then(async () => {
let plugLoader = new DiskPlugLoader(
system,
`${__dirname}/../../plugs/dist`
);
await plugLoader.loadPlugs();
plugLoader.watcher();
system.registerSyscalls("shell", ["shell"], shellSyscalls(pagesPath));
system.addFeature(new NodeCronFeature());
server.listen(port, () => {
console.log(`Server listening on port ${port}`);
});
})
.catch((e) => {
console.error(e);
.init()
.then(async () => {
let plugLoader = new DiskPlugLoader(
system,
`${__dirname}/../../plugs/dist`
);
await plugLoader.loadPlugs();
plugLoader.watcher();
system.registerSyscalls("shell", ["shell"], shellSyscalls(pagesPath));
system.addFeature(new NodeCronFeature());
server.listen(port, () => {
console.log(`Server listening on port ${port}`);
});
})
.catch((e) => {
console.error(e);
});