Commit Graph

87 Commits

Author SHA1 Message Date
Slava Kim
6b145a5940 Fix path conversions in a lot of places 2015-01-20 22:03:24 -08:00
ekatek
12d030dd53 completely rewrite of ‘meteor show’; some changes to ‘meteor search’.
The ‘show’ command has been completely rewritten. It has different output
and now does the following:

- Interacts with local package versions. Checks in the local package catalog, and
  returns the local versions along with the server versions. When ‘meteor show’ is
  run with a specific version request (‘meteor show foo@<version>’), default to
  showing the local package version (but show a message that a server version is
  available). Running ‘meteor show foo@local’ will always show the local version
  (useful for version-less local packages).

- Simplify the interface. Instead of various ‘show-*’ flags, we only have one: show-all.
  By default, we only show the top 5 official (non-prerelease) unmigrated versions of a
  package (+ local version, if applicable). This can be overridden with ‘show-all’, and we
  let the user know that more versions are available. For releases, ‘show-all’ will show
  non-recommended releases.

- Display publication time for non-local package versions. This makes it easier to run
  ‘meteor show <name>’ and see if <name> is actively maintained. For local packages,
  we display the root directory (useful for large apps or running with the
  LOCAL_PACKAGE_DIRS variable, for example).

- For non-local package versions, show if the version is ‘installed’ (downloaded into the
  warehouse). This involved minor changes to tropohouse.js. The idea is that this should
  give a pretty good clue whether the version can be added offline.

- Show version dependencies. This should help the user understand, track down and
  debug constraint solver failures.

- Do not show version architectures except in —ejson mode.

- Allow an ‘—ejson’ flag to get the output in EJSON format. That should make scripting
  easier. (As a bonus, for release versions, the EJSON output acts as a nice template
  for the release configuration file.)

The search command now does the following:

- Interacts with local package versions. Specifically, local versions override equivalent
  server versions. Also, ‘search’ works on local packages (so, for example,
  ‘meteor search troposphere’ inside the package server app will give you the troposphere
  package).

- Allows an ‘—ejson’ flag to get the outout in EJSON format.

Minor changes to some minor testing infrastructure:

 - A new skeleton package, package-for-show. Its versions contain different
   values for various metadata, so we can test that metadata comes from
   the right version.

 - In several places, replace the pattern of copying around
   package.js files with using the replace function on a placeholder
   string. (Mostly, as applied to package versions).

This is based on these hackpads: https://mdg.hackpad.com/Showing-Package-Metadata-HdGo3Lzx3hR
and https://mdg.hackpad.com/Meteor-Search-Output-1xxEzrAK9YU.
2015-01-13 13:53:20 -08:00
David Glasser
904325f129 Fix banner showing logic
The missing JSON.parse meant that we were always calling new Date on a
string that started with a quotation mark and getting an invalid date
object, which caused shouldShowBanner to always return false if a banner
had ever been previously printed for that release. Oops. Bug introduced
in 1.0.2.

(At least the non-custom banner still prints.)

Fixes #3353.
2014-12-26 16:30:14 -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
bc53d5f1e4 Use case in buildmessage titles consistently
Job names should not be capitalized (so they look OK in "While xxx"
messages), and are capitalized by the progress bar.

Fixes #3003.
2014-12-11 14:40:16 -08:00
David Glasser
2f90467da0 Optimize constraint solver's catalog interface
We shouldn't ask sqlite for a list of rows and then go back and ask for
each row one by one!

Addresses #3043.
2014-12-01 19:20:28 -08:00
David Glasser
3c1c568530 Add indices for all sqlite queries
Addresses #3043.
2014-12-01 19:03:10 -08:00
David Glasser
d75aba324c use sqlite instead of racy json file for banners 2014-12-01 01:41:13 -08:00
David Glasser
380ab7c327 port meteor publish-for-arch 2014-11-25 09:06:26 -08:00
David Glasser
83421c288a Remove isLocalPackage 2014-11-25 09:06:19 -08:00
David Glasser
ee649d3bda Move isopack-compiler back to compiler 2014-11-25 09:06:15 -08:00
David Glasser
ed4325aca5 Delete getLoadPathForPackage and _build 2014-11-25 09:06:14 -08:00
David Glasser
f404f28275 Use simpler query for getSortedVersions
The old one read and parsed JSON blobs from sqlite instead of just using
pre-existing columns.
2014-11-18 14:02:07 -08:00
David Glasser
4079c2276f ServiceConnection directly loads ddp
Caching works fine here.
2014-11-07 16:45:58 -08:00
David Glasser
170c0acad7 Rename unibuild everywhere to isopackets 2014-11-07 16:45:58 -08:00
David Glasser
371a21d5bc getBuildsForArches is only on catalog.official 2014-10-30 21:34:54 -07:00
ekatek
5e881807fe change the function call to contentQuery 2014-10-23 13:23:02 -07:00
David Glasser
5075c5f618 Avoid triggering a sqlite3 bug
See https://github.com/mapbox/node-sqlite3/pull/355

