Commit Graph

119 Commits

Author SHA1 Message Date
Sashko Stubailo
23359c83ef Fix absolute-ish paths on Windows 2015-01-20 22:06:57 -08:00
Sashko Stubailo
3510ac3fd9 Fix race condition inside mkdir_p 2015-01-20 22:06:57 -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
Sashko Stubailo
1d8491d916 Make linking to meteor tool work 2015-01-20 22:04:23 -08:00
Sashko Stubailo
a737d47aef Convert to OS path when running git 2015-01-20 22:04:23 -08:00
Sashko Stubailo
ea3a316a74 Fix deploy by applying correct permissions to tarball 2015-01-20 22:04:22 -08:00
Slava Kim
68fc748dc1 Convert the path for tar extractor 2015-01-20 22:04:22 -08:00
Slava Kim
d5a51292a4 Fix rimraf call from rm_recursive 2015-01-20 22:04:22 -08:00
Slava Kim
1abcfb5d59 Adapt paths from tarballs deployed by current Meteor
Replace colons with underscores
2015-01-20 22:04:22 -08:00
Sashko Stubailo
459f20e3fa Improve converting line endings 2015-01-20 22:04:21 -08:00
Slava Kim
4bfb2f7780 Don't use path.X in files.js 2015-01-20 22:04:21 -08:00
Slava Kim
727b48d3fa Fix path.join and similar bugs 2015-01-20 22:04:21 -08:00
Slava Kim
9ed25775fe Fix files and path calls in some places 2015-01-20 22:04:21 -08:00
Slava Kim
6b145a5940 Fix path conversions in a lot of places 2015-01-20 22:03:24 -08:00
Slava Kim
2de6867f68 Fix a bad merge 2015-01-20 22:03:24 -08:00
Slava Kim
ec85fabf66 Sometimes we construct paths w/o them being absolute.
For example: files.pathJoin('/something/', '/something/else') should
result into '/something/something/else' and here the caller doesn't
care if the passed arguments look like absolute paths or not. It can
even be a middle part of some larger path. We don't care and shouldn't
enforce it on files.pathJoin
2015-01-20 22:03:23 -08:00
Slava Kim
ed30752377 Put a forgotten return statement 2015-01-20 22:03:23 -08:00
Sashko Stubailo
c62a37c6b5 Replace process.env.HOME with files.getHomeDir()
Conflicts:
	tools/commands-cordova.js
	tools/config.js
	tools/files.js
	tools/selftest.js
	tools/warehouse.js
