diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2019-10-31 13:43:38 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2019-10-31 13:43:38 +0000 |
| commit | 2525b6c2f45397c80c5cb46dc0f9e1d68a615bea (patch) | |
| tree | 9d4354604d9ca01227055c7c43abe0039724838f | |
| parent | fix embed in static rendered markdown (diff) | |
| download | mmm-2525b6c2f45397c80c5cb46dc0f9e1d68a615bea.tar.gz mmm-2525b6c2f45397c80c5cb46dc0f9e1d68a615bea.zip | |
small fixes:
* --unsafe by default if not --rw
* fix inspector
| -rw-r--r-- | build/server.moon | 4 | ||||
| -rw-r--r-- | mmm/mmmfs/browser.moon | 2 | ||||
| -rw-r--r-- | mmm/mmmfs/init.moon | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/build/server.moon b/build/server.moon index 152e4e5..fb6dca4 100644 --- a/build/server.moon +++ b/build/server.moon @@ -36,7 +36,7 @@ class Server @flags.rw = opts.host == 'localhost' or opts.host == '127.0.0.1' if @flags.unsafe == nil - @flags.unsafe = opts.host == 'localhost' or opts.host == '127.0.0.1' + @flags.unsafe = not @flags.rw or opts.host == 'localhost' or opts.host == '127.0.0.1' export UNSAFE UNSAFE = @flags.unsafe @@ -173,7 +173,7 @@ class Server -- moon server.moon [FLAGS] [STORE] [host] [port] -- * FLAGS - any of the following: -- --[no-]rw - enable/disable POST?PUT/DELETE operations (default: on if local) --- --[no-]unsafe - enable/disable server-side code execution when writable is on (default: on if local) +-- --[no-]unsafe - enable/disable server-side code execution when writable is on (default: on if local or --no-rw) -- * STORE - see mmm/mmmfs/stores/init.moon:get_store -- * host - interface to bind to (default localhost, set to 0.0.0.0 for public hosting) -- * port - port to serve from, default 8000 diff --git a/mmm/mmmfs/browser.moon b/mmm/mmmfs/browser.moon index 2e5652e..8d95ac3 100644 --- a/mmm/mmmfs/browser.moon +++ b/mmm/mmmfs/browser.moon @@ -238,7 +238,7 @@ class Browser value, key = @get prop assert key, "couldn't @get #{prop}" - conversions = get_conversions 'mmm/dom', key.type, get_casts + conversions = get_conversions 'mmm/dom', key.type, get_casts! assert conversions, "cannot cast '#{key.type}'" apply_conversions conversions, value, @, prop diff --git a/mmm/mmmfs/init.moon b/mmm/mmmfs/init.moon index fc89d7f..b807c1c 100644 --- a/mmm/mmmfs/init.moon +++ b/mmm/mmmfs/init.moon @@ -2,3 +2,4 @@ require = relative ..., 0 export ^ PLUGINS = require '.plugins' +print "PLUGINS = ", PLUGINS |
