Cleanup
This commit is contained in:
parent
701a601641
commit
5923d98b7b
@ -8,7 +8,7 @@
|
|||||||
"watch-server": "deno run -A --unstable --check --watch silverbullet.ts",
|
"watch-server": "deno run -A --unstable --check --watch silverbullet.ts",
|
||||||
// The only reason to run a shell script is that deno task doesn't support globs yet (e.g. *.plug.yaml)
|
// The only reason to run a shell script is that deno task doesn't support globs yet (e.g. *.plug.yaml)
|
||||||
"watch-plugs": "./build_plugs.sh -w",
|
"watch-plugs": "./build_plugs.sh -w",
|
||||||
"bundle": "deno bundle --importmap import_map.json silverbullet.ts dist/silverbullet.js",
|
"bundle": "deno bundle silverbullet.ts dist/silverbullet.js",
|
||||||
// Regenerates some bundle files (checked into the repo)
|
// Regenerates some bundle files (checked into the repo)
|
||||||
// Install lezer-generator with "npm install -g @lezer/generator"
|
// Install lezer-generator with "npm install -g @lezer/generator"
|
||||||
"generate": "deno run -A plugos/gen.ts && lezer-generator plugs/directive/query.grammar -o plugs/directive/parse-query.js"
|
"generate": "deno run -A plugos/gen.ts && lezer-generator plugs/directive/query.grammar -o plugs/directive/parse-query.js"
|
||||||
|
@ -190,7 +190,7 @@ export class HttpServer {
|
|||||||
fsRouter
|
fsRouter
|
||||||
.get("\/(.+)", async ({ params, response, request }) => {
|
.get("\/(.+)", async ({ params, response, request }) => {
|
||||||
const name = params[0];
|
const name = params[0];
|
||||||
console.log("Loading file", name);
|
// console.log("Loading file", name);
|
||||||
try {
|
try {
|
||||||
const attachmentData = await spacePrimitives.readFile(
|
const attachmentData = await spacePrimitives.readFile(
|
||||||
name,
|
name,
|
||||||
@ -285,7 +285,6 @@ export class HttpServer {
|
|||||||
const name = ctx.params.name;
|
const name = ctx.params.name;
|
||||||
const plugName = ctx.params.plug;
|
const plugName = ctx.params.plug;
|
||||||
const args = await ctx.request.body().value;
|
const args = await ctx.request.body().value;
|
||||||
console.log("Got args", args, "for", name, "in", plugName);
|
|
||||||
const plug = system.loadedPlugs.get(plugName);
|
const plug = system.loadedPlugs.get(plugName);
|
||||||
if (!plug) {
|
if (!plug) {
|
||||||
ctx.response.status = 404;
|
ctx.response.status = 404;
|
||||||
|
Loading…
Reference in New Issue
Block a user