Commit Graph

51 Commits

Author SHA1 Message Date
Ben Newman
62388fb7c4 Unify web.* arch resolution in WebApp.categorizeRequest.
https://github.com/meteor/meteor/pull/10994#issuecomment-606270894
2020-03-31 12:07:23 -04:00
Ben Newman
8ff7eed55c Merge branch 'devel' into release-1.10 2020-02-19 09:41:44 -05:00
Ruben Sainiuc
61deae5068 Add enableCallback option for appcache 2020-02-05 15:21:27 +02:00
Ben Newman
8c022eaced Restore webapp changes that were intended for Meteor 1.10.
Revert "Bump webapp version to 1.8.2, with same content as 1.8.0."
This reverts commit 20d2a9b4a4.

Revert "Revert changes to webapp package since version 1.8.0."
This reverts commit 7a6ee9e129.
2020-01-16 11:26:54 -05:00
Ben Newman
7a6ee9e129 Revert changes to webapp package since version 1.8.0.
We accidentally published changes to webapp that should have been
restricted to Meteor 1.10 as part of the 1.8.1 version. This commit
reverts commits to packages/webapp since Meteor 1.9, so that we can
republish the 1.8.0 content as version 1.8.2. We will then bump the webapp
version to 1.9.0 on the release-1.10 branch and publish the new content
only on that branch.

Revert "Allow to exclude web architectures in development mode (#10824)"
This reverts commit a205967186.

Revert "Updates cordova-plugin-meteor-webapp to 1.7.1"
This reverts commit a1e4d27822.

Revert "Update cordova-plugin-wkwebview-engine to 1.2.1."
This reverts commit 3f9a69d7c4.

Revert "Update cordova-plugin-whitelist to 1.3.4."
This reverts commit 979273333b.

Revert "Update cordova-plugin-meteor-webapp to 1.7.1-beta.1."
This reverts commit 565c4254f1.

