Commit Graph

346 Commits

Author SHA1 Message Date
denihs
f650be7b89 - using _AsynchronousQueue in the server
- continue for looping instead of breaking it
2023-02-06 14:56:37 -04:00
denihs
482acb00f6 Merge branch 'release-3.0' into release-3.0-tools-and-mongo
# Conflicts:
#	packages/promise/promise-tests.js
2023-01-23 15:41:56 -04:00
Gabriel Grubba
e5e23fb7ce Merge branch 'release-3.0' into release-3.0-tests-webapp
# Conflicts:
#	docs/history.md
2023-01-18 17:45:19 -03:00
Gabriel Grubba
1d3cfca40a updated last express method 2023-01-18 17:40:23 -03:00
Gabriel Grubba
1b921ec331 chore: created abstraction on top of express creation 2023-01-18 17:23:46 -03:00
denihs
ead8c2a126 Merge branch 'release-3.0' into release-3.0-tools-and-mongo
# Conflicts:
#	meteor
#	npm-packages/eslint-plugin-meteor/scripts/dev-bundle-tool-package.js
#	npm-packages/meteor-babel/package-lock.json
#	npm-packages/meteor-babel/package.json
#	packages/babel-compiler/.npm/package/npm-shrinkwrap.json
#	packages/babel-compiler/package.js
#	packages/meteor/package.js
#	scripts/dev-bundle-tool-package.js
2023-01-18 15:37:36 -04:00
denihs
c0a1308cb8 Merge branch 'devel' into release-3.0
# Conflicts:
#	docs/history.md
#	packages/accounts-password/password_server.js
2023-01-18 15:35:03 -04:00
denihs
43c3eb130f - merging the TLA branch 2023-01-18 15:23:41 -04:00
denihs
212a668cb7 - These methods are now async:
- `WebAppInternals.reloadClientPrograms()`
    - `WebAppInternals.pauseClient()`
    - `WebAppInternals.generateClientProgram()`
    - `WebAppInternals.generateBoilerplate()`
    - `WebAppInternals.setInlineScriptsAllowed()`
    - `WebAppInternals.enableSubresourceIntegrity()`
    - `WebAppInternals.setBundledJsCssUrlRewriteHook()`
    - `WebAppInternals.setBundledJsCssPrefix()`
2023-01-18 14:52:34 -04:00
Gabriel Grubba
e4a3fb561a chore: add raw handlers 2023-01-16 19:45:00 -03:00
Gabriel Grubba
8296afc897 chore: addressed security comments 2023-01-16 10:03:01 -03:00
Gabriel Grubba
560c1b383b feat: added express to webserver 2023-01-13 16:33:48 -03:00
Gabriel Grubba
be725b8712 chore: added express instead of connect 2023-01-13 12:32:50 -03:00
Gabriel Grubba
40e525eef8 chore: made getBoilerplate return a promise 2023-01-11 18:19:06 -03:00
Evan Broder
7eed486800 Allow multiple runtime config and updated runtime hooks
The forEach method on Hook will stop iterating unless the iterator
function returns a truthy value. Previously, this meant that only the
first registered runtime config hook would be called.
2023-01-04 14:16:41 -08:00
Matheus Castro
a40ec5392f Add code from "fibers-optional" branch with some modifications:
- Create new context for DDP server too.
- Removing some console.logs + adding some TODOS.
2022-08-18 13:16:21 -03:00
zodern
7809d814eb Remove check for replaceable files in production
There are replaceable files when the app was built with the --debug option, and then run with NODE_ENV set to production. There are no problems with replaceable files.
2022-02-16 12:02:16 -03:00
Jan Dvorak
dd0ed70229 WebApp option to always return content 2021-10-12 22:44:06 -04:00
zodern
371a69f731 Fix race conditions in HMR
- To know which change sets to apply, the client needs to know when the version running was built. It used the time the client loaded, but it could have loaded after a new version of the app was built, especially on cordova. Now it uses the actual time the client was built.
- On cordova, there is a delay between the client knowing there is an update available, and being able to reload the page to use the new version.
2021-10-12 22:43:55 -04:00
Bruce Johnson
6c6116edcd Add apibox documentation 2021-09-03 14:15:26 -07:00
Bruce Johnson
5aa606d60d go back to forEach on the hook (supported by callback-hook) 2021-09-01 11:32:29 -07:00
Bruce Johnson
8941cb6117 use callback-hook package 2021-09-01 09:46:54 -07:00
Bruce Johnson
4559dd51cb FIX:runtimeConfig.updateHooks 2021-08-27 12:03:34 -07:00
Bruce Johnson
7188c72351 Add WebApp.addUpdatedNotifyHook 2021-08-27 11:24:06 -07:00
Bruce Johnson
56207a6e55 fix updated flag to be true for all hook subscribers 2021-07-15 05:57:30 -07:00
Jan Dvorak
21cd1f17f3 Merge pull request #11506 from brucejo75/brucejo75/addRuntimeConfigHook
Hook __meteor_runtime_config__ at runtime
2021-07-14 10:20:00 +02:00
Jan Dvorak
e245fd4992 Update webapp dependencies 2021-07-12 22:54:39 +02:00
Bruce Johnson
1b874699d0 Incorporated feedback 2021-07-07 14:43:39 -07:00
Bruce Johnson
c5d38638cc new method: addRuntimeConfigHook 2021-06-29 16:40:48 -07:00
Vlad Lasky
a6c6bef4be Made UNIX_SOCKET_GROUP code more concise by removing unnecessary local variables & conditional checks 2021-06-04 17:23:17 +10:00
Vlad Lasky
4ad743883a Missing 'let' before unixSocketGid declaration. 2021-05-30 12:10:28 +10:00
Vlad Lasky
f1a969d584 Environment variable UNIX_SOCKET_GROUP can now be used to override the default UNIX group name/gid on the socket file specified in UNIX_SOCKET_PATH. 2021-05-28 22:14:54 +10:00
Vlad Lasky
fce87647e7 readFileSync() and chmodSync() are now imported in a single import statement. 2021-05-27 09:42:46 +10:00
Vlad Lasky
95b089b653 Optional environment variable UNIX_SOCKET_PERMISSIONS will now set the permissions on the UNIX_SOCKET_FILE. 2021-05-24 09:42:52 +10:00
Jan Dvorak
b636d8d9e6 Merge branch 'devel' into nm-webapp-request-methods 2021-04-23 14:51:53 +02:00
Filipe Névola
ff095d04ba Merge branch 'devel' into nm-webapp-request-methods 2021-03-31 11:21:21 -04:00
Vlad Lasky
8fef64c2c1 Merge remote-tracking branch 'upstream/devel' into cluster 2021-03-31 16:12:31 +11:00
Vlad Lasky
e0d0df3962 The worker process name that is used to name each worker process's UNIX socket file can now be overridden with the environment variable NAME.
This is useful because the worker id, which is used by default to name the UNIX socket file, is incremented each time the worker process ends/dies. This will cause difficulties if you are referencing the UNIX socket file from a web server or other external process where you expect the socket file to always have the same name.

