Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of updates #50

Merged
merged 66 commits into from Aug 2, 2013
Merged

Lots of updates #50

merged 66 commits into from Aug 2, 2013

Conversation

cb1kenobi
Copy link
Contributor

  • Added code coverage reporting
  • Added unit tests for contexts and hooks (currently 67% code coverage) (fixes TIMOB-14516)
  • Update readme with latest info
  • Major refactor of argument parser (fixes TIMOB-11869 and TIMOB-13511)
  • Integrated new prompt library (and ripped out old prompt library) (fixes TIMOB-11267, TIMOB-12283, TIMOB-13645, and TIMOB-13633)
  • Added better error verbiage when there are no Titanium SDKs installed or selected (fixes TIMOB-12367)
  • Added cli.progressBars config option and --no-progress-bars option to suppress progress bars (useful when piping output to another app)
  • Added cli.ignoreDirs and cli.ignoreFiles options to globally control ignored dirs/files (fixes TIMOB-14398)
  • Added JSDoc comments for nearly entire code base
  • Added support for full i18n text files for command extended help
  • Added support for --config-file to load an arbitrary CLI config file
  • Added support for --config {json-object} override of CLI config options
  • Config file loading and saving improvements including better default value handling an a new get() helper function
  • Added support for command "validate()" and "run()" functions to be async
  • Added error message if trying to run the Titanium CLI on Node.js 0.6.x or older
  • Better error handling for commands and hooks that have JavaScript syntax errors
  • Added event hooks throughout the Titanium CLI
  • Added CLI config option overrides for ALL non-Appcelerator 3rd party dependency applications (javac, keytool, ndk-build, security, etc)
  • Updated hook API to be more Node-like
    "config" command updates
  • Fixed bug with "cli.prompt" and "cli.quiet" settings not saving properly (fixes TIMOB-13079 and TIMOB-13077)
  • Added new "json-object" output type
  • Updated command to use logger instead of console for output
  • "info" command updates
    • Added support for Titanium SDK 3.2 and newer to use proper Android and iOS detection libraries
    • Added HAXM detection
    • Added node-appc version for Titanium CLI and each Titanium SDK 3.0 and newer
    • Now identifies which iOS certs are expired
    • Added installation issue reporting (requires selected Titanium SDK to be 3.2 or newer)
  • "module" command updates
    • Fixed bug with incorrectly displaying installed modules (fixes TIMOB-13599)
  • "plugin" command updates
    • Complete refactor
    • Properly reports all detected CLI plugins
    • Displays each plugins commands and hooks
  • "sdk" command updates
    • Now checks if the Titanium SDK install location is writeable (fixes TIMOB-14026)
    • Added config option to all users to set the Titanium SDK install location (fixes TIMOB-11988)
    • Added ability to install a Titanium SDK by specifying the git hash of a CI build, a URL, or a local path to the zip file (fixes TIMOB-13593)
    • Removed "update" subcommand, now just use "install"
  • "setup" command updates
    • Fixed bug when saving the settings (fixes TIMOB-12168 and TIMOB-12282)
    • Broke up setup wizard questions into categories

