Deno's node emulation can run TiddlyWiki now that it supports the VM isolates API, but the window global exists in that environment, so both browser and node were being detected, causing the autoboot to trip up on nonexistent argv, as the boot was happening in the constructor right before argv was set.
Ref: https://github.com/denoland/deno/issues/19286
Ref: https://github.com/flexdinesh/browser-or-node
Part of the upcoming AWS integration work is a custom build of
TiddlyWiki that can run as an Amazon Lambda function. These tweaks
enable the new build to control the loading of SJCL, the package info,
and any preloaded tiddlers.
1. Make it possible to disable specific boot tasks
2. Extend the startup mechanism to allow startup tasks to be disabled
Again, see Jermolene/TiddlyWiki5NodeWebkit to see how these features
fit together.
Now implements (and mostly follows) requirements of Modules/1.1 spec
implementes only the required "secure sandbox" subset of the spec
`module` free variable changed from the `moduleInfo` to an id container
`require` free variable given a "main" property
boot module scope closed and exported
this also changes the interface between boot and bootprefix slightly
(should now be able to create multiple TW instances under node)
BREAKING CHANGES:
The tiddlywiki module itself now exports a single constructor function
Modules which depended on `module` referring to `moduleInfo` will break
Modules which don't conform to Modules/1.1 will break
(by attempting to modify require.main or module.id)