`puter.exit()` now takes a status code, similar to the exit status on
desktop OSes. This is passed to the appClosed event, so that eg a
parent app can know whether its child app ran successfully.
Previously, this would crash in upload() when trying to iterate the
`entries` array, which is undefined when the `items` parameter is an
unsupported type.
Solves these eslint issues:
/puter/packages/puter-js/src/modules/UI.js
418:20 error 'itemWatchCallbackFunctions' is not defined no-undef
418:74 error 'itemWatchCallbackFunctions' is not defined no-undef
419:21 error 'itemWatchCallbackFunctions' is not defined no-undef
These currently work in a way that's different from what eslint expects,
so disable it. At some point it would be good if it could check them
(and if the tests could run on CI) but right now they just make a lot of
noise.
Apps are not required to use the Puter SDK. If they don't, then we can
still launch them, close them, and listen to their close event, but are
unable to send messages to them.