… rest of the commands working again. Still no prompting support.
…ing plugin, module, and sdk commands as well as handle platform specific options.
…ake into account parent options and flags. Fixed bugs with no-colors in config command. Added --output json-object to config command. Fixed argument applying in parser.
…c to the context object. More work on the help command.
…he context. Mostly finished the help command. Bug fixes and user experience improvements.
…orm specific options and flags to help screen.
…code cleanup. Renamed app.sdk config option to sdk.selected. Updated docs.
…ium dir does not exist and when checking if command is a non-sdk command. Major work to the info command and some more work on the setup command.
…) calls. Some cleanup on the info command, but it's currently broken. Added Node.js <0.8 fatal error.
…irs and ignoreFiles regexes. Cleaned up docs.
} else {
logger.log(__('No modules installed') + '\n');
logger.banner()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon

@nebrius
Copy link
Contributor

nebrius commented Aug 1, 2013

Test issue with TIMOB-13633: if you hit ctrl-c when it asks you to enter the name of the sdk to confirm, it goes ahead and uninstalls the SDK.

CB: Fixed in 2d80a02

@nebrius
Copy link
Contributor

nebrius commented Aug 1, 2013

Build is broken on my machine. It crashes with:

Error: ENOENT, no such file or directory '/Users/bhughes/Library/Developer/android-sdk-macosx/add-ons/addon-google_apis-google-10/manifest.ini'

I double checked and the file doesn't exist. There is a manifest2.ini file though...because that makes so much sense of course.

CB: Well, this is a bit of a bummer. For starters, you renamed it from "manifest.ini" to "manifest2.ini" to test TIMOB-13634 and was fixed in tidev/node-appc@6a97652. The problem is this fix is post 3.1.1.GA and has been sitting in node-appc and missed the 3.1.2 boat. In any case, rename the manifest back and re-test an android build.

@nebrius
Copy link
Contributor

nebrius commented Aug 1, 2013

One of the unit tests fails: "should load module without cli arg --platform", with error "AssertionError: expected {} to have own property 'android'". I wonder if this is related to the above error?

CB: Fixed in 6c59cd7

@nebrius
Copy link
Contributor

nebrius commented Aug 1, 2013

On a fresh install of the sdk on Linux, I get the following crash the first time the CLI is run (but not after that):

Titanium Command-Line Interface, CLI version 3.2.0
Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.

Please report bugs to http://jira.appcelerator.org/


/home/bryan/Documents/titanium/node_modules/longjohn/dist/longjohn.js:181
        throw e;
              ^
ENOENT, no such file or directory '/home/bryan/.titanium/analytics.json'

    at fs.statSync (fs.js:684:18)
    at exports.isFileWritable (/home/bryan/Documents/node-appc/lib/fs.js:112:13)
    at /home/bryan/Documents/titanium/lib/titanium.js:263:21
    at Array.filter (native)
    at async.series.enc (/home/bryan/Documents/titanium/lib/titanium.js:262:86)
    at /home/bryan/Documents/titanium/node_modules/async/lib/async.js:486:21
    at /home/bryan/Documents/titanium/node_modules/async/lib/async.js:185:13
    at iterate (/home/bryan/Documents/titanium/node_modules/async/lib/async.js:108:13)
    at /home/bryan/Documents/titanium/node_modules/async/lib/async.js:119:25
    at /home/bryan/Documents/titanium/node_modules/async/lib/async.js:187:17
---------------------------------------------
    at exports.execFile (child_process.js:691:9)
    at exports.exec (child_process.js:578:18)
    at detectLocale (/home/bryan/Documents/titanium/lib/titanium.js:53:4)
    at setLocale (/home/bryan/Documents/titanium/lib/titanium.js:60:3)
    at /home/bryan/Documents/titanium/lib/titanium.js:83:3
    at Object.<anonymous> (/home/bryan/Documents/titanium/lib/titanium.js:85:3)
    at Module._compile (module.js:456:26)
    at Module._extensions..js (module.js:474:10)

CB: Fixed in node-appc. You will need to pull the latest to test. tidev/node-appc@0194413

@nebrius
Copy link
Contributor

nebrius commented Aug 1, 2013

Running setup on Linux I get the following crash:

Titanium Command-Line Interface, CLI version 3.2.0
Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.

Please report bugs to http://jira.appcelerator.org/

Enter ctrl-c at any time to quit

What is your name? (this is used as the default for the "author" field in the tiapp.xml or module manifest file when creating new projects) Bryan Hughes
What is your email address used for logging into the Appcelerator Network? bhughes@appcelerator.com
What would you like as your default locale? (examples: "en", "de", "fr") en

/home/bryan/Documents/titanium/node_modules/longjohn/dist/longjohn.js:181
        throw e;
              ^
Cannot call method 'toString' of null

    at prompt.getInput (/home/bryan/Documents/titanium/node_modules/prompt/lib/prompt.js:497:29)
    at get (/home/bryan/Documents/titanium/node_modules/prompt/lib/prompt.js:321:12)
    at /home/bryan/Documents/titanium/node_modules/prompt/lib/prompt.js:280:7
    at iterate (/home/bryan/Documents/titanium/node_modules/async/lib/async.js:108:13)
    at /home/bryan/Documents/titanium/node_modules/async/lib/async.js:119:25
    at assembler (/home/bryan/Documents/titanium/node_modules/prompt/lib/prompt.js:313:9)
    at /home/bryan/Documents/titanium/node_modules/prompt/lib/prompt.js:322:32
    at /home/bryan/Documents/titanium/node_modules/prompt/lib/prompt.js:597:5
    at onLine (/home/bryan/Documents/titanium/node_modules/prompt/node_modules/read/lib/read.js:111:5)

CB: Some how you are using the old CLI or something. That stack trace shows the old prompt library and the output is similar to the old setup command.

@nebrius
Copy link
Contributor

nebrius commented Aug 2, 2013

When I run:

ti -T device build -p ios

it seems to forget all command line options and prompts me for everything.

CB: Could not reproduce even though I saw you do it. Maybe there's something I'm missing.

…ws when there is no config.json yet. Fixed bug with ios being shown on setup command on non-Mac platforms. Fixed bug with the Android SDK path not being displayed correctly in the setup command.
@nebrius
Copy link
Contributor

nebrius commented Aug 2, 2013

Code reviewed and tested. Request Accepted

nebrius added a commit that referenced this pull request Aug 2, 2013
@nebrius nebrius merged commit 3f2adc2 into master Aug 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants