a';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("").append(M.responseText.replace(/
+
+
+
+## Documentation
+
+### Collections
+
+* [forEach](#forEach)
+* [map](#map)
+* [filter](#filter)
+* [reject](#reject)
+* [reduce](#reduce)
+* [detect](#detect)
+* [sortBy](#sortBy)
+* [some](#some)
+* [every](#every)
+* [concat](#concat)
+
+### Control Flow
+
+* [series](#series)
+* [parallel](#parallel)
+* [whilst](#whilst)
+* [until](#until)
+* [waterfall](#waterfall)
+* [queue](#queue)
+* [auto](#auto)
+* [iterator](#iterator)
+* [apply](#apply)
+* [nextTick](#nextTick)
+
+### Utils
+
+* [memoize](#memoize)
+* [unmemoize](#unmemoize)
+* [log](#log)
+* [dir](#dir)
+* [noConflict](#noConflict)
+
+
+## Collections
+
+
+### forEach(arr, iterator, callback)
+
+Applies an iterator function to each item in an array, in parallel.
+The iterator is called with an item from the list and a callback for when it
+has finished. If the iterator passes an error to this callback, the main
+callback for the forEach function is immediately called with the error.
+
+Note, that since this function applies the iterator to each item in parallel
+there is no guarantee that the iterator functions will complete in order.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* iterator(item, callback) - A function to apply to each item in the array.
+ The iterator is passed a callback which must be called once it has completed.
+* callback(err) - A callback which is called after all the iterator functions
+ have finished, or an error has occurred.
+
+__Example__
+
+ // assuming openFiles is an array of file names and saveFile is a function
+ // to save the modified contents of that file:
+
+ async.forEach(openFiles, saveFile, function(err){
+ // if any of the saves produced an error, err would equal that error
+ });
+
+---------------------------------------
+
+
+### forEachSeries(arr, iterator, callback)
+
+The same as forEach only the iterator is applied to each item in the array in
+series. The next iterator is only called once the current one has completed
+processing. This means the iterator functions will complete in order.
+
+
+---------------------------------------
+
+
+### forEachLimit(arr, limit, iterator, callback)
+
+The same as forEach only the iterator is applied to batches of items in the
+array, in series. The next batch of iterators is only called once the current
+one has completed processing.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* limit - How many items should be in each batch.
+* iterator(item, callback) - A function to apply to each item in the array.
+ The iterator is passed a callback which must be called once it has completed.
+* callback(err) - A callback which is called after all the iterator functions
+ have finished, or an error has occurred.
+
+__Example__
+
+ // Assume documents is an array of JSON objects and requestApi is a
+ // function that interacts with a rate-limited REST api.
+
+ async.forEachLimit(documents, 20, requestApi, function(err){
+ // if any of the saves produced an error, err would equal that error
+ });
+---------------------------------------
+
+
+### map(arr, iterator, callback)
+
+Produces a new array of values by mapping each value in the given array through
+the iterator function. The iterator is called with an item from the array and a
+callback for when it has finished processing. The callback takes 2 arguments,
+an error and the transformed item from the array. If the iterator passes an
+error to this callback, the main callback for the map function is immediately
+called with the error.
+
+Note, that since this function applies the iterator to each item in parallel
+there is no guarantee that the iterator functions will complete in order, however
+the results array will be in the same order as the original array.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* iterator(item, callback) - A function to apply to each item in the array.
+ The iterator is passed a callback which must be called once it has completed
+ with an error (which can be null) and a transformed item.
+* callback(err, results) - A callback which is called after all the iterator
+ functions have finished, or an error has occurred. Results is an array of the
+ transformed items from the original array.
+
+__Example__
+
+ async.map(['file1','file2','file3'], fs.stat, function(err, results){
+ // results is now an array of stats for each file
+ });
+
+---------------------------------------
+
+
+### mapSeries(arr, iterator, callback)
+
+The same as map only the iterator is applied to each item in the array in
+series. The next iterator is only called once the current one has completed
+processing. The results array will be in the same order as the original.
+
+
+---------------------------------------
+
+
+### filter(arr, iterator, callback)
+
+__Alias:__ select
+
+Returns a new array of all the values which pass an async truth test.
+_The callback for each iterator call only accepts a single argument of true or
+false, it does not accept an error argument first!_ This is in-line with the
+way node libraries work with truth tests like path.exists. This operation is
+performed in parallel, but the results array will be in the same order as the
+original.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* iterator(item, callback) - A truth test to apply to each item in the array.
+ The iterator is passed a callback which must be called once it has completed.
+* callback(results) - A callback which is called after all the iterator
+ functions have finished.
+
+__Example__
+
+ async.filter(['file1','file2','file3'], path.exists, function(results){
+ // results now equals an array of the existing files
+ });
+
+---------------------------------------
+
+
+### filterSeries(arr, iterator, callback)
+
+__alias:__ selectSeries
+
+The same as filter only the iterator is applied to each item in the array in
+series. The next iterator is only called once the current one has completed
+processing. The results array will be in the same order as the original.
+
+---------------------------------------
+
+
+### reject(arr, iterator, callback)
+
+The opposite of filter. Removes values that pass an async truth test.
+
+---------------------------------------
+
+
+### rejectSeries(arr, iterator, callback)
+
+The same as filter, only the iterator is applied to each item in the array
+in series.
+
+
+---------------------------------------
+
+
+### reduce(arr, memo, iterator, callback)
+
+__aliases:__ inject, foldl
+
+Reduces a list of values into a single value using an async iterator to return
+each successive step. Memo is the initial state of the reduction. This
+function only operates in series. For performance reasons, it may make sense to
+split a call to this function into a parallel map, then use the normal
+Array.prototype.reduce on the results. This function is for situations where
+each step in the reduction needs to be async, if you can get the data before
+reducing it then its probably a good idea to do so.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* memo - The initial state of the reduction.
+* iterator(memo, item, callback) - A function applied to each item in the
+ array to produce the next step in the reduction. The iterator is passed a
+ callback which accepts an optional error as its first argument, and the state
+ of the reduction as the second. If an error is passed to the callback, the
+ reduction is stopped and the main callback is immediately called with the
+ error.
+* callback(err, result) - A callback which is called after all the iterator
+ functions have finished. Result is the reduced value.
+
+__Example__
+
+ async.reduce([1,2,3], 0, function(memo, item, callback){
+ // pointless async:
+ process.nextTick(function(){
+ callback(null, memo + item)
+ });
+ }, function(err, result){
+ // result is now equal to the last value of memo, which is 6
+ });
+
+---------------------------------------
+
+
+### reduceRight(arr, memo, iterator, callback)
+
+__Alias:__ foldr
+
+Same as reduce, only operates on the items in the array in reverse order.
+
+
+---------------------------------------
+
+
+### detect(arr, iterator, callback)
+
+Returns the first value in a list that passes an async truth test. The
+iterator is applied in parallel, meaning the first iterator to return true will
+fire the detect callback with that result. That means the result might not be
+the first item in the original array (in terms of order) that passes the test.
+
+If order within the original array is important then look at detectSeries.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* iterator(item, callback) - A truth test to apply to each item in the array.
+ The iterator is passed a callback which must be called once it has completed.
+* callback(result) - A callback which is called as soon as any iterator returns
+ true, or after all the iterator functions have finished. Result will be
+ the first item in the array that passes the truth test (iterator) or the
+ value undefined if none passed.
+
+__Example__
+
+ async.detect(['file1','file2','file3'], path.exists, function(result){
+ // result now equals the first file in the list that exists
+ });
+
+---------------------------------------
+
+
+### detectSeries(arr, iterator, callback)
+
+The same as detect, only the iterator is applied to each item in the array
+in series. This means the result is always the first in the original array (in
+terms of array order) that passes the truth test.
+
+
+---------------------------------------
+
+
+### sortBy(arr, iterator, callback)
+
+Sorts a list by the results of running each value through an async iterator.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* iterator(item, callback) - A function to apply to each item in the array.
+ The iterator is passed a callback which must be called once it has completed
+ with an error (which can be null) and a value to use as the sort criteria.
+* callback(err, results) - A callback which is called after all the iterator
+ functions have finished, or an error has occurred. Results is the items from
+ the original array sorted by the values returned by the iterator calls.
+
+__Example__
+
+ async.sortBy(['file1','file2','file3'], function(file, callback){
+ fs.stat(file, function(err, stats){
+ callback(err, stats.mtime);
+ });
+ }, function(err, results){
+ // results is now the original array of files sorted by
+ // modified date
+ });
+
+
+---------------------------------------
+
+
+### some(arr, iterator, callback)
+
+__Alias:__ any
+
+Returns true if at least one element in the array satisfies an async test.
+_The callback for each iterator call only accepts a single argument of true or
+false, it does not accept an error argument first!_ This is in-line with the
+way node libraries work with truth tests like path.exists. Once any iterator
+call returns true, the main callback is immediately called.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* iterator(item, callback) - A truth test to apply to each item in the array.
+ The iterator is passed a callback which must be called once it has completed.
+* callback(result) - A callback which is called as soon as any iterator returns
+ true, or after all the iterator functions have finished. Result will be
+ either true or false depending on the values of the async tests.
+
+__Example__
+
+ async.some(['file1','file2','file3'], path.exists, function(result){
+ // if result is true then at least one of the files exists
+ });
+
+---------------------------------------
+
+
+### every(arr, iterator, callback)
+
+__Alias:__ all
+
+Returns true if every element in the array satisfies an async test.
+_The callback for each iterator call only accepts a single argument of true or
+false, it does not accept an error argument first!_ This is in-line with the
+way node libraries work with truth tests like path.exists.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* iterator(item, callback) - A truth test to apply to each item in the array.
+ The iterator is passed a callback which must be called once it has completed.
+* callback(result) - A callback which is called after all the iterator
+ functions have finished. Result will be either true or false depending on
+ the values of the async tests.
+
+__Example__
+
+ async.every(['file1','file2','file3'], path.exists, function(result){
+ // if result is true then every file exists
+ });
+
+---------------------------------------
+
+
+### concat(arr, iterator, callback)
+
+Applies an iterator to each item in a list, concatenating the results. Returns the
+concatenated list. The iterators are called in parallel, and the results are
+concatenated as they return. There is no guarantee that the results array will
+be returned in the original order of the arguments passed to the iterator function.
+
+__Arguments__
+
+* arr - An array to iterate over
+* iterator(item, callback) - A function to apply to each item in the array.
+ The iterator is passed a callback which must be called once it has completed
+ with an error (which can be null) and an array of results.
+* callback(err, results) - A callback which is called after all the iterator
+ functions have finished, or an error has occurred. Results is an array containing
+ the concatenated results of the iterator function.
+
+__Example__
+
+ async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){
+ // files is now a list of filenames that exist in the 3 directories
+ });
+
+---------------------------------------
+
+
+### concatSeries(arr, iterator, callback)
+
+Same as async.concat, but executes in series instead of parallel.
+
+
+## Control Flow
+
+
+### series(tasks, [callback])
+
+Run an array of functions in series, each one running once the previous
+function has completed. If any functions in the series pass an error to its
+callback, no more functions are run and the callback for the series is
+immediately called with the value of the error. Once the tasks have completed,
+the results are passed to the final callback as an array.
+
+It is also possible to use an object instead of an array. Each property will be
+run as a function and the results will be passed to the final callback as an object
+instead of an array. This can be a more readable way of handling results from
+async.series.
+
+
+__Arguments__
+
+* tasks - An array or object containing functions to run, each function is passed
+ a callback it must call on completion.
+* callback(err, results) - An optional callback to run once all the functions
+ have completed. This function gets an array of all the arguments passed to
+ the callbacks used in the array.
+
+__Example__
+
+ async.series([
+ function(callback){
+ // do some stuff ...
+ callback(null, 'one');
+ },
+ function(callback){
+ // do some more stuff ...
+ callback(null, 'two');
+ },
+ ],
+ // optional callback
+ function(err, results){
+ // results is now equal to ['one', 'two']
+ });
+
+
+ // an example using an object instead of an array
+ async.series({
+ one: function(callback){
+ setTimeout(function(){
+ callback(null, 1);
+ }, 200);
+ },
+ two: function(callback){
+ setTimeout(function(){
+ callback(null, 2);
+ }, 100);
+ },
+ },
+ function(err, results) {
+ // results is now equal to: {one: 1, two: 2}
+ });
+
+
+---------------------------------------
+
+
+### parallel(tasks, [callback])
+
+Run an array of functions in parallel, without waiting until the previous
+function has completed. If any of the functions pass an error to its
+callback, the main callback is immediately called with the value of the error.
+Once the tasks have completed, the results are passed to the final callback as an
+array.
+
+It is also possible to use an object instead of an array. Each property will be
+run as a function and the results will be passed to the final callback as an object
+instead of an array. This can be a more readable way of handling results from
+async.parallel.
+
+
+__Arguments__
+
+* tasks - An array or object containing functions to run, each function is passed a
+ callback it must call on completion.
+* callback(err, results) - An optional callback to run once all the functions
+ have completed. This function gets an array of all the arguments passed to
+ the callbacks used in the array.
+
+__Example__
+
+ async.parallel([
+ function(callback){
+ setTimeout(function(){
+ callback(null, 'one');
+ }, 200);
+ },
+ function(callback){
+ setTimeout(function(){
+ callback(null, 'two');
+ }, 100);
+ },
+ ],
+ // optional callback
+ function(err, results){
+ // the results array will equal ['one','two'] even though
+ // the second function had a shorter timeout.
+ });
+
+
+ // an example using an object instead of an array
+ async.parallel({
+ one: function(callback){
+ setTimeout(function(){
+ callback(null, 1);
+ }, 200);
+ },
+ two: function(callback){
+ setTimeout(function(){
+ callback(null, 2);
+ }, 100);
+ },
+ },
+ function(err, results) {
+ // results is now equals to: {one: 1, two: 2}
+ });
+
+
+---------------------------------------
+
+
+### whilst(test, fn, callback)
+
+Repeatedly call fn, while test returns true. Calls the callback when stopped,
+or an error occurs.
+
+__Arguments__
+
+* test() - synchronous truth test to perform before each execution of fn.
+* fn(callback) - A function to call each time the test passes. The function is
+ passed a callback which must be called once it has completed with an optional
+ error as the first argument.
+* callback(err) - A callback which is called after the test fails and repeated
+ execution of fn has stopped.
+
+__Example__
+
+ var count = 0;
+
+ async.whilst(
+ function () { return count < 5; },
+ function (callback) {
+ count++;
+ setTimeout(callback, 1000);
+ },
+ function (err) {
+ // 5 seconds have passed
+ }
+ );
+
+
+---------------------------------------
+
+
+### until(test, fn, callback)
+
+Repeatedly call fn, until test returns true. Calls the callback when stopped,
+or an error occurs.
+
+The inverse of async.whilst.
+
+
+---------------------------------------
+
+
+### waterfall(tasks, [callback])
+
+Runs an array of functions in series, each passing their results to the next in
+the array. However, if any of the functions pass an error to the callback, the
+next function is not executed and the main callback is immediately called with
+the error.
+
+__Arguments__
+
+* tasks - An array of functions to run, each function is passed a callback it
+ must call on completion.
+* callback(err, [results]) - An optional callback to run once all the functions
+ have completed. This will be passed the results of the last task's callback.
+
+
+
+__Example__
+
+ async.waterfall([
+ function(callback){
+ callback(null, 'one', 'two');
+ },
+ function(arg1, arg2, callback){
+ callback(null, 'three');
+ },
+ function(arg1, callback){
+ // arg1 now equals 'three'
+ callback(null, 'done');
+ }
+ ], function (err, result) {
+ // result now equals 'done'
+ });
+
+
+---------------------------------------
+
+
+### queue(worker, concurrency)
+
+Creates a queue object with the specified concurrency. Tasks added to the
+queue will be processed in parallel (up to the concurrency limit). If all
+workers are in progress, the task is queued until one is available. Once
+a worker has completed a task, the task's callback is called.
+
+__Arguments__
+
+* worker(task, callback) - An asynchronous function for processing a queued
+ task.
+* concurrency - An integer for determining how many worker functions should be
+ run in parallel.
+
+__Queue objects__
+
+The queue object returned by this function has the following properties and
+methods:
+
+* length() - a function returning the number of items waiting to be processed.
+* concurrency - an integer for determining how many worker functions should be
+ run in parallel. This property can be changed after a queue is created to
+ alter the concurrency on-the-fly.
+* push(task, [callback]) - add a new task to the queue, the callback is called
+ once the worker has finished processing the task.
+ instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.
+* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued
+* empty - a callback that is called when the last item from the queue is given to a worker
+* drain - a callback that is called when the last item from the queue has returned from the worker
+
+__Example__
+
+ // create a queue object with concurrency 2
+
+ var q = async.queue(function (task, callback) {
+ console.log('hello ' + task.name);
+ callback();
+ }, 2);
+
+
+ // assign a callback
+ q.drain = function() {
+ console.log('all items have been processed');
+ }
+
+ // add some items to the queue
+
+ q.push({name: 'foo'}, function (err) {
+ console.log('finished processing foo');
+ });
+ q.push({name: 'bar'}, function (err) {
+ console.log('finished processing bar');
+ });
+
+ // add some items to the queue (batch-wise)
+
+ q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {
+ console.log('finished processing bar');
+ });
+
+
+---------------------------------------
+
+
+### auto(tasks, [callback])
+
+Determines the best order for running functions based on their requirements.
+Each function can optionally depend on other functions being completed first,
+and each function is run as soon as its requirements are satisfied. If any of
+the functions pass an error to their callback, that function will not complete
+(so any other functions depending on it will not run) and the main callback
+will be called immediately with the error. Functions also receive an object
+containing the results of functions which have completed so far.
+
+__Arguments__
+
+* tasks - An object literal containing named functions or an array of
+ requirements, with the function itself the last item in the array. The key
+ used for each function or array is used when specifying requirements. The
+ syntax is easier to understand by looking at the example.
+* callback(err, results) - An optional callback which is called when all the
+ tasks have been completed. The callback will receive an error as an argument
+ if any tasks pass an error to their callback. If all tasks complete
+ successfully, it will receive an object containing their results.
+
+__Example__
+
+ async.auto({
+ get_data: function(callback){
+ // async code to get some data
+ },
+ make_folder: function(callback){
+ // async code to create a directory to store a file in
+ // this is run at the same time as getting the data
+ },
+ write_file: ['get_data', 'make_folder', function(callback){
+ // once there is some data and the directory exists,
+ // write the data to a file in the directory
+ callback(null, filename);
+ }],
+ email_link: ['write_file', function(callback, results){
+ // once the file is written let's email a link to it...
+ // results.write_file contains the filename returned by write_file.
+ }]
+ });
+
+This is a fairly trivial example, but to do this using the basic parallel and
+series functions would look like this:
+
+ async.parallel([
+ function(callback){
+ // async code to get some data
+ },
+ function(callback){
+ // async code to create a directory to store a file in
+ // this is run at the same time as getting the data
+ }
+ ],
+ function(results){
+ async.series([
+ function(callback){
+ // once there is some data and the directory exists,
+ // write the data to a file in the directory
+ },
+ email_link: function(callback){
+ // once the file is written let's email a link to it...
+ }
+ ]);
+ });
+
+For a complicated series of async tasks using the auto function makes adding
+new tasks much easier and makes the code more readable.
+
+
+---------------------------------------
+
+
+### iterator(tasks)
+
+Creates an iterator function which calls the next function in the array,
+returning a continuation to call the next one after that. Its also possible to
+'peek' the next iterator by doing iterator.next().
+
+This function is used internally by the async module but can be useful when
+you want to manually control the flow of functions in series.
+
+__Arguments__
+
+* tasks - An array of functions to run, each function is passed a callback it
+ must call on completion.
+
+__Example__
+
+ var iterator = async.iterator([
+ function(){ sys.p('one'); },
+ function(){ sys.p('two'); },
+ function(){ sys.p('three'); }
+ ]);
+
+ node> var iterator2 = iterator();
+ 'one'
+ node> var iterator3 = iterator2();
+ 'two'
+ node> iterator3();
+ 'three'
+ node> var nextfn = iterator2.next();
+ node> nextfn();
+ 'three'
+
+
+---------------------------------------
+
+
+### apply(function, arguments..)
+
+Creates a continuation function with some arguments already applied, a useful
+shorthand when combined with other control flow functions. Any arguments
+passed to the returned function are added to the arguments originally passed
+to apply.
+
+__Arguments__
+
+* function - The function you want to eventually apply all arguments to.
+* arguments... - Any number of arguments to automatically apply when the
+ continuation is called.
+
+__Example__
+
+ // using apply
+
+ async.parallel([
+ async.apply(fs.writeFile, 'testfile1', 'test1'),
+ async.apply(fs.writeFile, 'testfile2', 'test2'),
+ ]);
+
+
+ // the same process without using apply
+
+ async.parallel([
+ function(callback){
+ fs.writeFile('testfile1', 'test1', callback);
+ },
+ function(callback){
+ fs.writeFile('testfile2', 'test2', callback);
+ },
+ ]);
+
+It's possible to pass any number of additional arguments when calling the
+continuation:
+
+ node> var fn = async.apply(sys.puts, 'one');
+ node> fn('two', 'three');
+ one
+ two
+ three
+
+---------------------------------------
+
+
+### nextTick(callback)
+
+Calls the callback on a later loop around the event loop. In node.js this just
+calls process.nextTick, in the browser it falls back to setTimeout(callback, 0),
+which means other higher priority events may precede the execution of the callback.
+
+This is used internally for browser-compatibility purposes.
+
+__Arguments__
+
+* callback - The function to call on a later loop around the event loop.
+
+__Example__
+
+ var call_order = [];
+ async.nextTick(function(){
+ call_order.push('two');
+ // call_order now equals ['one','two]
+ });
+ call_order.push('one')
+
+
+## Utils
+
+
+### memoize(fn, [hasher])
+
+Caches the results of an async function. When creating a hash to store function
+results against, the callback is omitted from the hash and an optional hash
+function can be used.
+
+__Arguments__
+
+* fn - the function you to proxy and cache results from.
+* hasher - an optional function for generating a custom hash for storing
+ results, it has all the arguments applied to it apart from the callback, and
+ must be synchronous.
+
+__Example__
+
+ var slow_fn = function (name, callback) {
+ // do something
+ callback(null, result);
+ };
+ var fn = async.memoize(slow_fn);
+
+ // fn can now be used as if it were slow_fn
+ fn('some name', function () {
+ // callback
+ });
+
+
+### unmemoize(fn)
+
+Undoes a memoized function, reverting it to the original, unmemoized
+form. Comes handy in tests.
+
+__Arguments__
+
+* fn - the memoized function
+
+
+### log(function, arguments)
+
+Logs the result of an async function to the console. Only works in node.js or
+in browsers that support console.log and console.error (such as FF and Chrome).
+If multiple arguments are returned from the async function, console.log is
+called on each argument in order.
+
+__Arguments__
+
+* function - The function you want to eventually apply all arguments to.
+* arguments... - Any number of arguments to apply to the function.
+
+__Example__
+
+ var hello = function(name, callback){
+ setTimeout(function(){
+ callback(null, 'hello ' + name);
+ }, 1000);
+ };
+
+ node> async.log(hello, 'world');
+ 'hello world'
+
+
+---------------------------------------
+
+
+### dir(function, arguments)
+
+Logs the result of an async function to the console using console.dir to
+display the properties of the resulting object. Only works in node.js or
+in browsers that support console.dir and console.error (such as FF and Chrome).
+If multiple arguments are returned from the async function, console.dir is
+called on each argument in order.
+
+__Arguments__
+
+* function - The function you want to eventually apply all arguments to.
+* arguments... - Any number of arguments to apply to the function.
+
+__Example__
+
+ var hello = function(name, callback){
+ setTimeout(function(){
+ callback(null, {hello: name});
+ }, 1000);
+ };
+
+ node> async.dir(hello, 'world');
+ {hello: 'world'}
+
+
+---------------------------------------
+
+
+### noConflict()
+
+Changes the value of async back to its original value, returning a reference to the
+async object.
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/async/index.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/async/index.js
new file mode 100644
index 0000000..8e23845
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/async/index.js
@@ -0,0 +1,3 @@
+// This file is just added for convenience so this repository can be
+// directly checked out into a project's deps folder
+module.exports = require('./lib/async');
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/async/lib/async.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/async/lib/async.js
new file mode 100644
index 0000000..7cc4f5e
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/async/lib/async.js
@@ -0,0 +1,692 @@
+/*global setTimeout: false, console: false */
+(function () {
+
+ var async = {};
+
+ // global on the server, window in the browser
+ var root = this,
+ previous_async = root.async;
+
+ if (typeof module !== 'undefined' && module.exports) {
+ module.exports = async;
+ }
+ else {
+ root.async = async;
+ }
+
+ async.noConflict = function () {
+ root.async = previous_async;
+ return async;
+ };
+
+ //// cross-browser compatiblity functions ////
+
+ var _forEach = function (arr, iterator) {
+ if (arr.forEach) {
+ return arr.forEach(iterator);
+ }
+ for (var i = 0; i < arr.length; i += 1) {
+ iterator(arr[i], i, arr);
+ }
+ };
+
+ var _map = function (arr, iterator) {
+ if (arr.map) {
+ return arr.map(iterator);
+ }
+ var results = [];
+ _forEach(arr, function (x, i, a) {
+ results.push(iterator(x, i, a));
+ });
+ return results;
+ };
+
+ var _reduce = function (arr, iterator, memo) {
+ if (arr.reduce) {
+ return arr.reduce(iterator, memo);
+ }
+ _forEach(arr, function (x, i, a) {
+ memo = iterator(memo, x, i, a);
+ });
+ return memo;
+ };
+
+ var _keys = function (obj) {
+ if (Object.keys) {
+ return Object.keys(obj);
+ }
+ var keys = [];
+ for (var k in obj) {
+ if (obj.hasOwnProperty(k)) {
+ keys.push(k);
+ }
+ }
+ return keys;
+ };
+
+ //// exported async module functions ////
+
+ //// nextTick implementation with browser-compatible fallback ////
+ if (typeof process === 'undefined' || !(process.nextTick)) {
+ async.nextTick = function (fn) {
+ setTimeout(fn, 0);
+ };
+ }
+ else {
+ async.nextTick = process.nextTick;
+ }
+
+ async.forEach = function (arr, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length) {
+ return callback();
+ }
+ var completed = 0;
+ _forEach(arr, function (x) {
+ iterator(x, function (err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ if (completed === arr.length) {
+ callback(null);
+ }
+ }
+ });
+ });
+ };
+
+ async.forEachSeries = function (arr, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length) {
+ return callback();
+ }
+ var completed = 0;
+ var iterate = function () {
+ iterator(arr[completed], function (err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ if (completed === arr.length) {
+ callback(null);
+ }
+ else {
+ iterate();
+ }
+ }
+ });
+ };
+ iterate();
+ };
+
+ async.forEachLimit = function (arr, limit, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length || limit <= 0) {
+ return callback();
+ }
+ var completed = 0;
+ var started = 0;
+ var running = 0;
+
+ (function replenish () {
+ if (completed === arr.length) {
+ return callback();
+ }
+
+ while (running < limit && started < arr.length) {
+ started += 1;
+ running += 1;
+ iterator(arr[started - 1], function (err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ running -= 1;
+ if (completed === arr.length) {
+ callback();
+ }
+ else {
+ replenish();
+ }
+ }
+ });
+ }
+ })();
+ };
+
+
+ var doParallel = function (fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [async.forEach].concat(args));
+ };
+ };
+ var doSeries = function (fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [async.forEachSeries].concat(args));
+ };
+ };
+
+
+ var _asyncMap = function (eachfn, arr, iterator, callback) {
+ var results = [];
+ arr = _map(arr, function (x, i) {
+ return {index: i, value: x};
+ });
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (err, v) {
+ results[x.index] = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+ };
+ async.map = doParallel(_asyncMap);
+ async.mapSeries = doSeries(_asyncMap);
+
+
+ // reduce only has a series version, as doing reduce in parallel won't
+ // work in many situations.
+ async.reduce = function (arr, memo, iterator, callback) {
+ async.forEachSeries(arr, function (x, callback) {
+ iterator(memo, x, function (err, v) {
+ memo = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, memo);
+ });
+ };
+ // inject alias
+ async.inject = async.reduce;
+ // foldl alias
+ async.foldl = async.reduce;
+
+ async.reduceRight = function (arr, memo, iterator, callback) {
+ var reversed = _map(arr, function (x) {
+ return x;
+ }).reverse();
+ async.reduce(reversed, memo, iterator, callback);
+ };
+ // foldr alias
+ async.foldr = async.reduceRight;
+
+ var _filter = function (eachfn, arr, iterator, callback) {
+ var results = [];
+ arr = _map(arr, function (x, i) {
+ return {index: i, value: x};
+ });
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (v) {
+ if (v) {
+ results.push(x);
+ }
+ callback();
+ });
+ }, function (err) {
+ callback(_map(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), function (x) {
+ return x.value;
+ }));
+ });
+ };
+ async.filter = doParallel(_filter);
+ async.filterSeries = doSeries(_filter);
+ // select alias
+ async.select = async.filter;
+ async.selectSeries = async.filterSeries;
+
+ var _reject = function (eachfn, arr, iterator, callback) {
+ var results = [];
+ arr = _map(arr, function (x, i) {
+ return {index: i, value: x};
+ });
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (v) {
+ if (!v) {
+ results.push(x);
+ }
+ callback();
+ });
+ }, function (err) {
+ callback(_map(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), function (x) {
+ return x.value;
+ }));
+ });
+ };
+ async.reject = doParallel(_reject);
+ async.rejectSeries = doSeries(_reject);
+
+ var _detect = function (eachfn, arr, iterator, main_callback) {
+ eachfn(arr, function (x, callback) {
+ iterator(x, function (result) {
+ if (result) {
+ main_callback(x);
+ main_callback = function () {};
+ }
+ else {
+ callback();
+ }
+ });
+ }, function (err) {
+ main_callback();
+ });
+ };
+ async.detect = doParallel(_detect);
+ async.detectSeries = doSeries(_detect);
+
+ async.some = function (arr, iterator, main_callback) {
+ async.forEach(arr, function (x, callback) {
+ iterator(x, function (v) {
+ if (v) {
+ main_callback(true);
+ main_callback = function () {};
+ }
+ callback();
+ });
+ }, function (err) {
+ main_callback(false);
+ });
+ };
+ // any alias
+ async.any = async.some;
+
+ async.every = function (arr, iterator, main_callback) {
+ async.forEach(arr, function (x, callback) {
+ iterator(x, function (v) {
+ if (!v) {
+ main_callback(false);
+ main_callback = function () {};
+ }
+ callback();
+ });
+ }, function (err) {
+ main_callback(true);
+ });
+ };
+ // all alias
+ async.all = async.every;
+
+ async.sortBy = function (arr, iterator, callback) {
+ async.map(arr, function (x, callback) {
+ iterator(x, function (err, criteria) {
+ if (err) {
+ callback(err);
+ }
+ else {
+ callback(null, {value: x, criteria: criteria});
+ }
+ });
+ }, function (err, results) {
+ if (err) {
+ return callback(err);
+ }
+ else {
+ var fn = function (left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ };
+ callback(null, _map(results.sort(fn), function (x) {
+ return x.value;
+ }));
+ }
+ });
+ };
+
+ async.auto = function (tasks, callback) {
+ callback = callback || function () {};
+ var keys = _keys(tasks);
+ if (!keys.length) {
+ return callback(null);
+ }
+
+ var results = {};
+
+ var listeners = [];
+ var addListener = function (fn) {
+ listeners.unshift(fn);
+ };
+ var removeListener = function (fn) {
+ for (var i = 0; i < listeners.length; i += 1) {
+ if (listeners[i] === fn) {
+ listeners.splice(i, 1);
+ return;
+ }
+ }
+ };
+ var taskComplete = function () {
+ _forEach(listeners.slice(0), function (fn) {
+ fn();
+ });
+ };
+
+ addListener(function () {
+ if (_keys(results).length === keys.length) {
+ callback(null, results);
+ callback = function () {};
+ }
+ });
+
+ _forEach(keys, function (k) {
+ var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k];
+ var taskCallback = function (err) {
+ if (err) {
+ callback(err);
+ // stop subsequent errors hitting callback multiple times
+ callback = function () {};
+ }
+ else {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[k] = args;
+ taskComplete();
+ }
+ };
+ var requires = task.slice(0, Math.abs(task.length - 1)) || [];
+ var ready = function () {
+ return _reduce(requires, function (a, x) {
+ return (a && results.hasOwnProperty(x));
+ }, true) && !results.hasOwnProperty(k);
+ };
+ if (ready()) {
+ task[task.length - 1](taskCallback, results);
+ }
+ else {
+ var listener = function () {
+ if (ready()) {
+ removeListener(listener);
+ task[task.length - 1](taskCallback, results);
+ }
+ };
+ addListener(listener);
+ }
+ });
+ };
+
+ async.waterfall = function (tasks, callback) {
+ callback = callback || function () {};
+ if (!tasks.length) {
+ return callback();
+ }
+ var wrapIterator = function (iterator) {
+ return function (err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ var args = Array.prototype.slice.call(arguments, 1);
+ var next = iterator.next();
+ if (next) {
+ args.push(wrapIterator(next));
+ }
+ else {
+ args.push(callback);
+ }
+ async.nextTick(function () {
+ iterator.apply(null, args);
+ });
+ }
+ };
+ };
+ wrapIterator(async.iterator(tasks))();
+ };
+
+ async.parallel = function (tasks, callback) {
+ callback = callback || function () {};
+ if (tasks.constructor === Array) {
+ async.map(tasks, function (fn, callback) {
+ if (fn) {
+ fn(function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ callback.call(null, err, args);
+ });
+ }
+ }, callback);
+ }
+ else {
+ var results = {};
+ async.forEach(_keys(tasks), function (k, callback) {
+ tasks[k](function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[k] = args;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+ };
+
+ async.series = function (tasks, callback) {
+ callback = callback || function () {};
+ if (tasks.constructor === Array) {
+ async.mapSeries(tasks, function (fn, callback) {
+ if (fn) {
+ fn(function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ callback.call(null, err, args);
+ });
+ }
+ }, callback);
+ }
+ else {
+ var results = {};
+ async.forEachSeries(_keys(tasks), function (k, callback) {
+ tasks[k](function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[k] = args;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+ };
+
+ async.iterator = function (tasks) {
+ var makeCallback = function (index) {
+ var fn = function () {
+ if (tasks.length) {
+ tasks[index].apply(null, arguments);
+ }
+ return fn.next();
+ };
+ fn.next = function () {
+ return (index < tasks.length - 1) ? makeCallback(index + 1): null;
+ };
+ return fn;
+ };
+ return makeCallback(0);
+ };
+
+ async.apply = function (fn) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return function () {
+ return fn.apply(
+ null, args.concat(Array.prototype.slice.call(arguments))
+ );
+ };
+ };
+
+ var _concat = function (eachfn, arr, fn, callback) {
+ var r = [];
+ eachfn(arr, function (x, cb) {
+ fn(x, function (err, y) {
+ r = r.concat(y || []);
+ cb(err);
+ });
+ }, function (err) {
+ callback(err, r);
+ });
+ };
+ async.concat = doParallel(_concat);
+ async.concatSeries = doSeries(_concat);
+
+ async.whilst = function (test, iterator, callback) {
+ if (test()) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ async.whilst(test, iterator, callback);
+ });
+ }
+ else {
+ callback();
+ }
+ };
+
+ async.until = function (test, iterator, callback) {
+ if (!test()) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ async.until(test, iterator, callback);
+ });
+ }
+ else {
+ callback();
+ }
+ };
+
+ async.queue = function (worker, concurrency) {
+ var workers = 0;
+ var q = {
+ tasks: [],
+ concurrency: concurrency,
+ saturated: null,
+ empty: null,
+ drain: null,
+ push: function (data, callback) {
+ if(data.constructor !== Array) {
+ data = [data];
+ }
+ _forEach(data, function(task) {
+ q.tasks.push({
+ data: task,
+ callback: typeof callback === 'function' ? callback : null
+ });
+ if (q.saturated && q.tasks.length == concurrency) {
+ q.saturated();
+ }
+ async.nextTick(q.process);
+ });
+ },
+ process: function () {
+ if (workers < q.concurrency && q.tasks.length) {
+ var task = q.tasks.shift();
+ if(q.empty && q.tasks.length == 0) q.empty();
+ workers += 1;
+ worker(task.data, function () {
+ workers -= 1;
+ if (task.callback) {
+ task.callback.apply(task, arguments);
+ }
+ if(q.drain && q.tasks.length + workers == 0) q.drain();
+ q.process();
+ });
+ }
+ },
+ length: function () {
+ return q.tasks.length;
+ },
+ running: function () {
+ return workers;
+ }
+ };
+ return q;
+ };
+
+ var _console_fn = function (name) {
+ return function (fn) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ fn.apply(null, args.concat([function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (typeof console !== 'undefined') {
+ if (err) {
+ if (console.error) {
+ console.error(err);
+ }
+ }
+ else if (console[name]) {
+ _forEach(args, function (x) {
+ console[name](x);
+ });
+ }
+ }
+ }]));
+ };
+ };
+ async.log = _console_fn('log');
+ async.dir = _console_fn('dir');
+ /*async.info = _console_fn('info');
+ async.warn = _console_fn('warn');
+ async.error = _console_fn('error');*/
+
+ async.memoize = function (fn, hasher) {
+ var memo = {};
+ var queues = {};
+ hasher = hasher || function (x) {
+ return x;
+ };
+ var memoized = function () {
+ var args = Array.prototype.slice.call(arguments);
+ var callback = args.pop();
+ var key = hasher.apply(null, args);
+ if (key in memo) {
+ callback.apply(null, memo[key]);
+ }
+ else if (key in queues) {
+ queues[key].push(callback);
+ }
+ else {
+ queues[key] = [callback];
+ fn.apply(null, args.concat([function () {
+ memo[key] = arguments;
+ var q = queues[key];
+ delete queues[key];
+ for (var i = 0, l = q.length; i < l; i++) {
+ q[i].apply(null, arguments);
+ }
+ }]));
+ }
+ };
+ memoized.unmemoized = fn;
+ return memoized;
+ };
+
+ async.unmemoize = function (fn) {
+ return function () {
+ return (fn.unmemoized || fn).apply(null, arguments);
+ };
+ };
+
+}());
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/async/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/async/package.json
new file mode 100644
index 0000000..80fc13a
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/async/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "async",
+ "description": "Higher-order functions and common patterns for asynchronous code",
+ "main": "./index",
+ "author": {
+ "name": "Caolan McMahon"
+ },
+ "version": "0.1.22",
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/caolan/async.git"
+ },
+ "bugs": {
+ "url": "http://github.com/caolan/async/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/caolan/async/raw/master/LICENSE"
+ }
+ ],
+ "devDependencies": {
+ "nodeunit": ">0.0.0",
+ "uglify-js": "1.2.x",
+ "nodelint": ">0.0.0"
+ },
+ "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser.\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, forEach…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n async.parallel([\n function(){ ... },\n function(){ ... }\n ], callback);\n\n async.series([\n function(){ ... },\n function(){ ... }\n ]);\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n\n## Download\n\nReleases are available for download from\n[GitHub](http://github.com/caolan/async/downloads).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed\n\n__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped\n\n\n## In the Browser\n\nSo far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n \n \n\n\n## Documentation\n\n### Collections\n\n* [forEach](#forEach)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [until](#until)\n* [waterfall](#waterfall)\n* [queue](#queue)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n### forEach(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the forEach function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // assuming openFiles is an array of file names and saveFile is a function\n // to save the modified contents of that file:\n\n async.forEach(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n\n---------------------------------------\n\n\n### forEachSeries(arr, iterator, callback)\n\nThe same as forEach only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n### forEachLimit(arr, limit, iterator, callback)\n\nThe same as forEach only the iterator is applied to batches of items in the\narray, in series. The next batch of iterators is only called once the current\none has completed processing.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - How many items should be in each batch.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // Assume documents is an array of JSON objects and requestApi is a\n // function that interacts with a rate-limited REST api.\n\n async.forEachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as filter, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then its probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback which accepts an optional error as its first argument, and the state\n of the reduction as the second. If an error is passed to the callback, the\n reduction is stopped and the main callback is immediately called with the\n error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n async.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n }, function(err, result){\n // result is now equal to the last value of memo, which is 6\n });\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n async.detect(['file1','file2','file3'], path.exists, function(result){\n // result now equals the first file in the list that exists\n });\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a value to use as the sort criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n async.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n }, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n });\n\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n async.some(['file1','file2','file3'], path.exists, function(result){\n // if result is true then at least one of the files exists\n });\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n async.every(['file1','file2','file3'], path.exists, function(result){\n // if result is true then every file exists\n });\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n });\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n },\n ],\n // optional callback\n function(err, results){\n // results is now equal to ['one', 'two']\n });\n\n\n // an example using an object instead of an array\n async.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equal to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed a\n callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n },\n ],\n // optional callback\n function(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n });\n\n\n // an example using an object instead of an array\n async.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equals to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback which must be called once it has completed with an optional\n error as the first argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n var count = 0;\n\n async.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n );\n\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n async.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n ], function (err, result) {\n // result now equals 'done' \n });\n\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n // create a queue object with concurrency 2\n\n var q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n }, 2);\n\n\n // assign a callback\n q.drain = function() {\n console.log('all items have been processed');\n }\n\n // add some items to the queue\n\n q.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n });\n q.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n });\n\n // add some items to the queue (batch-wise)\n\n q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n });\n\n\n---------------------------------------\n\n\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The\n syntax is easier to understand by looking at the example.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. If all tasks complete\n successfully, it will receive an object containing their results.\n\n__Example__\n\n async.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n });\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n async.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n ],\n function(results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n email_link: function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n });\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. Its also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n\n__Example__\n\n var iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n ]);\n\n node> var iterator2 = iterator();\n 'one'\n node> var iterator3 = iterator2();\n 'two'\n node> iterator3();\n 'three'\n node> var nextfn = iterator2.next();\n node> nextfn();\n 'three'\n\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n // using apply\n\n async.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n ]);\n\n\n // the same process without using apply\n\n async.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n },\n ]);\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n node> var fn = async.apply(sys.puts, 'one');\n node> fn('two', 'three');\n one\n two\n three\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setTimeout(callback, 0),\nwhich means other higher priority events may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n var call_order = [];\n async.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two]\n });\n call_order.push('one')\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n var slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n };\n var fn = async.memoize(slow_fn);\n\n // fn can now be used as if it were slow_fn\n fn('some name', function () {\n // callback\n });\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n };\n\n node> async.log(hello, 'world');\n 'hello world'\n\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n };\n\n node> async.dir(hello, 'world');\n {hello: 'world'}\n\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n",
+ "readmeFilename": "README.md",
+ "_id": "async@0.1.22",
+ "_from": "async@0.1.x"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/MIT-LICENSE.txt b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/MIT-LICENSE.txt
new file mode 100644
index 0000000..7dca107
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/MIT-LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2010
+
+Marak Squires
+Alexis Sellier (cloudhead)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/ReadMe.md b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/ReadMe.md
new file mode 100644
index 0000000..0eda52d
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/ReadMe.md
@@ -0,0 +1,77 @@
+# colors.js - get color and style in your node.js console ( and browser ) like what
+
+
+
+
+## Installation
+
+ npm install colors
+
+## colors and styles!
+
+- bold
+- italic
+- underline
+- inverse
+- yellow
+- cyan
+- white
+- magenta
+- green
+- red
+- grey
+- blue
+- rainbow
+- zebra
+- random
+
+## Usage
+
+``` js
+var colors = require('./colors');
+
+console.log('hello'.green); // outputs green text
+console.log('i like cake and pies'.underline.red) // outputs red underlined text
+console.log('inverse the color'.inverse); // inverses the color
+console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)
+```
+
+# Creating Custom themes
+
+```js
+
+var colors = require('colors');
+
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+```
+
+
+### Contributors
+
+Marak (Marak Squires)
+Alexis Sellier (cloudhead)
+mmalecki (Maciej Małecki)
+nicoreed (Nico Reed)
+morganrallen (Morgan Allen)
+JustinCampbell (Justin Campbell)
+ded (Dustin Diaz)
+
+
+#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/colors.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/colors.js
new file mode 100644
index 0000000..7a537d8
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/colors.js
@@ -0,0 +1,342 @@
+/*
+colors.js
+
+Copyright (c) 2010
+
+Marak Squires
+Alexis Sellier (cloudhead)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+
+var isHeadless = false;
+
+if (typeof module !== 'undefined') {
+ isHeadless = true;
+}
+
+if (!isHeadless) {
+ var exports = {};
+ var module = {};
+ var colors = exports;
+ exports.mode = "browser";
+} else {
+ exports.mode = "console";
+}
+
+//
+// Prototypes the string object to have additional method calls that add terminal colors
+//
+var addProperty = function (color, func) {
+ exports[color] = function (str) {
+ return func.apply(str);
+ };
+ String.prototype.__defineGetter__(color, func);
+};
+
+function stylize(str, style) {
+
+ var styles;
+
+ if (exports.mode === 'console') {
+ styles = {
+ //styles
+ 'bold' : ['\x1B[1m', '\x1B[22m'],
+ 'italic' : ['\x1B[3m', '\x1B[23m'],
+ 'underline' : ['\x1B[4m', '\x1B[24m'],
+ 'inverse' : ['\x1B[7m', '\x1B[27m'],
+ 'strikethrough' : ['\x1B[9m', '\x1B[29m'],
+ //text colors
+ //grayscale
+ 'white' : ['\x1B[37m', '\x1B[39m'],
+ 'grey' : ['\x1B[90m', '\x1B[39m'],
+ 'black' : ['\x1B[30m', '\x1B[39m'],
+ //colors
+ 'blue' : ['\x1B[34m', '\x1B[39m'],
+ 'cyan' : ['\x1B[36m', '\x1B[39m'],
+ 'green' : ['\x1B[32m', '\x1B[39m'],
+ 'magenta' : ['\x1B[35m', '\x1B[39m'],
+ 'red' : ['\x1B[31m', '\x1B[39m'],
+ 'yellow' : ['\x1B[33m', '\x1B[39m'],
+ //background colors
+ //grayscale
+ 'whiteBG' : ['\x1B[47m', '\x1B[49m'],
+ 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'],
+ 'blackBG' : ['\x1B[40m', '\x1B[49m'],
+ //colors
+ 'blueBG' : ['\x1B[44m', '\x1B[49m'],
+ 'cyanBG' : ['\x1B[46m', '\x1B[49m'],
+ 'greenBG' : ['\x1B[42m', '\x1B[49m'],
+ 'magentaBG' : ['\x1B[45m', '\x1B[49m'],
+ 'redBG' : ['\x1B[41m', '\x1B[49m'],
+ 'yellowBG' : ['\x1B[43m', '\x1B[49m']
+ };
+ } else if (exports.mode === 'browser') {
+ styles = {
+ //styles
+ 'bold' : ['', ''],
+ 'italic' : ['', ''],
+ 'underline' : ['', ''],
+ 'inverse' : ['', ''],
+ 'strikethrough' : ['', ''],
+ //text colors
+ //grayscale
+ 'white' : ['', ''],
+ 'grey' : ['', ''],
+ 'black' : ['', ''],
+ //colors
+ 'blue' : ['', ''],
+ 'cyan' : ['', ''],
+ 'green' : ['', ''],
+ 'magenta' : ['', ''],
+ 'red' : ['', ''],
+ 'yellow' : ['', ''],
+ //background colors
+ //grayscale
+ 'whiteBG' : ['', ''],
+ 'greyBG' : ['', ''],
+ 'blackBG' : ['', ''],
+ //colors
+ 'blueBG' : ['', ''],
+ 'cyanBG' : ['', ''],
+ 'greenBG' : ['', ''],
+ 'magentaBG' : ['', ''],
+ 'redBG' : ['', ''],
+ 'yellowBG' : ['', '']
+ };
+ } else if (exports.mode === 'none') {
+ return str + '';
+ } else {
+ console.log('unsupported mode, try "browser", "console" or "none"');
+ }
+ return styles[style][0] + str + styles[style][1];
+}
+
+function applyTheme(theme) {
+
+ //
+ // Remark: This is a list of methods that exist
+ // on String that you should not overwrite.
+ //
+ var stringPrototypeBlacklist = [
+ '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
+ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
+ 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
+ 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
+ ];
+
+ Object.keys(theme).forEach(function (prop) {
+ if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
+ console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
+ }
+ else {
+ if (typeof(theme[prop]) === 'string') {
+ addProperty(prop, function () {
+ return exports[theme[prop]](this);
+ });
+ }
+ else {
+ addProperty(prop, function () {
+ var ret = this;
+ for (var t = 0; t < theme[prop].length; t++) {
+ ret = exports[theme[prop][t]](ret);
+ }
+ return ret;
+ });
+ }
+ }
+ });
+}
+
+
+//
+// Iterate through all default styles and colors
+//
+var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG'];
+x.forEach(function (style) {
+
+ // __defineGetter__ at the least works in more browsers
+ // http://robertnyman.com/javascript/javascript-getters-setters.html
+ // Object.defineProperty only works in Chrome
+ addProperty(style, function () {
+ return stylize(this, style);
+ });
+});
+
+function sequencer(map) {
+ return function () {
+ if (!isHeadless) {
+ return this.replace(/( )/, '$1');
+ }
+ var exploded = this.split(""), i = 0;
+ exploded = exploded.map(map);
+ return exploded.join("");
+ };
+}
+
+var rainbowMap = (function () {
+ var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
+ return function (letter, i, exploded) {
+ if (letter === " ") {
+ return letter;
+ } else {
+ return stylize(letter, rainbowColors[i++ % rainbowColors.length]);
+ }
+ };
+})();
+
+exports.themes = {};
+
+exports.addSequencer = function (name, map) {
+ addProperty(name, sequencer(map));
+};
+
+exports.addSequencer('rainbow', rainbowMap);
+exports.addSequencer('zebra', function (letter, i, exploded) {
+ return i % 2 === 0 ? letter : letter.inverse;
+});
+
+exports.setTheme = function (theme) {
+ if (typeof theme === 'string') {
+ try {
+ exports.themes[theme] = require(theme);
+ applyTheme(exports.themes[theme]);
+ return exports.themes[theme];
+ } catch (err) {
+ console.log(err);
+ return err;
+ }
+ } else {
+ applyTheme(theme);
+ }
+};
+
+
+addProperty('stripColors', function () {
+ return ("" + this).replace(/\x1B\[\d+m/g, '');
+});
+
+// please no
+function zalgo(text, options) {
+ var soul = {
+ "up" : [
+ '̍', '̎', '̄', '̅',
+ '̿', '̑', '̆', '̐',
+ '͒', '͗', '͑', '̇',
+ '̈', '̊', '͂', '̓',
+ '̈', '͊', '͋', '͌',
+ '̃', '̂', '̌', '͐',
+ '̀', '́', '̋', '̏',
+ '̒', '̓', '̔', '̽',
+ '̉', 'ͣ', 'ͤ', 'ͥ',
+ 'ͦ', 'ͧ', 'ͨ', 'ͩ',
+ 'ͪ', 'ͫ', 'ͬ', 'ͭ',
+ 'ͮ', 'ͯ', '̾', '͛',
+ '͆', '̚'
+ ],
+ "down" : [
+ '̖', '̗', '̘', '̙',
+ '̜', '̝', '̞', '̟',
+ '̠', '̤', '̥', '̦',
+ '̩', '̪', '̫', '̬',
+ '̭', '̮', '̯', '̰',
+ '̱', '̲', '̳', '̹',
+ '̺', '̻', '̼', 'ͅ',
+ '͇', '͈', '͉', '͍',
+ '͎', '͓', '͔', '͕',
+ '͖', '͙', '͚', '̣'
+ ],
+ "mid" : [
+ '̕', '̛', '̀', '́',
+ '͘', '̡', '̢', '̧',
+ '̨', '̴', '̵', '̶',
+ '͜', '͝', '͞',
+ '͟', '͠', '͢', '̸',
+ '̷', '͡', ' ҉'
+ ]
+ },
+ all = [].concat(soul.up, soul.down, soul.mid),
+ zalgo = {};
+
+ function randomNumber(range) {
+ var r = Math.floor(Math.random() * range);
+ return r;
+ }
+
+ function is_char(character) {
+ var bool = false;
+ all.filter(function (i) {
+ bool = (i === character);
+ });
+ return bool;
+ }
+
+ function heComes(text, options) {
+ var result = '', counts, l;
+ options = options || {};
+ options["up"] = options["up"] || true;
+ options["mid"] = options["mid"] || true;
+ options["down"] = options["down"] || true;
+ options["size"] = options["size"] || "maxi";
+ text = text.split('');
+ for (l in text) {
+ if (is_char(l)) {
+ continue;
+ }
+ result = result + text[l];
+ counts = {"up" : 0, "down" : 0, "mid" : 0};
+ switch (options.size) {
+ case 'mini':
+ counts.up = randomNumber(8);
+ counts.min = randomNumber(2);
+ counts.down = randomNumber(8);
+ break;
+ case 'maxi':
+ counts.up = randomNumber(16) + 3;
+ counts.min = randomNumber(4) + 1;
+ counts.down = randomNumber(64) + 3;
+ break;
+ default:
+ counts.up = randomNumber(8) + 1;
+ counts.mid = randomNumber(6) / 2;
+ counts.down = randomNumber(8) + 1;
+ break;
+ }
+
+ var arr = ["up", "mid", "down"];
+ for (var d in arr) {
+ var index = arr[d];
+ for (var i = 0 ; i <= counts[index]; i++) {
+ if (options[index]) {
+ result = result + soul[index][randomNumber(soul[index].length)];
+ }
+ }
+ }
+ }
+ return result;
+ }
+ return heComes(text);
+}
+
+
+// don't summon zalgo
+addProperty('zalgo', function () {
+ return zalgo(this);
+});
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/example.html b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/example.html
new file mode 100644
index 0000000..7a2ae60
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/example.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Colors Example
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/example.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/example.js
new file mode 100644
index 0000000..b1e03a4
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/example.js
@@ -0,0 +1,77 @@
+var colors = require('./colors');
+
+//colors.mode = "browser";
+
+var test = colors.red("hopefully colorless output");
+console.log('Rainbows are fun!'.rainbow);
+console.log('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported
+console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
+//console.log('zalgo time!'.zalgo);
+console.log(test.stripColors);
+console.log("a".grey + " b".black);
+console.log("Zebras are so fun!".zebra);
+console.log('background color attack!'.black.whiteBG)
+
+//
+// Remark: .strikethrough may not work with Mac OS Terminal App
+//
+console.log("This is " + "not".strikethrough + " fun.");
+console.log(colors.rainbow('Rainbows are fun!'));
+console.log(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported
+console.log(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported
+//console.log(colors.zalgo('zalgo time!'));
+console.log(colors.stripColors(test));
+console.log(colors.grey("a") + colors.black(" b"));
+
+colors.addSequencer("america", function(letter, i, exploded) {
+ if(letter === " ") return letter;
+ switch(i%3) {
+ case 0: return letter.red;
+ case 1: return letter.white;
+ case 2: return letter.blue;
+ }
+});
+
+colors.addSequencer("random", (function() {
+ var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
+
+ return function(letter, i, exploded) {
+ return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]];
+ };
+})());
+
+console.log("AMERICA! F--K YEAH!".america);
+console.log("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random);
+
+//
+// Custom themes
+//
+
+// Load theme with JSON literal
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+
+// outputs grey text
+console.log("this is an input".input);
+
+// Load a theme from file
+colors.setTheme('./themes/winston-dark.js');
+
+console.log("this is an input".input);
+
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/package.json
new file mode 100644
index 0000000..1c96d12
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "colors",
+ "description": "get colors in your node.js console like what",
+ "version": "0.6.2",
+ "author": {
+ "name": "Marak Squires"
+ },
+ "homepage": "https://github.com/Marak/colors.js",
+ "bugs": {
+ "url": "https://github.com/Marak/colors.js/issues"
+ },
+ "keywords": [
+ "ansi",
+ "terminal",
+ "colors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/Marak/colors.js.git"
+ },
+ "engines": {
+ "node": ">=0.1.90"
+ },
+ "main": "colors",
+ "readme": "# colors.js - get color and style in your node.js console ( and browser ) like what\n\n\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n- rainbow\n- zebra\n- random\n\n## Usage\n\n``` js\nvar colors = require('./colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n```\n\n# Creating Custom themes\n\n```js\n\nvar colors = require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n\n### Contributors \n\nMarak (Marak Squires)\nAlexis Sellier (cloudhead)\nmmalecki (Maciej Małecki)\nnicoreed (Nico Reed)\nmorganrallen (Morgan Allen)\nJustinCampbell (Justin Campbell)\nded (Dustin Diaz)\n\n\n#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)\n",
+ "readmeFilename": "ReadMe.md",
+ "_id": "colors@0.6.2",
+ "_from": "colors@0.x.x"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/test.js
new file mode 100644
index 0000000..c32417d
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/test.js
@@ -0,0 +1,70 @@
+var assert = require('assert'),
+ colors = require('./colors');
+
+var s = 'string';
+
+function a(s, code) {
+ return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m';
+}
+
+function aE(s, color, code) {
+ assert.equal(s[color], a(s, code));
+ assert.equal(colors[color](s), a(s, code));
+ assert.equal(s[color], colors[color](s));
+ assert.equal(s[color].stripColors, s);
+ assert.equal(s[color].stripColors, colors.stripColors(s));
+}
+
+function h(s, color) {
+ return '' + s + '';
+}
+
+var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow'];
+var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']);
+
+colors.mode = 'console';
+assert.equal(s.bold, '\x1B[1m' + s + '\x1B[22m');
+assert.equal(s.italic, '\x1B[3m' + s + '\x1B[23m');
+assert.equal(s.underline, '\x1B[4m' + s + '\x1B[24m');
+assert.equal(s.strikethrough, '\x1B[9m' + s + '\x1B[29m');
+assert.equal(s.inverse, '\x1B[7m' + s + '\x1B[27m');
+assert.ok(s.rainbow);
+aE(s, 'white', 37);
+aE(s, 'grey', 90);
+aE(s, 'black', 30);
+aE(s, 'blue', 34);
+aE(s, 'cyan', 36);
+aE(s, 'green', 32);
+aE(s, 'magenta', 35);
+aE(s, 'red', 31);
+aE(s, 'yellow', 33);
+assert.equal(s, 'string');
+
+colors.setTheme({error:'red'});
+
+assert.equal(typeof("astring".red),'string');
+assert.equal(typeof("astring".error),'string');
+
+colors.mode = 'browser';
+assert.equal(s.bold, '' + s + '');
+assert.equal(s.italic, '' + s + '');
+assert.equal(s.underline, '' + s + '');
+assert.equal(s.strikethrough, '' + s + '');
+assert.equal(s.inverse, '' + s + '');
+assert.ok(s.rainbow);
+stylesColors.forEach(function (color) {
+ assert.equal(s[color], h(s, color));
+ assert.equal(colors[color](s), h(s, color));
+});
+
+assert.equal(typeof("astring".red),'string');
+assert.equal(typeof("astring".error),'string');
+
+colors.mode = 'none';
+stylesAll.forEach(function (style) {
+ assert.equal(s[style], s);
+ assert.equal(colors[style](s), s);
+});
+
+assert.equal(typeof("astring".red),'string');
+assert.equal(typeof("astring".error),'string');
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/themes/winston-dark.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/themes/winston-dark.js
new file mode 100644
index 0000000..49a905b
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/themes/winston-dark.js
@@ -0,0 +1,12 @@
+module['exports'] = {
+ silly: 'rainbow',
+ input: 'black',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+};
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/themes/winston-light.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/themes/winston-light.js
new file mode 100644
index 0000000..571972c
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/colors/themes/winston-light.js
@@ -0,0 +1,12 @@
+module['exports'] = {
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+};
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/cycle/README.md b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/cycle/README.md
new file mode 100644
index 0000000..de9a06d
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/cycle/README.md
@@ -0,0 +1,49 @@
+Fork of https://github.com/douglascrockford/JSON-js, maintained in npm as `cycle`.
+
+# Contributors
+
+* Douglas Crockford
+* Nuno Job
+* Justin Warkentin
+
+# JSON in JavaScript
+
+Douglas Crockford
+douglas@crockford.com
+
+2010-11-18
+
+
+JSON is a light-weight, language independent, data interchange format.
+See http://www.JSON.org/
+
+The files in this collection implement JSON encoders/decoders in JavaScript.
+
+JSON became a built-in feature of JavaScript when the ECMAScript Programming
+Language Standard - Fifth Edition was adopted by the ECMA General Assembly
+in December 2009. Most of the files in this collection are for applications
+that are expected to run in obsolete web browsers. For most purposes, json2.js
+is the best choice.
+
+
+json2.js: This file creates a JSON property in the global object, if there
+isn't already one, setting its value to an object containing a stringify
+method and a parse method. The parse method uses the eval method to do the
+parsing, guarding it with several regular expressions to defend against
+accidental code execution hazards. On current browsers, this file does nothing,
+prefering the built-in JSON object.
+
+json.js: This file does everything that json2.js does. It also adds a
+toJSONString method and a parseJSON method to Object.prototype. Use of this
+file is not recommended.
+
+json_parse.js: This file contains an alternative JSON parse function that
+uses recursive descent instead of eval.
+
+json_parse_state.js: This files contains an alternative JSON parse function that
+uses a state machine instead of eval.
+
+cycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,
+which make it possible to encode cyclical structures and dags in JSON, and to
+then recover them. JSONPath is used to represent the links.
+http://GOESSNER.net/articles/JsonPath/
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/cycle/cycle.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/cycle/cycle.js
new file mode 100644
index 0000000..2e776ad
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/cycle/cycle.js
@@ -0,0 +1,170 @@
+/*
+ cycle.js
+ 2013-02-19
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+*/
+
+/*jslint evil: true, regexp: true */
+
+/*members $ref, apply, call, decycle, hasOwnProperty, length, prototype, push,
+ retrocycle, stringify, test, toString
+*/
+
+var cycle = exports;
+
+cycle.decycle = function decycle(object) {
+ 'use strict';
+
+// Make a deep copy of an object or array, assuring that there is at most
+// one instance of each object or array in the resulting structure. The
+// duplicate references (which might be forming cycles) are replaced with
+// an object of the form
+// {$ref: PATH}
+// where the PATH is a JSONPath string that locates the first occurance.
+// So,
+// var a = [];
+// a[0] = a;
+// return JSON.stringify(JSON.decycle(a));
+// produces the string '[{"$ref":"$"}]'.
+
+// JSONPath is used to locate the unique object. $ indicates the top level of
+// the object or array. [NUMBER] or [STRING] indicates a child member or
+// property.
+
+ var objects = [], // Keep a reference to each unique object or array
+ paths = []; // Keep the path to each unique object or array
+
+ return (function derez(value, path) {
+
+// The derez recurses through the object, producing the deep copy.
+
+ var i, // The loop counter
+ name, // Property name
+ nu; // The new object or array
+
+// typeof null === 'object', so go on if this value is really an object but not
+// one of the weird builtin objects.
+
+ if (typeof value === 'object' && value !== null &&
+ !(value instanceof Boolean) &&
+ !(value instanceof Date) &&
+ !(value instanceof Number) &&
+ !(value instanceof RegExp) &&
+ !(value instanceof String)) {
+
+// If the value is an object or array, look to see if we have already
+// encountered it. If so, return a $ref/path object. This is a hard way,
+// linear search that will get slower as the number of unique objects grows.
+
+ for (i = 0; i < objects.length; i += 1) {
+ if (objects[i] === value) {
+ return {$ref: paths[i]};
+ }
+ }
+
+// Otherwise, accumulate the unique value and its path.
+
+ objects.push(value);
+ paths.push(path);
+
+// If it is an array, replicate the array.
+
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+ nu = [];
+ for (i = 0; i < value.length; i += 1) {
+ nu[i] = derez(value[i], path + '[' + i + ']');
+ }
+ } else {
+
+// If it is an object, replicate the object.
+
+ nu = {};
+ for (name in value) {
+ if (Object.prototype.hasOwnProperty.call(value, name)) {
+ nu[name] = derez(value[name],
+ path + '[' + JSON.stringify(name) + ']');
+ }
+ }
+ }
+ return nu;
+ }
+ return value;
+ }(object, '$'));
+};
+
+
+cycle.retrocycle = function retrocycle($) {
+ 'use strict';
+
+// Restore an object that was reduced by decycle. Members whose values are
+// objects of the form
+// {$ref: PATH}
+// are replaced with references to the value found by the PATH. This will
+// restore cycles. The object will be mutated.
+
+// The eval function is used to locate the values described by a PATH. The
+// root object is kept in a $ variable. A regular expression is used to
+// assure that the PATH is extremely well formed. The regexp contains nested
+// * quantifiers. That has been known to have extremely bad performance
+// problems on some browsers for very long strings. A PATH is expected to be
+// reasonably short. A PATH is allowed to belong to a very restricted subset of
+// Goessner's JSONPath.
+
+// So,
+// var s = '[{"$ref":"$"}]';
+// return JSON.retrocycle(JSON.parse(s));
+// produces an array containing a single element which is the array itself.
+
+ var px =
+ /^\$(?:\[(?:\d+|\"(?:[^\\\"\u0000-\u001f]|\\([\\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*\")\])*$/;
+
+ (function rez(value) {
+
+// The rez function walks recursively through the object looking for $ref
+// properties. When it finds one that has a value that is a path, then it
+// replaces the $ref object with a reference to the value that is found by
+// the path.
+
+ var i, item, name, path;
+
+ if (value && typeof value === 'object') {
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+ for (i = 0; i < value.length; i += 1) {
+ item = value[i];
+ if (item && typeof item === 'object') {
+ path = item.$ref;
+ if (typeof path === 'string' && px.test(path)) {
+ value[i] = eval(path);
+ } else {
+ rez(item);
+ }
+ }
+ }
+ } else {
+ for (name in value) {
+ if (typeof value[name] === 'object') {
+ item = value[name];
+ if (item) {
+ path = item.$ref;
+ if (typeof path === 'string' && px.test(path)) {
+ value[name] = eval(path);
+ } else {
+ rez(item);
+ }
+ }
+ }
+ }
+ }
+ }
+ }($));
+ return $;
+};
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/cycle/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/cycle/package.json
new file mode 100644
index 0000000..70edde3
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/cycle/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "cycle",
+ "description": "decycle your json",
+ "author": "",
+ "version": "1.0.3",
+ "main": "./cycle.js",
+ "homepage": "https://github.com/douglascrockford/JSON-js",
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/dscape/cycle.git"
+ },
+ "bugs": {
+ "url": "http://github.com/douglascrockford/JSON-js/issues"
+ },
+ "keywords": [
+ "json",
+ "cycle",
+ "stringify",
+ "parse"
+ ],
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "readme": "Fork of https://github.com/douglascrockford/JSON-js, maintained in npm as `cycle`.\n\n# Contributors\n\n* Douglas Crockford\n* Nuno Job\n* Justin Warkentin\n\n# JSON in JavaScript\n\nDouglas Crockford\ndouglas@crockford.com\n\n2010-11-18\n\n\nJSON is a light-weight, language independent, data interchange format.\nSee http://www.JSON.org/\n\nThe files in this collection implement JSON encoders/decoders in JavaScript.\n\nJSON became a built-in feature of JavaScript when the ECMAScript Programming\nLanguage Standard - Fifth Edition was adopted by the ECMA General Assembly\nin December 2009. Most of the files in this collection are for applications\nthat are expected to run in obsolete web browsers. For most purposes, json2.js\nis the best choice.\n\n\njson2.js: This file creates a JSON property in the global object, if there\nisn't already one, setting its value to an object containing a stringify\nmethod and a parse method. The parse method uses the eval method to do the\nparsing, guarding it with several regular expressions to defend against\naccidental code execution hazards. On current browsers, this file does nothing,\nprefering the built-in JSON object.\n\njson.js: This file does everything that json2.js does. It also adds a\ntoJSONString method and a parseJSON method to Object.prototype. Use of this\nfile is not recommended.\n\njson_parse.js: This file contains an alternative JSON parse function that\nuses recursive descent instead of eval.\n\njson_parse_state.js: This files contains an alternative JSON parse function that\nuses a state machine instead of eval.\n\ncycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,\nwhich make it possible to encode cyclical structures and dags in JSON, and to\nthen recover them. JSONPath is used to represent the links.\nhttp://GOESSNER.net/articles/JsonPath/\n",
+ "readmeFilename": "README.md",
+ "_id": "cycle@1.0.3",
+ "_from": "cycle@1.0.x"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/LICENSE b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/LICENSE
new file mode 100644
index 0000000..a1edd93
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2009 cloudhead
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/Makefile b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/Makefile
new file mode 100644
index 0000000..a121dea
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/Makefile
@@ -0,0 +1,4 @@
+test:
+ @@node test/eyes-test.js
+
+.PHONY: test
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/README.md b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/README.md
new file mode 100644
index 0000000..c4f6f76
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/README.md
@@ -0,0 +1,73 @@
+eyes
+====
+
+a customizable value inspector for Node.js
+
+synopsis
+--------
+
+I was tired of looking at cluttered output in the console -- something needed to be done,
+`sys.inspect()` didn't display regexps correctly, and was too verbose, and I had an hour or two to spare.
+So I decided to have some fun. _eyes_ were born.
+
+![eyes-ss](http://dl.dropbox.com/u/251849/eyes-js-ss.gif)
+
+_example of the output of a user-customized eyes.js inspector_
+
+*eyes* also deals with circular objects in an intelligent way, and can pretty-print object literals.
+
+usage
+-----
+
+ var inspect = require('eyes').inspector({styles: {all: 'magenta'}});
+
+ inspect(something); // inspect with the settings passed to `inspector`
+
+or
+
+ var eyes = require('eyes');
+
+ eyes.inspect(something); // inspect with the default settings
+
+you can pass a _label_ to `inspect()`, to keep track of your inspections:
+
+ eyes.inspect(something, "a random value");
+
+If you want to return the output of eyes without printing it, you can set it up this way:
+
+ var inspect = require('eyes').inspector({ stream: null });
+
+ sys.puts(inspect({ something: 42 }));
+
+customization
+-------------
+
+These are the default styles and settings used by _eyes_.
+
+ styles: { // Styles applied to stdout
+ all: 'cyan', // Overall style applied to everything
+ label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`
+ other: 'inverted', // Objects which don't have a literal representation, such as functions
+ key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`
+ special: 'grey', // null, undefined...
+ string: 'green',
+ number: 'magenta',
+ bool: 'blue', // true false
+ regexp: 'green', // /\d+/
+ },
+
+ pretty: true, // Indent object literals
+ hideFunctions: false, // Don't output functions at all
+ stream: process.stdout, // Stream to write to, or null
+ maxLength: 2048 // Truncate output if longer
+
+You can overwrite them with your own, by passing a similar object to `inspector()` or `inspect()`.
+
+ var inspect = require('eyes').inspector({
+ styles: {
+ all: 'magenta',
+ special: 'bold'
+ },
+ maxLength: 512
+ });
+
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/lib/eyes.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/lib/eyes.js
new file mode 100644
index 0000000..10d964b
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/lib/eyes.js
@@ -0,0 +1,236 @@
+//
+// Eyes.js - a customizable value inspector for Node.js
+//
+// usage:
+//
+// var inspect = require('eyes').inspector({styles: {all: 'magenta'}});
+// inspect(something); // inspect with the settings passed to `inspector`
+//
+// or
+//
+// var eyes = require('eyes');
+// eyes.inspect(something); // inspect with the default settings
+//
+var eyes = exports,
+ stack = [];
+
+eyes.defaults = {
+ styles: { // Styles applied to stdout
+ all: 'cyan', // Overall style applied to everything
+ label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`
+ other: 'inverted', // Objects which don't have a literal representation, such as functions
+ key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`
+ special: 'grey', // null, undefined...
+ string: 'green',
+ number: 'magenta',
+ bool: 'blue', // true false
+ regexp: 'green', // /\d+/
+ },
+ pretty: true, // Indent object literals
+ hideFunctions: false,
+ showHidden: false,
+ stream: process.stdout,
+ maxLength: 2048 // Truncate output if longer
+};
+
+// Return a curried inspect() function, with the `options` argument filled in.
+eyes.inspector = function (options) {
+ var that = this;
+ return function (obj, label, opts) {
+ return that.inspect.call(that, obj, label,
+ merge(options || {}, opts || {}));
+ };
+};
+
+// If we have a `stream` defined, use it to print a styled string,
+// if not, we just return the stringified object.
+eyes.inspect = function (obj, label, options) {
+ options = merge(this.defaults, options || {});
+
+ if (options.stream) {
+ return this.print(stringify(obj, options), label, options);
+ } else {
+ return stringify(obj, options) + (options.styles ? '\033[39m' : '');
+ }
+};
+
+// Output using the 'stream', and an optional label
+// Loop through `str`, and truncate it after `options.maxLength` has been reached.
+// Because escape sequences are, at this point embeded within
+// the output string, we can't measure the length of the string
+// in a useful way, without separating what is an escape sequence,
+// versus a printable character (`c`). So we resort to counting the
+// length manually.
+eyes.print = function (str, label, options) {
+ for (var c = 0, i = 0; i < str.length; i++) {
+ if (str.charAt(i) === '\033') { i += 4 } // `4` because '\033[25m'.length + 1 == 5
+ else if (c === options.maxLength) {
+ str = str.slice(0, i - 1) + '…';
+ break;
+ } else { c++ }
+ }
+ return options.stream.write.call(options.stream, (label ?
+ this.stylize(label, options.styles.label, options.styles) + ': ' : '') +
+ this.stylize(str, options.styles.all, options.styles) + '\033[0m' + "\n");
+};
+
+// Apply a style to a string, eventually,
+// I'd like this to support passing multiple
+// styles.
+eyes.stylize = function (str, style, styles) {
+ var codes = {
+ 'bold' : [1, 22],
+ 'underline' : [4, 24],
+ 'inverse' : [7, 27],
+ 'cyan' : [36, 39],
+ 'magenta' : [35, 39],
+ 'blue' : [34, 39],
+ 'yellow' : [33, 39],
+ 'green' : [32, 39],
+ 'red' : [31, 39],
+ 'grey' : [90, 39]
+ }, endCode;
+
+ if (style && codes[style]) {
+ endCode = (codes[style][1] === 39 && styles.all) ? codes[styles.all][0]
+ : codes[style][1];
+ return '\033[' + codes[style][0] + 'm' + str +
+ '\033[' + endCode + 'm';
+ } else { return str }
+};
+
+// Convert any object to a string, ready for output.
+// When an 'array' or an 'object' are encountered, they are
+// passed to specialized functions, which can then recursively call
+// stringify().
+function stringify(obj, options) {
+ var that = this, stylize = function (str, style) {
+ return eyes.stylize(str, options.styles[style], options.styles)
+ }, index, result;
+
+ if ((index = stack.indexOf(obj)) !== -1) {
+ return stylize(new(Array)(stack.length - index + 1).join('.'), 'special');
+ }
+ stack.push(obj);
+
+ result = (function (obj) {
+ switch (typeOf(obj)) {
+ case "string" : obj = stringifyString(obj.indexOf("'") === -1 ? "'" + obj + "'"
+ : '"' + obj + '"');
+ return stylize(obj, 'string');
+ case "regexp" : return stylize('/' + obj.source + '/', 'regexp');
+ case "number" : return stylize(obj + '', 'number');
+ case "function" : return options.stream ? stylize("Function", 'other') : '[Function]';
+ case "null" : return stylize("null", 'special');
+ case "undefined": return stylize("undefined", 'special');
+ case "boolean" : return stylize(obj + '', 'bool');
+ case "date" : return stylize(obj.toUTCString());
+ case "array" : return stringifyArray(obj, options, stack.length);
+ case "object" : return stringifyObject(obj, options, stack.length);
+ }
+ })(obj);
+
+ stack.pop();
+ return result;
+};
+
+// Escape invisible characters in a string
+function stringifyString (str, options) {
+ return str.replace(/\\/g, '\\\\')
+ .replace(/\n/g, '\\n')
+ .replace(/[\u0001-\u001F]/g, function (match) {
+ return '\\0' + match[0].charCodeAt(0).toString(8);
+ });
+}
+
+// Convert an array to a string, such as [1, 2, 3].
+// This function calls stringify() for each of the elements
+// in the array.
+function stringifyArray(ary, options, level) {
+ var out = [];
+ var pretty = options.pretty && (ary.length > 4 || ary.some(function (o) {
+ return (o !== null && typeof(o) === 'object' && Object.keys(o).length > 0) ||
+ (Array.isArray(o) && o.length > 0);
+ }));
+ var ws = pretty ? '\n' + new(Array)(level * 4 + 1).join(' ') : ' ';
+
+ for (var i = 0; i < ary.length; i++) {
+ out.push(stringify(ary[i], options));
+ }
+
+ if (out.length === 0) {
+ return '[]';
+ } else {
+ return '[' + ws
+ + out.join(',' + (pretty ? ws : ' '))
+ + (pretty ? ws.slice(0, -4) : ws) +
+ ']';
+ }
+};
+
+// Convert an object to a string, such as {a: 1}.
+// This function calls stringify() for each of its values,
+// and does not output functions or prototype values.
+function stringifyObject(obj, options, level) {
+ var out = [];
+ var pretty = options.pretty && (Object.keys(obj).length > 2 ||
+ Object.keys(obj).some(function (k) { return typeof(obj[k]) === 'object' }));
+ var ws = pretty ? '\n' + new(Array)(level * 4 + 1).join(' ') : ' ';
+
+ var keys = options.showHidden ? Object.keys(obj) : Object.getOwnPropertyNames(obj);
+ keys.forEach(function (k) {
+ if (Object.prototype.hasOwnProperty.call(obj, k)
+ && !(obj[k] instanceof Function && options.hideFunctions)) {
+ out.push(eyes.stylize(k, options.styles.key, options.styles) + ': ' +
+ stringify(obj[k], options));
+ }
+ });
+
+ if (out.length === 0) {
+ return '{}';
+ } else {
+ return "{" + ws
+ + out.join(',' + (pretty ? ws : ' '))
+ + (pretty ? ws.slice(0, -4) : ws) +
+ "}";
+ }
+};
+
+// A better `typeof`
+function typeOf(value) {
+ var s = typeof(value),
+ types = [Object, Array, String, RegExp, Number, Function, Boolean, Date];
+
+ if (s === 'object' || s === 'function') {
+ if (value) {
+ types.forEach(function (t) {
+ if (value instanceof t) { s = t.name.toLowerCase() }
+ });
+ } else { s = 'null' }
+ }
+ return s;
+}
+
+function merge(/* variable args */) {
+ var objs = Array.prototype.slice.call(arguments);
+ var target = {};
+
+ objs.forEach(function (o) {
+ Object.keys(o).forEach(function (k) {
+ if (k === 'styles') {
+ if (! o.styles) {
+ target.styles = false;
+ } else {
+ target.styles = {}
+ for (var s in o.styles) {
+ target.styles[s] = o.styles[s];
+ }
+ }
+ } else {
+ target[k] = o[k];
+ }
+ });
+ });
+ return target;
+}
+
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/package.json
new file mode 100644
index 0000000..4f3d459
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "eyes",
+ "description": "a customizable value inspector",
+ "url": "http://github.com/cloudhead/eyes.js",
+ "keywords": [
+ "inspector",
+ "debug",
+ "inspect",
+ "print"
+ ],
+ "author": {
+ "name": "Alexis Sellier",
+ "email": "self@cloudhead.net"
+ },
+ "contributors": [
+ {
+ "name": "Charlie Robbins",
+ "email": "charlie@nodejitsu.com"
+ }
+ ],
+ "licenses": [
+ "MIT"
+ ],
+ "main": "./lib/eyes",
+ "version": "0.1.8",
+ "scripts": {
+ "test": "node test/*-test.js"
+ },
+ "directories": {
+ "lib": "./lib",
+ "test": "./test"
+ },
+ "engines": {
+ "node": "> 0.1.90"
+ },
+ "readme": "eyes\n====\n\na customizable value inspector for Node.js\n\nsynopsis\n--------\n\nI was tired of looking at cluttered output in the console -- something needed to be done,\n`sys.inspect()` didn't display regexps correctly, and was too verbose, and I had an hour or two to spare. \nSo I decided to have some fun. _eyes_ were born.\n\n![eyes-ss](http://dl.dropbox.com/u/251849/eyes-js-ss.gif)\n\n_example of the output of a user-customized eyes.js inspector_\n\n*eyes* also deals with circular objects in an intelligent way, and can pretty-print object literals.\n\nusage\n-----\n\n var inspect = require('eyes').inspector({styles: {all: 'magenta'}});\n\n inspect(something); // inspect with the settings passed to `inspector`\n\nor\n\n var eyes = require('eyes');\n\n eyes.inspect(something); // inspect with the default settings\n\nyou can pass a _label_ to `inspect()`, to keep track of your inspections:\n\n eyes.inspect(something, \"a random value\");\n\nIf you want to return the output of eyes without printing it, you can set it up this way:\n\n var inspect = require('eyes').inspector({ stream: null });\n\n sys.puts(inspect({ something: 42 }));\n\ncustomization\n-------------\n\nThese are the default styles and settings used by _eyes_.\n\n styles: { // Styles applied to stdout\n all: 'cyan', // Overall style applied to everything\n label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`\n other: 'inverted', // Objects which don't have a literal representation, such as functions\n key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`\n special: 'grey', // null, undefined...\n string: 'green',\n number: 'magenta',\n bool: 'blue', // true false\n regexp: 'green', // /\\d+/\n },\n \n pretty: true, // Indent object literals\n hideFunctions: false, // Don't output functions at all\n stream: process.stdout, // Stream to write to, or null\n maxLength: 2048 // Truncate output if longer\n\nYou can overwrite them with your own, by passing a similar object to `inspector()` or `inspect()`.\n\n var inspect = require('eyes').inspector({\n styles: {\n all: 'magenta',\n special: 'bold'\n },\n maxLength: 512\n });\n\n",
+ "readmeFilename": "README.md",
+ "_id": "eyes@0.1.8",
+ "_from": "eyes@0.1.x"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/test/eyes-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/test/eyes-test.js
new file mode 100644
index 0000000..1f9606a
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/eyes/test/eyes-test.js
@@ -0,0 +1,56 @@
+var util = require('util');
+var eyes = require('../lib/eyes');
+
+eyes.inspect({
+ number: 42,
+ string: "John Galt",
+ regexp: /[a-z]+/,
+ array: [99, 168, 'x', {}],
+ func: function () {},
+ bool: false,
+ nil: null,
+ undef: undefined,
+ object: {attr: []}
+}, "native types");
+
+eyes.inspect({
+ number: new(Number)(42),
+ string: new(String)("John Galt"),
+ regexp: new(RegExp)(/[a-z]+/),
+ array: new(Array)(99, 168, 'x', {}),
+ bool: new(Boolean)(false),
+ object: new(Object)({attr: []}),
+ date: new(Date)
+}, "wrapped types");
+
+var obj = {};
+obj.that = { self: obj };
+obj.self = obj;
+
+eyes.inspect(obj, "circular object");
+eyes.inspect({hello: 'moto'}, "small object");
+eyes.inspect({hello: new(Array)(6) }, "big object");
+eyes.inspect(["hello 'world'", 'hello "world"'], "quotes");
+eyes.inspect({
+ recommendations: [{
+ id: 'a7a6576c2c822c8e2bd81a27e41437d8',
+ key: [ 'spree', 3.764316258020699 ],
+ value: {
+ _id: 'a7a6576c2c822c8e2bd81a27e41437d8',
+ _rev: '1-2e2d2f7fd858c4a5984bcf809d22ed98',
+ type: 'domain',
+ domain: 'spree',
+ weight: 3.764316258020699,
+ product_id: 30
+ }
+ }]
+}, 'complex');
+
+eyes.inspect([null], "null in array");
+
+var inspect = eyes.inspector({ stream: null });
+
+util.puts(inspect('something', "something"));
+util.puts(inspect("something else"));
+
+util.puts(inspect(["no color"], null, { styles: false }));
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/.npmignore b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/.npmignore
new file mode 100644
index 0000000..9303c34
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/.npmignore
@@ -0,0 +1,2 @@
+node_modules/
+npm-debug.log
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/README.md b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/README.md
new file mode 100644
index 0000000..07ba942
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/README.md
@@ -0,0 +1,85 @@
+# node-pkginfo
+
+An easy way to expose properties on a module from a package.json
+
+## Installation
+
+### Installing npm (node package manager)
+```
+ curl http://npmjs.org/install.sh | sh
+```
+
+### Installing pkginfo
+```
+ [sudo] npm install pkginfo
+```
+
+## Motivation
+How often when writing node.js modules have you written the following line(s) of code?
+
+* Hard code your version string into your code
+
+``` js
+ exports.version = '0.1.0';
+```
+
+* Programmatically expose the version from the package.json
+
+``` js
+ exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version;
+```
+
+In other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!**
+
+## Usage
+
+Using `pkginfo` is idiot-proof, just require and invoke it.
+
+``` js
+ var pkginfo = require('pkginfo')(module);
+
+ console.dir(module.exports);
+```
+
+By invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`).
+
+Here's a sample of the output:
+
+```
+ { name: 'simple-app',
+ description: 'A test fixture for pkginfo',
+ version: '0.1.0',
+ author: 'Charlie Robbins ',
+ keywords: [ 'test', 'fixture' ],
+ main: './index.js',
+ scripts: { test: 'vows test/*-test.js --spec' },
+ engines: { node: '>= 0.4.0' } }
+```
+
+### Expose specific properties
+If you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function:
+
+``` js
+ var pkginfo = require('pkginfo')(module, 'version', 'author');
+
+ console.dir(module.exports);
+```
+
+```
+ { version: '0.1.0',
+ author: 'Charlie Robbins ' }
+```
+
+If you're looking for further usage see the [examples][0] included in this repository.
+
+## Run Tests
+Tests are written in [vows][1] and give complete coverage of all APIs.
+
+```
+ vows test/*-test.js --spec
+```
+
+[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples
+[1]: http://vowsjs.org
+
+#### Author: [Charlie Robbins](http://nodejitsu.com)
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/docs/docco.css b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/docs/docco.css
new file mode 100644
index 0000000..bd54134
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/docs/docco.css
@@ -0,0 +1,194 @@
+/*--------------------- Layout and Typography ----------------------------*/
+body {
+ font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
+ font-size: 15px;
+ line-height: 22px;
+ color: #252519;
+ margin: 0; padding: 0;
+}
+a {
+ color: #261a3b;
+}
+ a:visited {
+ color: #261a3b;
+ }
+p {
+ margin: 0 0 15px 0;
+}
+h4, h5, h6 {
+ color: #333;
+ margin: 6px 0 6px 0;
+ font-size: 13px;
+}
+ h2, h3 {
+ margin-bottom: 0;
+ color: #000;
+ }
+ h1 {
+ margin-top: 40px;
+ margin-bottom: 15px;
+ color: #000;
+ }
+#container {
+ position: relative;
+}
+#background {
+ position: fixed;
+ top: 0; left: 525px; right: 0; bottom: 0;
+ background: #f5f5ff;
+ border-left: 1px solid #e5e5ee;
+ z-index: -1;
+}
+#jump_to, #jump_page {
+ background: white;
+ -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777;
+ -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px;
+ font: 10px Arial;
+ text-transform: uppercase;
+ cursor: pointer;
+ text-align: right;
+}
+#jump_to, #jump_wrapper {
+ position: fixed;
+ right: 0; top: 0;
+ padding: 5px 10px;
+}
+ #jump_wrapper {
+ padding: 0;
+ display: none;
+ }
+ #jump_to:hover #jump_wrapper {
+ display: block;
+ }
+ #jump_page {
+ padding: 5px 0 3px;
+ margin: 0 0 25px 25px;
+ }
+ #jump_page .source {
+ display: block;
+ padding: 5px 10px;
+ text-decoration: none;
+ border-top: 1px solid #eee;
+ }
+ #jump_page .source:hover {
+ background: #f5f5ff;
+ }
+ #jump_page .source:first-child {
+ }
+table td {
+ border: 0;
+ outline: 0;
+}
+ td.docs, th.docs {
+ max-width: 450px;
+ min-width: 450px;
+ min-height: 5px;
+ padding: 10px 25px 1px 50px;
+ overflow-x: hidden;
+ vertical-align: top;
+ text-align: left;
+ }
+ .docs pre {
+ margin: 15px 0 15px;
+ padding-left: 15px;
+ }
+ .docs p tt, .docs p code {
+ background: #f8f8ff;
+ border: 1px solid #dedede;
+ font-size: 12px;
+ padding: 0 0.2em;
+ }
+ .pilwrap {
+ position: relative;
+ }
+ .pilcrow {
+ font: 12px Arial;
+ text-decoration: none;
+ color: #454545;
+ position: absolute;
+ top: 3px; left: -20px;
+ padding: 1px 2px;
+ opacity: 0;
+ -webkit-transition: opacity 0.2s linear;
+ }
+ td.docs:hover .pilcrow {
+ opacity: 1;
+ }
+ td.code, th.code {
+ padding: 14px 15px 16px 25px;
+ width: 100%;
+ vertical-align: top;
+ background: #f5f5ff;
+ border-left: 1px solid #e5e5ee;
+ }
+ pre, tt, code {
+ font-size: 12px; line-height: 18px;
+ font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
+ margin: 0; padding: 0;
+ }
+
+
+/*---------------------- Syntax Highlighting -----------------------------*/
+td.linenos { background-color: #f0f0f0; padding-right: 10px; }
+span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
+body .hll { background-color: #ffffcc }
+body .c { color: #408080; font-style: italic } /* Comment */
+body .err { border: 1px solid #FF0000 } /* Error */
+body .k { color: #954121 } /* Keyword */
+body .o { color: #666666 } /* Operator */
+body .cm { color: #408080; font-style: italic } /* Comment.Multiline */
+body .cp { color: #BC7A00 } /* Comment.Preproc */
+body .c1 { color: #408080; font-style: italic } /* Comment.Single */
+body .cs { color: #408080; font-style: italic } /* Comment.Special */
+body .gd { color: #A00000 } /* Generic.Deleted */
+body .ge { font-style: italic } /* Generic.Emph */
+body .gr { color: #FF0000 } /* Generic.Error */
+body .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+body .gi { color: #00A000 } /* Generic.Inserted */
+body .go { color: #808080 } /* Generic.Output */
+body .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+body .gs { font-weight: bold } /* Generic.Strong */
+body .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+body .gt { color: #0040D0 } /* Generic.Traceback */
+body .kc { color: #954121 } /* Keyword.Constant */
+body .kd { color: #954121; font-weight: bold } /* Keyword.Declaration */
+body .kn { color: #954121; font-weight: bold } /* Keyword.Namespace */
+body .kp { color: #954121 } /* Keyword.Pseudo */
+body .kr { color: #954121; font-weight: bold } /* Keyword.Reserved */
+body .kt { color: #B00040 } /* Keyword.Type */
+body .m { color: #666666 } /* Literal.Number */
+body .s { color: #219161 } /* Literal.String */
+body .na { color: #7D9029 } /* Name.Attribute */
+body .nb { color: #954121 } /* Name.Builtin */
+body .nc { color: #0000FF; font-weight: bold } /* Name.Class */
+body .no { color: #880000 } /* Name.Constant */
+body .nd { color: #AA22FF } /* Name.Decorator */
+body .ni { color: #999999; font-weight: bold } /* Name.Entity */
+body .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
+body .nf { color: #0000FF } /* Name.Function */
+body .nl { color: #A0A000 } /* Name.Label */
+body .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+body .nt { color: #954121; font-weight: bold } /* Name.Tag */
+body .nv { color: #19469D } /* Name.Variable */
+body .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+body .w { color: #bbbbbb } /* Text.Whitespace */
+body .mf { color: #666666 } /* Literal.Number.Float */
+body .mh { color: #666666 } /* Literal.Number.Hex */
+body .mi { color: #666666 } /* Literal.Number.Integer */
+body .mo { color: #666666 } /* Literal.Number.Oct */
+body .sb { color: #219161 } /* Literal.String.Backtick */
+body .sc { color: #219161 } /* Literal.String.Char */
+body .sd { color: #219161; font-style: italic } /* Literal.String.Doc */
+body .s2 { color: #219161 } /* Literal.String.Double */
+body .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
+body .sh { color: #219161 } /* Literal.String.Heredoc */
+body .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
+body .sx { color: #954121 } /* Literal.String.Other */
+body .sr { color: #BB6688 } /* Literal.String.Regex */
+body .s1 { color: #219161 } /* Literal.String.Single */
+body .ss { color: #19469D } /* Literal.String.Symbol */
+body .bp { color: #954121 } /* Name.Builtin.Pseudo */
+body .vc { color: #19469D } /* Name.Variable.Class */
+body .vg { color: #19469D } /* Name.Variable.Global */
+body .vi { color: #19469D } /* Name.Variable.Instance */
+body .il { color: #666666 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/docs/pkginfo.html b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/docs/pkginfo.html
new file mode 100644
index 0000000..bf615fa
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/docs/pkginfo.html
@@ -0,0 +1,101 @@
+ pkginfo.js
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/all-properties.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/all-properties.js
new file mode 100644
index 0000000..fd1d831
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/all-properties.js
@@ -0,0 +1,19 @@
+/*
+ * all-properties.js: Sample of including all properties from a package.json file
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var util = require('util'),
+ pkginfo = require('../lib/pkginfo')(module);
+
+exports.someFunction = function () {
+ console.log('some of your custom logic here');
+};
+
+console.log('Inspecting module:');
+console.dir(module.exports);
+
+console.log('\nAll exports exposed:');
+console.error(Object.keys(module.exports));
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/array-argument.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/array-argument.js
new file mode 100644
index 0000000..b1b6848
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/array-argument.js
@@ -0,0 +1,20 @@
+/*
+ * array-argument.js: Sample of including specific properties from a package.json file
+ * using Array argument syntax.
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var util = require('util'),
+ pkginfo = require('../lib/pkginfo')(module, ['version', 'author']);
+
+exports.someFunction = function () {
+ console.log('some of your custom logic here');
+};
+
+console.log('Inspecting module:');
+console.dir(module.exports);
+
+console.log('\nAll exports exposed:');
+console.error(Object.keys(module.exports));
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/multiple-properties.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/multiple-properties.js
new file mode 100644
index 0000000..b4b5fd6
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/multiple-properties.js
@@ -0,0 +1,19 @@
+/*
+ * multiple-properties.js: Sample of including multiple properties from a package.json file
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var util = require('util'),
+ pkginfo = require('../lib/pkginfo')(module, 'version', 'author');
+
+exports.someFunction = function () {
+ console.log('some of your custom logic here');
+};
+
+console.log('Inspecting module:');
+console.dir(module.exports);
+
+console.log('\nAll exports exposed:');
+console.error(Object.keys(module.exports));
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/object-argument.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/object-argument.js
new file mode 100644
index 0000000..28420c8
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/object-argument.js
@@ -0,0 +1,22 @@
+/*
+ * object-argument.js: Sample of including specific properties from a package.json file
+ * using Object argument syntax.
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var util = require('util'),
+ pkginfo = require('../lib/pkginfo')(module, {
+ include: ['version', 'author']
+ });
+
+exports.someFunction = function () {
+ console.log('some of your custom logic here');
+};
+
+console.log('Inspecting module:');
+console.dir(module.exports);
+
+console.log('\nAll exports exposed:');
+console.error(Object.keys(module.exports));
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/package.json
new file mode 100644
index 0000000..1f2f01c
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "simple-app",
+ "description": "A test fixture for pkginfo",
+ "version": "0.1.0",
+ "author": "Charlie Robbins ",
+ "keywords": ["test", "fixture"],
+ "main": "./index.js",
+ "scripts": { "test": "vows test/*-test.js --spec" },
+ "engines": { "node": ">= 0.4.0" }
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/single-property.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/single-property.js
new file mode 100644
index 0000000..4f44561
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/single-property.js
@@ -0,0 +1,19 @@
+/*
+ * single-property.js: Sample of including a single specific properties from a package.json file
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var util = require('util'),
+ pkginfo = require('../lib/pkginfo')(module, 'version');
+
+exports.someFunction = function () {
+ console.log('some of your custom logic here');
+};
+
+console.log('Inspecting module:');
+console.dir(module.exports);
+
+console.log('\nAll exports exposed:');
+console.error(Object.keys(module.exports));
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/lib/pkginfo.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/lib/pkginfo.js
new file mode 100644
index 0000000..a4a6227
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/lib/pkginfo.js
@@ -0,0 +1,132 @@
+/*
+ * pkginfo.js: Top-level include for the pkginfo module
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var fs = require('fs'),
+ path = require('path');
+
+//
+// ### function pkginfo ([options, 'property', 'property' ..])
+// #### @pmodule {Module} Parent module to read from.
+// #### @options {Object|Array|string} **Optional** Options used when exposing properties.
+// #### @arguments {string...} **Optional** Specified properties to expose.
+// Exposes properties from the package.json file for the parent module on
+// it's exports. Valid usage:
+//
+// `require('pkginfo')()`
+//
+// `require('pkginfo')('version', 'author');`
+//
+// `require('pkginfo')(['version', 'author']);`
+//
+// `require('pkginfo')({ include: ['version', 'author'] });`
+//
+var pkginfo = module.exports = function (pmodule, options) {
+ var args = [].slice.call(arguments, 2).filter(function (arg) {
+ return typeof arg === 'string';
+ });
+
+ //
+ // **Parse variable arguments**
+ //
+ if (Array.isArray(options)) {
+ //
+ // If the options passed in is an Array assume that
+ // it is the Array of properties to expose from the
+ // on the package.json file on the parent module.
+ //
+ options = { include: options };
+ }
+ else if (typeof options === 'string') {
+ //
+ // Otherwise if the first argument is a string, then
+ // assume that it is the first property to expose from
+ // the package.json file on the parent module.
+ //
+ options = { include: [options] };
+ }
+
+ //
+ // **Setup default options**
+ //
+ options = options || { include: [] };
+
+ if (args.length > 0) {
+ //
+ // If additional string arguments have been passed in
+ // then add them to the properties to expose on the
+ // parent module.
+ //
+ options.include = options.include.concat(args);
+ }
+
+ var pkg = pkginfo.read(pmodule, options.dir).package;
+ Object.keys(pkg).forEach(function (key) {
+ if (options.include.length > 0 && !~options.include.indexOf(key)) {
+ return;
+ }
+
+ if (!pmodule.exports[key]) {
+ pmodule.exports[key] = pkg[key];
+ }
+ });
+
+ return pkginfo;
+};
+
+//
+// ### function find (dir)
+// #### @pmodule {Module} Parent module to read from.
+// #### @dir {string} **Optional** Directory to start search from.
+// Searches up the directory tree from `dir` until it finds a directory
+// which contains a `package.json` file.
+//
+pkginfo.find = function (pmodule, dir) {
+ dir = dir || pmodule.filename;
+ dir = path.dirname(dir);
+
+ var files = fs.readdirSync(dir);
+
+ if (~files.indexOf('package.json')) {
+ return path.join(dir, 'package.json');
+ }
+
+ if (dir === '/') {
+ throw new Error('Could not find package.json up from: ' + dir);
+ }
+ else if (!dir || dir === '.') {
+ throw new Error('Cannot find package.json from unspecified directory');
+ }
+
+ return pkginfo.find(pmodule, dir);
+};
+
+//
+// ### function read (pmodule, dir)
+// #### @pmodule {Module} Parent module to read from.
+// #### @dir {string} **Optional** Directory to start search from.
+// Searches up the directory tree from `dir` until it finds a directory
+// which contains a `package.json` file and returns the package information.
+//
+pkginfo.read = function (pmodule, dir) {
+ dir = pkginfo.find(pmodule, dir);
+
+ var data = fs.readFileSync(dir).toString();
+
+ return {
+ dir: dir,
+ package: JSON.parse(data)
+ };
+};
+
+//
+// Call `pkginfo` on this module and expose version.
+//
+pkginfo(module, {
+ dir: __dirname,
+ include: ['version'],
+ target: pkginfo
+});
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/package.json
new file mode 100644
index 0000000..b56a0bc
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "pkginfo",
+ "version": "0.2.3",
+ "description": "An easy way to expose properties on a module from a package.json",
+ "author": {
+ "name": "Charlie Robbins",
+ "email": "charlie.robbins@gmail.com"
+ },
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/indexzero/node-pkginfo.git"
+ },
+ "keywords": [
+ "info",
+ "tools",
+ "package.json"
+ ],
+ "devDependencies": {
+ "vows": "0.6.x"
+ },
+ "main": "./lib/pkginfo",
+ "scripts": {
+ "test": "vows test/*-test.js --spec"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "readme": "# node-pkginfo\n\nAn easy way to expose properties on a module from a package.json\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing pkginfo\n```\n [sudo] npm install pkginfo\n```\n\n## Motivation\nHow often when writing node.js modules have you written the following line(s) of code? \n\n* Hard code your version string into your code\n\n``` js\n exports.version = '0.1.0';\n```\n\n* Programmatically expose the version from the package.json\n\n``` js\n exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version;\n```\n\nIn other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!**\n\n## Usage\n\nUsing `pkginfo` is idiot-proof, just require and invoke it. \n\n``` js\n var pkginfo = require('pkginfo')(module);\n \n console.dir(module.exports);\n```\n\nBy invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). \n\nHere's a sample of the output:\n\n```\n { name: 'simple-app',\n description: 'A test fixture for pkginfo',\n version: '0.1.0',\n author: 'Charlie Robbins ',\n keywords: [ 'test', 'fixture' ],\n main: './index.js',\n scripts: { test: 'vows test/*-test.js --spec' },\n engines: { node: '>= 0.4.0' } }\n```\n\n### Expose specific properties\nIf you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function:\n\n``` js\n var pkginfo = require('pkginfo')(module, 'version', 'author');\n \n console.dir(module.exports);\n```\n\n```\n { version: '0.1.0',\n author: 'Charlie Robbins ' }\n```\n\nIf you're looking for further usage see the [examples][0] included in this repository. \n\n## Run Tests\nTests are written in [vows][1] and give complete coverage of all APIs.\n\n```\n vows test/*-test.js --spec\n```\n\n[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples\n[1]: http://vowsjs.org\n\n#### Author: [Charlie Robbins](http://nodejitsu.com)",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/indexzero/node-pkginfo/issues"
+ },
+ "_id": "pkginfo@0.2.3",
+ "_from": "pkginfo@0.2.x"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/test/pkginfo-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/test/pkginfo-test.js
new file mode 100644
index 0000000..3156c00
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/pkginfo/test/pkginfo-test.js
@@ -0,0 +1,69 @@
+/*
+ * pkginfo-test.js: Tests for the pkginfo module.
+ *
+ * (C) 2011, Charlie Robbins
+ *
+ */
+
+var assert = require('assert'),
+ exec = require('child_process').exec,
+ fs = require('fs'),
+ path = require('path'),
+ vows = require('vows'),
+ pkginfo = require('../lib/pkginfo');
+
+function assertProperties (source, target) {
+ assert.lengthOf(source, target.length + 1);
+ target.forEach(function (prop) {
+ assert.isTrue(!!~source.indexOf(prop));
+ });
+}
+
+function testExposes (options) {
+ return {
+ topic: function () {
+ exec('node ' + path.join(__dirname, '..', 'examples', options.script), this.callback);
+ },
+ "should expose that property correctly": function (err, stdout, stderr) {
+ assert.isNull(err);
+
+ var exposed = stderr.match(/'(\w+)'/ig).map(function (p) {
+ return p.substring(1, p.length - 1);
+ });
+
+ return !options.assert
+ ? assertProperties(exposed, options.properties)
+ : options.assert(exposed);
+ }
+ }
+}
+
+vows.describe('pkginfo').addBatch({
+ "When using the pkginfo module": {
+ "and passed a single `string` argument": testExposes({
+ script: 'single-property.js',
+ properties: ['version']
+ }),
+ "and passed multiple `string` arguments": testExposes({
+ script: 'multiple-properties.js',
+ properties: ['version', 'author']
+ }),
+ "and passed an `object` argument": testExposes({
+ script: 'object-argument.js',
+ properties: ['version', 'author']
+ }),
+ "and passed an `array` argument": testExposes({
+ script: 'array-argument.js',
+ properties: ['version', 'author']
+ }),
+ "and passed no arguments": testExposes({
+ script: 'all-properties.js',
+ assert: function (exposed) {
+ var pkg = fs.readFileSync(path.join(__dirname, '..', 'examples', 'package.json')).toString(),
+ keys = Object.keys(JSON.parse(pkg));
+
+ assertProperties(exposed, keys);
+ }
+ })
+ }
+}).export(module);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/LICENSE b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/LICENSE
new file mode 100644
index 0000000..a4a9aee
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/LICENSE
@@ -0,0 +1,55 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/README.md b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/README.md
new file mode 100644
index 0000000..8713a80
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/README.md
@@ -0,0 +1,287 @@
+# Request -- Simplified HTTP request method
+
+## Install
+
+
+ npm install request
+
+
+Or from source:
+
+
+ git clone git://github.com/mikeal/request.git
+ cd request
+ npm link
+
+
+## Super simple to use
+
+Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.
+
+```javascript
+var request = require('request');
+request('http://www.google.com', function (error, response, body) {
+ if (!error && response.statusCode == 200) {
+ console.log(body) // Print the google web page.
+ }
+})
+```
+
+## Streaming
+
+You can stream any response to a file stream.
+
+```javascript
+request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))
+```
+
+You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types, in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.
+
+```javascript
+fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))
+```
+
+Request can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.
+
+```javascript
+request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))
+```
+
+Now let's get fancy.
+
+```javascript
+http.createServer(function (req, resp) {
+ if (req.url === '/doodle.png') {
+ if (req.method === 'PUT') {
+ req.pipe(request.put('http://mysite.com/doodle.png'))
+ } else if (req.method === 'GET' || req.method === 'HEAD') {
+ request.get('http://mysite.com/doodle.png').pipe(resp)
+ }
+ }
+})
+```
+
+You can also pipe() from a http.ServerRequest instance and to a http.ServerResponse instance. The HTTP method and headers will be sent as well as the entity-body data. Which means that, if you don't really care about security, you can do:
+
+```javascript
+http.createServer(function (req, resp) {
+ if (req.url === '/doodle.png') {
+ var x = request('http://mysite.com/doodle.png')
+ req.pipe(x)
+ x.pipe(resp)
+ }
+})
+```
+
+And since pipe() returns the destination stream in node 0.5.x you can do one line proxying :)
+
+```javascript
+req.pipe(request('http://mysite.com/doodle.png')).pipe(resp)
+```
+
+Also, none of this new functionality conflicts with requests previous features, it just expands them.
+
+```javascript
+var r = request.defaults({'proxy':'http://localproxy.com'})
+
+http.createServer(function (req, resp) {
+ if (req.url === '/doodle.png') {
+ r.get('http://google.com/doodle.png').pipe(resp)
+ }
+})
+```
+
+You can still use intermediate proxies, the requests will still follow HTTP forwards, etc.
+
+## OAuth Signing
+
+```javascript
+// Twitter OAuth
+var qs = require('querystring')
+ , oauth =
+ { callback: 'http://mysite.com/callback/'
+ , consumer_key: CONSUMER_KEY
+ , consumer_secret: CONSUMER_SECRET
+ }
+ , url = 'https://api.twitter.com/oauth/request_token'
+ ;
+request.post({url:url, oauth:oauth}, function (e, r, body) {
+ // Assume by some stretch of magic you aquired the verifier
+ var access_token = qs.parse(body)
+ , oauth =
+ { consumer_key: CONSUMER_KEY
+ , consumer_secret: CONSUMER_SECRET
+ , token: access_token.oauth_token
+ , verifier: VERIFIER
+ , token_secret: access_token.oauth_token_secret
+ }
+ , url = 'https://api.twitter.com/oauth/access_token'
+ ;
+ request.post({url:url, oauth:oauth}, function (e, r, body) {
+ var perm_token = qs.parse(body)
+ , oauth =
+ { consumer_key: CONSUMER_KEY
+ , consumer_secret: CONSUMER_SECRET
+ , token: perm_token.oauth_token
+ , token_secret: perm_token.oauth_token_secret
+ }
+ , url = 'https://api.twitter.com/1/users/show.json?'
+ , params =
+ { screen_name: perm_token.screen_name
+ , user_id: perm_token.user_id
+ }
+ ;
+ url += qs.stringify(params)
+ request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {
+ console.log(user)
+ })
+ })
+})
+```
+
+
+
+### request(options, callback)
+
+The first argument can be either a url or an options object. The only required option is uri, all others are optional.
+
+* `uri` || `url` - fully qualified uri or a parsed url object from url.parse()
+* `qs` - object containing querystring values to be appended to the uri
+* `method` - http method, defaults to GET
+* `headers` - http headers, defaults to {}
+* `body` - entity body for POST and PUT requests. Must be buffer or string.
+* `form` - sets `body` but to querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header.
+* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header.
+* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.
+* `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.
+* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false.
+* `maxRedirects` - the maximum number of redirects to follow, defaults to 10.
+* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.
+* `pool` - A hash object containing the agents for these requests. If omitted this request will use the global pool which is set to node's default maxSockets.
+* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.
+* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request
+* `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri.
+* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above.
+* `strictSSL` - Set to `true` to require that SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that ca as an option.
+* `jar` - Set to `false` if you don't want cookies to be remembered for future use or define your custom cookie jar (see examples section)
+
+
+The callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second in an http.ClientResponse object. The third is the response body String or Buffer.
+
+## Convenience methods
+
+There are also shorthand methods for different HTTP METHODs and some other conveniences.
+
+### request.defaults(options)
+
+This method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.
+
+### request.put
+
+Same as request() but defaults to `method: "PUT"`.
+
+```javascript
+request.put(url)
+```
+
+### request.post
+
+Same as request() but defaults to `method: "POST"`.
+
+```javascript
+request.post(url)
+```
+
+### request.head
+
+Same as request() but defaults to `method: "HEAD"`.
+
+```javascript
+request.head(url)
+```
+
+### request.del
+
+Same as request() but defaults to `method: "DELETE"`.
+
+```javascript
+request.del(url)
+```
+
+### request.get
+
+Alias to normal request method for uniformity.
+
+```javascript
+request.get(url)
+```
+### request.cookie
+
+Function that creates a new cookie.
+
+```javascript
+request.cookie('cookie_string_here')
+```
+### request.jar
+
+Function that creates a new cookie jar.
+
+```javascript
+request.jar()
+```
+
+
+## Examples:
+
+```javascript
+ var request = require('request')
+ , rand = Math.floor(Math.random()*100000000).toString()
+ ;
+ request(
+ { method: 'PUT'
+ , uri: 'http://mikeal.iriscouch.com/testjs/' + rand
+ , multipart:
+ [ { 'content-type': 'application/json'
+ , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
+ }
+ , { body: 'I am an attachment' }
+ ]
+ }
+ , function (error, response, body) {
+ if(response.statusCode == 201){
+ console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)
+ } else {
+ console.log('error: '+ response.statusCode)
+ console.log(body)
+ }
+ }
+ )
+```
+Cookies are enabled by default (so they can be used in subsequent requests). To disable cookies set jar to false (either in defaults or in the options sent).
+
+```javascript
+var request = request.defaults({jar: false})
+request('http://www.google.com', function () {
+ request('http://images.google.com')
+})
+```
+
+If you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option:
+
+```javascript
+var j = request.jar()
+var request = request.defaults({jar:j})
+request('http://www.google.com', function () {
+ request('http://images.google.com')
+})
+```
+OR
+
+```javascript
+var j = request.jar()
+var cookie = request.cookie('your_cookie_here')
+j.add(cookie)
+request({url: 'http://www.google.com', jar: j}, function () {
+ request('http://images.google.com')
+})
+```
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/aws.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/aws.js
new file mode 100644
index 0000000..4e87bff
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/aws.js
@@ -0,0 +1,190 @@
+
+/*!
+ * knox - auth
+ * Copyright(c) 2010 LearnBoost
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var crypto = require('crypto')
+ , parse = require('url').parse;
+
+/**
+ * Valid keys.
+ */
+
+var keys = [
+ 'acl'
+ , 'location'
+ , 'logging'
+ , 'notification'
+ , 'partNumber'
+ , 'policy'
+ , 'requestPayment'
+ , 'torrent'
+ , 'uploadId'
+ , 'uploads'
+ , 'versionId'
+ , 'versioning'
+ , 'versions'
+ , 'website'
+];
+
+/**
+ * Return an "Authorization" header value with the given `options`
+ * in the form of "AWS :"
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+exports.authorization = function(options){
+ return 'AWS ' + options.key + ':' + exports.sign(options);
+};
+
+/**
+ * Simple HMAC-SHA1 Wrapper
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+exports.hmacSha1 = function(options){
+ return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64');
+};
+
+/**
+ * Create a base64 sha1 HMAC for `options`.
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+exports.sign = function(options){
+ options.message = exports.stringToSign(options);
+ return exports.hmacSha1(options);
+};
+
+/**
+ * Create a base64 sha1 HMAC for `options`.
+ *
+ * Specifically to be used with S3 presigned URLs
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+exports.signQuery = function(options){
+ options.message = exports.queryStringToSign(options);
+ return exports.hmacSha1(options);
+};
+
+/**
+ * Return a string for sign() with the given `options`.
+ *
+ * Spec:
+ *
+ * \n
+ * \n
+ * \n
+ * \n
+ * [headers\n]
+ *
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+exports.stringToSign = function(options){
+ var headers = options.amazonHeaders || '';
+ if (headers) headers += '\n';
+ return [
+ options.verb
+ , options.md5
+ , options.contentType
+ , options.date.toUTCString()
+ , headers + options.resource
+ ].join('\n');
+};
+
+/**
+ * Return a string for sign() with the given `options`, but is meant exclusively
+ * for S3 presigned URLs
+ *
+ * Spec:
+ *
+ * \n
+ *
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+exports.queryStringToSign = function(options){
+ return 'GET\n\n\n' +
+ options.date + '\n' +
+ options.resource;
+};
+
+/**
+ * Perform the following:
+ *
+ * - ignore non-amazon headers
+ * - lowercase fields
+ * - sort lexicographically
+ * - trim whitespace between ":"
+ * - join with newline
+ *
+ * @param {Object} headers
+ * @return {String}
+ * @api private
+ */
+
+exports.canonicalizeHeaders = function(headers){
+ var buf = []
+ , fields = Object.keys(headers);
+ for (var i = 0, len = fields.length; i < len; ++i) {
+ var field = fields[i]
+ , val = headers[field]
+ , field = field.toLowerCase();
+ if (0 !== field.indexOf('x-amz')) continue;
+ buf.push(field + ':' + val);
+ }
+ return buf.sort().join('\n');
+};
+
+/**
+ * Perform the following:
+ *
+ * - ignore non sub-resources
+ * - sort lexicographically
+ *
+ * @param {String} resource
+ * @return {String}
+ * @api private
+ */
+
+exports.canonicalizeResource = function(resource){
+ var url = parse(resource, true)
+ , path = url.pathname
+ , buf = [];
+
+ Object.keys(url.query).forEach(function(key){
+ if (!~keys.indexOf(key)) return;
+ var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]);
+ buf.push(key + val);
+ });
+
+ return path + (buf.length
+ ? '?' + buf.sort().join('&')
+ : '');
+};
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/aws2.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/aws2.js
new file mode 100644
index 0000000..eb683f7
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/aws2.js
@@ -0,0 +1,128 @@
+var crypto = require('crypto')
+
+// The Authentication Header
+//
+// The Amazon S3 REST API uses the standard HTTPAuthorization header to pass authentication information. (The name of the standard header is unfortunate because it carries authentication information, not authorization).Under the Amazon S3 authentication scheme, the Authorization header has the following form.
+//
+// Authorization: AWS AWSAccessKeyId:Signature
+//
+// Developers are issued an AWS Access Key ID and AWS SecretAccess Key when they register. For request authentication, theAWSAccessKeyId element identifies the secret key that was used to compute the signature, and (indirectly) the developer making the request.
+//
+// The Signature element is the RFC 2104HMAC-SHA1 of selected elements from the request, and so theSignature part of the Authorization header will vary from request to request. If the request signature calculated by the system matches theSignature included with the request, then the requester will have demonstrated possession to the AWSSecret Access Key. The request will then be processed under the identity, and with the authority, of the developer to whom the key was issued.
+//
+// Following is pseudo-grammar that illustrates the construction of the Authorization request header (\nmeans the Unicode code point U+000A commonly called newline).
+
+function authorizationHeader (accessKey) {
+ // Authorization = "AWS" + " " + AWSAccessKeyId + ":" + Signature;
+
+ var authorization = 'AWS' + " " + accessKey + ":" + signature()
+
+ return authorization
+}
+
+//
+
+function signature (secret, verb, md5, contenttype, date, amzheaders, bucket, path) {
+ // Signature = Base64( HMAC-SHA1( UTF-8-Encoding-Of( YourSecretAccessKeyID, StringToSign ) ) );
+
+ function encodeSignature (stringToSign) {
+ return crypto.createHash('sha1').update(stringToSign).digest('base64')
+ }
+
+ //
+ // StringToSign = HTTP-Verb + "\n" +
+ // Content-MD5 + "\n" +
+ // Content-Type + "\n" +
+ // Date + "\n" +
+ // CanonicalizedAmzHeaders +
+ // CanonicalizedResource;
+
+ function compileStringToSign () {
+ var s =
+ verb + '\n'
+ (md5 || '') + '\n'
+ (contenttype || '') + '\n'
+ date.toUTCString() + '\n'
+ canonicalizeAmzHeaders(amzheaders) +
+ canonicalizeResource()
+ return s
+ }
+
+ //
+ // CanonicalizedResource = [ "/" + Bucket ] +
+ // +
+ // [ sub-resource, if present. For example "?acl", "?location", "?logging", or "?torrent"];
+
+ function canonicalizeResource () {
+ return '/' + bucket + path
+ }
+
+ //
+ // CanonicalizedAmzHeaders =
+ //
+ // HMAC-SHA1 is an algorithm defined by RFC 2104 (go to RFC 2104 - Keyed-Hashing for Message Authentication ). The algorithm takes as input two byte-strings: a key and a message. For Amazon S3 Request authentication, use your AWS Secret Access Key (YourSecretAccessKeyID) as the key, and the UTF-8 encoding of the StringToSign as the message. The output of HMAC-SHA1 is also a byte string, called the digest. The Signature request parameter is constructed by Base64 encoding this digest.
+ // Request Canonicalization for Signing
+ //
+ // Recall that when the system receives an authenticated request, it compares the computed request signature with the signature provided in the request in StringToSign. For that reason, you must compute the signature using the same method used by Amazon S3. We call the process of putting a request in an agreed-upon form for signing "canonicalization".
+
+}
+
+
+
+// Constructing the CanonicalizedResource Element
+//
+// CanonicalizedResource represents the Amazon S3 resource targeted by the request. Construct it for a REST request as follows:
+//
+// Launch Process
+//
+// 1
+//
+//
+// Start with the empty string ("").
+//
+// 2
+//
+//
+// If the request specifies a bucket using the HTTP Host header (virtual hosted-style), append the bucket name preceded by a "/" (e.g., "/bucketname"). For path-style requests and requests that don't address a bucket, do nothing. For more information on virtual hosted-style requests, see Virtual Hosting of Buckets.
+//
+// 3
+//
+//
+// Append the path part of the un-decoded HTTP Request-URI, up-to but not including the query string.
+//
+// 4
+//
+//
+// If the request addresses a sub-resource, like ?versioning, ?location, ?acl, ?torrent, ?lifecycle, or ?versionid append the sub-resource, its value if it has one, and the question mark. Note that in case of multiple sub-resources, sub-resources must be lexicographically sorted by sub-resource name and separated by '&'. e.g. ?acl&versionId=value.
+//
+// The list of sub-resources that must be included when constructing the CanonicalizedResource Element are: acl, lifecycle, location, logging, notification, partNumber, policy, requestPayment, torrent, uploadId, uploads, versionId, versioning, versions and website.
+//
+// If the request specifies query string parameters overriding the response header values (see Get Object), append the query string parameters, and its values. When signing you do not encode these values. However, when making the request, you must encode these parameter values. The query string parameters in a GET request include response-content-type, response-content-language, response-expires, response-cache-control, response-content-disposition, response-content-encoding.
+//
+// The delete query string parameter must be including when creating the CanonicalizedResource for a Multi-Object Delete request.
+//
+// Elements of the CanonicalizedResource that come from the HTTP Request-URI should be signed literally as they appear in the HTTP request, including URL-Encoding meta characters.
+//
+// The CanonicalizedResource might be different than the HTTP Request-URI. In particular, if your request uses the HTTP Host header to specify a bucket, the bucket does appear in the HTTP Request-URI. However, the CanonicalizedResource continues to include the bucket. Query string parameters might also appear in the Request-URI but are not included in CanonicalizedResource. For more information, see Virtual Hosting of Buckets.
+// Constructing the CanonicalizedAmzHeaders Element
+//
+// To construct the CanonicalizedAmzHeaders part of StringToSign, select all HTTP request headers that start with 'x-amz-' (using a case-insensitive comparison) and use the following process.
+//
+// CanonicalizedAmzHeaders Process
+// 1 Convert each HTTP header name to lower-case. For example, 'X-Amz-Date' becomes 'x-amz-date'.
+// 2 Sort the collection of headers lexicographically by header name.
+// 3 Combine header fields with the same name into one "header-name:comma-separated-value-list" pair as prescribed by RFC 2616, section 4.2, without any white-space between values. For example, the two metadata headers 'x-amz-meta-username: fred' and 'x-amz-meta-username: barney' would be combined into the single header 'x-amz-meta-username: fred,barney'.
+// 4 "Unfold" long headers that span multiple lines (as allowed by RFC 2616, section 4.2) by replacing the folding white-space (including new-line) by a single space.
+// 5 Trim any white-space around the colon in the header. For example, the header 'x-amz-meta-username: fred,barney' would become 'x-amz-meta-username:fred,barney'
+// 6 Finally, append a new-line (U+000A) to each canonicalized header in the resulting list. Construct the CanonicalizedResource element by concatenating all headers in this list into a single string.
+//
+// Positional versus Named HTTP Header StringToSign Elements
+//
+// The first few header elements of StringToSign (Content-Type, Date, and Content-MD5) are positional in nature. StringToSign does not include the names of these headers, only their values from the request. In contrast, the 'x-amz-' elements are named; Both the header names and the header values appear in StringToSign.
+//
+// If a positional header called for in the definition of StringToSign is not present in your request, (Content-Type or Content-MD5, for example, are optional for PUT requests, and meaningless for GET requests), substitute the empty string ("") in for that position.
+// Time Stamp Requirement
+//
+// A valid time stamp (using either the HTTP Date header or an x-amz-date alternative) is mandatory for authenticated requests. Furthermore, the client time-stamp included with an authenticated request must be within 15 minutes of the Amazon S3 system time when the request is received. If not, the request will fail with the RequestTimeTooSkewed error status code. The intention of these restrictions is to limit the possibility that intercepted requests could be replayed by an adversary. For stronger protection against eavesdropping, use the HTTPS transport for authenticated requests.
+//
+// Some HTTP client libraries do not expose the ability to set the Date header for a request. If you have trouble including the value of the 'Date' header in the canonicalized headers, you can set the time-stamp for the request using an 'x-amz-date' header instead. The value of the x-amz-date header must be in one of the RFC 2616 formats (http://www.ietf.org/rfc/rfc2616.txt). When an x-amz-date header is present in a request, the system will ignore any Date header when computing the request signature. Therefore, if you include the x-amz-date header, use the empty string for the Date when constructing the StringToSign. See the next section for an example.
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/forever.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/forever.js
new file mode 100644
index 0000000..ac853c0
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/forever.js
@@ -0,0 +1,103 @@
+module.exports = ForeverAgent
+ForeverAgent.SSL = ForeverAgentSSL
+
+var util = require('util')
+ , Agent = require('http').Agent
+ , net = require('net')
+ , tls = require('tls')
+ , AgentSSL = require('https').Agent
+
+function ForeverAgent(options) {
+ var self = this
+ self.options = options || {}
+ self.requests = {}
+ self.sockets = {}
+ self.freeSockets = {}
+ self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets
+ self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets
+ self.on('free', function(socket, host, port) {
+ var name = host + ':' + port
+ if (self.requests[name] && self.requests[name].length) {
+ self.requests[name].shift().onSocket(socket)
+ } else if (self.sockets[name].length < self.minSockets) {
+ if (!self.freeSockets[name]) self.freeSockets[name] = []
+ self.freeSockets[name].push(socket)
+
+ // if an error happens while we don't use the socket anyway, meh, throw the socket away
+ function onIdleError() {
+ socket.destroy()
+ }
+ socket._onIdleError = onIdleError
+ socket.on('error', onIdleError)
+ } else {
+ // If there are no pending requests just destroy the
+ // socket and it will get removed from the pool. This
+ // gets us out of timeout issues and allows us to
+ // default to Connection:keep-alive.
+ socket.destroy();
+ }
+ })
+
+}
+util.inherits(ForeverAgent, Agent)
+
+ForeverAgent.defaultMinSockets = 5
+
+
+ForeverAgent.prototype.createConnection = net.createConnection
+ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
+ForeverAgent.prototype.addRequest = function(req, host, port) {
+ var name = host + ':' + port
+ if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {
+ var idleSocket = this.freeSockets[name].pop()
+ idleSocket.removeListener('error', idleSocket._onIdleError)
+ delete idleSocket._onIdleError
+ req._reusedSocket = true
+ req.onSocket(idleSocket)
+ } else {
+ this.addRequestNoreuse(req, host, port)
+ }
+}
+
+ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
+ if (this.sockets[name]) {
+ var index = this.sockets[name].indexOf(s);
+ if (index !== -1) {
+ this.sockets[name].splice(index, 1);
+ }
+ } else if (this.sockets[name] && this.sockets[name].length === 0) {
+ // don't leak
+ delete this.sockets[name];
+ delete this.requests[name];
+ }
+
+ if (this.freeSockets[name]) {
+ var index = this.freeSockets[name].indexOf(s)
+ if (index !== -1) {
+ this.freeSockets[name].splice(index, 1)
+ if (this.freeSockets[name].length === 0) {
+ delete this.freeSockets[name]
+ }
+ }
+ }
+
+ if (this.requests[name] && this.requests[name].length) {
+ // If we have pending requests and a socket gets closed a new one
+ // needs to be created to take over in the pool for the one that closed.
+ this.createSocket(name, host, port).emit('free');
+ }
+}
+
+function ForeverAgentSSL (options) {
+ ForeverAgent.call(this, options)
+}
+util.inherits(ForeverAgentSSL, ForeverAgent)
+
+ForeverAgentSSL.prototype.createConnection = createConnectionSSL
+ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
+
+function createConnectionSSL (port, host, options) {
+ options.port = port
+ options.host = host
+ return tls.connect(options)
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/main.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/main.js
new file mode 100644
index 0000000..2407a93
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/main.js
@@ -0,0 +1,974 @@
+// Copyright 2010-2012 Mikeal Rogers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+var http = require('http')
+ , https = false
+ , tls = false
+ , url = require('url')
+ , util = require('util')
+ , stream = require('stream')
+ , qs = require('querystring')
+ , mimetypes = require('./mimetypes')
+ , oauth = require('./oauth')
+ , uuid = require('./uuid')
+ , ForeverAgent = require('./forever')
+ , Cookie = require('./vendor/cookie')
+ , CookieJar = require('./vendor/cookie/jar')
+ , cookieJar = new CookieJar
+ , tunnel = require('./tunnel')
+ , aws = require('./aws')
+ ;
+
+if (process.logging) {
+ var log = process.logging('request')
+}
+
+try {
+ https = require('https')
+} catch (e) {}
+
+try {
+ tls = require('tls')
+} catch (e) {}
+
+function toBase64 (str) {
+ return (new Buffer(str || "", "ascii")).toString("base64")
+}
+
+// Hacky fix for pre-0.4.4 https
+if (https && !https.Agent) {
+ https.Agent = function (options) {
+ http.Agent.call(this, options)
+ }
+ util.inherits(https.Agent, http.Agent)
+ https.Agent.prototype._getConnection = function (host, port, cb) {
+ var s = tls.connect(port, host, this.options, function () {
+ // do other checks here?
+ if (cb) cb()
+ })
+ return s
+ }
+}
+
+function isReadStream (rs) {
+ if (rs.readable && rs.path && rs.mode) {
+ return true
+ }
+}
+
+function copy (obj) {
+ var o = {}
+ Object.keys(obj).forEach(function (i) {
+ o[i] = obj[i]
+ })
+ return o
+}
+
+var isUrl = /^https?:/
+
+var globalPool = {}
+
+function Request (options) {
+ stream.Stream.call(this)
+ this.readable = true
+ this.writable = true
+
+ if (typeof options === 'string') {
+ options = {uri:options}
+ }
+
+ var reserved = Object.keys(Request.prototype)
+ for (var i in options) {
+ if (reserved.indexOf(i) === -1) {
+ this[i] = options[i]
+ } else {
+ if (typeof options[i] === 'function') {
+ delete options[i]
+ }
+ }
+ }
+ options = copy(options)
+
+ this.init(options)
+}
+util.inherits(Request, stream.Stream)
+Request.prototype.init = function (options) {
+ var self = this
+
+ if (!options) options = {}
+
+ if (!self.pool && self.pool !== false) self.pool = globalPool
+ self.dests = []
+ self.__isRequestRequest = true
+
+ // Protect against double callback
+ if (!self._callback && self.callback) {
+ self._callback = self.callback
+ self.callback = function () {
+ if (self._callbackCalled) return // Print a warning maybe?
+ self._callback.apply(self, arguments)
+ self._callbackCalled = true
+ }
+ self.on('error', self.callback.bind())
+ self.on('complete', self.callback.bind(self, null))
+ }
+
+ if (self.url) {
+ // People use this property instead all the time so why not just support it.
+ self.uri = self.url
+ delete self.url
+ }
+
+ if (!self.uri) {
+ throw new Error("options.uri is a required argument")
+ } else {
+ if (typeof self.uri == "string") self.uri = url.parse(self.uri)
+ }
+ if (self.proxy) {
+ if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy)
+
+ // do the HTTP CONNECT dance using koichik/node-tunnel
+ if (http.globalAgent && self.uri.protocol === "https:") {
+ self.tunnel = true
+ var tunnelFn = self.proxy.protocol === "http:"
+ ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
+
+ var tunnelOptions = { proxy: { host: self.proxy.hostname
+ , port: +self.proxy.port
+ , proxyAuth: self.proxy.auth }
+ , ca: this.ca }
+
+ self.agent = tunnelFn(tunnelOptions)
+ self.tunnel = true
+ }
+ }
+
+ if (!self.uri.host || !self.uri.pathname) {
+ // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar
+ // Detect and reject it as soon as possible
+ var faultyUri = url.format(self.uri)
+ var message = 'Invalid URI "' + faultyUri + '"'
+ if (Object.keys(options).length === 0) {
+ // No option ? This can be the sign of a redirect
+ // As this is a case where the user cannot do anything (he didn't call request directly with this URL)
+ // he should be warned that it can be caused by a redirection (can save some hair)
+ message += '. This can be caused by a crappy redirection.'
+ }
+ self.emit('error', new Error(message))
+ return // This error was fatal
+ }
+
+ self._redirectsFollowed = self._redirectsFollowed || 0
+ self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10
+ self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true
+ self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false;
+ if (self.followRedirect || self.followAllRedirects)
+ self.redirects = self.redirects || []
+
+ self.headers = self.headers ? copy(self.headers) : {}
+
+ self.setHost = false
+ if (!self.headers.host) {
+ self.headers.host = self.uri.hostname
+ if (self.uri.port) {
+ if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') &&
+ !(self.uri.port === 443 && self.uri.protocol === 'https:') )
+ self.headers.host += (':'+self.uri.port)
+ }
+ self.setHost = true
+ }
+
+ self.jar(self._jar || options.jar)
+
+ if (!self.uri.pathname) {self.uri.pathname = '/'}
+ if (!self.uri.port) {
+ if (self.uri.protocol == 'http:') {self.uri.port = 80}
+ else if (self.uri.protocol == 'https:') {self.uri.port = 443}
+ }
+
+ if (self.proxy && !self.tunnel) {
+ self.port = self.proxy.port
+ self.host = self.proxy.hostname
+ } else {
+ self.port = self.uri.port
+ self.host = self.uri.hostname
+ }
+
+ self.clientErrorHandler = function (error) {
+ if (self._aborted) return
+
+ if (self.setHost) delete self.headers.host
+ if (self.req._reusedSocket && error.code === 'ECONNRESET'
+ && self.agent.addRequestNoreuse) {
+ self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
+ self.start()
+ self.req.end()
+ return
+ }
+ if (self.timeout && self.timeoutTimer) {
+ clearTimeout(self.timeoutTimer)
+ self.timeoutTimer = null
+ }
+ self.emit('error', error)
+ }
+
+ if (options.form) {
+ self.form(options.form)
+ }
+
+ if (options.oauth) {
+ self.oauth(options.oauth)
+ }
+
+ if (options.aws) {
+ self.aws(options.aws)
+ }
+
+ if (self.uri.auth && !self.headers.authorization) {
+ self.headers.authorization = "Basic " + toBase64(self.uri.auth.split(':').map(function(item){ return qs.unescape(item)}).join(':'))
+ }
+ if (self.proxy && self.proxy.auth && !self.headers['proxy-authorization'] && !self.tunnel) {
+ self.headers['proxy-authorization'] = "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return qs.unescape(item)}).join(':'))
+ }
+
+ if (options.qs) self.qs(options.qs)
+
+ if (self.uri.path) {
+ self.path = self.uri.path
+ } else {
+ self.path = self.uri.pathname + (self.uri.search || "")
+ }
+
+ if (self.path.length === 0) self.path = '/'
+
+ if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
+
+ if (options.json) {
+ self.json(options.json)
+ } else if (options.multipart) {
+ self.boundary = uuid()
+ self.multipart(options.multipart)
+ }
+
+ if (self.body) {
+ var length = 0
+ if (!Buffer.isBuffer(self.body)) {
+ if (Array.isArray(self.body)) {
+ for (var i = 0; i < self.body.length; i++) {
+ length += self.body[i].length
+ }
+ } else {
+ self.body = new Buffer(self.body)
+ length = self.body.length
+ }
+ } else {
+ length = self.body.length
+ }
+ if (length) {
+ self.headers['content-length'] = length
+ } else {
+ throw new Error('Argument error, options.body.')
+ }
+ }
+
+ var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
+ , defaultModules = {'http:':http, 'https:':https}
+ , httpModules = self.httpModules || {}
+ ;
+ self.httpModule = httpModules[protocol] || defaultModules[protocol]
+
+ if (!self.httpModule) throw new Error("Invalid protocol")
+
+ if (options.ca) self.ca = options.ca
+
+ if (!self.agent) {
+ if (options.agentOptions) self.agentOptions = options.agentOptions
+
+ if (options.agentClass) {
+ self.agentClass = options.agentClass
+ } else if (options.forever) {
+ self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
+ } else {
+ self.agentClass = self.httpModule.Agent
+ }
+ }
+
+ if (self.pool === false) {
+ self.agent = false
+ } else {
+ self.agent = self.agent || self.getAgent()
+ if (self.maxSockets) {
+ // Don't use our pooling if node has the refactored client
+ self.agent.maxSockets = self.maxSockets
+ }
+ if (self.pool.maxSockets) {
+ // Don't use our pooling if node has the refactored client
+ self.agent.maxSockets = self.pool.maxSockets
+ }
+ }
+
+ self.once('pipe', function (src) {
+ if (self.ntick) throw new Error("You cannot pipe to this stream after the first nextTick() after creation of the request stream.")
+ self.src = src
+ if (isReadStream(src)) {
+ if (!self.headers['content-type'] && !self.headers['Content-Type'])
+ self.headers['content-type'] = mimetypes.lookup(src.path.slice(src.path.lastIndexOf('.')+1))
+ } else {
+ if (src.headers) {
+ for (var i in src.headers) {
+ if (!self.headers[i]) {
+ self.headers[i] = src.headers[i]
+ }
+ }
+ }
+ if (src.method && !self.method) {
+ self.method = src.method
+ }
+ }
+
+ self.on('pipe', function () {
+ console.error("You have already piped to this stream. Pipeing twice is likely to break the request.")
+ })
+ })
+
+ process.nextTick(function () {
+ if (self._aborted) return
+
+ if (self.body) {
+ if (Array.isArray(self.body)) {
+ self.body.forEach(function (part) {
+ self.write(part)
+ })
+ } else {
+ self.write(self.body)
+ }
+ self.end()
+ } else if (self.requestBodyStream) {
+ console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.")
+ self.requestBodyStream.pipe(self)
+ } else if (!self.src) {
+ if (self.method !== 'GET' && typeof self.method !== 'undefined') {
+ self.headers['content-length'] = 0;
+ }
+ self.end();
+ }
+ self.ntick = true
+ })
+}
+
+Request.prototype.getAgent = function () {
+ var Agent = this.agentClass
+ var options = {}
+ if (this.agentOptions) {
+ for (var i in this.agentOptions) {
+ options[i] = this.agentOptions[i]
+ }
+ }
+ if (this.ca) options.ca = this.ca
+
+ var poolKey = ''
+
+ // different types of agents are in different pools
+ if (Agent !== this.httpModule.Agent) {
+ poolKey += Agent.name
+ }
+
+ if (!this.httpModule.globalAgent) {
+ // node 0.4.x
+ options.host = this.host
+ options.port = this.port
+ if (poolKey) poolKey += ':'
+ poolKey += this.host + ':' + this.port
+ }
+
+ if (options.ca) {
+ if (poolKey) poolKey += ':'
+ poolKey += options.ca
+ }
+
+ if (!poolKey && Agent === this.httpModule.Agent && this.httpModule.globalAgent) {
+ // not doing anything special. Use the globalAgent
+ return this.httpModule.globalAgent
+ }
+
+ // already generated an agent for this setting
+ if (this.pool[poolKey]) return this.pool[poolKey]
+
+ return this.pool[poolKey] = new Agent(options)
+}
+
+Request.prototype.start = function () {
+ var self = this
+
+ if (self._aborted) return
+
+ self._started = true
+ self.method = self.method || 'GET'
+ self.href = self.uri.href
+ if (log) log('%method %href', self)
+
+ if (self.src && self.src.stat && self.src.stat.size) {
+ self.headers['content-length'] = self.src.stat.size
+ }
+ if (self._aws) {
+ self.aws(self._aws, true)
+ }
+
+ self.req = self.httpModule.request(self, function (response) {
+ if (self._aborted) return
+ if (self._paused) response.pause()
+
+ self.response = response
+ response.request = self
+ response.toJSON = toJSON
+
+ if (self.httpModule === https &&
+ self.strictSSL &&
+ !response.client.authorized) {
+ var sslErr = response.client.authorizationError
+ self.emit('error', new Error('SSL Error: '+ sslErr))
+ return
+ }
+
+ if (self.setHost) delete self.headers.host
+ if (self.timeout && self.timeoutTimer) {
+ clearTimeout(self.timeoutTimer)
+ self.timeoutTimer = null
+ }
+
+ var addCookie = function (cookie) {
+ if (self._jar) self._jar.add(new Cookie(cookie))
+ else cookieJar.add(new Cookie(cookie))
+ }
+
+ if (response.headers['set-cookie'] && (!self._disableCookies)) {
+ if (Array.isArray(response.headers['set-cookie'])) response.headers['set-cookie'].forEach(addCookie)
+ else addCookie(response.headers['set-cookie'])
+ }
+
+ if (response.statusCode >= 300 && response.statusCode < 400 &&
+ (self.followAllRedirects ||
+ (self.followRedirect && (self.method !== 'PUT' && self.method !== 'POST' && self.method !== 'DELETE'))) &&
+ response.headers.location) {
+ if (self._redirectsFollowed >= self.maxRedirects) {
+ self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop."))
+ return
+ }
+ self._redirectsFollowed += 1
+
+ if (!isUrl.test(response.headers.location)) {
+ response.headers.location = url.resolve(self.uri.href, response.headers.location)
+ }
+ self.uri = response.headers.location
+ self.redirects.push(
+ { statusCode : response.statusCode
+ , redirectUri: response.headers.location
+ }
+ )
+ if (self.followAllRedirects) self.method = 'GET'
+ // self.method = 'GET'; // Force all redirects to use GET || commented out fixes #215
+ delete self.req
+ delete self.agent
+ delete self._started
+ delete self.body
+ if (self.headers) {
+ delete self.headers.host
+ }
+ if (log) log('Redirect to %uri', self)
+ self.init()
+ return // Ignore the rest of the response
+ } else {
+ self._redirectsFollowed = self._redirectsFollowed || 0
+ // Be a good stream and emit end when the response is finished.
+ // Hack to emit end on close because of a core bug that never fires end
+ response.on('close', function () {
+ if (!self._ended) self.response.emit('end')
+ })
+
+ if (self.encoding) {
+ if (self.dests.length !== 0) {
+ console.error("Ingoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
+ } else {
+ response.setEncoding(self.encoding)
+ }
+ }
+
+ self.dests.forEach(function (dest) {
+ self.pipeDest(dest)
+ })
+
+ response.on("data", function (chunk) {
+ self._destdata = true
+ self.emit("data", chunk)
+ })
+ response.on("end", function (chunk) {
+ self._ended = true
+ self.emit("end", chunk)
+ })
+ response.on("close", function () {self.emit("close")})
+
+ self.emit('response', response)
+
+ if (self.callback) {
+ var buffer = []
+ var bodyLen = 0
+ self.on("data", function (chunk) {
+ buffer.push(chunk)
+ bodyLen += chunk.length
+ })
+ self.on("end", function () {
+ if (self._aborted) return
+
+ if (buffer.length && Buffer.isBuffer(buffer[0])) {
+ var body = new Buffer(bodyLen)
+ var i = 0
+ buffer.forEach(function (chunk) {
+ chunk.copy(body, i, 0, chunk.length)
+ i += chunk.length
+ })
+ if (self.encoding === null) {
+ response.body = body
+ } else {
+ response.body = body.toString()
+ }
+ } else if (buffer.length) {
+ response.body = buffer.join('')
+ }
+
+ if (self._json) {
+ try {
+ response.body = JSON.parse(response.body)
+ } catch (e) {}
+ }
+
+ self.emit('complete', response, response.body)
+ })
+ }
+ }
+ })
+
+ if (self.timeout && !self.timeoutTimer) {
+ self.timeoutTimer = setTimeout(function () {
+ self.req.abort()
+ var e = new Error("ETIMEDOUT")
+ e.code = "ETIMEDOUT"
+ self.emit("error", e)
+ }, self.timeout)
+
+ // Set additional timeout on socket - in case if remote
+ // server freeze after sending headers
+ if (self.req.setTimeout) { // only works on node 0.6+
+ self.req.setTimeout(self.timeout, function () {
+ if (self.req) {
+ self.req.abort()
+ var e = new Error("ESOCKETTIMEDOUT")
+ e.code = "ESOCKETTIMEDOUT"
+ self.emit("error", e)
+ }
+ })
+ }
+ }
+
+ self.req.on('error', self.clientErrorHandler)
+ self.req.on('drain', function() {
+ self.emit('drain')
+ })
+
+ self.emit('request', self.req)
+}
+
+Request.prototype.abort = function () {
+ this._aborted = true;
+
+ if (this.req) {
+ this.req.abort()
+ }
+ else if (this.response) {
+ this.response.abort()
+ }
+
+ this.emit("abort")
+}
+
+Request.prototype.pipeDest = function (dest) {
+ var response = this.response
+ // Called after the response is received
+ if (dest.headers) {
+ dest.headers['content-type'] = response.headers['content-type']
+ if (response.headers['content-length']) {
+ dest.headers['content-length'] = response.headers['content-length']
+ }
+ }
+ if (dest.setHeader) {
+ for (var i in response.headers) {
+ dest.setHeader(i, response.headers[i])
+ }
+ dest.statusCode = response.statusCode
+ }
+ if (this.pipefilter) this.pipefilter(response, dest)
+}
+
+// Composable API
+Request.prototype.setHeader = function (name, value, clobber) {
+ if (clobber === undefined) clobber = true
+ if (clobber || !this.headers.hasOwnProperty(name)) this.headers[name] = value
+ else this.headers[name] += ',' + value
+ return this
+}
+Request.prototype.setHeaders = function (headers) {
+ for (var i in headers) {this.setHeader(i, headers[i])}
+ return this
+}
+Request.prototype.qs = function (q, clobber) {
+ var base
+ if (!clobber && this.uri.query) base = qs.parse(this.uri.query)
+ else base = {}
+
+ for (var i in q) {
+ base[i] = q[i]
+ }
+
+ this.uri = url.parse(this.uri.href.split('?')[0] + '?' + qs.stringify(base))
+ this.url = this.uri
+
+ return this
+}
+Request.prototype.form = function (form) {
+ this.headers['content-type'] = 'application/x-www-form-urlencoded; charset=utf-8'
+ this.body = qs.stringify(form).toString('utf8')
+ return this
+}
+Request.prototype.multipart = function (multipart) {
+ var self = this
+ self.body = []
+
+ if (!self.headers['content-type']) {
+ self.headers['content-type'] = 'multipart/related; boundary=' + self.boundary;
+ } else {
+ self.headers['content-type'] = self.headers['content-type'].split(';')[0] + '; boundary=' + self.boundary;
+ }
+
+ console.log('boundary >> ' + self.boundary)
+
+ if (!multipart.forEach) throw new Error('Argument error, options.multipart.')
+
+ multipart.forEach(function (part) {
+ var body = part.body
+ if(body == null) throw Error('Body attribute missing in multipart.')
+ delete part.body
+ var preamble = '--' + self.boundary + '\r\n'
+ Object.keys(part).forEach(function (key) {
+ preamble += key + ': ' + part[key] + '\r\n'
+ })
+ preamble += '\r\n'
+ self.body.push(new Buffer(preamble))
+ self.body.push(new Buffer(body))
+ self.body.push(new Buffer('\r\n'))
+ })
+ self.body.push(new Buffer('--' + self.boundary + '--'))
+ return self
+}
+Request.prototype.json = function (val) {
+ this.setHeader('content-type', 'application/json')
+ this.setHeader('accept', 'application/json')
+ this._json = true
+ if (typeof val === 'boolean') {
+ if (typeof this.body === 'object') this.body = JSON.stringify(this.body)
+ } else {
+ this.body = JSON.stringify(val)
+ }
+ return this
+}
+Request.prototype.aws = function (opts, now) {
+ if (!now) {
+ this._aws = opts
+ return this
+ }
+ var date = new Date()
+ this.setHeader('date', date.toUTCString())
+ this.setHeader('authorization', aws.authorization(
+ { key: opts.key
+ , secret: opts.secret
+ , verb: this.method
+ , date: date
+ , resource: aws.canonicalizeResource('/' + opts.bucket + this.path)
+ , contentType: this.headers['content-type'] || ''
+ , md5: this.headers['content-md5'] || ''
+ , amazonHeaders: aws.canonicalizeHeaders(this.headers)
+ }
+ ))
+
+ return this
+}
+
+Request.prototype.oauth = function (_oauth) {
+ var form
+ if (this.headers['content-type'] &&
+ this.headers['content-type'].slice(0, 'application/x-www-form-urlencoded'.length) ===
+ 'application/x-www-form-urlencoded'
+ ) {
+ form = qs.parse(this.body)
+ }
+ if (this.uri.query) {
+ form = qs.parse(this.uri.query)
+ }
+ if (!form) form = {}
+ var oa = {}
+ for (var i in form) oa[i] = form[i]
+ for (var i in _oauth) oa['oauth_'+i] = _oauth[i]
+ if (!oa.oauth_version) oa.oauth_version = '1.0'
+ if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( (new Date()).getTime() / 1000 ).toString()
+ if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '')
+
+ oa.oauth_signature_method = 'HMAC-SHA1'
+
+ var consumer_secret = oa.oauth_consumer_secret
+ delete oa.oauth_consumer_secret
+ var token_secret = oa.oauth_token_secret
+ delete oa.oauth_token_secret
+
+ var baseurl = this.uri.protocol + '//' + this.uri.host + this.uri.pathname
+ var signature = oauth.hmacsign(this.method, baseurl, oa, consumer_secret, token_secret)
+
+ // oa.oauth_signature = signature
+ for (var i in form) {
+ if ( i.slice(0, 'oauth_') in _oauth) {
+ // skip
+ } else {
+ delete oa['oauth_'+i]
+ }
+ }
+ this.headers.Authorization =
+ 'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',')
+ this.headers.Authorization += ',oauth_signature="'+oauth.rfc3986(signature)+'"'
+ return this
+}
+Request.prototype.jar = function (jar) {
+ var cookies
+
+ if (this._redirectsFollowed === 0) {
+ this.originalCookieHeader = this.headers.cookie
+ }
+
+ if (jar === false) {
+ // disable cookies
+ cookies = false;
+ this._disableCookies = true;
+ } else if (jar) {
+ // fetch cookie from the user defined cookie jar
+ cookies = jar.get({ url: this.uri.href })
+ } else {
+ // fetch cookie from the global cookie jar
+ cookies = cookieJar.get({ url: this.uri.href })
+ }
+
+ if (cookies && cookies.length) {
+ var cookieString = cookies.map(function (c) {
+ return c.name + "=" + c.value
+ }).join("; ")
+
+ if (this.originalCookieHeader) {
+ // Don't overwrite existing Cookie header
+ this.headers.cookie = this.originalCookieHeader + '; ' + cookieString
+ } else {
+ this.headers.cookie = cookieString
+ }
+ }
+ this._jar = jar
+ return this
+}
+
+
+// Stream API
+Request.prototype.pipe = function (dest, opts) {
+ if (this.response) {
+ if (this._destdata) {
+ throw new Error("You cannot pipe after data has been emitted from the response.")
+ } else if (this._ended) {
+ throw new Error("You cannot pipe after the response has been ended.")
+ } else {
+ stream.Stream.prototype.pipe.call(this, dest, opts)
+ this.pipeDest(dest)
+ return dest
+ }
+ } else {
+ this.dests.push(dest)
+ stream.Stream.prototype.pipe.call(this, dest, opts)
+ return dest
+ }
+}
+Request.prototype.write = function () {
+ if (!this._started) this.start()
+ return this.req.write.apply(this.req, arguments)
+}
+Request.prototype.end = function (chunk) {
+ if (chunk) this.write(chunk)
+ if (!this._started) this.start()
+ this.req.end()
+}
+Request.prototype.pause = function () {
+ if (!this.response) this._paused = true
+ else this.response.pause.apply(this.response, arguments)
+}
+Request.prototype.resume = function () {
+ if (!this.response) this._paused = false
+ else this.response.resume.apply(this.response, arguments)
+}
+Request.prototype.destroy = function () {
+ if (!this._ended) this.end()
+}
+
+// organize params for post, put, head, del
+function initParams(uri, options, callback) {
+ if ((typeof options === 'function') && !callback) callback = options;
+ if (options && typeof options === 'object') {
+ options.uri = uri;
+ } else if (typeof uri === 'string') {
+ options = {uri:uri};
+ } else {
+ options = uri;
+ uri = options.uri;
+ }
+ return { uri: uri, options: options, callback: callback };
+}
+
+function request (uri, options, callback) {
+ if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.')
+ if ((typeof options === 'function') && !callback) callback = options;
+ if (options && typeof options === 'object') {
+ options.uri = uri;
+ } else if (typeof uri === 'string') {
+ options = {uri:uri};
+ } else {
+ options = uri;
+ }
+
+ if (callback) options.callback = callback;
+ var r = new Request(options)
+ return r
+}
+
+module.exports = request
+
+request.defaults = function (options) {
+ var def = function (method) {
+ var d = function (uri, opts, callback) {
+ var params = initParams(uri, opts, callback);
+ for (var i in options) {
+ if (params.options[i] === undefined) params.options[i] = options[i]
+ }
+ return method(params.options, params.callback)
+ }
+ return d
+ }
+ var de = def(request)
+ de.get = def(request.get)
+ de.post = def(request.post)
+ de.put = def(request.put)
+ de.head = def(request.head)
+ de.del = def(request.del)
+ de.cookie = def(request.cookie)
+ de.jar = def(request.jar)
+ return de
+}
+
+request.forever = function (agentOptions, optionsArg) {
+ var options = {}
+ if (optionsArg) {
+ for (option in optionsArg) {
+ options[option] = optionsArg[option]
+ }
+ }
+ if (agentOptions) options.agentOptions = agentOptions
+ options.forever = true
+ return request.defaults(options)
+}
+
+request.get = request
+request.post = function (uri, options, callback) {
+ var params = initParams(uri, options, callback);
+ params.options.method = 'POST';
+ return request(params.uri || null, params.options, params.callback)
+}
+request.put = function (uri, options, callback) {
+ var params = initParams(uri, options, callback);
+ params.options.method = 'PUT'
+ return request(params.uri || null, params.options, params.callback)
+}
+request.head = function (uri, options, callback) {
+ var params = initParams(uri, options, callback);
+ params.options.method = 'HEAD'
+ if (params.options.body ||
+ params.options.requestBodyStream ||
+ (params.options.json && typeof params.options.json !== 'boolean') ||
+ params.options.multipart) {
+ throw new Error("HTTP HEAD requests MUST NOT include a request body.")
+ }
+ return request(params.uri || null, params.options, params.callback)
+}
+request.del = function (uri, options, callback) {
+ var params = initParams(uri, options, callback);
+ params.options.method = 'DELETE'
+ return request(params.uri || null, params.options, params.callback)
+}
+request.jar = function () {
+ return new CookieJar
+}
+request.cookie = function (str) {
+ if (str && str.uri) str = str.uri
+ if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param")
+ return new Cookie(str)
+}
+
+// Safe toJSON
+
+function getSafe (self, uuid) {
+ if (typeof self === 'object' || typeof self === 'function') var safe = {}
+ if (Array.isArray(self)) var safe = []
+
+ var recurse = []
+
+ Object.defineProperty(self, uuid, {})
+
+ var attrs = Object.keys(self).filter(function (i) {
+ if (i === uuid) return false
+ if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true
+ return !(Object.getOwnPropertyDescriptor(self[i], uuid))
+ })
+
+
+ for (var i=0;i= 0.3.6"
+ ],
+ "main": "./main",
+ "scripts": {
+ "test": "node tests/run.js"
+ },
+ "readme": "# Request -- Simplified HTTP request method\n\n## Install\n\n
\n npm install request\n
\n\nOr from source:\n\n
\n git clone git://github.com/mikeal/request.git \n cd request\n npm link\n
\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types, in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let's get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n } \n }\n})\n```\n\nYou can also pipe() from a http.ServerRequest instance and to a http.ServerResponse instance. The HTTP method and headers will be sent as well as the entity-body data. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since pipe() returns the destination stream in node 0.5.x you can do one line proxying :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Assume by some stretch of magic you aquired the verifier\n var access_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: VERIFIER\n , token_secret: access_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1/users/show.json?'\n , params = \n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n\n\n### request(options, callback)\n\nThe first argument can be either a url or an options object. The only required option is uri, all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from url.parse()\n* `qs` - object containing querystring values to be appended to the uri\n* `method` - http method, defaults to GET\n* `headers` - http headers, defaults to {}\n* `body` - entity body for POST and PUT requests. Must be buffer or string.\n* `form` - sets `body` but to querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false.\n* `maxRedirects` - the maximum number of redirects to follow, defaults to 10.\n* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.\n* `pool` - A hash object containing the agents for these requests. If omitted this request will use the global pool which is set to node's default maxSockets.\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\t\n* `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri.\n* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above.\n* `strictSSL` - Set to `true` to require that SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that ca as an option.\n* `jar` - Set to `false` if you don't want cookies to be remembered for future use or define your custom cookie jar (see examples section)\n\n\nThe callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second in an http.ClientResponse object. The third is the response body String or Buffer.\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options) \n \nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as request() but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.post\n\nSame as request() but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as request() but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nAlias to normal request method for uniformity.\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart: \n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ] \n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\nCookies are enabled by default (so they can be used in subsequent requests). To disable cookies set jar to false (either in defaults or in the options sent).\n\n```javascript\nvar request = request.defaults({jar: false})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nIf you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option:\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.add(cookie)\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n",
+ "readmeFilename": "README.md",
+ "_id": "request@2.9.203",
+ "_from": "request@2.9.x"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/googledoodle.png b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/googledoodle.png
new file mode 100644
index 0000000..f80c9c5
Binary files /dev/null and b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/googledoodle.png differ
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/run.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/run.js
new file mode 100644
index 0000000..f3a30d3
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/run.js
@@ -0,0 +1,39 @@
+var spawn = require('child_process').spawn
+ , exitCode = 0
+ ;
+
+var tests = [
+ 'test-body.js'
+ , 'test-cookie.js'
+ , 'test-cookiejar.js'
+ , 'test-defaults.js'
+ , 'test-errors.js'
+ , 'test-headers.js'
+ , 'test-httpModule.js'
+ , 'test-https.js'
+ , 'test-https-strict.js'
+ , 'test-oauth.js'
+ , 'test-pipes.js'
+ , 'test-pool.js'
+ , 'test-proxy.js'
+ , 'test-qs.js'
+ , 'test-redirect.js'
+ , 'test-timeout.js'
+ , 'test-toJSON.js'
+ , 'test-tunnel.js'
+]
+
+var next = function () {
+ if (tests.length === 0) process.exit(exitCode);
+
+ var file = tests.shift()
+ console.log(file)
+ var proc = spawn('node', [ 'tests/' + file ])
+ proc.stdout.pipe(process.stdout)
+ proc.stderr.pipe(process.stderr)
+ proc.on('exit', function (code) {
+ exitCode += code || 0
+ next()
+ })
+}
+next()
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/server.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/server.js
new file mode 100644
index 0000000..921f512
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/server.js
@@ -0,0 +1,82 @@
+var fs = require('fs')
+ , http = require('http')
+ , path = require('path')
+ , https = require('https')
+ , events = require('events')
+ , stream = require('stream')
+ , assert = require('assert')
+ ;
+
+exports.createServer = function (port) {
+ port = port || 6767
+ var s = http.createServer(function (req, resp) {
+ s.emit(req.url, req, resp);
+ })
+ s.port = port
+ s.url = 'http://localhost:'+port
+ return s;
+}
+
+exports.createSSLServer = function(port, opts) {
+ port = port || 16767
+
+ var options = { 'key' : path.join(__dirname, 'ssl', 'test.key')
+ , 'cert': path.join(__dirname, 'ssl', 'test.crt')
+ }
+ if (opts) {
+ for (var i in opts) options[i] = opts[i]
+ }
+
+ for (var i in options) {
+ options[i] = fs.readFileSync(options[i])
+ }
+
+ var s = https.createServer(options, function (req, resp) {
+ s.emit(req.url, req, resp);
+ })
+ s.port = port
+ s.url = 'https://localhost:'+port
+ return s;
+}
+
+exports.createPostStream = function (text) {
+ var postStream = new stream.Stream();
+ postStream.writeable = true;
+ postStream.readable = true;
+ setTimeout(function () {postStream.emit('data', new Buffer(text)); postStream.emit('end')}, 0);
+ return postStream;
+}
+exports.createPostValidator = function (text) {
+ var l = function (req, resp) {
+ var r = '';
+ req.on('data', function (chunk) {r += chunk})
+ req.on('end', function () {
+ if (r !== text) console.log(r, text);
+ assert.equal(r, text)
+ resp.writeHead(200, {'content-type':'text/plain'})
+ resp.write('OK')
+ resp.end()
+ })
+ }
+ return l;
+}
+exports.createGetResponse = function (text, contentType) {
+ var l = function (req, resp) {
+ contentType = contentType || 'text/plain'
+ resp.writeHead(200, {'content-type':contentType})
+ resp.write(text)
+ resp.end()
+ }
+ return l;
+}
+exports.createChunkResponse = function (chunks, contentType) {
+ var l = function (req, resp) {
+ contentType = contentType || 'text/plain'
+ resp.writeHead(200, {'content-type':contentType})
+ chunks.forEach(function (chunk) {
+ resp.write(chunk)
+ })
+ resp.end()
+ }
+ return l;
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/squid.conf b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/squid.conf
new file mode 100644
index 0000000..0d4a3b6
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/squid.conf
@@ -0,0 +1,77 @@
+#
+# Recommended minimum configuration:
+#
+acl manager proto cache_object
+acl localhost src 127.0.0.1/32 ::1
+acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
+
+# Example rule allowing access from your local networks.
+# Adapt to list your (internal) IP networks from where browsing
+# should be allowed
+acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
+acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
+acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
+acl localnet src fc00::/7 # RFC 4193 local private network range
+acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
+
+acl SSL_ports port 443
+acl Safe_ports port 80 # http
+acl Safe_ports port 21 # ftp
+acl Safe_ports port 443 # https
+acl Safe_ports port 70 # gopher
+acl Safe_ports port 210 # wais
+acl Safe_ports port 1025-65535 # unregistered ports
+acl Safe_ports port 280 # http-mgmt
+acl Safe_ports port 488 # gss-http
+acl Safe_ports port 591 # filemaker
+acl Safe_ports port 777 # multiling http
+acl CONNECT method CONNECT
+
+#
+# Recommended minimum Access Permission configuration:
+#
+# Only allow cachemgr access from localhost
+http_access allow manager localhost
+http_access deny manager
+
+# Deny requests to certain unsafe ports
+http_access deny !Safe_ports
+
+# Deny CONNECT to other than secure SSL ports
+#http_access deny CONNECT !SSL_ports
+
+# We strongly recommend the following be uncommented to protect innocent
+# web applications running on the proxy server who think the only
+# one who can access services on "localhost" is a local user
+#http_access deny to_localhost
+
+#
+# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
+#
+
+# Example rule allowing access from your local networks.
+# Adapt localnet in the ACL section to list your (internal) IP networks
+# from where browsing should be allowed
+http_access allow localnet
+http_access allow localhost
+
+# And finally deny all other access to this proxy
+http_access deny all
+
+# Squid normally listens to port 3128
+http_port 3128
+
+# We recommend you to use at least the following line.
+hierarchy_stoplist cgi-bin ?
+
+# Uncomment and adjust the following to add a disk cache directory.
+#cache_dir ufs /usr/local/var/cache 100 16 256
+
+# Leave coredumps in the first cache dir
+coredump_dir /usr/local/var/cache
+
+# Add any of your own refresh_pattern entries above these.
+refresh_pattern ^ftp: 1440 20% 10080
+refresh_pattern ^gopher: 1440 0% 1440
+refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
+refresh_pattern . 0 20% 4320
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.cnf b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.cnf
new file mode 100644
index 0000000..425a889
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.cnf
@@ -0,0 +1,20 @@
+[ req ]
+default_bits = 1024
+days = 3650
+distinguished_name = req_distinguished_name
+attributes = req_attributes
+prompt = no
+output_password = password
+
+[ req_distinguished_name ]
+C = US
+ST = CA
+L = Oakland
+O = request
+OU = request Certificate Authority
+CN = requestCA
+emailAddress = mikeal@mikealrogers.com
+
+[ req_attributes ]
+challengePassword = password challenge
+
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.crl b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.crl
new file mode 100644
index 0000000..e69de29
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.crt b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.crt
new file mode 100644
index 0000000..b4524e4
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.crt
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIICvTCCAiYCCQDn+P/MSbDsWjANBgkqhkiG9w0BAQUFADCBojELMAkGA1UEBhMC
+VVMxCzAJBgNVBAgTAkNBMRAwDgYDVQQHEwdPYWtsYW5kMRAwDgYDVQQKEwdyZXF1
+ZXN0MSYwJAYDVQQLEx1yZXF1ZXN0IENlcnRpZmljYXRlIEF1dGhvcml0eTESMBAG
+A1UEAxMJcmVxdWVzdENBMSYwJAYJKoZIhvcNAQkBFhdtaWtlYWxAbWlrZWFscm9n
+ZXJzLmNvbTAeFw0xMjAzMDEyMjUwNTZaFw0yMjAyMjcyMjUwNTZaMIGiMQswCQYD
+VQQGEwJVUzELMAkGA1UECBMCQ0ExEDAOBgNVBAcTB09ha2xhbmQxEDAOBgNVBAoT
+B3JlcXVlc3QxJjAkBgNVBAsTHXJlcXVlc3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5
+MRIwEAYDVQQDEwlyZXF1ZXN0Q0ExJjAkBgkqhkiG9w0BCQEWF21pa2VhbEBtaWtl
+YWxyb2dlcnMuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7t9pQUAK4
+5XJYTI6NrF0n3G2HZsfN+rPYSVzzL8SuVyb1tHXos+vbPm3NKI4E8X1yVAXU8CjJ
+5SqXnp4DAypAhaseho81cbhk7LXUhFz78OvAa+OD+xTAEAnNQ8tGUr4VGyplEjfD
+xsBVuqV2j8GPNTftr+drOCFlqfAgMrBn4wIDAQABMA0GCSqGSIb3DQEBBQUAA4GB
+ADVdTlVAL45R+PACNS7Gs4o81CwSclukBu4FJbxrkd4xGQmurgfRrYYKjtqiopQm
+D7ysRamS3HMN9/VKq2T7r3z1PMHPAy7zM4uoXbbaTKwlnX4j/8pGPn8Ca3qHXYlo
+88L/OOPc6Di7i7qckS3HFbXQCTiULtxWmy97oEuTwrAj
+-----END CERTIFICATE-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.csr b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.csr
new file mode 100644
index 0000000..e48c56e
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.csr
@@ -0,0 +1,13 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICBjCCAW8CAQAwgaIxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEQMA4GA1UE
+BxMHT2FrbGFuZDEQMA4GA1UEChMHcmVxdWVzdDEmMCQGA1UECxMdcmVxdWVzdCBD
+ZXJ0aWZpY2F0ZSBBdXRob3JpdHkxEjAQBgNVBAMTCXJlcXVlc3RDQTEmMCQGCSqG
+SIb3DQEJARYXbWlrZWFsQG1pa2VhbHJvZ2Vycy5jb20wgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBALu32lBQArjlclhMjo2sXSfcbYdmx836s9hJXPMvxK5XJvW0
+deiz69s+bc0ojgTxfXJUBdTwKMnlKpeengMDKkCFqx6GjzVxuGTstdSEXPvw68Br
+44P7FMAQCc1Dy0ZSvhUbKmUSN8PGwFW6pXaPwY81N+2v52s4IWWp8CAysGfjAgMB
+AAGgIzAhBgkqhkiG9w0BCQcxFBMScGFzc3dvcmQgY2hhbGxlbmdlMA0GCSqGSIb3
+DQEBBQUAA4GBAGJO7grHeVHXetjHEK8urIxdnvfB2qeZeObz4GPKIkqUurjr0rfj
+bA3EK1kDMR5aeQWR8RunixdM16Q6Ry0lEdLVWkdSwRN9dmirIHT9cypqnD/FYOia
+SdezZ0lUzXgmJIwRYRwB1KSMMocIf52ll/xC2bEGg7/ZAEuAyAgcZV3X
+-----END CERTIFICATE REQUEST-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.key b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.key
new file mode 100644
index 0000000..a53e7f7
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.key
@@ -0,0 +1,18 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,C8B5887048377F02
+
+nyD5ZH0Wup2uWsDvurq5mKDaDrf8lvNn9w0SH/ZkVnfR1/bkwqrFriqJWvZNUG+q
+nS0iBYczsWLJnbub9a1zLOTENWUKVD5uqbC3aGHhnoUTNSa27DONgP8gHOn6JgR+
+GAKo01HCSTiVT4LjkwN337QKHnMP2fTzg+IoC/CigvMcq09hRLwU1/guq0GJKGwH
+gTxYNuYmQC4Tjh8vdS4liF+Ve/P3qPR2CehZrIOkDT8PHJBGQJRo4xGUIB7Tpk38
+VCk+UZ0JCS2coY8VkY/9tqFJp/ZnnQQVmaNbdRqg7ECKL+bXnNo7yjzmazPZmPe3
+/ShbE0+CTt7LrjCaQAxWbeDzqfo1lQfgN1LulTm8MCXpQaJpv7v1VhIhQ7afjMYb
+4thW/ypHPiYS2YJCAkAVlua9Oxzzh1qJoh8Df19iHtpd79Q77X/qf+1JvITlMu0U
+gi7yEatmQcmYNws1mtTC1q2DXrO90c+NZ0LK/Alse6NRL/xiUdjug2iHeTf/idOR
+Gg/5dSZbnnlj1E5zjSMDkzg6EHAFmHV4jYGSAFLEQgp4V3ZhMVoWZrvvSHgKV/Qh
+FqrAK4INr1G2+/QTd09AIRzfy3/j6yD4A9iNaOsEf9Ua7Qh6RcALRCAZTWR5QtEf
+dX+iSNJ4E85qXs0PqwkMDkoaxIJ+tmIRJY7y8oeylV8cfGAi8Soubt/i3SlR8IHC
+uDMas/2OnwafK3N7ODeE1i7r7wkzQkSHaEz0TrF8XRnP25jAICCSLiMdAAjKfxVb
+EvzsFSuAy3Jt6bU3hSLY9o4YVYKE+68ITMv9yNjvTsEiW+T+IbN34w==
+-----END RSA PRIVATE KEY-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.srl b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.srl
new file mode 100644
index 0000000..17128db
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/ca.srl
@@ -0,0 +1 @@
+ADF62016AA40C9C3
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.cnf b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.cnf
new file mode 100644
index 0000000..cd1fd1e
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.cnf
@@ -0,0 +1,19 @@
+[ req ]
+default_bits = 1024
+days = 3650
+distinguished_name = req_distinguished_name
+attributes = req_attributes
+prompt = no
+
+[ req_distinguished_name ]
+C = US
+ST = CA
+L = Oakland
+O = request
+OU = testing
+CN = testing.request.mikealrogers.com
+emailAddress = mikeal@mikealrogers.com
+
+[ req_attributes ]
+challengePassword = password challenge
+
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.crt b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.crt
new file mode 100644
index 0000000..efe96ce
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.crt
@@ -0,0 +1,16 @@
+-----BEGIN CERTIFICATE-----
+MIICejCCAeMCCQCt9iAWqkDJwzANBgkqhkiG9w0BAQUFADCBojELMAkGA1UEBhMC
+VVMxCzAJBgNVBAgTAkNBMRAwDgYDVQQHEwdPYWtsYW5kMRAwDgYDVQQKEwdyZXF1
+ZXN0MSYwJAYDVQQLEx1yZXF1ZXN0IENlcnRpZmljYXRlIEF1dGhvcml0eTESMBAG
+A1UEAxMJcmVxdWVzdENBMSYwJAYJKoZIhvcNAQkBFhdtaWtlYWxAbWlrZWFscm9n
+ZXJzLmNvbTAeFw0xMjAzMDEyMjUwNTZaFw0yMjAyMjcyMjUwNTZaMIGjMQswCQYD
+VQQGEwJVUzELMAkGA1UECBMCQ0ExEDAOBgNVBAcTB09ha2xhbmQxEDAOBgNVBAoT
+B3JlcXVlc3QxEDAOBgNVBAsTB3Rlc3RpbmcxKTAnBgNVBAMTIHRlc3RpbmcucmVx
+dWVzdC5taWtlYWxyb2dlcnMuY29tMSYwJAYJKoZIhvcNAQkBFhdtaWtlYWxAbWlr
+ZWFscm9nZXJzLmNvbTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDgVl0jMumvOpmM
+20W5v9yhGgZj8hPhEQF/N7yCBVBn/rWGYm70IHC8T/pR5c0LkWc5gdnCJEvKWQjh
+DBKxZD8FAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEABShRkNgFbgs4vUWW9R9deNJj
+7HJoiTmvkmoOC7QzcYkjdgHbOxsSq3rBnwxsVjY9PAtPwBn0GRspOeG7KzKRgySB
+kb22LyrCFKbEOfKO/+CJc80ioK9zEPVjGsFMyAB+ftYRqM+s/4cQlTg/m89l01wC
+yapjN3RxZbInGhWR+jA=
+-----END CERTIFICATE-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.csr b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.csr
new file mode 100644
index 0000000..a8e7595
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.csr
@@ -0,0 +1,11 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIIBgjCCASwCAQAwgaMxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEQMA4GA1UE
+BxMHT2FrbGFuZDEQMA4GA1UEChMHcmVxdWVzdDEQMA4GA1UECxMHdGVzdGluZzEp
+MCcGA1UEAxMgdGVzdGluZy5yZXF1ZXN0Lm1pa2VhbHJvZ2Vycy5jb20xJjAkBgkq
+hkiG9w0BCQEWF21pa2VhbEBtaWtlYWxyb2dlcnMuY29tMFwwDQYJKoZIhvcNAQEB
+BQADSwAwSAJBAOBWXSMy6a86mYzbRbm/3KEaBmPyE+ERAX83vIIFUGf+tYZibvQg
+cLxP+lHlzQuRZzmB2cIkS8pZCOEMErFkPwUCAwEAAaAjMCEGCSqGSIb3DQEJBzEU
+ExJwYXNzd29yZCBjaGFsbGVuZ2UwDQYJKoZIhvcNAQEFBQADQQBD3E5WekQzCEJw
+7yOcqvtPYIxGaX8gRKkYfLPoj3pm3GF5SGqtJKhylKfi89szHXgktnQgzff9FN+A
+HidVJ/3u
+-----END CERTIFICATE REQUEST-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.js
new file mode 100644
index 0000000..05e21c1
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.js
@@ -0,0 +1,28 @@
+var fs = require("fs")
+var https = require("https")
+var options = { key: fs.readFileSync("./server.key")
+ , cert: fs.readFileSync("./server.crt") }
+
+var server = https.createServer(options, function (req, res) {
+ res.writeHead(200)
+ res.end()
+ server.close()
+})
+server.listen(1337)
+
+var ca = fs.readFileSync("./ca.crt")
+var agent = new https.Agent({ host: "localhost", port: 1337, ca: ca })
+
+https.request({ host: "localhost"
+ , method: "HEAD"
+ , port: 1337
+ , headers: { host: "testing.request.mikealrogers.com" }
+ , agent: agent
+ , ca: [ ca ]
+ , path: "/" }, function (res) {
+ if (res.client.authorized) {
+ console.log("node test: OK")
+ } else {
+ throw new Error(res.client.authorizationError)
+ }
+}).end()
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.key b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.key
new file mode 100644
index 0000000..72d8698
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/ca/server.key
@@ -0,0 +1,9 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIBOwIBAAJBAOBWXSMy6a86mYzbRbm/3KEaBmPyE+ERAX83vIIFUGf+tYZibvQg
+cLxP+lHlzQuRZzmB2cIkS8pZCOEMErFkPwUCAwEAAQJAK+r8ZM2sze8s7FRo/ApB
+iRBtO9fCaIdJwbwJnXKo4RKwZDt1l2mm+fzZ+/QaQNjY1oTROkIIXmnwRvZWfYlW
+gQIhAPKYsG+YSBN9o8Sdp1DMyZ/rUifKX3OE6q9tINkgajDVAiEA7Ltqh01+cnt0
+JEnud/8HHcuehUBLMofeg0G+gCnSbXECIQCqDvkXsWNNLnS/3lgsnvH0Baz4sbeJ
+rjIpuVEeg8eM5QIgbu0+9JmOV6ybdmmiMV4yAncoF35R/iKGVHDZCAsQzDECIQDZ
+0jGz22tlo5YMcYSqrdD3U4sds1pwiAaWFRbCunoUJw==
+-----END RSA PRIVATE KEY-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/npm-ca.crt b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/npm-ca.crt
new file mode 100644
index 0000000..fde2fe9
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/npm-ca.crt
@@ -0,0 +1,16 @@
+-----BEGIN CERTIFICATE-----
+MIIChzCCAfACCQDauvz/KHp8ejANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMC
+VVMxCzAJBgNVBAgTAkNBMRAwDgYDVQQHEwdPYWtsYW5kMQwwCgYDVQQKEwNucG0x
+IjAgBgNVBAsTGW5wbSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxDjAMBgNVBAMTBW5w
+bUNBMRcwFQYJKoZIhvcNAQkBFghpQGl6cy5tZTAeFw0xMTA5MDUwMTQ3MTdaFw0y
+MTA5MDIwMTQ3MTdaMIGHMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEDAOBgNV
+BAcTB09ha2xhbmQxDDAKBgNVBAoTA25wbTEiMCAGA1UECxMZbnBtIENlcnRpZmlj
+YXRlIEF1dGhvcml0eTEOMAwGA1UEAxMFbnBtQ0ExFzAVBgkqhkiG9w0BCQEWCGlA
+aXpzLm1lMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLI4tIqPpRW+ACw9GE
+OgBlJZwK5f8nnKCLK629Pv5yJpQKs3DENExAyOgDcyaF0HD0zk8zTp+ZsLaNdKOz
+Gn2U181KGprGKAXP6DU6ByOJDWmTlY6+Ad1laYT0m64fERSpHw/hjD3D+iX4aMOl
+y0HdbT5m1ZGh6SJz3ZqxavhHLQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAC4ySDbC
+l7W1WpLmtLGEQ/yuMLUf6Jy/vr+CRp4h+UzL+IQpCv8FfxsYE7dhf/bmWTEupBkv
+yNL18lipt2jSvR3v6oAHAReotvdjqhxddpe5Holns6EQd1/xEZ7sB1YhQKJtvUrl
+ZNufy1Jf1r0ldEGeA+0ISck7s+xSh9rQD2Op
+-----END CERTIFICATE-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/test.crt b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/test.crt
new file mode 100644
index 0000000..b357f86
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/test.crt
@@ -0,0 +1,15 @@
+-----BEGIN CERTIFICATE-----
+MIICQzCCAawCCQCO/XWtRFck1jANBgkqhkiG9w0BAQUFADBmMQswCQYDVQQGEwJU
+SDEQMA4GA1UECBMHQmFuZ2tvazEOMAwGA1UEBxMFU2lsb20xGzAZBgNVBAoTElRo
+ZSBSZXF1ZXN0IE1vZHVsZTEYMBYGA1UEAxMPcmVxdWVzdC5leGFtcGxlMB4XDTEx
+MTIwMzAyMjkyM1oXDTIxMTEzMDAyMjkyM1owZjELMAkGA1UEBhMCVEgxEDAOBgNV
+BAgTB0Jhbmdrb2sxDjAMBgNVBAcTBVNpbG9tMRswGQYDVQQKExJUaGUgUmVxdWVz
+dCBNb2R1bGUxGDAWBgNVBAMTD3JlcXVlc3QuZXhhbXBsZTCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAwmctddZqlA48+NXs0yOy92DijcQV1jf87zMiYAIlNUto
+wghVbTWgJU5r0pdKrD16AptnWJTzKanhItEX8XCCPgsNkq1afgTtJP7rNkwu3xcj
+eIMkhJg/ay4ZnkbnhYdsii5VTU5prix6AqWRAhbkBgoA+iVyHyof8wvZyKBoFTMC
+AwEAATANBgkqhkiG9w0BAQUFAAOBgQB6BybMJbpeiABgihDfEVBcAjDoQ8gUMgwV
+l4NulugfKTDmArqnR9aPd4ET5jX5dkMP4bwCHYsvrcYDeWEQy7x5WWuylOdKhua4
+L4cEi2uDCjqEErIG3cc1MCOk6Cl6Ld6tkIzQSf953qfdEACRytOeUqLNQcrXrqeE
+c7U8F6MWLQ==
+-----END CERTIFICATE-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/test.key b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/test.key
new file mode 100644
index 0000000..b85810d
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/ssl/test.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQDCZy111mqUDjz41ezTI7L3YOKNxBXWN/zvMyJgAiU1S2jCCFVt
+NaAlTmvSl0qsPXoCm2dYlPMpqeEi0RfxcII+Cw2SrVp+BO0k/us2TC7fFyN4gySE
+mD9rLhmeRueFh2yKLlVNTmmuLHoCpZECFuQGCgD6JXIfKh/zC9nIoGgVMwIDAQAB
+AoGBALXFwfUf8vHTSmGlrdZS2AGFPvEtuvldyoxi9K5u8xmdFCvxnOcLsF2RsTHt
+Mu5QYWhUpNJoG+IGLTPf7RJdj/kNtEs7xXqWy4jR36kt5z5MJzqiK+QIgiO9UFWZ
+fjUb6oeDnTIJA9YFBdYi97MDuL89iU/UK3LkJN3hd4rciSbpAkEA+MCkowF5kSFb
+rkOTBYBXZfiAG78itDXN6DXmqb9XYY+YBh3BiQM28oxCeQYyFy6pk/nstnd4TXk6
+V/ryA2g5NwJBAMgRKTY9KvxJWbESeMEFe2iBIV0c26/72Amgi7ZKUCLukLfD4tLF
++WSZdmTbbqI1079YtwaiOVfiLm45Q/3B0eUCQAaQ/0eWSGE+Yi8tdXoVszjr4GXb
+G81qBi91DMu6U1It+jNfIba+MPsiHLcZJMVb4/oWBNukN7bD1nhwFWdlnu0CQQCf
+Is9WHkdvz2RxbZDxb8verz/7kXXJQJhx5+rZf7jIYFxqX3yvTNv3wf2jcctJaWlZ
+fVZwB193YSivcgt778xlAkEAprYUz3jczjF5r2hrgbizPzPDR94tM5BTO3ki2v3w
+kbf+j2g7FNAx6kZiVN8XwfLc8xEeUGiPKwtq3ddPDFh17w==
+-----END RSA PRIVATE KEY-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-body.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-body.js
new file mode 100644
index 0000000..e3fc75d
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-body.js
@@ -0,0 +1,80 @@
+var server = require('./server')
+ , events = require('events')
+ , stream = require('stream')
+ , assert = require('assert')
+ , request = require('../main.js')
+ ;
+
+var s = server.createServer();
+
+var tests =
+ { testGet :
+ { resp : server.createGetResponse("TESTING!")
+ , expectBody: "TESTING!"
+ }
+ , testGetChunkBreak :
+ { resp : server.createChunkResponse(
+ [ new Buffer([239])
+ , new Buffer([163])
+ , new Buffer([191])
+ , new Buffer([206])
+ , new Buffer([169])
+ , new Buffer([226])
+ , new Buffer([152])
+ , new Buffer([131])
+ ])
+ , expectBody: "Ω☃"
+ }
+ , testGetBuffer :
+ { resp : server.createGetResponse(new Buffer("TESTING!"))
+ , encoding: null
+ , expectBody: new Buffer("TESTING!")
+ }
+ , testGetJSON :
+ { resp : server.createGetResponse('{"test":true}', 'application/json')
+ , json : true
+ , expectBody: {"test":true}
+ }
+ , testPutString :
+ { resp : server.createPostValidator("PUTTINGDATA")
+ , method : "PUT"
+ , body : "PUTTINGDATA"
+ }
+ , testPutBuffer :
+ { resp : server.createPostValidator("PUTTINGDATA")
+ , method : "PUT"
+ , body : new Buffer("PUTTINGDATA")
+ }
+ , testPutJSON :
+ { resp : server.createPostValidator(JSON.stringify({foo: 'bar'}))
+ , method: "PUT"
+ , json: {foo: 'bar'}
+ }
+
+ }
+
+s.listen(s.port, function () {
+
+ var counter = 0
+
+ for (i in tests) {
+ (function () {
+ var test = tests[i]
+ s.on('/'+i, test.resp)
+ test.uri = s.url + '/' + i
+ request(test, function (err, resp, body) {
+ if (err) throw err
+ if (test.expectBody) {
+ assert.deepEqual(test.expectBody, body)
+ }
+ counter = counter - 1;
+ if (counter === 0) {
+ console.log(Object.keys(tests).length+" tests passed.")
+ s.close()
+ }
+ })
+ counter++
+ })()
+ }
+})
+
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-cookie.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-cookie.js
new file mode 100644
index 0000000..6c6a7a7
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-cookie.js
@@ -0,0 +1,29 @@
+var Cookie = require('../vendor/cookie')
+ , assert = require('assert');
+
+var str = 'Sid="s543qactge.wKE61E01Bs%2BKhzmxrwrnug="; Path=/; httpOnly; Expires=Sat, 04 Dec 2010 23:27:28 GMT';
+var cookie = new Cookie(str);
+
+// test .toString()
+assert.equal(cookie.toString(), str);
+
+// test .path
+assert.equal(cookie.path, '/');
+
+// test .httpOnly
+assert.equal(cookie.httpOnly, true);
+
+// test .name
+assert.equal(cookie.name, 'Sid');
+
+// test .value
+assert.equal(cookie.value, '"s543qactge.wKE61E01Bs%2BKhzmxrwrnug="');
+
+// test .expires
+assert.equal(cookie.expires instanceof Date, true);
+
+// test .path default
+var cookie = new Cookie('foo=bar', { url: 'http://foo.com/bar' });
+assert.equal(cookie.path, '/bar');
+
+console.log('All tests passed');
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-cookiejar.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-cookiejar.js
new file mode 100644
index 0000000..76fcd71
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-cookiejar.js
@@ -0,0 +1,90 @@
+var Cookie = require('../vendor/cookie')
+ , Jar = require('../vendor/cookie/jar')
+ , assert = require('assert');
+
+function expires(ms) {
+ return new Date(Date.now() + ms).toUTCString();
+}
+
+// test .get() expiration
+(function() {
+ var jar = new Jar;
+ var cookie = new Cookie('sid=1234; path=/; expires=' + expires(1000));
+ jar.add(cookie);
+ setTimeout(function(){
+ var cookies = jar.get({ url: 'http://foo.com/foo' });
+ assert.equal(cookies.length, 1);
+ assert.equal(cookies[0], cookie);
+ setTimeout(function(){
+ var cookies = jar.get({ url: 'http://foo.com/foo' });
+ assert.equal(cookies.length, 0);
+ }, 1000);
+ }, 5);
+})();
+
+// test .get() path support
+(function() {
+ var jar = new Jar;
+ var a = new Cookie('sid=1234; path=/');
+ var b = new Cookie('sid=1111; path=/foo/bar');
+ var c = new Cookie('sid=2222; path=/');
+ jar.add(a);
+ jar.add(b);
+ jar.add(c);
+
+ // should remove the duplicates
+ assert.equal(jar.cookies.length, 2);
+
+ // same name, same path, latter prevails
+ var cookies = jar.get({ url: 'http://foo.com/' });
+ assert.equal(cookies.length, 1);
+ assert.equal(cookies[0], c);
+
+ // same name, diff path, path specifity prevails, latter prevails
+ var cookies = jar.get({ url: 'http://foo.com/foo/bar' });
+ assert.equal(cookies.length, 1);
+ assert.equal(cookies[0], b);
+
+ var jar = new Jar;
+ var a = new Cookie('sid=1111; path=/foo/bar');
+ var b = new Cookie('sid=1234; path=/');
+ jar.add(a);
+ jar.add(b);
+
+ var cookies = jar.get({ url: 'http://foo.com/foo/bar' });
+ assert.equal(cookies.length, 1);
+ assert.equal(cookies[0], a);
+
+ var cookies = jar.get({ url: 'http://foo.com/' });
+ assert.equal(cookies.length, 1);
+ assert.equal(cookies[0], b);
+
+ var jar = new Jar;
+ var a = new Cookie('sid=1111; path=/foo/bar');
+ var b = new Cookie('sid=3333; path=/foo/bar');
+ var c = new Cookie('pid=3333; path=/foo/bar');
+ var d = new Cookie('sid=2222; path=/foo/');
+ var e = new Cookie('sid=1234; path=/');
+ jar.add(a);
+ jar.add(b);
+ jar.add(c);
+ jar.add(d);
+ jar.add(e);
+
+ var cookies = jar.get({ url: 'http://foo.com/foo/bar' });
+ assert.equal(cookies.length, 2);
+ assert.equal(cookies[0], b);
+ assert.equal(cookies[1], c);
+
+ var cookies = jar.get({ url: 'http://foo.com/foo/' });
+ assert.equal(cookies.length, 1);
+ assert.equal(cookies[0], d);
+
+ var cookies = jar.get({ url: 'http://foo.com/' });
+ assert.equal(cookies.length, 1);
+ assert.equal(cookies[0], e);
+})();
+
+setTimeout(function() {
+ console.log('All tests passed');
+}, 1200);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-defaults.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-defaults.js
new file mode 100644
index 0000000..6c8b58f
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-defaults.js
@@ -0,0 +1,68 @@
+var server = require('./server')
+ , assert = require('assert')
+ , request = require('../main.js')
+ ;
+
+var s = server.createServer();
+
+s.listen(s.port, function () {
+ var counter = 0;
+ s.on('/get', function (req, resp) {
+ assert.equal(req.headers.foo, 'bar');
+ assert.equal(req.method, 'GET')
+ resp.writeHead(200, {'Content-Type': 'text/plain'});
+ resp.end('TESTING!');
+ });
+
+ // test get(string, function)
+ request.defaults({headers:{foo:"bar"}})(s.url + '/get', function (e, r, b){
+ if (e) throw e;
+ assert.deepEqual("TESTING!", b);
+ counter += 1;
+ });
+
+ s.on('/post', function (req, resp) {
+ assert.equal(req.headers.foo, 'bar');
+ assert.equal(req.headers['content-type'], 'application/json');
+ assert.equal(req.method, 'POST')
+ resp.writeHead(200, {'Content-Type': 'application/json'});
+ resp.end(JSON.stringify({foo:'bar'}));
+ });
+
+ // test post(string, object, function)
+ request.defaults({headers:{foo:"bar"}}).post(s.url + '/post', {json: true}, function (e, r, b){
+ if (e) throw e;
+ assert.deepEqual('bar', b.foo);
+ counter += 1;
+ });
+
+ s.on('/del', function (req, resp) {
+ assert.equal(req.headers.foo, 'bar');
+ assert.equal(req.method, 'DELETE')
+ resp.writeHead(200, {'Content-Type': 'application/json'});
+ resp.end(JSON.stringify({foo:'bar'}));
+ });
+
+ // test .del(string, function)
+ request.defaults({headers:{foo:"bar"}, json:true}).del(s.url + '/del', function (e, r, b){
+ if (e) throw e;
+ assert.deepEqual('bar', b.foo);
+ counter += 1;
+ });
+
+ s.on('/head', function (req, resp) {
+ assert.equal(req.headers.foo, 'bar');
+ assert.equal(req.method, 'HEAD')
+ resp.writeHead(200, {'Content-Type': 'text/plain'});
+ resp.end();
+ });
+
+ // test head.(object, function)
+ request.defaults({headers:{foo:"bar"}}).head({uri: s.url + '/head'}, function (e, r, b){
+ if (e) throw e;
+ counter += 1;
+ console.log(counter.toString() + " tests passed.")
+ s.close()
+ });
+
+})
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-errors.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-errors.js
new file mode 100644
index 0000000..1986a59
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-errors.js
@@ -0,0 +1,37 @@
+var server = require('./server')
+ , events = require('events')
+ , assert = require('assert')
+ , request = require('../main.js')
+ ;
+
+var local = 'http://localhost:8888/asdf'
+
+try {
+ request({uri:local, body:{}})
+ assert.fail("Should have throw")
+} catch(e) {
+ assert.equal(e.message, 'Argument error, options.body.')
+}
+
+try {
+ request({uri:local, multipart: 'foo'})
+ assert.fail("Should have throw")
+} catch(e) {
+ assert.equal(e.message, 'Argument error, options.multipart.')
+}
+
+try {
+ request({uri:local, multipart: [{}]})
+ assert.fail("Should have throw")
+} catch(e) {
+ assert.equal(e.message, 'Body attribute missing in multipart.')
+}
+
+try {
+ request(local, {multipart: [{}]})
+ assert.fail("Should have throw")
+} catch(e) {
+ assert.equal(e.message, 'Body attribute missing in multipart.')
+}
+
+console.log("All tests passed.")
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-headers.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-headers.js
new file mode 100644
index 0000000..31fe3f4
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-headers.js
@@ -0,0 +1,52 @@
+var server = require('./server')
+ , assert = require('assert')
+ , request = require('../main.js')
+ , Cookie = require('../vendor/cookie')
+ , Jar = require('../vendor/cookie/jar')
+ , s = server.createServer()
+
+s.listen(s.port, function () {
+ var serverUri = 'http://localhost:' + s.port
+ , numTests = 0
+ , numOutstandingTests = 0
+
+ function createTest(requestObj, serverAssertFn) {
+ var testNumber = numTests;
+ numTests += 1;
+ numOutstandingTests += 1;
+ s.on('/' + testNumber, function (req, res) {
+ serverAssertFn(req, res);
+ res.writeHead(200);
+ res.end();
+ });
+ requestObj.url = serverUri + '/' + testNumber
+ request(requestObj, function (err, res, body) {
+ assert.ok(!err)
+ assert.equal(res.statusCode, 200)
+ numOutstandingTests -= 1
+ if (numOutstandingTests === 0) {
+ console.log(numTests + ' tests passed.')
+ s.close()
+ }
+ })
+ }
+
+ // Issue #125: headers.cookie shouldn't be replaced when a cookie jar isn't specified
+ createTest({headers: {cookie: 'foo=bar'}}, function (req, res) {
+ assert.ok(req.headers.cookie)
+ assert.equal(req.headers.cookie, 'foo=bar')
+ })
+
+ // Issue #125: headers.cookie + cookie jar
+ var jar = new Jar()
+ jar.add(new Cookie('quux=baz'));
+ createTest({jar: jar, headers: {cookie: 'foo=bar'}}, function (req, res) {
+ assert.ok(req.headers.cookie)
+ assert.equal(req.headers.cookie, 'foo=bar; quux=baz')
+ })
+
+ // There should be no cookie header when neither headers.cookie nor a cookie jar is specified
+ createTest({}, function (req, res) {
+ assert.ok(!req.headers.cookie)
+ })
+})
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-httpModule.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-httpModule.js
new file mode 100644
index 0000000..1866de2
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-httpModule.js
@@ -0,0 +1,94 @@
+var http = require('http')
+ , https = require('https')
+ , server = require('./server')
+ , assert = require('assert')
+ , request = require('../main.js')
+
+
+var faux_requests_made = {'http':0, 'https':0}
+function wrap_request(name, module) {
+ // Just like the http or https module, but note when a request is made.
+ var wrapped = {}
+ Object.keys(module).forEach(function(key) {
+ var value = module[key];
+
+ if(key != 'request')
+ wrapped[key] = value;
+ else
+ wrapped[key] = function(options, callback) {
+ faux_requests_made[name] += 1
+ return value.apply(this, arguments)
+ }
+ })
+
+ return wrapped;
+}
+
+
+var faux_http = wrap_request('http', http)
+ , faux_https = wrap_request('https', https)
+ , plain_server = server.createServer()
+ , https_server = server.createSSLServer()
+
+
+plain_server.listen(plain_server.port, function() {
+ plain_server.on('/plain', function (req, res) {
+ res.writeHead(200)
+ res.end('plain')
+ })
+ plain_server.on('/to_https', function (req, res) {
+ res.writeHead(301, {'location':'https://localhost:'+https_server.port + '/https'})
+ res.end()
+ })
+
+ https_server.listen(https_server.port, function() {
+ https_server.on('/https', function (req, res) {
+ res.writeHead(200)
+ res.end('https')
+ })
+ https_server.on('/to_plain', function (req, res) {
+ res.writeHead(302, {'location':'http://localhost:'+plain_server.port + '/plain'})
+ res.end()
+ })
+
+ run_tests()
+ run_tests({})
+ run_tests({'http:':faux_http})
+ run_tests({'https:':faux_https})
+ run_tests({'http:':faux_http, 'https:':faux_https})
+ })
+})
+
+function run_tests(httpModules) {
+ var to_https = 'http://localhost:'+plain_server.port+'/to_https'
+ var to_plain = 'https://localhost:'+https_server.port+'/to_plain'
+
+ request(to_https, {'httpModules':httpModules}, function (er, res, body) {
+ assert.ok(!er, 'Bounce to SSL worked')
+ assert.equal(body, 'https', 'Received HTTPS server body')
+ done()
+ })
+
+ request(to_plain, {'httpModules':httpModules}, function (er, res, body) {
+ assert.ok(!er, 'Bounce to plaintext server worked')
+ assert.equal(body, 'plain', 'Received HTTPS server body')
+ done()
+ })
+}
+
+
+var passed = 0;
+function done() {
+ passed += 1
+ var expected = 10
+
+ if(passed == expected) {
+ plain_server.close()
+ https_server.close()
+
+ assert.equal(faux_requests_made.http, 4, 'Wrapped http module called appropriately')
+ assert.equal(faux_requests_made.https, 4, 'Wrapped https module called appropriately')
+
+ console.log((expected+2) + ' tests passed.')
+ }
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-https-strict.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-https-strict.js
new file mode 100644
index 0000000..f53fc14
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-https-strict.js
@@ -0,0 +1,97 @@
+// a test where we validate the siguature of the keys
+// otherwise exactly the same as the ssl test
+
+var server = require('./server')
+ , assert = require('assert')
+ , request = require('../main.js')
+ , fs = require('fs')
+ , path = require('path')
+ , opts = { key: path.resolve(__dirname, 'ssl/ca/server.key')
+ , cert: path.resolve(__dirname, 'ssl/ca/server.crt') }
+ , s = server.createSSLServer(null, opts)
+ , caFile = path.resolve(__dirname, 'ssl/ca/ca.crt')
+ , ca = fs.readFileSync(caFile)
+
+var tests =
+ { testGet :
+ { resp : server.createGetResponse("TESTING!")
+ , expectBody: "TESTING!"
+ }
+ , testGetChunkBreak :
+ { resp : server.createChunkResponse(
+ [ new Buffer([239])
+ , new Buffer([163])
+ , new Buffer([191])
+ , new Buffer([206])
+ , new Buffer([169])
+ , new Buffer([226])
+ , new Buffer([152])
+ , new Buffer([131])
+ ])
+ , expectBody: "Ω☃"
+ }
+ , testGetJSON :
+ { resp : server.createGetResponse('{"test":true}', 'application/json')
+ , json : true
+ , expectBody: {"test":true}
+ }
+ , testPutString :
+ { resp : server.createPostValidator("PUTTINGDATA")
+ , method : "PUT"
+ , body : "PUTTINGDATA"
+ }
+ , testPutBuffer :
+ { resp : server.createPostValidator("PUTTINGDATA")
+ , method : "PUT"
+ , body : new Buffer("PUTTINGDATA")
+ }
+ , testPutJSON :
+ { resp : server.createPostValidator(JSON.stringify({foo: 'bar'}))
+ , method: "PUT"
+ , json: {foo: 'bar'}
+ }
+ , testPutMultipart :
+ { resp: server.createPostValidator(
+ '--frontier\r\n' +
+ 'content-type: text/html\r\n' +
+ '\r\n' +
+ 'Oh hi.' +
+ '\r\n--frontier\r\n\r\n' +
+ 'Oh hi.' +
+ '\r\n--frontier--'
+ )
+ , method: "PUT"
+ , multipart:
+ [ {'content-type': 'text/html', 'body': 'Oh hi.'}
+ , {'body': 'Oh hi.'}
+ ]
+ }
+ }
+
+s.listen(s.port, function () {
+
+ var counter = 0
+
+ for (i in tests) {
+ (function () {
+ var test = tests[i]
+ s.on('/'+i, test.resp)
+ test.uri = s.url + '/' + i
+ test.strictSSL = true
+ test.ca = ca
+ test.headers = { host: 'testing.request.mikealrogers.com' }
+ request(test, function (err, resp, body) {
+ if (err) throw err
+ if (test.expectBody) {
+ assert.deepEqual(test.expectBody, body)
+ }
+ counter = counter - 1;
+ if (counter === 0) {
+ console.log(Object.keys(tests).length+" tests passed.")
+ s.close()
+ }
+ })
+ counter++
+ })()
+ }
+})
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-https.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-https.js
new file mode 100644
index 0000000..df7330b
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-https.js
@@ -0,0 +1,86 @@
+var server = require('./server')
+ , assert = require('assert')
+ , request = require('../main.js')
+
+var s = server.createSSLServer();
+
+var tests =
+ { testGet :
+ { resp : server.createGetResponse("TESTING!")
+ , expectBody: "TESTING!"
+ }
+ , testGetChunkBreak :
+ { resp : server.createChunkResponse(
+ [ new Buffer([239])
+ , new Buffer([163])
+ , new Buffer([191])
+ , new Buffer([206])
+ , new Buffer([169])
+ , new Buffer([226])
+ , new Buffer([152])
+ , new Buffer([131])
+ ])
+ , expectBody: "Ω☃"
+ }
+ , testGetJSON :
+ { resp : server.createGetResponse('{"test":true}', 'application/json')
+ , json : true
+ , expectBody: {"test":true}
+ }
+ , testPutString :
+ { resp : server.createPostValidator("PUTTINGDATA")
+ , method : "PUT"
+ , body : "PUTTINGDATA"
+ }
+ , testPutBuffer :
+ { resp : server.createPostValidator("PUTTINGDATA")
+ , method : "PUT"
+ , body : new Buffer("PUTTINGDATA")
+ }
+ , testPutJSON :
+ { resp : server.createPostValidator(JSON.stringify({foo: 'bar'}))
+ , method: "PUT"
+ , json: {foo: 'bar'}
+ }
+ , testPutMultipart :
+ { resp: server.createPostValidator(
+ '--frontier\r\n' +
+ 'content-type: text/html\r\n' +
+ '\r\n' +
+ 'Oh hi.' +
+ '\r\n--frontier\r\n\r\n' +
+ 'Oh hi.' +
+ '\r\n--frontier--'
+ )
+ , method: "PUT"
+ , multipart:
+ [ {'content-type': 'text/html', 'body': 'Oh hi.'}
+ , {'body': 'Oh hi.'}
+ ]
+ }
+ }
+
+s.listen(s.port, function () {
+
+ var counter = 0
+
+ for (i in tests) {
+ (function () {
+ var test = tests[i]
+ s.on('/'+i, test.resp)
+ test.uri = s.url + '/' + i
+ request(test, function (err, resp, body) {
+ if (err) throw err
+ if (test.expectBody) {
+ assert.deepEqual(test.expectBody, body)
+ }
+ counter = counter - 1;
+ if (counter === 0) {
+ console.log(Object.keys(tests).length+" tests passed.")
+ s.close()
+ }
+ })
+ counter++
+ })()
+ }
+})
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-oauth.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-oauth.js
new file mode 100644
index 0000000..72ca923
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-oauth.js
@@ -0,0 +1,117 @@
+var hmacsign = require('../oauth').hmacsign
+ , assert = require('assert')
+ , qs = require('querystring')
+ , request = require('../main')
+ ;
+
+function getsignature (r) {
+ var sign
+ r.headers.Authorization.slice('OAuth '.length).replace(/,\ /g, ',').split(',').forEach(function (v) {
+ if (v.slice(0, 'oauth_signature="'.length) === 'oauth_signature="') sign = v.slice('oauth_signature="'.length, -1)
+ })
+ return decodeURIComponent(sign)
+}
+
+// Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth
+
+var reqsign = hmacsign('POST', 'https://api.twitter.com/oauth/request_token',
+ { oauth_callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11'
+ , oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g'
+ , oauth_nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk'
+ , oauth_signature_method: 'HMAC-SHA1'
+ , oauth_timestamp: '1272323042'
+ , oauth_version: '1.0'
+ }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98")
+
+console.log(reqsign)
+console.log('8wUi7m5HFQy76nowoCThusfgB+Q=')
+assert.equal(reqsign, '8wUi7m5HFQy76nowoCThusfgB+Q=')
+
+var accsign = hmacsign('POST', 'https://api.twitter.com/oauth/access_token',
+ { oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g'
+ , oauth_nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8'
+ , oauth_signature_method: 'HMAC-SHA1'
+ , oauth_token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc'
+ , oauth_timestamp: '1272323047'
+ , oauth_verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY'
+ , oauth_version: '1.0'
+ }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA")
+
+console.log(accsign)
+console.log('PUw/dHA4fnlJYM6RhXk5IU/0fCc=')
+assert.equal(accsign, 'PUw/dHA4fnlJYM6RhXk5IU/0fCc=')
+
+var upsign = hmacsign('POST', 'http://api.twitter.com/1/statuses/update.json',
+ { oauth_consumer_key: "GDdmIQH6jhtmLUypg82g"
+ , oauth_nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y"
+ , oauth_signature_method: "HMAC-SHA1"
+ , oauth_token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw"
+ , oauth_timestamp: "1272325550"
+ , oauth_version: "1.0"
+ , status: 'setting up my twitter 私のさえずりを設定する'
+ }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA")
+
+console.log(upsign)
+console.log('yOahq5m0YjDDjfjxHaXEsW9D+X0=')
+assert.equal(upsign, 'yOahq5m0YjDDjfjxHaXEsW9D+X0=')
+
+
+var rsign = request.post(
+ { url: 'https://api.twitter.com/oauth/request_token'
+ , oauth:
+ { callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11'
+ , consumer_key: 'GDdmIQH6jhtmLUypg82g'
+ , nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk'
+ , timestamp: '1272323042'
+ , version: '1.0'
+ , consumer_secret: "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98"
+ }
+ })
+
+setTimeout(function () {
+ console.log(getsignature(rsign))
+ assert.equal(reqsign, getsignature(rsign))
+})
+
+var raccsign = request.post(
+ { url: 'https://api.twitter.com/oauth/access_token'
+ , oauth:
+ { consumer_key: 'GDdmIQH6jhtmLUypg82g'
+ , nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8'
+ , signature_method: 'HMAC-SHA1'
+ , token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc'
+ , timestamp: '1272323047'
+ , verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY'
+ , version: '1.0'
+ , consumer_secret: "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98"
+ , token_secret: "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA"
+ }
+ })
+
+setTimeout(function () {
+ console.log(getsignature(raccsign))
+ assert.equal(accsign, getsignature(raccsign))
+}, 1)
+
+var rupsign = request.post(
+ { url: 'http://api.twitter.com/1/statuses/update.json'
+ , oauth:
+ { consumer_key: "GDdmIQH6jhtmLUypg82g"
+ , nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y"
+ , signature_method: "HMAC-SHA1"
+ , token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw"
+ , timestamp: "1272325550"
+ , version: "1.0"
+ , consumer_secret: "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98"
+ , token_secret: "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA"
+ }
+ , form: {status: 'setting up my twitter 私のさえずりを設定する'}
+ })
+setTimeout(function () {
+ console.log(getsignature(rupsign))
+ assert.equal(upsign, getsignature(rupsign))
+}, 1)
+
+
+
+
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-params.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-params.js
new file mode 100644
index 0000000..8354f6d
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-params.js
@@ -0,0 +1,92 @@
+var server = require('./server')
+ , assert = require('assert')
+ , request = require('../main.js')
+ ;
+
+var s = server.createServer();
+
+var tests =
+ { testGet :
+ { resp : server.createGetResponse("TESTING!")
+ , expectBody: "TESTING!"
+ }
+ , testGetChunkBreak :
+ { resp : server.createChunkResponse(
+ [ new Buffer([239])
+ , new Buffer([163])
+ , new Buffer([191])
+ , new Buffer([206])
+ , new Buffer([169])
+ , new Buffer([226])
+ , new Buffer([152])
+ , new Buffer([131])
+ ])
+ , expectBody: "Ω☃"
+ }
+ , testGetBuffer :
+ { resp : server.createGetResponse(new Buffer("TESTING!"))
+ , encoding: null
+ , expectBody: new Buffer("TESTING!")
+ }
+ , testGetJSON :
+ { resp : server.createGetResponse('{"test":true}', 'application/json')
+ , json : true
+ , expectBody: {"test":true}
+ }
+ , testPutString :
+ { resp : server.createPostValidator("PUTTINGDATA")
+ , method : "PUT"
+ , body : "PUTTINGDATA"
+ }
+ , testPutBuffer :
+ { resp : server.createPostValidator("PUTTINGDATA")
+ , method : "PUT"
+ , body : new Buffer("PUTTINGDATA")
+ }
+ , testPutJSON :
+ { resp : server.createPostValidator(JSON.stringify({foo: 'bar'}))
+ , method: "PUT"
+ , json: {foo: 'bar'}
+ }
+ , testPutMultipart :
+ { resp: server.createPostValidator(
+ '--frontier\r\n' +
+ 'content-type: text/html\r\n' +
+ '\r\n' +
+ 'Oh hi.' +
+ '\r\n--frontier\r\n\r\n' +
+ 'Oh hi.' +
+ '\r\n--frontier--'
+ )
+ , method: "PUT"
+ , multipart:
+ [ {'content-type': 'text/html', 'body': 'Oh hi.'}
+ , {'body': 'Oh hi.'}
+ ]
+ }
+ }
+
+s.listen(s.port, function () {
+
+ var counter = 0
+
+ for (i in tests) {
+ (function () {
+ var test = tests[i]
+ s.on('/'+i, test.resp)
+ //test.uri = s.url + '/' + i
+ request(s.url + '/' + i, test, function (err, resp, body) {
+ if (err) throw err
+ if (test.expectBody) {
+ assert.deepEqual(test.expectBody, body)
+ }
+ counter = counter - 1;
+ if (counter === 0) {
+ console.log(Object.keys(tests).length+" tests passed.")
+ s.close()
+ }
+ })
+ counter++
+ })()
+ }
+})
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-pipes.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-pipes.js
new file mode 100644
index 0000000..1869874
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-pipes.js
@@ -0,0 +1,202 @@
+var server = require('./server')
+ , events = require('events')
+ , stream = require('stream')
+ , assert = require('assert')
+ , fs = require('fs')
+ , request = require('../main.js')
+ , path = require('path')
+ , util = require('util')
+ ;
+
+var s = server.createServer(3453);
+
+function ValidationStream(str) {
+ this.str = str
+ this.buf = ''
+ this.on('data', function (data) {
+ this.buf += data
+ })
+ this.on('end', function () {
+ assert.equal(this.str, this.buf)
+ })
+ this.writable = true
+}
+util.inherits(ValidationStream, stream.Stream)
+ValidationStream.prototype.write = function (chunk) {
+ this.emit('data', chunk)
+}
+ValidationStream.prototype.end = function (chunk) {
+ if (chunk) emit('data', chunk)
+ this.emit('end')
+}
+
+s.listen(s.port, function () {
+ counter = 0;
+
+ var check = function () {
+ counter = counter - 1
+ if (counter === 0) {
+ console.log('All tests passed.')
+ setTimeout(function () {
+ process.exit();
+ }, 500)
+ }
+ }
+
+ // Test pipeing to a request object
+ s.once('/push', server.createPostValidator("mydata"));
+
+ var mydata = new stream.Stream();
+ mydata.readable = true
+
+ counter++
+ var r1 = request.put({url:'http://localhost:3453/push'}, function () {
+ check();
+ })
+ mydata.pipe(r1)
+
+ mydata.emit('data', 'mydata');
+ mydata.emit('end');
+
+
+ // Test pipeing from a request object.
+ s.once('/pull', server.createGetResponse("mypulldata"));
+
+ var mypulldata = new stream.Stream();
+ mypulldata.writable = true
+
+ counter++
+ request({url:'http://localhost:3453/pull'}).pipe(mypulldata)
+
+ var d = '';
+
+ mypulldata.write = function (chunk) {
+ d += chunk;
+ }
+ mypulldata.end = function () {
+ assert.equal(d, 'mypulldata');
+ check();
+ };
+
+
+ s.on('/cat', function (req, resp) {
+ if (req.method === "GET") {
+ resp.writeHead(200, {'content-type':'text/plain-test', 'content-length':4});
+ resp.end('asdf')
+ } else if (req.method === "PUT") {
+ assert.equal(req.headers['content-type'], 'text/plain-test');
+ assert.equal(req.headers['content-length'], 4)
+ var validate = '';
+
+ req.on('data', function (chunk) {validate += chunk})
+ req.on('end', function () {
+ resp.writeHead(201);
+ resp.end();
+ assert.equal(validate, 'asdf');
+ check();
+ })
+ }
+ })
+ s.on('/pushjs', function (req, resp) {
+ if (req.method === "PUT") {
+ assert.equal(req.headers['content-type'], 'text/javascript');
+ check();
+ }
+ })
+ s.on('/catresp', function (req, resp) {
+ request.get('http://localhost:3453/cat').pipe(resp)
+ })
+ s.on('/doodle', function (req, resp) {
+ if (req.headers['x-oneline-proxy']) {
+ resp.setHeader('x-oneline-proxy', 'yup')
+ }
+ resp.writeHead('200', {'content-type':'image/png'})
+ fs.createReadStream(path.join(__dirname, 'googledoodle.png')).pipe(resp)
+ })
+ s.on('/onelineproxy', function (req, resp) {
+ var x = request('http://localhost:3453/doodle')
+ req.pipe(x)
+ x.pipe(resp)
+ })
+
+ counter++
+ fs.createReadStream(__filename).pipe(request.put('http://localhost:3453/pushjs'))
+
+ counter++
+ request.get('http://localhost:3453/cat').pipe(request.put('http://localhost:3453/cat'))
+
+ counter++
+ request.get('http://localhost:3453/catresp', function (e, resp, body) {
+ assert.equal(resp.headers['content-type'], 'text/plain-test');
+ assert.equal(resp.headers['content-length'], 4)
+ check();
+ })
+
+ var doodleWrite = fs.createWriteStream(path.join(__dirname, 'test.png'))
+
+ counter++
+ request.get('http://localhost:3453/doodle').pipe(doodleWrite)
+
+ doodleWrite.on('close', function () {
+ assert.deepEqual(fs.readFileSync(path.join(__dirname, 'googledoodle.png')), fs.readFileSync(path.join(__dirname, 'test.png')))
+ check()
+ })
+
+ process.on('exit', function () {
+ fs.unlinkSync(path.join(__dirname, 'test.png'))
+ })
+
+ counter++
+ request.get({uri:'http://localhost:3453/onelineproxy', headers:{'x-oneline-proxy':'nope'}}, function (err, resp, body) {
+ assert.equal(resp.headers['x-oneline-proxy'], 'yup')
+ check()
+ })
+
+ s.on('/afterresponse', function (req, resp) {
+ resp.write('d')
+ resp.end()
+ })
+
+ counter++
+ var afterresp = request.post('http://localhost:3453/afterresponse').on('response', function () {
+ var v = new ValidationStream('d')
+ afterresp.pipe(v)
+ v.on('end', check)
+ })
+
+ s.on('/forward1', function (req, resp) {
+ resp.writeHead(302, {location:'/forward2'})
+ resp.end()
+ })
+ s.on('/forward2', function (req, resp) {
+ resp.writeHead('200', {'content-type':'image/png'})
+ resp.write('d')
+ resp.end()
+ })
+
+ counter++
+ var validateForward = new ValidationStream('d')
+ validateForward.on('end', check)
+ request.get('http://localhost:3453/forward1').pipe(validateForward)
+
+ // Test pipe options
+ s.once('/opts', server.createGetResponse('opts response'));
+
+ var optsStream = new stream.Stream();
+ optsStream.writable = true
+
+ var optsData = '';
+ optsStream.write = function (buf) {
+ optsData += buf;
+ if (optsData === 'opts response') {
+ setTimeout(check, 10);
+ }
+ }
+
+ optsStream.end = function () {
+ assert.fail('end called')
+ };
+
+ counter++
+ request({url:'http://localhost:3453/opts'}).pipe(optsStream, { end : false })
+})
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-pool.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-pool.js
new file mode 100644
index 0000000..1e7d578
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-pool.js
@@ -0,0 +1,16 @@
+var request = require('../main')
+ , http = require('http')
+ , assert = require('assert')
+ ;
+
+var s = http.createServer(function (req, resp) {
+ resp.statusCode = 200;
+ resp.end('asdf');
+}).listen(8080, function () {
+ request({'url': 'http://localhost:8080', 'pool': false}, function (e, resp) {
+ var agent = resp.request.agent;
+ assert.strictEqual(typeof agent, 'boolean');
+ assert.strictEqual(agent, false);
+ s.close();
+ });
+});
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-proxy.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-proxy.js
new file mode 100644
index 0000000..647157c
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-proxy.js
@@ -0,0 +1,39 @@
+var server = require('./server')
+ , events = require('events')
+ , stream = require('stream')
+ , assert = require('assert')
+ , fs = require('fs')
+ , request = require('../main.js')
+ , path = require('path')
+ , util = require('util')
+ ;
+
+var port = 6768
+ , called = false
+ , proxiedHost = 'google.com'
+ ;
+
+var s = server.createServer(port)
+s.listen(port, function () {
+ s.on('http://google.com/', function (req, res) {
+ called = true
+ assert.equal(req.headers.host, proxiedHost)
+ res.writeHeader(200)
+ res.end()
+ })
+ request ({
+ url: 'http://'+proxiedHost,
+ proxy: 'http://localhost:'+port
+ /*
+ //should behave as if these arguments where passed:
+ url: 'http://localhost:'+port,
+ headers: {host: proxiedHost}
+ //*/
+ }, function (err, res, body) {
+ s.close()
+ })
+})
+
+process.on('exit', function () {
+ assert.ok(called, 'the request must be made to the proxy server')
+})
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-qs.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-qs.js
new file mode 100644
index 0000000..1aac22b
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-qs.js
@@ -0,0 +1,28 @@
+var request = request = require('../main.js')
+ , assert = require('assert')
+ ;
+
+
+// Test adding a querystring
+var req1 = request.get({ uri: 'http://www.google.com', qs: { q : 'search' }})
+setTimeout(function() {
+ assert.equal('/?q=search', req1.path)
+}, 1)
+
+// Test replacing a querystring value
+var req2 = request.get({ uri: 'http://www.google.com?q=abc', qs: { q : 'search' }})
+setTimeout(function() {
+ assert.equal('/?q=search', req2.path)
+}, 1)
+
+// Test appending a querystring value to the ones present in the uri
+var req3 = request.get({ uri: 'http://www.google.com?x=y', qs: { q : 'search' }})
+setTimeout(function() {
+ assert.equal('/?x=y&q=search', req3.path)
+}, 1)
+
+// Test leaving a querystring alone
+var req4 = request.get({ uri: 'http://www.google.com?x=y'})
+setTimeout(function() {
+ assert.equal('/?x=y', req4.path)
+}, 1)
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-redirect.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-redirect.js
new file mode 100644
index 0000000..b84844a
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-redirect.js
@@ -0,0 +1,154 @@
+var server = require('./server')
+ , assert = require('assert')
+ , request = require('../main.js')
+ , Cookie = require('../vendor/cookie')
+ , Jar = require('../vendor/cookie/jar')
+
+var s = server.createServer()
+
+s.listen(s.port, function () {
+ var server = 'http://localhost:' + s.port;
+ var hits = {}
+ var passed = 0;
+
+ bouncer(301, 'temp')
+ bouncer(302, 'perm')
+ bouncer(302, 'nope')
+
+ function bouncer(code, label) {
+ var landing = label+'_landing';
+
+ s.on('/'+label, function (req, res) {
+ hits[label] = true;
+ res.writeHead(code, {
+ 'location':server + '/'+landing,
+ 'set-cookie': 'ham=eggs'
+ })
+ res.end()
+ })
+
+ s.on('/'+landing, function (req, res) {
+ if (req.method !== 'GET') { // We should only accept GET redirects
+ console.error("Got a non-GET request to the redirect destination URL");
+ res.writeHead(400);
+ res.end();
+ return;
+ }
+ // Make sure the cookie doesn't get included twice, see #139:
+ // Make sure cookies are set properly after redirect
+ assert.equal(req.headers.cookie, 'foo=bar; quux=baz; ham=eggs');
+ hits[landing] = true;
+ res.writeHead(200)
+ res.end(landing)
+ })
+ }
+
+ // Permanent bounce
+ var jar = new Jar()
+ jar.add(new Cookie('quux=baz'))
+ request({uri: server+'/perm', jar: jar, headers: {cookie: 'foo=bar'}}, function (er, res, body) {
+ if (er) throw er
+ if (res.statusCode !== 200) throw new Error('Status is not 200: '+res.statusCode)
+ assert.ok(hits.perm, 'Original request is to /perm')
+ assert.ok(hits.perm_landing, 'Forward to permanent landing URL')
+ assert.equal(body, 'perm_landing', 'Got permanent landing content')
+ passed += 1
+ done()
+ })
+
+ // Temporary bounce
+ request({uri: server+'/temp', jar: jar, headers: {cookie: 'foo=bar'}}, function (er, res, body) {
+ if (er) throw er
+ if (res.statusCode !== 200) throw new Error('Status is not 200: '+res.statusCode)
+ assert.ok(hits.temp, 'Original request is to /temp')
+ assert.ok(hits.temp_landing, 'Forward to temporary landing URL')
+ assert.equal(body, 'temp_landing', 'Got temporary landing content')
+ passed += 1
+ done()
+ })
+
+ // Prevent bouncing.
+ request({uri:server+'/nope', jar: jar, headers: {cookie: 'foo=bar'}, followRedirect:false}, function (er, res, body) {
+ if (er) throw er
+ if (res.statusCode !== 302) throw new Error('Status is not 302: '+res.statusCode)
+ assert.ok(hits.nope, 'Original request to /nope')
+ assert.ok(!hits.nope_landing, 'No chasing the redirect')
+ assert.equal(res.statusCode, 302, 'Response is the bounce itself')
+ passed += 1
+ done()
+ })
+
+ // Should not follow post redirects by default
+ request.post(server+'/temp', { jar: jar, headers: {cookie: 'foo=bar'}}, function (er, res, body) {
+ if (er) throw er
+ if (res.statusCode !== 301) throw new Error('Status is not 301: '+res.statusCode)
+ assert.ok(hits.temp, 'Original request is to /temp')
+ assert.ok(!hits.temp_landing, 'No chasing the redirect when post')
+ assert.equal(res.statusCode, 301, 'Response is the bounce itself')
+ passed += 1
+ done()
+ })
+
+ // Should follow post redirects when followAllRedirects true
+ request.post({uri:server+'/temp', followAllRedirects:true, jar: jar, headers: {cookie: 'foo=bar'}}, function (er, res, body) {
+ if (er) throw er
+ if (res.statusCode !== 200) throw new Error('Status is not 200: '+res.statusCode)
+ assert.ok(hits.temp, 'Original request is to /temp')
+ assert.ok(hits.temp_landing, 'Forward to temporary landing URL')
+ assert.equal(body, 'temp_landing', 'Got temporary landing content')
+ passed += 1
+ done()
+ })
+
+ request.post({uri:server+'/temp', followAllRedirects:false, jar: jar, headers: {cookie: 'foo=bar'}}, function (er, res, body) {
+ if (er) throw er
+ if (res.statusCode !== 301) throw new Error('Status is not 301: '+res.statusCode)
+ assert.ok(hits.temp, 'Original request is to /temp')
+ assert.ok(!hits.temp_landing, 'No chasing the redirect')
+ assert.equal(res.statusCode, 301, 'Response is the bounce itself')
+ passed += 1
+ done()
+ })
+
+ // Should not follow delete redirects by default
+ request.del(server+'/temp', { jar: jar, headers: {cookie: 'foo=bar'}}, function (er, res, body) {
+ if (er) throw er
+ if (res.statusCode < 301) throw new Error('Status is not a redirect.')
+ assert.ok(hits.temp, 'Original request is to /temp')
+ assert.ok(!hits.temp_landing, 'No chasing the redirect when delete')
+ assert.equal(res.statusCode, 301, 'Response is the bounce itself')
+ passed += 1
+ done()
+ })
+
+ // Should not follow delete redirects even if followRedirect is set to true
+ request.del(server+'/temp', { followRedirect: true, jar: jar, headers: {cookie: 'foo=bar'}}, function (er, res, body) {
+ if (er) throw er
+ if (res.statusCode !== 301) throw new Error('Status is not 301: '+res.statusCode)
+ assert.ok(hits.temp, 'Original request is to /temp')
+ assert.ok(!hits.temp_landing, 'No chasing the redirect when delete')
+ assert.equal(res.statusCode, 301, 'Response is the bounce itself')
+ passed += 1
+ done()
+ })
+
+ // Should follow delete redirects when followAllRedirects true
+ request.del(server+'/temp', {followAllRedirects:true, jar: jar, headers: {cookie: 'foo=bar'}}, function (er, res, body) {
+ if (er) throw er
+ if (res.statusCode !== 200) throw new Error('Status is not 200: '+res.statusCode)
+ assert.ok(hits.temp, 'Original request is to /temp')
+ assert.ok(hits.temp_landing, 'Forward to temporary landing URL')
+ assert.equal(body, 'temp_landing', 'Got temporary landing content')
+ passed += 1
+ done()
+ })
+
+ var reqs_done = 0;
+ function done() {
+ reqs_done += 1;
+ if(reqs_done == 9) {
+ console.log(passed + ' tests passed.')
+ s.close()
+ }
+ }
+})
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-s3.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-s3.js
new file mode 100644
index 0000000..5f59c4a
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-s3.js
@@ -0,0 +1,13 @@
+var request = require('../main')
+
+var r = request.get('https://log.curlybracecast.com.s3.amazonaws.com/',
+ { aws:
+ { key: 'AKIAI6KIQRRVMGK3WK5Q'
+ , secret: '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'
+ , bucket: 'log.curlybracecast.com'
+ }
+ }, function (e, resp, body) {
+ console.log(r.headers)
+ console.log(body)
+ }
+)
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-timeout.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-timeout.js
new file mode 100644
index 0000000..673f8ad
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-timeout.js
@@ -0,0 +1,87 @@
+var server = require('./server')
+ , events = require('events')
+ , stream = require('stream')
+ , assert = require('assert')
+ , request = require('../main.js')
+ ;
+
+var s = server.createServer();
+var expectedBody = "waited";
+var remainingTests = 5;
+
+s.listen(s.port, function () {
+ // Request that waits for 200ms
+ s.on('/timeout', function (req, resp) {
+ setTimeout(function(){
+ resp.writeHead(200, {'content-type':'text/plain'})
+ resp.write(expectedBody)
+ resp.end()
+ }, 200);
+ });
+
+ // Scenario that should timeout
+ var shouldTimeout = {
+ url: s.url + "/timeout",
+ timeout:100
+ }
+
+
+ request(shouldTimeout, function (err, resp, body) {
+ assert.equal(err.code, "ETIMEDOUT");
+ checkDone();
+ })
+
+
+ // Scenario that shouldn't timeout
+ var shouldntTimeout = {
+ url: s.url + "/timeout",
+ timeout:300
+ }
+
+ request(shouldntTimeout, function (err, resp, body) {
+ assert.equal(err, null);
+ assert.equal(expectedBody, body)
+ checkDone();
+ })
+
+ // Scenario with no timeout set, so shouldn't timeout
+ var noTimeout = {
+ url: s.url + "/timeout"
+ }
+
+ request(noTimeout, function (err, resp, body) {
+ assert.equal(err);
+ assert.equal(expectedBody, body)
+ checkDone();
+ })
+
+ // Scenario with a negative timeout value, should be treated a zero or the minimum delay
+ var negativeTimeout = {
+ url: s.url + "/timeout",
+ timeout:-1000
+ }
+
+ request(negativeTimeout, function (err, resp, body) {
+ assert.equal(err.code, "ETIMEDOUT");
+ checkDone();
+ })
+
+ // Scenario with a float timeout value, should be rounded by setTimeout anyway
+ var floatTimeout = {
+ url: s.url + "/timeout",
+ timeout: 100.76
+ }
+
+ request(floatTimeout, function (err, resp, body) {
+ assert.equal(err.code, "ETIMEDOUT");
+ checkDone();
+ })
+
+ function checkDone() {
+ if(--remainingTests == 0) {
+ s.close();
+ console.log("All tests passed.");
+ }
+ }
+})
+
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-toJSON.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-toJSON.js
new file mode 100644
index 0000000..b7c67ef
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-toJSON.js
@@ -0,0 +1,14 @@
+var request = require('../main')
+ , http = require('http')
+ , assert = require('assert')
+ ;
+
+var s = http.createServer(function (req, resp) {
+ resp.statusCode = 200
+ resp.end('asdf')
+}).listen(8080, function () {
+ var r = request('http://localhost:8080', function (e, resp) {
+ assert.equal(JSON.parse(JSON.stringify(r)).response.statusCode, 200)
+ s.close()
+ })
+})
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-tunnel.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-tunnel.js
new file mode 100644
index 0000000..58131b9
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tests/test-tunnel.js
@@ -0,0 +1,61 @@
+// test that we can tunnel a https request over an http proxy
+// keeping all the CA and whatnot intact.
+//
+// Note: this requires that squid is installed.
+// If the proxy fails to start, we'll just log a warning and assume success.
+
+var server = require('./server')
+ , assert = require('assert')
+ , request = require('../main.js')
+ , fs = require('fs')
+ , path = require('path')
+ , caFile = path.resolve(__dirname, 'ssl/npm-ca.crt')
+ , ca = fs.readFileSync(caFile)
+ , child_process = require('child_process')
+ , sqConf = path.resolve(__dirname, 'squid.conf')
+ , sqArgs = ['-f', sqConf, '-N', '-d', '5']
+ , proxy = 'http://localhost:3128'
+ , hadError = null
+
+var squid = child_process.spawn('squid', sqArgs);
+var ready = false
+
+squid.stderr.on('data', function (c) {
+ console.error('SQUIDERR ' + c.toString().trim().split('\n')
+ .join('\nSQUIDERR '))
+ ready = c.toString().match(/ready to serve requests/i)
+})
+
+squid.stdout.on('data', function (c) {
+ console.error('SQUIDOUT ' + c.toString().trim().split('\n')
+ .join('\nSQUIDOUT '))
+})
+
+squid.on('exit', function (c) {
+ console.error('exit '+c)
+ if (c && !ready) {
+ console.error('squid must be installed to run this test.')
+ c = null
+ hadError = null
+ process.exit(0)
+ return
+ }
+
+ if (c) {
+ hadError = hadError || new Error('Squid exited with '+c)
+ }
+ if (hadError) throw hadError
+})
+
+setTimeout(function F () {
+ if (!ready) return setTimeout(F, 100)
+ request({ uri: 'https://registry.npmjs.org/request/'
+ , proxy: 'http://localhost:3128'
+ , ca: ca
+ , json: true }, function (er, body) {
+ hadError = er
+ console.log(er || typeof body)
+ if (!er) console.log("ok")
+ squid.kill('SIGKILL')
+ })
+}, 100)
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tunnel.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tunnel.js
new file mode 100644
index 0000000..453786c
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/tunnel.js
@@ -0,0 +1,229 @@
+'use strict';
+
+var net = require('net');
+var tls = require('tls');
+var http = require('http');
+var https = require('https');
+var events = require('events');
+var assert = require('assert');
+var util = require('util');
+
+
+exports.httpOverHttp = httpOverHttp;
+exports.httpsOverHttp = httpsOverHttp;
+exports.httpOverHttps = httpOverHttps;
+exports.httpsOverHttps = httpsOverHttps;
+
+
+function httpOverHttp(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = http.request;
+ return agent;
+}
+
+function httpsOverHttp(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = http.request;
+ agent.createSocket = createSecureSocket;
+ return agent;
+}
+
+function httpOverHttps(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = https.request;
+ return agent;
+}
+
+function httpsOverHttps(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = https.request;
+ agent.createSocket = createSecureSocket;
+ return agent;
+}
+
+
+function TunnelingAgent(options) {
+ var self = this;
+ self.options = options || {};
+ self.proxyOptions = self.options.proxy || {};
+ self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;
+ self.requests = [];
+ self.sockets = [];
+
+ self.on('free', function onFree(socket, host, port) {
+ for (var i = 0, len = self.requests.length; i < len; ++i) {
+ var pending = self.requests[i];
+ if (pending.host === host && pending.port === port) {
+ // Detect the request to connect same origin server,
+ // reuse the connection.
+ self.requests.splice(i, 1);
+ pending.request.onSocket(socket);
+ return;
+ }
+ }
+ socket.destroy();
+ self.removeSocket(socket);
+ });
+}
+util.inherits(TunnelingAgent, events.EventEmitter);
+
+TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) {
+ var self = this;
+
+ if (self.sockets.length >= this.maxSockets) {
+ // We are over limit so we'll add it to the queue.
+ self.requests.push({host: host, port: port, request: req});
+ return;
+ }
+
+ // If we are under maxSockets create a new one.
+ self.createSocket({host: host, port: port, request: req}, function(socket) {
+ socket.on('free', onFree);
+ socket.on('close', onCloseOrRemove);
+ socket.on('agentRemove', onCloseOrRemove);
+ req.onSocket(socket);
+
+ function onFree() {
+ self.emit('free', socket, host, port);
+ }
+
+ function onCloseOrRemove(err) {
+ self.removeSocket();
+ socket.removeListener('free', onFree);
+ socket.removeListener('close', onCloseOrRemove);
+ socket.removeListener('agentRemove', onCloseOrRemove);
+ }
+ });
+};
+
+TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
+ var self = this;
+ var placeholder = {};
+ self.sockets.push(placeholder);
+
+ var connectOptions = mergeOptions({}, self.proxyOptions, {
+ method: 'CONNECT',
+ path: options.host + ':' + options.port,
+ agent: false
+ });
+ if (connectOptions.proxyAuth) {
+ connectOptions.headers = connectOptions.headers || {};
+ connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
+ new Buffer(connectOptions.proxyAuth).toString('base64');
+ }
+
+ debug('making CONNECT request');
+ var connectReq = self.request(connectOptions);
+ connectReq.useChunkedEncodingByDefault = false; // for v0.6
+ connectReq.once('response', onResponse); // for v0.6
+ connectReq.once('upgrade', onUpgrade); // for v0.6
+ connectReq.once('connect', onConnect); // for v0.7 or later
+ connectReq.once('error', onError);
+ connectReq.end();
+
+ function onResponse(res) {
+ // Very hacky. This is necessary to avoid http-parser leaks.
+ res.upgrade = true;
+ }
+
+ function onUpgrade(res, socket, head) {
+ // Hacky.
+ process.nextTick(function() {
+ onConnect(res, socket, head);
+ });
+ }
+
+ function onConnect(res, socket, head) {
+ connectReq.removeAllListeners();
+ socket.removeAllListeners();
+
+ if (res.statusCode === 200) {
+ assert.equal(head.length, 0);
+ debug('tunneling connection has established');
+ self.sockets[self.sockets.indexOf(placeholder)] = socket;
+ cb(socket);
+ } else {
+ debug('tunneling socket could not be established, statusCode=%d',
+ res.statusCode);
+ var error = new Error('tunneling socket could not be established, ' +
+ 'sutatusCode=' + res.statusCode);
+ error.code = 'ECONNRESET';
+ options.request.emit('error', error);
+ self.removeSocket(placeholder);
+ }
+ }
+
+ function onError(cause) {
+ connectReq.removeAllListeners();
+
+ debug('tunneling socket could not be established, cause=%s\n',
+ cause.message, cause.stack);
+ var error = new Error('tunneling socket could not be established, ' +
+ 'cause=' + cause.message);
+ error.code = 'ECONNRESET';
+ options.request.emit('error', error);
+ self.removeSocket(placeholder);
+ }
+};
+
+TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
+ var pos = this.sockets.indexOf(socket)
+ if (pos === -1) {
+ return;
+ }
+ this.sockets.splice(pos, 1);
+
+ var pending = this.requests.shift();
+ if (pending) {
+ // If we have pending requests and a socket gets closed a new one
+ // needs to be created to take over in the pool for the one that closed.
+ this.createSocket(pending, function(socket) {
+ pending.request.onSocket(socket);
+ });
+ }
+};
+
+function createSecureSocket(options, cb) {
+ var self = this;
+ TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
+ // 0 is dummy port for v0.6
+ var secureSocket = tls.connect(0, mergeOptions({}, self.options, {
+ socket: socket
+ }));
+ cb(secureSocket);
+ });
+}
+
+
+function mergeOptions(target) {
+ for (var i = 1, len = arguments.length; i < len; ++i) {
+ var overrides = arguments[i];
+ if (typeof overrides === 'object') {
+ var keys = Object.keys(overrides);
+ for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
+ var k = keys[j];
+ if (overrides[k] !== undefined) {
+ target[k] = overrides[k];
+ }
+ }
+ }
+ }
+ return target;
+}
+
+
+var debug;
+if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
+ debug = function() {
+ var args = Array.prototype.slice.call(arguments);
+ if (typeof args[0] === 'string') {
+ args[0] = 'TUNNEL: ' + args[0];
+ } else {
+ args.unshift('TUNNEL:');
+ }
+ console.error.apply(console, args);
+ }
+} else {
+ debug = function() {};
+}
+exports.debug = debug; // for test
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/uuid.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/uuid.js
new file mode 100644
index 0000000..1d83bd5
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/uuid.js
@@ -0,0 +1,19 @@
+module.exports = function () {
+ var s = [], itoh = '0123456789ABCDEF';
+
+ // Make array of random hex digits. The UUID only has 32 digits in it, but we
+ // allocate an extra items to make room for the '-'s we'll be inserting.
+ for (var i = 0; i <36; i++) s[i] = Math.floor(Math.random()*0x10);
+
+ // Conform to RFC-4122, section 4.4
+ s[14] = 4; // Set 4 high bits of time_high field to version
+ s[19] = (s[19] & 0x3) | 0x8; // Specify 2 high bits of clock sequence
+
+ // Convert to hex chars
+ for (var i = 0; i <36; i++) s[i] = itoh[s[i]];
+
+ // Insert '-'s
+ s[8] = s[13] = s[18] = s[23] = '-';
+
+ return s.join('');
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/vendor/cookie/index.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/vendor/cookie/index.js
new file mode 100644
index 0000000..ff44b3e
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/vendor/cookie/index.js
@@ -0,0 +1,65 @@
+/*!
+ * Tobi - Cookie
+ * Copyright(c) 2010 LearnBoost
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var url = require('url');
+
+/**
+ * Initialize a new `Cookie` with the given cookie `str` and `req`.
+ *
+ * @param {String} str
+ * @param {IncomingRequest} req
+ * @api private
+ */
+
+var Cookie = exports = module.exports = function Cookie(str, req) {
+ this.str = str;
+
+ // Map the key/val pairs
+ str.split(/ *; */).reduce(function(obj, pair){
+ var p = pair.indexOf('=');
+ var key = p > 0 ? pair.substring(0, p).trim() : pair.trim();
+ var lowerCasedKey = key.toLowerCase();
+ var value = p > 0 ? pair.substring(p + 1).trim() : true;
+
+ if (!obj.name) {
+ // First key is the name
+ obj.name = key;
+ obj.value = value;
+ }
+ else if (lowerCasedKey === 'httponly') {
+ obj.httpOnly = value;
+ }
+ else {
+ obj[lowerCasedKey] = value;
+ }
+ return obj;
+ }, this);
+
+ // Expires
+ this.expires = this.expires
+ ? new Date(this.expires)
+ : Infinity;
+
+ // Default or trim path
+ this.path = this.path
+ ? this.path.trim(): req
+ ? url.parse(req.url).pathname: '/';
+};
+
+/**
+ * Return the original cookie string.
+ *
+ * @return {String}
+ * @api public
+ */
+
+Cookie.prototype.toString = function(){
+ return this.str;
+};
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/vendor/cookie/jar.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/vendor/cookie/jar.js
new file mode 100644
index 0000000..34920e0
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/request/vendor/cookie/jar.js
@@ -0,0 +1,72 @@
+/*!
+* Tobi - CookieJar
+* Copyright(c) 2010 LearnBoost
+* MIT Licensed
+*/
+
+/**
+* Module dependencies.
+*/
+
+var url = require('url');
+
+/**
+* Initialize a new `CookieJar`.
+*
+* @api private
+*/
+
+var CookieJar = exports = module.exports = function CookieJar() {
+ this.cookies = [];
+};
+
+/**
+* Add the given `cookie` to the jar.
+*
+* @param {Cookie} cookie
+* @api private
+*/
+
+CookieJar.prototype.add = function(cookie){
+ this.cookies = this.cookies.filter(function(c){
+ // Avoid duplication (same path, same name)
+ return !(c.name == cookie.name && c.path == cookie.path);
+ });
+ this.cookies.push(cookie);
+};
+
+/**
+* Get cookies for the given `req`.
+*
+* @param {IncomingRequest} req
+* @return {Array}
+* @api private
+*/
+
+CookieJar.prototype.get = function(req){
+ var path = url.parse(req.url).pathname
+ , now = new Date
+ , specificity = {};
+ return this.cookies.filter(function(cookie){
+ if (0 == path.indexOf(cookie.path) && now < cookie.expires
+ && cookie.path.length > (specificity[cookie.name] || 0))
+ return specificity[cookie.name] = cookie.path.length;
+ });
+};
+
+/**
+* Return Cookie string for the given `req`.
+*
+* @param {IncomingRequest} req
+* @return {String}
+* @api private
+*/
+
+CookieJar.prototype.cookieString = function(req){
+ var cookies = this.get(req);
+ if (cookies.length) {
+ return cookies.map(function(cookie){
+ return cookie.name + '=' + cookie.value;
+ }).join('; ');
+ }
+};
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/.npmignore b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/.npmignore
new file mode 100644
index 0000000..b59f7e3
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/.npmignore
@@ -0,0 +1 @@
+test/
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/License b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/License
new file mode 100644
index 0000000..11ec094
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/License
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com)
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/Makefile b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/Makefile
new file mode 100644
index 0000000..a7ce31d
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/Makefile
@@ -0,0 +1,11 @@
+SHELL := /bin/bash
+
+test:
+ @./test/run.js
+
+release:
+ git push
+ git push --tags
+ npm publish .
+
+.PHONY: test
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/Readme.md b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/Readme.md
new file mode 100644
index 0000000..fcd1b97
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/Readme.md
@@ -0,0 +1,98 @@
+# stack-trace
+
+Get v8 stack traces as an array of CallSite objects.
+
+## Install
+
+``` bash
+npm install stack-trace
+```
+
+## Usage
+
+The stack-trace module makes it easy for you to capture the current stack:
+
+``` javascript
+var stackTrace = require('stack-trace');
+var trace = stackTrace.get();
+
+require('assert').strictEqual(trace[0].getFileName(), __filename);
+```
+
+However, sometimes you have already popped the stack you are interested in,
+and all you have left is an `Error` object. This module can help:
+
+``` javascript
+var stackTrace = require('stack-trace');
+var err = new Error('something went wrong');
+var trace = stackTrace.parse(err);
+
+require('assert').strictEqual(trace[0].getFileName(), __filename);
+```
+
+Please note that parsing the `Error#stack` property is not perfect, only
+certain properties can be retrieved with it as noted in the API docs below.
+
+## Long stack traces
+
+stack-trace works great with [long-stack-traces][], when parsing an `err.stack`
+that has crossed the event loop boundary, a `CallSite` object returning
+`'----------------------------------------'` for `getFileName()` is created.
+All other methods of the event loop boundary call site return `null`.
+
+[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces
+
+## API
+
+### stackTrace.get([belowFn])
+
+Returns an array of `CallSite` objects, where element `0` is the current call
+site.
+
+When passing a function on the current stack as the `belowFn` parameter, the
+returned array will only include `CallSite` objects below this function.
+
+### stackTrace.parse(err)
+
+Parses the `err.stack` property of an `Error` object into an array compatible
+with those returned by `stackTrace.get()`. However, only the following methods
+are implemented on the returned `CallSite` objects.
+
+* getTypeName
+* getFunctionName
+* getMethodName
+* getFileName
+* getLineNumber
+* getColumnNumber
+* isNative
+
+Note: Except `getFunctionName()`, all of the above methods return exactly the
+same values as you would get from `stackTrace.get()`. `getFunctionName()`
+is sometimes a little different, but still useful.
+
+### CallSite
+
+The official v8 CallSite object API can be found [here][v8stackapi]. A quick
+excerpt:
+
+> A CallSite object defines the following methods:
+>
+> * **getThis**: returns the value of this
+> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.
+> * **getFunction**: returns the current function
+> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.
+> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function
+> * **getFileName**: if this function was defined in a script returns the name of the script
+> * **getLineNumber**: if this function was defined in a script returns the current line number
+> * **getColumnNumber**: if this function was defined in a script returns the current column number
+> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called
+> * **isToplevel**: is this a toplevel invocation, that is, is this the global object?
+> * **isEval**: does this call take place in code defined by a call to eval?
+> * **isNative**: is this call in native V8 code?
+> * **isConstructor**: is this a constructor call?
+
+[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
+
+## License
+
+stack-trace is licensed under the MIT license.
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/lib/stack-trace.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/lib/stack-trace.js
new file mode 100644
index 0000000..a7c38aa
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/lib/stack-trace.js
@@ -0,0 +1,111 @@
+exports.get = function(belowFn) {
+ var oldLimit = Error.stackTraceLimit;
+ Error.stackTraceLimit = Infinity;
+
+ var dummyObject = {};
+
+ var v8Handler = Error.prepareStackTrace;
+ Error.prepareStackTrace = function(dummyObject, v8StackTrace) {
+ return v8StackTrace;
+ };
+ Error.captureStackTrace(dummyObject, belowFn || exports.get);
+
+ var v8StackTrace = dummyObject.stack;
+ Error.prepareStackTrace = v8Handler;
+ Error.stackTraceLimit = oldLimit;
+
+ return v8StackTrace;
+};
+
+exports.parse = function(err) {
+ if (!err.stack) {
+ return [];
+ }
+
+ var self = this;
+ var lines = err.stack.split('\n').slice(1);
+
+ return lines
+ .map(function(line) {
+ if (line.match(/^\s*[-]{4,}$/)) {
+ return self._createParsedCallSite({
+ fileName: line,
+ lineNumber: null,
+ functionName: null,
+ typeName: null,
+ methodName: null,
+ columnNumber: null,
+ 'native': null,
+ });
+ }
+
+ var lineMatch = line.match(/at (?:(.+)\s+)?\(?(?:(.+?):(\d+):(\d+)|([^)]+))\)?/);
+ if (!lineMatch) {
+ return;
+ }
+
+ var object = null;
+ var method = null;
+ var functionName = null;
+ var typeName = null;
+ var methodName = null;
+ var isNative = (lineMatch[5] === 'native');
+
+ if (lineMatch[1]) {
+ var methodMatch = lineMatch[1].match(/([^\.]+)(?:\.(.+))?/);
+ object = methodMatch[1];
+ method = methodMatch[2];
+ functionName = lineMatch[1];
+ typeName = 'Object';
+ }
+
+ if (method) {
+ typeName = object;
+ methodName = method;
+ }
+
+ if (method === '') {
+ methodName = null;
+ functionName = '';
+ }
+
+ var properties = {
+ fileName: lineMatch[2] || null,
+ lineNumber: parseInt(lineMatch[3], 10) || null,
+ functionName: functionName,
+ typeName: typeName,
+ methodName: methodName,
+ columnNumber: parseInt(lineMatch[4], 10) || null,
+ 'native': isNative,
+ };
+
+ return self._createParsedCallSite(properties);
+ })
+ .filter(function(callSite) {
+ return !!callSite;
+ });
+};
+
+exports._createParsedCallSite = function(properties) {
+ var methods = {};
+ for (var property in properties) {
+ var prefix = 'get';
+ if (property === 'native') {
+ prefix = 'is';
+ }
+ var method = prefix + property.substr(0, 1).toUpperCase() + property.substr(1);
+
+ (function(property) {
+ methods[method] = function() {
+ return properties[property];
+ }
+ })(property);
+ }
+
+ var callSite = Object.create(methods);
+ for (var property in properties) {
+ callSite[property] = properties[property];
+ }
+
+ return callSite;
+};
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/package.json
new file mode 100644
index 0000000..f655459
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/node_modules/stack-trace/package.json
@@ -0,0 +1,31 @@
+{
+ "author": {
+ "name": "Felix Geisendörfer",
+ "email": "felix@debuggable.com",
+ "url": "http://debuggable.com/"
+ },
+ "name": "stack-trace",
+ "description": "Get v8 stack traces as an array of CallSite objects.",
+ "version": "0.0.9",
+ "homepage": "https://github.com/felixge/node-stack-trace",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/felixge/node-stack-trace.git"
+ },
+ "main": "./lib/stack-trace",
+ "engines": {
+ "node": "*"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "far": "0.0.3",
+ "long-stack-traces": "0.1.2"
+ },
+ "readme": "# stack-trace\n\nGet v8 stack traces as an array of CallSite objects.\n\n## Install\n\n``` bash\nnpm install stack-trace\n```\n\n## Usage\n\nThe stack-trace module makes it easy for you to capture the current stack:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar trace = stackTrace.get();\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nHowever, sometimes you have already popped the stack you are interested in,\nand all you have left is an `Error` object. This module can help:\n\n``` javascript\nvar stackTrace = require('stack-trace');\nvar err = new Error('something went wrong');\nvar trace = stackTrace.parse(err);\n\nrequire('assert').strictEqual(trace[0].getFileName(), __filename);\n```\n\nPlease note that parsing the `Error#stack` property is not perfect, only\ncertain properties can be retrieved with it as noted in the API docs below.\n\n## Long stack traces\n\nstack-trace works great with [long-stack-traces][], when parsing an `err.stack`\nthat has crossed the event loop boundary, a `CallSite` object returning\n`'----------------------------------------'` for `getFileName()` is created.\nAll other methods of the event loop boundary call site return `null`.\n\n[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces\n\n## API\n\n### stackTrace.get([belowFn])\n\nReturns an array of `CallSite` objects, where element `0` is the current call\nsite.\n\nWhen passing a function on the current stack as the `belowFn` parameter, the\nreturned array will only include `CallSite` objects below this function.\n\n### stackTrace.parse(err)\n\nParses the `err.stack` property of an `Error` object into an array compatible\nwith those returned by `stackTrace.get()`. However, only the following methods\nare implemented on the returned `CallSite` objects.\n\n* getTypeName\n* getFunctionName\n* getMethodName\n* getFileName\n* getLineNumber\n* getColumnNumber\n* isNative\n\nNote: Except `getFunctionName()`, all of the above methods return exactly the\nsame values as you would get from `stackTrace.get()`. `getFunctionName()`\nis sometimes a little different, but still useful.\n\n### CallSite\n\nThe official v8 CallSite object API can be found [here][v8stackapi]. A quick\nexcerpt:\n\n> A CallSite object defines the following methods:\n>\n> * **getThis**: returns the value of this\n> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.\n> * **getFunction**: returns the current function\n> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.\n> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function\n> * **getFileName**: if this function was defined in a script returns the name of the script\n> * **getLineNumber**: if this function was defined in a script returns the current line number\n> * **getColumnNumber**: if this function was defined in a script returns the current column number\n> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called\n> * **isToplevel**: is this a toplevel invocation, that is, is this the global object?\n> * **isEval**: does this call take place in code defined by a call to eval?\n> * **isNative**: is this call in native V8 code?\n> * **isConstructor**: is this a constructor call?\n\n[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\n\n## License\n\nstack-trace is licensed under the MIT license.\n",
+ "readmeFilename": "Readme.md",
+ "bugs": {
+ "url": "https://github.com/felixge/node-stack-trace/issues"
+ },
+ "_id": "stack-trace@0.0.9",
+ "_from": "stack-trace@0.0.x"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/package.json
new file mode 100644
index 0000000..e6dff6d
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "winston",
+ "description": "A multi-transport async logging library for Node.js",
+ "version": "0.6.2",
+ "author": {
+ "name": "Nodejitsu Inc.",
+ "email": "info@nodejitsu.com"
+ },
+ "maintainers": [
+ {
+ "name": "indexzero",
+ "email": "charlie@nodejitsu.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/flatiron/winston.git"
+ },
+ "keywords": [
+ "logging",
+ "sysadmin",
+ "tools"
+ ],
+ "dependencies": {
+ "async": "0.1.x",
+ "colors": "0.x.x",
+ "cycle": "1.0.x",
+ "eyes": "0.1.x",
+ "pkginfo": "0.2.x",
+ "request": "2.9.x",
+ "stack-trace": "0.0.x"
+ },
+ "devDependencies": {
+ "vows": "0.6.x"
+ },
+ "main": "./lib/winston",
+ "scripts": {
+ "test": "vows --spec --isolate"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "readme": "# winston [![Build Status](https://secure.travis-ci.org/flatiron/winston.png)](http://travis-ci.org/flatiron/winston)\n\nA multi-transport async logging library for node.js. "CHILL WINSTON! ... I put it in the logs."\n\n## Motivation\nWinston is designed to be a simple and universal logging library with support for multiple transports. A transport is essentially a storage device for your logs. Each instance of a winston logger can have multiple transports configured at different levels. For example, one may want error logs to be stored in a persistent remote location (like a database), but all logs output to the console or a local file.\n\nThere also seemed to be a lot of logging libraries out there that coupled their implementation of logging (i.e. how the logs are stored / indexed) to the API that they exposed to the programmer. This library aims to decouple those parts of the process to make it more flexible and extensible.\n\n## Usage\nThere are two different ways to use winston: directly via the default logger, or by instantiating your own Logger. The former is merely intended to be a convenient shared logger to use throughout your application if you so choose.\n\n* [Logging](#logging)\n * [Using the Default Logger](#using-the-default-logger)\n * [Instantiating your own Logger](#instantiating-your-own-logger)\n * [Logging with Metadata](#logging-with-metadata)\n* [Transports](https://github.com/flatiron/winston/blob/master/docs/transports.md)\n* [Profiling](#profiling)\n* [Streaming Logs](#streaming-logs)\n* [Querying Logs](#querying-logs) \n* [Exceptions](#exceptions)\n * [Handling Uncaught Exceptions with winston](#handling-uncaught-exceptions-with-winston)\n * [To Exit or Not to Exit](#to-exit-or-not-to-exit)\n* [Logging Levels](#logging-levels)\n * [Using Logging Levels](#using-logging-levels)\n * [Using Custom Logging Levels](#using-custom-logging-levels)\n* [Further Reading](#further-reading)\n * [Events and Callbacks in Winston](#events-and-callbacks-in-winston)\n * [Working with multiple Loggers in winston](#working-with-multiple-loggers-in-winston)\n * [Using winston in a CLI tool](#using-winston-in-a-cli-tool)\n * [Extending another object with Logging](#extending-another-object-with-logging)\n * [Adding Custom Transports](#adding-custom-transports)\n\n## Logging\n\n### Using the Default Logger\nThe default logger is accessible through the winston module directly. Any method that you could call on an instance of a logger is available on the default logger:\n\n``` js\n var winston = require('winston');\n\n winston.log('info', 'Hello distributed log files!');\n winston.info('Hello again distributed logs');\n```\n\nBy default, only the Console transport is set on the default logger. You can add or remove transports via the add() and remove() methods:\n\n``` js\n winston.add(winston.transports.File, { filename: 'somefile.log' });\n winston.remove(winston.transports.Console);\n```\n\nFor more documenation about working with each individual transport supported by Winston see the \"Working with Transports\" section below.\n\n### Instantiating your own Logger\nIf you would prefer to manage the object lifetime of loggers you are free to instantiate them yourself:\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)(),\n new (winston.transports.File)({ filename: 'somefile.log' })\n ]\n });\n```\n\nYou can work with this logger in the same way that you work with the default logger:\n\n``` js\n //\n // Logging\n //\n logger.log('info', 'Hello distributed log files!');\n logger.info('Hello again distributed logs');\n\n //\n // Adding / Removing Transports\n // (Yes It's chainable)\n //\n logger.add(winston.transports.File)\n .remove(winston.transports.Console);\n```\n\n### Logging with Metadata\nIn addition to logging string messages, winston will also optionally log additional JSON metadata objects. Adding metadata is simple:\n\n``` js\n winston.log('info', 'Test Log Message', { anything: 'This is metadata' });\n```\n\nThe way these objects is stored varies from transport to transport (to best support the storage mechanisms offered). Here's a quick summary of how each transports handles metadata:\n\n1. __Console:__ Logged via util.inspect(meta)\n2. __File:__ Logged via util.inspect(meta)\n\n## Profiling\nIn addition to logging messages and metadata, winston also has a simple profiling mechanism implemented for any logger:\n\n``` js\n //\n // Start profile of 'test'\n // Remark: Consider using Date.now() with async operations\n //\n winston.profile('test');\n\n setTimeout(function () {\n //\n // Stop profile of 'test'. Logging will now take place:\n // \"17 Jan 21:00:00 - info: test duration=1000ms\"\n //\n winston.profile('test');\n }, 1000);\n```\n\nAll profile messages are set to the 'info' by default and both message and metadata are optional There are no plans in the Roadmap to make this configurable, but I'm open to suggestions / issues.\n\n\n## Querying Logs\nWinston supports querying of logs with Loggly-like options.\nSpecifically: `File`, `Couchdb`, `Redis`, `Loggly`, `Nssocket`, and `Http`.\n\n``` js\n var options = {\n from: new Date - 24 * 60 * 60 * 1000,\n until: new Date\n };\n\n //\n // Find items logged between today and yesterday.\n //\n winston.query(options, function (err, results) {\n if (err) {\n throw err;\n }\n \n console.log(results);\n });\n```\n\n## Streaming Logs\nStreaming allows you to stream your logs back from your chosen transport.\n\n``` js\n //\n // Start at the end.\n //\n winston.stream({ start: -1 }).on('log', function(log) {\n console.log(log);\n });\n```\n\n## Exceptions\n\n### Handling Uncaught Exceptions with winston\n\nWith `winston`, it is possible to catch and log `uncaughtException` events from your process. There are two distinct ways of enabling this functionality either through the default winston logger or your own logger instance.\n\nIf you want to use this feature with the default logger simply call `.handleExceptions()` with a transport instance.\n\n``` js\n //\n // You can add a separate exception logger by passing it to `.handleExceptions`\n //\n winston.handleExceptions(new winston.transports.File({ filename: 'path/to/exceptions.log' }))\n\n //\n // Alternatively you can set `.handleExceptions` to true when adding transports to winston\n //\n winston.add(winston.transports.File, {\n filename: 'path/to/all-logs.log',\n handleExceptions: true\n });\n```\n\n### To Exit or Not to Exit\n\nby default, winston will exit after logging an uncaughtException. if this is not the behavior you want,\nset `exitOnError = false`\n\n``` js\n var logger = new (winston.Logger)({ exitOnError: false });\n\n //\n // or, like this:\n //\n logger.exitOnError = false;\n```\n\nWhen working with custom logger instances, you can pass in separate transports to the `exceptionHandlers` property or set `.handleExceptions` on any transport.\n\nExample 1\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new winston.transports.File({ filename: 'path/to/all-logs.log' })\n ]\n exceptionHandlers: [\n new winston.transports.File({ filename: 'path/to/exceptions.log' })\n ]\n });\n```\n\nExample 2\n\n```\nvar logger = new winston.Logger({\n transports: [\n new winston.transports.Console({\n handleExceptions: true,\n json: true\n })\n ],\n exitOnError: false\n});\n```\n\nThe `exitOnError` option can also be a function to prevent exit on only certain types of errors:\n\n``` js\n function ignoreEpipe(err) {\n return err.code !== 'EPIPE';\n }\n\n var logger = new (winston.Logger)({ exitOnError: ignoreEpipe });\n\n //\n // or, like this:\n //\n logger.exitOnError = ignoreEpipe;\n```\n\n## Logging Levels\n\n### Using Logging Levels\nSetting the level for your logging message can be accomplished in one of two ways. You can pass a string representing the logging level to the log() method or use the level specified methods defined on every winston Logger.\n\n``` js\n //\n // Any logger instance\n //\n logger.log('info', \"127.0.0.1 - there's no place like home\");\n logger.log('warn', \"127.0.0.1 - there's no place like home\");\n logger.log('error', \"127.0.0.1 - there's no place like home\");\n logger.info(\"127.0.0.1 - there's no place like home\");\n logger.warn(\"127.0.0.1 - there's no place like home\");\n logger.error(\"127.0.0.1 - there's no place like home\");\n\n //\n // Default logger\n //\n winston.log('info', \"127.0.0.1 - there's no place like home\");\n winston.info(\"127.0.0.1 - there's no place like home\");\n```\n\nWinston allows you to set a `level` on each transport that specifies the level of messages this transport should log. For example, you could log only errors to the console, with the full logs in a file:\n\n``` js\n var logger = new (winston.Logger)({\n transports: [\n new (winston.transports.Console)({ level: 'error' }),\n new (winston.transports.File)({ filename: 'somefile.log' })\n ]\n });\n```\n\nAs of 0.2.0, winston supports customizable logging levels, defaulting to [npm][0] style logging levels. Changing logging levels is easy:\n\n``` js\n //\n // Change levels on the default winston logger\n //\n winston.setLevels(winston.config.syslog.levels);\n\n //\n // Change levels on an instance of a logger\n //\n logger.setLevels(winston.config.syslog.levels);\n```\n\nCalling `.setLevels` on a logger will remove all of the previous helper methods for the old levels and define helper methods for the new levels. Thus, you should be careful about the logging statements you use when changing levels. For example, if you ran this code after changing to the syslog levels:\n\n``` js\n //\n // Logger does not have 'silly' defined since that level is not in the syslog levels\n //\n logger.silly('some silly message');\n```\n\n### Using Custom Logging Levels\nIn addition to the predefined `npm` and `syslog` levels available in Winston, you can also choose to define your own:\n\n``` js\n var myCustomLevels = {\n levels: {\n foo: 0,\n bar: 1,\n baz: 2,\n foobar: 3\n },\n colors: {\n foo: 'blue',\n bar: 'green',\n baz: 'yellow',\n foobar: 'red'\n }\n };\n\n var customLevelLogger = new (winston.Logger)({ levels: myCustomLevels.levels });\n customLevelLogger.foobar('some foobar level-ed message');\n```\n\nAlthough there is slight repetition in this data structure, it enables simple encapsulation if you not to have colors. If you do wish to have colors, in addition to passing the levels to the Logger itself, you must make winston aware of them:\n\n``` js\n //\n // Make winston aware of these colors\n //\n winston.addColors(myCustomLevels.colors);\n```\n\nThis enables transports with the 'colorize' option set to appropriately color the output of custom levels.\n\n## Further Reading\n\n### Events and Callbacks in Winston\nEach instance of winston.Logger is also an instance of an [EventEmitter][1]. A log event will be raised each time a transport successfully logs a message:\n\n``` js\n logger.on('logging', function (transport, level, msg, meta) {\n // [msg] and [meta] have now been logged at [level] to [transport]\n });\n\n logger.info('CHILL WINSTON!', { seriously: true });\n```\n\nIt is also worth mentioning that the logger also emits an 'error' event which you should handle or suppress if you don't want unhandled exceptions:\n\n``` js\n //\n // Handle errors\n //\n logger.on('error', function (err) { /* Do Something */ });\n\n //\n // Or just suppress them.\n //\n logger.emitErrs = false;\n```\n\nEvery logging method described in the previous section also takes an optional callback which will be called only when all of the transports have logged the specified message.\n\n``` js\n logger.info('CHILL WINSTON!', { seriously: true }, function (err, level, msg, meta) {\n // [msg] and [meta] have now been logged at [level] to **every** transport.\n });\n```\n\n### Working with multiple Loggers in winston\n\nOften in larger, more complex applications it is necessary to have multiple logger instances with different settings. Each logger is responsible for a different feature area (or category). This is exposed in `winston` in two ways: through `winston.loggers` and instances of `winston.Container`. In fact, `winston.loggers` is just a predefined instance of `winston.Container`:\n\n``` js\n var winston = require('winston');\n\n //\n // Configure the logger for `category1`\n //\n winston.loggers.add('category1', {\n console: {\n level: 'silly',\n colorize: 'true'\n },\n file: {\n filename: '/path/to/some/file'\n }\n });\n\n //\n // Configure the logger for `category2`\n //\n winston.loggers.add('category2', {\n couchdb: {\n host: '127.0.0.1',\n port: 5984\n }\n });\n```\n\nNow that your loggers are setup you can require winston _in any file in your application_ and access these pre-configured loggers:\n\n``` js\n var winston = require('winston');\n\n //\n // Grab your preconfigured logger\n //\n var category1 = winston.loggers.get('category1');\n\n category1.info('logging from your IoC container-based logger');\n```\n\nIf you prefer to manage the `Container` yourself you can simply instantiate one:\n\n``` js\n var winston = require('winston'),\n container = new winston.Container();\n\n container.add('category1', {\n console: {\n level: 'silly',\n colorize: 'true'\n },\n file: {\n filename: '/path/to/some/file'\n }\n });\n```\n\n### Sharing transports between Loggers in winston\n\n``` js\n var winston = require('winston');\n\n //\n // Setup transports to be shared across all loggers\n // in three ways:\n //\n // 1. By setting it on the default Container\n // 2. By passing `transports` into the constructor function of winston.Container\n // 3. By passing `transports` into the `.get()` or `.add()` methods\n //\n\n //\n // 1. By setting it on the default Container\n //\n winston.loggers.options.transports = [\n // Setup your shared transports here\n ];\n\n //\n // 2. By passing `transports` into the constructor function of winston.Container\n //\n var container = new winston.Container({\n transports: [\n // Setup your shared transports here\n ]\n });\n\n //\n // 3. By passing `transports` into the `.get()` or `.add()` methods\n //\n winston.loggers.add('some-category', {\n transports: [\n // Setup your shared transports here\n ]\n });\n\n container.add('some-category', {\n transports: [\n // Setup your shared transports here\n ]\n });\n```\n\n### Using winston in a CLI tool\nA common use-case for logging is output to a CLI tool. Winston has a special helper method which will pretty print output from your CLI tool. Here's an example from the [require-analyzer][2] written by [Nodejitsu][3]:\n\n```\n info: require-analyzer starting in /Users/Charlie/Nodejitsu/require-analyzer\n info: Found existing dependencies\n data: {\n data: colors: '0.x.x',\n data: eyes: '0.1.x',\n data: findit: '0.0.x',\n data: npm: '1.0.x',\n data: optimist: '0.2.x',\n data: semver: '1.0.x',\n data: winston: '0.2.x'\n data: }\n info: Analyzing dependencies...\n info: Done analyzing raw dependencies\n info: Retrieved packages from npm\n warn: No additional dependencies found\n```\n\nConfiguring output for this style is easy, just use the `.cli()` method on `winston` or an instance of `winston.Logger`:\n\n``` js\n var winston = require('winston');\n\n //\n // Configure CLI output on the default logger\n //\n winston.cli();\n\n //\n // Configure CLI on an instance of winston.Logger\n //\n var logger = new winston.Logger({\n transports: [\n new (winston.transports.Console)()\n ]\n });\n\n logger.cli();\n```\n\n### Extending another object with Logging\nOften in a given code base with lots of Loggers it is useful to add logging methods a different object so that these methods can be called with less syntax. Winston exposes this functionality via the 'extend' method:\n\n``` js\n var myObject = {};\n\n logger.extend(myObject);\n\n //\n // You can now call logger methods on 'myObject'\n //\n myObject.info('127.0.0.1 - there's no place like home');\n```\n\n## Working with Transports\nRight now there are four transports supported by winston core. If you have a transport you would like to add either open an issue or fork and submit a pull request. Commits are welcome, but I'll give you extra street cred if you __add tests too :D__\n \n1. __Console:__ Output to the terminal\n2. __Files:__ Append to a file\n3. __Loggly:__ Log to Logging-as-a-Service platform Loggly\n\n### Console Transport\n``` js\n winston.add(winston.transports.Console, options)\n```\n\nThe Console transport takes two simple options:\n\n* __level:__ Level of messages that this transport should log (default 'info').\n* __silent:__ Boolean flag indicating whether to suppress output (default false).\n* __colorize:__ Boolean flag indicating if we should colorize output (default false).\n* __timestamp:__ Boolean flag indicating if we should prepend output with timestamps (default false). If function is specified, its return value will be used instead of timestamps.\n\n*Metadata:* Logged via util.inspect(meta);\n\n### File Transport\n``` js\n winston.add(winston.transports.File, options)\n```\n\nThe File transport should really be the 'Stream' transport since it will accept any [WritableStream][14]. It is named such because it will also accept filenames via the 'filename' option:\n\n* __level:__ Level of messages that this transport should log.\n* __silent:__ Boolean flag indicating whether to suppress output.\n* __colorize:__ Boolean flag indicating if we should colorize output.\n* __timestamp:__ Boolean flag indicating if we should prepend output with timestamps (default true). If function is specified, its return value will be used instead of timestamps.\n* __filename:__ The filename of the logfile to write output to.\n* __maxsize:__ Max size in bytes of the logfile, if the size is exceeded then a new file is created.\n* __maxFiles:__ Limit the number of files created when the size of the logfile is exceeded.\n* __stream:__ The WriteableStream to write output to.\n* __json:__ If true, messages will be logged as JSON (default true).\n\n*Metadata:* Logged via util.inspect(meta);\n\n### Loggly Transport\n``` js\n var Loggly = require('winston-loggly').Loggly\n winston.add(Loggly, options);\n```\n\nThe Loggly transport is based on [Nodejitsu's][5] [node-loggly][6] implementation of the [Loggly][7] API. If you haven't heard of Loggly before, you should probably read their [value proposition][8]. The Loggly transport takes the following options. Either 'inputToken' or 'inputName' is required:\n\n* __level:__ Level of messages that this transport should log. \n* __subdomain:__ The subdomain of your Loggly account. *[required]*\n* __auth__: The authentication information for your Loggly account. *[required with inputName]*\n* __inputName:__ The name of the input this instance should log to.\n* __inputToken:__ The input token of the input this instance should log to.\n* __json:__ If true, messages will be sent to Loggly as JSON.\n\n*Metadata:* Logged in suggested [Loggly format][2]\n\n### Riak Transport\nAs of `0.3.0` the Riak transport has been broken out into a new module: [winston-riak][17]. Using it is just as easy:\n\n``` js\n var Riak = require('winston-riak').Riak;\n winston.add(Riak, options);\n```\n\nIn addition to the options accepted by the [riak-js][3] [client][4], the Riak transport also accepts the following options. It is worth noting that the riak-js debug option is set to *false* by default:\n\n* __level:__ Level of messages that this transport should log.\n* __bucket:__ The name of the Riak bucket you wish your logs to be in or a function to generate bucket names dynamically.\n\n``` js\n // Use a single bucket for all your logs\n var singleBucketTransport = new (Riak)({ bucket: 'some-logs-go-here' });\n \n // Generate a dynamic bucket based on the date and level\n var dynamicBucketTransport = new (Riak)({\n bucket: function (level, msg, meta, now) {\n var d = new Date(now);\n return level + [d.getDate(), d.getMonth(), d.getFullYear()].join('-');\n }\n });\n```\n\n*Metadata:* Logged as JSON literal in Riak\n\n### MongoDB Transport\nAs of `0.3.0` the MongoDB transport has been broken out into a new module: [winston-mongodb][16]. Using it is just as easy:\n\n``` js\n var MongoDB = require('winston-mongodb').MongoDB;\n winston.add(MongoDB, options);\n```\n\nThe MongoDB transport takes the following options. 'db' is required:\n\n* __level:__ Level of messages that this transport should log. \n* __silent:__ Boolean flag indicating whether to suppress output.\n* __db:__ The name of the database you want to log to. *[required]*\n* __collection__: The name of the collection you want to store log messages in, defaults to 'log'.\n* __safe:__ Boolean indicating if you want eventual consistency on your log messages, if set to true it requires an extra round trip to the server to ensure the write was committed, defaults to true.\n* __host:__ The host running MongoDB, defaults to localhost.\n* __port:__ The port on the host that MongoDB is running on, defaults to MongoDB's default port.\n\n*Metadata:* Logged as a native JSON object.\n\n### SimpleDB Transport\n\nThe [winston-simpledb][18] transport is just as easy:\n\n``` js\n var SimpleDB = require('winston-simpledb').SimpleDB;\n winston.add(SimpleDB, options);\n```\n\nThe SimpleDB transport takes the following options. All items marked with an asterisk are required:\n\n* __awsAccessKey__:* your AWS Access Key\n* __secretAccessKey__:* your AWS Secret Access Key\n* __awsAccountId__:* your AWS Account Id\n* __domainName__:* a string or function that returns the domain name to log to\n* __region__:* the region your domain resides in\n* __itemName__: a string ('uuid', 'epoch', 'timestamp') or function that returns the item name to log\n\n*Metadata:* Logged as a native JSON object to the 'meta' attribute of the item.\n\n### Mail Transport\n\nThe [winston-mail][19] is an email transport:\n\n``` js\n var Mail = require('winston-mail').Mail;\n winston.add(Mail, options);\n```\n\nThe Mail transport uses [emailjs](https://github.com/eleith/emailjs) behind the scenes. Options are the following:\n\n* __to:__ The address(es) you want to send to. *[required]*\n* __from:__ The address you want to send from. (default: `winston@[server-host-name]`)\n* __host:__ SMTP server hostname (default: localhost)\n* __port:__ SMTP port (default: 587 or 25)\n* __username__ User for server auth\n* __password__ Password for server auth\n* __ssl:__ Use SSL (boolean or object { key, ca, cert })\n* __tls:__ Boolean (if true, use starttls)\n* __level:__ Level of messages that this transport should log. \n* __silent:__ Boolean flag indicating whether to suppress output.\n\n*Metadata:* Stringified as JSON in email.\n\n### Amazon SNS (Simple Notification System) Transport\n\nThe [winston-sns][21] transport uses amazon SNS to send emails, texts, or a bunch of other notifications.\n\n``` js\n require('winston-sns').SNS;\n winston.add(winston.transports.SNS, options);\n```\n\nOptions:\n\n* __aws_key:__ Your Amazon Web Services Key. *[required]*\n* __aws_secret:__ Your Amazon Web Services Secret. *[required]*\n* __subscriber:__ Subscriber number - found in your SNS AWS Console, after clicking on a topic. Same as AWS Account ID. *[required]*\n* __topic_arn:__ Also found in SNS AWS Console - listed under a topic as Topic ARN. *[required]*\n* __region:__ AWS Region to use. Can be one of: `us-east-1`,`us-west-1`,`eu-west-1`,`ap-southeast-1`,`ap-northeast-1`,`us-gov-west-1`,`sa-east-1`. (default: `us-east-1`)\n* __subject:__ Subject for notifications. (default: \"Winston Error Report\")\n* __message:__ Message of notifications. Uses placeholders for level (%l), error message (%e), and metadata (%m). (default: \"Level '%l' Error:\\n%e\\n\\nMetadata:\\n%m\")\n* __level:__ lowest level this transport will log. (default: `info`)\n\n### Graylog2 Transport\n\n[winston-graylog2][22] is a Graylog2 transport:\n\n``` js\n var Graylog2 = require('winston-graylog2').Graylog2;\n winston.add(Graylog2, options);\n```\n\nThe Graylog2 transport connects to a Graylog2 server over UDP using the following options:\n\n* __level:__ Level of messages this transport should log. (default: info)\n* __silent:__ Boolean flag indicating whether to suppress output. (default: false)\n\n* __graylogHost:__ IP address or hostname of the graylog2 server. (default: localhost)\n* __graylogPort:__ Port to send messages to on the graylog2 server. (default: 12201)\n* __graylogHostname:__ The hostname associated with graylog2 messages. (default: require('os').hostname())\n* __graylogFacility:__ The graylog2 facility to send log messages.. (default: nodejs)\n\n*Metadata:* Stringified as JSON in the full message GELF field.\n\n### Adding Custom Transports\nAdding a custom transport (say for one of the datastore on the Roadmap) is actually pretty easy. All you need to do is accept a couple of options, set a name, implement a log() method, and add it to the set of transports exposed by winston.\n\n``` js\n var util = require('util'),\n winston = require('winston');\n\n var CustomLogger = winston.transports.CustomerLogger = function (options) {\n //\n // Name this logger\n //\n this.name = 'customLogger';\n\n //\n // Set the level from your options\n //\n this.level = options.level || 'info';\n\n //\n // Configure your storage backing as you see fit\n //\n };\n\n //\n // Inherit from `winston.Transport` so you can take advantage\n // of the base functionality and `.handleExceptions()`.\n //\n util.inherits(CustomLogger, winston.Transport);\n\n CustomLogger.prototype.log = function (level, msg, meta, callback) {\n //\n // Store this message and metadata, maybe use some custom logic\n // then callback indicating success.\n //\n callback(null, true);\n };\n```\n\n### Inspirations\n1. [npm][0]\n2. [log.js][4]\n3. [socket.io][5]\n4. [node-rlog][6]\n5. [BigBrother][7]\n6. [Loggly][8]\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing winston\n```\n [sudo] npm install winston\n```\n\n## Run Tests\nAll of the winston tests are written in [vows][9], and designed to be run with npm. \n\n``` bash\n $ npm test\n```\n\n#### Author: [Charlie Robbins](http://twitter.com/indexzero)\n#### Contributors: [Matthew Bergman](http://github.com/fotoverite), [Marak Squires](http://github.com/marak)\n\n[0]: https://github.com/isaacs/npm/blob/master/lib/utils/log.js\n[1]: http://nodejs.org/docs/v0.3.5/api/events.html#events.EventEmitter\n[2]: http://github.com/nodejitsu/require-analyzer\n[3]: http://nodejitsu.com\n[4]: https://github.com/visionmedia/log.js\n[5]: http://socket.io\n[6]: https://github.com/jbrisbin/node-rlog\n[7]: https://github.com/feisty/BigBrother\n[8]: http://loggly.com\n[9]: http://vowsjs.org\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/flatiron/winston/issues"
+ },
+ "_id": "winston@0.6.2",
+ "_from": "winston@0.6.x"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/cli-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/cli-test.js
new file mode 100644
index 0000000..365fba3
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/cli-test.js
@@ -0,0 +1,40 @@
+/*
+ * cli-test.js: Tests for the cli levels available in winston.
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var path = require('path'),
+ vows = require('vows'),
+ assert = require('assert'),
+ winston = require('../lib/winston'),
+ helpers = require('./helpers');
+
+vows.describe('winston/logger/cli').addBatch({
+ "When an instance of winston.Logger": {
+ topic: function () {
+ return new winston.Logger({
+ transports: [
+ new winston.transports.Console()
+ ]
+ })
+ },
+ "the cli() method": {
+ "should set the appropriate values on the logger": function (logger) {
+ logger.cli();
+ assert.isTrue(logger.padLevels);
+ assert.isTrue(logger.transports.console.colorize);
+ assert.isFalse(logger.transports.console.timestamp);
+ Object.keys(winston.config.cli.levels).forEach(function (level) {
+ assert.isNumber(logger.levels[level]);
+ });
+
+ Object.keys(winston.config.cli.colors).forEach(function (color) {
+ assert.isString(winston.config.allColors[color]);
+ });
+ }
+ }
+ }
+}).export(module);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/container-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/container-test.js
new file mode 100644
index 0000000..2fcc26a
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/container-test.js
@@ -0,0 +1,99 @@
+/*
+ * container-test.js: Tests for the Container object
+ *
+ * (C) 2011 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var assert = require('assert'),
+ fs = require('fs'),
+ http = require('http'),
+ path = require('path'),
+ vows = require('vows'),
+ winston = require('../lib/winston'),
+ helpers = require('./helpers');
+
+vows.describe('winston/container').addBatch({
+ "An instance of winston.Container": {
+ topic: new winston.Container(),
+ "the add() method": {
+ topic: function (container) {
+ return container.add('default-test');
+ },
+ "should correctly instantiate a Logger": function (logger) {
+ assert.instanceOf(logger, winston.Logger);
+ },
+ "the get() method": {
+ topic: function (logger, container) {
+ this.callback.apply(this, arguments);
+ },
+ "should respond with the logger previously created": function (existing, container) {
+ var logger = container.get('default-test');
+ assert.isTrue(existing === logger);
+ }
+ },
+ "the has() method": {
+ topic: function (logger, container) {
+ this.callback.apply(this, arguments);
+ },
+ "should indicate `default-test` logger exists": function (existing, container) {
+ assert.isTrue(container.has('default-test'));
+ },
+ "should indicate `not-has` logger doesnt exists": function (existing, container) {
+ assert.isFalse(container.has('not-has'));
+ }
+ },
+ "the close() method": {
+ topic: function (logger, container) {
+ this.callback.apply(this, arguments);
+ },
+ "should remove the specified logger": function (logger, container) {
+ container.close('default-test');
+ assert.isTrue(!container.loggers['default-test']);
+ }
+ }
+ }
+ },
+ "An instance of winston.Container with explicit transports": {
+ topic: function () {
+ this.port = 9412;
+ this.transports = [
+ new winston.transports.Webhook({
+ port: this.port
+ })
+ ];
+
+ this.container = new winston.Container({
+ transports: this.transports
+ });
+
+ return null;
+ },
+ "the get() method": {
+ topic: function (container) {
+ var server = http.createServer(function (req, res) {
+ res.end();
+ });
+
+ server.listen(this.port, this.callback.bind(this, null));
+ },
+ "should add the logger correctly": function () {
+ this.someLogger = this.container.get('some-logger');
+ assert.isObject(this.someLogger.transports);
+ assert.instanceOf(this.someLogger.transports['webhook'], winston.transports.Webhook);
+ assert.strictEqual(this.someLogger.transports['webhook'], this.transports[0]);
+ },
+ "a second call to get()": {
+ "should respond with the same transport object": function () {
+ this.someOtherLogger = this.container.get('some-other-logger');
+
+ assert.isObject(this.someOtherLogger.transports);
+ assert.instanceOf(this.someOtherLogger.transports['webhook'], winston.transports.Webhook);
+ assert.strictEqual(this.someOtherLogger.transports['webhook'], this.transports[0]);
+ assert.strictEqual(this.someOtherLogger.transports['webhook'], this.someLogger.transports['webhook']);
+ }
+ }
+ }
+ }
+}).export(module);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/custom-timestamp-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/custom-timestamp-test.js
new file mode 100644
index 0000000..efdc40f
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/custom-timestamp-test.js
@@ -0,0 +1,62 @@
+/*
+ * custom-timestamp-test.js: Test function as timestamp option for transport `{ timestamp: function () {} }`
+ *
+ * (C) 2011 Charlie Robbins, Tom Shinnick
+ * MIT LICENSE
+ *
+ */
+
+var assert = require('assert'),
+ events = require('events'),
+ fs = require('fs'),
+ path = require('path'),
+ vows = require('vows'),
+ winston = require('../lib/winston'),
+ helpers = require('./helpers');
+
+function assertTimestamp (basename, options) {
+ var filename = path.join(__dirname, 'fixtures', 'logs', basename + '.log');
+
+ try { fs.unlinkSync(filename) }
+ catch (ex) { }
+
+ return {
+ topic: function () {
+ options.filename = filename;
+ var transport = new (winston.transports.File)(options);
+
+ // We must wait until transport file has emitted the 'flush'
+ // event to be sure the file has been created and written
+ transport.once('flush', this.callback.bind(this, null, filename));
+ transport.log('info', 'When a fake tree falls in the forest...', null, function () {});
+ },
+ "should log with the appropriate timestamp": function (_, filename) {
+ var data = fs.readFileSync(filename, 'utf8');
+ assert.isNotNull(data.match(options.pattern));
+ }
+ }
+}
+
+vows.describe('winston/transport/timestamp').addBatch({
+ "When timestamp option is used": {
+ "with file transport": {
+ "with value set to false": assertTimestamp('noTimestamp', {
+ pattern: /^info\:/,
+ json: false,
+ timestamp: false
+ }),
+ "with value set to true ": assertTimestamp('defaultTimestamp', {
+ pattern: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z/,
+ json: false,
+ timestamp: true
+ }),
+ "and function value": assertTimestamp('customTimestamp', {
+ pattern: /^\d{8}\./,
+ json: false,
+ timestamp: function () {
+ return '20110803.171657';
+ }
+ })
+ }
+ }
+}).export(module);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/exception-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/exception-test.js
new file mode 100644
index 0000000..3c3178e
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/exception-test.js
@@ -0,0 +1,47 @@
+/*
+ * exception-test.js: Tests for exception data gathering in winston.
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var path = require('path'),
+ vows = require('vows'),
+ assert = require('assert'),
+ winston = require('../lib/winston'),
+ helpers = require('./helpers');
+
+vows.describe('winston/exception').addBatch({
+ "When using the winston exception module": {
+ "the getProcessInfo() method": {
+ topic: winston.exception.getProcessInfo(),
+ "should respond with the appropriate data": function (info) {
+ helpers.assertProcessInfo(info);
+ }
+ },
+ "the getOsInfo() method": {
+ topic: winston.exception.getOsInfo(),
+ "should respond with the appropriate data": function (info) {
+ helpers.assertOsInfo(info);
+ }
+ },
+ "the getTrace() method": {
+ topic: winston.exception.getTrace(new Error()),
+ "should have the appropriate info": function (trace) {
+ helpers.assertTrace(trace);
+ }
+ },
+ "the getAllInfo() method": {
+ topic: winston.exception.getAllInfo(new Error()),
+ "should have the appropriate info": function (info) {
+ assert.isObject(info);
+ assert.isArray(info.stack);
+ helpers.assertDateInfo(info.date);
+ helpers.assertProcessInfo(info.process);
+ helpers.assertOsInfo(info.os);
+ helpers.assertTrace(info.trace);
+ }
+ }
+ }
+}).export(module);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/keys/agent2-cert.pem b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/keys/agent2-cert.pem
new file mode 100644
index 0000000..8e4354d
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/keys/agent2-cert.pem
@@ -0,0 +1,13 @@
+-----BEGIN CERTIFICATE-----
+MIIB7DCCAZYCCQC7gs0MDNn6MTANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJV
+UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
+BgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEgMB4GCSqGSIb3DQEJARYR
+cnlAdGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEy
+WjB9MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYD
+VQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEg
+MB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEF
+AANLADBIAkEAyXb8FrRdKbhrKLgLSsn61i1C7w7fVVVd7OQsmV/7p9WB2lWFiDlC
+WKGU9SiIz/A6wNZDUAuc2E+VwtpCT561AQIDAQABMA0GCSqGSIb3DQEBBQUAA0EA
+C8HzpuNhFLCI3A5KkBS5zHAQax6TFUOhbpBCR0aTDbJ6F1liDTK1lmU/BjvPoj+9
+1LHwrmh29rK8kBPEjmymCQ==
+-----END CERTIFICATE-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/keys/agent2-key.pem b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/keys/agent2-key.pem
new file mode 100644
index 0000000..522903c
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/keys/agent2-key.pem
@@ -0,0 +1,9 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIBOgIBAAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf+6fVgdpVhYg5
+QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAQJBAMT6Bf34+UHKY1ObpsbH
+9u2jsVblFq1rWvs8GPMY6oertzvwm3DpuSUp7PTgOB1nLTLYtCERbQ4ovtN8tn3p
+OHUCIQDzIEGsoCr5vlxXvy2zJwu+fxYuhTZWMVuo1397L0VyhwIhANQh+yzqUgaf
+WRtSB4T2W7ADtJI35ET61jKBty3CqJY3AiAIwju7dVW3A5WeD6Qc1SZGKZvp9yCb
+AFI2BfVwwaY11wIgXF3PeGcvACMyMWsuSv7aPXHfliswAbkWuzcwA4TW01ECIGWa
+cgsDvVFxmfM5NPSuT/UDTa6R5BFISB5ea0N0AR3I
+-----END RSA PRIVATE KEY-----
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/default-exceptions.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/default-exceptions.js
new file mode 100644
index 0000000..ab26aa5
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/default-exceptions.js
@@ -0,0 +1,21 @@
+/*
+ * default-exceptions.js: A test fixture for logging exceptions with the default winston logger.
+ *
+ * (C) 2011 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
+var path = require('path'),
+ winston = require('../../../lib/winston');
+
+winston.handleExceptions([
+ new (winston.transports.File)({
+ filename: path.join(__dirname, '..', 'logs', 'default-exception.log'),
+ handleExceptions: true
+ })
+]);
+
+setTimeout(function () {
+ throw new Error('OH NOES! It failed!');
+}, 1000);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/exit-on-error.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/exit-on-error.js
new file mode 100644
index 0000000..fa3dd65
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/exit-on-error.js
@@ -0,0 +1,25 @@
+/*
+ * default-exceptions.js: A test fixture for logging exceptions with the default winston logger.
+ *
+ * (C) 2011 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
+var path = require('path'),
+ winston = require('../../../lib/winston');
+
+winston.exitOnError = function (err) {
+ return err.message !== 'Ignore this error';
+};
+
+winston.handleExceptions([
+ new (winston.transports.File)({
+ filename: path.join(__dirname, '..', 'logs', 'exit-on-error.log'),
+ handleExceptions: true
+ })
+]);
+
+setTimeout(function () {
+ throw new Error('Ignore this error');
+}, 1000);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/log-exceptions.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/log-exceptions.js
new file mode 100644
index 0000000..43ce7eb
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/log-exceptions.js
@@ -0,0 +1,25 @@
+/*
+ * log-exceptions.js: A test fixture for logging exceptions in winston.
+ *
+ * (C) 2011 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
+var path = require('path'),
+ winston = require('../../../lib/winston');
+
+var logger = new (winston.Logger)({
+ transports: [
+ new (winston.transports.File)({
+ filename: path.join(__dirname, '..', 'logs', 'exception.log'),
+ handleExceptions: true
+ })
+ ]
+});
+
+logger.handleExceptions();
+
+setTimeout(function () {
+ throw new Error('OH NOES! It failed!');
+}, 1000);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/unhandle-exceptions.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/unhandle-exceptions.js
new file mode 100644
index 0000000..5d722a7
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/fixtures/scripts/unhandle-exceptions.js
@@ -0,0 +1,26 @@
+/*
+ * unhandle-exceptions.js: A test fixture for using `.unhandleExceptions()` winston.
+ *
+ * (C) 2011 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
+var path = require('path'),
+ winston = require('../../../lib/winston');
+
+var logger = new (winston.Logger)({
+ transports: [
+ new (winston.transports.File)({
+ filename: path.join(__dirname, '..', 'logs', 'unhandle-exception.log'),
+ handleExceptions: true
+ })
+ ]
+});
+
+logger.handleExceptions();
+logger.unhandleExceptions();
+
+setTimeout(function () {
+ throw new Error('OH NOES! It failed!');
+}, 1000);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/helpers.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/helpers.js
new file mode 100644
index 0000000..2564f79
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/helpers.js
@@ -0,0 +1,173 @@
+/*
+ * helpers.js: Test helpers for winston
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var assert = require('assert'),
+ fs = require('fs'),
+ path = require('path'),
+ spawn = require('child_process').spawn,
+ util = require('util'),
+ vows = require('vows'),
+ winston = require('../lib/winston');
+
+var helpers = exports;
+
+helpers.size = function (obj) {
+ var size = 0, key;
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ size++;
+ }
+ }
+
+ return size;
+};
+
+helpers.tryUnlink = function (file) {
+ try { fs.unlinkSync(file) }
+ catch (ex) { }
+};
+
+helpers.assertDateInfo = function (info) {
+ assert.isNumber(Date.parse(info));
+};
+
+helpers.assertProcessInfo = function (info) {
+ assert.isNumber(info.pid);
+ assert.isNumber(info.uid);
+ assert.isNumber(info.gid);
+ assert.isString(info.cwd);
+ assert.isString(info.execPath);
+ assert.isString(info.version);
+ assert.isArray(info.argv);
+ assert.isObject(info.memoryUsage);
+};
+
+helpers.assertOsInfo = function (info) {
+ assert.isArray(info.loadavg);
+ assert.isNumber(info.uptime);
+};
+
+helpers.assertTrace = function (trace) {
+ trace.forEach(function (site) {
+ assert.isTrue(!site.column || typeof site.column === 'number');
+ assert.isTrue(!site.line || typeof site.line === 'number');
+ assert.isTrue(!site.file || typeof site.file === 'string');
+ assert.isTrue(!site.method || typeof site.method === 'string');
+ assert.isTrue(!site.function || typeof site.function === 'string');
+ assert.isTrue(typeof site.native === 'boolean');
+ });
+};
+
+helpers.assertLogger = function (logger, level) {
+ assert.instanceOf(logger, winston.Logger);
+ assert.isFunction(logger.log);
+ assert.isFunction(logger.add);
+ assert.isFunction(logger.remove);
+ assert.equal(logger.level, level || "info");
+ Object.keys(logger.levels).forEach(function (method) {
+ assert.isFunction(logger[method]);
+ });
+};
+
+helpers.assertConsole = function (transport) {
+ assert.instanceOf(transport, winston.transports.Console);
+ assert.isFunction(transport.log);
+};
+
+helpers.assertFile = function (transport) {
+ assert.instanceOf(transport, winston.transports.File);
+ assert.isFunction(transport.log);
+}
+
+helpers.assertWebhook = function (transport) {
+ assert.instanceOf(transport, winston.transports.Webhook);
+ assert.isFunction(transport.log);
+};
+
+helpers.assertCouchdb = function (transport) {
+ assert.instanceOf(transport, winston.transports.Couchdb);
+ assert.isFunction(transport.log);
+};
+
+helpers.assertHandleExceptions = function (options) {
+ return {
+ topic: function () {
+ var that = this,
+ child = spawn('node', [options.script]);
+
+ helpers.tryUnlink(options.logfile);
+ child.on('exit', function () {
+ fs.readFile(options.logfile, that.callback);
+ });
+ },
+ "should save the error information to the specified file": function (err, data) {
+ assert.isTrue(!err);
+ data = JSON.parse(data);
+
+ assert.isObject(data);
+ helpers.assertProcessInfo(data.process);
+ helpers.assertOsInfo(data.os);
+ helpers.assertTrace(data.trace);
+ }
+ }
+}
+
+helpers.testNpmLevels = function (transport, assertMsg, assertFn) {
+ return helpers.testLevels(winston.config.npm.levels, transport, assertMsg, assertFn);
+};
+
+helpers.testSyslogLevels = function (transport, assertMsg, assertFn) {
+ return helpers.testLevels(winston.config.syslog.levels, transport, assertMsg, assertFn);
+};
+
+helpers.testLevels = function (levels, transport, assertMsg, assertFn) {
+ var tests = {};
+
+ Object.keys(levels).forEach(function (level) {
+ var test = {
+ topic: function () {
+ transport.log(level, 'test message', {}, this.callback.bind(this, null));
+ }
+ };
+
+ test[assertMsg] = assertFn;
+ tests['with the ' + level + ' level'] = test;
+ });
+
+ var metadatatest = {
+ topic: function () {
+ transport.log('info', 'test message', { metadata: true }, this.callback.bind(this, null));
+ }
+ };
+
+ metadatatest[assertMsg] = assertFn;
+ tests['when passed metadata'] = metadatatest;
+
+ var primmetadatatest = {
+ topic: function () {
+ transport.log('info', 'test message', 'metadata', this.callback.bind(this, null));
+ }
+ };
+
+ primmetadatatest[assertMsg] = assertFn;
+ tests['when passed primitive metadata'] = primmetadatatest;
+
+ var circmetadata = { };
+ circmetadata['metadata'] = circmetadata;
+
+ var circmetadatatest = {
+ topic: function () {
+ transport.log('info', 'test message', circmetadata, this.callback.bind(this, null));
+ }
+ };
+
+ circmetadatatest[assertMsg] = assertFn;
+ tests['when passed circular metadata'] = circmetadatatest;
+
+ return tests;
+};
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/log-exception-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/log-exception-test.js
new file mode 100644
index 0000000..164dcdf
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/log-exception-test.js
@@ -0,0 +1,60 @@
+/*
+ * exception-test.js: Tests for exception data gathering in winston.
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var assert = require('assert'),
+ path = require('path'),
+ fs = require('fs'),
+ spawn = require('child_process').spawn,
+ vows = require('vows'),
+ winston = require('../lib/winston'),
+ helpers = require('./helpers'),
+ exists = (fs.exists || path.exists);
+
+vows.describe('winston/logger/exceptions').addBatch({
+ "When using winston": {
+ "the handleException() method": {
+ "with a custom winston.Logger instance": helpers.assertHandleExceptions({
+ script: path.join(__dirname, 'fixtures', 'scripts', 'log-exceptions.js'),
+ logfile: path.join(__dirname, 'fixtures', 'logs', 'exception.log')
+ }),
+ "with the default winston logger": helpers.assertHandleExceptions({
+ script: path.join(__dirname, 'fixtures', 'scripts', 'default-exceptions.js'),
+ logfile: path.join(__dirname, 'fixtures', 'logs', 'default-exception.log')
+ }),
+ "when a custom exitOnError function is set": {
+ topic: function () {
+ var that = this,
+ scriptDir = path.join(__dirname, 'fixtures', 'scripts');
+
+ that.child = spawn('node', [path.join(scriptDir, 'exit-on-error.js')]);
+ setTimeout(this.callback.bind(this), 1500);
+ },
+ "should not exit the process": function () {
+ assert.isFalse(this.child.killed);
+ this.child.kill();
+ }
+ }
+ },
+ "the unhandleException() method": {
+ topic: function () {
+ var that = this,
+ child = spawn('node', [path.join(__dirname, 'fixtures', 'scripts', 'unhandle-exceptions.js')]),
+ exception = path.join(__dirname, 'fixtures', 'logs', 'unhandle-exception.log');
+
+ helpers.tryUnlink(exception);
+ child.on('exit', function () {
+ exists(exception, that.callback.bind(this, null));
+ });
+ },
+ "should not write to the specified error file": function (err, exists) {
+ assert.isTrue(!err);
+ assert.isFalse(exists);
+ }
+ }
+ }
+}).export(module);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/log-rewriter-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/log-rewriter-test.js
new file mode 100644
index 0000000..f1deeba
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/log-rewriter-test.js
@@ -0,0 +1,98 @@
+/*
+ * log-rewriter-test.js: Tests for rewriting metadata in winston.
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var assert = require('assert'),
+ vows = require('vows'),
+ winston = require('../lib/winston'),
+ helpers = require('./helpers');
+
+vows.describe('winston/logger/rewriter').addBatch({
+ "An instance of winston.Logger": {
+ topic: new (winston.Logger)({transports: [
+ new (winston.transports.Console)({ level: 'info' })
+ ]}),
+ "the addRewriter() method": {
+ topic: function (logger) {
+ logger.addRewriter(function (level, msg, meta) {
+ meta.level = level;
+ meta.msg = msg;
+ meta.foo = 'bar';
+ return meta;
+ });
+ return logger;
+ },
+ "should add the rewriter": function (logger) {
+ assert.equal(helpers.size(logger.rewriters), 1);
+ },
+ "the log() method": {
+ topic: function (logger) {
+ logger.once('logging', this.callback);
+ logger.log('info', 'test message', {"a": "b"});
+ },
+ "should run the rewriter": function (transport, level, msg, meta) {
+ assert.equal(meta.a, 'b');
+ assert.equal(meta.level, 'info');
+ assert.equal(meta.msg, 'test message');
+ assert.equal(meta.foo, 'bar');
+ }
+ }
+ }
+ }
+}).addBatch({
+ "An instance of winston.Logger with explicit rewriter": {
+ topic: new (winston.Logger)({transports: [
+ new (winston.transports.Console)({ level: 'info'})
+ ], rewriters: [
+ function (level, msg, meta) {
+ meta.level = level;
+ meta.msg = msg;
+ meta.foo = 'bar';
+ return meta;
+ }
+ ]}),
+ "should add the rewriter": function (logger) {
+ assert.equal(helpers.size(logger.rewriters), 1);
+ },
+ "the log() method": {
+ topic: function (logger) {
+ logger.once('logging', this.callback);
+ logger.log('info', 'test message', {"a": "b"});
+ },
+ "should run the rewriter": function (transport, level, msg, meta) {
+ assert.equal(meta.a, 'b');
+ assert.equal(meta.level, 'info');
+ assert.equal(meta.msg, 'test message');
+ assert.equal(meta.foo, 'bar');
+ }
+ }
+ }
+}).addBatch({
+ "An instance of winston.Logger with rewriters": {
+ topic: new (winston.Logger)({transports: [
+ new (winston.transports.Console)({ level: 'info' })
+ ], rewriters: [
+ function (level, msg, meta) {
+ meta.numbers.push(1);
+ return meta;
+ },
+ function (level, msg, meta) {
+ meta.numbers.push(2);
+ return meta;
+ }
+ ]}),
+ "the log() method": {
+ topic: function (logger) {
+ logger.once('logging', this.callback);
+ logger.log('info', 'test message', {"numbers": [0]});
+ },
+ "should run the rewriters in correct order": function (transport, level, msg, meta) {
+ assert.deepEqual(meta.numbers, [0, 1, 2]);
+ }
+ }
+ }
+}).export(module);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/logger-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/logger-test.js
new file mode 100644
index 0000000..0074f20
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/logger-test.js
@@ -0,0 +1,200 @@
+/*
+ * logger-test.js: Tests for instances of the winston Logger
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var path = require('path'),
+ vows = require('vows'),
+ assert = require('assert'),
+ winston = require('../lib/winston'),
+ helpers = require('./helpers'),
+ transport = require('./transports/transport');
+
+vows.describe('winton/logger').addBatch({
+ "An instance of winston.Logger": {
+ topic: new (winston.Logger)({ transports: [new (winston.transports.Console)({ level: 'info' })] }),
+ "should have the correct methods / properties defined": function (logger) {
+ helpers.assertLogger(logger);
+ },
+ "the add() with an unsupported transport": {
+ "should throw an error": function () {
+ assert.throws(function () { logger.add('unsupported') }, Error);
+ }
+ }
+ }
+}).addBatch({
+ "An instance of winston.Logger with no transports": {
+ topic: new (winston.Logger)({ emitErrs: true }),
+ "the log() method should throw an error": function (logger) {
+ assert.throws(function () { logger.log('anything') }, Error);
+ },
+ "the extend() method called on an empty object": {
+ topic: function (logger) {
+ var empty = {};
+ logger.extend(empty);
+ return empty;
+ },
+ "should define the appropriate methods": function (extended) {
+ ['log', 'profile', 'startTimer'].concat(Object.keys(winston.config.npm.levels)).forEach(function (method) {
+ assert.isFunction(extended[method]);
+ });
+ }
+ },
+ "the add() method with a supported transport": {
+ topic: function (logger) {
+ return logger.add(winston.transports.Console);
+ },
+ "should add the console Transport onto transports": function (logger) {
+ assert.equal(helpers.size(logger.transports), 1);
+ helpers.assertConsole(logger.transports.console);
+ },
+ "should throw an error when the same Transport is added": function (logger) {
+ assert.throws(function () { logger.add(winston.transports.Console) }, Error);
+ },
+ "the log() method": {
+ topic: function (logger) {
+ logger.once('logging', this.callback);
+ logger.log('info', 'test message');
+ },
+ "should emit the 'log' event with the appropriate transport": function (transport, ign) {
+ helpers.assertConsole(transport);
+ }
+ },
+ "the profile() method": {
+ "when passed a callback": {
+ topic: function (logger) {
+ var that = this;
+ logger.profile('test1');
+ setTimeout(function () {
+ logger.profile('test1', function (err, level, msg, meta) {
+ that.callback(err, level, msg, meta, logger);
+ });
+ }, 1000);
+ },
+ "should respond with the appropriate profile message": function (err, level, msg, meta, logger) {
+ assert.isNull(err);
+ assert.equal(level, 'info');
+ assert.match(meta.duration, /(\d+)ms/);
+ assert.isTrue(typeof logger.profilers['test'] === 'undefined');
+ }
+ },
+ "when not passed a callback": {
+ topic: function (logger) {
+ var that = this;
+ logger.profile('test2');
+ logger.once('logging', that.callback.bind(null, null));
+ setTimeout(function () {
+ logger.profile('test2');
+ }, 1000);
+ },
+ "should respond with the appropriate profile message": function (err, transport, level, msg, meta) {
+ assert.isNull(err);
+ assert.equal(level, 'info');
+ assert.match(meta.duration, /(\d+)ms/);
+ }
+ }
+ },
+ "the startTimer() method": {
+ "when passed a callback": {
+ topic: function (logger) {
+ var that = this;
+ var timer = logger.startTimer()
+ setTimeout(function () {
+ timer.done('test', function (err, level, msg, meta) {
+ that.callback(err, level, msg, meta, logger);
+ });
+ }, 1000);
+ },
+ "should respond with the appropriate message": function (err, level, msg, meta, logger) {
+ assert.isNull(err);
+ assert.equal(level, 'info');
+ assert.match(meta.duration, /(\d+)ms/);
+ }
+ },
+ "when not passed a callback": {
+ topic: function (logger) {
+ var that = this;
+ var timer = logger.startTimer()
+ logger.once('logging', that.callback.bind(null, null));
+ setTimeout(function () {
+ timer.done();
+ }, 1000);
+ },
+ "should respond with the appropriate message": function (err, transport, level, msg, meta) {
+ assert.isNull(err);
+ assert.equal(level, 'info');
+ assert.match(meta.duration, /(\d+)ms/);
+
+ var duration = parseInt(meta.duration);
+ assert.isNumber(duration);
+ assert.isTrue(duration > 900 && duration < 1100);
+ }
+ }
+ },
+ "and adding an additional transport": {
+ topic: function (logger) {
+ return logger.add(winston.transports.File, {
+ filename: path.join(__dirname, 'fixtures', 'logs', 'testfile2.log')
+ });
+ },
+ "should be able to add multiple transports": function (logger) {
+ assert.equal(helpers.size(logger.transports), 2);
+ helpers.assertConsole(logger.transports.console);
+ helpers.assertFile(logger.transports.file);
+ }
+ }
+ }
+ }
+}).addBatch({
+ "The winston logger": {
+ topic: new (winston.Logger)({
+ transports: [
+ new (winston.transports.Console)(),
+ new (winston.transports.File)({ filename: path.join(__dirname, 'fixtures', 'logs', 'filelog.log' )})
+ ]
+ }),
+ "should return have two transports": function (logger) {
+ assert.equal(helpers.size(logger.transports), 2);
+ },
+ "the remove() with an unadded transport": {
+ "should throw an Error": function (logger) {
+ assert.throws(function () { logger.remove(winston.transports.Webhook) }, Error);
+ }
+ },
+ "the remove() method with an added transport": {
+ topic: function (logger) {
+ return logger.remove(winston.transports.Console);
+ },
+ "should remove the Console transport from transports": function (logger) {
+ assert.equal(helpers.size(logger.transports), 1);
+ helpers.assertFile(logger.transports.file);
+ },
+ "and removing an additional transport": {
+ topic: function (logger) {
+ return logger.remove(winston.transports.File);
+ },
+ "should remove File transport from transports": function (logger) {
+ assert.equal(helpers.size(logger.transports), 0);
+ }
+ }
+ }
+ }
+}).addBatch({
+ "The winston logger": {
+ topic: new (winston.Logger)({
+ transports: [
+ new (winston.transports.Console)(),
+ new (winston.transports.File)({ filename: path.join(__dirname, 'fixtures', 'logs', 'filelog.log' )})
+ ]
+ }),
+ "the clear() method": {
+ "should remove all transports": function (logger) {
+ logger.clear();
+ assert.equal(helpers.size(logger.transports), 0);
+ }
+ }
+ }
+}).export(module);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/console-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/console-test.js
new file mode 100644
index 0000000..07f5a6e
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/console-test.js
@@ -0,0 +1,39 @@
+/*
+ * console-test.js: Tests for instances of the Console transport
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var path = require('path'),
+ vows = require('vows'),
+ assert = require('assert'),
+ winston = require('../../lib/winston'),
+ helpers = require('../helpers');
+
+var npmTransport = new (winston.transports.Console)(),
+ syslogTransport = new (winston.transports.Console)({ levels: winston.config.syslog.levels });
+
+vows.describe('winston/transports/console').addBatch({
+ "An instance of the Console Transport": {
+ "with npm levels": {
+ "should have the proper methods defined": function () {
+ helpers.assertConsole(npmTransport);
+ },
+ "the log() method": helpers.testNpmLevels(npmTransport, "should respond with true", function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isTrue(logged);
+ })
+ },
+ "with syslog levels": {
+ "should have the proper methods defined": function () {
+ helpers.assertConsole(syslogTransport);
+ },
+ "the log() method": helpers.testSyslogLevels(syslogTransport, "should respond with true", function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isTrue(logged);
+ })
+ }
+ }
+}).export(module);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/file-maxfiles-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/file-maxfiles-test.js
new file mode 100644
index 0000000..a9fa89e
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/file-maxfiles-test.js
@@ -0,0 +1,102 @@
+/*
+ * file-maxfiles-test.js: Tests for instances of the File transport setting the max file size,
+ * and setting a number for max files created.
+ * maxSize * maxFiles = total storage used by winston.
+ *
+ * (C) 2011 Daniel Aristizabal
+ * MIT LICENSE
+ *
+ */
+
+var assert = require('assert'),
+ exec = require('child_process').exec,
+ fs = require('fs'),
+ path = require('path'),
+ vows = require('vows'),
+ winston = require('../../lib/winston'),
+ helpers = require('../helpers');
+
+var maxfilesTransport = new winston.transports.File({
+ timestamp: false,
+ json: false,
+ filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testmaxfiles.log'),
+ maxsize: 4096,
+ maxFiles: 3
+});
+
+vows.describe('winston/transports/file/maxfiles').addBatch({
+ "An instance of the File Transport": {
+ "when passed a valid filename": {
+ topic: maxfilesTransport,
+ "should be a valid transporter": function (transportTest) {
+ helpers.assertFile(transportTest);
+ },
+ "should set the maxFiles option correctly": function (transportTest) {
+ assert.isNumber(transportTest.maxFiles);
+ }
+ },
+ "when delete old test files": {
+ topic: function () {
+ exec('rm -rf ' + path.join(__dirname, '..', 'fixtures', 'logs', 'testmaxfiles*'), this.callback);
+ },
+ "and when passed more files than the maxFiles": {
+ topic: function () {
+ var that = this,
+ created = 0;
+
+ function data(ch) {
+ return new Array(1018).join(String.fromCharCode(65 + ch));
+ };
+
+ function logKbytes(kbytes, txt) {
+ //
+ // With no timestamp and at the info level,
+ // winston adds exactly 7 characters:
+ // [info](4)[ :](2)[\n](1)
+ //
+ for (var i = 0; i < kbytes; i++) {
+ maxfilesTransport.log('info', data(txt), null, function () { });
+ }
+ }
+
+ maxfilesTransport.on('logged', function () {
+ if (++created === 6) {
+ return that.callback();
+ }
+
+ logKbytes(4, created);
+ });
+
+ logKbytes(4, created);
+ },
+ "should be only 3 files called 5.log, 4.log and 3.log": function () {
+ for (var num = 0; num < 6; num++) {
+ var file = !num ? 'testmaxfiles.log' : 'testmaxfiles' + num + '.log',
+ fullpath = path.join(__dirname, '..', 'fixtures', 'logs', file);
+
+ // There should be no files with that name
+ if (num >= 0 && num < 3) {
+ return assert.throws(function () {
+ fs.statSync(file);
+ }, Error);
+ }
+
+ // The other files should be exist
+ assert.doesNotThrow(function () {
+ fs.statSync(file);
+ }, Error);
+ }
+ },
+ "should have the correct content": function () {
+ ['D', 'E', 'F'].forEach(function (name, inx) {
+ var counter = inx + 3,
+ logsDir = path.join(__dirname, '..', 'fixtures', 'logs'),
+ content = fs.readFileSync(path.join(logsDir, 'testmaxfiles' + counter + '.log'), 'utf-8');
+ // The content minus the 7 characters added by winston
+ assert.lengthOf(content.match(new RegExp(name, 'g')), 4068);
+ });
+ }
+ }
+ }
+ }
+}).export(module);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/file-maxsize-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/file-maxsize-test.js
new file mode 100644
index 0000000..7d20e08
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/file-maxsize-test.js
@@ -0,0 +1,82 @@
+/*
+ * file-test.js: Tests for instances of the File transport
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var assert = require('assert'),
+ exec = require('child_process').exec,
+ fs = require('fs'),
+ path = require('path'),
+ vows = require('vows'),
+ winston = require('../../lib/winston'),
+ helpers = require('../helpers');
+
+var maxsizeTransport = new winston.transports.File({
+ timestamp: false,
+ json: false,
+ filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testmaxsize.log'),
+ maxsize: 4096
+});
+
+vows.describe('winston/transports/file/maxsize').addBatch({
+ "An instance of the File Transport": {
+ "when passed a valid filename": {
+ "the log() method": {
+ topic: function () {
+ exec('rm -rf ' + path.join(__dirname, '..', 'fixtures', 'logs', 'testmaxsize*'), this.callback);
+ },
+ "when passed more than the maxsize": {
+ topic: function () {
+ var that = this,
+ data = new Array(1018).join('-');
+
+ //
+ // Setup a list of files which we will later stat.
+ //
+ that.files = [];
+
+ function logKbytes (kbytes) {
+ //
+ // With no timestamp and at the info level,
+ // winston adds exactly 7 characters:
+ // [info](4)[ :](2)[\n](1)
+ //
+ for (var i = 0; i < kbytes; i++) {
+ maxsizeTransport.log('info', data, null, function () { });
+ }
+ }
+
+ maxsizeTransport.on('open', function (file) {
+ var match = file.match(/(\d+)\.log$/),
+ count = match ? match[1] : 0;
+
+ that.files.push(file);
+
+ if (that.files.length === 5) {
+ return that.callback();
+ }
+
+ logKbytes(4);
+ });
+
+ logKbytes(4);
+ },
+ "should create multiple files correctly": function () {
+ this.files.forEach(function (file) {
+ try {
+ var stats = fs.statSync(file);
+ assert.equal(stats.size, 4096);
+ }
+ catch (ex) {
+ assert.isNull(ex);
+ }
+ });
+ }
+ }
+ }
+ }
+ }
+}).export(module);
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/file-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/file-test.js
new file mode 100644
index 0000000..2039b03
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/file-test.js
@@ -0,0 +1,60 @@
+/*
+ * file-test.js: Tests for instances of the File transport
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var path = require('path'),
+ vows = require('vows'),
+ fs = require('fs'),
+ assert = require('assert'),
+ winston = require('../../lib/winston'),
+ helpers = require('../helpers');
+
+var transport = require('./transport');
+
+var stream = fs.createWriteStream(
+ path.join(__dirname, '..', 'fixtures', 'logs', 'testfile.log')
+ ),
+ fileTransport = new (winston.transports.File)({
+ filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testfilename.log')
+ }),
+ streamTransport = new (winston.transports.File)({ stream: stream });
+
+vows.describe('winston/transports/file').addBatch({
+ "An instance of the File Transport": {
+ "when passed a valid filename": {
+ "should have the proper methods defined": function () {
+ helpers.assertFile(fileTransport);
+ },
+ "the log() method": helpers.testNpmLevels(fileTransport, "should respond with true", function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isTrue(logged);
+ })
+ },
+ "when passed a valid file stream": {
+ "should have the proper methods defined": function () {
+ helpers.assertFile(streamTransport);
+ },
+ "the log() method": helpers.testNpmLevels(streamTransport, "should respond with true", function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isTrue(logged);
+ })
+ }
+ }
+}).addBatch({
+ "These tests have a non-deterministic end": {
+ topic: function () {
+ setTimeout(this.callback, 200);
+ },
+ "and this should be fixed before releasing": function () {
+ assert.isTrue(true);
+ }
+ }
+}).addBatch({
+ "An instance of the File Transport": transport(winston.transports.File, {
+ filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testfile.log')
+ })
+}).export(module);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/transport.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/transport.js
new file mode 100644
index 0000000..89b1eab
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/transport.js
@@ -0,0 +1,212 @@
+var assert = require('assert'),
+ winston = require('../../lib/winston'),
+ helpers = require('../helpers');
+
+module.exports = function (transport, options) {
+ var logger = transport instanceof winston.Logger
+ ? transport
+ : new winston.Logger({
+ transports: [
+ new transport(options)
+ ]
+ });
+
+ // hack to fix transports that don't log
+ // any unit of time smaller than seconds
+ var common = require('../../lib/winston/common');
+ common.timestamp = function() {
+ return new Date().toISOString();
+ };
+
+ var transport = logger.transports[logger._names[0]];
+
+ var out = {
+ 'topic': logger,
+ 'when passed valid options': {
+ 'should have the proper methods defined': function () {
+ switch (transport.name) {
+ case 'console':
+ helpers.assertConsole(transport);
+ break;
+ case 'file':
+ helpers.assertFile(transport);
+ break;
+ case 'webhook':
+ helpers.assertWebhook(transport);
+ break;
+ case 'couchdb':
+ helpers.assertCouchdb(transport);
+ break;
+ }
+ assert.isFunction(transport.log);
+ }
+ },
+ 'the log() method': helpers.testNpmLevels(transport,
+ 'should respond with true', function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isNotNull(logged);
+ }
+ ),
+ 'the stream() method': {
+ 'using no options': {
+ 'topic': function () {
+ if (!transport.stream) return;
+
+ logger.log('info', 'hello world', {});
+
+ var cb = this.callback,
+ j = 10,
+ i = 10,
+ results = [],
+ stream = logger.stream();
+
+ stream.on('log', function (log) {
+ results.push(log);
+ results.stream = stream;
+ if (!--j) cb(null, results);
+ });
+
+ stream.on('error', function () {});
+
+ while (i--) logger.log('info', 'hello world ' + i, {});
+ },
+ 'should stream logs': function (err, results) {
+ if (!transport.stream) return;
+ assert.isNull(err);
+ results.forEach(function (log) {
+ assert.ok(log.message.indexOf('hello world') === 0
+ || log.message.indexOf('test message') === 0);
+ });
+ results.stream.destroy();
+ }
+ },
+ 'using the `start` option': {
+ 'topic': function () {
+ if (!transport.stream) return;
+
+ var cb = this.callback,
+ stream = logger.stream({ start: 0 });
+
+ stream.on('log', function (log) {
+ log.stream = stream;
+ if (cb) cb(null, log);
+ cb = null;
+ });
+ },
+ 'should stream logs': function (err, log) {
+ if (!transport.stream) return;
+ assert.isNull(err);
+ assert.isNotNull(log.message);
+ log.stream.destroy();
+ }
+ }
+ },
+ 'after the logs have flushed': {
+ topic: function () {
+ setTimeout(this.callback, 1000);
+ },
+ 'the query() method': {
+ 'using basic querying': {
+ 'topic': function () {
+ if (!transport.query) return;
+ var cb = this.callback;
+ logger.log('info', 'hello world', {}, function () {
+ logger.query(cb);
+ });
+ },
+ 'should return matching results': function (err, results) {
+ if (!transport.query) return;
+ assert.isNull(err);
+ results = results[transport.name];
+ while (!Array.isArray(results)) {
+ results = results[Object.keys(results).pop()];
+ }
+ var log = results.pop();
+ assert.ok(log.message.indexOf('hello world') === 0
+ || log.message.indexOf('test message') === 0);
+ }
+ },
+ 'using the `rows` option': {
+ 'topic': function () {
+ if (!transport.query) return;
+ var cb = this.callback;
+ logger.log('info', 'hello world', {}, function () {
+ logger.query({ rows: 1 }, cb);
+ });
+ },
+ 'should return one result': function (err, results) {
+ if (!transport.query) return;
+ assert.isNull(err);
+ results = results[transport.name];
+ while (!Array.isArray(results)) {
+ results = results[Object.keys(results).pop()];
+ }
+ assert.equal(results.length, 1);
+ }
+ },
+ 'using `fields` and `order` option': {
+ 'topic': function () {
+ if (!transport.query) return;
+ var cb = this.callback;
+ logger.log('info', 'hello world', {}, function () {
+ logger.query({ order: 'asc', fields: ['timestamp'] }, cb);
+ });
+ },
+ 'should return matching results': function (err, results) {
+ if (!transport.query) return;
+ assert.isNull(err);
+ results = results[transport.name];
+ while (!Array.isArray(results)) {
+ results = results[Object.keys(results).pop()];
+ }
+ assert.equal(Object.keys(results[0]).length, 1);
+ assert.ok(new Date(results.shift().timestamp)
+ < new Date(results.pop().timestamp));
+ }
+ },
+ 'using the `from` and `until` option': {
+ 'topic': function () {
+ if (!transport.query) return;
+ var cb = this.callback;
+ var start = new Date - 100 * 1000;
+ var end = new Date + 100 * 1000;
+ logger.query({ from: start, until: end }, cb);
+ },
+ 'should return matching results': function (err, results) {
+ if (!transport.query) return;
+ assert.isNull(err);
+ results = results[transport.name];
+ while (!Array.isArray(results)) {
+ results = results[Object.keys(results).pop()];
+ }
+ assert.ok(results.length >= 1);
+ }
+ },
+ 'using a bad `from` and `until` option': {
+ 'topic': function () {
+ if (!transport.query) return;
+ var cb = this.callback;
+ logger.log('info', 'bad from and until', {}, function () {
+ var now = new Date + 1000000;
+ logger.query({ from: now, until: now }, cb);
+ });
+ },
+ 'should return no results': function (err, results) {
+ if (!transport.query) return;
+ assert.isNull(err);
+ results = results[transport.name];
+ while (!Array.isArray(results)) {
+ results = results[Object.keys(results).pop()];
+ }
+ results = [results.filter(function(log) {
+ return log.message === 'bad from and until';
+ }).pop()];
+ assert.isUndefined(results[0]);
+ }
+ }
+ }
+ }
+ };
+
+ return out;
+};
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/webhook-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/webhook-test.js
new file mode 100644
index 0000000..8d40c00
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/transports/webhook-test.js
@@ -0,0 +1,125 @@
+/*
+ * webhook-test.js: Tests for instances of the Webhook transport
+ *
+ * (C) 2011 Marak Squires
+ * MIT LICENSE
+ *
+ */
+
+var path = require('path'),
+ vows = require('vows'),
+ fs = require('fs'),
+ http = require('http'),
+ https = require('https'),
+ assert = require('assert'),
+ winston = require('../../lib/winston'),
+ helpers = require('../helpers');
+
+var webhookTransport = new (winston.transports.Webhook)({
+ "host": "localhost",
+ "port": 8080,
+ "path": "/winston-test"
+});
+
+var httpsWebhookTransport = new (winston.transports.Webhook)({
+ "host": "localhost",
+ "port": 8081,
+ "path": "/winston-test",
+ "ssl": true
+});
+
+var authWebhookTransport = new (winston.transports.Webhook)({
+ "host": "localhost",
+ "port": 8080,
+ "path": "/winston-auth-test",
+ "auth": {
+ "username": "winston",
+ "password": "churchill"
+ }
+});
+
+var requestsAuthenticated = true;
+
+var server = http.createServer(function (req, res) {
+ if (req.url == '/winston-auth-test') {
+ //
+ // Test if request has been correctly authenticated
+ //
+ // Strip 'Basic' from Authorization header
+ var signature = req.headers['authorization'].substr(6);
+ requestsAuthenticated = requestsAuthenticated &&
+ new Buffer(signature, 'base64').toString('utf8') == 'winston:churchill';
+ }
+ res.end();
+});
+
+server.listen(8080);
+
+
+var httpsServer = https.createServer({
+ cert: fs.readFileSync(path.join(__dirname, '..', 'fixtures', 'keys', 'agent2-cert.pem')),
+ key: fs.readFileSync(path.join(__dirname, '..', 'fixtures', 'keys', 'agent2-key.pem'))
+}, function (req, res) {
+ res.end();
+});
+
+httpsServer.listen(8081);
+
+vows.describe('winston/transports/webhook').addBatch({
+ "An instance of the Webhook Transport": {
+ "when passed valid options": {
+ "should have the proper methods defined": function () {
+ helpers.assertWebhook(webhookTransport);
+ },
+ "the log() method": helpers.testNpmLevels(webhookTransport, "should respond with true", function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isTrue(logged);
+ })
+ }
+ },
+ "An https instance of the Webhook Transport": {
+ "when passed valid options": {
+ "should have the proper methods defined": function () {
+ helpers.assertWebhook(httpsWebhookTransport);
+ },
+ "the log() method": helpers.testNpmLevels(httpsWebhookTransport, "should respond with true", function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isTrue(logged);
+ })
+ }
+ },
+ "An http Basic Auth instance of the Webhook Transport": {
+ "when passed valid options": {
+ "should have the proper methods defined": function () {
+ helpers.assertWebhook(authWebhookTransport);
+ },
+ "the log() method": helpers.testNpmLevels(authWebhookTransport, "should respond with true", function (ign, err, logged) {
+ assert.isNull(err);
+ assert.isTrue(logged);
+ })
+ }
+ }
+}).addBatch({
+ "When the tests are over": {
+ topic: function () {
+ //
+ // Delay destruction of the server since the
+ // WebHook transport responds before the request
+ // has actually be completed.
+ //
+ setTimeout(this.callback, 1000);
+ },
+ "the server should cleanup": function () {
+ server.close();
+ },
+ "requests have been correctly authenticated": function () {
+ assert.ok(requestsAuthenticated);
+ }
+ }
+}).addBatch({
+ // "An instance of the Webhook Transport": transport(winston.transports.Webhook, {
+ // "host": "localhost",
+ // "port": 8080,
+ // "path": "/winston-test"
+ // })
+}).export(module);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/winston-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/winston-test.js
new file mode 100644
index 0000000..7105329
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/node_modules/winston/test/winston-test.js
@@ -0,0 +1,98 @@
+/*
+ * logger-test.js: Tests for instances of the winston Logger
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENSE
+ *
+ */
+
+var fs = require('fs'),
+ path = require('path'),
+ vows = require('vows'),
+ http = require('http'),
+ assert = require('assert'),
+ winston = require('../lib/winston'),
+ helpers = require('./helpers');
+
+vows.describe('winston').addBatch({
+ "The winston module": {
+ topic: function () {
+ winston.default.transports.console.level = 'silly';
+ return null;
+ },
+ "should have the correct methods defined": function () {
+ assert.isObject(winston.transports);
+ assert.isFunction(winston.Transport);
+ assert.isTrue(!winston.transports.Transport);
+ assert.isFunction(winston.transports.Console);
+ assert.isFunction(winston.transports.File);
+ assert.isFunction(winston.transports.Webhook);
+ assert.isObject(winston.default.transports.console);
+ assert.isFalse(winston.emitErrs);
+ assert.isObject(winston.config);
+ ['Logger', 'add', 'remove', 'extend']
+ .concat(Object.keys(winston.config.npm.levels))
+ .forEach(function (key) {
+ assert.isFunction(winston[key]);
+ });
+ },
+ "it should": {
+ topic: function () {
+ fs.readFile(path.join(__dirname, '..', 'package.json'), this.callback);
+ },
+ "have the correct version set": function (err, data) {
+ assert.isNull(err);
+ data = JSON.parse(data.toString());
+ assert.equal(winston.version, data.version);
+ }
+ },
+ "the log() method": helpers.testNpmLevels(winston, "should respond without an error", function (err) {
+ assert.isNull(err);
+ }),
+ "the extend() method called on an empty object": {
+ topic: function (logger) {
+ var empty = {};
+ winston.extend(empty);
+ return empty;
+ },
+ "should define the appropriate methods": function (extended) {
+ ['log', 'profile', 'startTimer'].concat(Object.keys(winston.config.npm.levels)).forEach(function (method) {
+ assert.isFunction(extended[method]);
+ });
+ }
+ }
+ }
+}).addBatch({
+ "The winston module": {
+ "the setLevels() method": {
+ topic: function () {
+ winston.setLevels(winston.config.syslog.levels);
+ return null;
+ },
+ "should have the proper methods defined": function () {
+ assert.isObject(winston.transports);
+ assert.isFunction(winston.transports.Console);
+ assert.isFunction(winston.transports.Webhook);
+ assert.isObject(winston.default.transports.console);
+ assert.isFalse(winston.emitErrs);
+ assert.isObject(winston.config);
+
+ var newLevels = Object.keys(winston.config.syslog.levels);
+ ['Logger', 'add', 'remove', 'extend']
+ .concat(newLevels)
+ .forEach(function (key) {
+ assert.isFunction(winston[key]);
+ });
+
+
+ Object.keys(winston.config.npm.levels)
+ .filter(function (key) {
+ return newLevels.indexOf(key) === -1;
+ })
+ .forEach(function (key) {
+ assert.isTrue(typeof winston[key] === 'undefined');
+ });
+ }
+ }
+ }
+}).export(module);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/package.json
new file mode 100644
index 0000000..347c86a
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "prompt",
+ "description": "A beautiful command-line prompt for node.js",
+ "version": "0.2.11",
+ "author": {
+ "name": "Nodejitsu Inc.",
+ "email": "info@nodejitsu.com"
+ },
+ "maintainers": [
+ {
+ "name": "indexzero",
+ "email": "charlie@nodejitsu.com"
+ },
+ {
+ "name": "jesusabdullah",
+ "email": "josh@nodejitsu.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/flatiron/prompt.git"
+ },
+ "dependencies": {
+ "pkginfo": "0.x.x",
+ "read": "1.0.x",
+ "revalidator": "0.1.x",
+ "utile": "0.2.x",
+ "winston": "0.6.x"
+ },
+ "devDependencies": {
+ "vows": "0.7.0"
+ },
+ "main": "./lib/prompt",
+ "scripts": {
+ "test": "vows test/prompt-test.js --spec",
+ "test-all": "vows --spec"
+ },
+ "engines": {
+ "node": ">= 0.6.6"
+ },
+ "readme": "# prompt [![Build Status](https://secure.travis-ci.org/flatiron/prompt.png)](http://travis-ci.org/flatiron/prompt)\n\nA beautiful command-line prompt for node.js\n\n## Features\n\n* prompts the user for input\n* supports validation and defaults\n* hides passwords\n\n## Usage\nUsing prompt is relatively straight forward. There are two core methods you should be aware of: `prompt.get()` and `prompt.addProperties()`. There methods take strings representing property names in addition to objects for complex property validation (and more). There are a number of [examples][0] that you should examine for detailed usage.\n\n### Getting Basic Prompt Information\nGetting started with `prompt` is easy. Lets take a look at `examples/simple-prompt.js`:\n\n``` js\n var prompt = require('prompt');\n\n //\n // Start the prompt\n //\n prompt.start();\n\n //\n // Get two properties from the user: username and email\n //\n prompt.get(['username', 'email'], function (err, result) {\n //\n // Log the results.\n //\n console.log('Command-line input received:');\n console.log(' username: ' + result.username);\n console.log(' email: ' + result.email);\n });\n```\n\nThis will result in the following command-line output:\n\n```\n $ node examples/simple-prompt.js \n prompt: username: some-user\n prompt: email: some-user@some-place.org\n Command-line input received:\n username: some-user\n email: some-user@some-place.org\n```\n\n### Prompting with Validation, Default Values, and More (Complex Properties)\nIn addition to prompting the user with simple string prompts, there is a robust API for getting and validating complex information from a command-line prompt. Here's a quick sample:\n\n``` js\n var schema = {\n properties: {\n name: {\n pattern: /^[a-zA-Z\\s\\-]+$/,\n message: 'Name must be only letters, spaces, or dashes',\n required: true\n },\n password: {\n hidden: true\n }\n }\n };\n\n //\n // Start the prompt\n //\n prompt.start();\n\n //\n // Get two properties from the user: email, password\n //\n prompt.get(schema, function (err, result) {\n //\n // Log the results.\n //\n console.log('Command-line input received:');\n console.log(' name: ' + result.name);\n console.log(' password: ' + result.password);\n });\n```\n\nPretty easy right? The output from the above script is: \n\n```\n $ node examples/property-prompt.js\n prompt: name: nodejitsu000\n error: Invalid input for name\n error: Name must be only letters, spaces, or dashes\n prompt: name: Nodejitsu Inc\n prompt: password: \n Command-line input received:\n name: Nodejitsu Inc\n password: some-password \n```\n\n## Valid Property Settings\n`prompt` understands JSON-schema with a few extra parameters and uses [revalidator](https://github.com/flatiron/revalidator) for validation.\n\nHere's an overview of the properties that may be used for validation and prompting controls:\n\n``` js\n {\n description: 'Enter your password', // Prompt displayed to the user. If not supplied name will be used.\n type: 'string', // Specify the type of input to expect.\n pattern: /^\\w+$/, // Regular expression that input must be valid against.\n message: 'Password must be letters', // Warning message to display if validation fails.\n hidden: true, // If true, characters entered will not be output to console.\n default: 'lamepassword', // Default value to use if no value is entered.\n required: true // If true, value entered must be non-empty.\n before: function(value) { return 'v' + value; } // Runs before node-prompt callbacks. It modifies user's input\n }\n```\n\nAlternatives to `pattern` include `format` and `conform`, as documented in [revalidator](https://github.com/flatiron/revalidator).\n\nUsing `type: 'array'` has some special cases.\n\n- `description` will not work in the schema if `type: 'array'` is defined.\n- `maxItems` takes precedence over `minItems`.\n- Arrays that do not have `maxItems` defined will require users to `SIGINT` (`^C`) before the array is ended.\n- If `SIGINT` (`^C`) is triggered before `minItems` is met, a validation error will appear. This will require users to `SIGEOF` (`^D`) to end the input.\n\nFor more information on things such as `maxItems` and `minItems`, refer to the [revalidator](https://github.com/flatiron/revalidator) repository.\n\n### Alternate Validation API:\n\nPrompt, in addition to iterating over JSON-Schema properties, will also happily iterate over an array of validation objects given an extra 'name' property:\n\n```js\n var prompt = require('../lib/prompt');\n\n //\n // Start the prompt\n //\n prompt.start();\n\n //\n // Get two properties from the user: username and password\n //\n prompt.get([{\n name: 'username',\n required: true\n }, {\n name: 'password',\n hidden: true,\n conform: function (value) {\n return true;\n }\n }], function (err, result) {\n //\n // Log the results.\n //\n console.log('Command-line input received:');\n console.log(' username: ' + result.username);\n console.log(' password: ' + result.password);\n });\n```\n\n### Backward Compatibility\n\nNote that, while this structure is similar to that used by prompt 0.1.x, that the object properties use the same names as in JSON-Schema. prompt 0.2.x is backward compatible with prompt 0.1.x except for asynchronous validation.\n\n### Skipping Prompts\n\nSometimes power users may wish to skip promts and specify all data as command line options. \nif a value is set as a property of `prompt.override` prompt will use that instead of \nprompting the user.\n\n``` js\n //prompt-override.js\n\n var prompt = require('prompt'),\n optimist = require('optimist')\n\n //\n // set the overrides\n //\n prompt.override = optimist.argv\n\n //\n // Start the prompt\n //\n prompt.start();\n\n //\n // Get two properties from the user: username and email\n //\n prompt.get(['username', 'email'], function (err, result) {\n //\n // Log the results.\n //\n console.log('Command-line input received:');\n console.log(' username: ' + result.username);\n console.log(' email: ' + result.email);\n })\n\n //: node prompt-override.js --username USER --email EMAIL\n```\n\n\n### Adding Properties to an Object \nA common use-case for prompting users for data from the command-line is to extend or create a configuration object that is passed onto the entry-point method for your CLI tool. `prompt` exposes a convenience method for doing just this: \n\n``` js\n var obj = {\n password: 'lamepassword',\n mindset: 'NY'\n }\n\n //\n // Log the initial object.\n //\n console.log('Initial object to be extended:');\n console.dir(obj);\n\n //\n // Add two properties to the empty object: username and email\n //\n prompt.addProperties(obj, ['username', 'email'], function (err) {\n //\n // Log the results.\n //\n console.log('Updated object received:');\n console.dir(obj);\n });\n```\n\n## Customizing your prompt\nAside from changing `property.message`, you can also change `prompt.message`\nand `prompt.delimiter` to change the appearance of your prompt.\n\nThe basic structure of a prompt is this:\n\n``` js\nprompt.message + prompt.delimiter + property.message + prompt.delimiter;\n```\n\nThe default `prompt.message` is \"prompt,\" the default `prompt.delimiter` is\n\": \", and the default `property.message` is `property.name`.\nChanging these allows you to customize the appearance of your prompts! In\naddition, prompt supports ANSI color codes via the\n[colors module](https://github.com/Marak/colors.js) for custom colors. For a\nvery colorful example:\n\n``` js\n var prompt = require(\"prompt\");\n\n //\n // Setting these properties customizes the prompt.\n //\n prompt.message = \"Question!\".rainbow;\n prompt.delimiter = \"><\".green;\n\n prompt.start();\n\n prompt.get({\n properties: {\n name: {\n description: \"What is your name?\".magenta\n }\n }\n }, function (err, result) {\n console.log(\"You said your name is: \".cyan + result.name.cyan);\n });\n```\n\nIf you don't want colors, you can set\n\n```js\nvar prompt = require('prompt');\n\nprompt.colors = false;\n```\n\n## Installation\n\n``` bash\n $ [sudo] npm install prompt\n```\n\n## Running tests\n\n``` bash \n $ npm test\n```\n\n#### License: MIT\n#### Author: [Charlie Robbins](http://github.com/indexzero)\n#### Contributors: [Josh Holbrook](http://github.com/jesusabdullah), [Pavan Kumar Sunkara](http://github.com/pksunkara)\n\n[0]: https://github.com/flatiron/prompt/tree/master/examples\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/flatiron/prompt/issues"
+ },
+ "_id": "prompt@0.2.11",
+ "_from": "prompt@0.2.11"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/helpers.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/helpers.js
new file mode 100644
index 0000000..715aee6
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/helpers.js
@@ -0,0 +1,156 @@
+/*
+ * helpers.js: test helpers for the prompt tests.
+ *
+ * (C) 2010, Nodejitsu Inc.
+ *
+ */
+
+var stream = require('stream'),
+ stream = require('stream'),
+ util = require('util'),
+ prompt = require('../lib/prompt');
+
+var helpers = exports;
+
+var MockReadWriteStream = helpers.MockReadWriteStream = function () {
+ //
+ // No need to do anything here, it's just a mock.
+ //
+ var self = this;
+ this.on('pipe', function (src) {
+ var _emit = src.emit;
+ src.emit = function () {
+ //console.dir(arguments);
+ _emit.apply(src, arguments);
+ };
+
+ src.on('data', function (d) {
+ self.emit('data', d + '');
+ })
+ })
+};
+
+util.inherits(MockReadWriteStream, stream.Stream);
+
+['resume', 'pause', 'setEncoding', 'flush', 'end'].forEach(function (method) {
+ MockReadWriteStream.prototype[method] = function () { /* Mock */ };
+});
+
+MockReadWriteStream.prototype.write = function (msg) {
+ this.emit('data', msg);
+ return true;
+};
+
+MockReadWriteStream.prototype.writeNextTick = function (msg) {
+ var self = this
+ process.nextTick(function () {
+ self.write(msg);
+ });
+};
+
+//
+// Create some mock streams for asserting against
+// in our prompt teSts.
+//
+helpers.stdin = new MockReadWriteStream();
+helpers.stdout = new MockReadWriteStream();
+helpers.stderr = new MockReadWriteStream();
+
+//
+// Because `read` uses a `process.nextTick` for reading from
+// stdin, it is necessary to write sequences of input with extra
+// `process.nextTick` calls
+//
+helpers.stdin.writeSequence = function (lines) {
+ if (!lines || !lines.length) {
+ return;
+ }
+
+ helpers.stdin.writeNextTick(lines.shift());
+ prompt.once('prompt', function () {
+ process.nextTick(function () {
+ helpers.stdin.writeSequence(lines);
+ });
+ });
+}
+
+//
+// Monkey punch `util.error` to silence console output
+// and redirect to helpers.stderr for testing.
+//
+console.error = function () {
+ helpers.stderr.write.apply(helpers.stderr, arguments);
+}
+
+// 1) .properties
+// 2) warning --> message
+// 3) Name --> description || key
+// 4) validator --> conform (fxns), pattern (regexp), format (built-in)
+// 5) empty --> required
+helpers.schema = {
+ properties: {
+ oldschema: {
+ message: 'Enter your username',
+ validator: /^[\w|\-]+$/,
+ warning: 'username can only be letters, numbers, and dashes',
+ empty: false
+ },
+ riffwabbles: {
+ pattern: /^[\w|\-]+$/,
+ message: 'riffwabbles can only be letters, numbers, and dashes',
+ default: 'foobizzles'
+ },
+ number: {
+ type: 'number',
+ message: 'pick a number, any number',
+ default: 10
+ },
+ username: {
+ pattern: /^[\w|\-]+$/,
+ message: 'Username can only be letters, numbers, and dashes'
+ },
+ notblank: {
+ required: true
+ },
+ password: {
+ hidden: true,
+ required: true
+ },
+ badValidator: {
+ pattern: ['cant', 'use', 'array']
+ },
+ animal: {
+ description: 'Enter an animal',
+ default: 'dog',
+ pattern: /dog|cat/
+ },
+ sound: {
+ description: 'What sound does this animal make?',
+ conform: function (value) {
+ var animal = prompt.history(0).value;
+
+ return animal === 'dog' && value === 'woof'
+ || animal === 'cat' && value === 'meow';
+ }
+ },
+ fnvalidator: {
+ name: 'fnvalidator',
+ validator: function (line) {
+ return line.slice(0,2) == 'fn';
+ },
+ message: 'fnvalidator must start with "fn"'
+ },
+ fnconform: {
+ conform: function (line) {
+ return line.slice(0,2) == 'fn';
+ },
+ message: 'fnconform must start with "fn"'
+ }/*,
+ cbvalidator: {
+ conform: function (line, next) {
+ next(line.slice(0,2) == 'cb');
+ },
+ message: 'cbvalidator must start with "cb"'
+ }*/
+ }
+};
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/interactive-prompt-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/interactive-prompt-test.js
new file mode 100644
index 0000000..a3032e3
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/interactive-prompt-test.js
@@ -0,0 +1,49 @@
+/*
+ * prompt-test.js: Tests for prompt.
+ *
+ * (C) 2010, Nodejitsu Inc.
+ *
+ */
+
+var assert = require('assert'),
+ vows = require('vows'),
+ prompt = require('../lib/prompt'),
+ winston = require('winston').cli(),
+ helpers = require('./helpers');
+
+vows.describe('prompt/interactive').addBatch({
+ "When using prompt": {
+ topic: function () {
+ //
+ // Reset the prompt for interactive testing
+ //
+ prompt.started = false;
+ prompt.start();
+ winston.info('These prompt tests are interactive');
+ winston.info('Not following instructions will result in test failure');
+ return null;
+ },
+ "the getInput() method": {
+ "when passed a complex property with `hidden: true`": {
+ topic: function () {
+ winston.info('When prompted, enter: 12345 [backspace] [backspace] [enter]');
+ prompt.getInput({ path: ['password'], schema: helpers.schema.properties.password }, this.callback);
+ },
+ "should respond with `123`": function (err, result) {
+ assert.isNull(err);
+ assert.equal(result, '123');
+ },
+ "and then when passed a complex property expecting a number": {
+ topic: function () {
+ winston.info('When prompted, enter: 123 [enter]');
+ prompt.getInput({ path: ['number'], schema: helpers.schema.properties.number }, this.callback);
+ },
+ "should respond with `123` (as a number)": function (err, result) {
+ assert.isNull(err);
+ assert.equal(result, 123);
+ }
+ }
+ }
+ }
+ }
+}).export(module);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/macros.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/macros.js
new file mode 100644
index 0000000..9f58f08
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/macros.js
@@ -0,0 +1,82 @@
+/*
+ * macros.js: Test macros for prompt.
+ *
+ * (C) 2010, Nodejitsu Inc.
+ *
+ */
+
+var assert = require('assert'),
+ helpers = require('./helpers'),
+ prompt = require('../lib/prompt');
+
+exports.shouldConfirm = function (options, mixin) {
+ var message = options.response.toString().replace(/\n/g, ''),
+ messages = ["When using prompt", "the confirm() method"],
+ context = {},
+ last = context;
+
+ messages = messages.concat(options.messages || []);
+
+ while (messages.length) {
+ var text = messages.shift();
+ last[text] = {};
+ last = last[text];
+ }
+
+ last['responding with ' + message] = {
+ topic: function () {
+ if(!mixin)
+ prompt.confirm(options.prop, this.callback);
+ else
+ prompt.confirm(options.prop, mixin, this.callback);
+
+ if (!Array.isArray(options.response)) {
+ helpers.stdin.writeNextTick(options.response + '\n');
+ }
+ else {
+ helpers.stdin.writeSequence(options.response);
+ }
+ },
+ "should respond with true" : function(err, result) {
+ assert.isNull(err);
+ assert.isTrue(result);
+ }
+ }
+
+ return context;
+};
+
+exports.shouldNotConfirm = function (options) {
+ var message = options.response.toString().replace(/\n/g, ''),
+ messages = ["When using prompt", "the confirm() method"],
+ context = {},
+ last = context;
+
+ messages = messages.concat(options.messages || []);
+
+ while (messages.length) {
+ var text = messages.shift();
+ last[text] = {};
+ last = last[text];
+ }
+
+ last['responding with ' + message] = {
+ topic: function () {
+ prompt.confirm(options.prop, this.callback);
+
+ if (!Array.isArray(options.response)) {
+ helpers.stdin.writeNextTick(options.response + '\n');
+ }
+ else {
+ helpers.stdin.writeSequence(options.response);
+ }
+ },
+ "should respond with false" : function(err, result) {
+ assert.isNull(err);
+ assert.isFalse(result);
+ }
+ };
+
+ return context;
+};
+
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/prompt-test.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/prompt-test.js
new file mode 100644
index 0000000..22e26bc
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/prompt/test/prompt-test.js
@@ -0,0 +1,668 @@
+/*
+ * prompt-test.js: Tests for prompt.
+ *
+ * (C) 2010, Nodejitsu Inc.
+ *
+ */
+
+var assert = require('assert'),
+ vows = require('vows'),
+ prompt = require('../lib/prompt'),
+ helpers = require('./helpers'),
+ macros = require('./macros'),
+ schema = helpers.schema;
+
+// A helper to pass fragments of our schema into prompt as full schemas.
+function grab () {
+ var names = [].slice.call(arguments),
+ complete = { schema: {} };
+
+ names.forEach(function (name) {
+ complete.path = [name],
+ complete.schema = schema.properties[name];
+ });
+ return complete;
+};
+
+//
+// Reset the prompt for mock testing
+//
+prompt.started = false;
+prompt.start({
+ stdin: helpers.stdin,
+ stdout: helpers.stdout
+});
+
+vows.describe('prompt').addBatch({
+ "When using prompt": {
+ "the getInput() method": {
+ "with a simple string prompt": {
+ topic: function () {
+ var that = this;
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ })
+
+ prompt.getInput('test input', this.callback);
+ helpers.stdin.writeNextTick('test value\n');
+ },
+ "should prompt to stdout and respond with data": function (err, input) {
+ assert.isNull(err);
+ assert.equal(input, 'test value');
+ assert.isTrue(this.msg.indexOf('test input') !== -1);
+ }
+ },
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the getInput() method": {
+ "with any field that is not supposed to be empty": {
+ "and we don't provide any input": {
+ topic: function () {
+ var that = this;
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ helpers.stderr.once('data', function (msg) {
+ that.errmsg = msg;
+ });
+
+ prompt.getInput(grab('notblank'), function () {});
+ prompt.once('invalid', this.callback.bind(null, null))
+ helpers.stdin.writeNextTick('\n');
+ },
+ "should prompt with an error": function (_, prop, input) {
+ assert.isObject(prop);
+ assert.equal(input, '');
+ assert.isTrue(this.errmsg.indexOf('Invalid input') !== -1);
+ assert.isTrue(this.msg.indexOf('notblank') !== -1);
+ }
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the getInput() method": {
+ "with a hidden field that is not supposed to be empty": {
+ "and we provide valid input": {
+ topic: function () {
+ var that = this;
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ prompt.getInput('password', this.callback);
+ helpers.stdin.writeNextTick('trustno1\n');
+ },
+
+ "should prompt to stdout and respond with data": function (err, input) {
+ assert.isNull(err);
+ assert.equal(input, 'trustno1');
+ assert.isTrue(this.msg.indexOf('password') !== -1);
+ }
+ },
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the getInput() method": {
+ "with a hidden field that is not supposed to be empty": {
+ "and we don't provide an input": {
+ topic: function () {
+ var that = this;
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ helpers.stderr.once('data', function (msg) {
+ that.errmsg = msg;
+ });
+
+ prompt.getInput(grab('password'), function () {} );
+ prompt.once('invalid', this.callback.bind(null, null))
+ helpers.stdin.writeNextTick('\n');
+ },
+ "should prompt with an error": function (ign, prop, input) {
+ assert.isObject(prop);
+ assert.equal(input, '');
+ assert.isTrue(this.errmsg.indexOf('Invalid input') !== -1);
+ assert.isTrue(this.msg.indexOf('password') !== -1);
+ }
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the getInput() method": {
+ "with a complex property prompt": {
+ "and a valid input": {
+ topic: function () {
+ var that = this;
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ prompt.getInput(grab('username'), this.callback);
+ helpers.stdin.writeNextTick('some-user\n');
+ },
+ "should prompt to stdout and respond with data": function (err, input) {
+ assert.isNull(err);
+ assert.equal(input, 'some-user');
+ assert.isTrue(this.msg.indexOf('username') !== -1);
+ }
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the getInput() method": {
+ "with a complex property prompt": {
+ "and an invalid input": {
+ topic: function () {
+ var that = this;
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ helpers.stderr.once('data', function (msg) {
+ that.errmsg = msg;
+ })
+
+ prompt.getInput(grab('username'), this.callback);
+
+ prompt.once('invalid', function () {
+ prompt.once('prompt', function () {
+ process.nextTick(function () {
+ helpers.stdin.writeNextTick('some-user\n');
+ })
+ })
+ });
+
+ helpers.stdin.writeNextTick('some -user\n');
+ },
+ "should prompt with an error before completing the operation": function (err, input) {
+ assert.isNull(err);
+ assert.equal(input, 'some-user');
+ assert.isTrue(this.errmsg.indexOf('Invalid input') !== -1);
+ assert.isTrue(this.msg.indexOf('username') !== -1);
+ }
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the getInput() method": {
+ "with a complex property prompt": {
+ "with an invalid validator (array)": {
+ topic: function () {
+ var that = this,
+ called;
+
+ prompt.getInput(grab('badValidator'), function (err) {
+ if (!called) {
+ called = true;
+ that.callback(err);
+ }
+ });
+ helpers.stdin.writeNextTick('some-user\n');
+ },
+ "should respond with an error": function (err, ign) {
+ assert.isTrue(!!err);
+ }
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the get() method": {
+ "with a simple string prompt": {
+ "that is not a property in prompt.properties": {
+ topic: function () {
+ var that = this;
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ })
+
+ prompt.get('test input', this.callback);
+ helpers.stdin.writeNextTick('test value\n');
+ },
+ "should prompt to stdout and respond with the value": function (err, result) {
+ assert.isNull(err);
+ assert.include(result, 'test input');
+ assert.equal(result['test input'], 'test value');
+ assert.isTrue(this.msg.indexOf('test input') !== -1);
+ }
+ },
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the get() method": {
+ "with a simple string prompt": {
+ "that is a property name in prompt.properties": {
+ "with a default value": {
+ topic: function () {
+ var that = this;
+
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ prompt.properties.riffwabbles = schema.properties.riffwabbles;
+ prompt.get('riffwabbles', this.callback);
+ helpers.stdin.writeNextTick('\n');
+ },
+ "should prompt to stdout and respond with the default value": function (err, result) {
+ assert.isNull(err);
+ assert.isTrue(this.msg.indexOf('riffwabbles') !== -1);
+ assert.isTrue(this.msg.indexOf('(foobizzles)') !== -1);
+ assert.include(result, 'riffwabbles');
+ assert.equal(result['riffwabbles'], schema.properties['riffwabbles'].default);
+ }
+ },
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the get() method": {
+ "with a simple string prompt": {
+ "that is a property name in prompt.properties": {
+ "that expects a numeric value": {
+ "and gets valid input": {
+ topic: function () {
+ var that = this;
+
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ prompt.properties.number = schema.properties.number;
+ prompt.get('number', this.callback);
+ helpers.stdin.writeNextTick('15\n');
+ },
+ "should prompt to stdout and respond with a numeric value": function (err, result) {
+ assert.isNull(err);
+ assert.include(result, 'number');
+ assert.equal(result['number'], 15);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the get() method": {
+ "with a simple string prompt": {
+ "that is a property name in prompt.properties": {
+ "with a sync function validator (.validator)": {
+ topic: function () {
+ var that = this;
+
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ prompt.get(helpers.schema.properties.fnvalidator, this.callback);
+ helpers.stdin.writeNextTick('fn123\n');
+ },
+ "should accept a value that is checked": function (err, result) {
+ assert.isNull(err);
+ assert.equal(result['fnvalidator'],'fn123');
+ }
+ }
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the get() method": {
+ "with a simple string prompt": {
+ "that is a property name in prompt.properties": {
+ "with a sync function validator (.conform)": {
+ topic: function () {
+ var that = this;
+
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ prompt.get(grab('fnconform'), this.callback);
+ helpers.stdin.writeNextTick('fn123\n');
+ },
+ "should accept a value that is checked": function (err, result) {
+ assert.isNull(err);
+ assert.equal(result['fnconform'],'fn123');
+ }
+ }
+ //
+ // Remark Does not work with revalidator
+ //
+ // "with a callback validator": {
+ // topic: function () {
+ // var that = this;
+ //
+ // helpers.stdout.once('data', function (msg) {
+ // that.msg = msg;
+ // });
+ //
+ // prompt.get(grab('cbvalidator'), this.callback);
+ // helpers.stdin.writeNextTick('cb123\n');
+ // },
+ // "should not accept a value that is correct": function (err, result) {
+ // assert.isNull(err);
+ // assert.equal(result['cbvalidator'],'cb123');
+ // }
+ // }
+ }
+ },
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the get() method": {
+ "with a simple string prompt": {
+ "that is a property name in prompt.properties": {
+ "with a sync function before (.before)": {
+ topic: function() {
+ var that = this;
+
+ helpers.stdout.once('data', function(msg) {
+ that.msg = msg;
+ });
+
+ prompt.get({
+ properties: {
+ fnbefore: {
+ before: function(v) {
+ return 'v' + v;
+ }
+ }
+ }
+ }, this.callback);
+ helpers.stdin.writeNextTick('fn456\n');
+ },
+ "should modify user's input": function(e, result) {
+ assert.equal(result.fnbefore, 'vfn456');
+ }
+ }
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the get() method": {
+ "skip prompt with prompt.overide": {
+ topic: function () {
+ prompt.override = { coconihet: 'whatever' }
+ prompt.get('coconihet', this.callback);
+ },
+ "skips prompt and uses overide": function (err, results) {
+ assert.equal(results.coconihet, 'whatever')
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the addProperties() method": {
+ topic: function () {
+ prompt.addProperties({}, ['foo', 'bar'], this.callback);
+ helpers.stdin.writeSequence(['foo\n', 'bar\n']);
+ },
+ "should add the properties to the object": function (err, obj) {
+ assert.isNull(err);
+ assert.isObject(obj);
+ assert.equal(obj.foo, 'foo');
+ assert.equal(obj.bar, 'bar');
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the get() method": {
+ "with old schema": {
+ topic: function () {
+ var that = this;
+
+ helpers.stdout.once('data', function (msg) {
+ that.msg = msg;
+ });
+
+ prompt.properties.username = schema.properties.oldschema;
+ prompt.get('username', this.callback);
+
+ helpers.stdin.writeSequence(['\n', 'hell$\n', 'hello\n']);
+ },
+ "should prompt to stdout and respond with the default value": function (err, result) {
+ assert.isNull(err);
+ assert.isTrue(this.msg.indexOf('username') !== -1);
+ assert.include(result, 'username');
+ assert.equal(result.username, 'hello');
+ }
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the history() method": {
+ "when used inside of a complex property": {
+ "with correct value(s)": {
+ topic: function () {
+ prompt.get([grab('animal'), grab('sound')], this.callback);
+ helpers.stdin.writeSequence(['dog\n', 'woof\n']);
+ },
+ "should respond with the values entered": function (err, result) {
+ assert.isTrue(!err);
+ assert.equal(result.animal, 'dog');
+ assert.equal(result.sound, 'woof');
+ }
+ },
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "the history() method": {
+ "when used inside of a complex property": {
+ "with an incorrect value": {
+ topic: function () {
+ prompt.get([grab('animal'), grab('sound')], function () {});
+ prompt.once('invalid', this.callback.bind(null, null));
+ helpers.stdin.writeSequence(['dog\n', 'meow\n']);
+ },
+ "should prompt for the error": function (ign, property, line) {
+ assert.equal(property.path.join(''), 'sound');
+ assert.equal(line, 'meow');
+ }
+ }
+ }
+ }
+ }
+}).addBatch({
+ "when using prompt": {
+ "the get() method": {
+ topic: function () {
+ prompt.override = { xyz: 468, abc: 123 }
+ prompt.get(['xyz', 'abc'], this.callback);
+ },
+ "should respond with overrides": function (err, results) {
+ assert.isNull(err);
+ assert.deepEqual(results, { xyz: 468, abc: 123 });
+ }
+ }
+ }
+}).addBatch({
+ "When using prompt": {
+ "with fancy properties": {
+ "the get() method": {
+ topic: function () {
+ prompt.override = { UVW: 5423, DEF: 64235 }
+ prompt.get({
+ properties: {
+ 'UVW': {
+ description: 'a custom message',
+ default: 6
+ },
+ 'DEF': {
+ description: 'a custom message',
+ default: 6
+ }
+ }
+ }, this.callback);
+ },
+ "should respond with overrides": function (err, results) {
+ assert.isNull(err);
+ assert.deepEqual(results, { UVW: 5423, DEF: 64235 });
+ }
+ }
+ }
+ }
+}).addBatch(
+ macros.shouldConfirm({
+ messages: ['with a string message'],
+ prop: 'test',
+ response: 'Y'
+ })
+).addBatch(
+ macros.shouldConfirm({
+ messages: ['with an empty string and default yes'],
+ prop: 'test',
+ response: ''
+ }, {
+ default: 'yes'
+ })
+).addBatch(
+ macros.shouldNotConfirm({
+ messages: ['with a string message'],
+ prop: 'test',
+ response: 'N'
+ })
+).addBatch(
+ macros.shouldConfirm({
+ messages: ['with a string message'],
+ prop: 'test',
+ response: 'YES'
+ })
+).addBatch(
+ macros.shouldNotConfirm({
+ messages: ['with a string message'],
+ prop: 'test',
+ response: 'NO'
+ })
+).addBatch(
+ macros.shouldConfirm({
+ messages: ['with a string message'],
+ prop: 'test',
+ response: 'T'
+ })
+).addBatch(
+ macros.shouldNotConfirm({
+ messages: ['with a string message'],
+ prop: 'test',
+ response: 'F'
+ })
+).addBatch(
+ macros.shouldConfirm({
+ messages: ['with a string message'],
+ prop: 'test',
+ response: 'TRUE'
+ })
+).addBatch(
+ macros.shouldNotConfirm({
+ messages: ['with a string message'],
+ prop: 'test',
+ response: 'FALSE'
+ })
+).addBatch(
+ macros.shouldConfirm({
+ messages: ['with an object', 'and description set'],
+ prop: { description: 'a custom message' },
+ response: 'Y'
+ })
+).addBatch(
+ macros.shouldConfirm({
+ messages: ['with an object', 'and they forgot the description'],
+ prop: { description: 'a custom message' },
+ response: 'Y'
+ })
+).addBatch(
+ macros.shouldConfirm({
+ messages: ['with an object', 'and custom validators'],
+ prop: {
+ description: 'node or jitsu?',
+ pattern: /^(node|jitsu)/i,
+ yes: /^node/i
+ },
+ response: 'node'
+ })
+).addBatch(
+ macros.shouldNotConfirm({
+ messages: ['with an object', 'and custom validators'],
+ prop: {
+ description: 'node or jitsu?',
+ pattern: /^(node|jitsu)/i,
+ yes: /^node/i
+ },
+ response: 'jitsu'
+ })
+).addBatch(
+ macros.shouldConfirm({
+ messages: ['with multiple strings'],
+ prop: ["test", "test2", "test3"],
+ response: ['Y\n', 'y\n', 'YES\n']
+ })
+).addBatch(
+ macros.shouldNotConfirm({
+ messages: ['with multiple strings'],
+ prop: ["test", "test2", "test3"],
+ response: ['Y\n', 'N\n', 'YES\n']
+ })
+).addBatch(
+ macros.shouldNotConfirm({
+ messages: ['with multiple strings'],
+ prop: ["test", "test2", "test3"],
+ response: ['n\n', 'NO\n', 'N\n']
+ })
+).addBatch(
+ macros.shouldConfirm({
+ messages: ['with multiple objects'],
+ prop: [
+ { message: "test" },
+ { message: "test2" }
+ ],
+ response: ['y\n', 'y\n']
+ })
+).addBatch(
+ macros.shouldNotConfirm({
+ messages: ['with multiple objects'],
+ prop: [
+ { message: "test" },
+ { message: "test2" }
+ ],
+ response: ['n\n', 'n\n']
+ })
+).addBatch(
+ macros.shouldNotConfirm({
+ messages: ['with multiple objects'],
+ prop: [
+ { message: "test" },
+ { message: "test2" }
+ ],
+ response: ['n\n', 'y\n']
+ })
+).export(module);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.documentup.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.documentup.json
new file mode 100644
index 0000000..57fe301
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.documentup.json
@@ -0,0 +1,6 @@
+{
+ "name": "ShellJS",
+ "twitter": [
+ "r2r"
+ ]
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.jshintrc b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.jshintrc
new file mode 100644
index 0000000..a80c559
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.jshintrc
@@ -0,0 +1,7 @@
+{
+ "loopfunc": true,
+ "sub": true,
+ "undef": true,
+ "unused": true,
+ "node": true
+}
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.npmignore b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.npmignore
new file mode 100644
index 0000000..6b20c38
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.npmignore
@@ -0,0 +1,2 @@
+test/
+tmp/
\ No newline at end of file
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.travis.yml b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.travis.yml
new file mode 100644
index 0000000..99cdc74
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/LICENSE b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/LICENSE
new file mode 100644
index 0000000..1b35ee9
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/LICENSE
@@ -0,0 +1,26 @@
+Copyright (c) 2012, Artur Adib
+All rights reserved.
+
+You may use this project under the terms of the New BSD license as follows:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Artur Adib nor the
+ names of the contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/README.md b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/README.md
new file mode 100644
index 0000000..9120623
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/README.md
@@ -0,0 +1,552 @@
+# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs)
+
+ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts!
+
+The project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like:
+
++ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader
++ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger
++ [JSHint](http://jshint.com) - Most popular JavaScript linter
++ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers
++ [Yeoman](http://yeoman.io/) - Web application stack and development tool
++ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation
+
+and [many more](https://npmjs.org/browse/depended/shelljs).
+
+## Installing
+
+Via npm:
+
+```bash
+$ npm install [-g] shelljs
+```
+
+If the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to
+run ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder:
+
+```bash
+$ shjs my_script
+```
+
+You can also just copy `shell.js` into your project's directory, and `require()` accordingly.
+
+
+## Examples
+
+### JavaScript
+
+```javascript
+require('shelljs/global');
+
+if (!which('git')) {
+ echo('Sorry, this script requires git');
+ exit(1);
+}
+
+// Copy files to release dir
+mkdir('-p', 'out/Release');
+cp('-R', 'stuff/*', 'out/Release');
+
+// Replace macros in each .js file
+cd('lib');
+ls('*.js').forEach(function(file) {
+ sed('-i', 'BUILD_VERSION', 'v0.1.2', file);
+ sed('-i', /.*REMOVE_THIS_LINE.*\n/, '', file);
+ sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat('macro.js'), file);
+});
+cd('..');
+
+// Run external tool synchronously
+if (exec('git commit -am "Auto-commit"').code !== 0) {
+ echo('Error: Git commit failed');
+ exit(1);
+}
+```
+
+### CoffeeScript
+
+```coffeescript
+require 'shelljs/global'
+
+if not which 'git'
+ echo 'Sorry, this script requires git'
+ exit 1
+
+# Copy files to release dir
+mkdir '-p', 'out/Release'
+cp '-R', 'stuff/*', 'out/Release'
+
+# Replace macros in each .js file
+cd 'lib'
+for file in ls '*.js'
+ sed '-i', 'BUILD_VERSION', 'v0.1.2', file
+ sed '-i', /.*REMOVE_THIS_LINE.*\n/, '', file
+ sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat 'macro.js', file
+cd '..'
+
+# Run external tool synchronously
+if (exec 'git commit -am "Auto-commit"').code != 0
+ echo 'Error: Git commit failed'
+ exit 1
+```
+
+## Global vs. Local
+
+The example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`.
+
+Example:
+
+```javascript
+var shell = require('shelljs');
+shell.echo('hello world');
+```
+
+## Make tool
+
+A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script.
+
+Example (CoffeeScript):
+
+```coffeescript
+require 'shelljs/make'
+
+target.all = ->
+ target.bundle()
+ target.docs()
+
+target.bundle = ->
+ cd __dirname
+ mkdir 'build'
+ cd 'lib'
+ (cat '*.js').to '../build/output.js'
+
+target.docs = ->
+ cd __dirname
+ mkdir 'docs'
+ cd 'lib'
+ for file in ls '*.js'
+ text = grep '//@', file # extract special comments
+ text.replace '//@', '' # remove comment tags
+ text.to 'docs/my_docs.md'
+```
+
+To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`, and so on.
+
+
+
+
+
+
+## Command reference
+
+
+All commands run synchronously, unless otherwise stated.
+
+
+### cd('dir')
+Changes to directory `dir` for the duration of the script
+
+
+### pwd()
+Returns the current directory.
+
+
+### ls([options ,] path [,path ...])
+### ls([options ,] path_array)
+Available options:
+
++ `-R`: recursive
++ `-A`: all files (include files beginning with `.`, except for `.` and `..`)
+
+Examples:
+
+```javascript
+ls('projs/*.js');
+ls('-R', '/users/me', '/tmp');
+ls('-R', ['/users/me', '/tmp']); // same as above
+```
+
+Returns array of files in the given path, or in current directory if no path provided.
+
+
+### find(path [,path ...])
+### find(path_array)
+Examples:
+
+```javascript
+find('src', 'lib');
+find(['src', 'lib']); // same as above
+find('.').filter(function(file) { return file.match(/\.js$/); });
+```
+
+Returns array of all files (however deep) in the given paths.
+
+The main difference from `ls('-R', path)` is that the resulting file names
+include the base directories, e.g. `lib/resources/file1` instead of just `file1`.
+
+
+### cp([options ,] source [,source ...], dest)
+### cp([options ,] source_array, dest)
+Available options:
+
++ `-f`: force
++ `-r, -R`: recursive
+
+Examples:
+
+```javascript
+cp('file1', 'dir1');
+cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');
+cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above
+```
+
+Copies files. The wildcard `*` is accepted.
+
+
+### rm([options ,] file [, file ...])
+### rm([options ,] file_array)
+Available options:
+
++ `-f`: force
++ `-r, -R`: recursive
+
+Examples:
+
+```javascript
+rm('-rf', '/tmp/*');
+rm('some_file.txt', 'another_file.txt');
+rm(['some_file.txt', 'another_file.txt']); // same as above
+```
+
+Removes files. The wildcard `*` is accepted.
+
+
+### mv(source [, source ...], dest')
+### mv(source_array, dest')
+Available options:
+
++ `f`: force
+
+Examples:
+
+```javascript
+mv('-f', 'file', 'dir/');
+mv('file1', 'file2', 'dir/');
+mv(['file1', 'file2'], 'dir/'); // same as above
+```
+
+Moves files. The wildcard `*` is accepted.
+
+
+### mkdir([options ,] dir [, dir ...])
+### mkdir([options ,] dir_array)
+Available options:
+
++ `p`: full path (will create intermediate dirs if necessary)
+
+Examples:
+
+```javascript
+mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');
+mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above
+```
+
+Creates directories.
+
+
+### test(expression)
+Available expression primaries:
+
++ `'-b', 'path'`: true if path is a block device
++ `'-c', 'path'`: true if path is a character device
++ `'-d', 'path'`: true if path is a directory
++ `'-e', 'path'`: true if path exists
++ `'-f', 'path'`: true if path is a regular file
++ `'-L', 'path'`: true if path is a symboilc link
++ `'-p', 'path'`: true if path is a pipe (FIFO)
++ `'-S', 'path'`: true if path is a socket
+
+Examples:
+
+```javascript
+if (test('-d', path)) { /* do something with dir */ };
+if (!test('-f', path)) continue; // skip if it's a regular file
+```
+
+Evaluates expression using the available primaries and returns corresponding value.
+
+
+### cat(file [, file ...])
+### cat(file_array)
+
+Examples:
+
+```javascript
+var str = cat('file*.txt');
+var str = cat('file1', 'file2');
+var str = cat(['file1', 'file2']); // same as above
+```
+
+Returns a string containing the given file, or a concatenated string
+containing the files if more than one file is given (a new line character is
+introduced between each file). Wildcard `*` accepted.
+
+
+### 'string'.to(file)
+
+Examples:
+
+```javascript
+cat('input.txt').to('output.txt');
+```
+
+Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as
+those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_
+
+
+### 'string'.toEnd(file)
+
+Examples:
+
+```javascript
+cat('input.txt').toEnd('output.txt');
+```
+
+Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as
+those returned by `cat`, `grep`, etc).
+
+
+### sed([options ,] search_regex, replace_str, file)
+Available options:
+
++ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_
+
+Examples:
+
+```javascript
+sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');
+sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js');
+```
+
+Reads an input string from `file` and performs a JavaScript `replace()` on the input
+using the given search regex and replacement string. Returns the new string after replacement.
+
+
+### grep([options ,] regex_filter, file [, file ...])
+### grep([options ,] regex_filter, file_array)
+Available options:
+
++ `-v`: Inverse the sense of the regex and print the lines not matching the criteria.
+
+Examples:
+
+```javascript
+grep('-v', 'GLOBAL_VARIABLE', '*.js');
+grep('GLOBAL_VARIABLE', '*.js');
+```
+
+Reads input string from given files and returns a string containing all lines of the
+file that match the given `regex_filter`. Wildcard `*` accepted.
+
+
+### which(command)
+
+Examples:
+
+```javascript
+var nodeExec = which('node');
+```
+
+Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions.
+Returns string containing the absolute path to the command.
+
+
+### echo(string [,string ...])
+
+Examples:
+
+```javascript
+echo('hello world');
+var str = echo('hello world');
+```
+
+Prints string to stdout, and returns string with additional utility methods
+like `.to()`.
+
+
+### pushd([options,] [dir | '-N' | '+N'])
+
+Available options:
+
++ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.
+
+Arguments:
+
++ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.
++ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
++ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
+
+Examples:
+
+```javascript
+// process.cwd() === '/usr'
+pushd('/etc'); // Returns /etc /usr
+pushd('+1'); // Returns /usr /etc
+```
+
+Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.
+
+### popd([options,] ['-N' | '+N'])
+
+Available options:
+
++ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
+
+Arguments:
+
++ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.
++ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.
+
+Examples:
+
+```javascript
+echo(process.cwd()); // '/usr'
+pushd('/etc'); // '/etc /usr'
+echo(process.cwd()); // '/etc'
+popd(); // '/usr'
+echo(process.cwd()); // '/usr'
+```
+
+When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.
+
+### dirs([options | '+N' | '-N'])
+
+Available options:
+
++ `-c`: Clears the directory stack by deleting all of the elements.
+
+Arguments:
+
++ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.
++ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.
+
+Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.
+
+See also: pushd, popd
+
+
+### exit(code)
+Exits the current process with the given exit code.
+
+### env['VAR_NAME']
+Object containing environment variables (both getter and setter). Shortcut to process.env.
+
+### exec(command [, options] [, callback])
+Available options (all `false` by default):
+
++ `async`: Asynchronous execution. Defaults to true if a callback is provided.
++ `silent`: Do not echo program output to console.
+
+Examples:
+
+```javascript
+var version = exec('node --version', {silent:true}).output;
+
+var child = exec('some_long_running_process', {async:true});
+child.stdout.on('data', function(data) {
+ /* ... do something with data ... */
+});
+
+exec('some_long_running_process', function(code, output) {
+ console.log('Exit code:', code);
+ console.log('Program output:', output);
+});
+```
+
+Executes the given `command` _synchronously_, unless otherwise specified.
+When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's
+`output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and
+the `callback` gets the arguments `(code, output)`.
+
+**Note:** For long-lived processes, it's best to run `exec()` asynchronously as
+the current synchronous implementation uses a lot of CPU. This should be getting
+fixed soon.
+
+
+### chmod(octal_mode || octal_string, file)
+### chmod(symbolic_mode, file)
+
+Available options:
+
++ `-v`: output a diagnostic for every file processed
++ `-c`: like verbose but report only when a change is made
++ `-R`: change files and directories recursively
+
+Examples:
+
+```javascript
+chmod(755, '/Users/brandon');
+chmod('755', '/Users/brandon'); // same as above
+chmod('u+x', '/Users/brandon');
+```
+
+Alters the permissions of a file or directory by either specifying the
+absolute permissions in octal form or expressing the changes in symbols.
+This command tries to mimic the POSIX behavior as much as possible.
+Notable exceptions:
+
++ In symbolic modes, 'a-r' and '-r' are identical. No consideration is
+ given to the umask.
++ There is no "quiet" option since default behavior is to run silent.
+
+
+## Non-Unix commands
+
+
+### tempdir()
+
+Examples:
+
+```javascript
+var tmp = tempdir(); // "/tmp" for most *nix platforms
+```
+
+Searches and returns string containing a writeable, platform-dependent temporary directory.
+Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir).
+
+
+### error()
+Tests if error occurred in the last command. Returns `null` if no error occurred,
+otherwise returns string explaining the error
+
+
+## Configuration
+
+
+### config.silent
+Example:
+
+```javascript
+var silentState = config.silent; // save old silent state
+config.silent = true;
+/* ... */
+config.silent = silentState; // restore old silent state
+```
+
+Suppresses all command output if `true`, except for `echo()` calls.
+Default is `false`.
+
+### config.fatal
+Example:
+
+```javascript
+config.fatal = true;
+cp('this_file_does_not_exist', '/dev/null'); // dies here
+/* more commands... */
+```
+
+If `true` the script will die on errors. Default is `false`.
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/bin/shjs b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/bin/shjs
new file mode 100644
index 0000000..d239a7a
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/bin/shjs
@@ -0,0 +1,51 @@
+#!/usr/bin/env node
+require('../global');
+
+if (process.argv.length < 3) {
+ console.log('ShellJS: missing argument (script name)');
+ console.log();
+ process.exit(1);
+}
+
+var args,
+ scriptName = process.argv[2];
+env['NODE_PATH'] = __dirname + '/../..';
+
+if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) {
+ if (test('-f', scriptName + '.js'))
+ scriptName += '.js';
+ if (test('-f', scriptName + '.coffee'))
+ scriptName += '.coffee';
+}
+
+if (!test('-f', scriptName)) {
+ console.log('ShellJS: script not found ('+scriptName+')');
+ console.log();
+ process.exit(1);
+}
+
+args = process.argv.slice(3);
+
+for (var i = 0, l = args.length; i < l; i++) {
+ if (args[i][0] !== "-"){
+ args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words
+ }
+}
+
+if (scriptName.match(/\.coffee$/)) {
+ //
+ // CoffeeScript
+ //
+ if (which('coffee')) {
+ exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true });
+ } else {
+ console.log('ShellJS: CoffeeScript interpreter not found');
+ console.log();
+ process.exit(1);
+ }
+} else {
+ //
+ // JavaScript
+ //
+ exec('node ' + scriptName + ' ' + args.join(' '), { async: true });
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/global.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/global.js
new file mode 100644
index 0000000..97f0033
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/global.js
@@ -0,0 +1,3 @@
+var shell = require('./shell.js');
+for (var cmd in shell)
+ global[cmd] = shell[cmd];
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/make.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/make.js
new file mode 100644
index 0000000..53e5e81
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/make.js
@@ -0,0 +1,47 @@
+require('./global');
+
+global.config.fatal = true;
+global.target = {};
+
+// This ensures we only execute the script targets after the entire script has
+// been evaluated
+var args = process.argv.slice(2);
+setTimeout(function() {
+ var t;
+
+ if (args.length === 1 && args[0] === '--help') {
+ console.log('Available targets:');
+ for (t in global.target)
+ console.log(' ' + t);
+ return;
+ }
+
+ // Wrap targets to prevent duplicate execution
+ for (t in global.target) {
+ (function(t, oldTarget){
+
+ // Wrap it
+ global.target[t] = function(force) {
+ if (oldTarget.done && !force)
+ return;
+ oldTarget.done = true;
+ return oldTarget.apply(oldTarget, arguments);
+ };
+
+ })(t, global.target[t]);
+ }
+
+ // Execute desired targets
+ if (args.length > 0) {
+ args.forEach(function(arg) {
+ if (arg in global.target)
+ global.target[arg]();
+ else {
+ console.log('no such target: ' + arg);
+ }
+ });
+ } else if ('all' in global.target) {
+ global.target.all();
+ }
+
+}, 0);
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/package.json b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/package.json
new file mode 100644
index 0000000..ec62ac5
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "shelljs",
+ "version": "0.2.6",
+ "author": {
+ "name": "Artur Adib",
+ "email": "aadib@mozilla.com"
+ },
+ "description": "Portable Unix shell commands for Node.js",
+ "keywords": [
+ "unix",
+ "shell",
+ "makefile",
+ "make",
+ "jake",
+ "synchronous"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/arturadib/shelljs.git"
+ },
+ "homepage": "http://github.com/arturadib/shelljs",
+ "main": "./shell.js",
+ "scripts": {
+ "test": "node scripts/run-tests"
+ },
+ "bin": {
+ "shjs": "./bin/shjs"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "jshint": "~2.1.11"
+ },
+ "optionalDependencies": {},
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "readme": "# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs)\n\nShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts!\n\nThe project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like:\n\n+ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader\n+ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger\n+ [JSHint](http://jshint.com) - Most popular JavaScript linter\n+ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers\n+ [Yeoman](http://yeoman.io/) - Web application stack and development tool\n+ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation\n\nand [many more](https://npmjs.org/browse/depended/shelljs).\n\n## Installing\n\nVia npm:\n\n```bash\n$ npm install [-g] shelljs\n```\n\nIf the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to\nrun ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder:\n\n```bash\n$ shjs my_script\n```\n\nYou can also just copy `shell.js` into your project's directory, and `require()` accordingly.\n\n\n## Examples\n\n### JavaScript\n\n```javascript\nrequire('shelljs/global');\n\nif (!which('git')) {\n echo('Sorry, this script requires git');\n exit(1);\n}\n\n// Copy files to release dir\nmkdir('-p', 'out/Release');\ncp('-R', 'stuff/*', 'out/Release');\n\n// Replace macros in each .js file\ncd('lib');\nls('*.js').forEach(function(file) {\n sed('-i', 'BUILD_VERSION', 'v0.1.2', file);\n sed('-i', /.*REMOVE_THIS_LINE.*\\n/, '', file);\n sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\\n/, cat('macro.js'), file);\n});\ncd('..');\n\n// Run external tool synchronously\nif (exec('git commit -am \"Auto-commit\"').code !== 0) {\n echo('Error: Git commit failed');\n exit(1);\n}\n```\n\n### CoffeeScript\n\n```coffeescript\nrequire 'shelljs/global'\n\nif not which 'git'\n echo 'Sorry, this script requires git'\n exit 1\n\n# Copy files to release dir\nmkdir '-p', 'out/Release'\ncp '-R', 'stuff/*', 'out/Release'\n\n# Replace macros in each .js file\ncd 'lib'\nfor file in ls '*.js'\n sed '-i', 'BUILD_VERSION', 'v0.1.2', file\n sed '-i', /.*REMOVE_THIS_LINE.*\\n/, '', file\n sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\\n/, cat 'macro.js', file\ncd '..'\n\n# Run external tool synchronously\nif (exec 'git commit -am \"Auto-commit\"').code != 0\n echo 'Error: Git commit failed'\n exit 1\n```\n\n## Global vs. Local\n\nThe example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`.\n\nExample:\n\n```javascript\nvar shell = require('shelljs');\nshell.echo('hello world');\n```\n\n## Make tool\n\nA convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script.\n\nExample (CoffeeScript):\n\n```coffeescript\nrequire 'shelljs/make'\n\ntarget.all = ->\n target.bundle()\n target.docs()\n\ntarget.bundle = ->\n cd __dirname\n mkdir 'build'\n cd 'lib'\n (cat '*.js').to '../build/output.js'\n\ntarget.docs = ->\n cd __dirname\n mkdir 'docs'\n cd 'lib'\n for file in ls '*.js'\n text = grep '//@', file # extract special comments\n text.replace '//@', '' # remove comment tags\n text.to 'docs/my_docs.md'\n```\n\nTo run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`, and so on.\n\n\n\n\n\n\n## Command reference\n\n\nAll commands run synchronously, unless otherwise stated.\n\n\n### cd('dir')\nChanges to directory `dir` for the duration of the script\n\n\n### pwd()\nReturns the current directory.\n\n\n### ls([options ,] path [,path ...])\n### ls([options ,] path_array)\nAvailable options:\n\n+ `-R`: recursive\n+ `-A`: all files (include files beginning with `.`, except for `.` and `..`)\n\nExamples:\n\n```javascript\nls('projs/*.js');\nls('-R', '/users/me', '/tmp');\nls('-R', ['/users/me', '/tmp']); // same as above\n```\n\nReturns array of files in the given path, or in current directory if no path provided.\n\n\n### find(path [,path ...])\n### find(path_array)\nExamples:\n\n```javascript\nfind('src', 'lib');\nfind(['src', 'lib']); // same as above\nfind('.').filter(function(file) { return file.match(/\\.js$/); });\n```\n\nReturns array of all files (however deep) in the given paths.\n\nThe main difference from `ls('-R', path)` is that the resulting file names\ninclude the base directories, e.g. `lib/resources/file1` instead of just `file1`.\n\n\n### cp([options ,] source [,source ...], dest)\n### cp([options ,] source_array, dest)\nAvailable options:\n\n+ `-f`: force\n+ `-r, -R`: recursive\n\nExamples:\n\n```javascript\ncp('file1', 'dir1');\ncp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');\ncp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above\n```\n\nCopies files. The wildcard `*` is accepted.\n\n\n### rm([options ,] file [, file ...])\n### rm([options ,] file_array)\nAvailable options:\n\n+ `-f`: force\n+ `-r, -R`: recursive\n\nExamples:\n\n```javascript\nrm('-rf', '/tmp/*');\nrm('some_file.txt', 'another_file.txt');\nrm(['some_file.txt', 'another_file.txt']); // same as above\n```\n\nRemoves files. The wildcard `*` is accepted.\n\n\n### mv(source [, source ...], dest')\n### mv(source_array, dest')\nAvailable options:\n\n+ `f`: force\n\nExamples:\n\n```javascript\nmv('-f', 'file', 'dir/');\nmv('file1', 'file2', 'dir/');\nmv(['file1', 'file2'], 'dir/'); // same as above\n```\n\nMoves files. The wildcard `*` is accepted.\n\n\n### mkdir([options ,] dir [, dir ...])\n### mkdir([options ,] dir_array)\nAvailable options:\n\n+ `p`: full path (will create intermediate dirs if necessary)\n\nExamples:\n\n```javascript\nmkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');\nmkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above\n```\n\nCreates directories.\n\n\n### test(expression)\nAvailable expression primaries:\n\n+ `'-b', 'path'`: true if path is a block device\n+ `'-c', 'path'`: true if path is a character device\n+ `'-d', 'path'`: true if path is a directory\n+ `'-e', 'path'`: true if path exists\n+ `'-f', 'path'`: true if path is a regular file\n+ `'-L', 'path'`: true if path is a symboilc link\n+ `'-p', 'path'`: true if path is a pipe (FIFO)\n+ `'-S', 'path'`: true if path is a socket\n\nExamples:\n\n```javascript\nif (test('-d', path)) { /* do something with dir */ };\nif (!test('-f', path)) continue; // skip if it's a regular file\n```\n\nEvaluates expression using the available primaries and returns corresponding value.\n\n\n### cat(file [, file ...])\n### cat(file_array)\n\nExamples:\n\n```javascript\nvar str = cat('file*.txt');\nvar str = cat('file1', 'file2');\nvar str = cat(['file1', 'file2']); // same as above\n```\n\nReturns a string containing the given file, or a concatenated string\ncontaining the files if more than one file is given (a new line character is\nintroduced between each file). Wildcard `*` accepted.\n\n\n### 'string'.to(file)\n\nExamples:\n\n```javascript\ncat('input.txt').to('output.txt');\n```\n\nAnalogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as\nthose returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_\n\n\n### 'string'.toEnd(file)\n\nExamples:\n\n```javascript\ncat('input.txt').toEnd('output.txt');\n```\n\nAnalogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as\nthose returned by `cat`, `grep`, etc).\n\n\n### sed([options ,] search_regex, replace_str, file)\nAvailable options:\n\n+ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_\n\nExamples:\n\n```javascript\nsed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');\nsed(/.*DELETE_THIS_LINE.*\\n/, '', 'source.js');\n```\n\nReads an input string from `file` and performs a JavaScript `replace()` on the input\nusing the given search regex and replacement string. Returns the new string after replacement.\n\n\n### grep([options ,] regex_filter, file [, file ...])\n### grep([options ,] regex_filter, file_array)\nAvailable options:\n\n+ `-v`: Inverse the sense of the regex and print the lines not matching the criteria.\n\nExamples:\n\n```javascript\ngrep('-v', 'GLOBAL_VARIABLE', '*.js');\ngrep('GLOBAL_VARIABLE', '*.js');\n```\n\nReads input string from given files and returns a string containing all lines of the\nfile that match the given `regex_filter`. Wildcard `*` accepted.\n\n\n### which(command)\n\nExamples:\n\n```javascript\nvar nodeExec = which('node');\n```\n\nSearches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions.\nReturns string containing the absolute path to the command.\n\n\n### echo(string [,string ...])\n\nExamples:\n\n```javascript\necho('hello world');\nvar str = echo('hello world');\n```\n\nPrints string to stdout, and returns string with additional utility methods\nlike `.to()`.\n\n\n### pushd([options,] [dir | '-N' | '+N'])\n\nAvailable options:\n\n+ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.\n\nArguments:\n\n+ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.\n+ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.\n+ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.\n\nExamples:\n\n```javascript\n// process.cwd() === '/usr'\npushd('/etc'); // Returns /etc /usr\npushd('+1'); // Returns /usr /etc\n```\n\nSave the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.\n\n### popd([options,] ['-N' | '+N'])\n\nAvailable options:\n\n+ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.\n\nArguments:\n\n+ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.\n+ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.\n\nExamples:\n\n```javascript\necho(process.cwd()); // '/usr'\npushd('/etc'); // '/etc /usr'\necho(process.cwd()); // '/etc'\npopd(); // '/usr'\necho(process.cwd()); // '/usr'\n```\n\nWhen no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.\n\n### dirs([options | '+N' | '-N'])\n\nAvailable options:\n\n+ `-c`: Clears the directory stack by deleting all of the elements.\n\nArguments:\n\n+ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.\n+ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.\n\nDisplay the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.\n\nSee also: pushd, popd\n\n\n### exit(code)\nExits the current process with the given exit code.\n\n### env['VAR_NAME']\nObject containing environment variables (both getter and setter). Shortcut to process.env.\n\n### exec(command [, options] [, callback])\nAvailable options (all `false` by default):\n\n+ `async`: Asynchronous execution. Defaults to true if a callback is provided.\n+ `silent`: Do not echo program output to console.\n\nExamples:\n\n```javascript\nvar version = exec('node --version', {silent:true}).output;\n\nvar child = exec('some_long_running_process', {async:true});\nchild.stdout.on('data', function(data) {\n /* ... do something with data ... */\n});\n\nexec('some_long_running_process', function(code, output) {\n console.log('Exit code:', code);\n console.log('Program output:', output);\n});\n```\n\nExecutes the given `command` _synchronously_, unless otherwise specified.\nWhen in synchronous mode returns the object `{ code:..., output:... }`, containing the program's\n`output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and\nthe `callback` gets the arguments `(code, output)`.\n\n**Note:** For long-lived processes, it's best to run `exec()` asynchronously as\nthe current synchronous implementation uses a lot of CPU. This should be getting\nfixed soon.\n\n\n### chmod(octal_mode || octal_string, file)\n### chmod(symbolic_mode, file)\n\nAvailable options:\n\n+ `-v`: output a diagnostic for every file processed\n+ `-c`: like verbose but report only when a change is made\n+ `-R`: change files and directories recursively\n\nExamples:\n\n```javascript\nchmod(755, '/Users/brandon');\nchmod('755', '/Users/brandon'); // same as above\nchmod('u+x', '/Users/brandon');\n```\n\nAlters the permissions of a file or directory by either specifying the\nabsolute permissions in octal form or expressing the changes in symbols.\nThis command tries to mimic the POSIX behavior as much as possible.\nNotable exceptions:\n\n+ In symbolic modes, 'a-r' and '-r' are identical. No consideration is\n given to the umask.\n+ There is no \"quiet\" option since default behavior is to run silent.\n\n\n## Non-Unix commands\n\n\n### tempdir()\n\nExamples:\n\n```javascript\nvar tmp = tempdir(); // \"/tmp\" for most *nix platforms\n```\n\nSearches and returns string containing a writeable, platform-dependent temporary directory.\nFollows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir).\n\n\n### error()\nTests if error occurred in the last command. Returns `null` if no error occurred,\notherwise returns string explaining the error\n\n\n## Configuration\n\n\n### config.silent\nExample:\n\n```javascript\nvar silentState = config.silent; // save old silent state\nconfig.silent = true;\n/* ... */\nconfig.silent = silentState; // restore old silent state\n```\n\nSuppresses all command output if `true`, except for `echo()` calls.\nDefault is `false`.\n\n### config.fatal\nExample:\n\n```javascript\nconfig.fatal = true;\ncp('this_file_does_not_exist', '/dev/null'); // dies here\n/* more commands... */\n```\n\nIf `true` the script will die on errors. Default is `false`.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/arturadib/shelljs/issues"
+ },
+ "_id": "shelljs@0.2.6",
+ "_from": "shelljs@0.2.6"
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/scripts/generate-docs.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/scripts/generate-docs.js
new file mode 100644
index 0000000..532fed9
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/scripts/generate-docs.js
@@ -0,0 +1,21 @@
+#!/usr/bin/env node
+require('../global');
+
+echo('Appending docs to README.md');
+
+cd(__dirname + '/..');
+
+// Extract docs from shell.js
+var docs = grep('//@', 'shell.js');
+
+docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) {
+ var file = path.match('.js$') ? path : path+'.js';
+ return grep('//@', file);
+});
+
+// Remove '//@'
+docs = docs.replace(/\/\/\@ ?/g, '');
+// Append docs to README
+sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md');
+
+echo('All done.');
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/scripts/run-tests.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/scripts/run-tests.js
new file mode 100644
index 0000000..f9d31e0
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/scripts/run-tests.js
@@ -0,0 +1,50 @@
+#!/usr/bin/env node
+require('../global');
+
+var path = require('path');
+
+var failed = false;
+
+//
+// Lint
+//
+JSHINT_BIN = './node_modules/jshint/bin/jshint';
+cd(__dirname + '/..');
+
+if (!test('-f', JSHINT_BIN)) {
+ echo('JSHint not found. Run `npm install` in the root dir first.');
+ exit(1);
+}
+
+if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) {
+ failed = true;
+ echo('*** JSHINT FAILED! (return code != 0)');
+ echo();
+} else {
+ echo('All JSHint tests passed');
+ echo();
+}
+
+//
+// Unit tests
+//
+cd(__dirname + '/../test');
+ls('*.js').forEach(function(file) {
+ echo('Running test:', file);
+ if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit)
+ failed = true;
+ echo('*** TEST FAILED! (missing exit code "123")');
+ echo();
+ }
+});
+
+if (failed) {
+ echo();
+ echo('*******************************************************');
+ echo('WARNING: Some tests did not pass!');
+ echo('*******************************************************');
+ exit(1);
+} else {
+ echo();
+ echo('All tests passed.');
+}
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/shell.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/shell.js
new file mode 100644
index 0000000..e56c5de
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/shell.js
@@ -0,0 +1,153 @@
+//
+// ShellJS
+// Unix shell commands on top of Node's API
+//
+// Copyright (c) 2012 Artur Adib
+// http://github.com/arturadib/shelljs
+//
+
+var common = require('./src/common');
+
+
+//@
+//@ All commands run synchronously, unless otherwise stated.
+//@
+
+//@include ./src/cd
+var _cd = require('./src/cd');
+exports.cd = common.wrap('cd', _cd);
+
+//@include ./src/pwd
+var _pwd = require('./src/pwd');
+exports.pwd = common.wrap('pwd', _pwd);
+
+//@include ./src/ls
+var _ls = require('./src/ls');
+exports.ls = common.wrap('ls', _ls);
+
+//@include ./src/find
+var _find = require('./src/find');
+exports.find = common.wrap('find', _find);
+
+//@include ./src/cp
+var _cp = require('./src/cp');
+exports.cp = common.wrap('cp', _cp);
+
+//@include ./src/rm
+var _rm = require('./src/rm');
+exports.rm = common.wrap('rm', _rm);
+
+//@include ./src/mv
+var _mv = require('./src/mv');
+exports.mv = common.wrap('mv', _mv);
+
+//@include ./src/mkdir
+var _mkdir = require('./src/mkdir');
+exports.mkdir = common.wrap('mkdir', _mkdir);
+
+//@include ./src/test
+var _test = require('./src/test');
+exports.test = common.wrap('test', _test);
+
+//@include ./src/cat
+var _cat = require('./src/cat');
+exports.cat = common.wrap('cat', _cat);
+
+//@include ./src/to
+var _to = require('./src/to');
+String.prototype.to = common.wrap('to', _to);
+
+//@include ./src/toEnd
+var _toEnd = require('./src/toEnd');
+String.prototype.toEnd = common.wrap('toEnd', _toEnd);
+
+//@include ./src/sed
+var _sed = require('./src/sed');
+exports.sed = common.wrap('sed', _sed);
+
+//@include ./src/grep
+var _grep = require('./src/grep');
+exports.grep = common.wrap('grep', _grep);
+
+//@include ./src/which
+var _which = require('./src/which');
+exports.which = common.wrap('which', _which);
+
+//@include ./src/echo
+var _echo = require('./src/echo');
+exports.echo = _echo; // don't common.wrap() as it could parse '-options'
+
+//@include ./src/dirs
+var _dirs = require('./src/dirs').dirs;
+exports.dirs = common.wrap("dirs", _dirs);
+var _pushd = require('./src/dirs').pushd;
+exports.pushd = common.wrap('pushd', _pushd);
+var _popd = require('./src/dirs').popd;
+exports.popd = common.wrap("popd", _popd);
+
+//@
+//@ ### exit(code)
+//@ Exits the current process with the given exit code.
+exports.exit = process.exit;
+
+//@
+//@ ### env['VAR_NAME']
+//@ Object containing environment variables (both getter and setter). Shortcut to process.env.
+exports.env = process.env;
+
+//@include ./src/exec
+var _exec = require('./src/exec');
+exports.exec = common.wrap('exec', _exec, {notUnix:true});
+
+//@include ./src/chmod
+var _chmod = require('./src/chmod');
+exports.chmod = common.wrap('chmod', _chmod);
+
+
+
+//@
+//@ ## Non-Unix commands
+//@
+
+//@include ./src/tempdir
+var _tempDir = require('./src/tempdir');
+exports.tempdir = common.wrap('tempdir', _tempDir);
+
+
+//@include ./src/error
+var _error = require('./src/error');
+exports.error = _error;
+
+
+
+//@
+//@ ## Configuration
+//@
+
+exports.config = common.config;
+
+//@
+//@ ### config.silent
+//@ Example:
+//@
+//@ ```javascript
+//@ var silentState = config.silent; // save old silent state
+//@ config.silent = true;
+//@ /* ... */
+//@ config.silent = silentState; // restore old silent state
+//@ ```
+//@
+//@ Suppresses all command output if `true`, except for `echo()` calls.
+//@ Default is `false`.
+
+//@
+//@ ### config.fatal
+//@ Example:
+//@
+//@ ```javascript
+//@ config.fatal = true;
+//@ cp('this_file_does_not_exist', '/dev/null'); // dies here
+//@ /* more commands... */
+//@ ```
+//@
+//@ If `true` the script will die on errors. Default is `false`.
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/cat.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/cat.js
new file mode 100644
index 0000000..f6f4d25
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/cat.js
@@ -0,0 +1,43 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### cat(file [, file ...])
+//@ ### cat(file_array)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var str = cat('file*.txt');
+//@ var str = cat('file1', 'file2');
+//@ var str = cat(['file1', 'file2']); // same as above
+//@ ```
+//@
+//@ Returns a string containing the given file, or a concatenated string
+//@ containing the files if more than one file is given (a new line character is
+//@ introduced between each file). Wildcard `*` accepted.
+function _cat(options, files) {
+ var cat = '';
+
+ if (!files)
+ common.error('no paths given');
+
+ if (typeof files === 'string')
+ files = [].slice.call(arguments, 1);
+ // if it's array leave it as it is
+
+ files = common.expand(files);
+
+ files.forEach(function(file) {
+ if (!fs.existsSync(file))
+ common.error('no such file or directory: ' + file);
+
+ cat += fs.readFileSync(file, 'utf8') + '\n';
+ });
+
+ if (cat[cat.length-1] === '\n')
+ cat = cat.substring(0, cat.length-1);
+
+ return common.ShellString(cat);
+}
+module.exports = _cat;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/cd.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/cd.js
new file mode 100644
index 0000000..230f432
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/cd.js
@@ -0,0 +1,19 @@
+var fs = require('fs');
+var common = require('./common');
+
+//@
+//@ ### cd('dir')
+//@ Changes to directory `dir` for the duration of the script
+function _cd(options, dir) {
+ if (!dir)
+ common.error('directory not specified');
+
+ if (!fs.existsSync(dir))
+ common.error('no such file or directory: ' + dir);
+
+ if (!fs.statSync(dir).isDirectory())
+ common.error('not a directory: ' + dir);
+
+ process.chdir(dir);
+}
+module.exports = _cd;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/chmod.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/chmod.js
new file mode 100644
index 0000000..f288893
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/chmod.js
@@ -0,0 +1,208 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+var PERMS = (function (base) {
+ return {
+ OTHER_EXEC : base.EXEC,
+ OTHER_WRITE : base.WRITE,
+ OTHER_READ : base.READ,
+
+ GROUP_EXEC : base.EXEC << 3,
+ GROUP_WRITE : base.WRITE << 3,
+ GROUP_READ : base.READ << 3,
+
+ OWNER_EXEC : base.EXEC << 6,
+ OWNER_WRITE : base.WRITE << 6,
+ OWNER_READ : base.READ << 6,
+
+ // Literal octal numbers are apparently not allowed in "strict" javascript. Using parseInt is
+ // the preferred way, else a jshint warning is thrown.
+ STICKY : parseInt('01000', 8),
+ SETGID : parseInt('02000', 8),
+ SETUID : parseInt('04000', 8),
+
+ TYPE_MASK : parseInt('0770000', 8)
+ };
+})({
+ EXEC : 1,
+ WRITE : 2,
+ READ : 4
+});
+
+//@
+//@ ### chmod(octal_mode || octal_string, file)
+//@ ### chmod(symbolic_mode, file)
+//@
+//@ Available options:
+//@
+//@ + `-v`: output a diagnostic for every file processed//@
+//@ + `-c`: like verbose but report only when a change is made//@
+//@ + `-R`: change files and directories recursively//@
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ chmod(755, '/Users/brandon');
+//@ chmod('755', '/Users/brandon'); // same as above
+//@ chmod('u+x', '/Users/brandon');
+//@ ```
+//@
+//@ Alters the permissions of a file or directory by either specifying the
+//@ absolute permissions in octal form or expressing the changes in symbols.
+//@ This command tries to mimic the POSIX behavior as much as possible.
+//@ Notable exceptions:
+//@
+//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is
+//@ given to the umask.
+//@ + There is no "quiet" option since default behavior is to run silent.
+function _chmod(options, mode, filePattern) {
+ if (!filePattern) {
+ if (options.length > 0 && options.charAt(0) === '-') {
+ // Special case where the specified file permissions started with - to subtract perms, which
+ // get picked up by the option parser as command flags.
+ // If we are down by one argument and options starts with -, shift everything over.
+ filePattern = mode;
+ mode = options;
+ options = '';
+ }
+ else {
+ common.error('You must specify a file.');
+ }
+ }
+
+ options = common.parseOptions(options, {
+ 'R': 'recursive',
+ 'c': 'changes',
+ 'v': 'verbose'
+ });
+
+ if (typeof filePattern === 'string') {
+ filePattern = [ filePattern ];
+ }
+
+ var files;
+
+ if (options.recursive) {
+ files = [];
+ common.expand(filePattern).forEach(function addFile(expandedFile) {
+ var stat = fs.lstatSync(expandedFile);
+
+ if (!stat.isSymbolicLink()) {
+ files.push(expandedFile);
+
+ if (stat.isDirectory()) { // intentionally does not follow symlinks.
+ fs.readdirSync(expandedFile).forEach(function (child) {
+ addFile(expandedFile + '/' + child);
+ });
+ }
+ }
+ });
+ }
+ else {
+ files = common.expand(filePattern);
+ }
+
+ files.forEach(function innerChmod(file) {
+ file = path.resolve(file);
+ if (!fs.existsSync(file)) {
+ common.error('File not found: ' + file);
+ }
+
+ // When recursing, don't follow symlinks.
+ if (options.recursive && fs.lstatSync(file).isSymbolicLink()) {
+ return;
+ }
+
+ var perms = fs.statSync(file).mode;
+ var type = perms & PERMS.TYPE_MASK;
+
+ var newPerms = perms;
+
+ if (isNaN(parseInt(mode, 8))) {
+ // parse options
+ mode.split(',').forEach(function (symbolicMode) {
+ /*jshint regexdash:true */
+ var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i;
+ var matches = pattern.exec(symbolicMode);
+
+ if (matches) {
+ var applyTo = matches[1];
+ var operator = matches[2];
+ var change = matches[3];
+
+ var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === '';
+ var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === '';
+ var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === '';
+
+ var changeRead = change.indexOf('r') != -1;
+ var changeWrite = change.indexOf('w') != -1;
+ var changeExec = change.indexOf('x') != -1;
+ var changeSticky = change.indexOf('t') != -1;
+ var changeSetuid = change.indexOf('s') != -1;
+
+ var mask = 0;
+ if (changeOwner) {
+ mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0);
+ }
+ if (changeGroup) {
+ mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0);
+ }
+ if (changeOther) {
+ mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0);
+ }
+
+ // Sticky bit is special - it's not tied to user, group or other.
+ if (changeSticky) {
+ mask |= PERMS.STICKY;
+ }
+
+ switch (operator) {
+ case '+':
+ newPerms |= mask;
+ break;
+
+ case '-':
+ newPerms &= ~mask;
+ break;
+
+ case '=':
+ newPerms = type + mask;
+
+ // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared.
+ if (fs.statSync(file).isDirectory()) {
+ newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms;
+ }
+ break;
+ }
+
+ if (options.verbose) {
+ log(file + ' -> ' + newPerms.toString(8));
+ }
+
+ if (perms != newPerms) {
+ if (!options.verbose && options.changes) {
+ log(file + ' -> ' + newPerms.toString(8));
+ }
+ fs.chmodSync(file, newPerms);
+ }
+ }
+ else {
+ common.error('Invalid symbolic mode change: ' + symbolicMode);
+ }
+ });
+ }
+ else {
+ // they gave us a full number
+ newPerms = type + parseInt(mode, 8);
+
+ // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared.
+ if (fs.statSync(file).isDirectory()) {
+ newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms;
+ }
+
+ fs.chmodSync(file, newPerms);
+ }
+ });
+}
+module.exports = _chmod;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/common.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/common.js
new file mode 100644
index 0000000..fe20871
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/common.js
@@ -0,0 +1,189 @@
+var os = require('os');
+var fs = require('fs');
+var _ls = require('./ls');
+
+// Module globals
+var config = {
+ silent: false,
+ fatal: false
+};
+exports.config = config;
+
+var state = {
+ error: null,
+ currentCmd: 'shell.js',
+ tempDir: null
+};
+exports.state = state;
+
+var platform = os.type().match(/^Win/) ? 'win' : 'unix';
+exports.platform = platform;
+
+function log() {
+ if (!config.silent)
+ console.log.apply(this, arguments);
+}
+exports.log = log;
+
+// Shows error message. Throws unless _continue or config.fatal are true
+function error(msg, _continue) {
+ if (state.error === null)
+ state.error = '';
+ state.error += state.currentCmd + ': ' + msg + '\n';
+
+ if (msg.length > 0)
+ log(state.error);
+
+ if (config.fatal)
+ process.exit(1);
+
+ if (!_continue)
+ throw '';
+}
+exports.error = error;
+
+// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings.
+// For now, this is a dummy function to bookmark places we need such strings
+function ShellString(str) {
+ return str;
+}
+exports.ShellString = ShellString;
+
+// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.:
+// parseOptions('-a', {'a':'alice', 'b':'bob'});
+function parseOptions(str, map) {
+ if (!map)
+ error('parseOptions() internal error: no map given');
+
+ // All options are false by default
+ var options = {};
+ for (var letter in map)
+ options[map[letter]] = false;
+
+ if (!str)
+ return options; // defaults
+
+ if (typeof str !== 'string')
+ error('parseOptions() internal error: wrong str');
+
+ // e.g. match[1] = 'Rf' for str = '-Rf'
+ var match = str.match(/^\-(.+)/);
+ if (!match)
+ return options;
+
+ // e.g. chars = ['R', 'f']
+ var chars = match[1].split('');
+
+ chars.forEach(function(c) {
+ if (c in map)
+ options[map[c]] = true;
+ else
+ error('option not recognized: '+c);
+ });
+
+ return options;
+}
+exports.parseOptions = parseOptions;
+
+// Expands wildcards with matching (ie. existing) file names.
+// For example:
+// expand(['file*.js']) = ['file1.js', 'file2.js', ...]
+// (if the files 'file1.js', 'file2.js', etc, exist in the current dir)
+function expand(list) {
+ var expanded = [];
+ list.forEach(function(listEl) {
+ // Wildcard present?
+ if (listEl.search(/\*/) > -1) {
+ _ls('', listEl).forEach(function(file) {
+ expanded.push(file);
+ });
+ } else {
+ expanded.push(listEl);
+ }
+ });
+ return expanded;
+}
+exports.expand = expand;
+
+// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e.
+// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006
+function unlinkSync(file) {
+ try {
+ fs.unlinkSync(file);
+ } catch(e) {
+ // Try to override file permission
+ if (e.code === 'EPERM') {
+ fs.chmodSync(file, '0666');
+ fs.unlinkSync(file);
+ } else {
+ throw e;
+ }
+ }
+}
+exports.unlinkSync = unlinkSync;
+
+// e.g. 'shelljs_a5f185d0443ca...'
+function randomFileName() {
+ function randomHash(count) {
+ if (count === 1)
+ return parseInt(16*Math.random(), 10).toString(16);
+ else {
+ var hash = '';
+ for (var i=0; i and/or ');
+ } else if (arguments.length > 3) {
+ sources = [].slice.call(arguments, 1, arguments.length - 1);
+ dest = arguments[arguments.length - 1];
+ } else if (typeof sources === 'string') {
+ sources = [sources];
+ } else if ('length' in sources) {
+ sources = sources; // no-op for array
+ } else {
+ common.error('invalid arguments');
+ }
+
+ var exists = fs.existsSync(dest),
+ stats = exists && fs.statSync(dest);
+
+ // Dest is not existing dir, but multiple sources given
+ if ((!exists || !stats.isDirectory()) && sources.length > 1)
+ common.error('dest is not a directory (too many sources)');
+
+ // Dest is an existing file, but no -f given
+ if (exists && stats.isFile() && !options.force)
+ common.error('dest file already exists: ' + dest);
+
+ if (options.recursive) {
+ // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*"
+ // (see Github issue #15)
+ sources.forEach(function(src, i) {
+ if (src[src.length - 1] === '/')
+ sources[i] += '*';
+ });
+
+ // Create dest
+ try {
+ fs.mkdirSync(dest, parseInt('0777', 8));
+ } catch (e) {
+ // like Unix's cp, keep going even if we can't create dest dir
+ }
+ }
+
+ sources = common.expand(sources);
+
+ sources.forEach(function(src) {
+ if (!fs.existsSync(src)) {
+ common.error('no such file or directory: '+src, true);
+ return; // skip file
+ }
+
+ // If here, src exists
+ if (fs.statSync(src).isDirectory()) {
+ if (!options.recursive) {
+ // Non-Recursive
+ common.log(src + ' is a directory (not copied)');
+ } else {
+ // Recursive
+ // 'cp /a/source dest' should create 'source' in 'dest'
+ var newDest = path.join(dest, path.basename(src)),
+ checkDir = fs.statSync(src);
+ try {
+ fs.mkdirSync(newDest, checkDir.mode);
+ } catch (e) {
+ //if the directory already exists, that's okay
+ if (e.code !== 'EEXIST') throw e;
+ }
+
+ cpdirSyncRecursive(src, newDest, {force: options.force});
+ }
+ return; // done with dir
+ }
+
+ // If here, src is a file
+
+ // When copying to '/path/dir':
+ // thisDest = '/path/dir/file1'
+ var thisDest = dest;
+ if (fs.existsSync(dest) && fs.statSync(dest).isDirectory())
+ thisDest = path.normalize(dest + '/' + path.basename(src));
+
+ if (fs.existsSync(thisDest) && !options.force) {
+ common.error('dest file already exists: ' + thisDest, true);
+ return; // skip file
+ }
+
+ copyFileSync(src, thisDest);
+ }); // forEach(src)
+}
+module.exports = _cp;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/dirs.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/dirs.js
new file mode 100644
index 0000000..58fae8b
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/dirs.js
@@ -0,0 +1,191 @@
+var common = require('./common');
+var _cd = require('./cd');
+var path = require('path');
+
+// Pushd/popd/dirs internals
+var _dirStack = [];
+
+function _isStackIndex(index) {
+ return (/^[\-+]\d+$/).test(index);
+}
+
+function _parseStackIndex(index) {
+ if (_isStackIndex(index)) {
+ if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd
+ return (/^-/).test(index) ? Number(index) - 1 : Number(index);
+ } else {
+ common.error(index + ': directory stack index out of range');
+ }
+ } else {
+ common.error(index + ': invalid number');
+ }
+}
+
+function _actualDirStack() {
+ return [process.cwd()].concat(_dirStack);
+}
+
+//@
+//@ ### pushd([options,] [dir | '-N' | '+N'])
+//@
+//@ Available options:
+//@
+//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.
+//@
+//@ Arguments:
+//@
+//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.
+//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
+//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ // process.cwd() === '/usr'
+//@ pushd('/etc'); // Returns /etc /usr
+//@ pushd('+1'); // Returns /usr /etc
+//@ ```
+//@
+//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.
+function _pushd(options, dir) {
+ if (_isStackIndex(options)) {
+ dir = options;
+ options = '';
+ }
+
+ options = common.parseOptions(options, {
+ 'n' : 'no-cd'
+ });
+
+ var dirs = _actualDirStack();
+
+ if (dir === '+0') {
+ return dirs; // +0 is a noop
+ } else if (!dir) {
+ if (dirs.length > 1) {
+ dirs = dirs.splice(1, 1).concat(dirs);
+ } else {
+ return common.error('no other directory');
+ }
+ } else if (_isStackIndex(dir)) {
+ var n = _parseStackIndex(dir);
+ dirs = dirs.slice(n).concat(dirs.slice(0, n));
+ } else {
+ if (options['no-cd']) {
+ dirs.splice(1, 0, dir);
+ } else {
+ dirs.unshift(dir);
+ }
+ }
+
+ if (options['no-cd']) {
+ dirs = dirs.slice(1);
+ } else {
+ dir = path.resolve(dirs.shift());
+ _cd('', dir);
+ }
+
+ _dirStack = dirs;
+ return _dirs('');
+}
+exports.pushd = _pushd;
+
+//@
+//@ ### popd([options,] ['-N' | '+N'])
+//@
+//@ Available options:
+//@
+//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
+//@
+//@ Arguments:
+//@
+//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.
+//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ echo(process.cwd()); // '/usr'
+//@ pushd('/etc'); // '/etc /usr'
+//@ echo(process.cwd()); // '/etc'
+//@ popd(); // '/usr'
+//@ echo(process.cwd()); // '/usr'
+//@ ```
+//@
+//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.
+function _popd(options, index) {
+ if (_isStackIndex(options)) {
+ index = options;
+ options = '';
+ }
+
+ options = common.parseOptions(options, {
+ 'n' : 'no-cd'
+ });
+
+ if (!_dirStack.length) {
+ return common.error('directory stack empty');
+ }
+
+ index = _parseStackIndex(index || '+0');
+
+ if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) {
+ index = index > 0 ? index - 1 : index;
+ _dirStack.splice(index, 1);
+ } else {
+ var dir = path.resolve(_dirStack.shift());
+ _cd('', dir);
+ }
+
+ return _dirs('');
+}
+exports.popd = _popd;
+
+//@
+//@ ### dirs([options | '+N' | '-N'])
+//@
+//@ Available options:
+//@
+//@ + `-c`: Clears the directory stack by deleting all of the elements.
+//@
+//@ Arguments:
+//@
+//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.
+//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.
+//@
+//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.
+//@
+//@ See also: pushd, popd
+function _dirs(options, index) {
+ if (_isStackIndex(options)) {
+ index = options;
+ options = '';
+ }
+
+ options = common.parseOptions(options, {
+ 'c' : 'clear'
+ });
+
+ if (options['clear']) {
+ _dirStack = [];
+ return _dirStack;
+ }
+
+ var stack = _actualDirStack();
+
+ if (index) {
+ index = _parseStackIndex(index);
+
+ if (index < 0) {
+ index = stack.length + index;
+ }
+
+ common.log(stack[index]);
+ return stack[index];
+ }
+
+ common.log(stack.join(' '));
+
+ return stack;
+}
+exports.dirs = _dirs;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/echo.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/echo.js
new file mode 100644
index 0000000..760ea84
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/echo.js
@@ -0,0 +1,20 @@
+var common = require('./common');
+
+//@
+//@ ### echo(string [,string ...])
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ echo('hello world');
+//@ var str = echo('hello world');
+//@ ```
+//@
+//@ Prints string to stdout, and returns string with additional utility methods
+//@ like `.to()`.
+function _echo() {
+ var messages = [].slice.call(arguments, 0);
+ console.log.apply(this, messages);
+ return common.ShellString(messages.join(' '));
+}
+module.exports = _echo;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/error.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/error.js
new file mode 100644
index 0000000..cca3efb
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/error.js
@@ -0,0 +1,10 @@
+var common = require('./common');
+
+//@
+//@ ### error()
+//@ Tests if error occurred in the last command. Returns `null` if no error occurred,
+//@ otherwise returns string explaining the error
+function error() {
+ return common.state.error;
+};
+module.exports = error;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/exec.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/exec.js
new file mode 100644
index 0000000..7ccdbc0
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/exec.js
@@ -0,0 +1,181 @@
+var common = require('./common');
+var _tempDir = require('./tempdir');
+var _pwd = require('./pwd');
+var path = require('path');
+var fs = require('fs');
+var child = require('child_process');
+
+// Hack to run child_process.exec() synchronously (sync avoids callback hell)
+// Uses a custom wait loop that checks for a flag file, created when the child process is done.
+// (Can't do a wait loop that checks for internal Node variables/messages as
+// Node is single-threaded; callbacks and other internal state changes are done in the
+// event loop).
+function execSync(cmd, opts) {
+ var tempDir = _tempDir();
+ var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()),
+ codeFile = path.resolve(tempDir+'/'+common.randomFileName()),
+ scriptFile = path.resolve(tempDir+'/'+common.randomFileName()),
+ sleepFile = path.resolve(tempDir+'/'+common.randomFileName());
+
+ var options = common.extend({
+ silent: common.config.silent
+ }, opts);
+
+ var previousStdoutContent = '';
+ // Echoes stdout changes from running process, if not silent
+ function updateStdout() {
+ if (options.silent || !fs.existsSync(stdoutFile))
+ return;
+
+ var stdoutContent = fs.readFileSync(stdoutFile, 'utf8');
+ // No changes since last time?
+ if (stdoutContent.length <= previousStdoutContent.length)
+ return;
+
+ process.stdout.write(stdoutContent.substr(previousStdoutContent.length));
+ previousStdoutContent = stdoutContent;
+ }
+
+ function escape(str) {
+ return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0");
+ }
+
+ cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix
+
+ var script =
+ "var child = require('child_process')," +
+ " fs = require('fs');" +
+ "child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {" +
+ " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');" +
+ "});";
+
+ if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile);
+ if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile);
+ if (fs.existsSync(codeFile)) common.unlinkSync(codeFile);
+
+ fs.writeFileSync(scriptFile, script);
+ child.exec('"'+process.execPath+'" '+scriptFile, {
+ env: process.env,
+ cwd: _pwd(),
+ maxBuffer: 20*1024*1024
+ });
+
+ // The wait loop
+ // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage
+ // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing
+ // CPU usage, though apparently not so much on Windows)
+ while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); }
+ while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); }
+
+ // At this point codeFile exists, but it's not necessarily flushed yet.
+ // Keep reading it until it is.
+ var code = parseInt('', 10);
+ while (isNaN(code)) {
+ code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10);
+ }
+
+ var stdout = fs.readFileSync(stdoutFile, 'utf8');
+
+ // No biggie if we can't erase the files now -- they're in a temp dir anyway
+ try { common.unlinkSync(scriptFile); } catch(e) {}
+ try { common.unlinkSync(stdoutFile); } catch(e) {}
+ try { common.unlinkSync(codeFile); } catch(e) {}
+ try { common.unlinkSync(sleepFile); } catch(e) {}
+
+ // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html
+ if (code === 1 || code === 2 || code >= 126) {
+ common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes
+ }
+ // True if successful, false if not
+ var obj = {
+ code: code,
+ output: stdout
+ };
+ return obj;
+} // execSync()
+
+// Wrapper around exec() to enable echoing output to console in real time
+function execAsync(cmd, opts, callback) {
+ var output = '';
+
+ var options = common.extend({
+ silent: common.config.silent
+ }, opts);
+
+ var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) {
+ if (callback)
+ callback(err ? err.code : 0, output);
+ });
+
+ c.stdout.on('data', function(data) {
+ output += data;
+ if (!options.silent)
+ process.stdout.write(data);
+ });
+
+ c.stderr.on('data', function(data) {
+ output += data;
+ if (!options.silent)
+ process.stdout.write(data);
+ });
+
+ return c;
+}
+
+//@
+//@ ### exec(command [, options] [, callback])
+//@ Available options (all `false` by default):
+//@
+//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided.
+//@ + `silent`: Do not echo program output to console.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var version = exec('node --version', {silent:true}).output;
+//@
+//@ var child = exec('some_long_running_process', {async:true});
+//@ child.stdout.on('data', function(data) {
+//@ /* ... do something with data ... */
+//@ });
+//@
+//@ exec('some_long_running_process', function(code, output) {
+//@ console.log('Exit code:', code);
+//@ console.log('Program output:', output);
+//@ });
+//@ ```
+//@
+//@ Executes the given `command` _synchronously_, unless otherwise specified.
+//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's
+//@ `output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and
+//@ the `callback` gets the arguments `(code, output)`.
+//@
+//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as
+//@ the current synchronous implementation uses a lot of CPU. This should be getting
+//@ fixed soon.
+function _exec(command, options, callback) {
+ if (!command)
+ common.error('must specify command');
+
+ // Callback is defined instead of options.
+ if (typeof options === 'function') {
+ callback = options;
+ options = { async: true };
+ }
+
+ // Callback is defined with options.
+ if (typeof options === 'object' && typeof callback === 'function') {
+ options.async = true;
+ }
+
+ options = common.extend({
+ silent: common.config.silent,
+ async: false
+ }, options);
+
+ if (options.async)
+ return execAsync(command, options, callback);
+ else
+ return execSync(command, options);
+}
+module.exports = _exec;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/find.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/find.js
new file mode 100644
index 0000000..d9eeec2
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/find.js
@@ -0,0 +1,51 @@
+var fs = require('fs');
+var common = require('./common');
+var _ls = require('./ls');
+
+//@
+//@ ### find(path [,path ...])
+//@ ### find(path_array)
+//@ Examples:
+//@
+//@ ```javascript
+//@ find('src', 'lib');
+//@ find(['src', 'lib']); // same as above
+//@ find('.').filter(function(file) { return file.match(/\.js$/); });
+//@ ```
+//@
+//@ Returns array of all files (however deep) in the given paths.
+//@
+//@ The main difference from `ls('-R', path)` is that the resulting file names
+//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`.
+function _find(options, paths) {
+ if (!paths)
+ common.error('no path specified');
+ else if (typeof paths === 'object')
+ paths = paths; // assume array
+ else if (typeof paths === 'string')
+ paths = [].slice.call(arguments, 1);
+
+ var list = [];
+
+ function pushFile(file) {
+ if (common.platform === 'win')
+ file = file.replace(/\\/g, '/');
+ list.push(file);
+ }
+
+ // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs
+ // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory
+
+ paths.forEach(function(file) {
+ pushFile(file);
+
+ if (fs.statSync(file).isDirectory()) {
+ _ls('-RA', file+'/*').forEach(function(subfile) {
+ pushFile(subfile);
+ });
+ }
+ });
+
+ return list;
+}
+module.exports = _find;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/grep.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/grep.js
new file mode 100644
index 0000000..00c7d6a
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/grep.js
@@ -0,0 +1,52 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### grep([options ,] regex_filter, file [, file ...])
+//@ ### grep([options ,] regex_filter, file_array)
+//@ Available options:
+//@
+//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ grep('-v', 'GLOBAL_VARIABLE', '*.js');
+//@ grep('GLOBAL_VARIABLE', '*.js');
+//@ ```
+//@
+//@ Reads input string from given files and returns a string containing all lines of the
+//@ file that match the given `regex_filter`. Wildcard `*` accepted.
+function _grep(options, regex, files) {
+ options = common.parseOptions(options, {
+ 'v': 'inverse'
+ });
+
+ if (!files)
+ common.error('no paths given');
+
+ if (typeof files === 'string')
+ files = [].slice.call(arguments, 2);
+ // if it's array leave it as it is
+
+ files = common.expand(files);
+
+ var grep = '';
+ files.forEach(function(file) {
+ if (!fs.existsSync(file)) {
+ common.error('no such file or directory: ' + file, true);
+ return;
+ }
+
+ var contents = fs.readFileSync(file, 'utf8'),
+ lines = contents.split(/\r*\n/);
+ lines.forEach(function(line) {
+ var matched = line.match(regex);
+ if ((options.inverse && !matched) || (!options.inverse && matched))
+ grep += line + '\n';
+ });
+ });
+
+ return common.ShellString(grep);
+}
+module.exports = _grep;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/ls.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/ls.js
new file mode 100644
index 0000000..3345db4
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/ls.js
@@ -0,0 +1,126 @@
+var path = require('path');
+var fs = require('fs');
+var common = require('./common');
+var _cd = require('./cd');
+var _pwd = require('./pwd');
+
+//@
+//@ ### ls([options ,] path [,path ...])
+//@ ### ls([options ,] path_array)
+//@ Available options:
+//@
+//@ + `-R`: recursive
+//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ ls('projs/*.js');
+//@ ls('-R', '/users/me', '/tmp');
+//@ ls('-R', ['/users/me', '/tmp']); // same as above
+//@ ```
+//@
+//@ Returns array of files in the given path, or in current directory if no path provided.
+function _ls(options, paths) {
+ options = common.parseOptions(options, {
+ 'R': 'recursive',
+ 'A': 'all',
+ 'a': 'all_deprecated'
+ });
+
+ if (options.all_deprecated) {
+ // We won't support the -a option as it's hard to image why it's useful
+ // (it includes '.' and '..' in addition to '.*' files)
+ // For backwards compatibility we'll dump a deprecated message and proceed as before
+ common.log('ls: Option -a is deprecated. Use -A instead');
+ options.all = true;
+ }
+
+ if (!paths)
+ paths = ['.'];
+ else if (typeof paths === 'object')
+ paths = paths; // assume array
+ else if (typeof paths === 'string')
+ paths = [].slice.call(arguments, 1);
+
+ var list = [];
+
+ // Conditionally pushes file to list - returns true if pushed, false otherwise
+ // (e.g. prevents hidden files to be included unless explicitly told so)
+ function pushFile(file, query) {
+ // hidden file?
+ if (path.basename(file)[0] === '.') {
+ // not explicitly asking for hidden files?
+ if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1))
+ return false;
+ }
+
+ if (common.platform === 'win')
+ file = file.replace(/\\/g, '/');
+
+ list.push(file);
+ return true;
+ }
+
+ paths.forEach(function(p) {
+ if (fs.existsSync(p)) {
+ var stats = fs.statSync(p);
+ // Simple file?
+ if (stats.isFile()) {
+ pushFile(p, p);
+ return; // continue
+ }
+
+ // Simple dir?
+ if (stats.isDirectory()) {
+ // Iterate over p contents
+ fs.readdirSync(p).forEach(function(file) {
+ if (!pushFile(file, p))
+ return;
+
+ // Recursive?
+ if (options.recursive) {
+ var oldDir = _pwd();
+ _cd('', p);
+ if (fs.statSync(file).isDirectory())
+ list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*'));
+ _cd('', oldDir);
+ }
+ });
+ return; // continue
+ }
+ }
+
+ // p does not exist - possible wildcard present
+
+ var basename = path.basename(p);
+ var dirname = path.dirname(p);
+ // Wildcard present on an existing dir? (e.g. '/tmp/*.js')
+ if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) {
+ // Escape special regular expression chars
+ var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1');
+ // Translates wildcard into regex
+ regexp = '^' + regexp.replace(/\*/g, '.*') + '$';
+ // Iterate over directory contents
+ fs.readdirSync(dirname).forEach(function(file) {
+ if (file.match(new RegExp(regexp))) {
+ if (!pushFile(path.normalize(dirname+'/'+file), basename))
+ return;
+
+ // Recursive?
+ if (options.recursive) {
+ var pp = dirname + '/' + file;
+ if (fs.lstatSync(pp).isDirectory())
+ list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*'));
+ } // recursive
+ } // if file matches
+ }); // forEach
+ return;
+ }
+
+ common.error('no such file or directory: ' + p, true);
+ });
+
+ return list;
+}
+module.exports = _ls;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/mkdir.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/mkdir.js
new file mode 100644
index 0000000..5a7088f
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/mkdir.js
@@ -0,0 +1,68 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+// Recursively creates 'dir'
+function mkdirSyncRecursive(dir) {
+ var baseDir = path.dirname(dir);
+
+ // Base dir exists, no recursion necessary
+ if (fs.existsSync(baseDir)) {
+ fs.mkdirSync(dir, parseInt('0777', 8));
+ return;
+ }
+
+ // Base dir does not exist, go recursive
+ mkdirSyncRecursive(baseDir);
+
+ // Base dir created, can create dir
+ fs.mkdirSync(dir, parseInt('0777', 8));
+}
+
+//@
+//@ ### mkdir([options ,] dir [, dir ...])
+//@ ### mkdir([options ,] dir_array)
+//@ Available options:
+//@
+//@ + `p`: full path (will create intermediate dirs if necessary)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');
+//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above
+//@ ```
+//@
+//@ Creates directories.
+function _mkdir(options, dirs) {
+ options = common.parseOptions(options, {
+ 'p': 'fullpath'
+ });
+ if (!dirs)
+ common.error('no paths given');
+
+ if (typeof dirs === 'string')
+ dirs = [].slice.call(arguments, 1);
+ // if it's array leave it as it is
+
+ dirs.forEach(function(dir) {
+ if (fs.existsSync(dir)) {
+ if (!options.fullpath)
+ common.error('path already exists: ' + dir, true);
+ return; // skip dir
+ }
+
+ // Base dir does not exist, and no -p option given
+ var baseDir = path.dirname(dir);
+ if (!fs.existsSync(baseDir) && !options.fullpath) {
+ common.error('no such file or directory: ' + baseDir, true);
+ return; // skip dir
+ }
+
+ if (options.fullpath)
+ mkdirSyncRecursive(dir);
+ else
+ fs.mkdirSync(dir, parseInt('0777', 8));
+ });
+} // mkdir
+module.exports = _mkdir;
diff --git a/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/mv.js b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/mv.js
new file mode 100644
index 0000000..11f9607
--- /dev/null
+++ b/3.0/one3/platforms/blackberry10/cordova/node_modules/shelljs/src/mv.js
@@ -0,0 +1,80 @@
+var fs = require('fs');
+var path = require('path');
+var common = require('./common');
+
+//@
+//@ ### mv(source [, source ...], dest')
+//@ ### mv(source_array, dest')
+//@ Available options:
+//@
+//@ + `f`: force
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ mv('-f', 'file', 'dir/');
+//@ mv('file1', 'file2', 'dir/');
+//@ mv(['file1', 'file2'], 'dir/'); // same as above
+//@ ```
+//@
+//@ Moves files. The wildcard `*` is accepted.
+function _mv(options, sources, dest) {
+ options = common.parseOptions(options, {
+ 'f': 'force'
+ });
+
+ // Get sources, dest
+ if (arguments.length < 3) {
+ common.error('missing