Revert "Update accounts-password to version 1.5.2."
This reverts commit b827d1da2f.
2020-01-16 11:15:25 -05:00
Seba Kerckhof
a205967186 Allow to exclude web architectures in development mode (#10824) 2020-01-13 16:24:50 -05:00
Kevin Newman
7a872b630a Rewrite/simplify appcache size limit debug message. (#10355) 2019-01-11 17:10:55 -05:00
Ben Newman
45bbac5940 Fix appcache test by tolerating both Autoupdate.{versions,autoupdateVersion}. 2018-07-19 14:04:33 -04:00
Ben Newman
72edda6b37 Cache previously computed app.manifest files.
This is an easy optimization that we should have done a long time ago.
2018-04-28 11:58:57 -04:00
Ben Newman
7e883b337f Register app.manifest FALLBACK for non-prefixed asset URLs.
This is an alternate solution to the problems #9776 was intended to fix.
2018-04-28 11:26:10 -04:00
Ben Newman
21ffb90154 Pass arch and prefix to eachResource callback in appcache-server.js. 2018-04-28 11:21:34 -04:00
Ben Newman
a599aa738d Avoid using WebApp.connectHandlers for appcache sizeCheck.
The (req, res, next) handler was not calling next(), which caused some
tests where appcache was used (e.g. hot code push) to time out.
2018-04-27 13:25:15 -04:00
Ben Newman
cf33eeedbc Decompose eachResource helper function in appcache-server.js. 2018-04-27 13:07:37 -04:00
Kevin Newman
06f9f78277 Avoid the need to rewrite URLs in appcache, by avoiding adding the prefix at build time for assets 2018-04-27 09:47:21 -04:00
Kevin Newman
154533af26 Rewrite /public urls to remove /__browser.legacy/ prefix in app.manifest (also skip stats.json) 2018-04-27 09:47:21 -04:00
Kevin Newman
7f2a683e2c Always omit .map files from app.manifest 2018-04-27 09:47:21 -04:00
Kevin Newman
04a0a2a97f Use isModern checks to decide which arch assets to put in the app.manifest, and add filter for web.browser.legacy in isDynamic check 2018-04-27 09:47:21 -04:00
James Burgess
552764635e Modernize appcache package (#9600) 2018-02-08 10:35:13 -05:00
Ben Newman
7aae1ad131 Bump appcache patch version to 1.1.1 (w/ TODO, style tweaks). 2017-12-05 09:25:53 -05:00
Kevin Newman
491f678c0b Remove "dynamic js" and .map files from appcache (app.manifest). (#9434)
Remove type:"dynamic js" and .map files from `appcache` (app.manifest) since the
dynamic-import package doesn't load dynamic modules from `appcache`, so caching
those files with `appcache` is redundant.
2017-12-05 09:22:13 -05:00
Ben Newman
6418026e15 Update all new Buffer usage to Buffer.from for Node 6+.
https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6
2017-06-05 18:16:03 -04:00
Nick Martin
afc45d8386 Add space between function and ( per style guide.
No functional changes.
2014-10-07 13:53:25 -07:00
Nick Martin
ee65d21699 Run appcache size check after user code has had a chance to run.
This way the size check takes calls to Meteor.AppCache.config()
into account, so users can remove files from the cache and get
rid of the warning.

Also, add an internal option to totally disable the warning and
use it in tests.
2014-10-07 13:53:25 -07:00
Gaelan
9e6568a3e1 Fix clientHash call in appcache.
Appcache was broken because it output the *function* WebApp.clientHash instead of its return value.
2014-10-07 13:53:25 -07:00
Matthew Arbesfeld
71966f407a Turn off auto-reload. Still not able to remove initial script from page 2014-07-29 04:38:46 -07:00
Matthew Arbesfeld
960f8907d3 Merge branch 'packaging' into cordova-hcp
Conflicts:
	packages/constraint-solver/constraint-solver.js
	packages/webapp/webapp_server.js
	tools/tests/package-tests.js
2014-07-25 13:52:34 -07:00
Slava Kim
5649b0347f Bundle and serve all client programs by default
For several client programs 'client.browser', 'client.cordova', etc, build and
bundle manifest files and programs.

Then serve all client programs' static files on their subpaths except for the
default one served on root.

Ex.:

/app/code.js
/packages/client-package/code.js
/cordova/packages/cordova-package/code.js
2014-07-24 17:39:11 -07:00
Fredric Endrerud
effd3c1524 Change AppCache from browser whitelist to blacklist 2014-07-18 16:07:02 -07:00
David Glasser
b2632d45c5 Move boilerplate HTML from tools to webapp
This breaks a strong dependency between the webapp package and the
bundler.  Now we can change the standard page format, add more hooks,
etc without changing the tools (and hot code push works properly).

This is an incompatible change to the definition of the
browser-program-pre1 format: it no longer contains a "page" field
pointing to a boilerplate defined using ad hoc ##FOO##
substitution. Instead, the manifest can contain "head" and "body"
entries for data added with compileStep.appendDocument().  (Note that in
Blaze, <body> in a template file no longer calls appendDocument.)

WebApp.addHtmlAttributeHook callbacks now return attribute objects (like
those that Spacebars supports) rather than strings.
2014-03-24 20:10:39 -07:00
Nick Martin
980a669c45 Make appcache size check actually match what goes in the cache section. Fixes #1847. 2014-02-20 14:57:57 -08:00
Nick Martin
51b3cef688 Whitespace adjustments to match style guide. 2013-12-06 22:41:46 -08:00
Nick Martin
1eff62f0f3 Only count files that actually go in the cache in the cache size check. Fixes #1653. 2013-12-06 14:10:19 -08:00
Nick Martin
91ad6c0189 Remove trailing whitespace. 2013-12-05 13:14:10 -08:00
Nick Martin
f25b733bc6 Change AutoUpdate symbol name to be one word not two.
perl -pi -e 's/AutoUpdate/Autoupdate/g' **/*.{js,md}
perl -pi -e 's/autoUpdate/autoupdate/g' **/*.{js,md}
2013-11-21 16:34:07 -08:00
Andrew Wilcox
e27e2d8c82 Calculate the client hash in webapp so that autoupdate doesn't have to
be a strong dependency of appcache.

Delaying publishing the current client version document until the auto
update version is available isn't necessary because the publish
callback won't be called before webapp starts listening, and that
happens after startup.

In the app cache manifest include both the client hash and the
AUTOUPDATE_VERSION, which both allows the browser to load new
client code even when the auto update version is explicitly set by the
developer, and also ensures that if the developer changes the auto
update version this is propagated to the client in the app HTML so
that autoupdate doesn't get into an infinite loop of reloads.
2013-11-19 01:34:53 -08:00
Andrew Wilcox
e48fa460bc Implement AutoUpdate.newClientAvailable reactive data source.
Have the appcache use the auto update client version id.

Fix autopublish warning.
2013-11-19 01:34:53 -08:00
Andrew Wilcox
ba34b2550b Chrome for iOS supports the appcache 2013-09-04 16:31:52 -07:00
David Glasser
e38bf5e1ab Move a few more functions off of __meteor_bootstrap__ 2013-07-02 16:15:12 -07:00
David Glasser
1f26045fe0 __meteor_bootstrap__.bundle -> WebApp.clientProgram 2013-07-02 16:15:12 -07:00
David Glasser
053db8e9e9 Begin to refactor webapp package.
Move stuff from __meteor_bootstrap__ to WebApp exported symbol.

Note that the WebApp API continues to be subject to change.
2013-07-02 16:15:12 -07:00
David Glasser
e2951cca6c Fix routepolicy/webapp dependency.
Inspired by awwx's #1176.

Move Meteor._routePolicy to @exported RoutePolicy.
2013-07-02 15:11:45 -07:00
Andrew Wilcox
f4808b5a68 Add Chromium to the browsers supported by appcache 2013-04-25 16:50:33 -07:00
David Glasser
599c6edef8 Another round of removing __meteor_bootstrap__.require. 2013-03-19 15:13:53 -07:00
David Glasser
5a5204e3a4 Remove closures around package files. (hint: git blame -w)
The bundler now adds closures around client files and the server adds closures
around server files.
2013-03-19 15:13:53 -07:00
Nick Martin
b2bf406e55 Only cache assets with a cache-busting parameter. Use fallback to access these when offline. 2013-03-06 16:41:56 -08:00
Andrew Wilcox
f72f366e20 appcache docs and tweak warning message 2013-02-22 18:38:41 -08:00
Andrew Wilcox
43282254a1 Fix syntax error in appcache-server.
Ouch.
2013-02-21 18:41:53 -08:00
Andrew Wilcox
2500312cd5 Allow static resources to be configured as online only.
Add a route policy type "static-online" for files in public/ that
shouldn't be cached offline.

Put "static-online" files in the manifest NETWORK section instead of
in the CACHE section.
2013-02-21 18:41:53 -08:00
Andrew Wilcox
6ed6e8ce17 appcache code review changes 2013-02-21 18:41:53 -08:00
Andrew Wilcox
6bea9656d6 Avoid calling readFileSync at runtime. 2013-02-21 18:41:53 -08:00