2015-01-20 22:03:22 -08:00
Sashko Stubailo
07ef66151b Some reorganization of files.js 2015-01-20 22:03:21 -08:00
Sashko Stubailo
7f9c8474f5 Factor out symlinking to meteor tool in selftest and tropohouse 2015-01-20 22:03:21 -08:00
Slava Kim
30b86a805b Reimplement files.rename with the retry logic for Windows 2015-01-20 22:03:21 -08:00
Slava Kim
e8b2a02acc Replace rm_recursive with a modified rimraf 2015-01-20 22:03:21 -08:00
ekatek
afb0915e68 be slightly more efficient in checking if dir exists
Cache the result of the stat call, rather than repeating it.
Also, while at it, rename the function.
2015-01-20 13:37:18 -08:00
ekatek
73a2f50d7d error handling in mkdir_p
Summary:
According to its contract, mkdir -p returns true if the directory
exists (and creates it if needed) and false if the item exists and isn't
a directory (so we couldn't make one). Because directory creation can
be concurrent, we need to wrap the actual mkdir call in a try/catch to handle
this issue (rather than just checking once).

This issue was always here. Previously, the race was against other apps editing
the same directory (which didn't come up that often). As of 1.0.3, files.js is a lot
more yieldy and this becomes a race condition on Meteor itself.

Test Plan: self-test

Reviewers: glasser

Differential Revision: https://phabricator.meteor.io/D15
2015-01-20 13:23:45 -08:00
ekatek
0f6c31cab7 upload README.md files to the server and view the excerpt in meteor show
This commit is based on the following design document:
https://mdg.hackpad.com/Creating-and-Updating-Docs-0ZyyDcSZDxp,
and some other stuff from here: https://mdg.hackpad.com/Meteor-Long-Description-wGZ1vIOwVlF
and was code reviewed here: https://github.com/meteor/meteor/pull/3375

It does the following:

- Allow the user to specify package documentation in Package.Describe.
  We will take the README.md file by default, to make the transition easier.
  Users can specify ‘documentation: null’ to not submit a README.md

- From that documentation, extract the section between the first and second header
  to use as the long form description for the package.

- Upload the documentation to the server at publish-time. Allow metadata changes with ‘publish —update’.

- Change the default package skeleton to include the README.md file.
  Also, changes the skeleton to have fewer useless placeholders in Package.describe values.

- Fix a minor bug where Git did not show up when running ‘meteor show’ on local packages.

A note on ‘documentation: null’ and blank documentation — we don’t let maintainers upload
blank README.md files, because we want to encourage people to fill them out. (Instead,
we allow a ‘documentation: null’ as an override) This is a UX issue! It is not a technical thing.

There is more discussion and code review in: https://github.com/meteor/meteor/pull/3375
2015-01-13 13:53:21 -08:00
David Glasser
da4ae8b3a8 Use files-wrapped pathwatcher
Accidentally broken in 6320acabc4 (the merge of 1.0.2 into devel).
2014-12-29 17:32:35 -08:00
David Glasser
c004cb9356 Update comment for wrapFsFunc 2014-12-29 17:27:13 -08:00
David Glasser
d0311c6f86 Clean up temp dirs from package downloads faster
Rather than waiting until process end.

Also, ensure that simultaneous calls to files.rm_recursive (possible now
that they can yield) can't throw ENOENT.

Fixes #3324.
2014-12-26 16:49:25 -08:00
Ben Newman
2a7cd3268d Rewrite wrapFsFunc to decide whether to yield automatically. 2014-12-16 12:34:43 -05:00
Ben Newman
6b8a8ad9d8 Convert path argument to files.pathwatcherWatch. 2014-12-16 12:32:37 -05:00
Slava Kim
d37a2ab5c3 Make pathwatcher calls go through files.js
Conflicts:
	tools/files.js
	tools/safe-pathwatcher.js
2014-12-15 23:55:34 -08:00
Slava Kim
eb0f8802ad Fix missing brackets around an if statement 2014-12-15 17:21:25 -08:00
Sashko Stubailo
e3636087bd Always convert arguments to an array 2014-12-15 16:28:17 -08:00
Slava Kim
d0aaa93519 Fix broken code for dos2unix absolute path conversion 2014-12-15 15:57:05 -08:00
Sashko Stubailo
e7167e5257 Factor out almost all fs. and path. calls in the tool
This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.

This is a combination of 23 commits. Original messages:
Wrap a large number of fs calls inside files.*

Convert a few more fs calls to files.*

More moving fs.* to files

Implement read/write streams and open/read/close

Get rid of fs from auth.js

Remove fs and unused imports from catalog-local and catalog-remote

Remove unused imports from catalog.js

Replace a whole lot of fs calls

Fix error

Migrate a lot more fs. calls to files.

Add a temporary symlink method

Convert old test to files.*

Use files.pathX instead of path.x everywhere

Replace path.x to files.pathX in tests

Small fixes to files.js and one rename

Make cleanup run in a fiber

Make wrapping functions take function name in case we need it

Add some timeouts and stuff to HCP tests

wrapFsFunc also makes a sync version of the function

Sometimes you just don't want to yield!

Make sure JsImage readFromDisk doesn't yield

Remove unused imports from npm test

Change order of test now that some things don't yield

Fix missing files import, and add a debug error printout
2014-12-15 15:32:06 -08:00
David Glasser
46d31e1ce7 Fix update-related bugs
- don't crash when listing upgraders (2 bugs, introduced on this branch)

- successfully write banners-shown file so that we sometimes print
  shorter banners (introduced with sqlite)

- in self-test tropohouse, keep the sadly necessary symlinks

autoupdate test file now passes!
2014-11-25 09:06:28 -08:00
David Glasser
a9a3411703 checkpoint on 'meteor run' 2014-11-25 09:06:17 -08:00
David Glasser
055575a80c Support .meteor/cordova-plugins 2014-11-25 09:06:17 -08:00
David Glasser
17f5cf6273 'meteor bundle' works with ProjectContext!
- the 'programs' subdirectory is no longer supported

- includeDebug is now an option to bundler.bundle, not global state

- some cordova-specific stuff has been disabled

- lots of other commands are presumably entirely broken
2014-11-25 09:06:12 -08:00
David Glasser
97f6a0236e get rid of catalog.uniload
There is no longer a uniload catalog when running from a release, since
the release contains whole isopackets (programs) not
isopacks (packages).

We only need a uniload-specific catalog when we're actually rebuilding
isopackets (not in order to load them), so we now have it as a local
variable in the two places that build isopackets.

The deleted code in package-loader.js was specific to the prebuilt
uniload package which no longer exists.
2014-11-07 16:45:58 -08:00
David Glasser
4000dfb993 from-checkout builds isopackets on startup
Nothing actually LOADS from isopackets yet.
2014-11-07 16:45:58 -08:00
David Glasser
5bb36203f3 Cache files.inCheckout 2014-11-06 12:43:52 -08:00
David Glasser
5e1086775d Remove more unnecessary buildmessage.captures
Part of #3003.
2014-11-04 17:34:54 -08:00
Justin SB
6a031c1daf Merge branch 'android_faster' into devel
Conflicts:
	tools/commands-cordova.js
2014-10-02 21:09:53 -07:00
Justin SB
afad6e0e43 Work on ios --getready 2014-10-02 21:08:57 -07:00
Sashko Stubailo
d30ee0a69e Fix backcompat for isopack.json, try releasing again 2014-10-01 20:08:43 -07:00
Justin SB
21adbca461 Check the AVD exists, create if not, launch using android-launch 2014-10-01 18:33:43 -07:00
Emily Stark
3b86a3c7a3 Work around fstream weirdnesses.
Before this fix, we were producing tarballs that npm 'tar' couldn't
untar if the first file inside the top-level directory was not
writeable. (Which was indeed the case since the unipackage -> isopack
change, which resulted in isopack.json being the first file in built
package tarballs.) See comment for more explanation.
2014-10-01 18:33:43 -07:00
Emily Stark
5e02e2dade Work around fstream weirdnesses.
Before this fix, we were producing tarballs that npm 'tar' couldn't
untar if the first file inside the top-level directory was not
writeable. (Which was indeed the case since the unipackage -> isopack
change, which resulted in isopack.json being the first file in built
package tarballs.) See comment for more explanation.
2014-10-01 15:19:19 -07:00
Justin SB
6be55e61bf Creating android --getready command 2014-10-01 14:42:30 -07:00