Commit Graph

66 Commits

Author SHA1 Message Date
Ben Newman
19080bd53d Split server/shell.js into shell/server.js and shell/client.js.
Note that shell/server.js is copied into the bundle as shell-server.js,
like before, however now it contains none of the extraneous code that
belongs in shell/client.js.

The original reason server and client code were combined in a single file
was to share helper functions and configuration variables (e.g.
getInfoFile and EXITING_MESSAGE). Now, shell/client.js requires
shell/server.js to access those shared exports.
2015-02-06 14:33:19 -05:00
David Glasser
505a77ecad Update other places that mention the Node version 2015-02-05 22:40:43 -08:00
Slava Kim
152b9576a2 Fix the use of paths in Npm.require on Windows 2015-02-04 19:11:27 -08:00
Sashko Stubailo
b3cb7a49f7 Merge branch 'devel' into windows-cr
Conflicts:
	packages/application-configuration/package.js
	packages/ctl-helper/package.js
	packages/ctl/package.js
	packages/dev-bundle-fetcher/package.js
	packages/follower-livedata/package.js
	packages/jquery/package.js
	packages/star-translate/package.js
	packages/test-in-browser/package.js
	tools/bundler.js
	tools/compiler.js
	tools/package-client.js
	tools/package-source.js
	tools/package-version-parser.js
	tools/server/boot.js
2015-02-04 13:56:54 -08:00
Sashko Stubailo
35d4223fcc Be careful about paths in boot.js 2015-01-30 15:44:56 -08:00
David Glasser
d4e1f80bf7 Add a comment 2015-01-23 16:43:52 -08:00
gsuess
2bd8eae66b Npm.require load correct submodule 2015-01-23 16:33:10 -08:00
gsuess
be11590dbe Fix Npm.require() package sub-modules. 2015-01-23 16:33:10 -08:00
Slava Kim
296d765cca Package.js:api.addFiles and Assets.get* accept both type of paths 2015-01-20 22:04:24 -08:00
Ben Newman
1aba3a8e7a Eliminate the need for getAppDir in tools/server/shell.js.
Summary:
Instead of expecting the child process to figure out where the
`.meteor/local` directory is, we now tell it explicitly via the
`METEOR_SHELL_DIR` environment variable.

Fixes #3437.

Test Plan:
Run `meteor shell` in a separate terminal and see that it still connects
to an app running from the same app directory.

Reviewers: glasser

Reviewed By: glasser

Differential Revision: https://phabricator.meteor.io/D11
2015-01-20 13:56:57 -05:00
David Glasser
096df9d62d Refactor parent pid check; drop --keepalive
This commit moves parent pid process from the webapp package to the boot
script. This means that daemonized apps without webapp will also exit
when the runner exits, if run from the runner. (For example, several
self-tests such as 'autoupdate' no longer leak node processes.) This is
controlled via the $METEOR_PARENT_PID environment variable instead of
from command line arguments, in order to make fewer assumptions about
how Meteor apps process arguments.

This also drops the old --keepalive support (which already has stopped
being used by the dev mode runner or any MDG deployment platforms).
Neither --parent-pid nor --keepalive were documented beforehand, and
--keepalive was already deprecated before 1.0.

These flags used to also incidentally trigger printing the LISTENING
line; this is now controlled by $METEOR_PRINT_ON_LISTEN.

Fixes #3315.
2015-01-05 15:48:32 -08:00
Ben Newman
f9b7fa19a6 Avoid unnecessary dynamic requires.
CommonJS module identifiers are specified always to use forward slashes,
even on Windows, so there's no value in using path.join or files.pathJoin
to construct module identifiers.
2014-12-16 19:24:58 -05:00
David Glasser
76745d27b2 Document use of undocumented runInThisContext flag
Accidentally removed in 2d827e74f.

Fixes #3200.
2014-12-05 12:19:54 -08:00
David Glasser
c2a4134d97 Update Node to 0.10.33 from 0.10.29
Our npm patch is not yet in a Node 0.10 release (it's in npm 2.1.0).
2014-10-30 15:12:28 -07:00
Ben Newman
830acf651c Implement a meteor shell command.
Summary:
Invoking `meteor shell` starts an interactive REPL for evaluating server-side code.

Shell commands are evaluated in the server process, so the shell's input and output have to be piped through a socket from/to the parent process that runs the `meteor shell` command. This separation accounts for most of the complexity of this diff, but the end result is pretty seamless: tab completion, history, ctlr-c and ctrl-d, etc. all work as expected.

Task: https://app.asana.com/0/15750483766338/16576093991355

Test Plan: Run `meteor run` in one terminal and `meteor shell` in another, evaluate some commands, and verify that the commands seem to be running the context of the server process. Also check tab completion and history, and ensure that the server is running simultaneously with the shell.

Reviewers: dgreenspan, avital, slava, emily, nim, sashko

CC: sashko

Differential Revision: https://phabricator.meteor.com/D837
2014-10-20 14:44:09 -04:00
Sashko Stubailo
857b380416 Remove duplicate part from the docs, move JSDoc comment for Npm.require 2014-09-16 13:52:33 -07:00
David Glasser
98b2885e85 Revert "Upgrade Node to 0.10.30. Fix npm bug again."
This reverts commit 56ff54b085.
2014-08-15 07:21:24 -07:00
David Glasser
56ff54b085 Upgrade Node to 0.10.30. Fix npm bug again. 2014-08-14 10:15:47 -07:00
David Glasser
5a85e2f24c Merge branch 'devel' into packaging
Conflicts:
	tools/bundler.js
	tools/tests/login.js
	tools/unipackage.js
2014-06-23 14:48:21 -07:00
David Glasser
4bec4877e3 after startup, Meteor.startup(c) should call c now
This was the client behavior and is now the server behavior as well.

Fixes #2239.
2014-06-18 17:05:05 -07:00
David Glasser
f2501469b9 Allow apps with no packages 2014-06-17 09:40:59 -07:00
Slava Kim
71d228f14f Merge branch 'server-source-maps' into devel
Enables the support for source maps for the server-side code.
It is very useful when toolings like node-inspector or node-profiler are used.
2014-06-17 00:29:45 -07:00
Slava Kim
4dfcba8bdc Update the comment 2014-06-16 19:36:52 -07:00
Slava Kim
7258643fbf For files with source maps, use absolute paths map the stack-trace. If no source
map found, don't bother.
2014-06-16 19:32:58 -07:00
Slava Kim
21c4caf2f7 Resolve paths with path.resolve 2014-06-16 19:22:33 -07:00
Emily Stark
1180597f06 bump dev bundle; upgrade node 2014-06-16 18:17:21 -07:00
Slava Kim
c8a5800cf0 boot.js passes the absolute path to the loaded source
relative paths confuse node-inspector and possibly other tools
2014-06-15 15:55:09 -07:00
David Glasser
f2e2a781cc Update Node to 0.10.28 which includes our npm fix 2014-05-02 10:59:37 -07:00
Nick Martin
714e513b99 Upgrade Node.js from 0.10.25 to 0.10.26 2014-04-07 22:56:41 -07:00
David Glasser
a49e7def5e Merge branch 'sso' into tool-refactoring
Conflicts:
	tools/meteor.js
	tools/run.js
2014-01-30 10:49:29 -08:00
David Glasser
a7d10d650d Update Node to 0.10.25. Remove bug workaround. 2014-01-23 12:15:29 -08:00
Geoff Schmidt
f2a1d9c71c rename runner.js to run-all.js
make main.js the entry point rather than meteor.js
2014-01-06 22:42:29 -08:00
Geoff Schmidt
7b185ae426 rename run.js -> runner.js 2013-12-30 18:55:48 -08:00
Nick Martin
1b08ac2d9d Upgrade to stock Node 0.10.22.
This discards our fix for stream pausing. We'll monkey patch it in
at startup instead of relying on a custom build.
2013-12-10 15:27:40 -08:00
Emily Stark
652eb0cb89 Merge remote-tracking branch 'origin/follower-node0.10' into follower
Conflicts:
	docs/client/concepts.html
	meteor
	packages/follower-livedata/follower.js
	packages/livedata/livedata_server.js
	packages/webapp/.npm/package/npm-shrinkwrap.json
	packages/webapp/package.js
	packages/webapp/webapp_server.js
	scripts/generate-dev-bundle.sh
	tools/bundler.js
	tools/meteor.js
	tools/server/boot.js
2013-10-31 15:47:17 -07:00
Nick Martin
baa6aa56a0 Bump node version from 0.8.24 to 0.8.26 for Meteor 0.6.5.2 release.
Conflicts:
	History.md
2013-10-21 17:07:01 -07:00
Nick Martin
f4e21c0d37 Bump node version from 0.10.20 to 0.10.21 for Meteor 0.6.6.2 release. 2013-10-20 22:02:25 -07:00
David Glasser
664339fdb3 Yet another Node version bump: to 0.10.20. Fixes tls read bug. 2013-10-03 15:52:19 -07:00
David Glasser
6c1f92e891 Might as well use the version that just got released (0.10.19). 2013-09-24 23:31:47 -07:00
David Glasser
411c6cf8f4 Update to Node 0.10.18, bumping dev bundle version. Use caronte. 2013-09-24 17:13:37 -07:00
Naomi Seyfer
a3e5196109 Todos now runs correctly outside galaxy again. Still have to try the NWO inside galaxy 2013-08-14 17:46:22 -07:00
David Glasser
237f6da87e Store runner.js in test-in-console as an asset; extract via env var.
Allow packages to specify that files are assets, overriding any handler defined
for them. (May be useful for web workers!)

Let Assets.getBinary work before global-imports.js is executed.
2013-07-19 11:27:55 -07:00
David Glasser
74da4b1adb Fix Meteor.release. 2013-07-18 12:40:16 -07:00
David Glasser
9538bec685 Replace "asset directory" concept with manifest of assets.
We were partway here already: the client served assets from the manifest instead
of from a static directory (since 5b8e1c1), and we already generated the list of
assets in the slice JSON file. But on the server, we ignored that list and
re-walked the asset directory at bundle time.

Now, the idea of asset directory is solely a part of initFromAppDir.

This also fixes a bug where assets that weren't associated with on-disk files
wouldn't work properly if Asset.get* is called in a package loaded with
unipackage.load. Not really sure how dev-bundle-fetcher even worked...

Also fixes a bug in builder where generated filenames didn't actually avoid
duplicate files.

This does not bump BUILT_BY because the previous commit did, and this commit
will not be pushed without the previous commit.
2013-07-17 00:01:06 -07:00
David Glasser
869bc23c25 Rename "static" directory to "assets". 2013-07-17 00:01:05 -07:00
Emily Stark
d2eb68c60b Update package name guess to account for no slash in front of path 2013-07-12 16:00:53 -07:00
David Glasser
6eb9cdb69f make it work in node too 2013-07-12 10:11:32 -07:00
David Glasser
269434a44b Inline source code in source maps instead of keeping another data structure. 2013-07-12 10:11:31 -07:00
David Glasser
01a1bc8d6b On server, parse source maps less often. 2013-07-12 10:11:30 -07:00
David Glasser
7456124102 Node stack traces are now rewritten based on (slightly wrong) source maps.
Also, assume that the program.json given to boot.js is relative to CWD, not
source file.
2013-07-12 10:11:29 -07:00