diff --git a/src/.init.lua b/src/.init.lua index f0b687c..0dd58f4 100644 --- a/src/.init.lua +++ b/src/.init.lua @@ -67,6 +67,7 @@ app.plugin.manyfold = app.addPlugin('plugin/manyfold') app.plugin.git = app.addPlugin('plugin/git') app.plugin.webhook = app.addPlugin('plugin/webhook') app.plugin.markdown = app.addPlugin('plugin/markdown') +app.plugin.staticwebgen = app.addPlugin('plugin/staticwebgen') -- should always be last app.runcmd(app) -- run clicmds diff --git a/src/.lua/util.lua b/src/.lua/util.lua index 9393044..174b2e9 100644 --- a/src/.lua/util.lua +++ b/src/.lua/util.lua @@ -299,15 +299,20 @@ function util.fetchInstall(app) app.post('/bus',function(req,res,next) local reqid = GetParam('id') local cb = app.expectedreq[reqid] - if cb then cb(req,res,next) end + if cb then cb(res,req,next) end -- important: flipped req,res end) end +function util.fetchServer(url, opts, cb) + util.fetch( util.getURL(url,{server=true}), nil, cb ) +end + function util.fetch(url, opts, cb) local reqid = tostring( Rdrand() ) app.expectedreq[reqid] = cb local urlret = util.getURL('/bus?id=' .. reqid, {server=true} ) if assert(unix.fork()) == 0 then + print('🤞 fetch ' .. url) local ok, headers, body = Fetch(url, opts) if ok then Fetch(urlret, body) -- post back to ourselves diff --git a/src/cmd/generate.lua b/src/cmd/generate.lua index 57a050e..8d065f0 100644 --- a/src/cmd/generate.lua +++ b/src/cmd/generate.lua @@ -1,6 +1,7 @@ return function(app,argv) print('generating..') - app.plugin.clouddrive.mount() - --app.plugin.diskscan.scan( app.opts.plugin_diskscan_dir ) + -- do nothing here, as this is handled by the src/plugin/staticwebgen.lua + -- AFTER all plugins are loaded + print('TODO: disabled for now..not stable') os.exit() end diff --git a/src/myverse/janusxr/helloworld/janusxr.xml b/src/myverse/janusxr/helloworld/janusxr.xml index ee70229..b5018a9 100644 --- a/src/myverse/janusxr/helloworld/janusxr.xml +++ b/src/myverse/janusxr/helloworld/janusxr.xml @@ -1,6 +1,5 @@