Co-authored-by: Rokas Stankevicius <rokanost@users.noreply.github.com>
2020-12-11 09:01:49 +11:00
Vlad Lasky
e0d4093bda Merge commit 'cca623' into devel 2020-12-11 08:37:52 +11:00
Nathan Muir
6644fcdf95 webapp: respond appropriately to each http request method
Fix incorrect responses, like sending content to OPTIONS requests, by implementing the following scheme:

GET
- Respond with the requested resource; static asset, boilerplate etc.

HEAD
- Return headers identical to GET request
- Do not send content (Node.js will automatically skip response content)

OPTIONS
- Respond with 200
- Send an Allow Header listing acceptable request methods
- Do not send content

CONNECT, DELETE, PATCH, POST, PUT, TRACE, etc.
- Respond with 405 Method Not Allowed
- Send an Allow Header listing acceptable request methods
- Do not send content
2020-11-23 12:27:26 +13:00
zodern
ab3d407d22 Integrate HMR into the meteor tool 2020-10-10 20:52:18 -05:00
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
d27d0a279d Try other web.* arches if preferred arch was excluded.
Follow-up to #10824.

If the preferred arch is not available (most likely because it was
deliberately excluded), it's better to use another client arch that is
available than to guarantee the site won't work by returning an unknown
arch. For example, if web.browser.legacy is excluded using the
--exclude-archs option (introduced by #10824), legacy clients are better
served by receiving web.browser (which might actually work) than receiving
an HTTP 404 response. If none of the arches in preferredArchOrder are
defined, only then should we send a 404.
2020-03-31 12:07:23 -04:00
Ben Newman
70d25386af Merge branch 'devel' into release-1.10 2020-02-25 19:40:53 -05:00
Seba Kerckhof
163881163f Don't lose the query string when using a path prefix (#10845)
Fixes https://github.com/meteor/meteor/issues/10756
2020-02-25 19:31:42 -05:00
Ben Newman
8ff7eed55c Merge branch 'devel' into release-1.10 2020-02-19 09:41:44 -05: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
seke
80892e5965 Add hash to runtime config file url
Although Meteor doesn't send cache headers to the runtime config file, a reverse proxy might still cache it.
Some reverse proxies will treat this case similar to cache-control: private.
So adding the hash can prevent reverse proxies from serving stale versions.
Furthermore, by adding the hash, it can actually be cached correctly by reverse proxies.

For more context: https://github.com/meteor/meteor/issues/10733
2020-01-13 15:23:23 +01:00