Allows packages such as stream and accounts to declare URL prefixes
such as /sockjs/ and /_oauth/ to be network routes.
Updates server to avoid serving app HTML on network routes.
Checks for conflict between files in public/ and network routes. For
example, the developer might not know that /sockjs/ is reserved, and
might create a file "public/sockjs/socks-are-great.png".
package.
The new API is Random.id(), Random.fraction(), Random.choice(arrayOrString), and
Random.hexString(digits).
Meteor.uuid is kept around for backwards compatibility.
- Delete dead EJSON._each2.
- Make OrderedDict.remove throw if the key isn't in it.
- Make changed callbacks in two places throw if the document isn't in the
dictionary. (Other callbacks implicitly throw via OrderedDict.)
- Remove OrderedDict.pop (which didn't return the key) and push.
`__meteor_bootstrap__.bundler` => `__meteor_bootstrap__.bundle`
`bundle.bundle_dir` => `bundle.root`
Rather than placing app_info/appInfo containing the manifest in the
bundle object, instead I'm now placing the manifest directly in the
bundle object. A) no code currently uses bundle.appInfo.load; B) if
someday we expand the manifest to also include server side resources
than we'd be getting rid of `load` anyway; C) I think it reads better:
`bundle.appInfo.manifest` => `bundle.manifest`
cp_r now returns a list of os-specific relative file system paths as
strings, instead of paths as arrays.
I changed the normalized "path" field in the manifest to be a relative
path instead of an absolute path (`"/static/cat.jpg"` =>
`"static/cat.jpg"`). This felt better when looking at the manifest; I
think because the path is relative to the bundle root.
Creates a manifest of the static files delivered to the client, for use
by the app cache. The manifest is also designed to be usable to generate
etag's for issue #626.
In the original bundler code `self.css` and `self.js.client` starts
out as an array of os-specific file paths and later becomes an array
of URLs (including query parameters). While I tried to minimize code
changes to avoid creating extra work for the engine project, this
turned out to be too crazy to deal with. In this version `self.css`
and `self.js.client` stay as file paths, and _generate_app_html now
pulls the client URLs from the new manifest.
This PR is thus proposing a design where the bundler manifest becomes
the source of knowledge about client static resources included in the
bundle, and is then used to generate the app html, the app cache, and
perhaps etag's in the future. (If it made sense then the `load` list
of server Javascript files could also be folded into the manifest,
making the manifest the source of knowledge about all static
resources... but the code in this PR don't include any steps in that
direction).
- Implement version handshake.
- Use a condition variable instead of sleep(0).
- Don't crash on 'added' with no fields.
- Include 'reason' when connection is closed.
- If our code throws an exception, make sure to print it before killing the main
thread.
- Don't print a KeyboardInterrupt traceback on Ctrl-C or
kill-due-to-connection-close. (ie, don't print two tracebacks if the thread
throws.)
Will be using for the appcache. I tested 2.0.1 and it seems to work
fine. I figured that all else being equal it would be good to use the
latest version to give us the most recent user agent matches, and so
that if we had any bug reports we wouldn't be out of date.
Inspired by a pull request from tmeasday (though we've changed the underlying
code enough on ddp-pre1 that I had to rewrite it myself).
Use it in todos. No docs yet, but the Meteor.subscribe docs are already
scheduled for some attention.
Fixes#631.
Update the dev_bundle to use the Meteor version of gzippo which allows
clientMaxAge to be set to 0, and change server.js to set the
clientMaxAge to 0 for static.
Note that sub.stop() is now handled by the client (it removes the record of the
subscription) but there is no way for an app to observe this. (I expect we'll
use sub.stop() in implementing "fetch" in the Mongo connector.)