Note that this bug actually prevented the bug fixed in 2fd65660d1
from being harmful!
2014-10-17 18:42:31 -07:00
David Glasser
87f4a7826f Get a little farther in springboard test 2014-10-17 13:47:21 -07:00
David Glasser
96eebea575 remove unnecessary assertion
add a var
2014-10-17 13:47:21 -07:00
David Glasser
db4ddb7989 Don't refresh twice before even starting commands 2014-10-17 13:47:21 -07:00
Justin SB
8c034a2d7f We "update the package catalog", not package metadata, not refresh 2014-10-17 13:47:20 -07:00
Justin SB
829a1eb588 RemoteCatalog refresh throws now 2014-10-17 13:47:19 -07:00
Justin SB
297a56c42b Remove unused _currentRefreshIsLoud 2014-10-17 13:47:18 -07:00
Justin SB
c03f1d04d3 Get rid of connectionFailed field in retval from updateServerPackageData 2014-10-17 13:47:18 -07:00
David Glasser
41a05fcd9c Eliminate _queryWithRetry 2014-10-17 13:47:18 -07:00
David Glasser
bc863f2231 Add missing vars in catalog-remote.js 2014-10-17 13:47:18 -07:00
David Glasser
fb6828fc32 Rename _simpleQuery to _contentQuery
It queries the content column!
2014-10-17 13:47:18 -07:00
David Glasser
d3d66052c6 Replace calls to _queryAsJSON to _simpleQuery
This drops most instances of retrying
2014-10-17 13:47:17 -07:00
David Glasser
2fd65660d1 Don't reset database AFTER updating!
It already gets reset inside updateServerPackageData!
2014-10-16 17:32:25 -07:00
ekatek
7c7ee4366c fix getReleaseWithTool 2014-10-16 17:14:09 -07:00
Emily Stark
a75ba12c6b Fix stack trace when adding package with no compatible builds 2014-10-16 14:53:14 -07:00
Sashko Stubailo
101b96bdcc Merge branch 'master' into devel 2014-10-13 14:51:41 -07:00
David Glasser
aac410cbb2 fix make-bootstrap-tarballs for sqlite world 2014-10-13 13:55:36 -07:00
Nick Martin
bb72d62ca8 Hide spurious message that pops up sometimes. Users don't need to see
this "everything is OK" message. (Especially since sometime we sync right
after printing it!)
2014-10-12 13:28:41 -07:00
Nick Martin
9fbf759c43 Hide spurious message that pops up sometimes. Users don't need to see
this "everything is OK" message. (Especially since sometime we sync right
after printing it!)
2014-10-12 13:27:24 -07:00
Justin SB
39a40e688a Wrap db open call in retry 2014-10-11 02:52:11 -07:00
Nick Martin
1b548227d9 Merge branch '0.9.4' into devel 2014-10-10 19:50:55 -07:00
ekatek
395438b216 do not call semver.compare on package version
This is a regression caused by the SQL merge. Sorry for not catching it earlier!
We should not be calling semver on meteor package versions outside of the package
version parser package.
2014-10-10 17:29:00 -07:00
Justin SB
c721d6d89e Refactor _retry to allow zero-values 2014-10-10 06:59:12 -07:00
Justin SB
6c5f0b0252 Wrap 'PRAGMA journal_mode=WAL' in a retry loop 2014-10-10 05:33:06 -07:00
David Glasser
cca0112b99 use format 1.1 sync token!
fixes ability to get new styles of data, including
package-depends-on-either-version test
2014-10-08 22:27:38 -07:00
Justin SB
6a031c1daf Merge branch 'android_faster' into devel
Conflicts:
	tools/commands-cordova.js
2014-10-02 21:09:53 -07:00
ekatek
eda7709316 fix forgottenECVs and reduce refresh rate
Two things:
 - to determine if two versions are compatible, we need to know their ECVs. (earliest
compatible versions). If the version that we have is local, then we don't have access to the
version record of the server version, so we can't figure out its ECV. That's why in the olden
days, there was a hack to store ECVs separately ('forgotten ECVs'). The new catalog didn't
have that function implemented -- it might not need it, but in that case, it would need to make
changes to the constraint solver that might be risky at this point. In any case, implementing this
function in the new world is pretty easy and solves the problem for now.

- when we look for things, we look in the local catalog, then the server catalog and if the server
catalog can't find it, it will refresh. However, sometimes, we are looking for something that the
server catalog cannot POSSIBLY have (ie: it has a build ID). That's fine, actually, but it causes
an extra refresh on the server catalog that we don't need. I put in a break to make sure that, if we
know for a fact that the server catalog does not have a version record (ie: it has a build id), we don't
bother looking in it and just return null to begin with. That should help.
2014-10-02 17:46:57 -07:00
Justin SB
6be55e61bf Creating android --getready command 2014-10-01 14:42:30 -07:00
Justin SB
a71f16be32 Implement some toString functions on the catalogs 2014-09-30 18:03:06 -07:00
Justin SB
f5f9b47da8 Add getLatestVersion to catalog-remote.js 2014-09-30 16:49:00 -07:00
Justin SB
6feeed3cf1 getPackage should return a package 2014-09-30 11:15:31 -07:00
Justin SB
29f44d08aa Add missing runInTransaction 2014-09-30 10:18:29 -07:00
Justin SB
6451f45d09 Force all SQL commands to go through a transaction
And also our serialize logic!
2014-09-30 09:37:07 -07:00