`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
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.